From f92fc3028ebd64177ab65f9f1b4bdd282629373b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 6 Aug 2026 06:28:24 +0000 Subject: [PATCH 1/9] chore: import pinned Math-Biotech source tree --- .gitignore | 29 + .migration-seed | 1 - docs/.keep => .nojekyll | 0 .pages-release | 3 + .worktree-note | 1 - API_SUMMARY.md | 224 + App.tsx | 228 + README.md | 175 +- android/.gitignore | 101 + android/app/.gitignore | 2 + android/app/build.gradle | 54 + android/app/capacitor.build.gradle | 19 + android/app/proguard-rules.pro | 21 + .../myapp/ExampleInstrumentedTest.java | 26 + android/app/src/main/AndroidManifest.xml | 41 + .../inmersion/mathbiotech/MainActivity.java | 5 + .../main/res/drawable-land-hdpi/splash.png | Bin 0 -> 7705 bytes .../main/res/drawable-land-mdpi/splash.png | Bin 0 -> 4040 bytes .../main/res/drawable-land-xhdpi/splash.png | Bin 0 -> 9251 bytes .../main/res/drawable-land-xxhdpi/splash.png | Bin 0 -> 13984 bytes .../main/res/drawable-land-xxxhdpi/splash.png | Bin 0 -> 17683 bytes .../main/res/drawable-port-hdpi/splash.png | Bin 0 -> 7934 bytes .../main/res/drawable-port-mdpi/splash.png | Bin 0 -> 4096 bytes .../main/res/drawable-port-xhdpi/splash.png | Bin 0 -> 9875 bytes .../main/res/drawable-port-xxhdpi/splash.png | Bin 0 -> 13346 bytes .../main/res/drawable-port-xxxhdpi/splash.png | Bin 0 -> 17489 bytes .../drawable-v24/ic_launcher_foreground.xml | 34 + .../res/drawable/ic_launcher_background.xml | 170 + android/app/src/main/res/drawable/splash.png | Bin 0 -> 4040 bytes .../app/src/main/res/layout/activity_main.xml | 12 + .../res/mipmap-anydpi-v26/ic_launcher.xml | 5 + .../mipmap-anydpi-v26/ic_launcher_round.xml | 5 + .../src/main/res/mipmap-hdpi/ic_launcher.png | Bin 0 -> 2786 bytes .../mipmap-hdpi/ic_launcher_foreground.png | Bin 0 -> 3450 bytes .../res/mipmap-hdpi/ic_launcher_round.png | Bin 0 -> 4341 bytes .../src/main/res/mipmap-mdpi/ic_launcher.png | Bin 0 -> 1869 bytes .../mipmap-mdpi/ic_launcher_foreground.png | Bin 0 -> 2110 bytes .../res/mipmap-mdpi/ic_launcher_round.png | Bin 0 -> 2725 bytes .../src/main/res/mipmap-xhdpi/ic_launcher.png | Bin 0 -> 3981 bytes .../mipmap-xhdpi/ic_launcher_foreground.png | Bin 0 -> 5036 bytes .../res/mipmap-xhdpi/ic_launcher_round.png | Bin 0 -> 6593 bytes .../main/res/mipmap-xxhdpi/ic_launcher.png | Bin 0 -> 6644 bytes .../mipmap-xxhdpi/ic_launcher_foreground.png | Bin 0 -> 9793 bytes .../res/mipmap-xxhdpi/ic_launcher_round.png | Bin 0 -> 10455 bytes .../main/res/mipmap-xxxhdpi/ic_launcher.png | Bin 0 -> 9441 bytes .../mipmap-xxxhdpi/ic_launcher_foreground.png | Bin 0 -> 15529 bytes .../res/mipmap-xxxhdpi/ic_launcher_round.png | Bin 0 -> 15916 bytes .../res/values/ic_launcher_background.xml | 4 + android/app/src/main/res/values/strings.xml | 7 + android/app/src/main/res/values/styles.xml | 22 + android/app/src/main/res/xml/file_paths.xml | 5 + .../getcapacitor/myapp/ExampleUnitTest.java | 18 + android/build.gradle | 29 + android/capacitor.settings.gradle | 3 + android/gradle.properties | 22 + android/gradle/wrapper/gradle-wrapper.jar | Bin 0 -> 43764 bytes .../gradle/wrapper/gradle-wrapper.properties | 7 + android/gradlew | 251 + android/gradlew.bat | 94 + android/settings.gradle | 5 + android/variables.gradle | 16 + benchmark.js | 108 + capacitor.config.ts | 9 + components/AnimatedBackground.tsx | 39 + components/DNAStrand.tsx | 179 + components/MathRenderer.tsx | 43 + components/MatrixInput.test.tsx | 85 + components/MatrixInput.tsx | 184 + components/Sidebar.test.tsx | 22 + components/Sidebar.tsx | 285 + components/WolframHelper.tsx | 222 + data/branding.test.ts | 30 + data/branding.ts | 5 + data/examQuestions.ts | 807 ++ data/learningCatalog.test.ts | 55 + data/learningCatalog.ts | 133 + .../2026-08-06-inmerson-personal-branding.md | 164 + ...6-08-06-reliable-pages-and-matrix-input.md | 70 + ...08-06-inmerson-personal-branding-design.md | 38 + .../specs/2026-08-06-math-cs-design.md | 430 + ...-reliable-pages-and-matrix-input-design.md | 28 + index.css | 83 + index.html | 173 + index.tsx | 31 + manifest.json | 26 + metadata.json | 5 + package-lock.json | 11198 ++++++++++++++++ package.json | 47 + postcss.config.js | 5 + render.yaml | 7 + server/.env.example | 3 + server/.gitignore | 5 + server/Dockerfile | 45 + server/QUICKSTART.md | 139 + server/README.md | 411 + server/docker-compose.yml | 20 + server/package-lock.json | 1565 +++ server/package.json | 25 + server/src/controllers/examController.ts | 67 + server/src/controllers/matrixController.ts | 183 + server/src/index.ts | 79 + server/src/routes/examRoutes.ts | 16 + server/src/routes/matrixRoutes.ts | 26 + server/src/types/index.ts | 26 + server/src/utils/matrixMath.ts | 136 + server/test-api.js | 151 + server/tsconfig.json | 19 + services/geminiService.ts | 7 + site/assets/AIChatView-BugcxH5N.js | 286 + site/assets/AreaUnderCurveView-D8J_c91U.js | 1 + site/assets/BasicsView-Ces5tTvG.js | 6 + site/assets/CheatSheetView-Cyb0L-8D.js | 11 + site/assets/CobwebView-CUIyp2dZ.js | 1 + site/assets/ContinuityView-CSRJFUO9.js | 13 + site/assets/DerivativesRulesView-CcHPI4L5.js | 3 + site/assets/DeterminantView-B12-SV-Q.js | 15 + site/assets/DiffEq3DView-B2vjbbYS.js | 1 + site/assets/DiffEqBasicsView-GrafeQN7.js | 1 + site/assets/EigenView-vzcUWw_g.js | 6 + site/assets/ExamAnalysisView-DyppqzSR.js | 6 + site/assets/ExercisesView-C-gZzMQC.js | 12 + site/assets/FinalExamView-Bd8W2xqo.js | 27 + site/assets/Float-DkPwlzaD.js | 1 + site/assets/FunctionAnalysisView-BppRFCo9.js | 11 + site/assets/FunctionsView-CURlAo-G.js | 8 + site/assets/GaussianView-CVoXY7jU.js | 21 + site/assets/Grid-BzfIX0gF.js | 61 + site/assets/IntegralBasicsView-IHUY2mpE.js | 6 + site/assets/IntegralRulesView-C3PlQOL5.js | 1 + site/assets/Integrals3DView-CLF6cvHs.js | 11 + site/assets/InverseView-f4AQbsbM.js | 11 + site/assets/Line-DRGYPd7c.js | 409 + .../LinearTransformation3DView-CiwQ5lqc.js | 1 + site/assets/MathRenderer-DoWdgGCt.js | 261 + site/assets/MatrixInput-BvG_poIz.js | 12 + site/assets/NewtonView-D8Lq1Xw6.js | 1 + site/assets/OperationsView-B2CRBmuD.js | 24 + site/assets/OrbitControls-C12Qjv1w.js | 1 + site/assets/PopulationModelsView-BB4Pshcn.js | 1 + site/assets/RadioactiveDecayView-D39iBORv.js | 1 + site/assets/Sequences3DView-f2aGHw3l.js | 1 + site/assets/SequencesView-D362I2Es.js | 3 + site/assets/SeriesView-js2OwgAV.js | 13 + site/assets/Stars-m_MGQ0wC.js | 24 + site/assets/Surface3DView-DR4ocFB5.js | 1 + site/assets/SystemsView-0Pnb8mJU.js | 8 + site/assets/TaylorSeriesView-DJiKKTCO.js | 1 + site/assets/Text-BaglAl3o.js | 217 + site/assets/TransformationsView-CcLdqflF.js | 16 + .../assets/VectorOperations3DView-EaRYXIXa.js | 6 + site/assets/WolframHelper-C3f14kAl.js | 11 + site/assets/chevron-right-KbXem8Tn.js | 6 + site/assets/circle-check-7SRCYW7Y.js | 6 + site/assets/constants-Br-Ti-Jl.js | 1 + site/assets/examStorage-DURyP8UF.js | 11 + site/assets/extends-CF3RwP-h.js | 1 + .../impureFunctionsAny.generated-DwS8eMcc.js | 66 + site/assets/index-DJrAq1Rk.js | 299 + site/assets/index-DypDiaLJ.css | 1 + site/assets/lightbulb-CK5FIpYu.js | 6 + site/assets/manifest-TlqCZM9V.json | 26 + site/assets/matrixMath-CNHWal2D.js | 1 + site/assets/maximize-BW0NideE.js | 6 + site/assets/mouse-pointer-2-CKfMob4f.js | 6 + site/assets/react-three-fiber.esm-DbvaK_kO.js | 3879 ++++++ site/assets/refresh-ccw-DTX90cW0.js | 6 + site/assets/scan-BEuCCSbY.js | 6 + site/assets/settings-2-BYyATKYL.js | 6 + site/assets/triangle-alert-7X0SgA5l.js | 6 + site/assets/zap-Bss3mUov.js | 6 + site/index.html | 174 + tailwind.config.js | 28 + tsconfig.json | 35 + types.ts | 129 + utils/examStorage.ts | 51 + utils/gaussianSteps.ts | 94 + utils/matrixMath.ts | 185 + utils/usePersistedState.ts | 31 + verify_gaussian.py | 40 + views/AIChatView.tsx | 188 + views/AreaUnderCurveView.tsx | 193 + views/BasicsView.tsx | 256 + views/CheatSheetView.tsx | 409 + views/CobwebView.tsx | 122 + views/ContinuityView.tsx | 204 + views/DashboardView.tsx | 304 + views/DerivativesRulesView.tsx | 212 + views/DeterminantView.tsx | 231 + views/DiffEq3DView.tsx | 69 + views/DiffEqBasicsView.tsx | 182 + views/EigenView.tsx | 130 + views/ExamAnalysisView.tsx | 294 + views/ExercisesView.tsx | 571 + views/FinalExamView.tsx | 579 + views/FunctionAnalysisView.tsx | 366 + views/FunctionsView.tsx | 397 + views/GaussianView.tsx | 194 + views/IntegralBasicsView.tsx | 136 + views/IntegralRulesView.tsx | 108 + views/Integrals3DView.tsx | 184 + views/InverseView.tsx | 156 + views/LinearTransformation3DView.tsx | 280 + views/NewtonView.tsx | 226 + views/OperationsView.tsx | 234 + views/PopulationModelsView.tsx | 204 + views/RadioactiveDecayView.tsx | 144 + views/Sequences3DView.tsx | 128 + views/SequencesView.tsx | 321 + views/SeriesView.tsx | 271 + views/Surface3DView.tsx | 97 + views/SystemsView.tsx | 267 + views/TaylorSeriesView.tsx | 181 + views/TransformationsView.tsx | 173 + views/VectorOperations3DView.tsx | 209 + views/__tests__/AIChatView.test.tsx | 46 + vite.config.ts | 30 + vitest.setup.ts | 4 + 217 files changed, 34014 insertions(+), 3 deletions(-) create mode 100644 .gitignore delete mode 100644 .migration-seed rename docs/.keep => .nojekyll (100%) create mode 100644 .pages-release delete mode 100644 .worktree-note create mode 100644 API_SUMMARY.md create mode 100644 App.tsx create mode 100644 android/.gitignore create mode 100644 android/app/.gitignore create mode 100644 android/app/build.gradle create mode 100644 android/app/capacitor.build.gradle create mode 100644 android/app/proguard-rules.pro create mode 100644 android/app/src/androidTest/java/com/getcapacitor/myapp/ExampleInstrumentedTest.java create mode 100644 android/app/src/main/AndroidManifest.xml create mode 100644 android/app/src/main/java/com/inmersion/mathbiotech/MainActivity.java create mode 100644 android/app/src/main/res/drawable-land-hdpi/splash.png create mode 100644 android/app/src/main/res/drawable-land-mdpi/splash.png create mode 100644 android/app/src/main/res/drawable-land-xhdpi/splash.png create mode 100644 android/app/src/main/res/drawable-land-xxhdpi/splash.png create mode 100644 android/app/src/main/res/drawable-land-xxxhdpi/splash.png create mode 100644 android/app/src/main/res/drawable-port-hdpi/splash.png create mode 100644 android/app/src/main/res/drawable-port-mdpi/splash.png create mode 100644 android/app/src/main/res/drawable-port-xhdpi/splash.png create mode 100644 android/app/src/main/res/drawable-port-xxhdpi/splash.png create mode 100644 android/app/src/main/res/drawable-port-xxxhdpi/splash.png create mode 100644 android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml create mode 100644 android/app/src/main/res/drawable/ic_launcher_background.xml create mode 100644 android/app/src/main/res/drawable/splash.png create mode 100644 android/app/src/main/res/layout/activity_main.xml create mode 100644 android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml create mode 100644 android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml create mode 100644 android/app/src/main/res/mipmap-hdpi/ic_launcher.png create mode 100644 android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png create mode 100644 android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png create mode 100644 android/app/src/main/res/mipmap-mdpi/ic_launcher.png create mode 100644 android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png create mode 100644 android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png create mode 100644 android/app/src/main/res/mipmap-xhdpi/ic_launcher.png create mode 100644 android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png create mode 100644 android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png create mode 100644 android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png create mode 100644 android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png create mode 100644 android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png create mode 100644 android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png create mode 100644 android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png create mode 100644 android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png create mode 100644 android/app/src/main/res/values/ic_launcher_background.xml create mode 100644 android/app/src/main/res/values/strings.xml create mode 100644 android/app/src/main/res/values/styles.xml create mode 100644 android/app/src/main/res/xml/file_paths.xml create mode 100644 android/app/src/test/java/com/getcapacitor/myapp/ExampleUnitTest.java create mode 100644 android/build.gradle create mode 100644 android/capacitor.settings.gradle create mode 100644 android/gradle.properties create mode 100644 android/gradle/wrapper/gradle-wrapper.jar create mode 100644 android/gradle/wrapper/gradle-wrapper.properties create mode 100644 android/gradlew create mode 100644 android/gradlew.bat create mode 100644 android/settings.gradle create mode 100644 android/variables.gradle create mode 100644 benchmark.js create mode 100644 capacitor.config.ts create mode 100644 components/AnimatedBackground.tsx create mode 100644 components/DNAStrand.tsx create mode 100644 components/MathRenderer.tsx create mode 100644 components/MatrixInput.test.tsx create mode 100644 components/MatrixInput.tsx create mode 100644 components/Sidebar.test.tsx create mode 100644 components/Sidebar.tsx create mode 100644 components/WolframHelper.tsx create mode 100644 data/branding.test.ts create mode 100644 data/branding.ts create mode 100644 data/examQuestions.ts create mode 100644 data/learningCatalog.test.ts create mode 100644 data/learningCatalog.ts create mode 100644 docs/superpowers/plans/2026-08-06-inmerson-personal-branding.md create mode 100644 docs/superpowers/plans/2026-08-06-reliable-pages-and-matrix-input.md create mode 100644 docs/superpowers/specs/2026-08-06-inmerson-personal-branding-design.md create mode 100644 docs/superpowers/specs/2026-08-06-math-cs-design.md create mode 100644 docs/superpowers/specs/2026-08-06-reliable-pages-and-matrix-input-design.md create mode 100644 index.css create mode 100644 index.html create mode 100644 index.tsx create mode 100644 manifest.json create mode 100644 metadata.json create mode 100644 package-lock.json create mode 100644 package.json create mode 100644 postcss.config.js create mode 100644 render.yaml create mode 100644 server/.env.example create mode 100644 server/.gitignore create mode 100644 server/Dockerfile create mode 100644 server/QUICKSTART.md create mode 100644 server/README.md create mode 100644 server/docker-compose.yml create mode 100644 server/package-lock.json create mode 100644 server/package.json create mode 100644 server/src/controllers/examController.ts create mode 100644 server/src/controllers/matrixController.ts create mode 100644 server/src/index.ts create mode 100644 server/src/routes/examRoutes.ts create mode 100644 server/src/routes/matrixRoutes.ts create mode 100644 server/src/types/index.ts create mode 100644 server/src/utils/matrixMath.ts create mode 100644 server/test-api.js create mode 100644 server/tsconfig.json create mode 100644 services/geminiService.ts create mode 100644 site/assets/AIChatView-BugcxH5N.js create mode 100644 site/assets/AreaUnderCurveView-D8J_c91U.js create mode 100644 site/assets/BasicsView-Ces5tTvG.js create mode 100644 site/assets/CheatSheetView-Cyb0L-8D.js create mode 100644 site/assets/CobwebView-CUIyp2dZ.js create mode 100644 site/assets/ContinuityView-CSRJFUO9.js create mode 100644 site/assets/DerivativesRulesView-CcHPI4L5.js create mode 100644 site/assets/DeterminantView-B12-SV-Q.js create mode 100644 site/assets/DiffEq3DView-B2vjbbYS.js create mode 100644 site/assets/DiffEqBasicsView-GrafeQN7.js create mode 100644 site/assets/EigenView-vzcUWw_g.js create mode 100644 site/assets/ExamAnalysisView-DyppqzSR.js create mode 100644 site/assets/ExercisesView-C-gZzMQC.js create mode 100644 site/assets/FinalExamView-Bd8W2xqo.js create mode 100644 site/assets/Float-DkPwlzaD.js create mode 100644 site/assets/FunctionAnalysisView-BppRFCo9.js create mode 100644 site/assets/FunctionsView-CURlAo-G.js create mode 100644 site/assets/GaussianView-CVoXY7jU.js create mode 100644 site/assets/Grid-BzfIX0gF.js create mode 100644 site/assets/IntegralBasicsView-IHUY2mpE.js create mode 100644 site/assets/IntegralRulesView-C3PlQOL5.js create mode 100644 site/assets/Integrals3DView-CLF6cvHs.js create mode 100644 site/assets/InverseView-f4AQbsbM.js create mode 100644 site/assets/Line-DRGYPd7c.js create mode 100644 site/assets/LinearTransformation3DView-CiwQ5lqc.js create mode 100644 site/assets/MathRenderer-DoWdgGCt.js create mode 100644 site/assets/MatrixInput-BvG_poIz.js create mode 100644 site/assets/NewtonView-D8Lq1Xw6.js create mode 100644 site/assets/OperationsView-B2CRBmuD.js create mode 100644 site/assets/OrbitControls-C12Qjv1w.js create mode 100644 site/assets/PopulationModelsView-BB4Pshcn.js create mode 100644 site/assets/RadioactiveDecayView-D39iBORv.js create mode 100644 site/assets/Sequences3DView-f2aGHw3l.js create mode 100644 site/assets/SequencesView-D362I2Es.js create mode 100644 site/assets/SeriesView-js2OwgAV.js create mode 100644 site/assets/Stars-m_MGQ0wC.js create mode 100644 site/assets/Surface3DView-DR4ocFB5.js create mode 100644 site/assets/SystemsView-0Pnb8mJU.js create mode 100644 site/assets/TaylorSeriesView-DJiKKTCO.js create mode 100644 site/assets/Text-BaglAl3o.js create mode 100644 site/assets/TransformationsView-CcLdqflF.js create mode 100644 site/assets/VectorOperations3DView-EaRYXIXa.js create mode 100644 site/assets/WolframHelper-C3f14kAl.js create mode 100644 site/assets/chevron-right-KbXem8Tn.js create mode 100644 site/assets/circle-check-7SRCYW7Y.js create mode 100644 site/assets/constants-Br-Ti-Jl.js create mode 100644 site/assets/examStorage-DURyP8UF.js create mode 100644 site/assets/extends-CF3RwP-h.js create mode 100644 site/assets/impureFunctionsAny.generated-DwS8eMcc.js create mode 100644 site/assets/index-DJrAq1Rk.js create mode 100644 site/assets/index-DypDiaLJ.css create mode 100644 site/assets/lightbulb-CK5FIpYu.js create mode 100644 site/assets/manifest-TlqCZM9V.json create mode 100644 site/assets/matrixMath-CNHWal2D.js create mode 100644 site/assets/maximize-BW0NideE.js create mode 100644 site/assets/mouse-pointer-2-CKfMob4f.js create mode 100644 site/assets/react-three-fiber.esm-DbvaK_kO.js create mode 100644 site/assets/refresh-ccw-DTX90cW0.js create mode 100644 site/assets/scan-BEuCCSbY.js create mode 100644 site/assets/settings-2-BYyATKYL.js create mode 100644 site/assets/triangle-alert-7X0SgA5l.js create mode 100644 site/assets/zap-Bss3mUov.js create mode 100644 site/index.html create mode 100644 tailwind.config.js create mode 100644 tsconfig.json create mode 100644 types.ts create mode 100644 utils/examStorage.ts create mode 100644 utils/gaussianSteps.ts create mode 100644 utils/matrixMath.ts create mode 100644 utils/usePersistedState.ts create mode 100644 verify_gaussian.py create mode 100644 views/AIChatView.tsx create mode 100644 views/AreaUnderCurveView.tsx create mode 100644 views/BasicsView.tsx create mode 100644 views/CheatSheetView.tsx create mode 100644 views/CobwebView.tsx create mode 100644 views/ContinuityView.tsx create mode 100644 views/DashboardView.tsx create mode 100644 views/DerivativesRulesView.tsx create mode 100644 views/DeterminantView.tsx create mode 100644 views/DiffEq3DView.tsx create mode 100644 views/DiffEqBasicsView.tsx create mode 100644 views/EigenView.tsx create mode 100644 views/ExamAnalysisView.tsx create mode 100644 views/ExercisesView.tsx create mode 100644 views/FinalExamView.tsx create mode 100644 views/FunctionAnalysisView.tsx create mode 100644 views/FunctionsView.tsx create mode 100644 views/GaussianView.tsx create mode 100644 views/IntegralBasicsView.tsx create mode 100644 views/IntegralRulesView.tsx create mode 100644 views/Integrals3DView.tsx create mode 100644 views/InverseView.tsx create mode 100644 views/LinearTransformation3DView.tsx create mode 100644 views/NewtonView.tsx create mode 100644 views/OperationsView.tsx create mode 100644 views/PopulationModelsView.tsx create mode 100644 views/RadioactiveDecayView.tsx create mode 100644 views/Sequences3DView.tsx create mode 100644 views/SequencesView.tsx create mode 100644 views/SeriesView.tsx create mode 100644 views/Surface3DView.tsx create mode 100644 views/SystemsView.tsx create mode 100644 views/TaylorSeriesView.tsx create mode 100644 views/TransformationsView.tsx create mode 100644 views/VectorOperations3DView.tsx create mode 100644 views/__tests__/AIChatView.test.tsx create mode 100644 vite.config.ts create mode 100644 vitest.setup.ts diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..84f3e4b --- /dev/null +++ b/.gitignore @@ -0,0 +1,29 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +dist +dist-ssr +*.local + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? + +# Server build artifacts +server/node_modules +server/dist +server/.env diff --git a/.migration-seed b/.migration-seed deleted file mode 100644 index e31de1f..0000000 --- a/.migration-seed +++ /dev/null @@ -1 +0,0 @@ -seed diff --git a/docs/.keep b/.nojekyll similarity index 100% rename from docs/.keep rename to .nojekyll diff --git a/.pages-release b/.pages-release new file mode 100644 index 0000000..0f83862 --- /dev/null +++ b/.pages-release @@ -0,0 +1,3 @@ +Math Biotech GitHub Pages release +Deployed: 2026-08-06T00:18:30+02:00 +Site path: /Math-Biotech-Project/site/ diff --git a/.worktree-note b/.worktree-note deleted file mode 100644 index 946dd06..0000000 --- a/.worktree-note +++ /dev/null @@ -1 +0,0 @@ -Development continues on feat/math-cs-conversion. diff --git a/API_SUMMARY.md b/API_SUMMARY.md new file mode 100644 index 0000000..9361465 --- /dev/null +++ b/API_SUMMARY.md @@ -0,0 +1,224 @@ +# Web API Implementation Summary + +## Problem Statement +**"gelistir webb api"** (Turkish: "develop web api") + +## Solution Delivered + +A complete, production-ready Web API backend for the Math Biotech Project built with Express.js and TypeScript. + +## Features Implemented + +### ๐Ÿ”ข Matrix Operations API (9 endpoints) +- **Addition** - Add two matrices +- **Subtraction** - Subtract matrices +- **Multiplication** - Multiply matrices +- **Scalar Multiplication** - Multiply by scalar +- **Transpose** - Transpose matrix +- **Determinant** - Calculate determinant +- **Inverse** - Calculate matrix inverse +- **Trace** - Calculate trace (sum of diagonal) +- **Eigenvalues** - Calculate eigenvalues for 2x2 matrices + +### ๐Ÿ“Š Exam Performance API (4 endpoints) +- **Get Performance** - Retrieve all exam statistics +- **Save Result** - Record question attempts +- **Get Question Stats** - Individual question analytics +- **Reset Data** - Clear all exam data + +### ๐Ÿ› ๏ธ Infrastructure +- โœ… TypeScript for type safety +- โœ… CORS support for frontend integration +- โœ… RESTful API design +- โœ… Comprehensive error handling +- โœ… Environment configuration (.env) +- โœ… Health check endpoint +- โœ… 404 and error handlers + +### ๐Ÿณ Deployment +- โœ… Docker support (Dockerfile + docker-compose.yml) +- โœ… Multi-stage Docker build for optimization +- โœ… Health checks in Docker +- โœ… Production build system + +### ๐Ÿ“š Documentation +- โœ… Comprehensive README.md +- โœ… Quick Start guide (QUICKSTART.md) +- โœ… API endpoint documentation +- โœ… Example requests and responses +- โœ… Environment configuration guide + +### ๐Ÿงช Testing +- โœ… Automated test suite (test-api.js) +- โœ… All endpoints tested and verified +- โœ… Test command: `npm test` +- โœ… No security vulnerabilities found (CodeQL scan) + +## Project Structure + +``` +server/ +โ”œโ”€โ”€ src/ +โ”‚ โ”œโ”€โ”€ controllers/ +โ”‚ โ”‚ โ”œโ”€โ”€ matrixController.ts # Matrix operations handlers +โ”‚ โ”‚ โ””โ”€โ”€ examController.ts # Exam tracking handlers +โ”‚ โ”œโ”€โ”€ routes/ +โ”‚ โ”‚ โ”œโ”€โ”€ matrixRoutes.ts # Matrix API routes +โ”‚ โ”‚ โ””โ”€โ”€ examRoutes.ts # Exam API routes +โ”‚ โ”œโ”€โ”€ types/ +โ”‚ โ”‚ โ””โ”€โ”€ index.ts # TypeScript type definitions +โ”‚ โ”œโ”€โ”€ utils/ +โ”‚ โ”‚ โ””โ”€โ”€ matrixMath.ts # Matrix math utilities +โ”‚ โ””โ”€โ”€ index.ts # Main server entry point +โ”œโ”€โ”€ Dockerfile # Docker container config +โ”œโ”€โ”€ docker-compose.yml # Docker Compose config +โ”œโ”€โ”€ test-api.js # Automated test suite +โ”œโ”€โ”€ README.md # Full documentation +โ”œโ”€โ”€ QUICKSTART.md # Quick start guide +โ”œโ”€โ”€ package.json # Dependencies & scripts +โ””โ”€โ”€ tsconfig.json # TypeScript config +``` + +## How to Use + +### Development +```bash +cd server +npm install +npm run dev +``` +Server runs at: http://localhost:5000 + +### Production +```bash +npm run build +npm start +``` + +### Docker +```bash +docker-compose up -d +``` + +### Testing +```bash +npm test +``` + +## API Examples + +### Matrix Multiplication +```bash +curl -X POST http://localhost:5000/api/matrix/multiply \ + -H "Content-Type: application/json" \ + -d '{"matrixA": [[1,2],[3,4]], "matrixB": [[2,0],[1,2]]}' +``` + +Response: +```json +{ + "success": true, + "result": [[4, 4], [10, 8]] +} +``` + +### Save Exam Result +```bash +curl -X POST http://localhost:5000/api/exam/result \ + -H "Content-Type: application/json" \ + -d '{"questionId": 1, "isCorrect": true}' +``` + +Response: +```json +{ + "success": true, + "data": { + "correct": 1, + "incorrect": 0, + "lastAttempt": 1707038233133 + } +} +``` + +## Technology Stack + +- **Runtime**: Node.js 20+ +- **Framework**: Express.js 4.x +- **Language**: TypeScript 5.x +- **Development**: tsx (TypeScript execution) +- **CORS**: cors middleware +- **Environment**: dotenv + +## Security + +โœ… CodeQL security scan passed with 0 vulnerabilities +โœ… No known security issues in dependencies +โœ… Proper error handling implemented +โœ… CORS configured for secure frontend integration + +## Files Added/Modified + +### New Files (17 files) +- `server/` directory with complete API implementation +- All TypeScript source files +- Configuration files (package.json, tsconfig.json, .env.example) +- Documentation (README.md, QUICKSTART.md) +- Docker files (Dockerfile, docker-compose.yml) +- Test suite (test-api.js) + +### Modified Files (2 files) +- `README.md` - Added API documentation section +- `.gitignore` - Added server build artifacts exclusions + +## Test Results + +โœ… Health Check - PASSED +โœ… Matrix Addition - PASSED +โœ… Matrix Multiplication - PASSED +โœ… Determinant - PASSED +โœ… Matrix Inverse - PASSED +โœ… Eigenvalues - PASSED +โœ… Scalar Multiplication - PASSED +โœ… Matrix Transpose - PASSED +โœ… Save Exam Result - PASSED +โœ… Get Exam Performance - PASSED +โœ… Get Question Stats - PASSED + +**All 11 tests passed successfully!** + +## Deployment Options + +1. **Local Development**: `npm run dev` +2. **Production Node**: `npm run build && npm start` +3. **Docker**: `docker-compose up -d` +4. **Cloud Platforms**: Deploy to AWS, Azure, Google Cloud, or Heroku + +## Next Steps (Future Enhancements) + +Potential improvements for future iterations: +- Add database integration (PostgreSQL/MongoDB) +- Implement user authentication +- Add rate limiting +- Add API versioning +- Add more advanced mathematical operations +- Add WebSocket support for real-time updates +- Add API key authentication +- Add logging system (Winston/Morgan) + +## Conclusion + +โœ… **Task Completed Successfully** + +A fully functional, production-ready Web API has been developed for the Math Biotech Project. The API includes: +- 13 total endpoints (9 matrix + 4 exam) +- Complete TypeScript implementation +- Comprehensive documentation +- Automated testing +- Docker deployment support +- Zero security vulnerabilities + +The API is ready for integration with the frontend and deployment to production. + +--- +ยฉ 2026 Inmersion. All rights reserved. diff --git a/App.tsx b/App.tsx new file mode 100644 index 0000000..e940dd9 --- /dev/null +++ b/App.tsx @@ -0,0 +1,228 @@ +import React, { lazy, Suspense, useState } from 'react'; +import { Sidebar } from './components/Sidebar'; +import { ViewMode, ModuleType } from './types'; +import { DashboardView } from './views/DashboardView'; +import { AnimatedBackground } from './components/AnimatedBackground'; +import { motion, AnimatePresence, useReducedMotion } from 'framer-motion'; +import { LoaderCircle, Lock, Menu } from 'lucide-react'; +import { usePersistedState } from './utils/usePersistedState'; +import { + getDefaultViewForModule, + LearningDestinationRef, +} from './data/learningCatalog'; + +const BasicsView = lazy(() => import('./views/BasicsView').then(({ BasicsView }) => ({ default: BasicsView }))); +const OperationsView = lazy(() => import('./views/OperationsView').then(({ OperationsView }) => ({ default: OperationsView }))); +const DeterminantView = lazy(() => import('./views/DeterminantView').then(({ DeterminantView }) => ({ default: DeterminantView }))); +const InverseView = lazy(() => import('./views/InverseView').then(({ InverseView }) => ({ default: InverseView }))); +const HomeworkView = lazy(() => import('./views/ExercisesView').then(({ HomeworkView }) => ({ default: HomeworkView }))); +const SequencesView = lazy(() => import('./views/SequencesView').then(({ SequencesView }) => ({ default: SequencesView }))); +const Sequences3DView = lazy(() => import('./views/Sequences3DView').then(({ Sequences3DView }) => ({ default: Sequences3DView }))); +const FunctionsView = lazy(() => import('./views/FunctionsView').then(({ FunctionsView }) => ({ default: FunctionsView }))); +const Surface3DView = lazy(() => import('./views/Surface3DView').then(({ Surface3DView }) => ({ default: Surface3DView }))); +const FinalExamView = lazy(() => import('./views/FinalExamView').then(({ FinalExamView }) => ({ default: FinalExamView }))); +const ExamAnalysisView = lazy(() => import('./views/ExamAnalysisView').then(({ ExamAnalysisView }) => ({ default: ExamAnalysisView }))); +const DerivativesRulesView = lazy(() => import('./views/DerivativesRulesView').then(({ DerivativesRulesView }) => ({ default: DerivativesRulesView }))); +const FunctionAnalysisView = lazy(() => import('./views/FunctionAnalysisView').then(({ FunctionAnalysisView }) => ({ default: FunctionAnalysisView }))); +const SystemsView = lazy(() => import('./views/SystemsView').then(({ SystemsView }) => ({ default: SystemsView }))); +const ContinuityView = lazy(() => import('./views/ContinuityView').then(({ ContinuityView }) => ({ default: ContinuityView }))); +const GaussianView = lazy(() => import('./views/GaussianView').then(({ GaussianView }) => ({ default: GaussianView }))); +const EigenView = lazy(() => import('./views/EigenView').then(({ EigenView }) => ({ default: EigenView }))); +const CobwebView = lazy(() => import('./views/CobwebView').then(({ CobwebView }) => ({ default: CobwebView }))); +const SeriesView = lazy(() => import('./views/SeriesView').then(({ SeriesView }) => ({ default: SeriesView }))); +const TransformationsView = lazy(() => import('./views/TransformationsView').then(({ TransformationsView }) => ({ default: TransformationsView }))); +const NewtonView = lazy(() => import('./views/NewtonView').then(({ NewtonView }) => ({ default: NewtonView }))); +const TaylorSeriesView = lazy(() => import('./views/TaylorSeriesView').then(({ TaylorSeriesView }) => ({ default: TaylorSeriesView }))); +const IntegralBasicsView = lazy(() => import('./views/IntegralBasicsView').then(({ IntegralBasicsView }) => ({ default: IntegralBasicsView }))); +const IntegralRulesView = lazy(() => import('./views/IntegralRulesView').then(({ IntegralRulesView }) => ({ default: IntegralRulesView }))); +const AreaUnderCurveView = lazy(() => import('./views/AreaUnderCurveView').then(({ AreaUnderCurveView }) => ({ default: AreaUnderCurveView }))); +const Integrals3DView = lazy(() => import('./views/Integrals3DView').then(({ Integrals3DView }) => ({ default: Integrals3DView }))); +const DiffEqBasicsView = lazy(() => import('./views/DiffEqBasicsView').then(({ DiffEqBasicsView }) => ({ default: DiffEqBasicsView }))); +const PopulationModelsView = lazy(() => import('./views/PopulationModelsView').then(({ PopulationModelsView }) => ({ default: PopulationModelsView }))); +const RadioactiveDecayView = lazy(() => import('./views/RadioactiveDecayView').then(({ RadioactiveDecayView }) => ({ default: RadioactiveDecayView }))); +const DiffEq3DView = lazy(() => import('./views/DiffEq3DView').then(({ DiffEq3DView }) => ({ default: DiffEq3DView }))); +const CheatSheetView = lazy(() => import('./views/CheatSheetView').then(({ CheatSheetView }) => ({ default: CheatSheetView }))); +const LinearTransformation3DView = lazy(() => import('./views/LinearTransformation3DView').then(({ LinearTransformation3DView }) => ({ default: LinearTransformation3DView }))); +const VectorOperations3DView = lazy(() => import('./views/VectorOperations3DView').then(({ VectorOperations3DView }) => ({ default: VectorOperations3DView }))); +const AIChatView = lazy(() => import('./views/AIChatView').then(({ AIChatView }) => ({ default: AIChatView }))); + +const EmptyExamView: React.FC<{ title: string }> = ({ title }) => ( +
+
+ +
+
+

{title}

+
+ STATUS: LOCKED +
+
+

+ This examination module is currently unavailable. Please proceed to the Final Exam for comprehensive assessment. +

+
+); + +const ViewLoadingFallback: React.FC = () => ( +
+
+ +
+
+

Preparing the learning lab

+

Loading only the resources required for this topic.

+
+
+); + +const App: React.FC = () => { + const [currentModule, setCurrentModule] = usePersistedState('app_module', ModuleType.HOME); + const [view, setView] = usePersistedState('app_view', ViewMode.BASICS); + const [lastDestination, setLastDestination] = usePersistedState( + 'last_learning_destination', + null, + ); + const [isMobileMenuOpen, setIsMobileMenuOpen] = useState(false); + const shouldReduceMotion = useReducedMotion(); + + const navigateTo = (destination: LearningDestinationRef) => { + setCurrentModule(destination.module); + setView(destination.view); + setLastDestination(destination); + setIsMobileMenuOpen(false); + }; + + const handleModuleSelect = (module: ModuleType) => { + navigateTo({ + module, + view: getDefaultViewForModule(module), + }); + }; + + const handleViewSelect = (nextView: ViewMode) => { + setView(nextView); + if (currentModule !== ModuleType.HOME) { + setLastDestination({ + module: currentModule, + view: nextView, + }); + } + }; + + const handleGoHome = () => { + setCurrentModule(ModuleType.HOME); + setIsMobileMenuOpen(false); + }; + + const renderView = () => { + switch (view) { + case ViewMode.BASICS: return ; + case ViewMode.OPERATIONS: return ; + case ViewMode.DETERMINANT: return ; + case ViewMode.INVERSE: return ; + case ViewMode.SYSTEMS: return ; + case ViewMode.GAUSSIAN: return ; + case ViewMode.EIGENVALUES: return ; + case ViewMode.VECTOR_3D: return ; + case ViewMode.VECTOR_OPS_3D: return ; + case ViewMode.SEQUENCES: return ; + case ViewMode.SERIES: return ; + case ViewMode.COBWEB: return ; + case ViewMode.SEQUENCES_3D: return ; + case ViewMode.FUNCTIONS: return ; + case ViewMode.TRANSFORMATIONS: return ; + case ViewMode.NEWTON: return ; + case ViewMode.FUNCTIONS_3D: return ; + case ViewMode.LIMITS: return ; + case ViewMode.CONTINUITY: return ; + case ViewMode.LIMITS_3D: return ; + case ViewMode.DERIVATIVE_RULES: return ; + case ViewMode.FUNCTION_ANALYSIS: return ; + case ViewMode.TAYLOR: return ; + case ViewMode.DERIVATIVES_3D: return ; + case ViewMode.INTEGRAL_BASICS: return ; + case ViewMode.INTEGRAL_RULES: return ; + case ViewMode.AREA_UNDER_CURVE: return ; + case ViewMode.INTEGRALS_3D: return ; + case ViewMode.DIFF_BASICS: return ; + case ViewMode.POPULATION_MODELS: return ; + case ViewMode.RADIOACTIVE_DECAY: return ; + case ViewMode.DIFF_EQ_3D: return ; + case ViewMode.CLASS_EXAM_1: return ; + case ViewMode.CLASS_EXAM_2: return ; + case ViewMode.CLASS_EXAM_3: return ; + case ViewMode.FULL_EXAM: return ; + case ViewMode.EXAM_ANALYSIS: return ; + case ViewMode.HOMEWORK: return ; + case ViewMode.FINAL_EXAM: return ; + case ViewMode.CHEAT_SHEET: return ; + case ViewMode.AI_CHAT: return ; + default: return ; + } + }; + + return ( +
+ + +
+ {currentModule === ModuleType.HOME ? ( + + ) : ( +
+ setIsMobileMenuOpen((open) => !open)} + /> + +
+
+ + + {currentModule.replace('_', ' ')} + + + +
+ + + }> + {renderView()} + + + +
+
+
+ )} +
+
+ ); +}; + +export default App; diff --git a/README.md b/README.md index 6667254..bebb579 100644 --- a/README.md +++ b/README.md @@ -1 +1,174 @@ -# Temporary migration probe +# Inmerson โ€ข Personal Math & Biotech Lab + +A personal mathematics and biotechnology learning laboratory by Inmerson, designed to be published as a responsive web app, an installable PWA and native mobile packages from one shared codebase. + +The project combines interactive mathematical learning, biotechnology-oriented examples, three-dimensional visualizations and a REST API for deterministic calculations and study records. + +## Project status + +**Active development โ€” public transition repository** + +The source is publicly visible, but a final open-source license has not yet been selected. Until a `LICENSE` file is added, public visibility alone does not grant general reuse rights. + +## Current capabilities + +- Biotechnology-oriented mathematical lessons and examples +- Matrix addition, multiplication, determinant and inverse workflows +- Exam-performance tracking and statistics +- Formula rendering with KaTeX +- Interactive 3D content through Three.js +- AI-assisted explanations +- Installable PWA support +- Android packaging through Capacitor +- REST API for calculations and study integrations + +## Technology + +### Client + +- React 19 and TypeScript +- Vite and Tailwind CSS +- Math.js and KaTeX +- Three.js, React Three Fiber and Drei +- Framer Motion +- Vite PWA +- Capacitor for Android +- Vitest and Testing Library + +### Backend + +- Node.js and Express +- TypeScript +- Environment-based server configuration + +## Architecture + +```text +Web / PWA / Capacitor mobile client + โ”‚ + โ–ผ + Versioned REST API + โ”‚ + โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” + โ–ผ โ–ผ +Deterministic math Study records and +operations controlled AI gateway +``` + +The web, PWA and mobile builds should share the same course logic. Platform-specific capabilities belong behind explicit adapters rather than in separate copies of the application. + +## Web development + +Install dependencies and start the client: + +```bash +npm install +npm run dev +``` + +Create and preview a production build: + +```bash +npm run build +npm run preview +``` + +## Backend development + +```bash +cd server +npm install +npm run dev +``` + +The development API is available by default at: + +```text +http://localhost:5000 +``` + +Build and start the compiled backend: + +```bash +npm run build +npm start +``` + +Backend details are available in [`server/README.md`](server/README.md). + +## Mobile development + +The repository contains Capacitor Android support. After a successful web build, synchronize the native project and open it in Android Studio: + +```bash +npm run build +npx cap sync android +npx cap open android +``` + +Native releases should be generated from tagged commits through CI. Downloadable APK files should include release notes and checksums. + +## AI security transition + +The current AI interface includes a bring-your-own-key browser flow. Browser-persisted API keys are not an acceptable production design and must be removed before an official hosted release. + +The target design is an authenticated backend AI gateway with: + +- No provider credential in the web or mobile bundle +- No API key stored in `localStorage` +- Per-user authorization +- Input-size and rate limits +- Usage quotas and cost monitoring +- Provider timeout handling +- Explicit response schemas +- Safe Markdown rendering +- Minimal logs that exclude private learning content + +AI explanations must remain secondary to deterministic mathematical verification. + +## Testing priorities + +- Matrix and numerical calculations +- Invalid and boundary inputs +- Formula parsing and rendering +- Exam scoring and progress calculations +- API request validation +- AI response-schema handling +- Consistency between web and mobile builds + +Run the existing client tests with: + +```bash +npx vitest run +``` + +Run the current backend API check from `server/`: + +```bash +npm test +``` + +## Open-source release requirements + +Before declaring the project fully open source: + +- [ ] Select and add an open-source license. +- [ ] Audit the current tree and full Git history for credentials and private files. +- [ ] Remove browser-persisted API-key handling. +- [ ] Route production AI calls through the backend. +- [ ] Consolidate the roles of `Math-Biotech-App` and `Math-Biotech-Project`. +- [ ] Add CI for tests, builds, dependency review and secret scanning. +- [ ] Add `CONTRIBUTING.md`, `SECURITY.md` and a code of conduct. +- [ ] Document the license and source of course content and visual assets. +- [ ] Publish reproducible web and Android release procedures. +- [ ] Add privacy, export and account-deletion documentation where user data is stored. + +The shared strategy for Math, Botany and Organic Chemistry is documented in the private Inmerse workspace roadmap. + +## Scientific and educational responsibility + +Mathematical results and AI-generated explanations should be independently checked before academic, laboratory, clinical or professional use. Simplified models should be identified as models rather than complete representations of living systems. + +## Author + +Developed by [Halil Ibrahim Ozturk](https://github.com/Inmerson). diff --git a/android/.gitignore b/android/.gitignore new file mode 100644 index 0000000..48354a3 --- /dev/null +++ b/android/.gitignore @@ -0,0 +1,101 @@ +# Using Android gitignore template: https://github.com/github/gitignore/blob/HEAD/Android.gitignore + +# Built application files +*.apk +*.aar +*.ap_ +*.aab + +# Files for the ART/Dalvik VM +*.dex + +# Java class files +*.class + +# Generated files +bin/ +gen/ +out/ +# Uncomment the following line in case you need and you don't have the release build type files in your app +# release/ + +# Gradle files +.gradle/ +build/ + +# Local configuration file (sdk path, etc) +local.properties + +# Proguard folder generated by Eclipse +proguard/ + +# Log Files +*.log + +# Android Studio Navigation editor temp files +.navigation/ + +# Android Studio captures folder +captures/ + +# IntelliJ +*.iml +.idea/workspace.xml +.idea/tasks.xml +.idea/gradle.xml +.idea/assetWizardSettings.xml +.idea/dictionaries +.idea/libraries +# Android Studio 3 in .gitignore file. +.idea/caches +.idea/modules.xml +# Comment next line if keeping position of elements in Navigation Editor is relevant for you +.idea/navEditor.xml + +# Keystore files +# Uncomment the following lines if you do not want to check your keystore files in. +#*.jks +#*.keystore + +# External native build folder generated in Android Studio 2.2 and later +.externalNativeBuild +.cxx/ + +# Google Services (e.g. APIs or Firebase) +# google-services.json + +# Freeline +freeline.py +freeline/ +freeline_project_description.json + +# fastlane +fastlane/report.xml +fastlane/Preview.html +fastlane/screenshots +fastlane/test_output +fastlane/readme.md + +# Version control +vcs.xml + +# lint +lint/intermediates/ +lint/generated/ +lint/outputs/ +lint/tmp/ +# lint/reports/ + +# Android Profiling +*.hprof + +# Cordova plugins for Capacitor +capacitor-cordova-android-plugins + +# Copied web assets +app/src/main/assets/public + +# Generated Config files +app/src/main/assets/capacitor.config.json +app/src/main/assets/capacitor.plugins.json +app/src/main/res/xml/config.xml diff --git a/android/app/.gitignore b/android/app/.gitignore new file mode 100644 index 0000000..043df80 --- /dev/null +++ b/android/app/.gitignore @@ -0,0 +1,2 @@ +/build/* +!/build/.npmkeep diff --git a/android/app/build.gradle b/android/app/build.gradle new file mode 100644 index 0000000..fca2ae8 --- /dev/null +++ b/android/app/build.gradle @@ -0,0 +1,54 @@ +apply plugin: 'com.android.application' + +android { + namespace = "com.inmersion.mathbiotech" + compileSdk = rootProject.ext.compileSdkVersion + defaultConfig { + applicationId "com.inmersion.mathbiotech" + minSdkVersion rootProject.ext.minSdkVersion + targetSdkVersion rootProject.ext.targetSdkVersion + versionCode 1 + versionName "1.0" + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + aaptOptions { + // Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps. + // Default: https://android.googlesource.com/platform/frameworks/base/+/282e181b58cf72b6ca770dc7ca5f91f135444502/tools/aapt/AaptAssets.cpp#61 + ignoreAssetsPattern = '!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~' + } + } + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' + } + } +} + +repositories { + flatDir{ + dirs '../capacitor-cordova-android-plugins/src/main/libs', 'libs' + } +} + +dependencies { + implementation fileTree(include: ['*.jar'], dir: 'libs') + implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion" + implementation "androidx.coordinatorlayout:coordinatorlayout:$androidxCoordinatorLayoutVersion" + implementation "androidx.core:core-splashscreen:$coreSplashScreenVersion" + implementation project(':capacitor-android') + testImplementation "junit:junit:$junitVersion" + androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion" + androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion" + implementation project(':capacitor-cordova-android-plugins') +} + +apply from: 'capacitor.build.gradle' + +try { + def servicesJSON = file('google-services.json') + if (servicesJSON.text) { + apply plugin: 'com.google.gms.google-services' + } +} catch(Exception e) { + logger.info("google-services.json not found, google-services plugin not applied. Push Notifications won't work") +} diff --git a/android/app/capacitor.build.gradle b/android/app/capacitor.build.gradle new file mode 100644 index 0000000..fdb4970 --- /dev/null +++ b/android/app/capacitor.build.gradle @@ -0,0 +1,19 @@ +// DO NOT EDIT THIS FILE! IT IS GENERATED EACH TIME "capacitor update" IS RUN + +android { + compileOptions { + sourceCompatibility JavaVersion.VERSION_17 + targetCompatibility JavaVersion.VERSION_17 + } +} + +apply from: "../capacitor-cordova-android-plugins/cordova.variables.gradle" +dependencies { + + +} + + +if (hasProperty('postBuildExtras')) { + postBuildExtras() +} diff --git a/android/app/proguard-rules.pro b/android/app/proguard-rules.pro new file mode 100644 index 0000000..f1b4245 --- /dev/null +++ b/android/app/proguard-rules.pro @@ -0,0 +1,21 @@ +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile diff --git a/android/app/src/androidTest/java/com/getcapacitor/myapp/ExampleInstrumentedTest.java b/android/app/src/androidTest/java/com/getcapacitor/myapp/ExampleInstrumentedTest.java new file mode 100644 index 0000000..f2c2217 --- /dev/null +++ b/android/app/src/androidTest/java/com/getcapacitor/myapp/ExampleInstrumentedTest.java @@ -0,0 +1,26 @@ +package com.getcapacitor.myapp; + +import static org.junit.Assert.*; + +import android.content.Context; +import androidx.test.ext.junit.runners.AndroidJUnit4; +import androidx.test.platform.app.InstrumentationRegistry; +import org.junit.Test; +import org.junit.runner.RunWith; + +/** + * Instrumented test, which will execute on an Android device. + * + * @see Testing documentation + */ +@RunWith(AndroidJUnit4.class) +public class ExampleInstrumentedTest { + + @Test + public void useAppContext() throws Exception { + // Context of the app under test. + Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); + + assertEquals("com.getcapacitor.app", appContext.getPackageName()); + } +} diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..b06ddbf --- /dev/null +++ b/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/android/app/src/main/java/com/inmersion/mathbiotech/MainActivity.java b/android/app/src/main/java/com/inmersion/mathbiotech/MainActivity.java new file mode 100644 index 0000000..4f6f4dc --- /dev/null +++ b/android/app/src/main/java/com/inmersion/mathbiotech/MainActivity.java @@ -0,0 +1,5 @@ +package com.inmersion.mathbiotech; + +import com.getcapacitor.BridgeActivity; + +public class MainActivity extends BridgeActivity {} diff --git a/android/app/src/main/res/drawable-land-hdpi/splash.png b/android/app/src/main/res/drawable-land-hdpi/splash.png new file mode 100644 index 0000000000000000000000000000000000000000..e31573b4fc93e60d171f4046c0220e1463075d9e GIT binary patch literal 7705 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 wKmFJ0_JHhk1&0B>;%YXATM literal 0 HcmV?d00001 diff --git a/android/app/src/main/res/drawable-land-mdpi/splash.png b/android/app/src/main/res/drawable-land-mdpi/splash.png new file mode 100644 index 0000000000000000000000000000000000000000..f7a64923ea1a0565d25fa139c176d6bf42184e48 GIT binary patch literal 4040 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 XyOn+%7f`N3b2T^T3uj5+eShz7v)7qy literal 0 HcmV?d00001 diff --git a/android/app/src/main/res/drawable-land-xhdpi/splash.png b/android/app/src/main/res/drawable-land-xhdpi/splash.png new file mode 100644 index 0000000000000000000000000000000000000000..807725501bdd92e94e51e7b2b0006f69e0083a0b GIT binary patch literal 9251 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 literal 0 HcmV?d00001 diff --git a/android/app/src/main/res/drawable-land-xxhdpi/splash.png b/android/app/src/main/res/drawable-land-xxhdpi/splash.png new file mode 100644 index 0000000000000000000000000000000000000000..14c6c8fe39fcd51a0414866ad28cbe8ff3acb060 GIT binary patch literal 13984 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®q@N z14_H8ofW)l{|J8q+a)eH)I0r)>WXdzV%7J>PA~6_J)KLT90iYa^K=Wz7D!OybzqSru=f4?|KFl;Y)gP_H6V4x`~kZ6fE(xM1&;?72-TZNk+0 zr+Crr5yl%Iy@vfmt3eYFl!jIvPGFz^8Ek+2`48O1_pCX3xNWh-zBa{rIcc%+=|XVj zANYTg&s}TKb#OztQrCW(Xk?V^i{`q~%HtcveTxq(_HKeC9GzrtguMT4Nvs@KakPTA z9>*8bBZmLz`lK5=l)=b|=dT3a5ag^a1^znZyx5QKfUb1b9yacArRp%3@QWo(hrsCU z-K!-=jDmv!zb7XT>)r|-Z0Ry}lk2;dk-ECqMwr_nKN#x*X6~B5hVIN>6$1HwBz3Of z=Pk){AL5*=d90f17_qZEJLm;Q%WMdX=*N&!ki@E&cy7?>{1ssAH(tACtp*r@d^til z)x(1#6(kPD+joSF&J3sxJU@{-sWCS+pZq{Gsx=?z4wP;>?)1yHv0?X?VP{}cX4~aH zxeBPKw_rgW8rvewS1W2#^y+c>-183iMbJCqc38RN_o~__9-n|jcd&oA`m7*&Fqqpc z;Tev*0LS-ZK47Sq1unfvP1S43uA12P?PJmI8BeTYPr~R*tYUm^0;U%Hmu?bSZHEK6 zPjsW=E67Kq-&trmf;)UkmRABH2U)V)-eRT$j(%G12lLMsThSsU10iP#{)ZnvjzN$d z*K%P3`}oqyvpWP~venr>3viH8^`)Ma*=B31hw*Q+tqE>i2y7w!(o^lI^Yss^=tHW( z;cnCT(%B1gLz+TRGW9roFjI1EQTu-u`(f#RmZ8;FSN(bsC1J;+(i_R6mrW=yYx$cy z#%QKVrEx~kVMg~yo?^N28Wnk6x%L;J8i|*|ANEiNjq(Vhzuzl3ikpA*G!Z}kLAzAI z9qnySo%D|AuJj12%h;Otqjs(>LPj?rNdeU8so>P(C>XMzlho94ZD#w=cCOOU;=3&^ zsqAG!i{~lY271D|m>ztPV`)X@FO_;`wPjppYNQpM+ncvtz1lZjN>!Q^*I}T%uP78Z7tbV2$q3W_)14=kLFyJ z1GqL6T>ClgeZorL!}xP4f%OB_EsmJ`uw7dGWNV9OLlhb|UMpVhc{4@Bhh`tO!ZqzD zhusd<=K^ah!L@gQ?6dOpI-ge^e>S5W9eII57Zu16eU?GRbgKTeVk9yS{iK|O(zLR> zheb?;jwGCHS80NCn=jKxgJ>}qu4l%5NPihjzazGv#J?Jcyl;<#IW&x4mm>nrW8>}C z3U@aeD~)*F(0o^2{GnKVm$Jr#aZE ztl~TOkM^SdzJapQ((!-i8b!RkVQBKkL`2ZCBuy!qI1L{3Er526plVols~68U-^9Px zR(3{j;Z9RHX^muc0dUywJ|`yyZFf=k&-Gb#m4u73Lm5Ks%BfHj%2|gjn#i> zLC5pO$2Em9H;qoKQmMtl<@wgtPF1%2HariD5O~u>8=^*J&au~JH%Ih@&2Uging3U_ z0bzfKucW$ZHSx}!#buB?+-J)%RQbbXM-!BJTS&#dU_@lxU6>te2O+9 z@F{F{Nb!;{Cd`Gx+$G?11aB~S#wIH%D=*=7f7H@D@%B1)&bF$@t3JDq4l*%(wJTlh zo`?uMq{YilKUewPNaC)GuOr<8j9&ofqRU__BRUX^x8Cj3a;a$rXzgXqW>LR#CUn%~m)t zYC&ol(gAkbc^fd`xWU&bk5vT6KbFmsR=O78Bn%t7 znbw&=c+|T&#r+bls5rU6D#HMvqA<|;)BV%jOMonkm^p$7Vcel-Wwn$=uAJv&(8W>% z9))Fxpl*(%E#wFm_m!U~2HqgZs^2vaGeY(UfYKrSHV}w^D0N6!se5Ewy)Yy-!(2

aKj2hWG7>znxs|SE zN4rHtiSPqLskWp(?(_YYwgq+1@8v+~8As|(bC>$D(atG3ZE8-ZM3SVcg|vHQz$I=!(A`k`5= zOqR>&%G)$)k*QLz7MTB9wleWpv&N9Sta64wy}3Ytd?x!Ja8z>(z~(3UNFu^eFmn#6 zw!!gUxOuZi$PQIs*ixfZR3iLyADJ z5&s%tPfk>V!x|A-;oq%1!yk9H$UBP0ToA*EDtz(^!_AnF1bBQ7joj|? z5b)gSI8c8O$PYFE!vXJ<4gebg*9G9P2wcB{#kv0FItc5T@PDNo)}Rh4Us}L{e}xzW zhwt`)j`M)mP=G6H0;^&q=I0{jU%bIRkF#uLF;{vVC&H|_uc literal 0 HcmV?d00001 diff --git a/android/app/src/main/res/drawable-land-xxxhdpi/splash.png b/android/app/src/main/res/drawable-land-xxxhdpi/splash.png new file mode 100644 index 0000000000000000000000000000000000000000..244ca2506dbe0fd8f6a05520ac7d1a629ea81438 GIT binary patch literal 17683 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 literal 0 HcmV?d00001 diff --git a/android/app/src/main/res/drawable-port-xxhdpi/splash.png b/android/app/src/main/res/drawable-port-xxhdpi/splash.png new file mode 100644 index 0000000000000000000000000000000000000000..bfabe6871a17a5e95b78fb30d49b7d2b4d2fe4c0 GIT binary patch literal 13346 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

VwO4Hu8X}%XHUAz_J@50rzbkIsat>4oWtQt< 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 literal 0 HcmV?d00001 diff --git a/android/app/src/main/res/drawable-port-xxxhdpi/splash.png b/android/app/src/main/res/drawable-port-xxxhdpi/splash.png new file mode 100644 index 0000000000000000000000000000000000000000..6929071268eb03ee0f088142b6523566b78550e2 GIT binary patch literal 17489 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 KR&><$`~L^lv%S~= literal 0 HcmV?d00001 diff --git a/android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml new file mode 100644 index 0000000..c7bd21d --- /dev/null +++ b/android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + diff --git a/android/app/src/main/res/drawable/ic_launcher_background.xml b/android/app/src/main/res/drawable/ic_launcher_background.xml new file mode 100644 index 0000000..d5fccc5 --- /dev/null +++ b/android/app/src/main/res/drawable/ic_launcher_background.xml @@ -0,0 +1,170 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/android/app/src/main/res/drawable/splash.png b/android/app/src/main/res/drawable/splash.png new file mode 100644 index 0000000000000000000000000000000000000000..f7a64923ea1a0565d25fa139c176d6bf42184e48 GIT binary patch literal 4040 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 XyOn+%7f`N3b2T^T3uj5+eShz7v)7qy literal 0 HcmV?d00001 diff --git a/android/app/src/main/res/layout/activity_main.xml b/android/app/src/main/res/layout/activity_main.xml new file mode 100644 index 0000000..b5ad138 --- /dev/null +++ b/android/app/src/main/res/layout/activity_main.xml @@ -0,0 +1,12 @@ + + + + + diff --git a/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml new file mode 100644 index 0000000..036d09b --- /dev/null +++ b/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml new file mode 100644 index 0000000..036d09b --- /dev/null +++ b/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..c023e50595074292c7361183a64de08cf9686c9c GIT binary patch literal 2786 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 literal 0 HcmV?d00001 diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png new file mode 100644 index 0000000000000000000000000000000000000000..2127973b2d318df7085734d236d0ec649a2b0292 GIT binary patch literal 3450 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 literal 0 HcmV?d00001 diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..4d1e077104cd61e6a4c3707e87363b523077245a GIT binary patch literal 3981 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 nm0GElTB(&OnKI&V600000NkvXXu0mjff+~0a literal 0 HcmV?d00001 diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png new file mode 100644 index 0000000000000000000000000000000000000000..df0f15880bee46332dfc6622583215194f948b0f GIT binary patch literal 5036 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 literal 0 HcmV?d00001 diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..6cdf97c1196d48e9833487ff6de7c4cfc4e1232d GIT binary patch literal 6644 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 literal 0 HcmV?d00001 diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png new file mode 100644 index 0000000000000000000000000000000000000000..2960cbb6104b915c84760f889deed9bff2b3e17a GIT binary patch literal 9793 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 y3vD~Wi9;mL_v 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 literal 0 HcmV?d00001 diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png new file mode 100644 index 0000000000000000000000000000000000000000..a40d73e9c68ea638c28c7b13e4bcd1e179a3a102 GIT binary patch literal 15916 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 + + #FFFFFF + \ No newline at end of file diff --git a/android/app/src/main/res/values/strings.xml b/android/app/src/main/res/values/strings.xml new file mode 100644 index 0000000..4d11aaf --- /dev/null +++ b/android/app/src/main/res/values/strings.xml @@ -0,0 +1,7 @@ + + + Inmerson Lab + Inmerson Lab + com.inmersion.mathbiotech + com.inmersion.mathbiotech + diff --git a/android/app/src/main/res/values/styles.xml b/android/app/src/main/res/values/styles.xml new file mode 100644 index 0000000..be874e5 --- /dev/null +++ b/android/app/src/main/res/values/styles.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/android/app/src/main/res/xml/file_paths.xml b/android/app/src/main/res/xml/file_paths.xml new file mode 100644 index 0000000..bd0c4d8 --- /dev/null +++ b/android/app/src/main/res/xml/file_paths.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/android/app/src/test/java/com/getcapacitor/myapp/ExampleUnitTest.java b/android/app/src/test/java/com/getcapacitor/myapp/ExampleUnitTest.java new file mode 100644 index 0000000..0297327 --- /dev/null +++ b/android/app/src/test/java/com/getcapacitor/myapp/ExampleUnitTest.java @@ -0,0 +1,18 @@ +package com.getcapacitor.myapp; + +import static org.junit.Assert.*; + +import org.junit.Test; + +/** + * Example local unit test, which will execute on the development machine (host). + * + * @see Testing documentation + */ +public class ExampleUnitTest { + + @Test + public void addition_isCorrect() throws Exception { + assertEquals(4, 2 + 2); + } +} diff --git a/android/build.gradle b/android/build.gradle new file mode 100644 index 0000000..8e5e200 --- /dev/null +++ b/android/build.gradle @@ -0,0 +1,29 @@ +// Top-level build file where you can add configuration options common to all sub-projects/modules. + +buildscript { + + repositories { + google() + mavenCentral() + } + dependencies { + classpath 'com.android.tools.build:gradle:8.2.1' + classpath 'com.google.gms:google-services:4.4.4' + + // NOTE: Do not place your application dependencies here; they belong + // in the individual module build.gradle files + } +} + +apply from: "variables.gradle" + +allprojects { + repositories { + google() + mavenCentral() + } +} + +task clean(type: Delete) { + delete rootProject.buildDir +} diff --git a/android/capacitor.settings.gradle b/android/capacitor.settings.gradle new file mode 100644 index 0000000..9a5fa87 --- /dev/null +++ b/android/capacitor.settings.gradle @@ -0,0 +1,3 @@ +// DO NOT EDIT THIS FILE! IT IS GENERATED EACH TIME "capacitor update" IS RUN +include ':capacitor-android' +project(':capacitor-android').projectDir = new File('../node_modules/@capacitor/android/capacitor') diff --git a/android/gradle.properties b/android/gradle.properties new file mode 100644 index 0000000..2e87c52 --- /dev/null +++ b/android/gradle.properties @@ -0,0 +1,22 @@ +# Project-wide Gradle settings. + +# IDE (e.g. Android Studio) users: +# Gradle settings configured through the IDE *will override* +# any settings specified in this file. + +# For more details on how to configure your build environment visit +# http://www.gradle.org/docs/current/userguide/build_environment.html + +# Specifies the JVM arguments used for the daemon process. +# The setting is particularly useful for tweaking memory settings. +org.gradle.jvmargs=-Xmx1536m + +# When configured, Gradle will run in incubating parallel mode. +# This option should only be used with decoupled projects. More details, visit +# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects +# org.gradle.parallel=true + +# AndroidX package structure to make it clearer which packages are bundled with the +# Android operating system, and which are packaged with your app's APK +# https://developer.android.com/topic/libraries/support-library/androidx-rn +android.useAndroidX=true diff --git a/android/gradle/wrapper/gradle-wrapper.jar b/android/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000000000000000000000000000000000000..1b33c55baabb587c669f562ae36f953de2481846 GIT binary patch literal 43764 zcma&OWmKeVvL#I6?i3D%6z=Zs?ofE*?rw#G$eqJB ziT4y8-Y@s9rkH0Tz>ll(^xkcTl)CY?rS&9VNd66Yc)g^6)JcWaY(5$5gt z8gr3SBXUTN;~cBgz&})qX%#!Fxom2Yau_`&8)+6aSN7YY+pS410rRUU*>J}qL0TnJ zRxt*7QeUqTh8j)Q&iavh<}L+$Jqz))<`IfKussVk%%Ah-Ti?Eo0hQH!rK%K=#EAw0 zwq@@~XNUXRnv8$;zv<6rCRJ6fPD^hfrh;0K?n z=p!u^3xOgWZ%f3+?+>H)9+w^$Tn1e;?UpVMJb!!;f)`6f&4|8mr+g)^@x>_rvnL0< zvD0Hu_N>$(Li7|Jgu0mRh&MV+<}`~Wi*+avM01E)Jtg=)-vViQKax!GeDc!xv$^mL z{#OVBA$U{(Zr8~Xm|cP@odkHC*1R8z6hcLY#N@3E-A8XEvpt066+3t9L_6Zg6j@9Q zj$$%~yO-OS6PUVrM2s)(T4#6=JpI_@Uz+!6=GdyVU?`!F=d;8#ZB@(5g7$A0(`eqY z8_i@3w$0*es5mrSjhW*qzrl!_LQWs4?VfLmo1Sd@Ztt53+etwzAT^8ow_*7Jp`Y|l z*UgSEwvxq+FYO!O*aLf-PinZYne7Ib6ny3u>MjQz=((r3NTEeU4=-i0LBq3H-VJH< z^>1RE3_JwrclUn9vb7HcGUaFRA0QHcnE;6)hnkp%lY1UII#WPAv?-;c?YH}LWB8Nl z{sx-@Z;QxWh9fX8SxLZk8;kMFlGD3Jc^QZVL4nO)1I$zQwvwM&_!kW+LMf&lApv#< zur|EyC|U@5OQuph$TC_ZU`{!vJp`13e9alaR0Dbn5ikLFH7>eIz4QbV|C=%7)F=qo z_>M&5N)d)7G(A%c>}UCrW!Ql_6_A{?R7&CL`;!KOb3 z8Z=$YkV-IF;c7zs{3-WDEFJzuakFbd*4LWd<_kBE8~BFcv}js_2OowRNzWCtCQ6&k z{&~Me92$m*@e0ANcWKuz)?YjB*VoSTx??-3Cc0l2U!X^;Bv@m87eKHukAljrD54R+ zE;@_w4NPe1>3`i5Qy*3^E9x#VB6?}v=~qIprrrd5|DFkg;v5ixo0IsBmik8=Y;zv2 z%Bcf%NE$a44bk^`i4VwDLTbX=q@j9;JWT9JncQ!+Y%2&HHk@1~*L8-{ZpY?(-a9J-1~<1ltr9i~D9`P{XTIFWA6IG8c4;6bFw*lzU-{+?b&%OcIoCiw00n>A1ra zFPE$y@>ebbZlf(sN_iWBzQKDV zmmaLX#zK!@ZdvCANfwV}9@2O&w)!5gSgQzHdk2Q`jG6KD7S+1R5&F)j6QTD^=hq&7 zHUW+r^da^%V(h(wonR(j?BOiC!;y=%nJvz?*aW&5E87qq;2z`EI(f zBJNNSMFF9U{sR-af5{IY&AtoGcoG)Iq-S^v{7+t0>7N(KRoPj;+2N5;9o_nxIGjJ@ z7bYQK)bX)vEhy~VL%N6g^NE@D5VtV+Q8U2%{ji_=6+i^G%xeskEhH>Sqr194PJ$fB zu1y^){?9Vkg(FY2h)3ZHrw0Z<@;(gd_dtF#6y_;Iwi{yX$?asr?0N0_B*CifEi7<6 zq`?OdQjCYbhVcg+7MSgIM|pJRu~`g?g3x?Tl+V}#$It`iD1j+!x+!;wS0+2e>#g?Z z*EA^k7W{jO1r^K~cD#5pamp+o@8&yw6;%b|uiT?{Wa=4+9<}aXWUuL#ZwN1a;lQod zW{pxWCYGXdEq9qAmvAB904}?97=re$>!I%wxPV#|f#@A*Y=qa%zHlDv^yWbR03%V0 zprLP+b(#fBqxI%FiF*-n8HtH6$8f(P6!H3V^ysgd8de-N(@|K!A< z^qP}jp(RaM9kQ(^K(U8O84?D)aU(g?1S8iWwe)gqpHCaFlJxb*ilr{KTnu4_@5{K- z)n=CCeCrPHO0WHz)dDtkbZfUfVBd?53}K>C5*-wC4hpDN8cGk3lu-ypq+EYpb_2H; z%vP4@&+c2p;thaTs$dc^1CDGlPG@A;yGR5@$UEqk6p58qpw#7lc<+W(WR;(vr(D>W z#(K$vE#uBkT=*q&uaZwzz=P5mjiee6>!lV?c}QIX%ZdkO1dHg>Fa#xcGT6~}1*2m9 zkc7l3ItD6Ie~o_aFjI$Ri=C!8uF4!Ky7iG9QTrxVbsQroi|r)SAon#*B*{}TB-?=@ z8~jJs;_R2iDd!$+n$%X6FO&PYS{YhDAS+U2o4su9x~1+U3z7YN5o0qUK&|g^klZ6X zj_vrM5SUTnz5`*}Hyts9ADwLu#x_L=nv$Z0`HqN`Zo=V>OQI)fh01n~*a%01%cx%0 z4LTFVjmW+ipVQv5rYcn3;d2o4qunWUY!p+?s~X~(ost@WR@r@EuDOSs8*MT4fiP>! zkfo^!PWJJ1MHgKS2D_hc?Bs?isSDO61>ebl$U*9*QY(b=i&rp3@3GV@z>KzcZOxip z^dzA~44;R~cnhWz7s$$v?_8y-k!DZys}Q?4IkSyR!)C0j$(Gm|t#e3|QAOFaV2}36 z?dPNY;@I=FaCwylc_;~kXlZsk$_eLkNb~TIl8QQ`mmH&$*zwwR8zHU*sId)rxHu*K z;yZWa8UmCwju%aSNLwD5fBl^b0Ux1%q8YR*uG`53Mi<`5uA^Dc6Ync)J3N7;zQ*75)hf%a@{$H+%S?SGT)ks60)?6j$ zspl|4Ad6@%-r1t*$tT(en!gIXTUDcsj?28ZEzz)dH)SV3bZ+pjMaW0oc~rOPZP@g! zb9E+ndeVO_Ib9c_>{)`01^`ZS198 z)(t=+{Azi11$eu%aU7jbwuQrO`vLOixuh~%4z@mKr_Oc;F%Uq01fA)^W&y+g16e?rkLhTxV!EqC%2}sx_1u7IBq|}Be&7WI z4I<;1-9tJsI&pQIhj>FPkQV9{(m!wYYV@i5h?A0#BN2wqlEwNDIq06|^2oYVa7<~h zI_OLan0Do*4R5P=a3H9`s5*>xU}_PSztg`+2mv)|3nIy=5#Z$%+@tZnr> zLcTI!Mxa`PY7%{;KW~!=;*t)R_sl<^b>eNO@w#fEt(tPMg_jpJpW$q_DoUlkY|uo> z0-1{ouA#;t%spf*7VjkK&$QrvwUERKt^Sdo)5@?qAP)>}Y!h4(JQ!7{wIdkA+|)bv z&8hBwoX4v|+fie}iTslaBX^i*TjwO}f{V)8*!dMmRPi%XAWc8<_IqK1jUsApk)+~R zNFTCD-h>M5Y{qTQ&0#j@I@tmXGj%rzhTW5%Bkh&sSc=$Fv;M@1y!zvYG5P2(2|(&W zlcbR1{--rJ&s!rB{G-sX5^PaM@3EqWVz_y9cwLR9xMig&9gq(voeI)W&{d6j1jh&< zARXi&APWE1FQWh7eoZjuP z;vdgX>zep^{{2%hem;e*gDJhK1Hj12nBLIJoL<=0+8SVEBx7!4Ea+hBY;A1gBwvY<)tj~T=H`^?3>zeWWm|LAwo*S4Z%bDVUe z6r)CH1H!(>OH#MXFJ2V(U(qxD{4Px2`8qfFLG+=a;B^~Te_Z!r3RO%Oc#ZAHKQxV5 zRYXxZ9T2A%NVJIu5Pu7!Mj>t%YDO$T@M=RR(~mi%sv(YXVl`yMLD;+WZ{vG9(@P#e zMo}ZiK^7^h6TV%cG+;jhJ0s>h&VERs=tuZz^Tlu~%d{ZHtq6hX$V9h)Bw|jVCMudd zwZ5l7In8NT)qEPGF$VSKg&fb0%R2RnUnqa){)V(X(s0U zkCdVZe6wy{+_WhZh3qLp245Y2RR$@g-!9PjJ&4~0cFSHMUn=>dapv)hy}|y91ZWTV zCh=z*!S3_?`$&-eZ6xIXUq8RGl9oK0BJw*TdU6A`LJqX9eS3X@F)g$jLkBWFscPhR zpCv8#KeAc^y>>Y$k^=r|K(DTC}T$0#jQBOwB#@`P6~*IuW_8JxCG}J4va{ zsZzt}tt+cv7=l&CEuVtjD6G2~_Meh%p4RGuY?hSt?(sreO_F}8r7Kp$qQdvCdZnDQ zxzc*qchE*E2=WK)^oRNa>Ttj`fpvF-JZ5tu5>X1xw)J@1!IqWjq)ESBG?J|ez`-Tc zi5a}GZx|w-h%5lNDE_3ho0hEXMoaofo#Z;$8|2;EDF&*L+e$u}K=u?pb;dv$SXeQM zD-~7P0i_`Wk$#YP$=hw3UVU+=^@Kuy$>6?~gIXx636jh{PHly_a2xNYe1l60`|y!7 z(u%;ILuW0DDJ)2%y`Zc~hOALnj1~txJtcdD#o4BCT68+8gZe`=^te6H_egxY#nZH&P*)hgYaoJ^qtmpeea`35Fw)cy!w@c#v6E29co8&D9CTCl%^GV|X;SpneSXzV~LXyRn-@K0Df z{tK-nDWA!q38M1~`xUIt_(MO^R(yNY#9@es9RQbY@Ia*xHhD&=k^T+ zJi@j2I|WcgW=PuAc>hs`(&CvgjL2a9Rx zCbZyUpi8NWUOi@S%t+Su4|r&UoU|ze9SVe7p@f1GBkrjkkq)T}X%Qo1g!SQ{O{P?m z-OfGyyWta+UCXH+-+(D^%kw#A1-U;?9129at7MeCCzC{DNgO zeSqsV>W^NIfTO~4({c}KUiuoH8A*J!Cb0*sp*w-Bg@YfBIPZFH!M}C=S=S7PLLcIG zs7K77g~W)~^|+mx9onzMm0qh(f~OsDTzVmRtz=aZTllgR zGUn~_5hw_k&rll<4G=G+`^Xlnw;jNYDJz@bE?|r866F2hA9v0-8=JO3g}IHB#b`hy zA42a0>{0L7CcabSD+F7?pGbS1KMvT{@1_@k!_+Ki|5~EMGt7T%u=79F)8xEiL5!EJ zzuxQ`NBliCoJMJdwu|);zRCD<5Sf?Y>U$trQ-;xj6!s5&w=9E7)%pZ+1Nh&8nCCwM zv5>Ket%I?cxr3vVva`YeR?dGxbG@pi{H#8@kFEf0Jq6~K4>kt26*bxv=P&jyE#e$| zDJB_~imk^-z|o!2njF2hL*|7sHCnzluhJjwLQGDmC)Y9 zr9ZN`s)uCd^XDvn)VirMgW~qfn1~SaN^7vcX#K1G`==UGaDVVx$0BQnubhX|{e z^i0}>k-;BP#Szk{cFjO{2x~LjK{^Upqd&<+03_iMLp0$!6_$@TbX>8U-f*-w-ew1?`CtD_0y_Lo|PfKi52p?`5$Jzx0E8`M0 zNIb?#!K$mM4X%`Ry_yhG5k@*+n4||2!~*+&pYLh~{`~o(W|o64^NrjP?-1Lgu?iK^ zTX6u3?#$?R?N!{599vg>G8RGHw)Hx&=|g4599y}mXNpM{EPKKXB&+m?==R3GsIq?G zL5fH={=zawB(sMlDBJ+{dgb)Vx3pu>L=mDV0{r1Qs{0Pn%TpopH{m(By4;{FBvi{I z$}x!Iw~MJOL~&)p93SDIfP3x%ROjg}X{Sme#hiJ&Yk&a;iR}V|n%PriZBY8SX2*;6 z4hdb^&h;Xz%)BDACY5AUsV!($lib4>11UmcgXKWpzRL8r2Srl*9Y(1uBQsY&hO&uv znDNff0tpHlLISam?o(lOp#CmFdH<6HmA0{UwfU#Y{8M+7od8b8|B|7ZYR9f<#+V|ZSaCQvI$~es~g(Pv{2&m_rKSB2QQ zMvT}$?Ll>V+!9Xh5^iy3?UG;dF-zh~RL#++roOCsW^cZ&({6q|?Jt6`?S8=16Y{oH zp50I7r1AC1(#{b`Aq5cw>ypNggHKM9vBx!W$eYIzD!4KbLsZGr2o8>g<@inmS3*>J zx8oG((8f!ei|M@JZB`p7+n<Q}?>h249<`7xJ?u}_n;Gq(&km#1ULN87CeTO~FY zS_Ty}0TgQhV zOh3T7{{x&LSYGQfKR1PDIkP!WnfC1$l+fs@Di+d4O=eVKeF~2fq#1<8hEvpwuqcaH z4A8u~r^gnY3u6}zj*RHjk{AHhrrDqaj?|6GaVJbV%o-nATw}ASFr!f`Oz|u_QPkR# z0mDudY1dZRlk@TyQ?%Eti=$_WNFtLpSx9=S^be{wXINp%MU?a`F66LNU<c;0&ngifmP9i;bj6&hdGMW^Kf8e6ZDXbQD&$QAAMo;OQ)G zW(qlHh;}!ZP)JKEjm$VZjTs@hk&4{?@+NADuYrr!R^cJzU{kGc1yB?;7mIyAWwhbeA_l_lw-iDVi7wcFurf5 z#Uw)A@a9fOf{D}AWE%<`s1L_AwpZ?F!Vac$LYkp<#A!!`XKaDC{A%)~K#5z6>Hv@V zBEqF(D5?@6r3Pwj$^krpPDCjB+UOszqUS;b2n>&iAFcw<*im2(b3|5u6SK!n9Sg4I z0KLcwA6{Mq?p%t>aW0W!PQ>iUeYvNjdKYqII!CE7SsS&Rj)eIw-K4jtI?II+0IdGq z2WT|L3RL?;GtGgt1LWfI4Ka`9dbZXc$TMJ~8#Juv@K^1RJN@yzdLS8$AJ(>g!U9`# zx}qr7JWlU+&m)VG*Se;rGisutS%!6yybi%B`bv|9rjS(xOUIvbNz5qtvC$_JYY+c& za*3*2$RUH8p%pSq>48xR)4qsp!Q7BEiJ*`^>^6INRbC@>+2q9?x(h0bpc>GaNFi$K zPH$6!#(~{8@0QZk=)QnM#I=bDx5vTvjm$f4K}%*s+((H2>tUTf==$wqyoI`oxI7>C z&>5fe)Yg)SmT)eA(|j@JYR1M%KixxC-Eceknf-;N=jJTwKvk#@|J^&5H0c+%KxHUI z6dQbwwVx3p?X<_VRVb2fStH?HH zFR@Mp=qX%#L3XL)+$PXKV|o|#DpHAoqvj6uQKe@M-mnhCSou7Dj4YuO6^*V`m)1lf z;)@e%1!Qg$10w8uEmz{ENb$^%u}B;J7sDd zump}onoD#!l=agcBR)iG!3AF0-63%@`K9G(CzKrm$VJ{v7^O9Ps7Zej|3m= zVXlR&yW6=Y%mD30G@|tf=yC7-#L!16Q=dq&@beWgaIL40k0n% z)QHrp2Jck#evLMM1RGt3WvQ936ZC9vEje0nFMfvmOHVI+&okB_K|l-;|4vW;qk>n~ z+|kk8#`K?x`q>`(f6A${wfw9Cx(^)~tX7<#TpxR#zYG2P+FY~mG{tnEkv~d6oUQA+ z&hNTL=~Y@rF`v-RZlts$nb$3(OL1&@Y11hhL9+zUb6)SP!;CD)^GUtUpCHBE`j1te zAGud@miCVFLk$fjsrcpjsadP__yj9iEZUW{Ll7PPi<$R;m1o!&Xdl~R_v0;oDX2z^!&8}zNGA}iYG|k zmehMd1%?R)u6R#<)B)1oe9TgYH5-CqUT8N7K-A-dm3hbm_W21p%8)H{O)xUlBVb+iUR}-v5dFaCyfSd zC6Bd7=N4A@+Bna=!-l|*_(nWGDpoyU>nH=}IOrLfS+-d40&(Wo*dDB9nQiA2Tse$R z;uq{`X7LLzP)%Y9aHa4YQ%H?htkWd3Owv&UYbr5NUDAH^<l@Z0Cx%`N+B*i!!1u>D8%;Qt1$ zE5O0{-`9gdDxZ!`0m}ywH!;c{oBfL-(BH<&SQ~smbcobU!j49O^f4&IIYh~f+hK*M zZwTp%{ZSAhMFj1qFaOA+3)p^gnXH^=)`NTYgTu!CLpEV2NF=~-`(}7p^Eof=@VUbd z_9U|8qF7Rueg&$qpSSkN%%%DpbV?8E8ivu@ensI0toJ7Eas^jyFReQ1JeY9plb^{m z&eQO)qPLZQ6O;FTr*aJq=$cMN)QlQO@G&%z?BKUs1&I^`lq>=QLODwa`(mFGC`0H< zOlc*|N?B5&!U6BuJvkL?s1&nsi$*5cCv7^j_*l&$-sBmRS85UIrE--7eD8Gr3^+o? zqG-Yl4S&E;>H>k^a0GdUI(|n1`ws@)1%sq2XBdK`mqrNq_b4N{#VpouCXLzNvjoFv zo9wMQ6l0+FT+?%N(ka*;%m~(?338bu32v26!{r)|w8J`EL|t$}TA4q_FJRX5 zCPa{hc_I(7TGE#@rO-(!$1H3N-C0{R$J=yPCXCtGk{4>=*B56JdXU9cQVwB`6~cQZ zf^qK21x_d>X%dT!!)CJQ3mlHA@ z{Prkgfs6=Tz%63$6Zr8CO0Ak3A)Cv#@BVKr&aiKG7RYxY$Yx>Bj#3gJk*~Ps-jc1l z;4nltQwwT4@Z)}Pb!3xM?+EW0qEKA)sqzw~!C6wd^{03-9aGf3Jmt=}w-*!yXupLf z;)>-7uvWN4Unn8b4kfIza-X=x*e4n5pU`HtgpFFd))s$C@#d>aUl3helLom+RYb&g zI7A9GXLRZPl}iQS*d$Azxg-VgcUr*lpLnbPKUV{QI|bsG{8bLG<%CF( zMoS4pRDtLVYOWG^@ox^h8xL~afW_9DcE#^1eEC1SVSb1BfDi^@g?#f6e%v~Aw>@w- zIY0k+2lGWNV|aA*e#`U3=+oBDmGeInfcL)>*!w|*;mWiKNG6wP6AW4-4imN!W)!hE zA02~S1*@Q`fD*+qX@f3!2yJX&6FsEfPditB%TWo3=HA;T3o2IrjS@9SSxv%{{7&4_ zdS#r4OU41~GYMiib#z#O;zohNbhJknrPPZS6sN$%HB=jUnlCO_w5Gw5EeE@KV>soy z2EZ?Y|4RQDDjt5y!WBlZ(8M)|HP<0YyG|D%RqD+K#e7-##o3IZxS^wQ5{Kbzb6h(i z#(wZ|^ei>8`%ta*!2tJzwMv+IFHLF`zTU8E^Mu!R*45_=ccqI};Zbyxw@U%a#2}%f zF>q?SrUa_a4H9l+uW8JHh2Oob>NyUwG=QH~-^ZebU*R@67DcXdz2{HVB4#@edz?B< z5!rQH3O0>A&ylROO%G^fimV*LX7>!%re{_Sm6N>S{+GW1LCnGImHRoF@csnFzn@P0 zM=jld0z%oz;j=>c7mMwzq$B^2mae7NiG}%>(wtmsDXkWk{?BeMpTrIt3Mizq?vRsf zi_WjNp+61uV(%gEU-Vf0;>~vcDhe(dzWdaf#4mH3o^v{0EWhj?E?$5v02sV@xL0l4 zX0_IMFtQ44PfWBbPYN#}qxa%=J%dlR{O!KyZvk^g5s?sTNycWYPJ^FK(nl3k?z-5t z39#hKrdO7V(@!TU)LAPY&ngnZ1MzLEeEiZznn7e-jLCy8LO zu^7_#z*%I-BjS#Pg-;zKWWqX-+Ly$T!4`vTe5ZOV0j?TJVA*2?*=82^GVlZIuH%9s zXiV&(T(QGHHah=s&7e|6y?g+XxZGmK55`wGV>@1U)Th&=JTgJq>4mI&Av2C z)w+kRoj_dA!;SfTfkgMPO>7Dw6&1*Hi1q?54Yng`JO&q->^CX21^PrU^JU#CJ_qhV zSG>afB%>2fx<~g8p=P8Yzxqc}s@>>{g7}F!;lCXvF#RV)^fyYb_)iKVCz1xEq=fJ| z0a7DMCK*FuP=NM*5h;*D`R4y$6cpW-E&-i{v`x=Jbk_xSn@2T3q!3HoAOB`@5Vg6) z{PW|@9o!e;v1jZ2{=Uw6S6o{g82x6g=k!)cFSC*oemHaVjg?VpEmtUuD2_J^A~$4* z3O7HsbA6wxw{TP5Kk)(Vm?gKo+_}11vbo{Tp_5x79P~#F)ahQXT)tSH5;;14?s)On zel1J>1x>+7;g1Iz2FRpnYz;sD0wG9Q!vuzE9yKi3@4a9Nh1!GGN?hA)!mZEnnHh&i zf?#ZEN2sFbf~kV;>K3UNj1&vFhc^sxgj8FCL4v>EOYL?2uuT`0eDH}R zmtUJMxVrV5H{L53hu3#qaWLUa#5zY?f5ozIn|PkMWNP%n zWB5!B0LZB0kLw$k39=!akkE9Q>F4j+q434jB4VmslQ;$ zKiO#FZ`p|dKS716jpcvR{QJkSNfDVhr2%~eHrW;fU45>>snr*S8Vik-5eN5k*c2Mp zyxvX&_cFbB6lODXznHHT|rsURe2!swomtrqc~w5 zymTM8!w`1{04CBprR!_F{5LB+2_SOuZN{b*!J~1ZiPpP-M;);!ce!rOPDLtgR@Ie1 zPreuqm4!H)hYePcW1WZ0Fyaqe%l}F~Orr)~+;mkS&pOhP5Ebb`cnUt!X_QhP4_4p( z8YKQCDKGIy>?WIFm3-}Br2-N`T&FOi?t)$hjphB9wOhBXU#Hb+zm&We_-O)s(wc`2 z8?VsvU;J>Ju7n}uUb3s1yPx_F*|FlAi=Ge=-kN?1;`~6szP%$3B0|8Sqp%ebM)F8v zADFrbeT0cgE>M0DMV@_Ze*GHM>q}wWMzt|GYC%}r{OXRG3Ij&<+nx9;4jE${Fj_r* z`{z1AW_6Myd)i6e0E-h&m{{CvzH=Xg!&(bLYgRMO_YVd8JU7W+7MuGWNE=4@OvP9+ zxi^vqS@5%+#gf*Z@RVyU9N1sO-(rY$24LGsg1>w>s6ST^@)|D9>cT50maXLUD{Fzf zt~tp{OSTEKg3ZSQyQQ5r51){%=?xlZ54*t1;Ow)zLe3i?8tD8YyY^k%M)e`V*r+vL zPqUf&m)U+zxps+NprxMHF{QSxv}>lE{JZETNk1&F+R~bp{_T$dbXL2UGnB|hgh*p4h$clt#6;NO~>zuyY@C-MD@)JCc5XrYOt`wW7! z_ti2hhZBMJNbn0O-uTxl_b6Hm313^fG@e;RrhIUK9@# z+DHGv_Ow$%S8D%RB}`doJjJy*aOa5mGHVHz0e0>>O_%+^56?IkA5eN+L1BVCp4~m=1eeL zb;#G!#^5G%6Mw}r1KnaKsLvJB%HZL)!3OxT{k$Yo-XrJ?|7{s4!H+S2o?N|^Z z)+?IE9H7h~Vxn5hTis^3wHYuOU84+bWd)cUKuHapq=&}WV#OxHpLab`NpwHm8LmOo zjri+!k;7j_?FP##CpM+pOVx*0wExEex z@`#)K<-ZrGyArK;a%Km`^+We|eT+#MygHOT6lXBmz`8|lyZOwL1+b+?Z$0OhMEp3R z&J=iRERpv~TC=p2-BYLC*?4 zxvPs9V@g=JT0>zky5Poj=fW_M!c)Xxz1<=&_ZcL=LMZJqlnO1P^xwGGW*Z+yTBvbV z-IFe6;(k1@$1;tS>{%pXZ_7w+i?N4A2=TXnGf=YhePg8bH8M|Lk-->+w8Y+FjZ;L=wSGwxfA`gqSn)f(XNuSm>6Y z@|#e-)I(PQ^G@N`%|_DZSb4_pkaEF0!-nqY+t#pyA>{9^*I-zw4SYA1_z2Bs$XGUZbGA;VeMo%CezHK0lO={L%G)dI-+8w?r9iexdoB{?l zbJ}C?huIhWXBVs7oo{!$lOTlvCLZ_KN1N+XJGuG$rh<^eUQIqcI7^pmqhBSaOKNRq zrx~w^?9C?*&rNwP_SPYmo;J-#!G|{`$JZK7DxsM3N^8iR4vvn>E4MU&Oe1DKJvLc~ zCT>KLZ1;t@My zRj_2hI^61T&LIz)S!+AQIV23n1>ng+LUvzv;xu!4;wpqb#EZz;F)BLUzT;8UA1x*6vJ zicB!3Mj03s*kGV{g`fpC?V^s(=JG-k1EMHbkdP4P*1^8p_TqO|;!Zr%GuP$8KLxuf z=pv*H;kzd;P|2`JmBt~h6|GxdU~@weK5O=X&5~w$HpfO}@l-T7@vTCxVOwCkoPQv8 z@aV_)I5HQtfs7^X=C03zYmH4m0S!V@JINm6#(JmZRHBD?T!m^DdiZJrhKpBcur2u1 zf9e4%k$$vcFopK5!CC`;ww(CKL~}mlxK_Pv!cOsFgVkNIghA2Au@)t6;Y3*2gK=5d z?|@1a)-(sQ%uFOmJ7v2iG&l&m^u&^6DJM#XzCrF%r>{2XKyxLD2rgWBD;i(!e4InDQBDg==^z;AzT2z~OmV0!?Z z0S9pX$+E;w3WN;v&NYT=+G8hf=6w0E1$0AOr61}eOvE8W1jX%>&Mjo7&!ulawgzLH zbcb+IF(s^3aj12WSi#pzIpijJJzkP?JzRawnxmNDSUR#7!29vHULCE<3Aa#be}ie~d|!V+ z%l~s9Odo$G&fH!t!+`rUT0T9DulF!Yq&BfQWFZV1L9D($r4H(}Gnf6k3^wa7g5|Ws zj7%d`!3(0bb55yhC6@Q{?H|2os{_F%o=;-h{@Yyyn*V7?{s%Grvpe!H^kl6tF4Zf5 z{Jv1~yZ*iIWL_9C*8pBMQArfJJ0d9Df6Kl#wa}7Xa#Ef_5B7=X}DzbQXVPfCwTO@9+@;A^Ti6il_C>g?A-GFwA0#U;t4;wOm-4oS})h z5&on>NAu67O?YCQr%7XIzY%LS4bha9*e*4bU4{lGCUmO2UQ2U)QOqClLo61Kx~3dI zmV3*(P6F_Tr-oP%x!0kTnnT?Ep5j;_IQ^pTRp=e8dmJtI4YgWd0}+b2=ATkOhgpXe z;jmw+FBLE}UIs4!&HflFr4)vMFOJ19W4f2^W(=2)F%TAL)+=F>IE$=e=@j-*bFLSg z)wf|uFQu+!=N-UzSef62u0-C8Zc7 zo6@F)c+nZA{H|+~7i$DCU0pL{0Ye|fKLuV^w!0Y^tT$isu%i1Iw&N|tX3kwFKJN(M zXS`k9js66o$r)x?TWL}Kxl`wUDUpwFx(w4Yk%49;$sgVvT~n8AgfG~HUcDt1TRo^s zdla@6heJB@JV z!vK;BUMznhzGK6PVtj0)GB=zTv6)Q9Yt@l#fv7>wKovLobMV-+(8)NJmyF8R zcB|_K7=FJGGn^X@JdFaat0uhKjp3>k#^&xE_}6NYNG?kgTp>2Iu?ElUjt4~E-?`Du z?mDCS9wbuS%fU?5BU@Ijx>1HG*N?gIP+<~xE4u=>H`8o((cS5M6@_OK%jSjFHirQK zN9@~NXFx*jS{<|bgSpC|SAnA@I)+GB=2W|JJChLI_mx+-J(mSJ!b)uUom6nH0#2^(L@JBlV#t zLl?j54s`Y3vE^c_3^Hl0TGu*tw_n?@HyO@ZrENxA+^!)OvUX28gDSF*xFtQzM$A+O zCG=n#6~r|3zt=8%GuG} z<#VCZ%2?3Q(Ad#Y7GMJ~{U3>E{5e@z6+rgZLX{Cxk^p-7dip^d29;2N1_mm4QkASo z-L`GWWPCq$uCo;X_BmGIpJFBlhl<8~EG{vOD1o|X$aB9KPhWO_cKiU*$HWEgtf=fn zsO%9bp~D2c@?*K9jVN@_vhR03>M_8h!_~%aN!Cnr?s-!;U3SVfmhRwk11A^8Ns`@KeE}+ zN$H}a1U6E;*j5&~Og!xHdfK5M<~xka)x-0N)K_&e7AjMz`toDzasH+^1bZlC!n()crk9kg@$(Y{wdKvbuUd04N^8}t1iOgsKF zGa%%XWx@WoVaNC1!|&{5ZbkopFre-Lu(LCE5HWZBoE#W@er9W<>R=^oYxBvypN#x3 zq#LC8&q)GFP=5^-bpHj?LW=)-g+3_)Ylps!3^YQ{9~O9&K)xgy zMkCWaApU-MI~e^cV{Je75Qr7eF%&_H)BvfyKL=gIA>;OSq(y z052BFz3E(Prg~09>|_Z@!qj}@;8yxnw+#Ej0?Rk<y}4ghbD569B{9hSFr*^ygZ zr6j7P#gtZh6tMk6?4V$*Jgz+#&ug;yOr>=qdI#9U&^am2qoh4Jy}H2%a|#Fs{E(5r z%!ijh;VuGA6)W)cJZx+;9Bp1LMUzN~x_8lQ#D3+sL{be-Jyeo@@dv7XguJ&S5vrH` z>QxOMWn7N-T!D@1(@4>ZlL^y5>m#0!HKovs12GRav4z!>p(1~xok8+_{| z#Ae4{9#NLh#Vj2&JuIn5$d6t@__`o}umFo(n0QxUtd2GKCyE+erwXY?`cm*h&^9*8 zJ+8x6fRZI-e$CRygofIQN^dWysCxgkyr{(_oBwwSRxZora1(%(aC!5BTtj^+YuevI zx?)H#(xlALUp6QJ!=l9N__$cxBZ5p&7;qD3PsXRFVd<({Kh+mShFWJNpy`N@ab7?9 zv5=klvCJ4bx|-pvOO2-+G)6O?$&)ncA#Urze2rlBfp#htudhx-NeRnJ@u%^_bfw4o z4|{b8SkPV3b>Wera1W(+N@p9H>dc6{cnkh-sgr?e%(YkWvK+0YXVwk0=d`)}*47*B z5JGkEdVix!w7-<%r0JF~`ZMMPe;f0EQHuYHxya`puazyph*ZSb1mJAt^k4549BfS; zK7~T&lRb=W{s&t`DJ$B}s-eH1&&-wEOH1KWsKn0a(ZI+G!v&W4A*cl>qAvUv6pbUR z#(f#EKV8~hk&8oayBz4vaswc(?qw1vn`yC zZQDl2PCB-&Uu@g9ZQHhO+v(W0bNig{-k0;;`+wM@#@J)8r?qOYs#&vUna8ILxN7S{ zp1s41KnR8miQJtJtOr|+qk}wrLt+N*z#5o`TmD1)E&QD(Vh&pjZJ_J*0!8dy_ z>^=@v=J)C`x&gjqAYu`}t^S=DFCtc0MkBU2zf|69?xW`Ck~(6zLD)gSE{7n~6w8j_ zoH&~$ED2k5-yRa0!r8fMRy z;QjBYUaUnpd}mf%iVFPR%Dg9!d>g`01m~>2s))`W|5!kc+_&Y>wD@@C9%>-lE`WB0 zOIf%FVD^cj#2hCkFgi-fgzIfOi+ya)MZK@IZhHT5FVEaSbv-oDDs0W)pA0&^nM0TW zmgJmd7b1R7b0a`UwWJYZXp4AJPteYLH>@M|xZFKwm!t3D3&q~av?i)WvAKHE{RqpD{{%OhYkK?47}+}` zrR2(Iv9bhVa;cDzJ%6ntcSbx7v7J@Y4x&+eWSKZ*eR7_=CVIUSB$^lfYe@g+p|LD{ zPSpQmxx@b$%d!05|H}WzBT4_cq?@~dvy<7s&QWtieJ9)hd4)$SZz}#H2UTi$CkFWW|I)v_-NjuH!VypONC=1`A=rm_jfzQ8Fu~1r8i{q-+S_j$ z#u^t&Xnfi5tZtl@^!fUJhx@~Cg0*vXMK}D{>|$#T*+mj(J_@c{jXBF|rm4-8%Z2o! z2z0o(4%8KljCm^>6HDK!{jI7p+RAPcty_~GZ~R_+=+UzZ0qzOwD=;YeZt*?3%UGdr z`c|BPE;yUbnyARUl&XWSNJ<+uRt%!xPF&K;(l$^JcA_CMH6)FZt{>6ah$|(9$2fc~ z=CD00uHM{qv;{Zk9FR0~u|3|Eiqv9?z2#^GqylT5>6JNZwKqKBzzQpKU2_pmtD;CT zi%Ktau!Y2Tldfu&b0UgmF(SSBID)15*r08eoUe#bT_K-G4VecJL2Pa=6D1K6({zj6 za(2Z{r!FY5W^y{qZ}08+h9f>EKd&PN90f}Sc0ejf%kB4+f#T8Q1=Pj=~#pi$U zp#5rMR%W25>k?<$;$x72pkLibu1N|jX4cWjD3q^Pk3js!uK6h7!dlvw24crL|MZs_ zb%Y%?Fyp0bY0HkG^XyS76Ts*|Giw{31LR~+WU5NejqfPr73Rp!xQ1mLgq@mdWncLy z%8}|nzS4P&`^;zAR-&nm5f;D-%yNQPwq4N7&yULM8bkttkD)hVU>h>t47`{8?n2&4 zjEfL}UEagLUYwdx0sB2QXGeRmL?sZ%J!XM`$@ODc2!y|2#7hys=b$LrGbvvjx`Iqi z&RDDm3YBrlKhl`O@%%&rhLWZ*ABFz2nHu7k~3@e4)kO3%$=?GEFUcCF=6-1n!x^vmu+Ai*amgXH+Rknl6U>#9w;A} zn2xanZSDu`4%%x}+~FG{Wbi1jo@wqBc5(5Xl~d0KW(^Iu(U3>WB@-(&vn_PJt9{1`e9Iic@+{VPc`vP776L*viP{wYB2Iff8hB%E3|o zGMOu)tJX!`qJ}ZPzq7>=`*9TmETN7xwU;^AmFZ-ckZjV5B2T09pYliaqGFY|X#E-8 z20b>y?(r-Fn5*WZ-GsK}4WM>@TTqsxvSYWL6>18q8Q`~JO1{vLND2wg@58OaU!EvT z1|o+f1mVXz2EKAbL!Q=QWQKDZpV|jznuJ}@-)1&cdo z^&~b4Mx{*1gurlH;Vhk5g_cM&6LOHS2 zRkLfO#HabR1JD4Vc2t828dCUG#DL}f5QDSBg?o)IYYi@_xVwR2w_ntlpAW0NWk$F1 z$If?*lP&Ka1oWfl!)1c3fl`g*lMW3JOn#)R1+tfwrs`aiFUgz3;XIJ>{QFxLCkK30 zNS-)#DON3yb!7LBHQJ$)4y%TN82DC2-9tOIqzhZ27@WY^<6}vXCWcR5iN{LN8{0u9 zNXayqD=G|e?O^*ms*4P?G%o@J1tN9_76e}E#66mr89%W_&w4n66~R;X_vWD(oArwj z4CpY`)_mH2FvDuxgT+akffhX0b_slJJ*?Jn3O3~moqu2Fs1oL*>7m=oVek2bnprnW zixkaIFU%+3XhNA@@9hyhFwqsH2bM|`P?G>i<-gy>NflhrN{$9?LZ1ynSE_Mj0rADF zhOz4FnK}wpLmQuV zgO4_Oz9GBu_NN>cPLA=`SP^$gxAnj;WjJnBi%Q1zg`*^cG;Q)#3Gv@c^j6L{arv>- zAW%8WrSAVY1sj$=umcAf#ZgC8UGZGoamK}hR7j6}i8#np8ruUlvgQ$j+AQglFsQQq zOjyHf22pxh9+h#n$21&$h?2uq0>C9P?P=Juw0|;oE~c$H{#RGfa>| zj)Iv&uOnaf@foiBJ}_;zyPHcZt1U~nOcNB{)og8Btv+;f@PIT*xz$x!G?u0Di$lo7 zOugtQ$Wx|C($fyJTZE1JvR~i7LP{ zbdIwqYghQAJi9p}V&$=*2Azev$6K@pyblphgpv8^9bN!?V}{BkC!o#bl&AP!3DAjM zmWFsvn2fKWCfjcAQmE+=c3Y7j@#7|{;;0f~PIodmq*;W9Fiak|gil6$w3%b_Pr6K_ zJEG@&!J%DgBZJDCMn^7mk`JV0&l07Bt`1ymM|;a)MOWz*bh2#d{i?SDe9IcHs7 zjCrnyQ*Y5GzIt}>`bD91o#~5H?4_nckAgotN{2%!?wsSl|LVmJht$uhGa+HiH>;av z8c?mcMYM7;mvWr6noUR{)gE!=i7cZUY7e;HXa221KkRoc2UB>s$Y(k%NzTSEr>W(u z<(4mcc)4rB_&bPzX*1?*ra%VF}P1nwiP5cykJ&W{!OTlz&Td0pOkVp+wc z@k=-Hg=()hNg=Q!Ub%`BONH{ z_=ZFgetj@)NvppAK2>8r!KAgi>#%*7;O-o9MOOfQjV-n@BX6;Xw;I`%HBkk20v`qoVd0)}L6_49y1IhR z_OS}+eto}OPVRn*?UHC{eGyFU7JkPz!+gX4P>?h3QOwGS63fv4D1*no^6PveUeE5% zlehjv_3_^j^C({a2&RSoVlOn71D8WwMu9@Nb@=E_>1R*ve3`#TF(NA0?d9IR_tm=P zOP-x;gS*vtyE1Cm zG0L?2nRUFj#aLr-R1fX*$sXhad)~xdA*=hF3zPZhha<2O$Ps+F07w*3#MTe?)T8|A!P!v+a|ot{|^$q(TX`35O{WI0RbU zCj?hgOv=Z)xV?F`@HKI11IKtT^ocP78cqHU!YS@cHI@{fPD?YXL)?sD~9thOAv4JM|K8OlQhPXgnevF=F7GKD2#sZW*d za}ma31wLm81IZxX(W#A9mBvLZr|PoLnP>S4BhpK8{YV_}C|p<)4#yO{#ISbco92^3 zv&kCE(q9Wi;9%7>>PQ!zSkM%qqqLZW7O`VXvcj;WcJ`2~v?ZTYB@$Q&^CTfvy?1r^ z;Cdi+PTtmQwHX_7Kz?r#1>D zS5lWU(Mw_$B&`ZPmqxpIvK<~fbXq?x20k1~9az-Q!uR78mCgRj*eQ>zh3c$W}>^+w^dIr-u{@s30J=)1zF8?Wn|H`GS<=>Om|DjzC{}Jt?{!fSJe*@$H zg>wFnlT)k#T?LslW zu$^7Uy~$SQ21cE?3Ijl+bLfuH^U5P^$@~*UY#|_`uvAIe(+wD2eF}z_y!pvomuVO; zS^9fbdv)pcm-B@CW|Upm<7s|0+$@@<&*>$a{aW+oJ%f+VMO<#wa)7n|JL5egEgoBv zl$BY(NQjE0#*nv=!kMnp&{2Le#30b)Ql2e!VkPLK*+{jv77H7)xG7&=aPHL7LK9ER z5lfHxBI5O{-3S?GU4X6$yVk>lFn;ApnwZybdC-GAvaznGW-lScIls-P?Km2mF>%B2 zkcrXTk+__hj-3f48U%|jX9*|Ps41U_cd>2QW81Lz9}%`mTDIhE)jYI$q$ma7Y-`>% z8=u+Oftgcj%~TU}3nP8&h7k+}$D-CCgS~wtWvM|UU77r^pUw3YCV80Ou*+bH0!mf0 zxzUq4ed6y>oYFz7+l18PGGzhB^pqSt)si=9M>~0(Bx9*5r~W7sa#w+_1TSj3Jn9mW zMuG9BxN=}4645Cpa#SVKjFst;9UUY@O<|wpnZk$kE+to^4!?0@?Cwr3(>!NjYbu?x z1!U-?0_O?k!NdM^-rIQ8p)%?M+2xkhltt*|l=%z2WFJhme7*2xD~@zk#`dQR$6Lmd zb3LOD4fdt$Cq>?1<%&Y^wTWX=eHQ49Xl_lFUA(YQYHGHhd}@!VpYHHm=(1-O=yfK#kKe|2Xc*9}?BDFN zD7FJM-AjVi)T~OG)hpSWqH>vlb41V#^G2B_EvYlWhDB{Z;Q9-0)ja(O+By`31=biA zG&Fs#5!%_mHi|E4Nm$;vVQ!*>=_F;ZC=1DTPB#CICS5fL2T3XmzyHu?bI;m7D4@#; ztr~;dGYwb?m^VebuULtS4lkC_7>KCS)F@)0OdxZIFZp@FM_pHnJes8YOvwB|++#G( z&dm*OP^cz95Wi15vh`Q+yB>R{8zqEhz5of>Po$9LNE{xS<)lg2*roP*sQ}3r3t<}; zPbDl{lk{pox~2(XY5=qg0z!W-x^PJ`VVtz$git7?)!h>`91&&hESZy1KCJ2nS^yMH z!=Q$eTyRi68rKxdDsdt+%J_&lapa{ds^HV9Ngp^YDvtq&-Xp}60B_w@Ma>_1TTC;^ zpbe!#gH}#fFLkNo#|`jcn?5LeUYto%==XBk6Ik0kc4$6Z+L3x^4=M6OI1=z5u#M%0 z0E`kevJEpJjvvN>+g`?gtnbo$@p4VumliZV3Z%CfXXB&wPS^5C+7of2tyVkMwNWBiTE2 z8CdPu3i{*vR-I(NY5syRR}I1TJOV@DJy-Xmvxn^IInF>Tx2e)eE9jVSz69$6T`M9-&om!T+I znia!ZWJRB28o_srWlAxtz4VVft8)cYloIoVF=pL zugnk@vFLXQ_^7;%hn9x;Vq?lzg7%CQR^c#S)Oc-8d=q_!2ZVH764V z!wDKSgP}BrVV6SfCLZnYe-7f;igDs9t+K*rbMAKsp9L$Kh<6Z;e7;xxced zn=FGY<}CUz31a2G}$Q(`_r~75PzM4l_({Hg&b@d8&jC}B?2<+ed`f#qMEWi z`gm!STV9E4sLaQX+sp5Nu9*;9g12naf5?=P9p@H@f}dxYprH+3ju)uDFt^V{G0APn zS;16Dk{*fm6&BCg#2vo?7cbkkI4R`S9SSEJ=#KBk3rl69SxnCnS#{*$!^T9UUmO#&XXKjHKBqLdt^3yVvu8yn|{ zZ#%1CP)8t-PAz(+_g?xyq;C2<9<5Yy<~C74Iw(y>uUL$+$mp(DRcCWbCKiGCZw@?_ zdomfp+C5xt;j5L@VfhF*xvZdXwA5pcdsG>G<8II-|1dhAgzS&KArcb0BD4ZZ#WfiEY{hkCq5%z9@f|!EwTm;UEjKJsUo696V>h zy##eXYX}GUu%t{Gql8vVZKkNhQeQ4C%n|RmxL4ee5$cgwlU+?V7a?(jI#&3wid+Kz5+x^G!bb#$q>QpR#BZ}Xo5UW^ zD&I`;?(a}Oys7-`I^|AkN?{XLZNa{@27Dv^s4pGowuyhHuXc zuctKG2x0{WCvg_sGN^n9myJ}&FXyGmUQnW7fR$=bj$AHR88-q$D!*8MNB{YvTTEyS zn22f@WMdvg5~o_2wkjItJN@?mDZ9UUlat2zCh(zVE=dGi$rjXF7&}*sxac^%HFD`Y zTM5D3u5x**{bW!68DL1A!s&$2XG@ytB~dX-?BF9U@XZABO`a|LM1X3HWCllgl0+uL z04S*PX$%|^WAq%jkzp~%9HyYIF{Ym?k)j3nMwPZ=hlCg9!G+t>tf0o|J2%t1 ztC+`((dUplgm3`+0JN~}&FRRJ3?l*>Y&TfjS>!ShS`*MwO{WIbAZR#<%M|4c4^dY8 z{Rh;-!qhY=dz5JthbWoovLY~jNaw>%tS4gHVlt5epV8ekXm#==Po$)}mh^u*cE>q7*kvX&gq)(AHoItMYH6^s6f(deNw%}1=7O~bTHSj1rm2|Cq+3M z93djjdomWCTCYu!3Slx2bZVy#CWDozNedIHbqa|otsUl+ut?>a;}OqPfQA05Yim_2 zs@^BjPoFHOYNc6VbNaR5QZfSMh2S*`BGwcHMM(1@w{-4jVqE8Eu0Bi%d!E*^Rj?cR z7qgxkINXZR)K^=fh{pc0DCKtrydVbVILI>@Y0!Jm>x-xM!gu%dehm?cC6ok_msDVA*J#{75%4IZt}X|tIVPReZS#aCvuHkZxc zHVMtUhT(wp09+w9j9eRqz~LtuSNi2rQx_QgQ(}jBt7NqyT&ma61ldD(s9x%@q~PQl zp6N*?=N$BtvjQ_xIT{+vhb1>{pM0Arde0!X-y))A4znDrVx8yrP3B1(7bKPE5jR@5 zwpzwT4cu~_qUG#zYMZ_!2Tkl9zP>M%cy>9Y(@&VoB84#%>amTAH{(hL4cDYt!^{8L z645F>BWO6QaFJ-{C-i|-d%j7#&7)$X7pv#%9J6da#9FB5KyDhkA+~)G0^87!^}AP>XaCSScr;kL;Z%RSPD2CgoJ;gpYT5&6NUK$86$T?jRH=w8nI9Z534O?5fk{kd z`(-t$8W|#$3>xoMfXvV^-A(Q~$8SKDE^!T;J+rQXP71XZ(kCCbP%bAQ1|%$%Ov9_a zyC`QP3uPvFoBqr_+$HenHklqyIr>PU_Fk5$2C+0eYy^~7U&(!B&&P2%7#mBUhM!z> z_B$Ko?{Pf6?)gpYs~N*y%-3!1>o-4;@1Zz9VQHh)j5U1aL-Hyu@1d?X;jtDBNk*vMXPn@ z+u@wxHN*{uHR!*g*4Xo&w;5A+=Pf9w#PeZ^x@UD?iQ&${K2c}UQgLRik-rKM#Y5rdDphdcNTF~cCX&9ViRP}`>L)QA4zNXeG)KXFzSDa6 zd^St;inY6J_i=5mcGTx4_^Ys`M3l%Q==f>{8S1LEHn{y(kbxn5g1ezt4CELqy)~TV6{;VW>O9?5^ ztcoxHRa0jQY7>wwHWcxA-BCwzsP>63Kt&3fy*n#Cha687CQurXaRQnf5wc9o8v7Rw zNwGr2fac;Wr-Ldehn7tF^(-gPJwPt@VR1f;AmKgxN&YPL;j=0^xKM{!wuU|^mh3NE zy35quf}MeL!PU;|{OW_x$TBothLylT-J>_x6p}B_jW1L>k)ps6n%7Rh z96mPkJIM0QFNYUM2H}YF5bs%@Chs6#pEnloQhEl?J-)es!(SoJpEPoMTdgA14-#mC zghayD-DJWtUu`TD8?4mR)w5E`^EHbsz2EjH5aQLYRcF{l7_Q5?CEEvzDo(zjh|BKg z3aJl_n#j&eFHsUw4~lxqnr!6NL*se)6H=A+T1e3xUJGQrd}oSPwSy5+$tt{2t5J5@(lFxl43amsARG74iyNC}uuS zd2$=(r6RdamdGx^eatX@F2D8?U23tDpR+Os?0Gq2&^dF+$9wiWf?=mDWfjo4LfRwL zI#SRV9iSz>XCSgEj!cW&9H-njJopYiYuq|2w<5R2!nZ27DyvU4UDrHpoNQZiGPkp@ z1$h4H46Zn~eqdj$pWrv;*t!rTYTfZ1_bdkZmVVIRC21YeU$iS-*XMNK`#p8Z_DJx| zk3Jssf^XP7v0X?MWFO{rACltn$^~q(M9rMYoVxG$15N;nP)A98k^m3CJx8>6}NrUd@wp-E#$Q0uUDQT5GoiK_R{ z<{`g;8s>UFLpbga#DAf%qbfi`WN1J@6IA~R!YBT}qp%V-j!ybkR{uY0X|x)gmzE0J z&)=eHPjBxJvrZSOmt|)hC+kIMI;qgOnuL3mbNR0g^<%|>9x7>{}>a2qYSZAGPt4it?8 zNcLc!Gy0>$jaU?}ZWxK78hbhzE+etM`67*-*x4DN>1_&{@5t7_c*n(qz>&K{Y?10s zXsw2&nQev#SUSd|D8w7ZD2>E<%g^; zV{yE_O}gq?Q|zL|jdqB^zcx7vo(^})QW?QKacx$yR zhG|XH|8$vDZNIfuxr-sYFR{^csEI*IM#_gd;9*C+SysUFejP0{{z7@P?1+&_o6=7V|EJLQun^XEMS)w(=@eMi5&bbH*a0f;iC~2J74V2DZIlLUHD&>mlug5+v z6xBN~8-ovZylyH&gG#ptYsNlT?-tzOh%V#Y33zlsJ{AIju`CjIgf$@gr8}JugRq^c zAVQ3;&uGaVlVw}SUSWnTkH_6DISN&k2QLMBe9YU=sA+WiX@z)FoSYX`^k@B!j;ZeC zf&**P?HQG6Rk98hZ*ozn6iS-dG}V>jQhb3?4NJB*2F?6N7Nd;EOOo;xR7acylLaLy z9)^lykX39d@8@I~iEVar4jmjjLWhR0d=EB@%I;FZM$rykBNN~jf>#WbH4U{MqhhF6 zU??@fSO~4EbU4MaeQ_UXQcFyO*Rae|VAPLYMJEU`Q_Q_%s2*>$#S^)&7er+&`9L=1 z4q4ao07Z2Vsa%(nP!kJ590YmvrWg+YrgXYs_lv&B5EcoD`%uL79WyYA$0>>qi6ov7 z%`ia~J^_l{p39EY zv>>b}Qs8vxsu&WcXEt8B#FD%L%ZpcVtY!rqVTHe;$p9rbb5O{^rFMB>auLn-^;s+-&P1#h~mf~YLg$8M9 zZ4#87;e-Y6x6QO<{McUzhy(%*6| z)`D~A(TJ$>+0H+mct(jfgL4x%^oC^T#u(bL)`E2tBI#V1kSikAWmOOYrO~#-cc_8! zCe|@1&mN2{*ceeiBldHCdrURk4>V}79_*TVP3aCyV*5n@jiNbOm+~EQ_}1#->_tI@ zqXv+jj2#8xJtW508rzFrYcJxoek@iW6SR@1%a%Bux&;>25%`j3UI`0DaUr7l79`B1 zqqUARhW1^h6=)6?;@v>xrZNM;t}{yY3P@|L}ey@gG( z9r{}WoYN(9TW&dE2dEJIXkyHA4&pU6ki=rx&l2{DLGbVmg4%3Dlfvn!GB>EVaY_%3+Df{fBiqJV>~Xf8A0aqUjgpa} zoF8YXO&^_x*Ej}nw-$-F@(ddB>%RWoPUj?p8U{t0=n>gAI83y<9Ce@Q#3&(soJ{64 z37@Vij1}5fmzAuIUnXX`EYe;!H-yTVTmhAy;y8VZeB#vD{vw9~P#DiFiKQ|kWwGFZ z=jK;JX*A;Jr{#x?n8XUOLS;C%f|zj-7vXtlf_DtP7bpurBeX%Hjwr z4lI-2TdFpzkjgiv!8Vfv`=SP+s=^i3+N~1ELNWUbH|ytVu>EyPN_3(4TM^QE1swRo zoV7Y_g)a>28+hZG0e7g%@2^s>pzR4^fzR-El}ARTmtu!zjZLuX%>#OoU3}|rFjJg} zQ2TmaygxJ#sbHVyiA5KE+yH0LREWr%^C*yR|@gM$nK2P zo}M}PV0v))uJh&33N>#aU376@ZH79u(Yw`EQ2hM3SJs9f99+cO6_pNW$j$L-CtAfe zYfM)ccwD!P%LiBk!eCD?fHCGvgMQ%Q2oT_gmf?OY=A>&PaZQOq4eT=lwbaf}33LCH zFD|)lu{K7$8n9gX#w4~URjZxWm@wlH%oL#G|I~Fb-v^0L0TWu+`B+ZG!yII)w05DU z>GO?n(TN+B=>HdxVDSlIH76pta$_LhbBg;eZ`M7OGcqt||qi zogS72W1IN%=)5JCyOHWoFP7pOFK0L*OAh=i%&VW&4^LF@R;+K)t^S!96?}^+5QBIs zjJNTCh)?)4k^H^g1&jc>gysM`y^8Rm3qsvkr$9AeWwYpa$b22=yAd1t<*{ zaowSEFP+{y?Ob}8&cwfqoy4Pb9IA~VnM3u!trIK$&&0Op#Ql4j>(EW?UNUv#*iH1$ z^j>+W{afcd`{e&`-A{g}{JnIzYib)!T56IT@YEs{4|`sMpW3c8@UCoIJv`XsAw!XC z34|Il$LpW}CIHFC5e*)}00I5{%OL*WZRGzC0?_}-9{#ue?-ug^ zLE|uv-~6xnSs_2_&CN9{9vyc!Xgtn36_g^wI0C4s0s^;8+p?|mm;Odt3`2ZjwtK;l zfd6j)*Fr#53>C6Y8(N5?$H0ma;BCF3HCjUs7rpb2Kf*x3Xcj#O8mvs#&33i+McX zQpBxD8!O{5Y8D&0*QjD=Yhl9%M0)&_vk}bmN_Ud^BPN;H=U^bn&(csl-pkA+GyY0Z zKV7sU_4n;}uR78ouo8O%g*V;79KY?3d>k6%gpcmQsKk&@Vkw9yna_3asGt`0Hmj59 z%0yiF*`jXhByBI9QsD=+>big5{)BGe&+U2gAARGe3ID)xrid~QN_{I>k}@tzL!Md_ z&=7>TWciblF@EMC3t4-WX{?!m!G6$M$1S?NzF*2KHMP3Go4=#ZHkeIv{eEd;s-yD# z_jU^Ba06TZqvV|Yd;Z_sN%$X=!T+&?#p+OQIHS%!LO`Hx0q_Y0MyGYFNoM{W;&@0@ zLM^!X4KhdtsET5G<0+|q0oqVXMW~-7LW9Bg}=E$YtNh1#1D^6Mz(V9?2g~I1( zoz9Cz=8Hw98zVLwC2AQvp@pBeKyidn6Xu0-1SY1((^Hu*-!HxFUPs)yJ+i`^BC>PC zjwd0mygOVK#d2pRC9LxqGc6;Ui>f{YW9Bvb>33bp^NcnZoH~w9(lM5@JiIlfa-6|k ziy31UoMN%fvQfhi8^T+=yrP{QEyb-jK~>$A4SZT-N56NYEbpvO&yUme&pWKs3^94D zH{oXnUTb3T@H+RgzML*lejx`WAyw*?K7B-I(VJx($2!NXYm%3`=F~TbLv3H<{>D?A zJo-FDYdSA-(Y%;4KUP2SpHKAIcv9-ld(UEJE7=TKp|Gryn;72?0LHqAN^fk6%8PCW z{g_-t)G5uCIf0I`*F0ZNl)Z>))MaLMpXgqWgj-y;R+@A+AzDjsTqw2Mo9ULKA3c70 z!7SOkMtZb+MStH>9MnvNV0G;pwSW9HgP+`tg}e{ij0H6Zt5zJ7iw`hEnvye!XbA@!~#%vIkzowCOvq5I5@$3wtc*w2R$7!$*?}vg4;eDyJ_1=ixJuEp3pUS27W?qq(P^8$_lU!mRChT}ctvZz4p!X^ zOSp|JOAi~f?UkwH#9k{0smZ7-#=lK6X3OFEMl7%)WIcHb=#ZN$L=aD`#DZKOG4p4r zwlQ~XDZ`R-RbF&hZZhu3(67kggsM-F4Y_tI^PH8PMJRcs7NS9ogF+?bZB*fcpJ z=LTM4W=N9yepVvTj&Hu~0?*vR1HgtEvf8w%Q;U0^`2@e8{SwgX5d(cQ|1(!|i$km! zvY03MK}j`sff;*-%mN~ST>xU$6Bu?*Hm%l@0dk;j@%>}jsgDcQ)Hn*UfuThz9(ww_ zasV`rSrp_^bp-0sx>i35FzJwA!d6cZ5#5#nr@GcPEjNnFHIrtUYm1^Z$;{d&{hQV9 z6EfFHaIS}46p^5I-D_EcwwzUUuO}mqRh&T7r9sfw`)G^Q%oHxEs~+XoM?8e*{-&!7 z7$m$lg9t9KP9282eke608^Q2E%H-xm|oJ8=*SyEo} z@&;TQ3K)jgspgKHyGiKVMCz>xmC=H5Fy3!=TP)-R3|&1S-B)!6q50wfLHKM@7Bq6E z44CY%G;GY>tC`~yh!qv~YdXw! zSkquvYNs6k1r7>Eza?Vkkxo6XRS$W7EzL&A`o>=$HXgBp{L(i^$}t`NcnAxzbH8Ht z2!;`bhKIh`f1hIFcI5bHI=ueKdzmB9)!z$s-BT4ItyY|NaA_+o=jO%MU5as9 zc2)aLP>N%u>wlaXTK!p)r?+~)L+0eCGb5{8WIk7K52$nufnQ+m8YF+GQc&{^(zh-$ z#wyWV*Zh@d!b(WwXqvfhQX)^aoHTBkc;4ossV3&Ut*k>AI|m+{#kh4B!`3*<)EJVj zwrxK>99v^k4&Y&`Awm>|exo}NvewV%E+@vOc>5>%H#BK9uaE2$vje zWYM5fKuOTtn96B_2~~!xJPIcXF>E_;yO8AwpJ4)V`Hht#wbO3Ung~@c%%=FX4)q+9 z99#>VC2!4l`~0WHs9FI$Nz+abUq# zz`Of97})Su=^rGp2S$)7N3rQCj#0%2YO<R&p>$<#lgXcUj=4H_{oAYiT3 z44*xDn-$wEzRw7#@6aD)EGO$0{!C5Z^7#yl1o;k0PhN=aVUQu~eTQ^Xy{z8Ow6tk83 z4{5xe%(hx)%nD&|e*6sTWH`4W&U!Jae#U4TnICheJmsw{l|CH?UA{a6?2GNgpZLyzU2UlFu1ZVwlALmh_DOs03J^Cjh1im`E3?9&zvNmg(MuMw&0^Lu$(#CJ*q6DjlKsY-RMJ^8yIY|{SQZ*9~CH|u9L z`R78^r=EbbR*_>5?-)I+$6i}G)%mN(`!X72KaV(MNUP7Nv3MS9S|Pe!%N2AeOt5zG zVJ;jI4HZ$W->Ai_4X+`9c(~m=@ek*m`ZQbv3ryI-AD#AH=`x$~WeW~M{Js57(K7(v ze5`};LG|%C_tmd>bkufMWmAo&B+DT9ZV~h(4jg0>^aeAqL`PEUzJJtI8W1M!bQWpv zvN(d}E1@nlYa!L!!A*RN!(Q3F%J?5PvQ0udu?q-T)j3JKV~NL>KRb~w-lWc685uS6 z=S#aR&B8Sc8>cGJ!!--?kwsJTUUm`Jk?7`H z7PrO~xgBrSW2_tTlCq1LH8*!o?pj?qxy8}(=r_;G18POrFh#;buWR0qU24+XUaVZ0 z?(sXcr@-YqvkCmHr{U2oPogHL{r#3r49TeR<{SJX1pcUqyWPrkYz^X8#QW~?F)R5i z>p^!i<;qM8Nf{-fd6!_&V*e_9qP6q(s<--&1Ttj01j0w>bXY7y1W*%Auu&p|XSOH=)V7Bd4fUKh&T1)@cvqhuD-d=?w}O zjI%i(f|thk0Go*!d7D%0^ztBfE*V=(ZIN84f5HU}T9?ulmEYzT5usi=DeuI*d|;M~ zp_=Cx^!4k#=m_qSPBr5EK~E?3J{dWWPH&oCcNepYVqL?nh4D5ynfWip$m*YlZ8r^Z zuFEUL-nW!3qjRCLIWPT0x)FDL7>Yt7@8dA?R2kF@WE>ysMY+)lTsgNM#3VbXVGL}F z1O(>q>2a+_`6r5Xv$NZAnp=Kgnr3)cL(^=8ypEeOf3q8(HGe@7Tt59;yFl||w|mnO zHDxg2G3z8=(6wjj9kbcEY@Z0iOd7Gq5GiPS5% z*sF1J<#daxDV2Z8H>wxOF<;yKzMeTaSOp_|XkS9Sfn6Mpe9UBi1cSTieGG5$O;ZLIIJ60Y>SN4vC?=yE_CWlo(EEE$e4j?z&^FM%kNmRtlbEL^dPPgvs9sbK5fGw*r@ z+!EU@u$T8!nZh?Fdf_qk$VuHk^yVw`h`_#KoS*N%epIIOfQUy_&V}VWDGp3tplMbf z5Se1sJUC$7N0F1-9jdV2mmGK{-}fu|Nv;12jDy0<-kf^AmkDnu6j~TPWOgy1MT68|D z=4=50jVbUKdKaQgD`eWGr3I&^<6uhkjz$YwItY8%Yp9{z4-{6g{73<_b*@XJ4Nm3-3z z?BW3{aY_ccRjb@W1)i5nLg|7BnWS!B`_Uo9CWaE`Ij327QH?i)9A}4Ug4wmxVVa^b z-4+m%-wwOl7cKH7+=x&nrCrbEC)Q$fpg&V83#uEH;C=GNMz`ps@^RxK%T*8%OPnC` z{WO~J%nxYJ`x|N%?&i7?;{_8t^jM&=50HlaOQj8fS}_`moH$c;vI<|cruPFnpT8yU zS%rPOCUSd5Zdb(zwk`hqwTQn)*&n)uYsP*F_(~xEWq}C= zv30kFmZFwJZ@ELVX3?$dXQh|icO7UrL*_5G=I^xXjImz`ZPp>?g#tf(ej~KaIU0algsG!IS09;>?MvqGg#c{i+}qY|{P8W~O%#>|gFd z<1dr$-oxyRGN17yZo1OwLnzwYs0|;IS_nymNB0IlSzPQ%-r`?T=;_XQ^~&#}b|AB} zkNbN5uB?-sUB-T5QLlg%Uk3)uHB;>VIzGe9_J9 zaeISkQm!v(9d(0ML^b9fR^sfHFlH?7Mvddt37OuR{|O0{uv)(&-6<87W4 zyO>s!=cPgP3O&7xxU5DlIPw_o3O>6o6Qb?JWs3qw#p3sBc3g$?Dx zi(6D+DYgV;GrUis-CL%Qe{nvZnwaVXmbhH(|GFh|Q)k=1uvA$I@1DXI7bKlQ@8D6P zS?(*?><>)G49q0wr;NajpxP4W2G)kHl6^=Z>hrNEI4Mwd_$O6$1dXF;Q#hE(-eeW6 zz03GJF%Wl?HO=_ztv5*zRlcU~{+{k%#N59mgm~eK>P!QZ6E?#Cu^2)+K8m@ySvZ*5 z|HDT}BkF@3!l(0%75G=1u2hETXEj!^1Z$!)!lyGXlWD!_vqGE$Z)#cUVBqlORW>0^ zDjyVTxwKHKG|0}j-`;!R-p>}qQfBl(?($7pP<+Y8QE#M8SCDq~k<+>Q^Zf@cT_WdX3~BSe z+|KK|7OL5Hm5(NFP~j>Ct3*$wi0n0!xl=(C61`q&cec@mFlH(sy%+RH<=s)8aAPN`SfJdkAQjdv82G5iRdv8 zh{9wHUZaniSEpslXl^_ODh}mypC?b*9FzLjb~H@3DFSe;D(A-K3t3eOTB(m~I6C;(-lKAvit(70k`%@+O*Ztdz;}|_TS~B?Tpmi=QKC^m_ z2YpEaT3iiz*;T~ap1yiA)a`dKMwu`^UhIUeltNQ1Yjo=q@bI@&3zH?rVUg=IxLy-ni zyxDu%-Fr{H6owTjZU2O5>nDb=q&Jz_TjeSq%!2m40x&U6w~GQ({quPL73IsJS;f`$ zsuhioqCBj(gJ>2hoo)Gou7(WP*pX)f=Y=!=k!&1K?EYY%jJ~X&DnK{^saPQK<1BJ z_A`_{%ZozcB(3w$z^To^6d|XuT@=X~wtW!+{4ID@N{AB~J6AL5vuY>JwvWCNFKsKh zd}@>q@_WV#QZ&UJ0#?X(pXR!oyXOEG3rqzHbCzGLONDb042i$})fM@XF)uSP(DHUc z^&{|$*xe{cs?Gp8=B%RY3L7#$ve$?TWh>MZdxF1zH1v}1z+$Ov#G7?%D)bBCyDe*% zSeKSpETC2V1){II>@UwJi>4uBN+iAx+82E~gb|Cr&8E^i&)A!uv-g?jzH99wU}8+# z$nh>yvb;TwZmS@7LrvuCu_d0-WxFNI&C7%sWuTL%YU!l|I1{|->=dlOeHOCtUO#zkS3ESO8LHV4hTdQL5EdV zuWD33fFPH}HPrW^s$Qn1Xgp&AT6<-He{{4%eIu3rN=iK|9mURdKXfB&Q?qGok%!cs ze53UP{Z!TO-Y@q2;;k2avA3`lm4OoN4@S*k=UA)7H;qZ`d8`XaYFCv?Ba+uGW@r5v z&&{nf(24WSBOhc7!qF^@0cz;XcUynNaj6w2349;s!K{KVqs5yS{ z7VubS`2OzT^5#1~6Tt^RTvt9-J|D2F>y~>2;jeF>g`hx5l%B3H=aLExQihuYngzlnBTYOTHJQMzl>kwqN5JYs)Ej zblA@ntkUS~xi+}y6|(81helS}Q~&VB37qyV|S3Y=><^1wh%msQM?fz z<58MX(=|PSUKCF#)dbhR%D&xgCD?$aR0qen+wpp6 zst}vX18!Be96TD??j1HsHTUx(a&@F?=gT`Q$oJFFyrh^;zgz!(NlAHGn0cJy@us=w zNhC#l5G;H}+>49Nsh12=ZPO2r*2OBQe5kpb&1?*PIBFitK8}FUfb~S-#hKfF0o#&d z#3aPkB$9scYku&kA6{0xHnBV#&Wei5J>5T-XX-gUXEPo+9b7WL=*XESc(3BshL`aj zXp}QIp*40}oWJt*l043e8_5;H5PI5c)U&IEw5dF(4zjX0y_lk9 zAp@!mK>WUqHo)-jop=DoK>&no>kAD=^qIE7qis&_*4~ z6q^EF$D@R~3_xseCG>Ikb6Gfofb$g|75PPyyZN&tiRxqovo_k zO|HA|sgy#B<32gyU9x^&)H$1jvw@qp+1b(eGAb)O%O!&pyX@^nQd^9BQ4{(F8<}|A zhF&)xusQhtoXOOhic=8#Xtt5&slLia3c*a?dIeczyTbC#>FTfiLST57nc3@Y#v_Eg#VUv zT8cKH#f3=1PNj!Oroz_MAR*pow%Y0*6YCYmUy^7`^r|j23Q~^*TW#cU7CHf0eAD_0 zEWEVddxFgQ7=!nEBQ|ibaScslvhuUk^*%b#QUNrEB{3PG@uTxNwW}Bs4$nS9wc(~O zG7Iq>aMsYkcr!9#A;HNsJrwTDYkK8ikdj{M;N$sN6BqJ<8~z>T20{J8Z2rRUuH7~3 z=tgS`AgxbBOMg87UT4Lwge`*Y=01Dvk>)^{Iu+n6fuVX4%}>?3czOGR$0 zpp*wp>bsFFSV`V;r_m+TZns$ZprIi`OUMhe^cLE$2O+pP3nP!YB$ry}2THx2QJs3< za1;>d-AggCarrQ>&Z!d@;mW+!q6eXhb&`GbzUDSxpl8AJ#Cm#tuc)_xh(2NV=5XMs zrf_ozRYO$NkC=pKFX5OH8v1>0i9Z$ec`~Mf+_jQ68spn(CJwclDhEEkH2Qw;${J$clv__nUjn5jA0wCLEnu1j;v!0vB>Ri6m9`;R{JMS%^)4FC zU0Z44+u$I$w=Bj|iu4DT5h~sS`C*zbmX?@-crY}E+hy>}2~C0Nn(EKk@5^qO4@l@! z6O0lr%tzGC`D^)8xU3FnMZVm0kX1sBWhaQyzVoXFWwr%Ny?=2M{5s#5i7fTu3gEkG zc{(Pr$v=;`Y#&`y*J}#M9ux>0?xu!`$9cUKm#Bdd_&S#LPTS?ZPV6zN6>W6JTS~-LfjL{mB=b(KMk3 z2HjBSlJeyUVqDd=Mt!=hpYsvby2GL&3~zm;0{^nZJq+4vb?5HH4wufvr}IX42sHeK zm@x?HN$8TsTavXs)tLDFJtY9b)y~Tl@7z4^I8oUQq4JckH@~CVQ;FoK(+e0XAM>1O z(ei}h?)JQp>)d=6ng-BZF1Z5hsAKW@mXq+hU?r8I(*%`tnIIOXw7V6ZK(T9RFJJe@ zZS!aC+p)Gf2Ujc=a6hx4!A1Th%YH!Lb^xpI!Eu` zmJO{9rw){B1Ql18d%F%da+Tbu1()?o(zT7StYqK6_w`e+fjXq5L^y(0 z09QA6H4oFj59c2wR~{~>jUoDzDdKz}5#onYPJRwa`SUO)Pd4)?(ENBaFVLJr6Kvz= zhTtXqbx09C1z~~iZt;g^9_2nCZ{};-b4dQJbv8HsWHXPVg^@(*!@xycp#R?a|L!+` zY5w))JWV`Gls(=}shH0#r*;~>_+-P5Qc978+QUd>J%`fyn{*TsiG-dWMiJXNgwBaT zJ=wgYFt+1ACW)XwtNx)Q9tA2LPoB&DkL16P)ERWQlY4%Y`-5aM9mZ{eKPUgI!~J3Z zkMd5A_p&v?V-o-6TUa8BndiX?ooviev(DKw=*bBVOW|=zps9=Yl|-R5@yJe*BPzN}a0mUsLn{4LfjB_oxpv(mwq# zSY*%E{iB)sNvWfzg-B!R!|+x(Q|b@>{-~cFvdDHA{F2sFGA5QGiIWy#3?P2JIpPKg6ncI^)dvqe`_|N=8 '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +# This is normally unused +# shellcheck disable=SC2034 +APP_BASE_NAME=${0##*/} +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { + echo "$*" +} >&2 + +die () { + echo + echo "$*" + echo + exit 1 +} >&2 + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; +esac + +CLASSPATH="\\\"\\\"" + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD=$JAVA_HOME/jre/sh/java + else + JAVACMD=$JAVA_HOME/bin/java + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD=java + if ! command -v java >/dev/null 2>&1 + then + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +fi + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \ + "$@" + +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/android/gradlew.bat b/android/gradlew.bat new file mode 100644 index 0000000..db3a6ac --- /dev/null +++ b/android/gradlew.bat @@ -0,0 +1,94 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem + +@if "%DEBUG%"=="" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if %ERRORLEVEL% equ 0 goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH= + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* + +:end +@rem End local scope for the variables with windows NT shell +if %ERRORLEVEL% equ 0 goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/android/settings.gradle b/android/settings.gradle new file mode 100644 index 0000000..3b4431d --- /dev/null +++ b/android/settings.gradle @@ -0,0 +1,5 @@ +include ':app' +include ':capacitor-cordova-android-plugins' +project(':capacitor-cordova-android-plugins').projectDir = new File('./capacitor-cordova-android-plugins/') + +apply from: 'capacitor.settings.gradle' \ No newline at end of file diff --git a/android/variables.gradle b/android/variables.gradle new file mode 100644 index 0000000..9cb04f6 --- /dev/null +++ b/android/variables.gradle @@ -0,0 +1,16 @@ +ext { + minSdkVersion = 24 + compileSdkVersion = 34 + targetSdkVersion = 34 + androidxActivityVersion = '1.8.0' + androidxAppCompatVersion = '1.6.1' + androidxCoordinatorLayoutVersion = '1.2.0' + androidxCoreVersion = '1.12.0' + androidxFragmentVersion = '1.6.2' + coreSplashScreenVersion = '1.0.1' + androidxWebkitVersion = '1.9.0' + junitVersion = '4.13.2' + androidxJunitVersion = '1.1.5' + androidxEspressoCoreVersion = '3.5.1' + cordovaAndroidVersion = '10.1.1' +} \ No newline at end of file diff --git a/benchmark.js b/benchmark.js new file mode 100644 index 0000000..e36d945 --- /dev/null +++ b/benchmark.js @@ -0,0 +1,108 @@ + +import { performance } from 'perf_hooks'; + +// Mock MatrixData type as simple array of arrays +const matrix = [ + [0, 1, -1, 8], + [-3, -1, 2, -11], + [-2, 1, 2, -3] +]; + +// Robust Gaussian Elimination with Partial Pivoting +const getSteps = (m) => { + const steps = []; + + let current = m.map(r => [...r]); + const rows = current.length; + const cols = current[0].length; + + steps.push({ + title: "System Initialization", + data: current.map(r => [...r]), + desc: "Starting Augmented Matrix [A|b]. Goal: Upper Triangular Form.", + formula: "Start" + }); + + let pivotRow = 0; + let pivotCol = 0; + + while (pivotRow < rows && pivotCol < cols - 1) { + let maxRow = pivotRow; + let maxVal = Math.abs(current[pivotRow][pivotCol]); + + for (let i = pivotRow + 1; i < rows; i++) { + if (Math.abs(current[i][pivotCol]) > maxVal) { + maxVal = Math.abs(current[i][pivotCol]); + maxRow = i; + } + } + + if (maxRow !== pivotRow) { + const temp = current[pivotRow]; + current[pivotRow] = current[maxRow]; + current[maxRow] = temp; + + steps.push({ + title: "Pivot Swap", + data: current.map(r => [...r]), + desc: `Swapping Row ${pivotRow + 1} with Row ${maxRow + 1} to place the largest value (${current[pivotRow][pivotCol].toFixed(1)}) on the diagonal for stability.`, + highlightRow: maxRow, + pivotRow: pivotRow, + formula: `R${pivotRow + 1} โ†” R${maxRow + 1}`, + isSwap: true + }); + } + + if (Math.abs(current[pivotRow][pivotCol]) < 0.000001) { + pivotCol++; + continue; + } + + for (let i = pivotRow + 1; i < rows; i++) { + const valToEliminate = current[i][pivotCol]; + if (Math.abs(valToEliminate) > 0.000001) { + const pivotVal = current[pivotRow][pivotCol]; + const factor = valToEliminate / pivotVal; + + const newRow = current[i].map((val, idx) => val - factor * current[pivotRow][idx]); + current[i] = newRow; + + steps.push({ + title: "Elimination", + data: current.map(r => [...r]), + desc: `Eliminating term in R${i + 1} using pivot from R${pivotRow + 1}.`, + highlightRow: i, + pivotRow: pivotRow, + formula: `R${i + 1} โ† R${i + 1} - (${factor.toFixed(2)})ยทR${pivotRow + 1}` + }); + } + } + pivotRow++; + pivotCol++; + } + + steps.push({ + title: "Row Echelon Form", + data: current.map(r => [...r]), + desc: "Matrix is now in Upper Triangular Form. Back-substitution can now solve for variables.", + formula: "Done" + }); + + return steps; +}; + +const ITERATIONS = 100000; + +console.log(`Running Gaussian Elimination Benchmark for ${ITERATIONS} iterations...`); +const start = performance.now(); + +for (let i = 0; i < ITERATIONS; i++) { + getSteps(matrix); +} + +const end = performance.now(); +const totalTime = end - start; +const avgTime = totalTime / ITERATIONS; + +console.log(`Total Time: ${totalTime.toFixed(2)} ms`); +console.log(`Average Time per Call: ${avgTime.toFixed(4)} ms`); diff --git a/capacitor.config.ts b/capacitor.config.ts new file mode 100644 index 0000000..6fe4abf --- /dev/null +++ b/capacitor.config.ts @@ -0,0 +1,9 @@ +import type { CapacitorConfig } from '@capacitor/cli'; + +const config: CapacitorConfig = { + appId: 'com.inmersion.mathbiotech', + appName: 'Inmerson Lab', + webDir: 'dist' +}; + +export default config; diff --git a/components/AnimatedBackground.tsx b/components/AnimatedBackground.tsx new file mode 100644 index 0000000..82cd916 --- /dev/null +++ b/components/AnimatedBackground.tsx @@ -0,0 +1,39 @@ + +import React from 'react'; +import { motion } from 'framer-motion'; + +export const AnimatedBackground: React.FC = () => { + return ( +

+ + {/* 1. Deep Space Gradient */} +
+ + {/* 2. Stars (CSS implementation for performance) */} +
+ + {/* 3. Nebula Orbs (Animated) */} +
+
+
+ + {/* 4. Grid Overlay (Perspective) */} +
+ + {/* 5. Noise Texture */} +
+
+ ); +}; diff --git a/components/DNAStrand.tsx b/components/DNAStrand.tsx new file mode 100644 index 0000000..f3f5f22 --- /dev/null +++ b/components/DNAStrand.tsx @@ -0,0 +1,179 @@ + +import React, { useMemo, useRef, useEffect, useLayoutEffect } from 'react'; +import { useFrame } from '@react-three/fiber'; +import { Line } from '@react-three/drei'; +import * as THREE from 'three'; + +export interface DNAStrandProps { + radius: number; + climb: number; + frequency: number; + showBonds: boolean; + animate: boolean; +} + +const tempObject = new THREE.Object3D(); + +export const DNAStrand: React.FC = ({ + radius, + climb, + frequency, + showBonds, + animate +}) => { + const groupRef = useRef(null); + + // Refs for InstancedMeshes + const meshARef = useRef(null); + const meshBRef = useRef(null); + const bondRef = useRef(null); + const bondGlowCyanRef = useRef(null); + const bondGlowPurpleRef = useRef(null); + + useFrame((state, delta) => { + if (animate && groupRef.current) { + groupRef.current.rotation.y += delta * 0.2; + } + }); + + const { strandA, strandB, connections } = useMemo(() => { + const sA: THREE.Vector3[] = []; + const sB: THREE.Vector3[] = []; + const conns: { start: THREE.Vector3, end: THREE.Vector3, id: number }[] = []; + const count = 40; + const startOffset = -count * climb / 2; + + for (let i = 0; i < count; i++) { + const angle = i * frequency; + const y = startOffset + i * climb; + + // Helix A + const xA = Math.cos(angle) * radius; + const zA = Math.sin(angle) * radius; + const vecA = new THREE.Vector3(xA, y, zA); + sA.push(vecA); + + // Helix B (Phase shifted by PI) + const xB = Math.cos(angle + Math.PI) * radius; + const zB = Math.sin(angle + Math.PI) * radius; + const vecB = new THREE.Vector3(xB, y, zB); + sB.push(vecB); + + conns.push({ start: vecA, end: vecB, id: i }); + } + return { strandA: sA, strandB: sB, connections: conns }; + }, [radius, climb, frequency]); + + useLayoutEffect(() => { + // Strand A + if (meshARef.current) { + strandA.forEach((pos, i) => { + tempObject.position.copy(pos); + tempObject.rotation.set(0,0,0); + tempObject.scale.set(1,1,1); + tempObject.updateMatrix(); + meshARef.current!.setMatrixAt(i, tempObject.matrix); + }); + meshARef.current.instanceMatrix.needsUpdate = true; + } + + // Strand B + if (meshBRef.current) { + strandB.forEach((pos, i) => { + tempObject.position.copy(pos); + tempObject.rotation.set(0,0,0); + tempObject.scale.set(1,1,1); + tempObject.updateMatrix(); + meshBRef.current!.setMatrixAt(i, tempObject.matrix); + }); + meshBRef.current.instanceMatrix.needsUpdate = true; + } + + // Bonds + if (showBonds && bondRef.current) { + let cyanIndex = 0; + let purpleIndex = 0; + + connections.forEach((conn, i) => { + const center = new THREE.Vector3().addVectors(conn.start, conn.end).multiplyScalar(0.5); + const length = conn.start.distanceTo(conn.end); + const direction = new THREE.Vector3().subVectors(conn.end, conn.start).normalize(); + const quaternion = new THREE.Quaternion().setFromUnitVectors(new THREE.Vector3(0, 1, 0), direction); + + // 1. White Bond Base + tempObject.position.copy(center); + tempObject.quaternion.copy(quaternion); + // Original: + // Instanced: radius=0.03, height=1. Scale Y by length. + tempObject.scale.set(1, length, 1); + tempObject.updateMatrix(); + bondRef.current!.setMatrixAt(i, tempObject.matrix); + + // 2. Glow Bond + // Original: + // scale={[1, 0.2, 1]} + // Total height = length * 0.4 * 0.2 = length * 0.08 + // Instanced: radius=0.06, height=1. Scale Y by length * 0.08 + tempObject.scale.set(1, length * 0.4 * 0.2, 1); + tempObject.updateMatrix(); + + if (i % 2 === 0) { + if (bondGlowCyanRef.current) { + bondGlowCyanRef.current.setMatrixAt(cyanIndex, tempObject.matrix); + cyanIndex++; + } + } else { + if (bondGlowPurpleRef.current) { + bondGlowPurpleRef.current.setMatrixAt(purpleIndex, tempObject.matrix); + purpleIndex++; + } + } + }); + bondRef.current.instanceMatrix.needsUpdate = true; + + if (bondGlowCyanRef.current) bondGlowCyanRef.current.instanceMatrix.needsUpdate = true; + if (bondGlowPurpleRef.current) bondGlowPurpleRef.current.instanceMatrix.needsUpdate = true; + } + }, [strandA, strandB, connections, showBonds]); + + return ( + + {/* Strand A (Cyan) */} + + + + + + + {/* Strand B (Purple) */} + + + + + + + {/* Hydrogen Bonds */} + {showBonds && ( + <> + {/* Base White Bonds */} + + + + + + {/* Glow Cyan */} + + + + + + {/* Glow Purple */} + + + + + + )} + + ); +}; diff --git a/components/MathRenderer.tsx b/components/MathRenderer.tsx new file mode 100644 index 0000000..dd97bee --- /dev/null +++ b/components/MathRenderer.tsx @@ -0,0 +1,43 @@ +import React, { useEffect, useRef } from 'react'; +import katex from 'katex'; + +interface MathRendererProps { + expression: string; + inline?: boolean; + className?: string; + color?: string; +} + +export const MathRenderer: React.FC = ({ expression, inline = false, className = '', color }) => { + const containerRef = useRef(null); + + useEffect(() => { + if (containerRef.current) { + try { + // We use renderToString and manual innerHTML assignment to bypass + // KaTeX's strict document.compatMode check, which can trigger false positives + // in some sandboxed environments (like iframes) even with valid DOCTYPEs. + const html = katex.renderToString(expression, { + throwOnError: false, + displayMode: !inline, + output: 'html', + trust: true, + strict: false + }); + containerRef.current.innerHTML = html; + } catch (e) { + console.error("KaTeX render error:", e); + // Fallback to text if rendering fails + containerRef.current.textContent = expression; + } + } + }, [expression, inline]); + + return ( +
+ ); +}; \ No newline at end of file diff --git a/components/MatrixInput.test.tsx b/components/MatrixInput.test.tsx new file mode 100644 index 0000000..f8a90cf --- /dev/null +++ b/components/MatrixInput.test.tsx @@ -0,0 +1,85 @@ +import { render, screen, fireEvent } from '@testing-library/react'; +import { describe, it, expect, vi } from 'vitest'; +import { MatrixInput } from './MatrixInput'; +import React from 'react'; + +// Mock framer-motion to avoid animation issues in tests +vi.mock('framer-motion', () => ({ + motion: { + div: ({ children, ...props }: any) =>
{children}
, + h3: ({ children, ...props }: any) =>

{children}

, + path: ({ children, ...props }: any) => {children}, + }, + AnimatePresence: ({ children }: any) => <>{children}, + LayoutGroup: ({ children }: any) => <>{children}, +})); + +describe('MatrixInput Performance Benchmark', () => { + it('calls onChange only once after typing completes (Optimized)', () => { + const handleChange = vi.fn(); + const data = [[0]]; + + render( + + ); + + const input = screen.getByRole('textbox'); + + // Simulate typing "12.5" + fireEvent.focus(input); + fireEvent.change(input, { target: { value: '1' } }); + fireEvent.change(input, { target: { value: '12' } }); + fireEvent.change(input, { target: { value: '12.' } }); + fireEvent.change(input, { target: { value: '12.5' } }); + + // Expect NO onChange calls yet (optimization) + expect(handleChange).toHaveBeenCalledTimes(0); + + // Trigger blur to commit the change + fireEvent.blur(input); + + // Expect onChange to be called exactly once + expect(handleChange).toHaveBeenCalledTimes(1); + + // Verify the called value + // data is [[0]], changed 0,0 to 12.5. + // The new data passed to onChange should be [[12.5]] + expect(handleChange).toHaveBeenCalledWith([[12.5]]); + }); + + it('commits change on Enter key', () => { + const handleChange = vi.fn(); + const data = [[0]]; + + render( + + ); + + const input = screen.getByRole('textbox'); + + fireEvent.focus(input); + fireEvent.change(input, { target: { value: '99' } }); + + expect(handleChange).toHaveBeenCalledTimes(0); + + // Press Enter + fireEvent.keyDown(input, { key: 'Enter', code: 'Enter', charCode: 13 }); + + // In JSDOM/Testing Library, e.currentTarget.blur() might not synchronously trigger the React onBlur event + // so we might need to simulate the blur event explicitly if the component relies on the browser's behavior. + // However, let's try to just fire blur manually to simulate the browser behavior that we know happens. + // This confirms that IF blur happens (which we trigger on Enter), THEN logic runs. + fireEvent.blur(input); + + expect(handleChange).toHaveBeenCalledTimes(1); + expect(handleChange).toHaveBeenCalledWith([[99]]); + }); +}); diff --git a/components/MatrixInput.tsx b/components/MatrixInput.tsx new file mode 100644 index 0000000..3096698 --- /dev/null +++ b/components/MatrixInput.tsx @@ -0,0 +1,184 @@ +import React, { useState } from 'react'; +import { MatrixProps } from '../types'; +import { motion, AnimatePresence, LayoutGroup } from 'framer-motion'; + +export const MatrixInput: React.FC = ({ + data, + label, + editable = false, + onChange, + highlightRow, + highlightCol, + color = 'blue' +}) => { + const rows = data.length; + const cols = data[0]?.length || 0; + + // Local state for typing + const [editValue, setEditValue] = useState<{key: string, val: string} | null>(null); + + const handleFocus = (r: number, c: number) => { + setEditValue({ key: `${r}-${c}`, val: data[r][c].toString() }); + }; + + const commitEdit = () => { + if (!editValue || !onChange) { + setEditValue(null); + return; + } + + const [r, c] = editValue.key.split('-').map(Number); + const val = editValue.val; + + let newValue = data[r][c]; + + const num = parseFloat(val); + if (!isNaN(num)) { + newValue = num; + } else if (val === '') { + newValue = 0; + } + + if (newValue !== data[r][c]) { + const newData = data.map(row => [...row]); + newData[r][c] = newValue; + onChange(newData); + } + + setEditValue(null); + }; + + const handleBlur = () => { + commitEdit(); + }; + + const handleKeyDown = (e: React.KeyboardEvent) => { + if (e.key === 'Enter') { + e.currentTarget.blur(); + } + }; + + const handleChange = (r: number, c: number, val: string) => { + setEditValue({ key: `${r}-${c}`, val }); + }; + + const themes = { + blue: { text: 'text-blue-200', focus: 'focus:border-blue-400 focus:shadow-[0_0_15px_rgba(59,130,246,0.3)]', bracket: '#60a5fa' }, + green: { text: 'text-emerald-200', focus: 'focus:border-emerald-400 focus:shadow-[0_0_15px_rgba(16,185,129,0.3)]', bracket: '#34d399' }, + purple: { text: 'text-purple-200', focus: 'focus:border-purple-400 focus:shadow-[0_0_15px_rgba(168,85,247,0.3)]', bracket: '#c084fc' }, + orange: { text: 'text-accent-cyan', focus: 'focus:border-accent-cyan focus:shadow-[0_0_15px_rgba(34,211,238,0.3)]', bracket: '#22d3ee' }, + pink: { text: 'text-pink-200', focus: 'focus:border-pink-400 focus:shadow-[0_0_15px_rgba(236,72,153,0.3)]', bracket: '#f472b6' }, + red: { text: 'text-fuchsia-200', focus: 'focus:border-fuchsia-400 focus:shadow-[0_0_15px_rgba(217,70,239,0.3)]', bracket: '#e879f9' }, + cyan: { text: 'text-accent-cyan', focus: 'focus:border-accent-cyan focus:shadow-[0_0_15px_rgba(34,211,238,0.3)]', bracket: '#22d3ee' }, + }; + + const currentTheme = themes[color] || themes.blue; + + // Bracket SVG Path Generator + const bracketThickness = 2; + const bracketWidth = 8; + + return ( +
+ {label && ( + + {label} + + )} + + + + {/* Left Bracket */} + + + + + {/* Matrix Grid */} +
+ + {data.map((row, rIndex) => ( + row.map((cell, cIndex) => { + const isHighlighted = rIndex === highlightRow || cIndex === highlightCol; + const cellKey = `${rIndex}-${cIndex}`; + const displayValue = (editValue && editValue.key === cellKey) + ? editValue.val + : cell; + + return ( + + editable && handleFocus(rIndex, cIndex)} + onBlur={handleBlur} + onKeyDown={handleKeyDown} + onChange={(e) => handleChange(rIndex, cIndex, e.target.value)} + className={` + w-10 h-10 sm:w-12 sm:h-12 md:w-14 md:h-14 + text-center text-sm sm:text-base md:text-lg + font-mono rounded-lg outline-none transition-all duration-300 + border border-white/5 + bg-slate-900/40 backdrop-blur-md + hover:bg-white/10 hover:border-white/10 + ${currentTheme.text} + ${editable ? 'cursor-text' : 'cursor-default'} + ${editable ? currentTheme.focus : ''} + ${isHighlighted ? '!bg-accent-cyan/20 !border-accent-cyan/50 !text-white scale-110 shadow-[0_0_15px_rgba(0,246,255,0.2)] z-10' : ''} + `} + /> + + ); + }) + ))} + +
+ + {/* Right Bracket */} + + + +
+
+ +
+ {rows} ร— {cols} +
+
+ ); +}; \ No newline at end of file diff --git a/components/Sidebar.test.tsx b/components/Sidebar.test.tsx new file mode 100644 index 0000000..bd526be --- /dev/null +++ b/components/Sidebar.test.tsx @@ -0,0 +1,22 @@ +import React from 'react'; +import { render } from '@testing-library/react'; +import { describe, expect, it } from 'vitest'; +import { Sidebar } from './Sidebar'; +import { ModuleType, ViewMode } from '../types'; + +describe('Sidebar desktop visibility', () => { + it('applies the desktop visibility override to the animated sidebar', () => { + const { container } = render( + undefined} + goHome={() => undefined} + isOpen={false} + toggleSidebar={() => undefined} + />, + ); + + expect(container.querySelector('.framer-motion-sidebar')).toBeInTheDocument(); + }); +}); diff --git a/components/Sidebar.tsx b/components/Sidebar.tsx new file mode 100644 index 0000000..0a6ce66 --- /dev/null +++ b/components/Sidebar.tsx @@ -0,0 +1,285 @@ + +import React from 'react'; +import { ViewMode, ModuleType } from '../types'; +import { + BookOpen, Calculator, Grid3X3, Sigma, GitGraph, + TrendingUp, Activity, Library, ArrowLeft, Infinity, GraduationCap, Divide, LineChart, Dna, + Unplug, Layers, Atom, Shuffle, Move, Target, Waves, FileText, X, Menu, AreaChart, History, Variable, Microscope, Sprout, Timer, Box, + Cylinder, Globe, ArrowUpRight, PieChart, Sparkles +} from 'lucide-react'; +import { motion, AnimatePresence } from 'framer-motion'; +import { BRAND_SHORT_NAME } from '../data/branding'; + +interface SidebarProps { + currentView: ViewMode; + currentModule: ModuleType; + setView: (view: ViewMode) => void; + goHome: () => void; + isOpen: boolean; + toggleSidebar: () => void; +} + +export const Sidebar: React.FC = ({ currentView, currentModule, setView, goHome, isOpen, toggleSidebar }) => { + + const getMenuItems = () => { + const commonTools = [ + { type: 'header', label: 'Academic Tools' }, + { id: ViewMode.CHEAT_SHEET, label: 'Cheat Sheet', icon: FileText }, + { id: ViewMode.AI_CHAT, label: 'AI Assistant', icon: Sparkles }, + { id: ViewMode.HOMEWORK, label: 'Homework Exercises', icon: Library }, + { id: ViewMode.FINAL_EXAM, label: 'Module Test', icon: GraduationCap }, + ]; + + switch (currentModule) { + case ModuleType.MATRIX: + return [ + { type: 'header', label: 'Core Concepts' }, + { id: ViewMode.BASICS, label: 'Definitions', icon: BookOpen }, + { id: ViewMode.OPERATIONS, label: 'Operations', icon: Calculator }, + + { type: 'header', label: '3D Space' }, + { id: ViewMode.VECTOR_OPS_3D, label: 'Vector Lab (3D)', icon: ArrowUpRight }, + { id: ViewMode.VECTOR_3D, label: 'Matrix Warper (3D)', icon: Box }, + + { type: 'header', label: 'Linear Systems' }, + { id: ViewMode.GAUSSIAN, label: 'Gaussian Elimination', icon: Layers }, + { id: ViewMode.SYSTEMS, label: 'Cramer\'s Systems', icon: Sigma }, + { id: ViewMode.INVERSE, label: 'Inverse Matrix', icon: GitGraph }, + + { type: 'header', label: 'Spectral Theory' }, + { id: ViewMode.DETERMINANT, label: 'Determinant', icon: Grid3X3 }, + { id: ViewMode.EIGENVALUES, label: 'Eigenvalues', icon: Atom }, + + ...commonTools + ]; + + case ModuleType.SEQUENCES: + return [ + { type: 'header', label: 'Sequence Analysis' }, + { id: ViewMode.SEQUENCES, label: 'Limits & Monotonicity', icon: TrendingUp }, + { id: ViewMode.COBWEB, label: 'Chaos & Cobweb', icon: Shuffle }, + { type: 'header', label: 'Visualization' }, + { id: ViewMode.SEQUENCES_3D, label: '3D Helix Visualizer', icon: Box }, + { type: 'header', label: 'Infinite Series' }, + { id: ViewMode.SERIES, label: 'Partial Sums', icon: Layers }, + ...commonTools + ]; + + case ModuleType.FUNCTIONS: + return [ + { type: 'header', label: 'Properties' }, + { id: ViewMode.FUNCTIONS, label: 'Graphing & Domain', icon: Activity }, + { id: ViewMode.TRANSFORMATIONS, label: 'Transformations', icon: Move }, + { type: 'header', label: '3D Geometry' }, + { id: ViewMode.FUNCTIONS_3D, label: 'Surface Plotter', icon: Box }, + { type: 'header', label: 'Applications' }, + { id: ViewMode.NEWTON, label: 'Newton Optimization', icon: Target }, + ...commonTools + ]; + + case ModuleType.LIMITS: + return [ + { type: 'header', label: 'Analysis' }, + { id: ViewMode.FUNCTIONS, label: 'Limit Analysis', icon: Infinity }, + { id: ViewMode.CONTINUITY, label: 'Continuity & Holes', icon: Unplug }, + { type: 'header', label: 'Multivariable' }, + { id: ViewMode.LIMITS_3D, label: '3D Limits', icon: Box }, + ...commonTools + ]; + + case ModuleType.DERIVATIVES: + return [ + { type: 'header', label: 'Calculus I' }, + { id: ViewMode.DERIVATIVE_RULES, label: 'Rules & Formulas', icon: Divide }, + { id: ViewMode.FUNCTION_ANALYSIS, label: 'Curve Analysis', icon: LineChart }, + { type: 'header', label: 'Multivariable' }, + { id: ViewMode.DERIVATIVES_3D, label: 'Tangent Planes (3D)', icon: Box }, + { type: 'header', label: 'Approximation' }, + { id: ViewMode.TAYLOR, label: 'Taylor Series', icon: Waves }, + ...commonTools + ]; + + case ModuleType.INTEGRALS: + return [ + { type: 'header', label: 'Calculus II' }, + { id: ViewMode.INTEGRAL_BASICS, label: 'Concept & Constant', icon: History }, + { id: ViewMode.INTEGRAL_RULES, label: 'Rules & Formulas', icon: Variable }, + { type: 'header', label: 'Definite Integrals' }, + { id: ViewMode.AREA_UNDER_CURVE, label: 'Area & FTC', icon: AreaChart }, + { id: ViewMode.INTEGRALS_3D, label: 'Solid of Revolution', icon: Cylinder }, + ...commonTools + ]; + + case ModuleType.DIFF_EQ: + return [ + { type: 'header', label: 'Modeling Change' }, + { id: ViewMode.DIFF_BASICS, label: 'Solutions & Curves', icon: Microscope }, + { id: ViewMode.POPULATION_MODELS, label: 'Population Bio-Models', icon: Sprout }, + { id: ViewMode.RADIOACTIVE_DECAY, label: 'Radioactive Decay', icon: Timer }, + { type: 'header', label: 'Chaos Theory' }, + { id: ViewMode.DIFF_EQ_3D, label: 'Lorenz Attractor (3D)', icon: Globe }, + ...commonTools + ]; + + case ModuleType.EXAMS: + return [ + { type: 'header', label: 'Examination Hall' }, + { id: ViewMode.CLASS_EXAM_1, label: 'Class Exam I', icon: FileText }, + { id: ViewMode.CLASS_EXAM_2, label: 'Class Exam II', icon: FileText }, + { id: ViewMode.CLASS_EXAM_3, label: 'Class Exam III', icon: FileText }, + { type: 'header', label: 'Final Assessment' }, + { id: ViewMode.FULL_EXAM, label: 'Final Exam', icon: GraduationCap }, + { id: ViewMode.EXAM_ANALYSIS, label: 'Performance Analytics', icon: PieChart }, + ]; + + default: + return []; + } + }; + + const menuItems = getMenuItems(); + + return ( + <> + {/* Mobile Overlay */} + + {isOpen && ( + + )} + + + {/* Sidebar Container */} + + {/* Desktop override for visibility */} + + + {/* Mobile Close */} +
+ +
+ +
+ {/* Header */} +
+ + +
+
+ +
+
+

{BRAND_SHORT_NAME}

+
{currentModule.replace('_', ' ')}
+
+
+
+ + {/* Menu */} + + +
+
+

+ Pro Tip: Use the 3D visualizers to better understand complex concepts. +

+
+
+
+
+ + ); +}; diff --git a/components/WolframHelper.tsx b/components/WolframHelper.tsx new file mode 100644 index 0000000..1562ad8 --- /dev/null +++ b/components/WolframHelper.tsx @@ -0,0 +1,222 @@ + +import React, { useState } from 'react'; +import { ExternalLink, Calculator, Terminal, Copy, ChevronRight } from 'lucide-react'; +import { motion } from 'framer-motion'; + +type WolframContext = + | 'matrix_basics' + | 'matrix_ops' + | 'determinant' + | 'inverse' + | 'systems' + | 'sequences' + | 'functions' + | 'limits' + | 'derivatives' + | 'analysis' + | 'gaussian' + | 'eigen'; + +interface WolframHelperProps { + context: WolframContext; +} + +export const WolframHelper: React.FC = ({ context }) => { + const [customQuery, setCustomQuery] = useState(''); + + // Data extracted directly from PDF Screenshots (Page 11 Matrix, Page 9 Sequences) + const tipsMap: Record = { + matrix_basics: { + title: 'Matrix Definitions', + syntax: 'Use curly braces {{...}} for rows.', + examples: [ + '{{1, 2, 3}, {4, 5, 6}}', + 'identity matrix of size 4', + 'diagonal matrix {1, 2, 3}' + ] + }, + matrix_ops: { + title: 'Matrix Operations (PDF Pg 11)', + syntax: 'Use + for add, * for mult, ^ for power.', + examples: [ + '{{1,0},{3,5}} + {{1,3},{7,5}}', + '{{1,0,2},{3,5,1}} * {{1,3},{7,5},{0,2}}', + '{{1,0},{3,5}}^3', + 'transpose {{1, 0, 2}, {3, 5, 1}}' + ] + }, + determinant: { + title: 'Determinant Calculation', + syntax: 'Use det(...) or determinant(...)', + examples: [ + 'det {{1, 0}, {3, 5}}', + 'determinant {{5, 3, -1}, {2, 0, 4}, {-3, 6, 2}}', + 'trace {{4, 1}, {2, 3}}' + ] + }, + inverse: { + title: 'Inverse Matrix', + syntax: 'Use inverse(...) or inv(...)', + examples: [ + 'inverse {{1, 0}, {3, 5}}', + 'inv {{2, 7, 3}, {3, 9, 4}, {1, 5, 3}}', + '{{1, 2}, {3, 4}}^-1' + ] + }, + systems: { + title: 'System Solver', + syntax: 'List equations separated by comma', + examples: [ + 'solve x - 4y + 5z = 2, 2y - z = 1, 4x + 2y + z = 0', + '{{1, -4, 5}, {0, 2, -1}, {4, 2, 1}} . {x, y, z} = {2, 1, 0}' + ] + }, + sequences: { + title: 'Sequence Analysis (PDF Pg 9)', + syntax: 'Use limit... or discreteplot...', + examples: [ + 'limit (4*n^2+5*n-7)^0.5 - 2*n as n->infinity', + 'limit (1 + 1/n)^n as n->infinity', + 'discreteplot (4*n^2+5*n-7)^0.5 - 2*n, {n, 1, 50}', + 'Sum[1/n^2, {n, 1, infinity}]' + ] + }, + functions: { + title: 'Function Analysis', + syntax: 'plot ... or domain of ...', + examples: [ + 'plot (x-1)/(x^2-4)', + 'domain of 2*sqrt(1-x^2)', + 'range of x^2 - 1', + 'asymptotes of (x-1)/(x^2-4)' + ] + }, + limits: { + title: 'Limits & Continuity', + syntax: 'limit f(x) as x->c', + examples: [ + 'limit (27-x^3)/(x-3) as x->3', + 'limit x/ln(x) as x->0+', + 'limit (1+1/x)^x as x->infinity' + ] + }, + derivatives: { + title: 'Differentiation', + syntax: 'derivative of ... or d/dx ...', + examples: [ + 'derivative of (x^2-3)e^x', + 'd/dx x^2 * ln(x)', + 'second derivative of sin(x)' + ] + }, + analysis: { + title: 'Extrema & Monotonicity', + syntax: 'extrema of ... or maximize ...', + examples: [ + 'extrema of x^3 + 3x^2 - 9x - 2', + 'inflection points of x^3 + 3x^2 - 9x - 2', + 'stationary points of (x^2-3)e^x' + ] + }, + gaussian: { + title: 'Row Reduction', + syntax: 'row reduce ... or rref ...', + examples: [ + 'row reduce {{2, 1, -1}, {-3, -1, 2}, {-2, 1, 2}}', + 'rref {{2, 1, -1, 8}, {-3, -1, 2, -11}}' + ] + }, + eigen: { + title: 'Eigenvalues', + syntax: 'eigenvalues ...', + examples: [ + 'eigenvalues {{4, 1}, {2, 3}}', + 'eigenvectors {{4, 1}, {2, 3}}', + 'characteristic polynomial {{4, 1}, {2, 3}}' + ] + } + }; + + const data = tipsMap[context]; + + const handleCompute = (query: string) => { + const encoded = encodeURIComponent(query); + window.open(`https://www.wolframalpha.com/input?i=${encoded}`, '_blank'); + }; + + return ( +
+
+ + {/* Header */} +
+
+
+ +
+
+

+ WolframAlpha Integration + Pro Tools +

+

Computation Engine & Syntax Helper

+
+
+ +
+ +
+ + {/* Input Area */} +
+
+
+ +
+ setCustomQuery(e.target.value)} + placeholder="Enter mathematical query..." + className="w-full bg-slate-950 border border-slate-700 rounded-xl py-3 pl-10 pr-4 text-white focus:border-orange-500 outline-none font-mono text-sm" + onKeyDown={(e) => e.key === 'Enter' && handleCompute(customQuery)} + /> +
+ +

+ Opens in a new tab. Requires internet connection. +

+
+ + {/* Tips Area */} +
+

{data.title}

+

{data.syntax}

+ +
+ {data.examples.map((ex, i) => ( + + ))} +
+
+ +
+
+
+ ); +}; diff --git a/data/branding.test.ts b/data/branding.test.ts new file mode 100644 index 0000000..8bc8d0c --- /dev/null +++ b/data/branding.test.ts @@ -0,0 +1,30 @@ +import { describe, expect, it } from 'vitest'; +import { + BRAND_DESCRIPTION, + BRAND_FULL_NAME, + BRAND_NAME, + BRAND_SHORT_NAME, + BRAND_TAGLINE, +} from './branding'; + +describe('personal branding', () => { + it('uses the approved Inmerson identity', () => { + expect(BRAND_NAME).toBe('Inmerson'); + expect(BRAND_TAGLINE).toBe('Personal Math & Biotech Lab'); + expect(BRAND_FULL_NAME).toBe('Inmerson โ€ข Personal Math & Biotech Lab'); + expect(BRAND_SHORT_NAME).toBe('Inmerson Lab'); + }); + + it('contains no university attribution', () => { + const branding = [ + BRAND_NAME, + BRAND_TAGLINE, + BRAND_FULL_NAME, + BRAND_SHORT_NAME, + BRAND_DESCRIPTION, + ].join(' '); + + expect(branding).not.toContain('Warsaw University of Life Sciences'); + expect(branding).not.toContain('SGGW'); + }); +}); diff --git a/data/branding.ts b/data/branding.ts new file mode 100644 index 0000000..757d9d5 --- /dev/null +++ b/data/branding.ts @@ -0,0 +1,5 @@ +export const BRAND_NAME = 'Inmerson'; +export const BRAND_TAGLINE = 'Personal Math & Biotech Lab'; +export const BRAND_FULL_NAME = `${BRAND_NAME} โ€ข ${BRAND_TAGLINE}`; +export const BRAND_SHORT_NAME = 'Inmerson Lab'; +export const BRAND_DESCRIPTION = 'A personal interactive laboratory for mathematical modeling, biotechnology, observation and learning.'; diff --git a/data/examQuestions.ts b/data/examQuestions.ts new file mode 100644 index 0000000..ae26011 --- /dev/null +++ b/data/examQuestions.ts @@ -0,0 +1,807 @@ + +import { ModuleType } from '../types'; +import { Grid3X3, TrendingUp, Activity, Infinity as InfinityIcon, Divide, AreaChart, Layers } from 'lucide-react'; + +export interface Question { + id: number; + text: string; + options: { key: string; text: string }[]; + correct: string; + explanation?: string; + memoryKey?: string; + topic?: ModuleType; +} + +export const examTopics = [ + { id: ModuleType.MATRIX, label: "Matrix", icon: Grid3X3, color: "text-blue-400", border: "border-blue-500/30", bg: "bg-blue-500/10" }, + { id: ModuleType.SEQUENCES, label: "Sequences", icon: TrendingUp, color: "text-purple-400", border: "border-purple-500/30", bg: "bg-purple-500/10" }, + { id: ModuleType.FUNCTIONS, label: "Functions", icon: Activity, color: "text-pink-400", border: "border-pink-500/30", bg: "bg-pink-500/10" }, + { id: ModuleType.LIMITS, label: "Limits", icon: InfinityIcon, color: "text-orange-400", border: "border-orange-500/30", bg: "bg-orange-500/10" }, + { id: ModuleType.DERIVATIVES, label: "Derivatives", icon: Divide, color: "text-cyan-400", border: "border-cyan-500/30", bg: "bg-cyan-500/10" }, + { id: ModuleType.INTEGRALS, label: "Integrals", icon: AreaChart, color: "text-emerald-400", border: "border-emerald-500/30", bg: "bg-emerald-500/10" }, + { id: ModuleType.DIFF_EQ, label: "Differential Eq", icon: Layers, color: "text-rose-400", border: "border-rose-500/30", bg: "bg-rose-500/10" }, +]; + +export const questionBank: Partial> = { + [ModuleType.MATRIX]: [ + { + id: 1, + text: "What is a matrix?", + options: [ + { key: "A", text: "Any sequence of numbers" }, + { key: "B", text: "A rectangular array of numbers arranged in rows and columns" }, + { key: "C", text: "A graph of a function" } + ], + correct: "B", + explanation: "A matrix is formally defined as a rectangular array of numbers, symbols, or expressions, arranged in rows and columns.", + memoryKey: "Rectangular Array" + }, + { + id: 2, + text: "The dimension of matrix $A_{n \\times m}$ means:", + options: [ + { key: "A", text: "$n$ columns and $m$ rows" }, + { key: "B", text: "$n$ rows and $m$ columns" }, + { key: "C", text: "$m$ rows and $n$ columns" } + ], + correct: "B", + explanation: "Matrix dimensions are always stated as Rows $\\times$ Columns ($RC$).", + memoryKey: "Rows ร— Columns" + }, + { + id: 3, + text: "A square matrix is a matrix in which:", + options: [ + { key: "A", text: "$n \\neq m$" }, + { key: "B", text: "all elements are zeros" }, + { key: "C", text: "$n = m$" } + ], + correct: "C", + explanation: "A square matrix has the same number of rows and columns.", + memoryKey: "n = m" + }, + { + id: 4, + text: "The identity matrix is:", + options: [ + { key: "A", text: "A matrix with ones on the main diagonal and zeros elsewhere" }, + { key: "B", text: "A matrix with all elements equal to $1$" }, + { key: "C", text: "The zero matrix" } + ], + correct: "A", + explanation: "The identity matrix ($I$) acts like the number $1$ in matrix multiplication. It has $1$s on the diagonal and $0$s everywhere else.", + memoryKey: "Diagonal Ones" + }, + { + id: 5, + text: "The zero matrix is:", + options: [ + { key: "A", text: "A matrix whose determinant is zero" }, + { key: "B", text: "A matrix with all zeros" }, + { key: "C", text: "A diagonal matrix" } + ], + correct: "B", + explanation: "A zero matrix is a matrix where every single entry is zero.", + memoryKey: "All Zeros" + }, + { + id: 6, + text: "A diagonal matrix is:", + options: [ + { key: "A", text: "Non-zero elements only on the main diagonal" }, + { key: "B", text: "Ones on the diagonal" }, + { key: "C", text: "Zeros in the columns" } + ], + correct: "A", + explanation: "In a diagonal matrix, entries outside the main diagonal are all zero.", + memoryKey: "Only Diagonal" + }, + { + id: 7, + text: "To add two matrices, they must have:", + options: [ + { key: "A", text: "The same number of rows" }, + { key: "B", text: "The same number of columns" }, + { key: "C", text: "Identical dimensions" } + ], + correct: "C", + explanation: "Matrix addition is element-wise, so both matrices must have exactly the same number of rows and columns.", + memoryKey: "Exact Size Match" + }, + { + id: 8, + text: "The transposition of a matrix means:", + options: [ + { key: "A", text: "Reversing the order of columns" }, + { key: "B", text: "Swapping rows and columns" }, + { key: "C", text: "Squaring the matrix" } + ], + correct: "B", + explanation: "Transposition flips a matrix over its diagonal, switching the row and column indices of each element.", + memoryKey: "Swap Rows/Cols" + }, + { + id: 9, + text: "The symbol $A^T$ denotes:", + options: [ + { key: "A", text: "The inverse matrix" }, + { key: "B", text: "The transposed matrix" }, + { key: "C", text: "A square matrix" } + ], + correct: "B", + explanation: "The superscript $T$ stands for Transpose.", + memoryKey: "T for Transpose" + }, + { + id: 10, + text: "The product $A_{n \\times m} \\cdot B_{p \\times q}$ exists when:", + options: [ + { key: "A", text: "$n = q$" }, + { key: "B", text: "$m = p$" }, + { key: "C", text: "$n = p$" } + ], + correct: "B", + explanation: "For matrix multiplication to be defined, the number of columns in the first matrix must equal the number of rows in the second matrix.", + memoryKey: "Inner Dimensions Match" + }, + { + id: 11, + text: "The result of multiplying $A_{n \\times m} \\cdot B_{m \\times p}$ has dimensions:", + options: [ + { key: "A", text: "$n \\times m$" }, + { key: "B", text: "$m \\times p$" }, + { key: "C", text: "$n \\times p$" } + ], + correct: "C", + explanation: "The resulting matrix takes the number of rows from the first matrix and the number of columns from the second matrix.", + memoryKey: "Outer Dimensions" + }, + { + id: 12, + text: "The transposition rule of a matrix product is:", + options: [ + { key: "A", text: "$(AB)^T = A^T B^T$" }, + { key: "B", text: "$(AB)^T = B^T A^T$" }, + { key: "C", text: "$(AB)^T = AB$" } + ], + correct: "B", + explanation: "The transpose of a product is the product of the transposes in reverse order.", + memoryKey: "Reverse Order" + }, + { + id: 13, + text: "The distributive law of multiplication over addition is:", + options: [ + { key: "A", text: "$A(B + C) = AB + AC$" }, + { key: "B", text: "$A + (B + C) = AB + AC$" }, + { key: "C", text: "$A(B + C) = A + B + C$" } + ], + correct: "A", + explanation: "Matrix multiplication distributes over matrix addition.", + memoryKey: "Distributive Property" + }, + { + id: 14, + text: "A symmetric matrix satisfies:", + options: [ + { key: "A", text: "$A = -A^T$" }, + { key: "B", text: "$A = A^T$" }, + { key: "C", text: "$A^T = 0$" } + ], + correct: "B", + explanation: "A symmetric matrix is equal to its own transpose (mirrored across the main diagonal).", + memoryKey: "A = A^T" + }, + { + id: 15, + text: "In the matrix product, which law does not hold:", + options: [ + { key: "A", text: "Commutativity ($AB \\neq BA$)" }, + { key: "B", text: "Associativity" }, + { key: "C", text: "Distributivity" } + ], + correct: "A", + explanation: "In general, $AB \\neq BA$. Matrix multiplication is not commutative.", + memoryKey: "Not Commutative" + }, + { + id: 16, + text: "The determinant of a square matrix $A$ is denoted as:", + options: [ + { key: "A", text: "$\\det(A)$ or $|A|$" }, + { key: "B", text: "$\\text{rank}(A)$" }, + { key: "C", text: "$A^{-1}$" } + ], + correct: "A", + explanation: "The determinant is denoted by $\\det(A)$ or vertical bars $|A|$.", + memoryKey: "|A|" + }, + { + id: 17, + text: "A matrix is singular when:", + options: [ + { key: "A", text: "$\\det(A) \\neq 0$" }, + { key: "B", text: "$\\det(A) = 0$" }, + { key: "C", text: "$A^{-1}$ exists" } + ], + correct: "B", + explanation: "A singular matrix has a determinant of zero and is not invertible.", + memoryKey: "Det = 0" + }, + { + id: 18, + text: "For a 2ร—2 matrix $|A| = \\begin{vmatrix} a & b \\\\ c & d \\end{vmatrix}$, the determinant equals:", + options: [ + { key: "A", text: "$a+b+c+d$" }, + { key: "B", text: "$ad - bc$" }, + { key: "C", text: "$ab - cd$" } + ], + correct: "B", + explanation: "The determinant of a 2x2 matrix is the product of the main diagonal minus the product of the antidiagonal.", + memoryKey: "ad - bc" + }, + { + id: 19, + text: "The Sarrus rule applies to:", + options: [ + { key: "A", text: "2ร—2 matrix" }, + { key: "B", text: "3ร—3 matrix" }, + { key: "C", text: "Any matrix" } + ], + correct: "B", + explanation: "Sarrus' rule is a shortcut method specifically for calculating the determinant of a 3x3 matrix.", + memoryKey: "3x3 Only" + }, + { + id: 20, + text: "The Laplace expansion is used for:", + options: [ + { key: "A", text: "Raising a matrix to a power" }, + { key: "B", text: "Expanding a determinant by a row or column" }, + { key: "C", text: "Transposing a matrix" } + ], + correct: "B", + explanation: "Laplace expansion allows calculation of determinants of any size by expanding along a row or column.", + memoryKey: "Determinant Expansion" + }, + { + id: 21, + text: "Swapping two rows of a matrix:", + options: [ + { key: "A", text: "Determinant doesnโ€™t change sign" }, + { key: "B", text: "Determinant changes sign" }, + { key: "C", text: "Determinant becomes $0$" } + ], + correct: "B", + explanation: "Swapping any two rows (or columns) of a matrix negates the value of the determinant.", + memoryKey: "Sign Flip" + }, + { + id: 22, + text: "If a matrix has two identical rows, then:", + options: [ + { key: "A", text: "$\\det(A) = 1$" }, + { key: "B", text: "$\\det(A) = 0$" }, + { key: "C", text: "$\\det(A) = -1$" } + ], + correct: "B", + explanation: "If two rows are identical, the matrix is linearly dependent, so the determinant is zero.", + memoryKey: "Identical = Zero" + }, + { + id: 23, + text: "Adding a linear combination of other rows to one row:", + options: [ + { key: "A", text: "Determinant doesnโ€™t change" }, + { key: "B", text: "Determinant doubles" }, + { key: "C", text: "Determinant changes sign" } + ], + correct: "A", + explanation: "This row operation preserves the volume/determinant of the matrix.", + memoryKey: "Preserves Det" + }, + { + id: 24, + text: "For the inverse matrix, the following holds:", + options: [ + { key: "A", text: "$A^{-1} A = I$" }, + { key: "B", text: "$A^{-1} A = 0$" }, + { key: "C", text: "$A^{-1} A = A$" } + ], + correct: "A", + explanation: "Multiplying a matrix by its inverse results in the identity matrix.", + memoryKey: "Result is Identity" + }, + { + id: 25, + text: "The inverse matrix exists only when:", + options: [ + { key: "A", text: "$\\det(A) \\neq 0$" }, + { key: "B", text: "$\\det(A) = 0$" }, + { key: "C", text: "$A$ is rectangular" } + ], + correct: "A", + explanation: "A matrix is invertible (non-singular) if and only if its determinant is non-zero.", + memoryKey: "Non-Zero Det" + }, + { + id: 26, + text: "The property $\\det(A^T)$ equals:", + options: [ + { key: "A", text: "$-\\det(A)$" }, + { key: "B", text: "$\\det(A)$" }, + { key: "C", text: "$(\\det(A))^2$" } + ], + correct: "B", + explanation: "The determinant of a matrix is the same as the determinant of its transpose.", + memoryKey: "Transpose Same Det" + }, + { + id: 27, + text: "For a diagonal matrix $D = \\text{diag}(a, b, c)$, $\\det D$ equals:", + options: [ + { key: "A", text: "$a+b+c$" }, + { key: "B", text: "$abc$" }, + { key: "C", text: "$a^2+b^2+c^2$" } + ], + correct: "B", + explanation: "The determinant of a diagonal (or triangular) matrix is simply the product of the diagonal elements.", + memoryKey: "Product of Diagonal" + }, + { + id: 28, + text: "The product of determinants satisfies:", + options: [ + { key: "A", text: "$\\det(AB) = \\det(A) + \\det(B)$" }, + { key: "B", text: "$\\det(AB) = \\det(A) \\cdot \\det(B)$" }, + { key: "C", text: "$\\det(AB) = 0$" } + ], + correct: "B", + explanation: "The determinant of a product is the product of the determinants.", + memoryKey: "Product Rule" + }, + { + id: 29, + text: "If all elements of a row are multiplied by $k$, then:", + options: [ + { key: "A", text: "$\\det(A)$ is multiplied by $k$" }, + { key: "B", text: "$\\det(A)$ is divided by $k$" }, + { key: "C", text: "$\\det(A)$ doesnโ€™t change" } + ], + correct: "A", + explanation: "Scaling a single row by $k$ scales the entire determinant by $k$.", + memoryKey: "Row Scaling" + }, + { + id: 30, + text: "The Gaussโ€“Jordan method is used to:", + options: [ + { key: "A", text: "Finding determinant" }, + { key: "B", text: "Finding the inverse matrix" }, + { key: "C", text: "Transposing a matrix" } + ], + correct: "B", + explanation: "Gauss-Jordan elimination is a method to find the inverse of a matrix or solve systems of linear equations.", + memoryKey: "Inverse Finding" + }, + { + id: 31, + text: "The matrix form of a system of equations is:", + options: [ + { key: "A", text: "$A + X = B$" }, + { key: "B", text: "$A \\cdot X = B$" }, + { key: "C", text: "$X = A + B$" } + ], + correct: "B", + explanation: "Coefficient Matrix ($A$) times Variable Vector ($X$) equals Constant Vector ($B$).", + memoryKey: "AX = B" + }, + { + id: 32, + text: "The coefficient matrix of a system is denoted by:", + options: [ + { key: "A", text: "$B$" }, + { key: "B", text: "$X$" }, + { key: "C", text: "$A$" } + ], + correct: "C", + explanation: "$A$ is the coefficient matrix, $X$ is the variable matrix, $B$ is the constant matrix.", + memoryKey: "Matrix A" + }, + { + id: 33, + text: "A Cramerโ€™s system has a unique solution when:", + options: [ + { key: "A", text: "$\\det(A) = 0$" }, + { key: "B", text: "$\\det(A) \\neq 0$" }, + { key: "C", text: "$A$ is rectangular" } + ], + correct: "B", + explanation: "Cramer's rule requires dividing by the main determinant $W$ ($\\det A$), so it must be non-zero.", + memoryKey: "Non-Zero Main Det" + }, + { + id: 34, + text: "In Cramerโ€™s rule, $x_i = W_i / W$, where $W$ is:", + options: [ + { key: "A", text: "Determinant of inverse matrix" }, + { key: "B", text: "Determinant of coefficient matrix" }, + { key: "C", text: "Determinant of augmented matrix" } + ], + correct: "B", + explanation: "$W$ is the main determinant calculated from the coefficient matrix $A$.", + memoryKey: "Coeff Det" + }, + { + id: 35, + text: "If $W=0$ and all $W_i=0$, the system:", + options: [ + { key: "A", text: "Has no solutions" }, + { key: "B", text: "Has one solution" }, + { key: "C", text: "Has infinitely many solutions" } + ], + correct: "C", + explanation: "This is the indefinite case, usually implying dependent equations and infinite solutions.", + memoryKey: "Infinite Solutions" + }, + { + id: 36, + text: "If $W=0$ and at least one $W_i \\neq 0$, the system:", + options: [ + { key: "A", text: "Inconsistent" }, + { key: "B", text: "Has one solution" }, + { key: "C", text: "Has many solutions" } + ], + correct: "A", + explanation: "This is a contradiction ($0 \\cdot x = \\text{non-zero}$), meaning the system has no solution (inconsistent).", + memoryKey: "No Solution" + } + ], + [ModuleType.SEQUENCES]: [ + { + id: 101, + text: "A number sequence is:", + options: [ + { key: "A", text: "a real function of two variables" }, + { key: "B", text: "an assignment of one real number to each natural number" }, + { key: "C", text: "an arbitrary set of numbers" } + ], + correct: "B", + explanation: "Formally, a sequence is a function whose domain is the set of natural numbers $\\mathbb{N}$.", + memoryKey: "Function on N" + }, + { + id: 102, + text: "The general term of a sequence represents:", + options: [ + { key: "A", text: "the first term of the sequence" }, + { key: "B", text: "a formula describing all terms of the sequence" }, + { key: "C", text: "the sum of all terms" } + ], + correct: "B", + explanation: "The general term (usually denoted $a_n$) allows calculation of any term based on its position $n$.", + memoryKey: "Formula for an" + }, + { + id: 103, + text: "A sequence that has a finite limit is called:", + options: [ + { key: "A", text: "divergent" }, + { key: "B", text: "convergent" }, + { key: "C", text: "monotonic" } + ], + correct: "B", + explanation: "Convergence means the terms approach a specific, finite numeric value as $n$ goes to infinity.", + memoryKey: "Finite Limit" + }, + { + id: 104, + text: "The sequence $a_n = 1/n$ is:", + options: [ + { key: "A", text: "increasing" }, + { key: "B", text: "decreasing" }, + { key: "C", text: "constant" } + ], + correct: "B", + explanation: "As $n$ increases ($1, 2, 3...$), the value $1/n$ decreases ($1, 0.5, 0.33...$).", + memoryKey: "1/n Decreases" + }, + { + id: 105, + text: "The sequence $a_n = \\sqrt{n}$ is:", + options: [ + { key: "A", text: "convergent" }, + { key: "B", text: "divergent to infinity" }, + { key: "C", text: "divergent to zero" } + ], + correct: "B", + explanation: "As $n$ grows larger, the square root of $n$ also grows without bound.", + memoryKey: "Unbounded Growth" + }, + { + id: 106, + text: "The sequence $a_n = 3$ is:", + options: [ + { key: "A", text: "constant" }, + { key: "B", text: "increasing" }, + { key: "C", text: "decreasing" } + ], + correct: "A", + explanation: "Every term is the same ($3, 3, 3...$), so it is a constant sequence.", + memoryKey: "Always 3" + }, + { + id: 107, + text: "The sequence $a_n = (-1)^n$ is:", + options: [ + { key: "A", text: "convergent" }, + { key: "B", text: "divergent" }, + { key: "C", text: "increasing" } + ], + correct: "B", + explanation: "The sequence oscillates between $-1$ and $1$ forever, never settling on a single limit.", + memoryKey: "Oscillating" + }, + { + id: 108, + text: "An arithmetic sequence satisfies the condition:", + options: [ + { key: "A", text: "$a_{n+1} = a_n + r$" }, + { key: "B", text: "$a_{n+1} = a_n \\cdot q$" }, + { key: "C", text: "$a_{n+1} = a_n^2 + r$" } + ], + correct: "A", + explanation: "Arithmetic sequences grow by adding a constant difference ($r$) to each term.", + memoryKey: "Add r" + }, + { + id: 109, + text: "A geometric sequence satisfies the condition:", + options: [ + { key: "A", text: "$a_{n+1} = a_n + q$" }, + { key: "B", text: "$a_{n+1} = a_n \\cdot q$" }, + { key: "C", text: "$a_{n+1} = a_n / q$" } + ], + correct: "B", + explanation: "Geometric sequences grow by multiplying each term by a constant ratio ($q$).", + memoryKey: "Multiply q" + }, + { + id: 110, + text: "The Fibonacci sequence is defined by:", + options: [ + { key: "A", text: "$a_{n+1} = a_n + 1$" }, + { key: "B", text: "$a_{n+2} = a_{n+1} + a_n$" }, + { key: "C", text: "$a_{n+2} = a_{n+1} - a_n$" } + ], + correct: "B", + explanation: "Each term is the sum of the two preceding terms.", + memoryKey: "Sum Previous Two" + }, + { + id: 111, + text: "An increasing sequence is one where:", + options: [ + { key: "A", text: "$a_{n+1} > a_n$" }, + { key: "B", text: "$a_{n+1} = a_n$" }, + { key: "C", text: "$a_{n+1} < a_n$" } + ], + correct: "A", + explanation: "Each subsequent term is strictly greater than the one before it.", + memoryKey: "Next > Previous" + }, + { + id: 112, + text: "A decreasing sequence is one where:", + options: [ + { key: "A", text: "$a_{n+1} > a_n$" }, + { key: "B", text: "$a_{n+1} < a_n$" }, + { key: "C", text: "$a_{n+1} = a_n$" } + ], + correct: "B", + explanation: "Each subsequent term is strictly less than the one before it.", + memoryKey: "Next < Previous" + }, + { + id: 113, + text: "The number $e$ (Euler's number) is the limit of the sequence:", + options: [ + { key: "A", text: "$(1+1/n)^n$" }, + { key: "B", text: "$1/n$" }, + { key: "C", text: "$\\sqrt{n}$" } + ], + correct: "A", + explanation: "This is the classic definition of $e \\approx 2.718...$, arising from compound interest.", + memoryKey: "(1 + 1/n)^n" + }, + { + id: 114, + text: "The sequence $a_n = q^n$ converges to zero when:", + options: [ + { key: "A", text: "$|q| > 1$" }, + { key: "B", text: "$-1 < q < 1$" }, + { key: "C", text: "$q = 1$" } + ], + correct: "B", + explanation: "If the absolute value of the ratio is less than $1$, powers of $q$ shrink towards zero.", + memoryKey: "|q| < 1" + }, + { + id: 115, + text: "The theorem of three sequences states that:", + options: [ + { key: "A", text: "if $a_n \\le b_n \\le c_n$ and $\\lim a_n = \\lim c_n = g$, then $\\lim b_n = g$" }, + { key: "B", text: "if $a_n = b_n + c_n$, then $\\lim a_n = \\lim b_n \\cdot \\lim c_n$" }, + { key: "C", text: "if $a_n > b_n$, then $\\lim a_n > \\lim b_n$" } + ], + correct: "A", + explanation: "If a sequence is squeezed between two others converging to the same limit, it must also converge to that limit.", + memoryKey: "Sandwich Theorem" + } + ], + [ModuleType.FUNCTIONS]: [ + { id: 201, text: "The function $x^3$ has:", options: [{key:"A", text:"Two extrema"}, {key:"B", text:"A horizontal asymptote"}, {key:"C", text:"No extrema"}], correct: "C", explanation: "$f'(x) = 3x^2$ which is always $\\ge 0$. The function is strictly increasing, so no peaks/valleys.", memoryKey: "Monotonic Cubic" }, + { id: 202, text: "The domain of $\\ln(x)$ is:", options: [{key:"A", text:"$(-\\infty, \\infty)$"}, {key:"B", text:"$(0, \\infty)$"}, {key:"C", text:"$(1, \\infty)$"}], correct: "B", explanation: "Logarithms are only defined for positive numbers.", memoryKey: "Positive Inputs Only" }, + { id: 203, text: "In studying the behavior of a function, the first step is:", options: [{key:"A", text:"Integration"}, {key:"B", text:"The domain"}, {key:"C", text:"The derivative"}], correct: "B", explanation: "You must first determine where the function exists before analyzing it.", memoryKey: "Domain First" }, + { id: 204, text: "The extrema of $3x^2 - 9x - 2$ occur at:", options: [{key:"A", text:"$-1$"}, {key:"B", text:"$0$"}, {key:"C", text:"$3/2$"}], correct: "C", explanation: "Vertex of parabola $x = -b/2a = -(-9)/(2 \\cdot 3) = 9/6 = 3/2$.", memoryKey: "-b/2a" }, + { id: 205, text: "Where is $\\ln(x)$ defined?", options: [{key:"A", text:"All real numbers"}, {key:"B", text:"$(0, \\infty)$"}, {key:"C", text:"$[0, \\infty)$"}], correct: "B", explanation: "Duplicate concept check: Logarithm domain is strictly positive real numbers.", memoryKey: "x > 0" }, + { id: 206, text: "The range (values of the function) of $e^x$ is:", options: [{key:"A", text:"$(-\\infty, 0)$"}, {key:"B", text:"$(-\\infty, \\infty)$"}, {key:"C", text:"$(0, \\infty)$"}], correct: "C", explanation: "Exponential functions with positive bases are always positive.", memoryKey: "Always Positive" }, + { id: 207, text: "The function $1/x$ is undefined for:", options: [{key:"A", text:"$x = 1$"}, {key:"B", text:"$x < 0$"}, {key:"C", text:"$x = 0$"}], correct: "C", explanation: "Division by zero is undefined.", memoryKey: "Div by Zero" }, + { id: 208, text: "The range of $1/x^2$ is:", options: [{key:"A", text:"All real numbers"}, {key:"B", text:"Negative numbers"}, {key:"C", text:"$(0, \\infty)$"}], correct: "C", explanation: "Squares are positive, and 1 divided by a positive is positive. It never reaches 0.", memoryKey: "Positive Range" }, + { id: 209, text: "The parabola $y = x^2$ has:", options: [{key:"A", text:"Two maxima"}, {key:"B", text:"A horizontal asymptote"}, {key:"C", text:"A minimum at $x = 0$"}], correct: "C", explanation: "Basic standard parabola opens upwards with vertex at origin.", memoryKey: "Vertex Min" }, + { id: 210, text: "The domain of $1/(x^2 - 4)$ is:", options: [{key:"A", text:"All real numbers"}, {key:"B", text:"Only positive numbers"}, {key:"C", text:"All numbers except $-2$ and $2$"}], correct: "C", explanation: "Denominator $x^2-4$ cannot be zero. $x \\neq \\pm 2$.", memoryKey: "Exclude Roots" }, + { id: 211, text: "The function $e^x$ is:", options: [{key:"A", text:"A parabola"}, {key:"B", text:"Decreasing"}, {key:"C", text:"Increasing on its entire domain"}], correct: "C", explanation: "Derivative $e^x$ is always positive, so function is always increasing.", memoryKey: "Exp Growth" }, + { id: 212, text: "The function $\\ln x$:", options: [{key:"A", text:"Has a horizontal asymptote $y = 0$"}, {key:"B", text:"Is a parabola"}, {key:"C", text:"Has a vertical asymptote $x = 0$"}], correct: "C", explanation: "As $x$ approaches $0$ from the right, $\\ln(x)$ goes to $-\\infty$.", memoryKey: "Vert Asym at 0" }, + { id: 213, text: "The parabola $y = -x^2 + 4$ has the range:", options: [{key:"A", text:"$(4, \\infty)$"}, {key:"B", text:"All real numbers"}, {key:"C", text:"$(-\\infty, 4]$"}], correct: "C", explanation: "It opens downward with vertex at $y=4$, so all values are $\\le 4$.", memoryKey: "Max Value 4" } + ], + [ModuleType.LIMITS]: [ + { id: 301, text: "A vertical asymptote means:", options: [{key:"A", text:"The limit equals $0$"}, {key:"B", text:"The limit exists"}, {key:"C", text:"The limit tends to $\\infty$ or $-\\infty$"}], correct: "C", explanation: "Function grows without bound near the vertical line.", memoryKey: "Unbounded Growth" }, + { id: 302, text: "$\\lim_{x \\to \\infty} \\frac{1}{e^x+1}$ equals:", options: [{key:"A", text:"$1$"}, {key:"B", text:"$\\infty$"}, {key:"C", text:"$0$"}], correct: "C", explanation: "$e^\\infty$ is very large. $1/\\text{large}$ approaches $0$.", memoryKey: "1/Big = 0" }, + { id: 303, text: "L'Hospital's rule applies to:", options: [{key:"A", text:"All expressions"}, {key:"B", text:"Determined expressions"}, {key:"C", text:"$0/0$ and $\\infty/\\infty$ forms"}], correct: "C", explanation: "It is a technique specifically for indeterminate forms.", memoryKey: "Indeterminate Forms" }, + { id: 304, text: "A horizontal asymptote exists when:", options: [{key:"A", text:"$f'=0$"}, {key:"B", text:"The limit at infinity is finite"}, {key:"C", text:"The function is differentiable"}], correct: "B", explanation: "If $\\lim_{x \\to \\infty} f(x) = L$, then $y=L$ is the horizontal asymptote.", memoryKey: "Limit at Infinity" }, + { id: 305, text: "An asymptote at $x=1$ means:", options: [{key:"A", text:"The limit exists"}, {key:"B", text:"The function is continuous"}, {key:"C", text:"$|f(x)| \\to \\infty$"}], correct: "C", explanation: "Vertical asymptote definition.", memoryKey: "Explodes at x" }, + { id: 306, text: "$\\lim_{x \\to -\\infty} \\frac{x-1}{x^2-4}$ equals:", options: [{key:"A", text:"$1$"}, {key:"B", text:"$-1$"}, {key:"C", text:"$0$"}], correct: "C", explanation: "Degree of denominator (2) is greater than numerator (1), so limit is $0$.", memoryKey: "Bottom Heavy" }, + { id: 307, text: "The indeterminate form $[1^\\infty]$ is:", options: [{key:"A", text:"Determined"}, {key:"B", text:"$0$"}, {key:"C", text:"Indeterminate"}], correct: "C", explanation: "It requires special techniques (usually $e^{\\ln}$) to solve.", memoryKey: "Needs Work" }, + { id: 308, text: "For $\\frac{1}{e^x+1}$, the asymptote as $x \\to -\\infty$ is:", options: [{key:"A", text:"$y=0$"}, {key:"B", text:"$y=x$"}, {key:"C", text:"$y=1$"}], correct: "C", explanation: "$e^{-\\infty}$ is $0$. So $1/(0+1) = 1$.", memoryKey: "e^-inf -> 0" }, + { id: 309, text: "The horizontal asymptote of $\\frac{x-1}{x^2-4}$ is:", options: [{key:"A", text:"$y=1$"}, {key:"B", text:"$y=x$"}, {key:"C", text:"$y=0$"}], correct: "C", explanation: "Same logic as the limit at infinity question. $y=0$.", memoryKey: "y=0" }, + { id: 310, text: "A function is continuous at a point when:", options: [{key:"A", text:"It has no asymptotes"}, {key:"B", text:"It is differentiable"}, {key:"C", text:"The limit equals the function value"}], correct: "C", explanation: "Formal definition: $\\lim_{x \\to c} f(x) = f(c)$.", memoryKey: "No Holes/Jumps" }, + { id: 311, text: "A vertical asymptote means that:", options: [{key:"A", text:"The graph has a minimum or maximum"}, {key:"B", text:"The function is bounded"}, {key:"C", text:"The function grows unbounded near the point"}], correct: "C", explanation: "Rephrasing of vertical asymptote concept.", memoryKey: "Infinite Growth" }, + { id: 312, text: "L'Hospital's rule is used when the limit has the form:", options: [{key:"A", text:"Any form"}, {key:"B", text:"A real number"}, {key:"C", text:"$0/0$ or $\\infty/\\infty$"}], correct: "C", explanation: "Standard application condition.", memoryKey: "0/0" }, + { id: 313, text: "A horizontal asymptote exists when:", options: [{key:"A", text:"The derivative changes sign"}, {key:"B", text:"There is a square in the denominator"}, {key:"C", text:"The limit at $\\pm \\infty$ is finite"}], correct: "C", explanation: "Behavior at the far left or right ends of the graph.", memoryKey: "Finite End Behavior" } + ], + [ModuleType.DERIVATIVES]: [ + { id: 401, text: "The derivative of a constant function equals:", options: [{key:"A", text:"A positive constant"}, {key:"B", text:"The same constant"}, {key:"C", text:"$0$"}], correct: "C", explanation: "Constants do not change, so their rate of change is zero.", memoryKey: "Const -> 0" }, + { id: 402, text: "The derivative of $x^a$ (for $a \\in \\mathbb{R}$) equals:", options: [{key:"A", text:"$x^{a+1}$"}, {key:"B", text:"$ax^{a+1}$"}, {key:"C", text:"$ax^{a-1}$"}], correct: "C", explanation: "Power Rule.", memoryKey: "nx^{n-1}" }, + { id: 403, text: "The derivative of $e^x$ equals:", options: [{key:"A", text:"$xe^{x-1}$"}, {key:"B", text:"$1$"}, {key:"C", text:"$e^x$"}], correct: "C", explanation: "$e^x$ is the unique function that is its own derivative.", memoryKey: "Itself" }, + { id: 404, text: "The difference quotient tends to:", options: [{key:"A", text:"The integral"}, {key:"B", text:"The value of the function"}, {key:"C", text:"The derivative at the point"}], correct: "C", explanation: "Limit of the difference quotient is the definition of the derivative.", memoryKey: "Def of Deriv" }, + { id: 405, text: "A necessary condition for a local extremum is:", options: [{key:"A", text:"$f(x)=0$"}, {key:"B", text:"The function is increasing"}, {key:"C", text:"$f'(x)=0$"}], correct: "C", explanation: "Fermat's Theorem: tangent must be horizontal at peak/valley.", memoryKey: "Slope Zero" }, + { id: 406, text: "If $f'(x) > 0$, the function is:", options: [{key:"A", text:"Constant"}, {key:"B", text:"Decreasing"}, {key:"C", text:"Increasing"}], correct: "C", explanation: "Positive rate of change implies growth.", memoryKey: "Pos Slope = Up" }, + { id: 407, text: "If the derivative changes sign from $+$ to $-$, we have a:", options: [{key:"A", text:"Minimum"}, {key:"B", text:"Increase"}, {key:"C", text:"Maximum"}], correct: "C", explanation: "First Derivative Test: Going up then down means a peak.", memoryKey: "Peak Pattern" }, + { id: 408, text: "The derivative of a multiplication is:", options: [{key:"A", text:"$f'g' + fg$"}, {key:"B", text:"$f'g' - fg'$"}, {key:"C", text:"$f'g + fg'$"}], correct: "C", explanation: "Product Rule: $(fg)' = f'g + fg'$.", memoryKey: "Product Rule" }, + { id: 409, text: "The derivative of a quotient is:", options: [{key:"A", text:"$(f'g - fg')/g^2$"}, {key:"B", text:"$f'g'/g$"}, {key:"C", text:"$f'g + g'f$"}], correct: "A", explanation: "Quotient Rule: Low d-High minus High d-Low over Low Low.", memoryKey: "Quotient Rule" }, + { id: 410, text: "The derivative of the composition $f(g(x))$ is:", options: [{key:"A", text:"$f(x)g(x)$"}, {key:"B", text:"$f'g + fg'$"}, {key:"C", text:"$f'(g(x))g'(x)$"}], correct: "C", explanation: "Chain Rule.", memoryKey: "Chain Rule" }, + { id: 411, text: "$(\\ln x)' =$", options: [{key:"A", text:"$x \\ln x$"}, {key:"B", text:"$1$"}, {key:"C", text:"$1/x$"}], correct: "C", explanation: "Standard derivative of natural log.", memoryKey: "1/x" }, + { id: 412, text: "The multiplication rule contains:", options: [{key:"A", text:"Multiplication of derivatives"}, {key:"B", text:"Quotient rule"}, {key:"C", text:"The sum of two components"}], correct: "C", explanation: "Referring to the Product Rule structure: $uv' + vu'$ (sum of two parts).", memoryKey: "Sum of Parts" }, + { id: 413, text: "$(x^{-1})' =$", options: [{key:"A", text:"$-1/x^2$"}, {key:"B", text:"$1/x^2$"}, {key:"C", text:"$x$"}], correct: "A", explanation: "Power rule: $-1 \\cdot x^{-2} = -1/x^2$.", memoryKey: "-1/xยฒ" }, + { id: 414, text: "If $f'(x) < 0$, the function is:", options: [{key:"A", text:"Increasing"}, {key:"B", text:"Constant"}, {key:"C", text:"Decreasing"}], correct: "C", explanation: "Negative slope implies decline.", memoryKey: "Neg Slope = Down" }, + { id: 415, text: "$(\\sqrt{x})' =$", options: [{key:"A", text:"$x^{1/2}$"}, {key:"B", text:"$1/x$"}, {key:"C", text:"$1/(2\\sqrt{x})$"}], correct: "C", explanation: "Power rule on $x^{1/2} \\to (1/2)x^{-1/2}$.", memoryKey: "1/2root" }, + { id: 416, text: "If $f'=0$ on an interval, the function is:", options: [{key:"A", text:"Decreasing"}, {key:"B", text:"Increasing"}, {key:"C", text:"Constant"}], correct: "C", explanation: "Zero rate of change everywhere means no change.", memoryKey: "Flatline" }, + { id: 417, text: "The derivative of $x^{5/2}$ is:", options: [{key:"A", text:"$5x^{3/2}$"}, {key:"B", text:"$(5/2)x^{3/2}$"}, {key:"C", text:"$(2/5)x^{3/2}$"}], correct: "B", explanation: "Power rule.", memoryKey: "Power Rule" }, + { id: 418, text: "The growth of a function is determined by:", options: [{key:"A", text:"Integration"}, {key:"B", text:"The second derivative"}, {key:"C", text:"The sign of the derivative"}], correct: "C", explanation: "First derivative indicates increasing/decreasing intervals.", memoryKey: "Sign of f'" }, + { id: 419, text: "Extrema occur where:", options: [{key:"A", text:"$f'>0$"}, {key:"B", text:"The function is increasing"}, {key:"C", text:"$f'=0$"}], correct: "C", explanation: "Critical points.", memoryKey: "f'=0" }, + { id: 420, text: "The derivative describes:", options: [{key:"A", text:"The area under the graph"}, {key:"B", text:"The limit of a function"}, {key:"C", text:"The rate of change"}], correct: "C", explanation: "Physical interpretation of derivative.", memoryKey: "Rate of Change" }, + { id: 421, text: "A positive derivative means:", options: [{key:"A", text:"The function is constant"}, {key:"B", text:"The function reaches a maximum"}, {key:"C", text:"The function is increasing"}], correct: "C", explanation: "Slope is up.", memoryKey: "Going Up" }, + { id: 422, text: "A function is increasing when:", options: [{key:"A", text:"Its derivative is constant"}, {key:"B", text:"Its values are bounded"}, {key:"C", text:"Larger inputs correspond to larger outputs"}], correct: "C", explanation: "Algebraic definition of increasing function.", memoryKey: "x1 f1 ln" }, + { id: 611, text: "The constant of integration:", options: [{key:"A", text:"is always positive"}, {key:"B", text:"can be any real number"}, {key:"C", text:"depends on the function"}], correct: "B", explanation: "It shifts the function vertically.", memoryKey: "Any Real" }, + { id: 612, text: "If two functions have the same derivative on an interval, they:", options: [{key:"A", text:"are identical"}, {key:"B", text:"differ by a constant"}, {key:"C", text:"have the same zero"}], correct: "B", explanation: "Geometric interpretation of the constant $C$.", memoryKey: "Vertical Shift" }, + { id: 613, text: "$\\int(f(x)+g(x))dx$ equals:", options: [{key:"A", text:"$\\int f(x)dx \\cdot \\int g(x)dx$"}, {key:"B", text:"$\\int f(x)dx + \\int g(x)dx$"}, {key:"C", text:"$\\int f(x)g(x)dx$"}], correct: "B", explanation: "Linearity of integration.", memoryKey: "Sum Rule" }, + { id: 614, text: "$\\int kf(x)dx$ equals:", options: [{key:"A", text:"$k \\int f(x)dx$"}, {key:"B", text:"$\\int f(kx)dx$"}, {key:"C", text:"$\\int f(x)dk$"}], correct: "A", explanation: "Constant multiple rule.", memoryKey: "Pull out k" }, + { id: 615, text: "$\\int(x-2)dx$ equals:", options: [{key:"A", text:"$-x-1+C$"}, {key:"B", text:"$x^2/2 - 2x + C$"}, {key:"C", text:"$x^2/2 - 2 + C$"}], correct: "B", explanation: "Power rule term by term.", memoryKey: "Term by Term" }, + { id: 616, text: "$\\int x dx$ equals:", options: [{key:"A", text:"$2x+C$"}, {key:"B", text:"$x^2/2 + C$"}, {key:"C", text:"$x^{1/2} + C$"}], correct: "B", explanation: "Power rule $n=1$.", memoryKey: "x^2/2" }, + { id: 617, text: "Integration by substitution consists of:", options: [{key:"A", text:"decomposing sum"}, {key:"B", text:"replacing variable"}, {key:"C", text:"differentiating"}], correct: "B", explanation: "$u$-substitution technique.", memoryKey: "u-sub" }, + { id: 618, text: "In substitution, the auxiliary variable:", options: [{key:"A", text:"must be linear"}, {key:"B", text:"simplifies the integral"}, {key:"C", text:"replaces constant"}], correct: "B", explanation: "Goal is to transform into a known form.", memoryKey: "Simplifies" }, + { id: 619, text: "$\\int 1/(x-3)dx$ gives:", options: [{key:"A", text:"$\\ln|x-3|$"}, {key:"B", text:"$\\ln|x-3|+C$"}, {key:"C", text:"$-\\ln|x-3|+C$"}], correct: "B", explanation: "Log rule with linear inner function.", memoryKey: "ln(linear)" }, + { id: 620, text: "Integration by parts is based on:", options: [{key:"A", text:"$(uv)'=u'v'$"}, {key:"B", text:"$d(uv)=udv+vdu$"}, {key:"C", text:"$(u+v)'=u'v$"}], correct: "B", explanation: "Derived from product rule.", memoryKey: "Product Rule Reverse" }, + { id: 621, text: "In integration by parts, choose $u$ as:", options: [{key:"A", text:"easy to integrate"}, {key:"B", text:"easy to differentiate"}, {key:"C", text:"arbitrarily"}], correct: "B", explanation: "LIATE rule helps select $u$ to simplify derivative.", memoryKey: "LIATE" }, + { id: 622, text: "In integration by parts, choose $dv$ as:", options: [{key:"A", text:"easy to integrate"}, {key:"B", text:"easy to differentiate"}, {key:"C", text:"arbitrarily"}], correct: "A", explanation: "You must be able to find $v$ from $dv$.", memoryKey: "Easy Integral" }, + { id: 623, text: "An indefinite integral describes:", options: [{key:"A", text:"area"}, {key:"B", text:"family of antiderivatives"}, {key:"C", text:"number"}], correct: "B", explanation: "Set of all possible primitives.", memoryKey: "Family" }, + { id: 624, text: "Integration is inverse to:", options: [{key:"A", text:"differentiation"}, {key:"B", text:"limits"}, {key:"C", text:"algebra"}], correct: "A", explanation: "Fundamental Theorem of Calculus.", memoryKey: "Inverse Deriv" }, + { id: 625, text: "$\\int dx$ equals:", options: [{key:"A", text:"$1$"}, {key:"B", text:"$x+C$"}, {key:"C", text:"$\\ln x$"}], correct: "B", explanation: "Integral of $1$ is $x$.", memoryKey: "x+C" }, + { id: 626, text: "If $F'(x)=0$, then:", options: [{key:"A", text:"$F(x)=x$"}, {key:"B", text:"$F(x)=C$"}, {key:"C", text:"$F(x)=0$"}], correct: "B", explanation: "Only constants have zero derivative.", memoryKey: "Constant Slope 0" }, + { id: 627, text: "$\\int x^0 dx$ equals:", options: [{key:"A", text:"$0$"}, {key:"B", text:"$\\ln x$"}, {key:"C", text:"$x+C$"}], correct: "C", explanation: "$x^0 = 1$.", memoryKey: "Int 1" }, + { id: 628, text: "$\\int(x^2-2x)dx$ equals:", options: [{key:"A", text:"$x^3/3 - x^2 + C$"}, {key:"B", text:"$2x - 2 + C$"}, {key:"C", text:"$x^2/2 - 2x + C$"}], correct: "A", explanation: "Power rule applied to polynomial.", memoryKey: "Poly Rule" }, + { id: 629, text: "The integral of a negative function:", options: [{key:"A", text:"is always positive"}, {key:"B", text:"is negative (definite)"}, {key:"C", text:"positive"}], correct: "B", explanation: "Area below x-axis is signed negative.", memoryKey: "Negative Area" }, + { id: 630, text: "Integral of a polynomial is:", options: [{key:"A", text:"polynomial of higher degree"}, {key:"B", text:"logarithm"}, {key:"C", text:"exponential"}], correct: "A", explanation: "Degree increases by 1.", memoryKey: "Degree +1" }, + { id: 631, text: "Integration by parts is used when:", options: [{key:"A", text:"product of functions"}, {key:"B", text:"rational function"}, {key:"C", text:"even function"}], correct: "A", explanation: "Reverse product rule.", memoryKey: "Product" }, + { id: 632, text: "Indefinite integral does not contain:", options: [{key:"A", text:"limits of integration"}, {key:"B", text:"constants"}, {key:"C", text:"functions"}], correct: "A", explanation: "It has no bounds $[a,b]$.", memoryKey: "No Limits" }, + { id: 633, text: "Constant of integration results from:", options: [{key:"A", text:"differentiation"}, {key:"B", text:"non-uniqueness"}, {key:"C", text:"error"}], correct: "B", explanation: "Many functions share the same derivative.", memoryKey: "Non-Unique" }, + { id: 634, text: "Indefinite integral is used for:", options: [{key:"A", text:"determining limits"}, {key:"B", text:"solving diff equations"}, {key:"C", text:"monotonicity"}], correct: "B", explanation: "Finding the function $y$ from $y'$.", memoryKey: "Solve DE" }, + { id: 635, text: "A definite integral is:", options: [{key:"A", text:"always positive"}, {key:"B", text:"dependent on $C$"}, {key:"C", text:"a number (dependent on limits)"}], correct: "C", explanation: "It evaluates to a scalar value.", memoryKey: "Scalar Value" }, + { id: 636, text: "If $F'(x)=f(x)$, then $\\int_a^b f(x)dx$ equals:", options: [{key:"A", text:"$F(a)-F(b)$"}, {key:"B", text:"$F(b)-F(a)$"}, {key:"C", text:"$C$"}], correct: "B", explanation: "Fundamental Theorem of Calculus.", memoryKey: "F(b)-F(a)" }, + { id: 637, text: "Area under positive function:", options: [{key:"A", text:"definite integral"}, {key:"B", text:"indefinite integral"}, {key:"C", text:"no interpretation"}], correct: "A", explanation: "Geometric application.", memoryKey: "Area" }, + { id: 638, text: "If $f(x) \\le 0$, the area is:", options: [{key:"A", text:"integral"}, {key:"B", text:"-integral"}, {key:"C", text:"undefined"}], correct: "B", explanation: "Area must be positive, integral is negative.", memoryKey: "-Integral" }, + { id: 639, text: "Definite integral does not depend on:", options: [{key:"A", text:"function"}, {key:"B", text:"limits"}, {key:"C", text:"constant of integration"}], correct: "C", explanation: "$C$s cancel out in subtraction.", memoryKey: "No C" }, + { id: 640, text: "Additivity property:", options: [{key:"A", text:"function"}, {key:"B", text:"interval of integration"}, {key:"C", text:"constant"}], correct: "B", explanation: "Integral $a$ to $c$ = $a$ to $b$ + $b$ to $c$.", memoryKey: "Split Interval" }, + { id: 641, text: "$\\int_a^a f(x)dx$ equals:", options: [{key:"A", text:"$1$"}, {key:"B", text:"$f(a)$"}, {key:"C", text:"$0$"}], correct: "C", explanation: "Zero width interval.", memoryKey: "Zero Width" }, + { id: 642, text: "Integral of sum:", options: [{key:"A", text:"sum of integrals"}, {key:"B", text:"product"}, {key:"C", text:"difference"}], correct: "A", explanation: "Linearity.", memoryKey: "Sum is Sum" }, + { id: 643, text: "Constant factor in definite integral:", options: [{key:"A", text:"stays inside"}, {key:"B", text:"factored out"}, {key:"C", text:"disappears"}], correct: "B", explanation: "Linearity.", memoryKey: "Factor Out" }, + { id: 644, text: "Improper integral occurs when:", options: [{key:"A", text:"continuous"}, {key:"B", text:"unbounded interval/function"}, {key:"C", text:"limits equal"}], correct: "B", explanation: "Infinity in bounds or asymptote.", memoryKey: "Unbounded" }, + { id: 645, text: "$\\int_a^\\infty$ defined as:", options: [{key:"A", text:"infinite sum"}, {key:"B", text:"limit of definite integrals"}, {key:"C", text:"indefinite"}], correct: "B", explanation: "$\\lim_{b\\to\\infty}$ of integral $a$ to $b$.", memoryKey: "Limit Def" }, + { id: 646, text: "If limit doesn't exist:", options: [{key:"A", text:"zero"}, {key:"B", text:"convergent"}, {key:"C", text:"divergent"}], correct: "C", explanation: "No finite value.", memoryKey: "Divergent" }, + { id: 647, text: "$\\int_{-\\infty}^0 e^x dx$ is:", options: [{key:"A", text:"divergent"}, {key:"B", text:"$0$"}, {key:"C", text:"convergent ($1$)"}], correct: "C", explanation: "$e^0 - e^{-\\infty} = 1 - 0 = 1$.", memoryKey: "Convergent 1" }, + { id: 648, text: "Integral over $(-\\infty, \\infty)$ is sum of:", options: [{key:"A", text:"two improper integrals"}, {key:"B", text:"one definite"}, {key:"C", text:"indefinite"}], correct: "A", explanation: "Split at arbitrary point (usually $0$).", memoryKey: "Split Inf" }, + { id: 649, text: "Improper integral may be:", options: [{key:"A", text:"only positive"}, {key:"B", text:"only negative"}, {key:"C", text:"convergent or divergent"}], correct: "C", explanation: "Result type.", memoryKey: "Conv/Div" }, + { id: 650, text: "Integral of PDF over $(-\\infty, \\infty)$:", options: [{key:"A", text:"$0$"}, {key:"B", text:"$1$"}, {key:"C", text:"undefined"}], correct: "B", explanation: "Total probability is $1$.", memoryKey: "Prob = 1" }, + { id: 651, text: "Normal distribution PDF:", options: [{key:"A", text:"polynomial"}, {key:"B", text:"contains exponential"}, {key:"C", text:"linear"}], correct: "B", explanation: "Gaussian bell curve form.", memoryKey: "Exp Form" }, + { id: 652, text: "Parameter $\\mu$ denotes:", options: [{key:"A", text:"variance"}, {key:"B", text:"mean"}, {key:"C", text:"std dev"}], correct: "B", explanation: "Center of distribution.", memoryKey: "Mean" }, + { id: 653, text: "Parameter $\\sigma$ denotes:", options: [{key:"A", text:"mean"}, {key:"B", text:"variance"}, {key:"C", text:"standard deviation"}], correct: "C", explanation: "Spread of distribution.", memoryKey: "Std Dev" }, + { id: 654, text: "CDF is defined as:", options: [{key:"A", text:"derivative of density"}, {key:"B", text:"integral of density"}, {key:"C", text:"limit"}], correct: "B", explanation: "Cumulative area.", memoryKey: "Integral PDF" }, + { id: 655, text: "Area under density function:", options: [{key:"A", text: "Greater than $1$"}, {key:"B", text: "equals $1$"}, {key:"C", text: "negative"}], correct: "B", explanation: "Total probability.", memoryKey: "Area 1" }, + { id: 656, text: "Definite integral used for:", options: [{key:"A", text:"antiderivatives"}, {key:"B", text:"areas/numerical values"}, {key:"C", text:"algebra"}], correct: "B", explanation: "Geometric application.", memoryKey: "Numerical" }, + { id: 657, text: "If $f(x)$ non-negative:", options: [{key:"A", text:"integral negative"}, {key:"B", text:"integral non-negative"}, {key:"C", text:"zero"}], correct: "B", explanation: "Positive height = positive area.", memoryKey: "Non-neg" }, + { id: 658, text: "$\\int_0^1 1/\\sqrt{x} dx$ is:", options: [{key:"A", text:"divergent"}, {key:"B", text:"convergent"}, {key:"C", text:"$0$"}], correct: "B", explanation: "Equals $2$.", memoryKey: "Conv 2" }, + { id: 659, text: "If improper integral convergent:", options: [{key:"A", text:"limit exists"}, {key:"B", text:"function continuous"}, {key:"C", text:"interval closed"}], correct: "A", explanation: "Definition of convergence.", memoryKey: "Limit Exists" }, + { id: 660, text: "Geometric interpretation:", options: [{key:"A", text:"length"}, {key:"B", text:"area under graph"}, {key:"C", text:"volume"}], correct: "B", explanation: "Standard definition.", memoryKey: "Area" }, + { id: 661, text: "Orientation of interval:", options: [{key:"A", text:"no effect"}, {key:"B", text:"only continuous"}, {key:"C", text:"swapping limits changes sign"}], correct: "C", explanation: "Integral $a$ to $b$ = - Integral $b$ to $a$.", memoryKey: "Sign Flip" }, + { id: 685, text: "Notation for indefinite integral:", options: [{key:"A", text:"$\\int f(x)dx$"}, {key:"B", text:"$\\lim f(x)$"}, {key:"C", text:"$f'(x)$"}], correct: "A", explanation: "Integral symbol.", memoryKey: "Notation" }, + { id: 686, text: "Integral property:", options: [{key:"A", text:"$\\int(f+g) = \\int f + \\int g$"}, {key:"B", text:"$\\int(f+g) = \\int f \\cdot \\int g$"}, {key:"C", text:"$\\int kf = \\int f$"}], correct: "A", explanation: "Linearity.", memoryKey: "Sum Prop" }, + { id: 687, text: "Substitution method:", options: [{key:"A", text:"replace variable"}, {key:"B", text:"differentiate"}, {key:"C", text:"limit"}], correct: "A", explanation: "Change of variables.", memoryKey: "Replace Var" }, + { id: 688, text: "Substitution for $\\int 1/(2x-3) dx$:", options: [{key:"A", text:"$t=2x-3$"}, {key:"B", text:"$t=x^2$"}, {key:"C", text:"$t=\\ln x$"}], correct: "A", explanation: "Inner linear function.", memoryKey: "Linear Sub" }, + { id: 689, text: "Integration by parts formula:", options: [{key:"A", text:"$\\int udv = uv - \\int vdu$"}, {key:"B", text:"$\\int udv = du-v$"}, {key:"C", text:"$\\int udv=u+v$"}], correct: "A", explanation: "Correct formula.", memoryKey: "uv-int vdu" }, + { id: 690, text: "Definite integral is:", options: [{key:"A", text:"difference of antiderivatives"}, {key:"B", text:"indefinite"}, {key:"C", text:"derivative"}], correct: "A", explanation: "FTC Part 2.", memoryKey: "Diff Anti" }, + { id: 691, text: "True statement:", options: [{key:"A", text:"DE contains derivatives"}, {key:"B", text:"DE no independent"}, {key:"C", text:"DE linear"}], correct: "A", explanation: "Definition of Differential Equation.", memoryKey: "Contains Deriv" }, + { id: 692, text: "Compute $\\int x^2 dx$:", options: [{key:"A", text:"$x^3/3 + C$"}, {key:"B", text:"$2x + C$"}, {key:"C", text:"$x^2 + C$"}], correct: "A", explanation: "Power rule.", memoryKey: "Power" }, + { id: 693, text: "Compute $\\int \\sqrt{x} dx$:", options: [{key:"A", text:"$\\frac{2}{3} x^{3/2} + C$"}, {key:"B", text:"$2\\sqrt{x} + C$"}, {key:"C", text:"$x^{1/2} + C$"}], correct: "A", explanation: "$x^{1/2} \\to x^{3/2} / (3/2)$.", memoryKey: "2/3 x^3/2" }, + { id: 694, text: "Compute $\\int 1/x^2 dx$:", options: [{key:"A", text:"$-1/x + C$"}, {key:"B", text:"$\\ln x + C$"}, {key:"C", text:"$x^{-1} + C$"}], correct: "A", explanation: "$x^{-2} \\to x^{-1} / -1$.", memoryKey: "-1/x" }, + { id: 695, text: "Compute $\\int 3x^2 dx$:", options: [{key:"A", text:"$x^3 + C$"}, {key:"B", text:"$3x^3 + C$"}, {key:"C", text:"$x^2 + C$"}], correct: "A", explanation: "$3 \\cdot x^3/3$.", memoryKey: "x^3" }, + { id: 696, text: "Compute $\\int 5 dx$:", options: [{key:"A", text:"$5x + C$"}, {key:"B", text:"$x + C$"}, {key:"C", text:"$0$"}], correct: "A", explanation: "Constant rule.", memoryKey: "5x" }, + { id: 697, text: "$\\int_0^1 x dx$:", options: [{key:"A", text:"$1/2$"}, {key:"B", text:"$1$"}, {key:"C", text:"$0$"}], correct: "A", explanation: "$1/2 - 0$.", memoryKey: "1/2" }, + { id: 698, text: "$\\int_0^1 1 dx$:", options: [{key:"A", text:"$1$"}, {key:"B", text:"$2$"}, {key:"C", text:"$3$"}], correct: "A", explanation: "$1 - 0$.", memoryKey: "1" }, + { id: 699, text: "$\\int k f(x) dx$:", options: [{key:"A", text:"$k \\int f(x)dx$"}, {key:"B", text:"$\\int f(x)dx + k$"}, {key:"C", text:"$\\int f(kx)dx$"}], correct: "A", explanation: "Constant multiple.", memoryKey: "Const Mult" } + ], + [ModuleType.DIFF_EQ]: [ + { id: 801, text: "A first-order differential equation is:", options: [{key:"A", text:"algebraic"}, {key:"B", text:"equation containing first derivative"}, {key:"C", text:"quadratic"}], correct: "B", explanation: "Order 1 means max derivative is $y'$.", memoryKey: "1st Deriv" }, + { id: 802, text: "The general solution of a DE is:", options: [{key:"A", text:"a number"}, {key:"B", text:"a family of functions (parameter)"}, {key:"C", text:"no constants"}], correct: "B", explanation: "Contains arbitrary constants ($C$).", memoryKey: "Family" }, + { id: 803, text: "A particular solution is obtained:", options: [{key:"A", text:"by differentiation"}, {key:"B", text:"by applying initial conditions"}, {key:"C", text:"definite int"}], correct: "B", explanation: "Fixing $C$ to a specific value.", memoryKey: "Init Cond" }, + { id: 804, text: "The equation $y'=2y$ is:", options: [{key:"A", text:"linear"}, {key:"B", text:"separable"}, {key:"C", text:"second-order"}], correct: "B", explanation: "Separable ($dy/y = 2dx$). (Also linear, but separable is primary method logic here)", memoryKey: "Separable" }, + { id: 805, text: "Method of separation of variables:", options: [{key:"A", text:"changing variable"}, {key:"B", text:"separating $y$ and $x$"}, {key:"C", text:"parts"}], correct: "B", explanation: "Moving terms to opposite sides.", memoryKey: "Separate" }, + { id: 806, text: "Equation $dN/dt = -\\lambda N$ describes:", options: [{key:"A", text:"pop growth"}, {key:"B", text:"radioactive decay"}, {key:"C", text:"logistic"}], correct: "B", explanation: "Negative rate proportional to amount.", memoryKey: "Decay" }, + { id: 807, text: "Constant $\\lambda$ in decay denotes:", options: [{key:"A", text:"decay probability per time"}, {key:"B", text:"half-life"}, {key:"C", text:"initial"}], correct: "A", explanation: "Rate constant.", memoryKey: "Prob/Time" }, + { id: 808, text: "Malthus model describes:", options: [{key:"A", text:"limited growth"}, {key:"B", text:"exponential growth"}, {key:"C", text:"decline"}], correct: "B", explanation: "Unbounded geometric growth.", memoryKey: "Exp Growth" }, + { id: 809, text: "Equation $dN/dt = (r-s)N$ describes:", options: [{key:"A", text:"growth without mortality"}, {key:"B", text:"growth including mortality"}, {key:"C", text:"logistic"}], correct: "B", explanation: "Net rate = birth - death.", memoryKey: "Net Rate" }, + { id: 810, text: "Verhulst model accounts for:", options: [{key:"A", text:"reproduction only"}, {key:"B", text:"limited resources"}, {key:"C", text:"mortality only"}], correct: "B", explanation: "Carrying capacity (Logistic).", memoryKey: "Limited" }, + { id: 811, text: "Newton's law of cooling describes:", options: [{key:"A", text:"temp increase"}, {key:"B", text:"temp difference"}, {key:"C", text:"const"}], correct: "B", explanation: "Rate proportional to difference.", memoryKey: "Temp Diff" }, + { id: 812, text: "DEs are used for:", options: [{key:"A", text:"geometry"}, {key:"B", text:"modeling dynamic phenomena"}, {key:"C", text:"algebra"}], correct: "B", explanation: "Change over time.", memoryKey: "Dynamic" }, + { id: 813, text: "Gompertz model describes:", options: [{key:"A", text:"linear"}, {key:"B", text:"epidemic/tumor (decreasing rate)"}, {key:"C", text:"decay"}], correct: "B", explanation: "Sigmoidal but asymmetric.", memoryKey: "Tumor" }, + { id: 814, text: "Ordinary differential equation:", options: [{key:"A", text:"many indep vars"}, {key:"B", text:"one independent variable"}, {key:"C", text:"no deriv"}], correct: "B", explanation: "vs Partial DE.", memoryKey: "One Indep" }, + { id: 815, text: "DE without initial conditions has:", options: [{key:"A", text:"one solution"}, {key:"B", text:"many solutions"}, {key:"C", text:"no solution"}], correct: "B", explanation: "Infinitely many (General Solution).", memoryKey: "Many" }, + { id: 816, text: "Initial conditions used to:", options: [{key:"A", text:"check continuity"}, {key:"B", text:"determine constant"}, {key:"C", text:"diff"}], correct: "B", explanation: "Find $C$.", memoryKey: "Find C" }, + { id: 817, text: "A particular solution is:", options: [{key:"A", text:"family"}, {key:"B", text:"single function"}, {key:"C", text:"limit"}], correct: "B", explanation: "Unique curve.", memoryKey: "Single Func" }, + { id: 818, text: "$y'=f(x)$ is solved by:", options: [{key:"A", text:"differentiation"}, {key:"B", text:"indefinite integration"}, {key:"C", text:"definite"}], correct: "B", explanation: "Direct integration.", memoryKey: "Integrate" }, + { id: 819, text: "Separable equation form:", options: [{key:"A", text:"$y'=f(x,y)$"}, {key:"B", text:"$g(y)dy=f(x)dx$"}, {key:"C", text:"linear"}], correct: "B", explanation: "Variables separated.", memoryKey: "Split" }, + { id: 820, text: "Differential equations describe:", options: [{key:"A", text:"motion only"}, {key:"B", text:"changes"}, {key:"C", text:"linear functions"}], correct: "B", explanation: "Rates of change.", memoryKey: "Change" }, + { id: 821, text: "First-order DE contains:", options: [{key:"A", text:"only $y$"}, {key:"B", text:"only $x$"}, {key:"C", text:"derivative $y'$"}], correct: "C", explanation: "Must have $y'$.", memoryKey: "y'" }, + { id: 822, text: "Applications include:", options: [{key:"A", text:"math only"}, {key:"B", text:"physics, biology, medicine"}, {key:"C", text:"stats"}], correct: "B", explanation: "Broad utility.", memoryKey: "Science" }, + { id: 823, text: "Two functions with same derivative:", options: [{key:"A", text:"differ by constant"}, {key:"B", text:"identical"}, {key:"C", text:"diff sign"}], correct: "A", explanation: "Parallel curves.", memoryKey: "Constant Diff" }, + { id: 824, text: "General solution of $y'=ky$:", options: [{key:"A", text:"$y=Ce^{kx}$"}, {key:"B", text:"$y=kx+C$"}, {key:"C", text:"polynomial"}], correct: "A", explanation: "Exponential growth/decay.", memoryKey: "Ce^kx" }, + { id: 825, text: "If $y'=-\\lambda y$, solution describes:", options: [{key:"A", text:"exp decay"}, {key:"B", text:"linear"}, {key:"C", text:"oscillation"}], correct: "A", explanation: "Negative exponent.", memoryKey: "Decay" }, + { id: 826, text: "Law of radioactive decay:", options: [{key:"A", text:"$dN/dt = -\\lambda N$"}, {key:"B", text:"linear"}, {key:"C", text:"positive"}], correct: "A", explanation: "Differential form.", memoryKey: "Eq" }, + { id: 827, text: "Condition $N(T_{1/2}) = N_0/2$:", options: [{key:"A", text:"half-life"}, {key:"B", text:"total time"}, {key:"C", text:"initial"}], correct: "A", explanation: "Definition of half-life.", memoryKey: "Half-Life" }, + { id: 828, text: "Solutions of $y'=ay$:", options: [{key:"A", text:"exponential"}, {key:"B", text:"polynomial"}, {key:"C", text:"trig"}], correct: "A", explanation: "$y = Ce^{ax}$.", memoryKey: "Exp" }, + { id: 829, text: "DE always contains:", options: [{key:"A", text:"derivative"}, {key:"B", text:"integral"}, {key:"C", text:"graph"}], correct: "A", explanation: "By definition.", memoryKey: "Deriv" }, + { id: 830, text: "Parameter $C$ denotes:", options: [{key:"A", text:"constant of integration"}, {key:"B", text:"variable"}, {key:"C", text:"derivative"}], correct: "A", explanation: "Arbitrary constant.", memoryKey: "Const" }, + { id: 831, text: "Set of general solutions forms:", options: [{key:"A", text:"family of curves"}, {key:"B", text:"line"}, {key:"C", text:"point"}], correct: "A", explanation: "Infinite curves.", memoryKey: "Family" } + ] +}; diff --git a/data/learningCatalog.test.ts b/data/learningCatalog.test.ts new file mode 100644 index 0000000..1922c01 --- /dev/null +++ b/data/learningCatalog.test.ts @@ -0,0 +1,55 @@ +import { describe, expect, it } from 'vitest'; +import { ModuleType, ViewMode } from '../types'; +import { + getDefaultViewForModule, + getLearningDestination, + searchLearningDestinations, +} from './learningCatalog'; + +describe('learning catalog', () => { + it('finds a destination by its exact mathematical topic', () => { + const [result] = searchLearningDestinations('gaussian'); + + expect(result).toMatchObject({ + module: ModuleType.MATRIX, + view: ViewMode.GAUSSIAN, + title: 'Gaussian Elimination', + }); + }); + + it('finds biotechnology applications through semantic keywords', () => { + const [result] = searchLearningDestinations('population growth'); + + expect(result).toMatchObject({ + module: ModuleType.DIFF_EQ, + view: ViewMode.POPULATION_MODELS, + }); + }); + + it('normalizes case and surrounding whitespace', () => { + const [result] = searchLearningDestinations(' TaYLoR '); + + expect(result?.view).toBe(ViewMode.TAYLOR); + }); + + it('returns no results for an empty query', () => { + expect(searchLearningDestinations(' ')).toEqual([]); + }); + + it('provides a stable default view for each learning module', () => { + expect(getDefaultViewForModule(ModuleType.INTEGRALS)).toBe(ViewMode.INTEGRAL_BASICS); + expect(getDefaultViewForModule(ModuleType.EXAMS)).toBe(ViewMode.FULL_EXAM); + }); + + it('resolves a persisted destination back to catalog metadata', () => { + expect( + getLearningDestination({ + module: ModuleType.DERIVATIVES, + view: ViewMode.FUNCTION_ANALYSIS, + }), + ).toMatchObject({ + moduleTitle: 'Derivatives', + title: 'Curve Analysis', + }); + }); +}); diff --git a/data/learningCatalog.ts b/data/learningCatalog.ts new file mode 100644 index 0000000..7f1e573 --- /dev/null +++ b/data/learningCatalog.ts @@ -0,0 +1,133 @@ +import { ModuleType, ViewMode } from '../types'; + +export interface LearningDestinationRef { + module: ModuleType; + view: ViewMode; +} + +export interface LearningDestination extends LearningDestinationRef { + moduleTitle: string; + title: string; + description: string; + keywords: string[]; +} + +const MODULE_DEFAULT_VIEWS: Record = { + [ModuleType.HOME]: ViewMode.BASICS, + [ModuleType.MATRIX]: ViewMode.BASICS, + [ModuleType.SEQUENCES]: ViewMode.SEQUENCES, + [ModuleType.FUNCTIONS]: ViewMode.FUNCTIONS, + [ModuleType.LIMITS]: ViewMode.FUNCTIONS, + [ModuleType.DERIVATIVES]: ViewMode.DERIVATIVE_RULES, + [ModuleType.INTEGRALS]: ViewMode.INTEGRAL_BASICS, + [ModuleType.DIFF_EQ]: ViewMode.DIFF_BASICS, + [ModuleType.EXAMS]: ViewMode.FULL_EXAM, +}; + +export const LEARNING_DESTINATIONS: LearningDestination[] = [ + { module: ModuleType.MATRIX, view: ViewMode.BASICS, moduleTitle: 'Matrix', title: 'Matrix Definitions', description: 'Rows, columns, dimensions and matrix notation.', keywords: ['linear algebra', 'matrix basics', 'dimensions'] }, + { module: ModuleType.MATRIX, view: ViewMode.OPERATIONS, moduleTitle: 'Matrix', title: 'Matrix Operations', description: 'Addition, subtraction, scalar and matrix multiplication.', keywords: ['multiply matrices', 'matrix arithmetic'] }, + { module: ModuleType.MATRIX, view: ViewMode.GAUSSIAN, moduleTitle: 'Matrix', title: 'Gaussian Elimination', description: 'Solve linear systems through row reduction.', keywords: ['row echelon', 'rref', 'linear systems'] }, + { module: ModuleType.MATRIX, view: ViewMode.SYSTEMS, moduleTitle: 'Matrix', title: "Cramer's Systems", description: 'Solve systems with determinants and Cramerโ€™s rule.', keywords: ['cramer rule', 'simultaneous equations'] }, + { module: ModuleType.MATRIX, view: ViewMode.INVERSE, moduleTitle: 'Matrix', title: 'Inverse Matrix', description: 'Understand and calculate matrix inverses.', keywords: ['inverse', 'identity matrix'] }, + { module: ModuleType.MATRIX, view: ViewMode.DETERMINANT, moduleTitle: 'Matrix', title: 'Determinant', description: 'Interpret determinants geometrically and algebraically.', keywords: ['det', 'area scale', 'volume scale'] }, + { module: ModuleType.MATRIX, view: ViewMode.EIGENVALUES, moduleTitle: 'Matrix', title: 'Eigenvalues', description: 'Explore eigenvalues, eigenvectors and invariant directions.', keywords: ['eigenvector', 'spectral theory'] }, + { module: ModuleType.MATRIX, view: ViewMode.VECTOR_OPS_3D, moduleTitle: 'Matrix', title: 'Vector Lab (3D)', description: 'Visualize vector operations in three-dimensional space.', keywords: ['vector', 'dot product', 'cross product', '3d'] }, + { module: ModuleType.MATRIX, view: ViewMode.VECTOR_3D, moduleTitle: 'Matrix', title: 'Matrix Warper (3D)', description: 'Observe linear transformations of space.', keywords: ['linear transformation', 'basis', '3d'] }, + { module: ModuleType.SEQUENCES, view: ViewMode.SEQUENCES, moduleTitle: 'Sequences', title: 'Limits & Monotonicity', description: 'Study convergence, bounds and monotone sequences.', keywords: ['sequence limit', 'convergence', 'monotonicity'] }, + { module: ModuleType.SEQUENCES, view: ViewMode.COBWEB, moduleTitle: 'Sequences', title: 'Chaos & Cobweb', description: 'Observe iterative maps and sensitive dynamics.', keywords: ['chaos', 'iteration', 'logistic map'] }, + { module: ModuleType.SEQUENCES, view: ViewMode.SEQUENCES_3D, moduleTitle: 'Sequences', title: '3D Helix Visualizer', description: 'Represent indexed values as spatial trajectories.', keywords: ['helix', 'sequence visualization', '3d'] }, + { module: ModuleType.SEQUENCES, view: ViewMode.SERIES, moduleTitle: 'Sequences', title: 'Partial Sums', description: 'Build infinite series from their finite partial sums.', keywords: ['series', 'summation', 'convergence tests'] }, + { module: ModuleType.FUNCTIONS, view: ViewMode.FUNCTIONS, moduleTitle: 'Functions', title: 'Graphing & Domain', description: 'Inspect graphs, domains, ranges and key properties.', keywords: ['function graph', 'domain', 'range'] }, + { module: ModuleType.FUNCTIONS, view: ViewMode.TRANSFORMATIONS, moduleTitle: 'Functions', title: 'Transformations', description: 'Translate, scale and reflect mathematical functions.', keywords: ['shift', 'reflection', 'stretch'] }, + { module: ModuleType.FUNCTIONS, view: ViewMode.FUNCTIONS_3D, moduleTitle: 'Functions', title: 'Surface Plotter (3D)', description: 'Explore functions of two variables as surfaces.', keywords: ['multivariable function', 'surface', '3d'] }, + { module: ModuleType.FUNCTIONS, view: ViewMode.NEWTON, moduleTitle: 'Functions', title: 'Newton Optimization', description: 'Use tangent-based iteration to locate roots and optima.', keywords: ['newton method', 'root finding', 'optimization'] }, + { module: ModuleType.LIMITS, view: ViewMode.FUNCTIONS, moduleTitle: 'Limits', title: 'Limit Analysis', description: 'Explore one-sided limits and asymptotic behavior.', keywords: ['limit', 'asymptote', 'approach'] }, + { module: ModuleType.LIMITS, view: ViewMode.CONTINUITY, moduleTitle: 'Limits', title: 'Continuity & Holes', description: 'Distinguish removable, jump and infinite discontinuities.', keywords: ['continuity', 'discontinuity', 'holes'] }, + { module: ModuleType.LIMITS, view: ViewMode.LIMITS_3D, moduleTitle: 'Limits', title: '3D Limits', description: 'Approach multivariable limits from different paths.', keywords: ['multivariable limit', 'path dependence', '3d'] }, + { module: ModuleType.DERIVATIVES, view: ViewMode.DERIVATIVE_RULES, moduleTitle: 'Derivatives', title: 'Rules & Formulas', description: 'Apply product, quotient and chain rules.', keywords: ['differentiate', 'chain rule', 'product rule'] }, + { module: ModuleType.DERIVATIVES, view: ViewMode.FUNCTION_ANALYSIS, moduleTitle: 'Derivatives', title: 'Curve Analysis', description: 'Find extrema, monotonicity and concavity intervals.', keywords: ['critical points', 'maximum', 'minimum', 'concavity'] }, + { module: ModuleType.DERIVATIVES, view: ViewMode.DERIVATIVES_3D, moduleTitle: 'Derivatives', title: 'Tangent Planes (3D)', description: 'Visualize partial derivatives and tangent planes.', keywords: ['partial derivative', 'gradient', 'tangent plane'] }, + { module: ModuleType.DERIVATIVES, view: ViewMode.TAYLOR, moduleTitle: 'Derivatives', title: 'Taylor Series', description: 'Approximate functions with local polynomial models.', keywords: ['taylor', 'maclaurin', 'polynomial approximation'] }, + { module: ModuleType.INTEGRALS, view: ViewMode.INTEGRAL_BASICS, moduleTitle: 'Integrals', title: 'Integral Concept', description: 'Connect antiderivatives, accumulation and constants.', keywords: ['antiderivative', 'indefinite integral', 'constant'] }, + { module: ModuleType.INTEGRALS, view: ViewMode.INTEGRAL_RULES, moduleTitle: 'Integrals', title: 'Rules & Formulas', description: 'Apply core integration rules and substitutions.', keywords: ['integration rules', 'substitution'] }, + { module: ModuleType.INTEGRALS, view: ViewMode.AREA_UNDER_CURVE, moduleTitle: 'Integrals', title: 'Area & FTC', description: 'Relate definite integrals to area and the fundamental theorem.', keywords: ['fundamental theorem of calculus', 'definite integral', 'area'] }, + { module: ModuleType.INTEGRALS, view: ViewMode.INTEGRALS_3D, moduleTitle: 'Integrals', title: 'Solid of Revolution', description: 'Generate and inspect volumes formed by rotation.', keywords: ['volume', 'washer method', 'disk method', '3d'] }, + { module: ModuleType.DIFF_EQ, view: ViewMode.DIFF_BASICS, moduleTitle: 'Differential Equations', title: 'Solutions & Curves', description: 'Interpret differential equations and solution families.', keywords: ['ode', 'solution curve', 'initial condition'] }, + { module: ModuleType.DIFF_EQ, view: ViewMode.POPULATION_MODELS, moduleTitle: 'Differential Equations', title: 'Population Models', description: 'Compare exponential and logistic population growth.', keywords: ['population growth', 'malthus', 'verhulst', 'logistic growth', 'biotechnology'] }, + { module: ModuleType.DIFF_EQ, view: ViewMode.RADIOACTIVE_DECAY, moduleTitle: 'Differential Equations', title: 'Radioactive Decay', description: 'Model exponential decay and half-life.', keywords: ['half life', 'decay', 'isotope'] }, + { module: ModuleType.DIFF_EQ, view: ViewMode.DIFF_EQ_3D, moduleTitle: 'Differential Equations', title: 'Lorenz Attractor (3D)', description: 'Observe a classical nonlinear dynamical system.', keywords: ['lorenz', 'chaos theory', 'dynamical systems', '3d'] }, + { module: ModuleType.EXAMS, view: ViewMode.FULL_EXAM, moduleTitle: 'Exams', title: 'Final Exam', description: 'Complete a comprehensive mixed-topic assessment.', keywords: ['assessment', 'practice exam', 'final'] }, + { module: ModuleType.EXAMS, view: ViewMode.EXAM_ANALYSIS, moduleTitle: 'Exams', title: 'Performance Analytics', description: 'Review strengths, weaknesses and question outcomes.', keywords: ['results', 'analytics', 'score', 'progress'] }, +]; + +const normalizeSearchText = (value: string): string => + value + .normalize('NFD') + .replace(/[\u0300-\u036f]/g, '') + .toLowerCase() + .trim(); + +export const getDefaultViewForModule = (module: ModuleType): ViewMode => + MODULE_DEFAULT_VIEWS[module]; + +export const getLearningDestination = ( + destination: LearningDestinationRef | null, +): LearningDestination | null => { + if (!destination) { + return null; + } + + return ( + LEARNING_DESTINATIONS.find( + (item) => item.module === destination.module && item.view === destination.view, + ) ?? null + ); +}; + +export const searchLearningDestinations = ( + query: string, + limit = 6, +): LearningDestination[] => { + const normalizedQuery = normalizeSearchText(query); + if (!normalizedQuery) { + return []; + } + + const queryTokens = normalizedQuery.split(/\s+/); + + return LEARNING_DESTINATIONS + .map((destination, index) => { + const normalizedTitle = normalizeSearchText(destination.title); + const normalizedModule = normalizeSearchText(destination.moduleTitle); + const normalizedKeywords = normalizeSearchText(destination.keywords.join(' ')); + const searchableText = normalizeSearchText( + `${destination.title} ${destination.moduleTitle} ${destination.description} ${destination.keywords.join(' ')}`, + ); + + if (!queryTokens.every((token) => searchableText.includes(token))) { + return null; + } + + let score = 5; + if (normalizedTitle === normalizedQuery) score = 0; + else if (normalizedTitle.startsWith(normalizedQuery)) score = 1; + else if (normalizedTitle.includes(normalizedQuery)) score = 2; + else if (normalizedKeywords.includes(normalizedQuery)) score = 3; + else if (normalizedModule.includes(normalizedQuery)) score = 4; + + return { destination, score, index }; + }) + .filter( + ( + result, + ): result is { + destination: LearningDestination; + score: number; + index: number; + } => result !== null, + ) + .sort((a, b) => a.score - b.score || a.index - b.index) + .slice(0, limit) + .map(({ destination }) => destination); +}; diff --git a/docs/superpowers/plans/2026-08-06-inmerson-personal-branding.md b/docs/superpowers/plans/2026-08-06-inmerson-personal-branding.md new file mode 100644 index 0000000..ac303b8 --- /dev/null +++ b/docs/superpowers/plans/2026-08-06-inmerson-personal-branding.md @@ -0,0 +1,164 @@ +# Inmerson Personal Branding Implementation Plan + +> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking. + +**Goal:** Replace university attribution with a consistent personal brand: `Inmerson โ€ข Personal Math & Biotech Lab`. + +**Architecture:** Add a small typed branding module for React-facing copy, then update static platform metadata with the same approved strings. Preserve mathematical and biotechnology learning terminology while removing external institutional ownership. + +**Tech Stack:** React 19, TypeScript, Vitest, Vite, PWA manifest, Capacitor, Android resources, Express. + +## Global Constraints + +- Primary name is exactly `Inmerson`. +- Signature is exactly `Personal Math & Biotech Lab`. +- Formal name is exactly `Inmerson โ€ข Personal Math & Biotech Lab`. +- Compact name is exactly `Inmerson Lab`. +- Do not retain `Warsaw University of Life Sciences` or `SGGW` in current user-facing source or metadata. +- Do not change package IDs, URLs, mathematical content, or application behavior. + +--- + +### Task 1: Establish tested branding constants + +**Files:** +- Create: `data/branding.test.ts` +- Create: `data/branding.ts` + +**Interfaces:** +- Produces: `BRAND_NAME`, `BRAND_TAGLINE`, `BRAND_FULL_NAME`, `BRAND_SHORT_NAME`, and `BRAND_DESCRIPTION` string constants. + +- [ ] **Step 1: Write the failing test** + +```ts +import { describe, expect, it } from 'vitest'; +import { + BRAND_DESCRIPTION, + BRAND_FULL_NAME, + BRAND_NAME, + BRAND_SHORT_NAME, + BRAND_TAGLINE, +} from './branding'; + +describe('personal branding', () => { + it('uses the approved Inmerson identity', () => { + expect(BRAND_NAME).toBe('Inmerson'); + expect(BRAND_TAGLINE).toBe('Personal Math & Biotech Lab'); + expect(BRAND_FULL_NAME).toBe('Inmerson โ€ข Personal Math & Biotech Lab'); + expect(BRAND_SHORT_NAME).toBe('Inmerson Lab'); + }); + + it('contains no university attribution', () => { + const branding = [BRAND_NAME, BRAND_TAGLINE, BRAND_FULL_NAME, BRAND_SHORT_NAME, BRAND_DESCRIPTION].join(' '); + expect(branding).not.toContain('Warsaw University of Life Sciences'); + expect(branding).not.toContain('SGGW'); + }); +}); +``` + +- [ ] **Step 2: Run verification and confirm RED** + +Run: `npm run verify` + +Expected: TypeScript fails because `./branding` does not exist. + +- [ ] **Step 3: Add the minimal branding module** + +```ts +export const BRAND_NAME = 'Inmerson'; +export const BRAND_TAGLINE = 'Personal Math & Biotech Lab'; +export const BRAND_FULL_NAME = `${BRAND_NAME} โ€ข ${BRAND_TAGLINE}`; +export const BRAND_SHORT_NAME = 'Inmerson Lab'; +export const BRAND_DESCRIPTION = 'A personal interactive laboratory for mathematical modeling, biotechnology, observation and learning.'; +``` + +- [ ] **Step 4: Run tests and confirm GREEN** + +Run: `npm run verify` + +Expected: branding tests and all existing checks pass. + +### Task 2: Apply branding to React surfaces + +**Files:** +- Modify: `views/DashboardView.tsx` +- Modify: `components/Sidebar.tsx` +- Modify: `views/AIChatView.tsx` + +**Interfaces:** +- Consumes: constants exported by `data/branding.ts`. + +- [ ] **Step 1: Update the dashboard hero** + +Import `BRAND_NAME`, `BRAND_TAGLINE`, and `BRAND_DESCRIPTION`. Render `BRAND_NAME` as the hero heading, `BRAND_TAGLINE` as a prominent signature, and `BRAND_DESCRIPTION` as supporting copy. + +- [ ] **Step 2: Update compact navigation identity** + +Import `BRAND_SHORT_NAME` in `Sidebar.tsx` and replace the `Math Biotech` heading with it. + +- [ ] **Step 3: Update AI introduction** + +Import `BRAND_SHORT_NAME` in `AIChatView.tsx` and introduce the assistant as `${BRAND_SHORT_NAME} Assistant`. + +- [ ] **Step 4: Run verification** + +Run: `npm run verify` + +Expected: Typecheck, all tests, and production build succeed. + +### Task 3: Apply branding to platform and repository metadata + +**Files:** +- Modify: `index.html` +- Modify: `manifest.json` +- Modify: `metadata.json` +- Modify: `capacitor.config.ts` +- Modify: `android/app/src/main/res/values/strings.xml` +- Modify: `README.md` +- Modify: `server/src/index.ts` + +**Interfaces:** +- Static surfaces use the exact approved strings from Global Constraints. + +- [ ] **Step 1: Update browser and PWA identity** + +Set the HTML title and manifest full name to `Inmerson โ€ข Personal Math & Biotech Lab`; set manifest short name to `Inmerson Lab`. + +- [ ] **Step 2: Update application metadata** + +Set metadata name to the formal brand and description to the personal-lab description. + +- [ ] **Step 3: Update installed app labels** + +Set Capacitor and Android visible app names to `Inmerson Lab`. Preserve `com.inmersion.mathbiotech` identifiers. + +- [ ] **Step 4: Update public project and API identity** + +Change the README heading to the formal brand. Rename API display messages to `Inmerson Lab API` without changing endpoints or behavior. + +- [ ] **Step 5: Run full verification** + +Run: `npm run verify` + +Expected: 0 type errors, 0 failed tests, successful Vite production build. + +### Task 4: Verify removal and deploy + +**Files:** +- Generated by workflow: `site/**` + +- [ ] **Step 1: Search current source** + +Search for `Warsaw University of Life Sciences` and `SGGW` in the branch. Expected: no current source matches except historical documentation or git history; no user-facing current file matches. + +- [ ] **Step 2: Open and merge the pull request** + +Create a PR describing the personal brand, red-green test evidence, and metadata updates. Merge only after CI succeeds. + +- [ ] **Step 3: Verify main and Pages workflows** + +Confirm main CI succeeds and the Pages publishing workflow commits fresh `site/` output. + +- [ ] **Step 4: Verify live deployment** + +Confirm the latest Pages build status is `built`, and `site/index.html` references the newly generated assets and formal browser title. diff --git a/docs/superpowers/plans/2026-08-06-reliable-pages-and-matrix-input.md b/docs/superpowers/plans/2026-08-06-reliable-pages-and-matrix-input.md new file mode 100644 index 0000000..8278c20 --- /dev/null +++ b/docs/superpowers/plans/2026-08-06-reliable-pages-and-matrix-input.md @@ -0,0 +1,70 @@ +# Reliable Pages and Matrix Input Implementation Plan + +> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking. + +**Goal:** Restore reproducible GitHub Pages delivery and ship the tested MatrixInput render optimization. + +**Architecture:** Reuse the synchronized dependency lock and tested MatrixInput change from the reviewed optimization branch. Standardize CI and publishing on Node.js 22, build a Pages-specific bundle into `site/`, and require the shared `npm run verify` gate before generated files are committed. + +**Tech Stack:** React 19, TypeScript, Vite 6, Vitest 4, npm lockfile v3, GitHub Actions, GitHub Pages. + +## Global Constraints + +- Preserve the repository's existing `main`-root GitHub Pages source setting. +- Publish the browser-ready application at `/Math-Biotech-Project/site/`. +- Use Node.js 22 in CI and publishing. +- Use `npm ci --include=optional` for reproducible native dependency installation. +- Do not publish when typecheck, tests or production builds fail. +- Keep matrix editing behavior compatible with blur and Enter workflows. + +--- + +### Task 1: Synchronize dependencies + +**Files:** +- Modify: `package-lock.json` + +- [x] Replace the stale lock file with the reviewed synchronized lock from `copilot/review-and-merge-prs-6-7`. +- [x] Run `npm ci --include=optional` in GitHub Actions and confirm installation succeeds. + +### Task 2: Add MatrixInput regression coverage and implementation + +**Files:** +- Modify: `components/MatrixInput.tsx` +- Create: `components/MatrixInput.test.tsx` + +- [x] Add tests proving parent `onChange` is deferred until blur and committed once. +- [x] Add test coverage for Enter-key completion. +- [x] Replace per-keystroke parent updates with a local edit buffer and explicit commit. +- [ ] Confirm the tests pass in the pull request workflow. + +### Task 3: Correct client typecheck boundaries + +**Files:** +- Modify: `tsconfig.json` + +- [x] Exclude `server/`, which is an independently managed Node project with its own package and TypeScript configuration. +- [ ] Confirm client typechecking succeeds without hiding client source files. + +### Task 4: Publish the static application + +**Files:** +- Modify: `package.json` +- Modify: `.github/workflows/deploy.yml` + +- [x] Add `build:pages` with base `/Math-Biotech-Project/site/` and output directory `site/`. +- [x] Verify before creating the Pages-specific bundle. +- [x] Upload the generated site as a workflow artifact. +- [x] Commit changed `site/` output to `main` with the GitHub Actions bot. +- [ ] Merge and confirm the publishing workflow succeeds. + +### Task 5: Production verification + +**Files:** +- No source changes expected beyond a deployment trigger marker. + +- [ ] Trigger a Pages rebuild after generated `site/` files exist. +- [ ] Open `https://inmerson.github.io/Math-Biotech-Project/site/`. +- [ ] Confirm the dashboard renders. +- [ ] Confirm matrix inputs accept decimal typing and commit on blur or Enter. +- [ ] Confirm the latest CI and publishing runs are successful. diff --git a/docs/superpowers/specs/2026-08-06-inmerson-personal-branding-design.md b/docs/superpowers/specs/2026-08-06-inmerson-personal-branding-design.md new file mode 100644 index 0000000..161d64e --- /dev/null +++ b/docs/superpowers/specs/2026-08-06-inmerson-personal-branding-design.md @@ -0,0 +1,38 @@ +# Inmerson Personal Branding Design + +## Goal + +Remove all Warsaw University of Life Sciences and SGGW attribution from the product, and present the application as a personal learning laboratory owned by Inmerson. + +## Brand system + +- Primary name: `Inmerson` +- Descriptive signature: `Personal Math & Biotech Lab` +- Full formal name: `Inmerson โ€ข Personal Math & Biotech Lab` +- Compact product reference: `Inmerson Lab` + +`Math Biotech` may remain as a description of the learning domain, but it must not be presented as an institution or external owner. + +## User interface + +The dashboard hero will lead with `Inmerson`, followed by the signature `Personal Math & Biotech Lab`. The supporting sentence will describe the application as a personal interactive laboratory for mathematical modeling and biotechnology, without mentioning any university. + +The sidebar will use `Inmerson Lab` as the compact identity so the narrow layout remains readable. The AI assistant will introduce itself as the Inmerson Lab assistant. + +## Platform metadata + +The browser title, PWA manifest, application metadata, Capacitor app name, and Android labels will use the personal brand. The repository README and backend API identity will also describe the project as Inmerson Lab so public and installed surfaces remain consistent. + +## Architecture + +A small `data/branding.ts` module will hold shared React-facing brand constants. Components will import these constants instead of duplicating names. Static files that cannot import TypeScript will use the exact same approved strings directly. + +## Testing + +A branding unit test will establish the approved name hierarchy and assert that exported branding contains neither `Warsaw University of Life Sciences` nor `SGGW`. Existing typecheck, unit tests, and production build must remain green. + +## Success criteria + +1. No current source or generated user-facing metadata attributes the project to Warsaw University of Life Sciences or SGGW. +2. Dashboard, sidebar, AI greeting, browser/PWA/mobile metadata, README, and API identity consistently use the Inmerson personal brand. +3. The branding regression test, full test suite, typecheck, production build, and GitHub Pages deployment succeed. diff --git a/docs/superpowers/specs/2026-08-06-math-cs-design.md b/docs/superpowers/specs/2026-08-06-math-cs-design.md new file mode 100644 index 0000000..5ed7397 --- /dev/null +++ b/docs/superpowers/specs/2026-08-06-math-cs-design.md @@ -0,0 +1,430 @@ +# Inmerson Math-CS Design Specification + +**Date:** 2026-08-06 +**Source repository:** `Inmerson/Math-Biotech-Project` +**Target repository:** `Inmerson/Math-CS` +**Target visibility:** Public + +## 1. Product Definition + +Inmerson Math-CS is a separate computer-science mathematics learning application derived from the existing Math-Biotech application. It preserves the working React/Vite/TypeScript/Capacitor foundation and reusable interaction patterns while replacing the biotechnology-specific identity, content, examples, assets, and navigation. + +The product supports two PJATK Computer Science mathematics courses: + +1. **Math I โ€” Mathematical Analysis** (`Analiza matematyczna`) +2. **Math II โ€” Linear Algebra & Geometry** (`Algebra liniowa i geometria`) + +Discrete Mathematics is explicitly outside the first release. + +### Product name + +**Inmerson Math-CS** + +### Tagline + +**Interactive Mathematics for Computer Science** + +## 2. Goals + +- Create a separate public repository named `Inmerson/Math-CS`. +- Copy the source application at a pinned source commit so its working behavior remains reproducible. +- Remove all biotechnology-specific language, examples, routes, icons, illustrations, and metadata from the target repository. +- Organize the application around the two approved PJATK courses. +- Improve the visual design using a calm, premium computational-notebook direction. +- Preserve useful existing capabilities such as quizzes, progress tracking, summaries, exams, and the assistant experience where technically reusable. +- Make every mathematics topic connect naturally to computer-science applications without adding a separate computer-science curriculum. +- Maintain desktop and mobile support. + +## 3. Non-Goals + +The first release will not include: + +- Discrete Mathematics +- Statistical Data Analysis +- Biotechnology or biology content +- A general-purpose computer-science course +- User accounts, cloud synchronization, payments, or social features +- A full computer algebra system +- Arbitrary AI-generated curriculum content +- Unrelated refactoring of the application foundation + +## 4. Visual Direction + +The approved direction is **Computational Notebook**. + +### Design principles + +- Academic, focused, and professional rather than game-like +- Dark navy, graphite, warm off-white, and restrained accent colors +- High contrast and strong mathematical typography +- Subtle coordinate grids and geometric patterns +- Clear separation of theory, formulas, visualizations, code connections, and exercises +- Minimal animation used only to explain state changes or mathematical transformations +- No biotechnology imagery and no excessive neon styling + +### Responsive layout + +**Desktop** + +- Persistent left navigation +- Central lesson or lab workspace +- Optional right contextual panel for formulas, hints, and progress + +**Mobile** + +- Compact header +- Bottom navigation for primary destinations +- Context panels presented as drawers or stacked sections +- Touch-friendly controls and readable mathematical notation + +## 5. Information Architecture + +Primary navigation: + +- Dashboard +- Math I +- Math II +- Math Lab +- Practice +- Exams +- Progress + +### Dashboard + +The dashboard presents two course cards. Each card shows: + +- Course title +- Current completion percentage +- Completed and remaining topics +- Recommended next topic +- Recent quiz result +- Exam-readiness indicator + +The dashboard also provides quick access to the last visited lesson, saved formulas, and active practice work. + +## 6. Course Scope + +### Math I โ€” Mathematical Analysis + +Initial topic structure: + +1. Functions and graphs +2. Sequences +3. Limits +4. Continuity +5. Derivatives +6. Applications of derivatives +7. Integrals +8. Taylor polynomials and series + +Representative computer-science connections include numerical approximation, optimization, rate of change, convergence, error bounds, and introductory algorithm-growth intuition. These connections remain supporting examples rather than additional course modules. + +### Math II โ€” Linear Algebra & Geometry + +Initial topic structure: + +1. Vectors +2. Matrices and matrix operations +3. Systems of linear equations +4. Determinants +5. Matrix inverses +6. Vector spaces and linear independence +7. Linear transformations +8. Eigenvalues and eigenvectors +9. Analytic geometry in two and three dimensions + +Representative computer-science connections include computer graphics, coordinate transformations, data representation, machine-learning foundations, geometric computation, and systems modelling. + +## 7. Standard Learning Flow + +Every topic follows one predictable sequence: + +1. **Learn** โ€” concise explanation, definitions, notation, and learning objectives +2. **Visualize** โ€” interactive graph, matrix, vector, or geometric representation +3. **Practice** โ€” guided and independent exercises +4. **CS Connection** โ€” a focused computer-science application +5. **Quiz** โ€” short assessment with immediate feedback + +The same content model and page composition are reused across both courses so the learner does not need to relearn the interface. + +## 8. Core Components + +### 8.1 Course Hub + +Purpose: present topics, prerequisites, progress, and recommended next actions for one course. + +Depends on: + +- Course-content data +- Progress store +- Routing + +### 8.2 Lesson Workspace + +Purpose: render the standard learning flow for one topic. + +Responsibilities: + +- Display theory and formulas +- Coordinate visualization state +- Present examples and exercises +- Save completion and quiz results + +The workspace consumes structured topic data and does not contain hard-coded course text. + +### 8.3 Function Explorer + +Purpose: support functions, limits, continuity, derivatives, integrals, and series through interactive plotting. + +First-release capabilities: + +- Plot approved curriculum functions +- Adjust bounded parameters +- Show points, tangents, intervals, and areas where relevant +- Reset to the lesson-defined state +- Reject invalid or unsupported input cleanly + +It is not intended to be an unrestricted symbolic mathematics engine. + +### 8.4 Matrix Lab + +Purpose: explain and practise matrix operations and systems of equations. + +First-release capabilities: + +- Matrix addition and multiplication +- Determinant calculation +- Inverse calculation when defined +- Row-operation demonstrations +- Linear-system solving for supported dimensions +- Step-by-step educational output + +### 8.5 Vector & Geometry Lab + +Purpose: visualize vectors, lines, planes, coordinate systems, and linear transformations. + +First-release capabilities: + +- Two-dimensional vector manipulation +- Selected three-dimensional static or controlled views +- Dot product and geometric interpretation +- Lines and planes +- Transformation previews + +### 8.6 Formula Workspace + +Purpose: provide a personal local reference for formulas and short notes. + +First-release capabilities: + +- Save curriculum formulas +- Add short local notes +- Group entries by course and topic +- Remove saved entries + +### 8.7 Practice and Quiz Engine + +Purpose: deliver reusable question formats with deterministic grading. + +Supported question types: + +- Multiple choice +- Numeric answer with configured tolerance +- Ordered solution steps +- Matrix or vector answer for constrained dimensions + +Quiz definitions remain in data files and grading logic remains independent from visual components. + +### 8.8 Progress Store + +Purpose: persist local course progress, lesson completion, saved formulas, and assessment results. + +The first release uses the existing local persistence approach unless project inspection identifies a correctness problem. Stored data is namespaced for Math-CS so it cannot collide with Math-Biotech data. + +### 8.9 Math Assistant + +Purpose: provide contextual help inside lessons and practice without inventing or replacing the approved curriculum. + +First-release capabilities: + +- Explain a displayed definition, formula, worked example, or solution step +- Give hint-first guidance before revealing a complete solution +- Retrieve the relevant approved topic context +- Identify the course and topic used for the response +- Present a clear unavailable state when the assistant service is not configured or cannot respond + +The assistant does not grade assessments, generate new official course content, or mutate progress automatically. It does not require an account and does not persist conversation history beyond the existing local behavior unless a later design explicitly changes that decision. + +## 9. Content Data Model + +Course and topic content must be stored outside React presentation components. + +Suggested structure: + +```text +Course +- id +- title +- officialTitle +- shortTitle +- description +- order +- topics[] + +Topic +- id +- courseId +- title +- description +- prerequisites[] +- learningObjectives[] +- sections[] +- formulas[] +- visualization +- workedExamples[] +- csConnections[] +- practiceQuestions[] +- quiz +- difficulty +- estimatedStudyMinutes +``` + +Content IDs are stable, lowercase, and domain-neutral. UI state references IDs rather than display text. + +## 10. Data Flow + +1. The router resolves a course, topic, lab, practice set, or exam. +2. The content layer supplies validated structured data. +3. Presentation components render the data. +4. Interactive components maintain temporary local interaction state. +5. Completed actions are sent to the progress store. +6. The progress store persists namespaced data locally. +7. Dashboard and course hubs derive progress summaries from stored records. +8. The Math Assistant receives only the approved course/topic context needed for the current help request and does not mutate progress unless the learner completes an explicit tracked action. + +Content data, grading logic, persistence logic, assistant context selection, and visual rendering remain separate so each can be tested independently. + +## 11. Migration Strategy + +### Source preservation + +- Record the exact source commit used for the copy. +- Do not alter the source repositoryโ€™s product identity while constructing Math-CS. +- Preserve source history where practical; otherwise document the pinned source commit clearly in the target repository. + +### Target conversion + +1. Establish the separate public `Inmerson/Math-CS` repository. +2. Copy the working source application. +3. Update package metadata, application identifiers, titles, favicons, manifests, README content, and deployment settings. +4. Replace biotechnology navigation and domain data. +5. Introduce the two-course content model. +6. Refactor only components directly affected by domain coupling. +7. Apply the approved Computational Notebook design system. +8. Add the approved mathematics labs and assessments incrementally. +9. Re-scope the assistant to approved Math-CS content. +10. Scan the target repository for biotechnology terminology and assets. +11. Verify production builds and deployed behavior. + +## 12. Error Handling + +- Unknown routes display a clear recovery page with links to Dashboard, Math I, and Math II. +- Missing content IDs fail safely and report the affected course/topic identifier during development. +- Invalid function, matrix, vector, or numeric input displays a specific inline explanation and does not corrupt saved progress. +- Singular matrices are identified before inverse operations. +- Numeric grading uses explicit tolerances where exact floating-point equality is inappropriate. +- Local-storage parsing failures fall back to a clean namespaced state without crashing the application. +- Assistant configuration or response failures display a local, readable fallback and do not block lessons, practice, or exams. +- Unsupported browser capabilities degrade to a readable static explanation where practical. +- Errors must not reveal biotechnology-era labels or internal implementation details to learners. + +## 13. Accessibility + +- Full keyboard navigation for primary pages and controls +- Visible focus states +- Semantic headings and landmarks +- Labels for all interactive controls +- Sufficient color contrast +- Mathematical meaning must not depend on color alone +- Text alternatives or descriptions for important visualizations +- Motion-reduction support for non-essential animations +- Usable layouts at common mobile widths and browser zoom levels + +## 14. Testing Strategy + +### Unit tests + +- Course-content validation +- Quiz grading +- Numeric tolerance behavior +- Matrix operations +- Progress calculations +- Persistence serialization and recovery +- Assistant context selection and course/topic scoping + +### Component tests + +- Course cards and topic navigation +- Lesson-state transitions +- Correct rendering of validation errors +- Quiz feedback and result persistence +- Assistant hint and unavailable states +- Responsive navigation behavior where practical + +### Integration tests + +- Complete a lesson and observe dashboard progress +- Complete a quiz and observe course statistics +- Save and remove a formula +- Resume from persisted state +- Navigate between both courses and their labs +- Request assistant help from a lesson and verify that the correct topic context is used + +### End-to-end smoke tests + +- Application loads on the deployed public URL +- Dashboard, both course hubs, labs, practice, exams, and progress pages open +- No broken routes or missing production assets +- Mobile navigation remains functional +- Lessons remain usable when the assistant is unavailable + +### Migration checks + +- Repository-wide scan for biotechnology terminology and biological assets +- Package and application identifiers reference Math-CS +- Build and lint commands succeed +- Existing reusable behavior remains functional unless intentionally replaced + +## 15. Repository and Deployment Requirements + +- Target repository name: `Math-CS` +- Target owner: `Inmerson` +- Visibility: public +- Default branch: `main` +- README describes Math-CS only +- Deployment configuration targets the new repository path and URL +- Source-repository references appear only in migration or attribution documentation +- No credentials, generated secrets, or private user data are committed + +## 16. Acceptance Criteria + +The first release is accepted when: + +1. `Inmerson/Math-CS` exists as a public standalone repository. +2. The exact source commit used for migration is documented in the target repository. +3. The application builds successfully from a clean checkout. +4. The visible product identity is Inmerson Math-CS. +5. Dashboard, Math I, Math II, Math Lab, Practice, Exams, and Progress are navigable. +6. Every listed course topic has structured lesson content containing learning objectives, theory, at least one worked example, a computer-science connection, and a quiz. +7. Function Explorer, Matrix Lab, and Vector & Geometry Lab provide the approved first-release behaviors. +8. Quiz grading and local progress persistence work correctly. +9. The Math Assistant is scoped to approved course content and lessons remain usable when it is unavailable. +10. Desktop and mobile layouts are usable. +11. Automated tests and smoke checks pass. +12. A repository-wide review finds no learner-facing biotechnology content or assets. + +## 17. Implementation Boundaries + +Implementation should favour adaptation over a rewrite. Existing components are reused when they have domain-neutral responsibilities and acceptable structure. Domain-coupled components may be split into focused units, but unrelated architectural modernization is deferred. + +Each implementation phase must keep the application buildable and testable. Content conversion, visual redesign, interactive labs, assistant re-scoping, and final migration cleanup should be delivered as distinct, reviewable groups of changes. diff --git a/docs/superpowers/specs/2026-08-06-reliable-pages-and-matrix-input-design.md b/docs/superpowers/specs/2026-08-06-reliable-pages-and-matrix-input-design.md new file mode 100644 index 0000000..dc023e6 --- /dev/null +++ b/docs/superpowers/specs/2026-08-06-reliable-pages-and-matrix-input-design.md @@ -0,0 +1,28 @@ +# Reliable Pages and Matrix Input Design + +## Goal + +Restore reproducible GitHub Pages delivery and reduce unnecessary matrix-grid re-renders while preserving current user behavior. + +## Architecture + +The repository already publishes GitHub Pages from the root of `main` in legacy branch mode. The application therefore produces a dedicated, browser-ready bundle in `site/`, which is served at `/Math-Biotech-Project/site/` without changing repository settings. CI and publishing use the same Node.js version, lock file and verification command so development checks and production output do not drift. + +Matrix cells keep temporary text locally while the user types. A validated numeric value is committed to the parent matrix only when editing ends through blur or Enter, reducing parent updates from one per keystroke to one per edit session. + +## Components + +- `package-lock.json`: synchronized with `package.json`, including Tailwind PostCSS and the current React Three Fiber version. +- `tsconfig.json`: limits client typechecking to the client codebase; the independently managed `server/` project is excluded. +- `.github/workflows/ci.yml`: installs optional native packages from the lock file and runs typecheck, tests and the production build. +- `.github/workflows/deploy.yml`: verifies the application, builds the Pages-specific bundle, stores an artifact and commits generated `site/` files to `main`. +- `components/MatrixInput.tsx`: local edit buffer with explicit commit behavior. +- `components/MatrixInput.test.tsx`: regression tests for deferred updates and Enter-key completion. + +## Error handling + +Invalid intermediate text remains local during editing. Empty text commits as zero; other non-numeric text leaves the previous matrix value unchanged. Publishing stops before changing `site/` whenever dependency installation, typecheck, tests or either production build fails. + +## Verification + +A pull request must pass `npm run verify`. After merging, the publishing workflow must build and commit `site/`; a subsequent authenticated repository commit activates the legacy Pages build. The public application is verified at `https://inmerson.github.io/Math-Biotech-Project/site/`. diff --git a/index.css b/index.css new file mode 100644 index 0000000..1d4ffba --- /dev/null +++ b/index.css @@ -0,0 +1,83 @@ +@tailwind base; +@tailwind components; +@tailwind utilities; + +:root { + color-scheme: dark; +} + +body { + background-color: #020617; + color: #e2e8f0; + overflow-x: hidden; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + background-image: + radial-gradient(circle at 15% 50%, rgba(34, 211, 238, 0.08), transparent 25%), + radial-gradient(circle at 85% 30%, rgba(168, 85, 247, 0.08), transparent 25%); + background-attachment: fixed; +} + +.glass-panel { + background: rgba(15, 23, 42, 0.4); + backdrop-filter: blur(12px); + -webkit-backdrop-filter: blur(12px); + border: 1px solid rgba(255, 255, 255, 0.08); + box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1); +} + +.glass-panel-heavy { + background: rgba(2, 6, 23, 0.7); + backdrop-filter: blur(20px); + -webkit-backdrop-filter: blur(20px); + border-right: 1px solid rgba(255, 255, 255, 0.08); +} + +::-webkit-scrollbar { + width: 6px; + height: 6px; +} + +::-webkit-scrollbar-track { + background: transparent; +} + +::-webkit-scrollbar-thumb { + background: rgba(255, 255, 255, 0.1); + border-radius: 99px; +} + +::-webkit-scrollbar-thumb:hover { + background: rgba(255, 255, 255, 0.3); +} + +::selection { + background: rgba(34, 211, 238, 0.2); + color: #22d3ee; +} + +.katex { + font-size: 1.1em; +} + +.katex-display { + margin: 0; +} + +* { + -webkit-tap-highlight-color: transparent; +} + +@media (prefers-reduced-motion: reduce) { + html { + scroll-behavior: auto; + } + + *, + *::before, + *::after { + animation-duration: 0.01ms !important; + animation-iteration-count: 1 !important; + transition-duration: 0.01ms !important; + } +} diff --git a/index.html b/index.html new file mode 100644 index 0000000..cffc7d5 --- /dev/null +++ b/index.html @@ -0,0 +1,173 @@ + + + + + + + + + + + Inmerson โ€ข Personal Math & Biotech Lab + + + + + + + + + + + + +
+ + + \ No newline at end of file diff --git a/index.tsx b/index.tsx new file mode 100644 index 0000000..460b4cb --- /dev/null +++ b/index.tsx @@ -0,0 +1,31 @@ + +import React from 'react'; +import ReactDOM from 'react-dom/client'; +import App from './App'; +import './index.css'; + +// Suppress warnings and debug logs for production release +const originalWarn = console.warn; +const originalLog = console.log; + +console.warn = (...args) => { + if (args[0] && typeof args[0] === 'string' && args[0].includes("KaTeX doesn't work in quirks mode")) { + return; + } + originalWarn(...args); +}; + +// Optional: clean up console for public users if desired, or keep for debugging +// console.log = () => {}; + +const rootElement = document.getElementById('root'); +if (!rootElement) { + throw new Error("Could not find root element to mount to"); +} + +const root = ReactDOM.createRoot(rootElement); +root.render( + + + +); diff --git a/manifest.json b/manifest.json new file mode 100644 index 0000000..e7033c6 --- /dev/null +++ b/manifest.json @@ -0,0 +1,26 @@ +{ + "name": "Inmerson โ€ข Personal Math & Biotech Lab", + "short_name": "Inmerson Lab", + "start_url": "/", + "display": "standalone", + "background_color": "#020617", + "theme_color": "#020617", + "orientation": "portrait", + "icons": [ + { + "src": "https://cdn.lucide.dev/icon-library/dna-48.png", + "sizes": "48x48", + "type": "image/png" + }, + { + "src": "https://cdn.lucide.dev/icon-library/dna-192.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "https://cdn.lucide.dev/icon-library/dna-512.png", + "sizes": "512x512", + "type": "image/png" + } + ] +} \ No newline at end of file diff --git a/metadata.json b/metadata.json new file mode 100644 index 0000000..9edd721 --- /dev/null +++ b/metadata.json @@ -0,0 +1,5 @@ +{ + "name": "Inmerson โ€ข Personal Math & Biotech Lab", + "description": "A personal interactive laboratory for mathematical modeling, biotechnology, observation and learning.", + "requestFramePermissions": [] +} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..a0f2590 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,11198 @@ +{ + "name": "math-biotech", + "version": "0.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "math-biotech", + "version": "0.0.0", + "dependencies": { + "@capacitor/android": "^6.2.1", + "@capacitor/cli": "^6.2.1", + "@capacitor/core": "^6.2.1", + "@google/genai": "^1.39.0", + "@react-three/drei": "10.0.0-rc.1", + "@react-three/fiber": "9.0.0-rc.5", + "@tailwindcss/postcss": "^4.1.18", + "autoprefixer": "^10.4.24", + "framer-motion": "^12.23.24", + "katex": "0.16.9", + "lucide-react": "^0.554.0", + "mathjs": "12.4.1", + "postcss": "^8.5.6", + "react": "^19.2.4", + "react-dom": "^19.2.4", + "react-markdown": "^10.1.0", + "tailwindcss": "^4.1.18", + "three": "0.170.0", + "vite-plugin-pwa": "^1.2.0" + }, + "devDependencies": { + "@testing-library/dom": "^10.4.1", + "@testing-library/jest-dom": "^6.9.1", + "@testing-library/react": "^16.3.2", + "@types/node": "^22.14.0", + "@vitejs/plugin-react": "^5.1.3", + "jsdom": "^28.0.0", + "typescript": "~5.8.2", + "vite": "^6.4.1", + "vitest": "^4.0.18" + } + }, + "node_modules/@acemir/cssom": { + "version": "0.9.31", + "resolved": "https://registry.npmjs.org/@acemir/cssom/-/cssom-0.9.31.tgz", + "integrity": "sha512-ZnR3GSaH+/vJ0YlHau21FjfLYjMpYVIzTD8M8vIEQvIGxeOXyXdzCI140rrCY862p/C/BbzWsjc1dgnM9mkoTA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@adobe/css-tools": { + "version": "4.4.4", + "resolved": "https://registry.npmjs.org/@adobe/css-tools/-/css-tools-4.4.4.tgz", + "integrity": "sha512-Elp+iwUx5rN5+Y8xLt5/GRoG20WGoDCQ/1Fb+1LiGtvwbDavuSk0jhD/eZdckHAuzcDzccnkv+rEjyWfRx18gg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@alloc/quick-lru": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@alloc/quick-lru/-/quick-lru-5.2.0.tgz", + "integrity": "sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==", + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@apideck/better-ajv-errors": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/@apideck/better-ajv-errors/-/better-ajv-errors-0.3.6.tgz", + "integrity": "sha512-P+ZygBLZtkp0qqOAJJVX4oX/sFo5JR3eBWwwuqHHhK0GIgQOKWrAfiAaWX0aArHkRWHMuggFEgAZNxVPwPZYaA==", + "license": "MIT", + "dependencies": { + "json-schema": "^0.4.0", + "jsonpointer": "^5.0.0", + "leven": "^3.1.0" + }, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "ajv": ">=8" + } + }, + "node_modules/@asamuzakjp/css-color": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/@asamuzakjp/css-color/-/css-color-4.1.1.tgz", + "integrity": "sha512-B0Hv6G3gWGMn0xKJ0txEi/jM5iFpT3MfDxmhZFb4W047GvytCf1DHQ1D69W3zHI4yWe2aTZAA0JnbMZ7Xc8DuQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@csstools/css-calc": "^2.1.4", + "@csstools/css-color-parser": "^3.1.0", + "@csstools/css-parser-algorithms": "^3.0.5", + "@csstools/css-tokenizer": "^3.0.4", + "lru-cache": "^11.2.4" + } + }, + "node_modules/@asamuzakjp/css-color/node_modules/lru-cache": { + "version": "11.2.5", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.5.tgz", + "integrity": "sha512-vFrFJkWtJvJnD5hg+hJvVE8Lh/TcMzKnTgCWmtBipwI5yLX/iX+5UB2tfuyODF5E7k9xEzMdYgGqaSb1c0c5Yw==", + "dev": true, + "license": "BlueOak-1.0.0", + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/@asamuzakjp/dom-selector": { + "version": "6.7.7", + "resolved": "https://registry.npmjs.org/@asamuzakjp/dom-selector/-/dom-selector-6.7.7.tgz", + "integrity": "sha512-8CO/UQ4tzDd7ula+/CVimJIVWez99UJlbMyIgk8xOnhAVPKLnBZmUFYVgugS441v2ZqUq5EnSh6B0Ua0liSFAA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@asamuzakjp/nwsapi": "^2.3.9", + "bidi-js": "^1.0.3", + "css-tree": "^3.1.0", + "is-potential-custom-element-name": "^1.0.1", + "lru-cache": "^11.2.5" + } + }, + "node_modules/@asamuzakjp/dom-selector/node_modules/lru-cache": { + "version": "11.2.5", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.5.tgz", + "integrity": "sha512-vFrFJkWtJvJnD5hg+hJvVE8Lh/TcMzKnTgCWmtBipwI5yLX/iX+5UB2tfuyODF5E7k9xEzMdYgGqaSb1c0c5Yw==", + "dev": true, + "license": "BlueOak-1.0.0", + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/@asamuzakjp/nwsapi": { + "version": "2.3.9", + "resolved": "https://registry.npmjs.org/@asamuzakjp/nwsapi/-/nwsapi-2.3.9.tgz", + "integrity": "sha512-n8GuYSrI9bF7FFZ/SjhwevlHc8xaVlb/7HmHelnc/PZXBD2ZR49NnN9sMMuDdEGPeeRQ5d0hqlSlEpgCX3Wl0Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/@babel/code-frame": { + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.0.tgz", + "integrity": "sha512-9NhCeYjq9+3uxgdtp20LSiJXJvN0FeCtNGpJxuMFZ1Kv3cWUNb6DOhJwUvcVCzKGR66cw4njwM6hrJLqgOwbcw==", + "license": "MIT", + "dependencies": { + "@babel/helper-validator-identifier": "^7.28.5", + "js-tokens": "^4.0.0", + "picocolors": "^1.1.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/compat-data": { + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.29.0.tgz", + "integrity": "sha512-T1NCJqT/j9+cn8fvkt7jtwbLBfLC/1y1c7NtCeXFRgzGTsafi68MRv8yzkYSapBnFA6L3U2VSc02ciDzoAJhJg==", + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/core": { + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.29.0.tgz", + "integrity": "sha512-CGOfOJqWjg2qW/Mb6zNsDm+u5vFQ8DxXfbM09z69p5Z6+mE1ikP2jUXw+j42Pf1XTYED2Rni5f95npYeuwMDQA==", + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.29.0", + "@babel/generator": "^7.29.0", + "@babel/helper-compilation-targets": "^7.28.6", + "@babel/helper-module-transforms": "^7.28.6", + "@babel/helpers": "^7.28.6", + "@babel/parser": "^7.29.0", + "@babel/template": "^7.28.6", + "@babel/traverse": "^7.29.0", + "@babel/types": "^7.29.0", + "@jridgewell/remapping": "^2.3.5", + "convert-source-map": "^2.0.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.3", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@babel/core/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/generator": { + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.29.0.tgz", + "integrity": "sha512-vSH118/wwM/pLR38g/Sgk05sNtro6TlTJKuiMXDaZqPUfjTFcudpCOt00IhOfj+1BFAX+UFAlzCU+6WXr3GLFQ==", + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.29.0", + "@babel/types": "^7.29.0", + "@jridgewell/gen-mapping": "^0.3.12", + "@jridgewell/trace-mapping": "^0.3.28", + "jsesc": "^3.0.2" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-annotate-as-pure": { + "version": "7.27.3", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.27.3.tgz", + "integrity": "sha512-fXSwMQqitTGeHLBC08Eq5yXz2m37E4pJX1qAU1+2cNedz/ifv/bVXft90VeSav5nFO61EcNgwr0aJxbyPaWBPg==", + "license": "MIT", + "dependencies": { + "@babel/types": "^7.27.3" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.28.6.tgz", + "integrity": "sha512-JYtls3hqi15fcx5GaSNL7SCTJ2MNmjrkHXg4FSpOA/grxK8KwyZ5bubHsCq8FXCkua6xhuaaBit+3b7+VZRfcA==", + "license": "MIT", + "dependencies": { + "@babel/compat-data": "^7.28.6", + "@babel/helper-validator-option": "^7.27.1", + "browserslist": "^4.24.0", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/helper-create-class-features-plugin": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.28.6.tgz", + "integrity": "sha512-dTOdvsjnG3xNT9Y0AUg1wAl38y+4Rl4sf9caSQZOXdNqVn+H+HbbJ4IyyHaIqNR6SW9oJpA/RuRjsjCw2IdIow==", + "license": "MIT", + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.27.3", + "@babel/helper-member-expression-to-functions": "^7.28.5", + "@babel/helper-optimise-call-expression": "^7.27.1", + "@babel/helper-replace-supers": "^7.28.6", + "@babel/helper-skip-transparent-expression-wrappers": "^7.27.1", + "@babel/traverse": "^7.28.6", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-create-class-features-plugin/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/helper-create-regexp-features-plugin": { + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.28.5.tgz", + "integrity": "sha512-N1EhvLtHzOvj7QQOUCCS3NrPJP8c5W6ZXCHDn7Yialuy1iu4r5EmIYkXlKNqT99Ciw+W0mDqWoR6HWMZlFP3hw==", + "license": "MIT", + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.27.3", + "regexpu-core": "^6.3.1", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-create-regexp-features-plugin/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/helper-define-polyfill-provider": { + "version": "0.6.6", + "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.6.6.tgz", + "integrity": "sha512-mOAsxeeKkUKayvZR3HeTYD/fICpCPLJrU5ZjelT/PA6WHtNDBOE436YiaEUvHN454bRM3CebhDsIpieCc4texA==", + "license": "MIT", + "dependencies": { + "@babel/helper-compilation-targets": "^7.28.6", + "@babel/helper-plugin-utils": "^7.28.6", + "debug": "^4.4.3", + "lodash.debounce": "^4.0.8", + "resolve": "^1.22.11" + }, + "peerDependencies": { + "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" + } + }, + "node_modules/@babel/helper-globals": { + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.28.0.tgz", + "integrity": "sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw==", + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-member-expression-to-functions": { + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.28.5.tgz", + "integrity": "sha512-cwM7SBRZcPCLgl8a7cY0soT1SptSzAlMH39vwiRpOQkJlh53r5hdHwLSCZpQdVLT39sZt+CRpNwYG4Y2v77atg==", + "license": "MIT", + "dependencies": { + "@babel/traverse": "^7.28.5", + "@babel/types": "^7.28.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.28.6.tgz", + "integrity": "sha512-l5XkZK7r7wa9LucGw9LwZyyCUscb4x37JWTPz7swwFE/0FMQAGpiWUZn8u9DzkSBWEcK25jmvubfpw2dnAMdbw==", + "license": "MIT", + "dependencies": { + "@babel/traverse": "^7.28.6", + "@babel/types": "^7.28.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-transforms": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.28.6.tgz", + "integrity": "sha512-67oXFAYr2cDLDVGLXTEABjdBJZ6drElUSI7WKp70NrpyISso3plG9SAGEF6y7zbha/wOzUByWWTJvEDVNIUGcA==", + "license": "MIT", + "dependencies": { + "@babel/helper-module-imports": "^7.28.6", + "@babel/helper-validator-identifier": "^7.28.5", + "@babel/traverse": "^7.28.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-optimise-call-expression": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.27.1.tgz", + "integrity": "sha512-URMGH08NzYFhubNSGJrpUEphGKQwMQYBySzat5cAByY1/YgIRkULnIy3tAMeszlL/so2HbeilYloUmSpd7GdVw==", + "license": "MIT", + "dependencies": { + "@babel/types": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-plugin-utils": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.28.6.tgz", + "integrity": "sha512-S9gzZ/bz83GRysI7gAD4wPT/AI3uCnY+9xn+Mx/KPs2JwHJIz1W8PZkg2cqyt3RNOBM8ejcXhV6y8Og7ly/Dug==", + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-remap-async-to-generator": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.27.1.tgz", + "integrity": "sha512-7fiA521aVw8lSPeI4ZOD3vRFkoqkJcS+z4hFo82bFSH/2tNd6eJ5qCVMS5OzDmZh/kaHQeBaeyxK6wljcPtveA==", + "license": "MIT", + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.27.1", + "@babel/helper-wrap-function": "^7.27.1", + "@babel/traverse": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-replace-supers": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.28.6.tgz", + "integrity": "sha512-mq8e+laIk94/yFec3DxSjCRD2Z0TAjhVbEJY3UQrlwVo15Lmt7C2wAUbK4bjnTs4APkwsYLTahXRraQXhb1WCg==", + "license": "MIT", + "dependencies": { + "@babel/helper-member-expression-to-functions": "^7.28.5", + "@babel/helper-optimise-call-expression": "^7.27.1", + "@babel/traverse": "^7.28.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-skip-transparent-expression-wrappers": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.27.1.tgz", + "integrity": "sha512-Tub4ZKEXqbPjXgWLl2+3JpQAYBJ8+ikpQ2Ocj/q/r0LwE3UhENh7EUabyHjz2kCEsrRY83ew2DQdHluuiDQFzg==", + "license": "MIT", + "dependencies": { + "@babel/traverse": "^7.27.1", + "@babel/types": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz", + "integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==", + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz", + "integrity": "sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==", + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-option": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.27.1.tgz", + "integrity": "sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg==", + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-wrap-function": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.28.6.tgz", + "integrity": "sha512-z+PwLziMNBeSQJonizz2AGnndLsP2DeGHIxDAn+wdHOGuo4Fo1x1HBPPXeE9TAOPHNNWQKCSlA2VZyYyyibDnQ==", + "license": "MIT", + "dependencies": { + "@babel/template": "^7.28.6", + "@babel/traverse": "^7.28.6", + "@babel/types": "^7.28.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helpers": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.28.6.tgz", + "integrity": "sha512-xOBvwq86HHdB7WUDTfKfT/Vuxh7gElQ+Sfti2Cy6yIWNW05P8iUslOVcZ4/sKbE+/jQaukQAdz/gf3724kYdqw==", + "license": "MIT", + "dependencies": { + "@babel/template": "^7.28.6", + "@babel/types": "^7.28.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/parser": { + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.0.tgz", + "integrity": "sha512-IyDgFV5GeDUVX4YdF/3CPULtVGSXXMLh1xVIgdCgxApktqnQV0r7/8Nqthg+8YLGaAtdyIlo2qIdZrbCv4+7ww==", + "license": "MIT", + "dependencies": { + "@babel/types": "^7.29.0" + }, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/plugin-bugfix-firefox-class-in-computed-class-key": { + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-firefox-class-in-computed-class-key/-/plugin-bugfix-firefox-class-in-computed-class-key-7.28.5.tgz", + "integrity": "sha512-87GDMS3tsmMSi/3bWOte1UblL+YUTFMV8SZPZ2eSEL17s74Cw/l63rR6NmGVKMYW2GYi85nE+/d6Hw5N0bEk2Q==", + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1", + "@babel/traverse": "^7.28.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/plugin-bugfix-safari-class-field-initializer-scope": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-class-field-initializer-scope/-/plugin-bugfix-safari-class-field-initializer-scope-7.27.1.tgz", + "integrity": "sha512-qNeq3bCKnGgLkEXUuFry6dPlGfCdQNZbn7yUAPCInwAJHMU7THJfrBSozkcWq5sNM6RcF3S8XyQL2A52KNR9IA==", + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.27.1.tgz", + "integrity": "sha512-g4L7OYun04N1WyqMNjldFwlfPCLVkgB54A/YCXICZYBsvJJE3kByKv9c9+R/nAfmIfjl2rKYLNyMHboYbZaWaA==", + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.27.1.tgz", + "integrity": "sha512-oO02gcONcD5O1iTLi/6frMJBIwWEHceWGSGqrpCmEL8nogiS6J9PBlE48CaK20/Jx1LuRml9aDftLgdjXT8+Cw==", + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1", + "@babel/helper-skip-transparent-expression-wrappers": "^7.27.1", + "@babel/plugin-transform-optional-chaining": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.13.0" + } + }, + "node_modules/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly/-/plugin-bugfix-v8-static-class-fields-redefine-readonly-7.28.6.tgz", + "integrity": "sha512-a0aBScVTlNaiUe35UtfxAN7A/tehvvG4/ByO6+46VPKTRSlfnAFsgKy0FUh+qAkQrDTmhDkT+IBOKlOoMUxQ0g==", + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.28.6", + "@babel/traverse": "^7.28.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/plugin-proposal-private-property-in-object": { + "version": "7.21.0-placeholder-for-preset-env.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.0-placeholder-for-preset-env.2.tgz", + "integrity": "sha512-SOSkfJDddaM7mak6cPEpswyTRnuRltl429hMraQEglW+OkovnCzsiszTmsrlY//qLFjCpQDFRvjdm2wA5pPm9w==", + "license": "MIT", + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-import-assertions": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.28.6.tgz", + "integrity": "sha512-pSJUpFHdx9z5nqTSirOCMtYVP2wFgoWhP0p3g8ONK/4IHhLIBd0B9NYqAvIUAhq+OkhO4VM1tENCt0cjlsNShw==", + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.28.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-import-attributes": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.28.6.tgz", + "integrity": "sha512-jiLC0ma9XkQT3TKJ9uYvlakm66Pamywo+qwL+oL8HJOvc6TWdZXVfhqJr8CCzbSGUAbDOzlGHJC1U+vRfLQDvw==", + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.28.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-unicode-sets-regex": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-unicode-sets-regex/-/plugin-syntax-unicode-sets-regex-7.18.6.tgz", + "integrity": "sha512-727YkEAPwSIQTv5im8QHz3upqp92JTWhidIC81Tdx4VJYIte/VndKf1qKrfnnhPLiPghStWfvC/iFaMCQu7Nqg==", + "license": "MIT", + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/plugin-transform-arrow-functions": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.27.1.tgz", + "integrity": "sha512-8Z4TGic6xW70FKThA5HYEKKyBpOOsucTOD1DjU3fZxDg+K3zBJcXMFnt/4yQiZnf5+MiOMSXQ9PaEK/Ilh1DeA==", + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-async-generator-functions": { + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.29.0.tgz", + "integrity": "sha512-va0VdWro4zlBr2JsXC+ofCPB2iG12wPtVGTWFx2WLDOM3nYQZZIGP82qku2eW/JR83sD+k2k+CsNtyEbUqhU6w==", + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.28.6", + "@babel/helper-remap-async-to-generator": "^7.27.1", + "@babel/traverse": "^7.29.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-async-to-generator": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.28.6.tgz", + "integrity": "sha512-ilTRcmbuXjsMmcZ3HASTe4caH5Tpo93PkTxF9oG2VZsSWsahydmcEHhix9Ik122RcTnZnUzPbmux4wh1swfv7g==", + "license": "MIT", + "dependencies": { + "@babel/helper-module-imports": "^7.28.6", + "@babel/helper-plugin-utils": "^7.28.6", + "@babel/helper-remap-async-to-generator": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-block-scoped-functions": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.27.1.tgz", + "integrity": "sha512-cnqkuOtZLapWYZUYM5rVIdv1nXYuFVIltZ6ZJ7nIj585QsjKM5dhL2Fu/lICXZ1OyIAFc7Qy+bvDAtTXqGrlhg==", + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-block-scoping": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.28.6.tgz", + "integrity": "sha512-tt/7wOtBmwHPNMPu7ax4pdPz6shjFrmHDghvNC+FG9Qvj7D6mJcoRQIF5dy4njmxR941l6rgtvfSB2zX3VlUIw==", + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.28.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-class-properties": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-properties/-/plugin-transform-class-properties-7.28.6.tgz", + "integrity": "sha512-dY2wS3I2G7D697VHndN91TJr8/AAfXQNt5ynCTI/MpxMsSzHp+52uNivYT5wCPax3whc47DR8Ba7cmlQMg24bw==", + "license": "MIT", + "dependencies": { + "@babel/helper-create-class-features-plugin": "^7.28.6", + "@babel/helper-plugin-utils": "^7.28.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-class-static-block": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.28.6.tgz", + "integrity": "sha512-rfQ++ghVwTWTqQ7w8qyDxL1XGihjBss4CmTgGRCTAC9RIbhVpyp4fOeZtta0Lbf+dTNIVJer6ych2ibHwkZqsQ==", + "license": "MIT", + "dependencies": { + "@babel/helper-create-class-features-plugin": "^7.28.6", + "@babel/helper-plugin-utils": "^7.28.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.12.0" + } + }, + "node_modules/@babel/plugin-transform-classes": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.28.6.tgz", + "integrity": "sha512-EF5KONAqC5zAqT783iMGuM2ZtmEBy+mJMOKl2BCvPZ2lVrwvXnB6o+OBWCS+CoeCCpVRF2sA2RBKUxvT8tQT5Q==", + "license": "MIT", + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.27.3", + "@babel/helper-compilation-targets": "^7.28.6", + "@babel/helper-globals": "^7.28.0", + "@babel/helper-plugin-utils": "^7.28.6", + "@babel/helper-replace-supers": "^7.28.6", + "@babel/traverse": "^7.28.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-computed-properties": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.28.6.tgz", + "integrity": "sha512-bcc3k0ijhHbc2lEfpFHgx7eYw9KNXqOerKWfzbxEHUGKnS3sz9C4CNL9OiFN1297bDNfUiSO7DaLzbvHQQQ1BQ==", + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.28.6", + "@babel/template": "^7.28.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-destructuring": { + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.28.5.tgz", + "integrity": "sha512-Kl9Bc6D0zTUcFUvkNuQh4eGXPKKNDOJQXVyyM4ZAQPMveniJdxi8XMJwLo+xSoW3MIq81bD33lcUe9kZpl0MCw==", + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1", + "@babel/traverse": "^7.28.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-dotall-regex": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.28.6.tgz", + "integrity": "sha512-SljjowuNKB7q5Oayv4FoPzeB74g3QgLt8IVJw9ADvWy3QnUb/01aw8I4AVv8wYnPvQz2GDDZ/g3GhcNyDBI4Bg==", + "license": "MIT", + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.28.5", + "@babel/helper-plugin-utils": "^7.28.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-duplicate-keys": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.27.1.tgz", + "integrity": "sha512-MTyJk98sHvSs+cvZ4nOauwTTG1JeonDjSGvGGUNHreGQns+Mpt6WX/dVzWBHgg+dYZhkC4X+zTDfkTU+Vy9y7Q==", + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-duplicate-named-capturing-groups-regex": { + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-named-capturing-groups-regex/-/plugin-transform-duplicate-named-capturing-groups-regex-7.29.0.tgz", + "integrity": "sha512-zBPcW2lFGxdiD8PUnPwJjag2J9otbcLQzvbiOzDxpYXyCuYX9agOwMPGn1prVH0a4qzhCKu24rlH4c1f7yA8rw==", + "license": "MIT", + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.28.5", + "@babel/helper-plugin-utils": "^7.28.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/plugin-transform-dynamic-import": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dynamic-import/-/plugin-transform-dynamic-import-7.27.1.tgz", + "integrity": "sha512-MHzkWQcEmjzzVW9j2q8LGjwGWpG2mjwaaB0BNQwst3FIjqsg8Ct/mIZlvSPJvfi9y2AC8mi/ktxbFVL9pZ1I4A==", + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-explicit-resource-management": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-explicit-resource-management/-/plugin-transform-explicit-resource-management-7.28.6.tgz", + "integrity": "sha512-Iao5Konzx2b6g7EPqTy40UZbcdXE126tTxVFr/nAIj+WItNxjKSYTEw3RC+A2/ZetmdJsgueL1KhaMCQHkLPIg==", + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.28.6", + "@babel/plugin-transform-destructuring": "^7.28.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-exponentiation-operator": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.28.6.tgz", + "integrity": "sha512-WitabqiGjV/vJ0aPOLSFfNY1u9U3R7W36B03r5I2KoNix+a3sOhJ3pKFB3R5It9/UiK78NiO0KE9P21cMhlPkw==", + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.28.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-export-namespace-from": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-export-namespace-from/-/plugin-transform-export-namespace-from-7.27.1.tgz", + "integrity": "sha512-tQvHWSZ3/jH2xuq/vZDy0jNn+ZdXJeM8gHvX4lnJmsc3+50yPlWdZXIc5ay+umX+2/tJIqHqiEqcJvxlmIvRvQ==", + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-for-of": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.27.1.tgz", + "integrity": "sha512-BfbWFFEJFQzLCQ5N8VocnCtA8J1CLkNTe2Ms2wocj75dd6VpiqS5Z5quTYcUoo4Yq+DN0rtikODccuv7RU81sw==", + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1", + "@babel/helper-skip-transparent-expression-wrappers": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-function-name": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.27.1.tgz", + "integrity": "sha512-1bQeydJF9Nr1eBCMMbC+hdwmRlsv5XYOMu03YSWFwNs0HsAmtSxxF1fyuYPqemVldVyFmlCU7w8UE14LupUSZQ==", + "license": "MIT", + "dependencies": { + "@babel/helper-compilation-targets": "^7.27.1", + "@babel/helper-plugin-utils": "^7.27.1", + "@babel/traverse": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-json-strings": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-json-strings/-/plugin-transform-json-strings-7.28.6.tgz", + "integrity": "sha512-Nr+hEN+0geQkzhbdgQVPoqr47lZbm+5fCUmO70722xJZd0Mvb59+33QLImGj6F+DkK3xgDi1YVysP8whD6FQAw==", + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.28.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-literals": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.27.1.tgz", + "integrity": "sha512-0HCFSepIpLTkLcsi86GG3mTUzxV5jpmbv97hTETW3yzrAij8aqlD36toB1D0daVFJM8NK6GvKO0gslVQmm+zZA==", + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-logical-assignment-operators": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.28.6.tgz", + "integrity": "sha512-+anKKair6gpi8VsM/95kmomGNMD0eLz1NQ8+Pfw5sAwWH9fGYXT50E55ZpV0pHUHWf6IUTWPM+f/7AAff+wr9A==", + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.28.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-member-expression-literals": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.27.1.tgz", + "integrity": "sha512-hqoBX4dcZ1I33jCSWcXrP+1Ku7kdqXf1oeah7ooKOIiAdKQ+uqftgCFNOSzA5AMS2XIHEYeGFg4cKRCdpxzVOQ==", + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-modules-amd": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.27.1.tgz", + "integrity": "sha512-iCsytMg/N9/oFq6n+gFTvUYDZQOMK5kEdeYxmxt91fcJGycfxVP9CnrxoliM0oumFERba2i8ZtwRUCMhvP1LnA==", + "license": "MIT", + "dependencies": { + "@babel/helper-module-transforms": "^7.27.1", + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-modules-commonjs": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.28.6.tgz", + "integrity": "sha512-jppVbf8IV9iWWwWTQIxJMAJCWBuuKx71475wHwYytrRGQ2CWiDvYlADQno3tcYpS/T2UUWFQp3nVtYfK/YBQrA==", + "license": "MIT", + "dependencies": { + "@babel/helper-module-transforms": "^7.28.6", + "@babel/helper-plugin-utils": "^7.28.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-modules-systemjs": { + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.29.0.tgz", + "integrity": "sha512-PrujnVFbOdUpw4UHiVwKvKRLMMic8+eC0CuNlxjsyZUiBjhFdPsewdXCkveh2KqBA9/waD0W1b4hXSOBQJezpQ==", + "license": "MIT", + "dependencies": { + "@babel/helper-module-transforms": "^7.28.6", + "@babel/helper-plugin-utils": "^7.28.6", + "@babel/helper-validator-identifier": "^7.28.5", + "@babel/traverse": "^7.29.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-modules-umd": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.27.1.tgz", + "integrity": "sha512-iQBE/xC5BV1OxJbp6WG7jq9IWiD+xxlZhLrdwpPkTX3ydmXdvoCpyfJN7acaIBZaOqTfr76pgzqBJflNbeRK+w==", + "license": "MIT", + "dependencies": { + "@babel/helper-module-transforms": "^7.27.1", + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-named-capturing-groups-regex": { + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.29.0.tgz", + "integrity": "sha512-1CZQA5KNAD6ZYQLPw7oi5ewtDNxH/2vuCh+6SmvgDfhumForvs8a1o9n0UrEoBD8HU4djO2yWngTQlXl1NDVEQ==", + "license": "MIT", + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.28.5", + "@babel/helper-plugin-utils": "^7.28.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/plugin-transform-new-target": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.27.1.tgz", + "integrity": "sha512-f6PiYeqXQ05lYq3TIfIDu/MtliKUbNwkGApPUvyo6+tc7uaR4cPjPe7DFPr15Uyycg2lZU6btZ575CuQoYh7MQ==", + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-nullish-coalescing-operator": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.28.6.tgz", + "integrity": "sha512-3wKbRgmzYbw24mDJXT7N+ADXw8BC/imU9yo9c9X9NKaLF1fW+e5H1U5QjMUBe4Qo4Ox/o++IyUkl1sVCLgevKg==", + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.28.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-numeric-separator": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-numeric-separator/-/plugin-transform-numeric-separator-7.28.6.tgz", + "integrity": "sha512-SJR8hPynj8outz+SlStQSwvziMN4+Bq99it4tMIf5/Caq+3iOc0JtKyse8puvyXkk3eFRIA5ID/XfunGgO5i6w==", + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.28.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-object-rest-spread": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.28.6.tgz", + "integrity": "sha512-5rh+JR4JBC4pGkXLAcYdLHZjXudVxWMXbB6u6+E9lRL5TrGVbHt1TjxGbZ8CkmYw9zjkB7jutzOROArsqtncEA==", + "license": "MIT", + "dependencies": { + "@babel/helper-compilation-targets": "^7.28.6", + "@babel/helper-plugin-utils": "^7.28.6", + "@babel/plugin-transform-destructuring": "^7.28.5", + "@babel/plugin-transform-parameters": "^7.27.7", + "@babel/traverse": "^7.28.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-object-super": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.27.1.tgz", + "integrity": "sha512-SFy8S9plRPbIcxlJ8A6mT/CxFdJx/c04JEctz4jf8YZaVS2px34j7NXRrlGlHkN/M2gnpL37ZpGRGVFLd3l8Ng==", + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1", + "@babel/helper-replace-supers": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-optional-catch-binding": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-catch-binding/-/plugin-transform-optional-catch-binding-7.28.6.tgz", + "integrity": "sha512-R8ja/Pyrv0OGAvAXQhSTmWyPJPml+0TMqXlO5w+AsMEiwb2fg3WkOvob7UxFSL3OIttFSGSRFKQsOhJ/X6HQdQ==", + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.28.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-optional-chaining": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.28.6.tgz", + "integrity": "sha512-A4zobikRGJTsX9uqVFdafzGkqD30t26ck2LmOzAuLL8b2x6k3TIqRiT2xVvA9fNmFeTX484VpsdgmKNA0bS23w==", + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.28.6", + "@babel/helper-skip-transparent-expression-wrappers": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-parameters": { + "version": "7.27.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.27.7.tgz", + "integrity": "sha512-qBkYTYCb76RRxUM6CcZA5KRu8K4SM8ajzVeUgVdMVO9NN9uI/GaVmBg/WKJJGnNokV9SY8FxNOVWGXzqzUidBg==", + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-private-methods": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-methods/-/plugin-transform-private-methods-7.28.6.tgz", + "integrity": "sha512-piiuapX9CRv7+0st8lmuUlRSmX6mBcVeNQ1b4AYzJxfCMuBfB0vBXDiGSmm03pKJw1v6cZ8KSeM+oUnM6yAExg==", + "license": "MIT", + "dependencies": { + "@babel/helper-create-class-features-plugin": "^7.28.6", + "@babel/helper-plugin-utils": "^7.28.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-private-property-in-object": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.28.6.tgz", + "integrity": "sha512-b97jvNSOb5+ehyQmBpmhOCiUC5oVK4PMnpRvO7+ymFBoqYjeDHIU9jnrNUuwHOiL9RpGDoKBpSViarV+BU+eVA==", + "license": "MIT", + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.27.3", + "@babel/helper-create-class-features-plugin": "^7.28.6", + "@babel/helper-plugin-utils": "^7.28.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-property-literals": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.27.1.tgz", + "integrity": "sha512-oThy3BCuCha8kDZ8ZkgOg2exvPYUlprMukKQXI1r1pJ47NCvxfkEy8vK+r/hT9nF0Aa4H1WUPZZjHTFtAhGfmQ==", + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-react-jsx-self": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.27.1.tgz", + "integrity": "sha512-6UzkCs+ejGdZ5mFFC/OCUrv028ab2fp1znZmCZjAOBKiBK2jXD1O+BPSfX8X2qjJ75fZBMSnQn3Rq2mrBJK2mw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-react-jsx-source": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.27.1.tgz", + "integrity": "sha512-zbwoTsBruTeKB9hSq73ha66iFeJHuaFkUbwvqElnygoNbj/jHRsSeokowZFN3CZ64IvEqcmmkVe89OPXc7ldAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-regenerator": { + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.29.0.tgz", + "integrity": "sha512-FijqlqMA7DmRdg/aINBSs04y8XNTYw/lr1gJ2WsmBnnaNw1iS43EPkJW+zK7z65auG3AWRFXWj+NcTQwYptUog==", + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.28.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-regexp-modifiers": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regexp-modifiers/-/plugin-transform-regexp-modifiers-7.28.6.tgz", + "integrity": "sha512-QGWAepm9qxpaIs7UM9FvUSnCGlb8Ua1RhyM4/veAxLwt3gMat/LSGrZixyuj4I6+Kn9iwvqCyPTtbdxanYoWYg==", + "license": "MIT", + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.28.5", + "@babel/helper-plugin-utils": "^7.28.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/plugin-transform-reserved-words": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.27.1.tgz", + "integrity": "sha512-V2ABPHIJX4kC7HegLkYoDpfg9PVmuWy/i6vUM5eGK22bx4YVFD3M5F0QQnWQoDs6AGsUWTVOopBiMFQgHaSkVw==", + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-shorthand-properties": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.27.1.tgz", + "integrity": "sha512-N/wH1vcn4oYawbJ13Y/FxcQrWk63jhfNa7jef0ih7PHSIHX2LB7GWE1rkPrOnka9kwMxb6hMl19p7lidA+EHmQ==", + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-spread": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.28.6.tgz", + "integrity": "sha512-9U4QObUC0FtJl05AsUcodau/RWDytrU6uKgkxu09mLR9HLDAtUMoPuuskm5huQsoktmsYpI+bGmq+iapDcriKA==", + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.28.6", + "@babel/helper-skip-transparent-expression-wrappers": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-sticky-regex": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.27.1.tgz", + "integrity": "sha512-lhInBO5bi/Kowe2/aLdBAawijx+q1pQzicSgnkB6dUPc1+RC8QmJHKf2OjvU+NZWitguJHEaEmbV6VWEouT58g==", + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-template-literals": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.27.1.tgz", + "integrity": "sha512-fBJKiV7F2DxZUkg5EtHKXQdbsbURW3DZKQUWphDum0uRP6eHGGa/He9mc0mypL680pb+e/lDIthRohlv8NCHkg==", + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-typeof-symbol": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.27.1.tgz", + "integrity": "sha512-RiSILC+nRJM7FY5srIyc4/fGIwUhyDuuBSdWn4y6yT6gm652DpCHZjIipgn6B7MQ1ITOUnAKWixEUjQRIBIcLw==", + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-unicode-escapes": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.27.1.tgz", + "integrity": "sha512-Ysg4v6AmF26k9vpfFuTZg8HRfVWzsh1kVfowA23y9j/Gu6dOuahdUVhkLqpObp3JIv27MLSii6noRnuKN8H0Mg==", + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-unicode-property-regex": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-property-regex/-/plugin-transform-unicode-property-regex-7.28.6.tgz", + "integrity": "sha512-4Wlbdl/sIZjzi/8St0evF0gEZrgOswVO6aOzqxh1kDZOl9WmLrHq2HtGhnOJZmHZYKP8WZ1MDLCt5DAWwRo57A==", + "license": "MIT", + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.28.5", + "@babel/helper-plugin-utils": "^7.28.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-unicode-regex": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.27.1.tgz", + "integrity": "sha512-xvINq24TRojDuyt6JGtHmkVkrfVV3FPT16uytxImLeBZqW3/H52yN+kM1MGuyPkIQxrzKwPHs5U/MP3qKyzkGw==", + "license": "MIT", + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.27.1", + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-unicode-sets-regex": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-sets-regex/-/plugin-transform-unicode-sets-regex-7.28.6.tgz", + "integrity": "sha512-/wHc/paTUmsDYN7SZkpWxogTOBNnlx7nBQYfy6JJlCT7G3mVhltk3e++N7zV0XfgGsrqBxd4rJQt9H16I21Y1Q==", + "license": "MIT", + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.28.5", + "@babel/helper-plugin-utils": "^7.28.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/preset-env": { + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.29.0.tgz", + "integrity": "sha512-fNEdfc0yi16lt6IZo2Qxk3knHVdfMYX33czNb4v8yWhemoBhibCpQK/uYHtSKIiO+p/zd3+8fYVXhQdOVV608w==", + "license": "MIT", + "dependencies": { + "@babel/compat-data": "^7.29.0", + "@babel/helper-compilation-targets": "^7.28.6", + "@babel/helper-plugin-utils": "^7.28.6", + "@babel/helper-validator-option": "^7.27.1", + "@babel/plugin-bugfix-firefox-class-in-computed-class-key": "^7.28.5", + "@babel/plugin-bugfix-safari-class-field-initializer-scope": "^7.27.1", + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.27.1", + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.27.1", + "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": "^7.28.6", + "@babel/plugin-proposal-private-property-in-object": "7.21.0-placeholder-for-preset-env.2", + "@babel/plugin-syntax-import-assertions": "^7.28.6", + "@babel/plugin-syntax-import-attributes": "^7.28.6", + "@babel/plugin-syntax-unicode-sets-regex": "^7.18.6", + "@babel/plugin-transform-arrow-functions": "^7.27.1", + "@babel/plugin-transform-async-generator-functions": "^7.29.0", + "@babel/plugin-transform-async-to-generator": "^7.28.6", + "@babel/plugin-transform-block-scoped-functions": "^7.27.1", + "@babel/plugin-transform-block-scoping": "^7.28.6", + "@babel/plugin-transform-class-properties": "^7.28.6", + "@babel/plugin-transform-class-static-block": "^7.28.6", + "@babel/plugin-transform-classes": "^7.28.6", + "@babel/plugin-transform-computed-properties": "^7.28.6", + "@babel/plugin-transform-destructuring": "^7.28.5", + "@babel/plugin-transform-dotall-regex": "^7.28.6", + "@babel/plugin-transform-duplicate-keys": "^7.27.1", + "@babel/plugin-transform-duplicate-named-capturing-groups-regex": "^7.29.0", + "@babel/plugin-transform-dynamic-import": "^7.27.1", + "@babel/plugin-transform-explicit-resource-management": "^7.28.6", + "@babel/plugin-transform-exponentiation-operator": "^7.28.6", + "@babel/plugin-transform-export-namespace-from": "^7.27.1", + "@babel/plugin-transform-for-of": "^7.27.1", + "@babel/plugin-transform-function-name": "^7.27.1", + "@babel/plugin-transform-json-strings": "^7.28.6", + "@babel/plugin-transform-literals": "^7.27.1", + "@babel/plugin-transform-logical-assignment-operators": "^7.28.6", + "@babel/plugin-transform-member-expression-literals": "^7.27.1", + "@babel/plugin-transform-modules-amd": "^7.27.1", + "@babel/plugin-transform-modules-commonjs": "^7.28.6", + "@babel/plugin-transform-modules-systemjs": "^7.29.0", + "@babel/plugin-transform-modules-umd": "^7.27.1", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.29.0", + "@babel/plugin-transform-new-target": "^7.27.1", + "@babel/plugin-transform-nullish-coalescing-operator": "^7.28.6", + "@babel/plugin-transform-numeric-separator": "^7.28.6", + "@babel/plugin-transform-object-rest-spread": "^7.28.6", + "@babel/plugin-transform-object-super": "^7.27.1", + "@babel/plugin-transform-optional-catch-binding": "^7.28.6", + "@babel/plugin-transform-optional-chaining": "^7.28.6", + "@babel/plugin-transform-parameters": "^7.27.7", + "@babel/plugin-transform-private-methods": "^7.28.6", + "@babel/plugin-transform-private-property-in-object": "^7.28.6", + "@babel/plugin-transform-property-literals": "^7.27.1", + "@babel/plugin-transform-regenerator": "^7.29.0", + "@babel/plugin-transform-regexp-modifiers": "^7.28.6", + "@babel/plugin-transform-reserved-words": "^7.27.1", + "@babel/plugin-transform-shorthand-properties": "^7.27.1", + "@babel/plugin-transform-spread": "^7.28.6", + "@babel/plugin-transform-sticky-regex": "^7.27.1", + "@babel/plugin-transform-template-literals": "^7.27.1", + "@babel/plugin-transform-typeof-symbol": "^7.27.1", + "@babel/plugin-transform-unicode-escapes": "^7.27.1", + "@babel/plugin-transform-unicode-property-regex": "^7.28.6", + "@babel/plugin-transform-unicode-regex": "^7.27.1", + "@babel/plugin-transform-unicode-sets-regex": "^7.28.6", + "@babel/preset-modules": "0.1.6-no-external-plugins", + "babel-plugin-polyfill-corejs2": "^0.4.15", + "babel-plugin-polyfill-corejs3": "^0.14.0", + "babel-plugin-polyfill-regenerator": "^0.6.6", + "core-js-compat": "^3.48.0", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/preset-env/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/preset-modules": { + "version": "0.1.6-no-external-plugins", + "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.6-no-external-plugins.tgz", + "integrity": "sha512-HrcgcIESLm9aIR842yhJ5RWan/gebQUJ6E/E5+rf0y9o6oj7w0Br+sWuL6kEQ/o/AdfvR1Je9jG18/gnpwjEyA==", + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/types": "^7.4.4", + "esutils": "^2.0.2" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0 || ^8.0.0-0 <8.0.0" + } + }, + "node_modules/@babel/runtime": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.28.6.tgz", + "integrity": "sha512-05WQkdpL9COIMz4LjTxGpPNCdlpyimKppYNoJ5Di5EUObifl8t4tuLuUBBZEpoLYOmfvIWrsp9fCl0HoPRVTdA==", + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/template": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.28.6.tgz", + "integrity": "sha512-YA6Ma2KsCdGb+WC6UpBVFJGXL58MDA6oyONbjyF/+5sBgxY/dwkhLogbMT2GXXyU84/IhRw/2D1Os1B/giz+BQ==", + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.28.6", + "@babel/parser": "^7.28.6", + "@babel/types": "^7.28.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.29.0.tgz", + "integrity": "sha512-4HPiQr0X7+waHfyXPZpWPfWL/J7dcN1mx9gL6WdQVMbPnF3+ZhSMs8tCxN7oHddJE9fhNE7+lxdnlyemKfJRuA==", + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.29.0", + "@babel/generator": "^7.29.0", + "@babel/helper-globals": "^7.28.0", + "@babel/parser": "^7.29.0", + "@babel/template": "^7.28.6", + "@babel/types": "^7.29.0", + "debug": "^4.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/types": { + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.0.tgz", + "integrity": "sha512-LwdZHpScM4Qz8Xw2iKSzS+cfglZzJGvofQICy7W7v4caru4EaAmyUuO6BGrbyQ2mYV11W0U8j5mBhd14dd3B0A==", + "license": "MIT", + "dependencies": { + "@babel/helper-string-parser": "^7.27.1", + "@babel/helper-validator-identifier": "^7.28.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@capacitor/android": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/@capacitor/android/-/android-6.2.1.tgz", + "integrity": "sha512-8gd4CIiQO5LAIlPIfd5mCuodBRxMMdZZEdj8qG8m+dQ1sQ2xyemVpzHmRK8qSCHorsBUCg3D62j2cp6bEBAkdw==", + "license": "MIT", + "peerDependencies": { + "@capacitor/core": "^6.2.0" + } + }, + "node_modules/@capacitor/cli": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/@capacitor/cli/-/cli-6.2.1.tgz", + "integrity": "sha512-JKl0FpFge8PgQNInw12kcKieQ4BmOyazQ4JGJOfEpVXlgrX1yPhSZTPjngupzTCiK3I7q7iGG5kjun0fDqgSCA==", + "license": "MIT", + "dependencies": { + "@ionic/cli-framework-output": "^2.2.5", + "@ionic/utils-fs": "^3.1.6", + "@ionic/utils-subprocess": "2.1.11", + "@ionic/utils-terminal": "^2.3.3", + "commander": "^9.3.0", + "debug": "^4.3.4", + "env-paths": "^2.2.0", + "kleur": "^4.1.4", + "native-run": "^2.0.0", + "open": "^8.4.0", + "plist": "^3.0.5", + "prompts": "^2.4.2", + "rimraf": "^4.4.1", + "semver": "^7.3.7", + "tar": "^6.1.11", + "tslib": "^2.4.0", + "xml2js": "^0.5.0" + }, + "bin": { + "cap": "bin/capacitor", + "capacitor": "bin/capacitor" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@capacitor/core": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/@capacitor/core/-/core-6.2.1.tgz", + "integrity": "sha512-urZwxa7hVE/BnA18oCFAdizXPse6fCKanQyEqpmz6cBJ2vObwMpyJDG5jBeoSsgocS9+Ax+9vb4ducWJn0y2qQ==", + "license": "MIT", + "dependencies": { + "tslib": "^2.1.0" + } + }, + "node_modules/@csstools/color-helpers": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@csstools/color-helpers/-/color-helpers-5.1.0.tgz", + "integrity": "sha512-S11EXWJyy0Mz5SYvRmY8nJYTFFd1LCNV+7cXyAgQtOOuzb4EsgfqDufL+9esx72/eLhsRdGZwaldu/h+E4t4BA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT-0", + "engines": { + "node": ">=18" + } + }, + "node_modules/@csstools/css-calc": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@csstools/css-calc/-/css-calc-2.1.4.tgz", + "integrity": "sha512-3N8oaj+0juUw/1H3YwmDDJXCgTB1gKU6Hc/bB502u9zR0q2vd786XJH9QfrKIEgFlZmhZiq6epXl4rHqhzsIgQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT", + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@csstools/css-parser-algorithms": "^3.0.5", + "@csstools/css-tokenizer": "^3.0.4" + } + }, + "node_modules/@csstools/css-color-parser": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@csstools/css-color-parser/-/css-color-parser-3.1.0.tgz", + "integrity": "sha512-nbtKwh3a6xNVIp/VRuXV64yTKnb1IjTAEEh3irzS+HkKjAOYLTGNb9pmVNntZ8iVBHcWDA2Dof0QtPgFI1BaTA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT", + "dependencies": { + "@csstools/color-helpers": "^5.1.0", + "@csstools/css-calc": "^2.1.4" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@csstools/css-parser-algorithms": "^3.0.5", + "@csstools/css-tokenizer": "^3.0.4" + } + }, + "node_modules/@csstools/css-parser-algorithms": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@csstools/css-parser-algorithms/-/css-parser-algorithms-3.0.5.tgz", + "integrity": "sha512-DaDeUkXZKjdGhgYaHNJTV9pV7Y9B3b644jCLs9Upc3VeNGg6LWARAT6O+Q+/COo+2gg/bM5rhpMAtf70WqfBdQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT", + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@csstools/css-tokenizer": "^3.0.4" + } + }, + "node_modules/@csstools/css-syntax-patches-for-csstree": { + "version": "1.0.26", + "resolved": "https://registry.npmjs.org/@csstools/css-syntax-patches-for-csstree/-/css-syntax-patches-for-csstree-1.0.26.tgz", + "integrity": "sha512-6boXK0KkzT5u5xOgF6TKB+CLq9SOpEGmkZw0g5n9/7yg85wab3UzSxB8TxhLJ31L4SGJ6BCFRw/iftTha1CJXA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT-0" + }, + "node_modules/@csstools/css-tokenizer": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@csstools/css-tokenizer/-/css-tokenizer-3.0.4.tgz", + "integrity": "sha512-Vd/9EVDiu6PPJt9yAh6roZP6El1xHrdvIVGjyBsHR0RYwNHgL7FJPyIIW4fANJNG6FtyZfvlRPpFI4ZM/lubvw==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/@dimforge/rapier3d-compat": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/@dimforge/rapier3d-compat/-/rapier3d-compat-0.12.0.tgz", + "integrity": "sha512-uekIGetywIgopfD97oDL5PfeezkFpNhwlzlaEYNOA0N6ghdsOvh/HYjSMek5Q2O1PYvRSDFcqFVJl4r4ZBwOow==", + "license": "Apache-2.0" + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.12.tgz", + "integrity": "sha512-Hhmwd6CInZ3dwpuGTF8fJG6yoWmsToE+vYgD4nytZVxcu1ulHpUQRAB1UJ8+N1Am3Mz4+xOByoQoSZf4D+CpkA==", + "cpu": [ + "ppc64" + ], + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.12.tgz", + "integrity": "sha512-VJ+sKvNA/GE7Ccacc9Cha7bpS8nyzVv0jdVgwNDaR4gDMC/2TTRc33Ip8qrNYUcpkOHUT5OZ0bUcNNVZQ9RLlg==", + "cpu": [ + "arm" + ], + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.12.tgz", + "integrity": "sha512-6AAmLG7zwD1Z159jCKPvAxZd4y/VTO0VkprYy+3N2FtJ8+BQWFXU+OxARIwA46c5tdD9SsKGZ/1ocqBS/gAKHg==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.12.tgz", + "integrity": "sha512-5jbb+2hhDHx5phYR2By8GTWEzn6I9UqR11Kwf22iKbNpYrsmRB18aX/9ivc5cabcUiAT/wM+YIZ6SG9QO6a8kg==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.12.tgz", + "integrity": "sha512-N3zl+lxHCifgIlcMUP5016ESkeQjLj/959RxxNYIthIg+CQHInujFuXeWbWMgnTo4cp5XVHqFPmpyu9J65C1Yg==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.12.tgz", + "integrity": "sha512-HQ9ka4Kx21qHXwtlTUVbKJOAnmG1ipXhdWTmNXiPzPfWKpXqASVcWdnf2bnL73wgjNrFXAa3yYvBSd9pzfEIpA==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.12.tgz", + "integrity": "sha512-gA0Bx759+7Jve03K1S0vkOu5Lg/85dou3EseOGUes8flVOGxbhDDh/iZaoek11Y8mtyKPGF3vP8XhnkDEAmzeg==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.12.tgz", + "integrity": "sha512-TGbO26Yw2xsHzxtbVFGEXBFH0FRAP7gtcPE7P5yP7wGy7cXK2oO7RyOhL5NLiqTlBh47XhmIUXuGciXEqYFfBQ==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.12.tgz", + "integrity": "sha512-lPDGyC1JPDou8kGcywY0YILzWlhhnRjdof3UlcoqYmS9El818LLfJJc3PXXgZHrHCAKs/Z2SeZtDJr5MrkxtOw==", + "cpu": [ + "arm" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.12.tgz", + "integrity": "sha512-8bwX7a8FghIgrupcxb4aUmYDLp8pX06rGh5HqDT7bB+8Rdells6mHvrFHHW2JAOPZUbnjUpKTLg6ECyzvas2AQ==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.12.tgz", + "integrity": "sha512-0y9KrdVnbMM2/vG8KfU0byhUN+EFCny9+8g202gYqSSVMonbsCfLjUO+rCci7pM0WBEtz+oK/PIwHkzxkyharA==", + "cpu": [ + "ia32" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.12.tgz", + "integrity": "sha512-h///Lr5a9rib/v1GGqXVGzjL4TMvVTv+s1DPoxQdz7l/AYv6LDSxdIwzxkrPW438oUXiDtwM10o9PmwS/6Z0Ng==", + "cpu": [ + "loong64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.12.tgz", + "integrity": "sha512-iyRrM1Pzy9GFMDLsXn1iHUm18nhKnNMWscjmp4+hpafcZjrr2WbT//d20xaGljXDBYHqRcl8HnxbX6uaA/eGVw==", + "cpu": [ + "mips64el" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.12.tgz", + "integrity": "sha512-9meM/lRXxMi5PSUqEXRCtVjEZBGwB7P/D4yT8UG/mwIdze2aV4Vo6U5gD3+RsoHXKkHCfSxZKzmDssVlRj1QQA==", + "cpu": [ + "ppc64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.12.tgz", + "integrity": "sha512-Zr7KR4hgKUpWAwb1f3o5ygT04MzqVrGEGXGLnj15YQDJErYu/BGg+wmFlIDOdJp0PmB0lLvxFIOXZgFRrdjR0w==", + "cpu": [ + "riscv64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.12.tgz", + "integrity": "sha512-MsKncOcgTNvdtiISc/jZs/Zf8d0cl/t3gYWX8J9ubBnVOwlk65UIEEvgBORTiljloIWnBzLs4qhzPkJcitIzIg==", + "cpu": [ + "s390x" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.12.tgz", + "integrity": "sha512-uqZMTLr/zR/ed4jIGnwSLkaHmPjOjJvnm6TVVitAa08SLS9Z0VM8wIRx7gWbJB5/J54YuIMInDquWyYvQLZkgw==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.12.tgz", + "integrity": "sha512-xXwcTq4GhRM7J9A8Gv5boanHhRa/Q9KLVmcyXHCTaM4wKfIpWkdXiMog/KsnxzJ0A1+nD+zoecuzqPmCRyBGjg==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.12.tgz", + "integrity": "sha512-Ld5pTlzPy3YwGec4OuHh1aCVCRvOXdH8DgRjfDy/oumVovmuSzWfnSJg+VtakB9Cm0gxNO9BzWkj6mtO1FMXkQ==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.12.tgz", + "integrity": "sha512-fF96T6KsBo/pkQI950FARU9apGNTSlZGsv1jZBAlcLL1MLjLNIWPBkj5NlSz8aAzYKg+eNqknrUJ24QBybeR5A==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.12.tgz", + "integrity": "sha512-MZyXUkZHjQxUvzK7rN8DJ3SRmrVrke8ZyRusHlP+kuwqTcfWLyqMOE3sScPPyeIXN/mDJIfGXvcMqCgYKekoQw==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openharmony-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.12.tgz", + "integrity": "sha512-rm0YWsqUSRrjncSXGA7Zv78Nbnw4XL6/dzr20cyrQf7ZmRcsovpcRBdhD43Nuk3y7XIoW2OxMVvwuRvk9XdASg==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.12.tgz", + "integrity": "sha512-3wGSCDyuTHQUzt0nV7bocDy72r2lI33QL3gkDNGkod22EsYl04sMf0qLb8luNKTOmgF/eDEDP5BFNwoBKH441w==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.12.tgz", + "integrity": "sha512-rMmLrur64A7+DKlnSuwqUdRKyd3UE7oPJZmnljqEptesKM8wx9J8gx5u0+9Pq0fQQW8vqeKebwNXdfOyP+8Bsg==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.12.tgz", + "integrity": "sha512-HkqnmmBoCbCwxUKKNPBixiWDGCpQGVsrQfJoVGYLPT41XWF8lHuE5N6WhVia2n4o5QK5M4tYr21827fNhi4byQ==", + "cpu": [ + "ia32" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.12.tgz", + "integrity": "sha512-alJC0uCZpTFrSL0CCDjcgleBXPnCrEAhTBILpeAp7M/OFgoqtAetfBzX0xM00MUsVVPpVjlPuMbREqnZCXaTnA==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@exodus/bytes": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/@exodus/bytes/-/bytes-1.11.0.tgz", + "integrity": "sha512-wO3vd8nsEHdumsXrjGO/v4p6irbg7hy9kvIeR6i2AwylZSk4HJdWgL0FNaVquW1+AweJcdvU1IEpuIWk/WaPnA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^20.19.0 || ^22.12.0 || >=24.0.0" + }, + "peerDependencies": { + "@noble/hashes": "^1.8.0 || ^2.0.0" + }, + "peerDependenciesMeta": { + "@noble/hashes": { + "optional": true + } + } + }, + "node_modules/@google/genai": { + "version": "1.39.0", + "resolved": "https://registry.npmjs.org/@google/genai/-/genai-1.39.0.tgz", + "integrity": "sha512-Vz7AQsOdBeiIcxmXIQNy/hzDvyAOE1lSpWA10itUQza7h3aQFF6QSGaQ7o1GYsjMD3XslK4Ee/Ol0eLhRXb7gA==", + "license": "Apache-2.0", + "dependencies": { + "google-auth-library": "^10.3.0", + "protobufjs": "^7.5.4", + "ws": "^8.18.0" + }, + "engines": { + "node": ">=20.0.0" + }, + "peerDependencies": { + "@modelcontextprotocol/sdk": "^1.25.2" + }, + "peerDependenciesMeta": { + "@modelcontextprotocol/sdk": { + "optional": true + } + } + }, + "node_modules/@ionic/cli-framework-output": { + "version": "2.2.8", + "resolved": "https://registry.npmjs.org/@ionic/cli-framework-output/-/cli-framework-output-2.2.8.tgz", + "integrity": "sha512-TshtaFQsovB4NWRBydbNFawql6yul7d5bMiW1WYYf17hd99V6xdDdk3vtF51bw6sLkxON3bDQpWsnUc9/hVo3g==", + "license": "MIT", + "dependencies": { + "@ionic/utils-terminal": "2.3.5", + "debug": "^4.0.0", + "tslib": "^2.0.1" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@ionic/utils-array": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@ionic/utils-array/-/utils-array-2.1.5.tgz", + "integrity": "sha512-HD72a71IQVBmQckDwmA8RxNVMTbxnaLbgFOl+dO5tbvW9CkkSFCv41h6fUuNsSEVgngfkn0i98HDuZC8mk+lTA==", + "license": "MIT", + "dependencies": { + "debug": "^4.0.0", + "tslib": "^2.0.1" + }, + "engines": { + "node": ">=10.3.0" + } + }, + "node_modules/@ionic/utils-fs": { + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/@ionic/utils-fs/-/utils-fs-3.1.7.tgz", + "integrity": "sha512-2EknRvMVfhnyhL1VhFkSLa5gOcycK91VnjfrTB0kbqkTFCOXyXgVLI5whzq7SLrgD9t1aqos3lMMQyVzaQ5gVA==", + "license": "MIT", + "dependencies": { + "@types/fs-extra": "^8.0.0", + "debug": "^4.0.0", + "fs-extra": "^9.0.0", + "tslib": "^2.0.1" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@ionic/utils-object": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@ionic/utils-object/-/utils-object-2.1.5.tgz", + "integrity": "sha512-XnYNSwfewUqxq+yjER1hxTKggftpNjFLJH0s37jcrNDwbzmbpFTQTVAp4ikNK4rd9DOebX/jbeZb8jfD86IYxw==", + "license": "MIT", + "dependencies": { + "debug": "^4.0.0", + "tslib": "^2.0.1" + }, + "engines": { + "node": ">=10.3.0" + } + }, + "node_modules/@ionic/utils-process": { + "version": "2.1.10", + "resolved": "https://registry.npmjs.org/@ionic/utils-process/-/utils-process-2.1.10.tgz", + "integrity": "sha512-mZ7JEowcuGQK+SKsJXi0liYTcXd2bNMR3nE0CyTROpMECUpJeAvvaBaPGZf5ERQUPeWBVuwqAqjUmIdxhz5bxw==", + "license": "MIT", + "dependencies": { + "@ionic/utils-object": "2.1.5", + "@ionic/utils-terminal": "2.3.3", + "debug": "^4.0.0", + "signal-exit": "^3.0.3", + "tree-kill": "^1.2.2", + "tslib": "^2.0.1" + }, + "engines": { + "node": ">=10.3.0" + } + }, + "node_modules/@ionic/utils-process/node_modules/@ionic/utils-terminal": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/@ionic/utils-terminal/-/utils-terminal-2.3.3.tgz", + "integrity": "sha512-RnuSfNZ5fLEyX3R5mtcMY97cGD1A0NVBbarsSQ6yMMfRJ5YHU7hHVyUfvZeClbqkBC/pAqI/rYJuXKCT9YeMCQ==", + "license": "MIT", + "dependencies": { + "@types/slice-ansi": "^4.0.0", + "debug": "^4.0.0", + "signal-exit": "^3.0.3", + "slice-ansi": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0", + "tslib": "^2.0.1", + "untildify": "^4.0.0", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=10.3.0" + } + }, + "node_modules/@ionic/utils-stream": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/@ionic/utils-stream/-/utils-stream-3.1.5.tgz", + "integrity": "sha512-hkm46uHvEC05X/8PHgdJi4l4zv9VQDELZTM+Kz69odtO9zZYfnt8DkfXHJqJ+PxmtiE5mk/ehJWLnn/XAczTUw==", + "license": "MIT", + "dependencies": { + "debug": "^4.0.0", + "tslib": "^2.0.1" + }, + "engines": { + "node": ">=10.3.0" + } + }, + "node_modules/@ionic/utils-subprocess": { + "version": "2.1.11", + "resolved": "https://registry.npmjs.org/@ionic/utils-subprocess/-/utils-subprocess-2.1.11.tgz", + "integrity": "sha512-6zCDixNmZCbMCy5np8klSxOZF85kuDyzZSTTQKQP90ZtYNCcPYmuFSzaqDwApJT4r5L3MY3JrqK1gLkc6xiUPw==", + "license": "MIT", + "dependencies": { + "@ionic/utils-array": "2.1.5", + "@ionic/utils-fs": "3.1.6", + "@ionic/utils-process": "2.1.10", + "@ionic/utils-stream": "3.1.5", + "@ionic/utils-terminal": "2.3.3", + "cross-spawn": "^7.0.3", + "debug": "^4.0.0", + "tslib": "^2.0.1" + }, + "engines": { + "node": ">=10.3.0" + } + }, + "node_modules/@ionic/utils-subprocess/node_modules/@ionic/utils-fs": { + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/@ionic/utils-fs/-/utils-fs-3.1.6.tgz", + "integrity": "sha512-eikrNkK89CfGPmexjTfSWl4EYqsPSBh0Ka7by4F0PLc1hJZYtJxUZV3X4r5ecA8ikjicUmcbU7zJmAjmqutG/w==", + "license": "MIT", + "dependencies": { + "@types/fs-extra": "^8.0.0", + "debug": "^4.0.0", + "fs-extra": "^9.0.0", + "tslib": "^2.0.1" + }, + "engines": { + "node": ">=10.3.0" + } + }, + "node_modules/@ionic/utils-subprocess/node_modules/@ionic/utils-terminal": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/@ionic/utils-terminal/-/utils-terminal-2.3.3.tgz", + "integrity": "sha512-RnuSfNZ5fLEyX3R5mtcMY97cGD1A0NVBbarsSQ6yMMfRJ5YHU7hHVyUfvZeClbqkBC/pAqI/rYJuXKCT9YeMCQ==", + "license": "MIT", + "dependencies": { + "@types/slice-ansi": "^4.0.0", + "debug": "^4.0.0", + "signal-exit": "^3.0.3", + "slice-ansi": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0", + "tslib": "^2.0.1", + "untildify": "^4.0.0", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=10.3.0" + } + }, + "node_modules/@ionic/utils-terminal": { + "version": "2.3.5", + "resolved": "https://registry.npmjs.org/@ionic/utils-terminal/-/utils-terminal-2.3.5.tgz", + "integrity": "sha512-3cKScz9Jx2/Pr9ijj1OzGlBDfcmx7OMVBt4+P1uRR0SSW4cm1/y3Mo4OY3lfkuaYifMNBW8Wz6lQHbs1bihr7A==", + "license": "MIT", + "dependencies": { + "@types/slice-ansi": "^4.0.0", + "debug": "^4.0.0", + "signal-exit": "^3.0.3", + "slice-ansi": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0", + "tslib": "^2.0.1", + "untildify": "^4.0.0", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@isaacs/balanced-match": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@isaacs/balanced-match/-/balanced-match-4.0.1.tgz", + "integrity": "sha512-yzMTt9lEb8Gv7zRioUilSglI0c0smZ9k5D65677DLWLtWJaXIS3CqcGyUFByYKlnUj6TkjLVs54fBl6+TiGQDQ==", + "license": "MIT", + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/@isaacs/brace-expansion": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@isaacs/brace-expansion/-/brace-expansion-5.0.1.tgz", + "integrity": "sha512-WMz71T1JS624nWj2n2fnYAuPovhv7EUhk69R6i9dsVyzxt5eM3bjwvgk9L+APE1TRscGysAVMANkB0jh0LQZrQ==", + "license": "MIT", + "dependencies": { + "@isaacs/balanced-match": "^4.0.1" + }, + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "license": "ISC", + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-regex": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", + "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-styles": { + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", + "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "license": "MIT" + }, + "node_modules/@isaacs/cliui/node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "license": "MIT", + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@isaacs/cliui/node_modules/strip-ansi": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", + "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "license": "MIT", + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.13", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", + "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==", + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/remapping": { + "version": "2.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/remapping/-/remapping-2.3.5.tgz", + "integrity": "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==", + "license": "MIT", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/source-map": { + "version": "0.3.11", + "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.11.tgz", + "integrity": "sha512-ZMp1V8ZFcPG5dIWnQLr3NSI1MiCU7UETdS/A0G8V/XWHvJv3ZsFqutJn1Y5RPmAPX6F3BiE397OqveU/9NCuIA==", + "license": "MIT", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", + "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.31", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", + "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@mediapipe/tasks-vision": { + "version": "0.10.17", + "resolved": "https://registry.npmjs.org/@mediapipe/tasks-vision/-/tasks-vision-0.10.17.tgz", + "integrity": "sha512-CZWV/q6TTe8ta61cZXjfnnHsfWIdFhms03M9T7Cnd5y2mdpylJM0rF1qRq+wsQVRMLz1OYPVEBU9ph2Bx8cxrg==", + "license": "Apache-2.0" + }, + "node_modules/@monogrid/gainmap-js": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/@monogrid/gainmap-js/-/gainmap-js-3.4.0.tgz", + "integrity": "sha512-2Z0FATFHaoYJ8b+Y4y4Hgfn3FRFwuU5zRrk+9dFWp4uGAdHGqVEdP7HP+gLA3X469KXHmfupJaUbKo1b/aDKIg==", + "license": "MIT", + "dependencies": { + "promise-worker-transferable": "^1.0.4" + }, + "peerDependencies": { + "three": ">= 0.159.0" + } + }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/@protobufjs/aspromise": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", + "integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==", + "license": "BSD-3-Clause" + }, + "node_modules/@protobufjs/base64": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", + "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==", + "license": "BSD-3-Clause" + }, + "node_modules/@protobufjs/codegen": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", + "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==", + "license": "BSD-3-Clause" + }, + "node_modules/@protobufjs/eventemitter": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", + "integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==", + "license": "BSD-3-Clause" + }, + "node_modules/@protobufjs/fetch": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", + "integrity": "sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==", + "license": "BSD-3-Clause", + "dependencies": { + "@protobufjs/aspromise": "^1.1.1", + "@protobufjs/inquire": "^1.1.0" + } + }, + "node_modules/@protobufjs/float": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", + "integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==", + "license": "BSD-3-Clause" + }, + "node_modules/@protobufjs/inquire": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", + "integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==", + "license": "BSD-3-Clause" + }, + "node_modules/@protobufjs/path": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", + "integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==", + "license": "BSD-3-Clause" + }, + "node_modules/@protobufjs/pool": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", + "integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==", + "license": "BSD-3-Clause" + }, + "node_modules/@protobufjs/utf8": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", + "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==", + "license": "BSD-3-Clause" + }, + "node_modules/@react-three/drei": { + "version": "10.0.0-rc.1", + "resolved": "https://registry.npmjs.org/@react-three/drei/-/drei-10.0.0-rc.1.tgz", + "integrity": "sha512-SzwqNlx93n11FrnNx5HP3SdC7BQHWvQTQ3qMnB1viz6yOANvTtiO75k1/MBvmMKg/GxTn1SvI8+yj18wTpqtYA==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.26.0", + "@mediapipe/tasks-vision": "0.10.17", + "@monogrid/gainmap-js": "^3.0.6", + "@use-gesture/react": "^10.3.1", + "camera-controls": "^2.9.0", + "cross-env": "^7.0.3", + "detect-gpu": "^5.0.56", + "glsl-noise": "^0.0.0", + "hls.js": "^1.5.17", + "maath": "^0.10.8", + "meshline": "^3.3.1", + "stats-gl": "^2.2.8", + "stats.js": "^0.17.0", + "suspend-react": "^0.1.3", + "three-mesh-bvh": "^0.8.3", + "three-stdlib": "^2.35.6", + "troika-three-text": "^0.52.0", + "tunnel-rat": "^0.1.2", + "use-sync-external-store": "^1.4.0", + "utility-types": "^3.11.0", + "zustand": "^5.0.1" + }, + "peerDependencies": { + "@react-three/fiber": "9.0.0-rc.5", + "react": "^19", + "react-dom": "^19", + "three": ">=0.159" + }, + "peerDependenciesMeta": { + "react-dom": { + "optional": true + } + } + }, + "node_modules/@react-three/fiber": { + "version": "9.0.0-rc.5", + "resolved": "https://registry.npmjs.org/@react-three/fiber/-/fiber-9.0.0-rc.5.tgz", + "integrity": "sha512-xXsiaeTC8VWDTNOX93dOmVriIiPS0DW0z/QcpHU8tKwnslD/vNhF+t7qBHDF6iq2OMp5hkSlcg/Of692SQIC7Q==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.17.8", + "@types/debounce": "^1.2.1", + "@types/react-reconciler": "^0.28.8", + "@types/webxr": "*", + "base64-js": "^1.5.1", + "buffer": "^6.0.3", + "debounce": "^1.2.1", + "its-fine": "^1.2.5", + "react-reconciler": "0.31.0", + "scheduler": "0.25.0", + "suspend-react": "^0.1.3", + "zustand": "^4.1.2" + }, + "peerDependencies": { + "expo": ">=43.0", + "expo-asset": ">=8.4", + "expo-file-system": ">=11.0", + "expo-gl": ">=11.0", + "react": "^19.0.0", + "react-dom": "^19.0.0", + "react-native": ">=0.78", + "three": ">=0.156" + }, + "peerDependenciesMeta": { + "expo": { + "optional": true + }, + "expo-asset": { + "optional": true + }, + "expo-file-system": { + "optional": true + }, + "expo-gl": { + "optional": true + }, + "react-dom": { + "optional": true + }, + "react-native": { + "optional": true + } + } + }, + "node_modules/@react-three/fiber/node_modules/zustand": { + "version": "4.5.7", + "resolved": "https://registry.npmjs.org/zustand/-/zustand-4.5.7.tgz", + "integrity": "sha512-CHOUy7mu3lbD6o6LJLfllpjkzhHXSBlX8B9+qPddUsIfeF5S/UZ5q0kmCsnRqT1UHFQZchNFDDzMbQsuesHWlw==", + "license": "MIT", + "dependencies": { + "use-sync-external-store": "^1.2.2" + }, + "engines": { + "node": ">=12.7.0" + }, + "peerDependencies": { + "@types/react": ">=16.8", + "immer": ">=9.0.6", + "react": ">=16.8" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "immer": { + "optional": true + }, + "react": { + "optional": true + } + } + }, + "node_modules/@rolldown/pluginutils": { + "version": "1.0.0-rc.2", + "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.0-rc.2.tgz", + "integrity": "sha512-izyXV/v+cHiRfozX62W9htOAvwMo4/bXKDrQ+vom1L1qRuexPock/7VZDAhnpHCLNejd3NJ6hiab+tO0D44Rgw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@rollup/plugin-babel": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/@rollup/plugin-babel/-/plugin-babel-5.3.1.tgz", + "integrity": "sha512-WFfdLWU/xVWKeRQnKmIAQULUI7Il0gZnBIH/ZFO069wYIfPu+8zrfp/KMW0atmELoRDq8FbiP3VCss9MhCut7Q==", + "license": "MIT", + "dependencies": { + "@babel/helper-module-imports": "^7.10.4", + "@rollup/pluginutils": "^3.1.0" + }, + "engines": { + "node": ">= 10.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0", + "@types/babel__core": "^7.1.9", + "rollup": "^1.20.0||^2.0.0" + }, + "peerDependenciesMeta": { + "@types/babel__core": { + "optional": true + } + } + }, + "node_modules/@rollup/plugin-node-resolve": { + "version": "15.3.1", + "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-15.3.1.tgz", + "integrity": "sha512-tgg6b91pAybXHJQMAAwW9VuWBO6Thi+q7BCNARLwSqlmsHz0XYURtGvh/AuwSADXSI4h/2uHbs7s4FzlZDGSGA==", + "license": "MIT", + "dependencies": { + "@rollup/pluginutils": "^5.0.1", + "@types/resolve": "1.20.2", + "deepmerge": "^4.2.2", + "is-module": "^1.0.0", + "resolve": "^1.22.1" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^2.78.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } + }, + "node_modules/@rollup/plugin-node-resolve/node_modules/@rollup/pluginutils": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.3.0.tgz", + "integrity": "sha512-5EdhGZtnu3V88ces7s53hhfK5KSASnJZv8Lulpc04cWO3REESroJXg73DFsOmgbU2BhwV0E20bu2IDZb3VKW4Q==", + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.0", + "estree-walker": "^2.0.2", + "picomatch": "^4.0.2" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } + }, + "node_modules/@rollup/plugin-node-resolve/node_modules/estree-walker": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", + "license": "MIT" + }, + "node_modules/@rollup/plugin-replace": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/@rollup/plugin-replace/-/plugin-replace-2.4.2.tgz", + "integrity": "sha512-IGcu+cydlUMZ5En85jxHH4qj2hta/11BHq95iHEyb2sbgiN0eCdzvUcHw5gt9pBL5lTi4JDYJ1acCoMGpTvEZg==", + "license": "MIT", + "dependencies": { + "@rollup/pluginutils": "^3.1.0", + "magic-string": "^0.25.7" + }, + "peerDependencies": { + "rollup": "^1.20.0 || ^2.0.0" + } + }, + "node_modules/@rollup/plugin-terser": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/@rollup/plugin-terser/-/plugin-terser-0.4.4.tgz", + "integrity": "sha512-XHeJC5Bgvs8LfukDwWZp7yeqin6ns8RTl2B9avbejt6tZqsqvVoWI7ZTQrcNsfKEDWBTnTxM8nMDkO2IFFbd0A==", + "license": "MIT", + "dependencies": { + "serialize-javascript": "^6.0.1", + "smob": "^1.0.0", + "terser": "^5.17.4" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^2.0.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } + }, + "node_modules/@rollup/pluginutils": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.1.0.tgz", + "integrity": "sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==", + "license": "MIT", + "dependencies": { + "@types/estree": "0.0.39", + "estree-walker": "^1.0.1", + "picomatch": "^2.2.2" + }, + "engines": { + "node": ">= 8.0.0" + }, + "peerDependencies": { + "rollup": "^1.20.0||^2.0.0" + } + }, + "node_modules/@rollup/pluginutils/node_modules/@types/estree": { + "version": "0.0.39", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", + "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==", + "license": "MIT" + }, + "node_modules/@rollup/pluginutils/node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.60.2.tgz", + "integrity": "sha512-dnlp69efPPg6Uaw2dVqzWRfAWRnYVb1XJ8CyyhIbZeaq4CA5/mLeZ1IEt9QqQxmbdvagjLIm2ZL8BxXv5lH4Yw==", + "cpu": [ + "arm" + ], + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.60.2.tgz", + "integrity": "sha512-OqZTwDRDchGRHHm/hwLOL7uVPB9aUvI0am/eQuWMNyFHf5PSEQmyEeYYheA0EPPKUO/l0uigCp+iaTjoLjVoHg==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.60.2.tgz", + "integrity": "sha512-UwRE7CGpvSVEQS8gUMBe1uADWjNnVgP3Iusyda1nSRwNDCsRjnGc7w6El6WLQsXmZTbLZx9cecegumcitNfpmA==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.60.2.tgz", + "integrity": "sha512-gjEtURKLCC5VXm1I+2i1u9OhxFsKAQJKTVB8WvDAHF+oZlq0GTVFOlTlO1q3AlCTE/DF32c16ESvfgqR7343/g==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-freebsd-arm64": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.60.2.tgz", + "integrity": "sha512-Bcl6CYDeAgE70cqZaMojOi/eK63h5Me97ZqAQoh77VPjMysA/4ORQBRGo3rRy45x4MzVlU9uZxs8Uwy7ZaKnBw==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-freebsd-x64": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.60.2.tgz", + "integrity": "sha512-LU+TPda3mAE2QB0/Hp5VyeKJivpC6+tlOXd1VMoXV/YFMvk/MNk5iXeBfB4MQGRWyOYVJ01625vjkr0Az98OJQ==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.60.2.tgz", + "integrity": "sha512-2QxQrM+KQ7DAW4o22j+XZ6RKdxjLD7BOWTP0Bv0tmjdyhXSsr2Ul1oJDQqh9Zf5qOwTuTc7Ek83mOFaKnodPjg==", + "cpu": [ + "arm" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.60.2.tgz", + "integrity": "sha512-TbziEu2DVsTEOPif2mKWkMeDMLoYjx95oESa9fkQQK7r/Orta0gnkcDpzwufEcAO2BLBsD7mZkXGFqEdMRRwfw==", + "cpu": [ + "arm" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.60.2.tgz", + "integrity": "sha512-bO/rVDiDUuM2YfuCUwZ1t1cP+/yqjqz+Xf2VtkdppefuOFS2OSeAfgafaHNkFn0t02hEyXngZkxtGqXcXwO8Rg==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.60.2.tgz", + "integrity": "sha512-hr26p7e93Rl0Za+JwW7EAnwAvKkehh12BU1Llm9Ykiibg4uIr2rbpxG9WCf56GuvidlTG9KiiQT/TXT1yAWxTA==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-gnu": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.60.2.tgz", + "integrity": "sha512-pOjB/uSIyDt+ow3k/RcLvUAOGpysT2phDn7TTUB3n75SlIgZzM6NKAqlErPhoFU+npgY3/n+2HYIQVbF70P9/A==", + "cpu": [ + "loong64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-musl": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.60.2.tgz", + "integrity": "sha512-2/w+q8jszv9Ww1c+6uJT3OwqhdmGP2/4T17cu8WuwyUuuaCDDJ2ojdyYwZzCxx0GcsZBhzi3HmH+J5pZNXnd+Q==", + "cpu": [ + "loong64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-gnu": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.60.2.tgz", + "integrity": "sha512-11+aL5vKheYgczxtPVVRhdptAM2H7fcDR5Gw4/bTcteuZBlH4oP9f5s9zYO9aGZvoGeBpqXI/9TZZihZ609wKw==", + "cpu": [ + "ppc64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-musl": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.60.2.tgz", + "integrity": "sha512-i16fokAGK46IVZuV8LIIwMdtqhin9hfYkCh8pf8iC3QU3LpwL+1FSFGej+O7l3E/AoknL6Dclh2oTdnRMpTzFQ==", + "cpu": [ + "ppc64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.60.2.tgz", + "integrity": "sha512-49FkKS6RGQoriDSK/6E2GkAsAuU5kETFCh7pG4yD/ylj9rKhTmO3elsnmBvRD4PgJPds5W2PkhC82aVwmUcJ7A==", + "cpu": [ + "riscv64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-musl": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.60.2.tgz", + "integrity": "sha512-mjYNkHPfGpUR00DuM1ZZIgs64Hpf4bWcz9Z41+4Q+pgDx73UwWdAYyf6EG/lRFldmdHHzgrYyge5akFUW0D3mQ==", + "cpu": [ + "riscv64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.60.2.tgz", + "integrity": "sha512-ALyvJz965BQk8E9Al/JDKKDLH2kfKFLTGMlgkAbbYtZuJt9LU8DW3ZoDMCtQpXAltZxwBHevXz5u+gf0yA0YoA==", + "cpu": [ + "s390x" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.60.2.tgz", + "integrity": "sha512-UQjrkIdWrKI626Du8lCQ6MJp/6V1LAo2bOK9OTu4mSn8GGXIkPXk/Vsp4bLHCd9Z9Iz2OTEaokUE90VweJgIYQ==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.60.2.tgz", + "integrity": "sha512-bTsRGj6VlSdn/XD4CGyzMnzaBs9bsRxy79eTqTCBsA8TMIEky7qg48aPkvJvFe1HyzQ5oMZdg7AnVlWQSKLTnw==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-openbsd-x64": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.60.2.tgz", + "integrity": "sha512-6d4Z3534xitaA1FcMWP7mQPq5zGwBmGbhphh2DwaA1aNIXUu3KTOfwrWpbwI4/Gr0uANo7NTtaykFyO2hPuFLg==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ] + }, + "node_modules/@rollup/rollup-openharmony-arm64": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.60.2.tgz", + "integrity": "sha512-NetAg5iO2uN7eB8zE5qrZ3CSil+7IJt4WDFLcC75Ymywq1VZVD6qJ6EvNLjZ3rEm6gB7XW5JdT60c6MN35Z85Q==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.60.2.tgz", + "integrity": "sha512-NCYhOotpgWZ5kdxCZsv6Iudx0wX8980Q/oW4pNFNihpBKsDbEA1zpkfxJGC0yugsUuyDZ7gL37dbzwhR0VI7pQ==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.60.2.tgz", + "integrity": "sha512-RXsaOqXxfoUBQoOgvmmijVxJnW2IGB0eoMO7F8FAjaj0UTywUO/luSqimWBJn04WNgUkeNhh7fs7pESXajWmkg==", + "cpu": [ + "ia32" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-gnu": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.60.2.tgz", + "integrity": "sha512-qdAzEULD+/hzObedtmV6iBpdL5TIbKVztGiK7O3/KYSf+HIzU257+MX1EXJcyIiDbMAqmbwaufcYPvyRryeZtA==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.60.2.tgz", + "integrity": "sha512-Nd/SgG27WoA9e+/TdK74KnHz852TLa94ovOYySo/yMPuTmpckK/jIF2jSwS3g7ELSKXK13/cVdmg1Z/DaCWKxA==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@standard-schema/spec": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@standard-schema/spec/-/spec-1.1.0.tgz", + "integrity": "sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==", + "dev": true, + "license": "MIT" + }, + "node_modules/@surma/rollup-plugin-off-main-thread": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/@surma/rollup-plugin-off-main-thread/-/rollup-plugin-off-main-thread-2.2.3.tgz", + "integrity": "sha512-lR8q/9W7hZpMWweNiAKU7NQerBnzQQLvi8qnTDU/fxItPhtZVMbPV3lbCwjhIlNBe9Bbr5V+KHshvWmVSG9cxQ==", + "license": "Apache-2.0", + "dependencies": { + "ejs": "^3.1.6", + "json5": "^2.2.0", + "magic-string": "^0.25.0", + "string.prototype.matchall": "^4.0.6" + } + }, + "node_modules/@tailwindcss/node": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/@tailwindcss/node/-/node-4.2.4.tgz", + "integrity": "sha512-Ai7+yQPxz3ddrDQzFfBKdHEVBg0w3Zl83jnjuwxnZOsnH9pGn93QHQtpU0p/8rYWxvbFZHneni6p1BSLK4DkGA==", + "license": "MIT", + "dependencies": { + "@jridgewell/remapping": "^2.3.5", + "enhanced-resolve": "^5.19.0", + "jiti": "^2.6.1", + "lightningcss": "1.32.0", + "magic-string": "^0.30.21", + "source-map-js": "^1.2.1", + "tailwindcss": "4.2.4" + } + }, + "node_modules/@tailwindcss/node/node_modules/magic-string": { + "version": "0.30.21", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz", + "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==", + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.5" + } + }, + "node_modules/@tailwindcss/oxide": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide/-/oxide-4.2.4.tgz", + "integrity": "sha512-9El/iI069DKDSXwTvB9J4BwdO5JhRrOweGaK25taBAvBXyXqJAX+Jqdvs8r8gKpsI/1m0LeJLyQYTf/WLrBT1Q==", + "license": "MIT", + "engines": { + "node": ">= 20" + }, + "optionalDependencies": { + "@tailwindcss/oxide-android-arm64": "4.2.4", + "@tailwindcss/oxide-darwin-arm64": "4.2.4", + "@tailwindcss/oxide-darwin-x64": "4.2.4", + "@tailwindcss/oxide-freebsd-x64": "4.2.4", + "@tailwindcss/oxide-linux-arm-gnueabihf": "4.2.4", + "@tailwindcss/oxide-linux-arm64-gnu": "4.2.4", + "@tailwindcss/oxide-linux-arm64-musl": "4.2.4", + "@tailwindcss/oxide-linux-x64-gnu": "4.2.4", + "@tailwindcss/oxide-linux-x64-musl": "4.2.4", + "@tailwindcss/oxide-wasm32-wasi": "4.2.4", + "@tailwindcss/oxide-win32-arm64-msvc": "4.2.4", + "@tailwindcss/oxide-win32-x64-msvc": "4.2.4" + } + }, + "node_modules/@tailwindcss/oxide-android-arm64": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-android-arm64/-/oxide-android-arm64-4.2.4.tgz", + "integrity": "sha512-e7MOr1SAn9U8KlZzPi1ZXGZHeC5anY36qjNwmZv9pOJ8E4Q6jmD1vyEHkQFmNOIN7twGPEMXRHmitN4zCMN03g==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-darwin-arm64": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-arm64/-/oxide-darwin-arm64-4.2.4.tgz", + "integrity": "sha512-tSC/Kbqpz/5/o/C2sG7QvOxAKqyd10bq+ypZNf+9Fi2TvbVbv1zNpcEptcsU7DPROaSbVgUXmrzKhurFvo5eDg==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-darwin-x64": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-x64/-/oxide-darwin-x64-4.2.4.tgz", + "integrity": "sha512-yPyUXn3yO/ufR6+Kzv0t4fCg2qNr90jxXc5QqBpjlPNd0NqyDXcmQb/6weunH/MEDXW5dhyEi+agTDiqa3WsGg==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-freebsd-x64": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-freebsd-x64/-/oxide-freebsd-x64-4.2.4.tgz", + "integrity": "sha512-BoMIB4vMQtZsXdGLVc2z+P9DbETkiopogfWZKbWwM8b/1Vinbs4YcUwo+kM/KeLkX3Ygrf4/PsRndKaYhS8Eiw==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-arm-gnueabihf": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm-gnueabihf/-/oxide-linux-arm-gnueabihf-4.2.4.tgz", + "integrity": "sha512-7pIHBLTHYRAlS7V22JNuTh33yLH4VElwKtB3bwchK/UaKUPpQ0lPQiOWcbm4V3WP2I6fNIJ23vABIvoy2izdwA==", + "cpu": [ + "arm" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-arm64-gnu": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-gnu/-/oxide-linux-arm64-gnu-4.2.4.tgz", + "integrity": "sha512-+E4wxJ0ZGOzSH325reXTWB48l42i93kQqMvDyz5gqfRzRZ7faNhnmvlV4EPGJU3QJM/3Ab5jhJ5pCRUsKn6OQw==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-arm64-musl": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-musl/-/oxide-linux-arm64-musl-4.2.4.tgz", + "integrity": "sha512-bBADEGAbo4ASnppIziaQJelekCxdMaxisrk+fB7Thit72IBnALp9K6ffA2G4ruj90G9XRS2VQ6q2bCKbfFV82g==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-x64-gnu": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-gnu/-/oxide-linux-x64-gnu-4.2.4.tgz", + "integrity": "sha512-7Mx25E4WTfnht0TVRTyC00j3i0M+EeFe7wguMDTlX4mRxafznw0CA8WJkFjWYH5BlgELd1kSjuU2JiPnNZbJDA==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-x64-musl": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-musl/-/oxide-linux-x64-musl-4.2.4.tgz", + "integrity": "sha512-2wwJRF7nyhOR0hhHoChc04xngV3iS+akccHTGtz965FwF0up4b2lOdo6kI1EbDaEXKgvcrFBYcYQQ/rrnWFVfA==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-wasm32-wasi": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-wasm32-wasi/-/oxide-wasm32-wasi-4.2.4.tgz", + "integrity": "sha512-FQsqApeor8Fo6gUEklzmaa9994orJZZDBAlQpK2Mq+DslRKFJeD6AjHpBQ0kZFQohVr8o85PPh8eOy86VlSCmw==", + "bundleDependencies": [ + "@napi-rs/wasm-runtime", + "@emnapi/core", + "@emnapi/runtime", + "@tybys/wasm-util", + "@emnapi/wasi-threads", + "tslib" + ], + "cpu": [ + "wasm32" + ], + "license": "MIT", + "optional": true, + "dependencies": { + "@emnapi/core": "^1.8.1", + "@emnapi/runtime": "^1.8.1", + "@emnapi/wasi-threads": "^1.1.0", + "@napi-rs/wasm-runtime": "^1.1.1", + "@tybys/wasm-util": "^0.10.1", + "tslib": "^2.8.1" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@tailwindcss/oxide-win32-arm64-msvc": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-arm64-msvc/-/oxide-win32-arm64-msvc-4.2.4.tgz", + "integrity": "sha512-L9BXqxC4ToVgwMFqj3pmZRqyHEztulpUJzCxUtLjobMCzTPsGt1Fa9enKbOpY2iIyVtaHNeNvAK8ERP/64sqGQ==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-win32-x64-msvc": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-x64-msvc/-/oxide-win32-x64-msvc-4.2.4.tgz", + "integrity": "sha512-ESlKG0EpVJQwRjXDDa9rLvhEAh0mhP1sF7sap9dNZT0yyl9SAG6T7gdP09EH0vIv0UNTlo6jPWyujD6559fZvw==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/postcss": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/@tailwindcss/postcss/-/postcss-4.2.4.tgz", + "integrity": "sha512-wgAVj6nUWAolAu8YFvzT2cTBIElWHkjZwFYovF+xsqKsW2ADxM/X2opxj5NsF/qVccAOjRNe8X2IdPzMsWyHTg==", + "license": "MIT", + "dependencies": { + "@alloc/quick-lru": "^5.2.0", + "@tailwindcss/node": "4.2.4", + "@tailwindcss/oxide": "4.2.4", + "postcss": "^8.5.6", + "tailwindcss": "4.2.4" + } + }, + "node_modules/@testing-library/dom": { + "version": "10.4.1", + "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-10.4.1.tgz", + "integrity": "sha512-o4PXJQidqJl82ckFaXUeoAW+XysPLauYI43Abki5hABd853iMhitooc6znOnczgbTYmEP6U6/y1ZyKAIsvMKGg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.10.4", + "@babel/runtime": "^7.12.5", + "@types/aria-query": "^5.0.1", + "aria-query": "5.3.0", + "dom-accessibility-api": "^0.5.9", + "lz-string": "^1.5.0", + "picocolors": "1.1.1", + "pretty-format": "^27.0.2" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@testing-library/jest-dom": { + "version": "6.9.1", + "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-6.9.1.tgz", + "integrity": "sha512-zIcONa+hVtVSSep9UT3jZ5rizo2BsxgyDYU7WFD5eICBE7no3881HGeb/QkGfsJs6JTkY1aQhT7rIPC7e+0nnA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@adobe/css-tools": "^4.4.0", + "aria-query": "^5.0.0", + "css.escape": "^1.5.1", + "dom-accessibility-api": "^0.6.3", + "picocolors": "^1.1.1", + "redent": "^3.0.0" + }, + "engines": { + "node": ">=14", + "npm": ">=6", + "yarn": ">=1" + } + }, + "node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.6.3.tgz", + "integrity": "sha512-7ZgogeTnjuHbo+ct10G9Ffp0mif17idi0IyWNVA/wcwcm7NPOD/WEHVP3n7n3MhXqxoIYm8d6MuZohYWIZ4T3w==", + "dev": true, + "license": "MIT" + }, + "node_modules/@testing-library/react": { + "version": "16.3.2", + "resolved": "https://registry.npmjs.org/@testing-library/react/-/react-16.3.2.tgz", + "integrity": "sha512-XU5/SytQM+ykqMnAnvB2umaJNIOsLF3PVv//1Ew4CTcpz0/BRyy/af40qqrt7SjKpDdT1saBMc42CUok5gaw+g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.12.5" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@testing-library/dom": "^10.0.0", + "@types/react": "^18.0.0 || ^19.0.0", + "@types/react-dom": "^18.0.0 || ^19.0.0", + "react": "^18.0.0 || ^19.0.0", + "react-dom": "^18.0.0 || ^19.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@tweenjs/tween.js": { + "version": "23.1.3", + "resolved": "https://registry.npmjs.org/@tweenjs/tween.js/-/tween.js-23.1.3.tgz", + "integrity": "sha512-vJmvvwFxYuGnF2axRtPYocag6Clbb5YS7kLL+SO/TeVFzHqDIWrNKYtcsPMibjDx9O+bu+psAy9NKfWklassUA==", + "license": "MIT" + }, + "node_modules/@types/aria-query": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/@types/aria-query/-/aria-query-5.0.4.tgz", + "integrity": "sha512-rfT93uj5s0PRL7EzccGMs3brplhcrghnDoV26NqKhCAS1hVo+WdNsPvE/yb6ilfr5hi2MEk6d5EWJTKdxg8jVw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/babel__core": { + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", + "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.20.7", + "@babel/types": "^7.20.7", + "@types/babel__generator": "*", + "@types/babel__template": "*", + "@types/babel__traverse": "*" + } + }, + "node_modules/@types/babel__generator": { + "version": "7.27.0", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.27.0.tgz", + "integrity": "sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__template": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz", + "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__traverse": { + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.28.0.tgz", + "integrity": "sha512-8PvcXf70gTDZBgt9ptxJ8elBeBjcLOAcOtoO/mPJjtji1+CdGbHgm77om1GrsPxsiE+uXIpNSK64UYaIwQXd4Q==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.28.2" + } + }, + "node_modules/@types/chai": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-5.2.3.tgz", + "integrity": "sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/deep-eql": "*", + "assertion-error": "^2.0.1" + } + }, + "node_modules/@types/debounce": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@types/debounce/-/debounce-1.2.4.tgz", + "integrity": "sha512-jBqiORIzKDOToaF63Fm//haOCHuwQuLa2202RK4MozpA6lh93eCBc+/8+wZn5OzjJt3ySdc+74SXWXB55Ewtyw==", + "license": "MIT" + }, + "node_modules/@types/debug": { + "version": "4.1.12", + "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.12.tgz", + "integrity": "sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==", + "license": "MIT", + "dependencies": { + "@types/ms": "*" + } + }, + "node_modules/@types/deep-eql": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@types/deep-eql/-/deep-eql-4.0.2.tgz", + "integrity": "sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/draco3d": { + "version": "1.4.10", + "resolved": "https://registry.npmjs.org/@types/draco3d/-/draco3d-1.4.10.tgz", + "integrity": "sha512-AX22jp8Y7wwaBgAixaSvkoG4M/+PlAcm3Qs4OW8yT9DM4xUpWKeFhLueTAyZF39pviAdcDdeJoACapiAceqNcw==", + "license": "MIT" + }, + "node_modules/@types/estree": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", + "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", + "license": "MIT" + }, + "node_modules/@types/estree-jsx": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@types/estree-jsx/-/estree-jsx-1.0.5.tgz", + "integrity": "sha512-52CcUVNFyfb1A2ALocQw/Dd1BQFNmSdkuC3BkZ6iqhdMfQz7JWOFRuJFloOzjk+6WijU56m9oKXFAXc7o3Towg==", + "license": "MIT", + "dependencies": { + "@types/estree": "*" + } + }, + "node_modules/@types/fs-extra": { + "version": "8.1.5", + "resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-8.1.5.tgz", + "integrity": "sha512-0dzKcwO+S8s2kuF5Z9oUWatQJj5Uq/iqphEtE3GQJVRRYm/tD1LglU2UnXi2A8jLq5umkGouOXOR9y0n613ZwQ==", + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/hast": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/hast/-/hast-3.0.4.tgz", + "integrity": "sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==", + "license": "MIT", + "dependencies": { + "@types/unist": "*" + } + }, + "node_modules/@types/mdast": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-4.0.4.tgz", + "integrity": "sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==", + "license": "MIT", + "dependencies": { + "@types/unist": "*" + } + }, + "node_modules/@types/ms": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@types/ms/-/ms-2.1.0.tgz", + "integrity": "sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA==", + "license": "MIT" + }, + "node_modules/@types/node": { + "version": "22.19.8", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.19.8.tgz", + "integrity": "sha512-ebO/Yl+EAvVe8DnMfi+iaAyIqYdK0q/q0y0rw82INWEKJOBe6b/P3YWE8NW7oOlF/nXFNrHwhARrN/hdgDkraA==", + "license": "MIT", + "dependencies": { + "undici-types": "~6.21.0" + } + }, + "node_modules/@types/offscreencanvas": { + "version": "2019.7.3", + "resolved": "https://registry.npmjs.org/@types/offscreencanvas/-/offscreencanvas-2019.7.3.tgz", + "integrity": "sha512-ieXiYmgSRXUDeOntE1InxjWyvEelZGP63M+cGuquuRLuIKKT1osnkXjxev9B7d1nXSug5vpunx+gNlbVxMlC9A==", + "license": "MIT" + }, + "node_modules/@types/react": { + "version": "19.2.14", + "resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.14.tgz", + "integrity": "sha512-ilcTH/UniCkMdtexkoCN0bI7pMcJDvmQFPvuPvmEaYA/NSfFTAgdUSLAoVjaRJm7+6PvcM+q1zYOwS4wTYMF9w==", + "license": "MIT", + "peer": true, + "dependencies": { + "csstype": "^3.2.2" + } + }, + "node_modules/@types/react-reconciler": { + "version": "0.28.9", + "resolved": "https://registry.npmjs.org/@types/react-reconciler/-/react-reconciler-0.28.9.tgz", + "integrity": "sha512-HHM3nxyUZ3zAylX8ZEyrDNd2XZOnQ0D5XfunJF5FLQnZbHHYq4UWvW1QfelQNXv1ICNkwYhfxjwfnqivYB6bFg==", + "license": "MIT", + "peerDependencies": { + "@types/react": "*" + } + }, + "node_modules/@types/resolve": { + "version": "1.20.2", + "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.20.2.tgz", + "integrity": "sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==", + "license": "MIT" + }, + "node_modules/@types/slice-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@types/slice-ansi/-/slice-ansi-4.0.0.tgz", + "integrity": "sha512-+OpjSaq85gvlZAYINyzKpLeiFkSC4EsC6IIiT6v6TLSU5k5U83fHGj9Lel8oKEXM0HqgrMVCjXPDPVICtxF7EQ==", + "license": "MIT" + }, + "node_modules/@types/stats.js": { + "version": "0.17.4", + "resolved": "https://registry.npmjs.org/@types/stats.js/-/stats.js-0.17.4.tgz", + "integrity": "sha512-jIBvWWShCvlBqBNIZt0KAshWpvSjhkwkEu4ZUcASoAvhmrgAUI2t1dXrjSL4xXVLB4FznPrIsX3nKXFl/Dt4vA==", + "license": "MIT" + }, + "node_modules/@types/three": { + "version": "0.182.0", + "resolved": "https://registry.npmjs.org/@types/three/-/three-0.182.0.tgz", + "integrity": "sha512-WByN9V3Sbwbe2OkWuSGyoqQO8Du6yhYaXtXLoA5FkKTUJorZ+yOHBZ35zUUPQXlAKABZmbYp5oAqpA4RBjtJ/Q==", + "license": "MIT", + "dependencies": { + "@dimforge/rapier3d-compat": "~0.12.0", + "@tweenjs/tween.js": "~23.1.3", + "@types/stats.js": "*", + "@types/webxr": ">=0.5.17", + "@webgpu/types": "*", + "fflate": "~0.8.2", + "meshoptimizer": "~0.22.0" + } + }, + "node_modules/@types/trusted-types": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.7.tgz", + "integrity": "sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==", + "license": "MIT" + }, + "node_modules/@types/unist": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.3.tgz", + "integrity": "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==", + "license": "MIT" + }, + "node_modules/@types/webxr": { + "version": "0.5.24", + "resolved": "https://registry.npmjs.org/@types/webxr/-/webxr-0.5.24.tgz", + "integrity": "sha512-h8fgEd/DpoS9CBrjEQXR+dIDraopAEfu4wYVNY2tEPwk60stPWhvZMf4Foo5FakuQ7HFZoa8WceaWFervK2Ovg==", + "license": "MIT" + }, + "node_modules/@ungap/structured-clone": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.3.0.tgz", + "integrity": "sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g==", + "license": "ISC" + }, + "node_modules/@use-gesture/core": { + "version": "10.3.1", + "resolved": "https://registry.npmjs.org/@use-gesture/core/-/core-10.3.1.tgz", + "integrity": "sha512-WcINiDt8WjqBdUXye25anHiNxPc0VOrlT8F6LLkU6cycrOGUDyY/yyFmsg3k8i5OLvv25llc0QC45GhR/C8llw==", + "license": "MIT" + }, + "node_modules/@use-gesture/react": { + "version": "10.3.1", + "resolved": "https://registry.npmjs.org/@use-gesture/react/-/react-10.3.1.tgz", + "integrity": "sha512-Yy19y6O2GJq8f7CHf7L0nxL8bf4PZCPaVOCgJrusOeFHY1LvHgYXnmnXg6N5iwAnbgbZCDjo60SiM6IPJi9C5g==", + "license": "MIT", + "dependencies": { + "@use-gesture/core": "10.3.1" + }, + "peerDependencies": { + "react": ">= 16.8.0" + } + }, + "node_modules/@vitejs/plugin-react": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-5.1.3.tgz", + "integrity": "sha512-NVUnA6gQCl8jfoYqKqQU5Clv0aPw14KkZYCsX6T9Lfu9slI0LOU10OTwFHS/WmptsMMpshNd/1tuWsHQ2Uk+cg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/core": "^7.29.0", + "@babel/plugin-transform-react-jsx-self": "^7.27.1", + "@babel/plugin-transform-react-jsx-source": "^7.27.1", + "@rolldown/pluginutils": "1.0.0-rc.2", + "@types/babel__core": "^7.20.5", + "react-refresh": "^0.18.0" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "peerDependencies": { + "vite": "^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0" + } + }, + "node_modules/@vitest/expect": { + "version": "4.0.18", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-4.0.18.tgz", + "integrity": "sha512-8sCWUyckXXYvx4opfzVY03EOiYVxyNrHS5QxX3DAIi5dpJAAkyJezHCP77VMX4HKA2LDT/Jpfo8i2r5BE3GnQQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@standard-schema/spec": "^1.0.0", + "@types/chai": "^5.2.2", + "@vitest/spy": "4.0.18", + "@vitest/utils": "4.0.18", + "chai": "^6.2.1", + "tinyrainbow": "^3.0.3" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/mocker": { + "version": "4.0.18", + "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-4.0.18.tgz", + "integrity": "sha512-HhVd0MDnzzsgevnOWCBj5Otnzobjy5wLBe4EdeeFGv8luMsGcYqDuFRMcttKWZA5vVO8RFjexVovXvAM4JoJDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/spy": "4.0.18", + "estree-walker": "^3.0.3", + "magic-string": "^0.30.21" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "msw": "^2.4.9", + "vite": "^6.0.0 || ^7.0.0-0" + }, + "peerDependenciesMeta": { + "msw": { + "optional": true + }, + "vite": { + "optional": true + } + } + }, + "node_modules/@vitest/mocker/node_modules/estree-walker": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", + "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.0" + } + }, + "node_modules/@vitest/mocker/node_modules/magic-string": { + "version": "0.30.21", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz", + "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.5" + } + }, + "node_modules/@vitest/pretty-format": { + "version": "4.0.18", + "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-4.0.18.tgz", + "integrity": "sha512-P24GK3GulZWC5tz87ux0m8OADrQIUVDPIjjj65vBXYG17ZeU3qD7r+MNZ1RNv4l8CGU2vtTRqixrOi9fYk/yKw==", + "dev": true, + "license": "MIT", + "dependencies": { + "tinyrainbow": "^3.0.3" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/runner": { + "version": "4.0.18", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-4.0.18.tgz", + "integrity": "sha512-rpk9y12PGa22Jg6g5M3UVVnTS7+zycIGk9ZNGN+m6tZHKQb7jrP7/77WfZy13Y/EUDd52NDsLRQhYKtv7XfPQw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/utils": "4.0.18", + "pathe": "^2.0.3" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/snapshot": { + "version": "4.0.18", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-4.0.18.tgz", + "integrity": "sha512-PCiV0rcl7jKQjbgYqjtakly6T1uwv/5BQ9SwBLekVg/EaYeQFPiXcgrC2Y7vDMA8dM1SUEAEV82kgSQIlXNMvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/pretty-format": "4.0.18", + "magic-string": "^0.30.21", + "pathe": "^2.0.3" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/snapshot/node_modules/magic-string": { + "version": "0.30.21", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz", + "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.5" + } + }, + "node_modules/@vitest/spy": { + "version": "4.0.18", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-4.0.18.tgz", + "integrity": "sha512-cbQt3PTSD7P2OARdVW3qWER5EGq7PHlvE+QfzSC0lbwO+xnt7+XH06ZzFjFRgzUX//JmpxrCu92VdwvEPlWSNw==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/utils": { + "version": "4.0.18", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-4.0.18.tgz", + "integrity": "sha512-msMRKLMVLWygpK3u2Hybgi4MNjcYJvwTb0Ru09+fOyCXIgT5raYP041DRRdiJiI3k/2U6SEbAETB3YtBrUkCFA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/pretty-format": "4.0.18", + "tinyrainbow": "^3.0.3" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@webgpu/types": { + "version": "0.1.69", + "resolved": "https://registry.npmjs.org/@webgpu/types/-/types-0.1.69.tgz", + "integrity": "sha512-RPmm6kgRbI8e98zSD3RVACvnuktIja5+yLgDAkTmxLr90BEwdTXRQWNLF3ETTTyH/8mKhznZuN5AveXYFEsMGQ==", + "license": "BSD-3-Clause" + }, + "node_modules/@xmldom/xmldom": { + "version": "0.8.11", + "resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.11.tgz", + "integrity": "sha512-cQzWCtO6C8TQiYl1ruKNn2U6Ao4o4WBBcbL61yJl84x+j5sOWWFU9X7DpND8XZG3daDppSsigMdfAIl2upQBRw==", + "license": "MIT", + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/acorn": { + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", + "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/agent-base": { + "version": "7.1.4", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.4.tgz", + "integrity": "sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==", + "license": "MIT", + "engines": { + "node": ">= 14" + } + }, + "node_modules/ajv": { + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", + "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/aria-query": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.0.tgz", + "integrity": "sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "dequal": "^2.0.3" + } + }, + "node_modules/array-buffer-byte-length": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.2.tgz", + "integrity": "sha512-LHE+8BuR7RYGDKvnrmcuSq3tDcKv9OFEXQt/HpbZhY7V6h0zlUXutnAD82GiFx9rdieCMjkvtcsPqBwgUl1Iiw==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "is-array-buffer": "^3.0.5" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/arraybuffer.prototype.slice": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.4.tgz", + "integrity": "sha512-BNoCY6SXXPQ7gF2opIP4GBE+Xw7U+pHMYKuzjgCN3GwiaIR09UUeKfheyIry77QtrCBlC0KK0q5/TER/tYh3PQ==", + "license": "MIT", + "dependencies": { + "array-buffer-byte-length": "^1.0.1", + "call-bind": "^1.0.8", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.5", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "is-array-buffer": "^3.0.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/assertion-error": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz", + "integrity": "sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + } + }, + "node_modules/astral-regex": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", + "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/async": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz", + "integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==", + "license": "MIT" + }, + "node_modules/async-function": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/async-function/-/async-function-1.0.0.tgz", + "integrity": "sha512-hsU18Ae8CDTR6Kgu9DYf0EbCr/a5iGL0rytQDobUcdpYOKokk8LEjVphnXkDkgpi0wYVsqrXuP0bZxJaTqdgoA==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/at-least-node": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", + "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", + "license": "ISC", + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/autoprefixer": { + "version": "10.4.24", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.24.tgz", + "integrity": "sha512-uHZg7N9ULTVbutaIsDRoUkoS8/h3bdsmVJYZ5l3wv8Cp/6UIIoRDm90hZ+BwxUj/hGBEzLxdHNSKuFpn8WOyZw==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/autoprefixer" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "browserslist": "^4.28.1", + "caniuse-lite": "^1.0.30001766", + "fraction.js": "^5.3.4", + "picocolors": "^1.1.1", + "postcss-value-parser": "^4.2.0" + }, + "bin": { + "autoprefixer": "bin/autoprefixer" + }, + "engines": { + "node": "^10 || ^12 || >=14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/available-typed-arrays": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", + "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", + "license": "MIT", + "dependencies": { + "possible-typed-array-names": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/babel-plugin-polyfill-corejs2": { + "version": "0.4.15", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.15.tgz", + "integrity": "sha512-hR3GwrRwHUfYwGfrisXPIDP3JcYfBrW7wKE7+Au6wDYl7fm/ka1NEII6kORzxNU556JjfidZeBsO10kYvtV1aw==", + "license": "MIT", + "dependencies": { + "@babel/compat-data": "^7.28.6", + "@babel/helper-define-polyfill-provider": "^0.6.6", + "semver": "^6.3.1" + }, + "peerDependencies": { + "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" + } + }, + "node_modules/babel-plugin-polyfill-corejs2/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/babel-plugin-polyfill-corejs3": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.14.0.tgz", + "integrity": "sha512-AvDcMxJ34W4Wgy4KBIIePQTAOP1Ie2WFwkQp3dB7FQ/f0lI5+nM96zUnYEOE1P9sEg0es5VCP0HxiWu5fUHZAQ==", + "license": "MIT", + "dependencies": { + "@babel/helper-define-polyfill-provider": "^0.6.6", + "core-js-compat": "^3.48.0" + }, + "peerDependencies": { + "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" + } + }, + "node_modules/babel-plugin-polyfill-regenerator": { + "version": "0.6.6", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.6.6.tgz", + "integrity": "sha512-hYm+XLYRMvupxiQzrvXUj7YyvFFVfv5gI0R71AJzudg1g2AI2vyCPPIFEBjk162/wFzti3inBHo7isWFuEVS/A==", + "license": "MIT", + "dependencies": { + "@babel/helper-define-polyfill-provider": "^0.6.6" + }, + "peerDependencies": { + "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" + } + }, + "node_modules/bail": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/bail/-/bail-2.0.2.tgz", + "integrity": "sha512-0xO6mYd7JB2YesxDKplafRpsiOzPt9V02ddPCLbY1xYGPOX24NTyN50qnUxgCPcSoYMhKpAuBTjQoRZCAkUDRw==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "license": "MIT" + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/baseline-browser-mapping": { + "version": "2.9.19", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.9.19.tgz", + "integrity": "sha512-ipDqC8FrAl/76p2SSWKSI+H9tFwm7vYqXQrItCuiVPt26Km0jS+NzSsBWAaBusvSbQcfJG+JitdMm+wZAgTYqg==", + "license": "Apache-2.0", + "bin": { + "baseline-browser-mapping": "dist/cli.js" + } + }, + "node_modules/bidi-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/bidi-js/-/bidi-js-1.0.3.tgz", + "integrity": "sha512-RKshQI1R3YQ+n9YJz2QQ147P66ELpa1FQEg20Dk8oW9t2KgLbpDLLp9aGZ7y8WHSshDknG0bknqGw5/tyCs5tw==", + "license": "MIT", + "dependencies": { + "require-from-string": "^2.0.2" + } + }, + "node_modules/big-integer": { + "version": "1.6.52", + "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.52.tgz", + "integrity": "sha512-QxD8cf2eVqJOOz63z6JIN9BzvVs/dlySa5HGSBH5xtR8dPteIRQnBxxKqkNTiT6jbDTF6jAfrd4oMcND9RGbQg==", + "license": "Unlicense", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/bignumber.js": { + "version": "9.3.1", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.3.1.tgz", + "integrity": "sha512-Ko0uX15oIUS7wJ3Rb30Fs6SkVbLmPBAKdlm7q9+ak9bbIeFf0MwuBsQV6z7+X768/cHsfg+WlysDWJcmthjsjQ==", + "license": "MIT", + "engines": { + "node": "*" + } + }, + "node_modules/bplist-parser": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.3.2.tgz", + "integrity": "sha512-apC2+fspHGI3mMKj+dGevkGo/tCqVB8jMb6i+OX+E29p0Iposz07fABkRIfVUPNd5A5VbuOz1bZbnmkKLYF+wQ==", + "license": "MIT", + "dependencies": { + "big-integer": "1.6.x" + }, + "engines": { + "node": ">= 5.10.0" + } + }, + "node_modules/brace-expansion": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/browserslist": { + "version": "4.28.1", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.1.tgz", + "integrity": "sha512-ZC5Bd0LgJXgwGqUknZY/vkUQ04r8NXnJZ3yYi4vDmSiZmC/pdSN0NbNRPxZpbtO4uAfDUAFffO8IZoM3Gj8IkA==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "baseline-browser-mapping": "^2.9.0", + "caniuse-lite": "^1.0.30001759", + "electron-to-chromium": "^1.5.263", + "node-releases": "^2.0.27", + "update-browserslist-db": "^1.2.0" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, + "node_modules/buffer-crc32": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", + "license": "MIT", + "engines": { + "node": "*" + } + }, + "node_modules/buffer-equal-constant-time": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", + "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==", + "license": "BSD-3-Clause" + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "license": "MIT" + }, + "node_modules/call-bind": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.8.tgz", + "integrity": "sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.0", + "es-define-property": "^1.0.0", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/call-bound": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz", + "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "get-intrinsic": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/camera-controls": { + "version": "2.10.1", + "resolved": "https://registry.npmjs.org/camera-controls/-/camera-controls-2.10.1.tgz", + "integrity": "sha512-KnaKdcvkBJ1Irbrzl8XD6WtZltkRjp869Jx8c0ujs9K+9WD+1D7ryBsCiVqJYUqt6i/HR5FxT7RLASieUD+Q5w==", + "license": "MIT", + "peerDependencies": { + "three": ">=0.126.1" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001767", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001767.tgz", + "integrity": "sha512-34+zUAMhSH+r+9eKmYG+k2Rpt8XttfE4yXAjoZvkAPs15xcYQhyBYdalJ65BzivAvGRMViEjy6oKr/S91loekQ==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "CC-BY-4.0" + }, + "node_modules/ccount": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/ccount/-/ccount-2.0.1.tgz", + "integrity": "sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/chai": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/chai/-/chai-6.2.2.tgz", + "integrity": "sha512-NUPRluOfOiTKBKvWPtSD4PhFvWCqOi0BGStNWs57X9js7XGTprSmFoz5F0tWhR4WPjNeR9jXqdC7/UpSJTnlRg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/character-entities": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-2.0.2.tgz", + "integrity": "sha512-shx7oQ0Awen/BRIdkjkvz54PnEEI/EjwXDSIZp86/KKdbafHh1Df/RYGBhn4hbe2+uKC9FnT5UCEdyPz3ai9hQ==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/character-entities-html4": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/character-entities-html4/-/character-entities-html4-2.1.0.tgz", + "integrity": "sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/character-entities-legacy": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-3.0.0.tgz", + "integrity": "sha512-RpPp0asT/6ufRm//AJVwpViZbGM/MkjQFxJccQRHmISF/22NBtsHqAWmL+/pmkPWoIUJdWyeVleTl1wydHATVQ==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/character-reference-invalid": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/character-reference-invalid/-/character-reference-invalid-2.0.1.tgz", + "integrity": "sha512-iBZ4F4wRbyORVsu0jPV7gXkOsGYjGHPmAyv+HiHG8gi5PtC9KI2j1+v8/tlibRvjoWX027ypmG/n0HtO5t7unw==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/chownr": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", + "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "license": "MIT" + }, + "node_modules/comma-separated-tokens": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/comma-separated-tokens/-/comma-separated-tokens-2.0.3.tgz", + "integrity": "sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/commander": { + "version": "9.5.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-9.5.0.tgz", + "integrity": "sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==", + "license": "MIT", + "engines": { + "node": "^12.20.0 || >=14" + } + }, + "node_modules/common-tags": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/common-tags/-/common-tags-1.8.2.tgz", + "integrity": "sha512-gk/Z852D2Wtb//0I+kRFNKKE9dIIVirjoqPoA1wJU+XePVXZfGeBpk45+A1rKO4Q43prqWBNY/MiIeRLbPWUaA==", + "license": "MIT", + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/complex.js": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/complex.js/-/complex.js-2.4.3.tgz", + "integrity": "sha512-UrQVSUur14tNX6tiP4y8T4w4FeJAX3bi2cIv0pu/DTLFNxoq7z2Yh83Vfzztj6Px3X/lubqQ9IrPp7Bpn6p4MQ==", + "license": "MIT", + "engines": { + "node": "*" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/rawify" + } + }, + "node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "license": "MIT" + }, + "node_modules/core-js-compat": { + "version": "3.48.0", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.48.0.tgz", + "integrity": "sha512-OM4cAF3D6VtH/WkLtWvyNC56EZVXsZdU3iqaMG2B4WvYrlqU831pc4UtG5yp0sE9z8Y02wVN7PjW5Zf9Gt0f1Q==", + "license": "MIT", + "dependencies": { + "browserslist": "^4.28.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/core-js" + } + }, + "node_modules/cross-env": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-7.0.3.tgz", + "integrity": "sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==", + "license": "MIT", + "dependencies": { + "cross-spawn": "^7.0.1" + }, + "bin": { + "cross-env": "src/bin/cross-env.js", + "cross-env-shell": "src/bin/cross-env-shell.js" + }, + "engines": { + "node": ">=10.14", + "npm": ">=6", + "yarn": ">=1" + } + }, + "node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/crypto-random-string": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz", + "integrity": "sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/css-tree": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-3.1.0.tgz", + "integrity": "sha512-0eW44TGN5SQXU1mWSkKwFstI/22X2bG1nYzZTYMAWjylYURhse752YgbE4Cx46AC+bAvI+/dYTPRk1LqSUnu6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "mdn-data": "2.12.2", + "source-map-js": "^1.0.1" + }, + "engines": { + "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0" + } + }, + "node_modules/css.escape": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/css.escape/-/css.escape-1.5.1.tgz", + "integrity": "sha512-YUifsXXuknHlUsmlgyY0PKzgPOr7/FjCePfHNt0jxm83wHZi44VDMQ7/fGNkjY3/jV1MC+1CmZbaHzugyeRtpg==", + "dev": true, + "license": "MIT" + }, + "node_modules/cssstyle": { + "version": "5.3.7", + "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-5.3.7.tgz", + "integrity": "sha512-7D2EPVltRrsTkhpQmksIu+LxeWAIEk6wRDMJ1qljlv+CKHJM+cJLlfhWIzNA44eAsHXSNe3+vO6DW1yCYx8SuQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@asamuzakjp/css-color": "^4.1.1", + "@csstools/css-syntax-patches-for-csstree": "^1.0.21", + "css-tree": "^3.1.0", + "lru-cache": "^11.2.4" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/cssstyle/node_modules/lru-cache": { + "version": "11.2.5", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.5.tgz", + "integrity": "sha512-vFrFJkWtJvJnD5hg+hJvVE8Lh/TcMzKnTgCWmtBipwI5yLX/iX+5UB2tfuyODF5E7k9xEzMdYgGqaSb1c0c5Yw==", + "dev": true, + "license": "BlueOak-1.0.0", + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/csstype": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz", + "integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==", + "license": "MIT", + "peer": true + }, + "node_modules/data-uri-to-buffer": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz", + "integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==", + "license": "MIT", + "engines": { + "node": ">= 12" + } + }, + "node_modules/data-urls": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-7.0.0.tgz", + "integrity": "sha512-23XHcCF+coGYevirZceTVD7NdJOqVn+49IHyxgszm+JIiHLoB2TkmPtsYkNWT1pvRSGkc35L6NHs0yHkN2SumA==", + "dev": true, + "license": "MIT", + "dependencies": { + "whatwg-mimetype": "^5.0.0", + "whatwg-url": "^16.0.0" + }, + "engines": { + "node": "^20.19.0 || ^22.12.0 || >=24.0.0" + } + }, + "node_modules/data-urls/node_modules/tr46": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-6.0.0.tgz", + "integrity": "sha512-bLVMLPtstlZ4iMQHpFHTR7GAGj2jxi8Dg0s2h2MafAE4uSWF98FC/3MomU51iQAMf8/qDUbKWf5GxuvvVcXEhw==", + "dev": true, + "license": "MIT", + "dependencies": { + "punycode": "^2.3.1" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/data-urls/node_modules/webidl-conversions": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-8.0.1.tgz", + "integrity": "sha512-BMhLD/Sw+GbJC21C/UgyaZX41nPt8bUTg+jWyDeg7e7YN4xOM05YPSIXceACnXVtqyEw/LMClUQMtMZ+PGGpqQ==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=20" + } + }, + "node_modules/data-urls/node_modules/whatwg-url": { + "version": "16.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-16.0.0.tgz", + "integrity": "sha512-9CcxtEKsf53UFwkSUZjG+9vydAsFO4lFHBpJUtjBcoJOCJpKnSJNwCw813zrYJHpCJ7sgfbtOe0V5Ku7Pa1XMQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@exodus/bytes": "^1.11.0", + "tr46": "^6.0.0", + "webidl-conversions": "^8.0.1" + }, + "engines": { + "node": "^20.19.0 || ^22.12.0 || >=24.0.0" + } + }, + "node_modules/data-view-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.2.tgz", + "integrity": "sha512-EmKO5V3OLXh1rtK2wgXRansaK1/mtVdTUEiEI0W8RkvgT05kfxaH29PliLnpLP73yYO6142Q72QNa8Wx/A5CqQ==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/data-view-byte-length": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.2.tgz", + "integrity": "sha512-tuhGbE6CfTM9+5ANGf+oQb72Ky/0+s3xKUpHvShfiz2RxMFgFPjsXuRLBVMtvMs15awe45SRb83D6wH4ew6wlQ==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/inspect-js" + } + }, + "node_modules/data-view-byte-offset": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.1.tgz", + "integrity": "sha512-BS8PfmtDGnrgYdOonGZQdLZslWIeCGFP9tpan0hi1Co2Zr2NKADsvGYA8XxuG/4UWgJ6Cjtv+YJnB6MM69QGlQ==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/debounce": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/debounce/-/debounce-1.2.1.tgz", + "integrity": "sha512-XRRe6Glud4rd/ZGQfiV1ruXSfbvfJedlV9Y6zOlP+2K04vBYiJEte6stfFkCP03aMnY5tsipamumUjL14fofug==", + "license": "MIT" + }, + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/decimal.js": { + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.6.0.tgz", + "integrity": "sha512-YpgQiITW3JXGntzdUmyUR1V812Hn8T1YVXhCu+wO3OpS4eU9l4YdD3qjyiKdV6mvV29zapkMeD390UVEf2lkUg==", + "license": "MIT" + }, + "node_modules/decode-named-character-reference": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/decode-named-character-reference/-/decode-named-character-reference-1.3.0.tgz", + "integrity": "sha512-GtpQYB283KrPp6nRw50q3U9/VfOutZOe103qlN7BPP6Ad27xYnOIWv4lPzo8HCAL+mMZofJ9KEy30fq6MfaK6Q==", + "license": "MIT", + "dependencies": { + "character-entities": "^2.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/deepmerge": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/define-lazy-prop": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz", + "integrity": "sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/define-properties": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", + "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", + "license": "MIT", + "dependencies": { + "define-data-property": "^1.0.1", + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/dequal": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", + "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/detect-gpu": { + "version": "5.0.70", + "resolved": "https://registry.npmjs.org/detect-gpu/-/detect-gpu-5.0.70.tgz", + "integrity": "sha512-bqerEP1Ese6nt3rFkwPnGbsUF9a4q+gMmpTVVOEzoCyeCc+y7/RvJnQZJx1JwhgQI5Ntg0Kgat8Uu7XpBqnz1w==", + "license": "MIT", + "dependencies": { + "webgl-constants": "^1.1.1" + } + }, + "node_modules/detect-libc": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", + "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, + "node_modules/devlop": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/devlop/-/devlop-1.1.0.tgz", + "integrity": "sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA==", + "license": "MIT", + "dependencies": { + "dequal": "^2.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/dom-accessibility-api": { + "version": "0.5.16", + "resolved": "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.5.16.tgz", + "integrity": "sha512-X7BJ2yElsnOJ30pZF4uIIDfBEVgF4XEBxL9Bxhy6dnrm5hkzqmsWHGTiHqRiITNhMyFLyAiWndIJP7Z1NTteDg==", + "dev": true, + "license": "MIT" + }, + "node_modules/draco3d": { + "version": "1.5.7", + "resolved": "https://registry.npmjs.org/draco3d/-/draco3d-1.5.7.tgz", + "integrity": "sha512-m6WCKt/erDXcw+70IJXnG7M3awwQPAsZvJGX5zY7beBqpELw6RDGkYVU0W43AFxye4pDZ5i2Lbyc/NNGqwjUVQ==", + "license": "Apache-2.0" + }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "license": "MIT" + }, + "node_modules/ecdsa-sig-formatter": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", + "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", + "license": "Apache-2.0", + "dependencies": { + "safe-buffer": "^5.0.1" + } + }, + "node_modules/ejs": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.10.tgz", + "integrity": "sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==", + "license": "Apache-2.0", + "dependencies": { + "jake": "^10.8.5" + }, + "bin": { + "ejs": "bin/cli.js" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/electron-to-chromium": { + "version": "1.5.286", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.286.tgz", + "integrity": "sha512-9tfDXhJ4RKFNerfjdCcZfufu49vg620741MNs26a9+bhLThdB+plgMeou98CAaHu/WATj2iHOOHTp1hWtABj2A==", + "license": "ISC" + }, + "node_modules/elementtree": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/elementtree/-/elementtree-0.1.7.tgz", + "integrity": "sha512-wkgGT6kugeQk/P6VZ/f4T+4HB41BVgNBq5CDIZVbQ02nvTVqAiVTbskxxu3eA/X96lMlfYOwnLQpN2v5E1zDEg==", + "license": "Apache-2.0", + "dependencies": { + "sax": "1.1.4" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "license": "MIT" + }, + "node_modules/enhanced-resolve": { + "version": "5.21.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.21.0.tgz", + "integrity": "sha512-otxSQPw4lkOZWkHpB3zaEQs6gWYEsmX4xQF68ElXC/TWvGxGMSGOvoNbaLXm6/cS/fSfHtsEdw90y20PCd+sCA==", + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.4", + "tapable": "^2.3.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/entities": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/entities/-/entities-6.0.1.tgz", + "integrity": "sha512-aN97NXWF6AWBTahfVOIrB/NShkzi5H7F9r1s9mD3cDj4Ko5f2qhhVoYMibXF7GlLveb/D2ioWay8lxI97Ven3g==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/env-paths": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", + "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/es-abstract": { + "version": "1.24.1", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.24.1.tgz", + "integrity": "sha512-zHXBLhP+QehSSbsS9Pt23Gg964240DPd6QCf8WpkqEXxQ7fhdZzYsocOr5u7apWonsS5EjZDmTF+/slGMyasvw==", + "license": "MIT", + "dependencies": { + "array-buffer-byte-length": "^1.0.2", + "arraybuffer.prototype.slice": "^1.0.4", + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.8", + "call-bound": "^1.0.4", + "data-view-buffer": "^1.0.2", + "data-view-byte-length": "^1.0.2", + "data-view-byte-offset": "^1.0.1", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "es-set-tostringtag": "^2.1.0", + "es-to-primitive": "^1.3.0", + "function.prototype.name": "^1.1.8", + "get-intrinsic": "^1.3.0", + "get-proto": "^1.0.1", + "get-symbol-description": "^1.1.0", + "globalthis": "^1.0.4", + "gopd": "^1.2.0", + "has-property-descriptors": "^1.0.2", + "has-proto": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "internal-slot": "^1.1.0", + "is-array-buffer": "^3.0.5", + "is-callable": "^1.2.7", + "is-data-view": "^1.0.2", + "is-negative-zero": "^2.0.3", + "is-regex": "^1.2.1", + "is-set": "^2.0.3", + "is-shared-array-buffer": "^1.0.4", + "is-string": "^1.1.1", + "is-typed-array": "^1.1.15", + "is-weakref": "^1.1.1", + "math-intrinsics": "^1.1.0", + "object-inspect": "^1.13.4", + "object-keys": "^1.1.1", + "object.assign": "^4.1.7", + "own-keys": "^1.0.1", + "regexp.prototype.flags": "^1.5.4", + "safe-array-concat": "^1.1.3", + "safe-push-apply": "^1.0.0", + "safe-regex-test": "^1.1.0", + "set-proto": "^1.0.0", + "stop-iteration-iterator": "^1.1.0", + "string.prototype.trim": "^1.2.10", + "string.prototype.trimend": "^1.0.9", + "string.prototype.trimstart": "^1.0.8", + "typed-array-buffer": "^1.0.3", + "typed-array-byte-length": "^1.0.3", + "typed-array-byte-offset": "^1.0.4", + "typed-array-length": "^1.0.7", + "unbox-primitive": "^1.1.0", + "which-typed-array": "^1.1.19" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-module-lexer": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.7.0.tgz", + "integrity": "sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA==", + "dev": true, + "license": "MIT" + }, + "node_modules/es-object-atoms": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", + "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", + "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-to-primitive": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.3.0.tgz", + "integrity": "sha512-w+5mJ3GuFL+NjVtJlvydShqE1eN3h3PbI7/5LAsYJP/2qtuMXjfL2LpHSRqo4b4eSF5K/DH1JXKUAHSB2UW50g==", + "license": "MIT", + "dependencies": { + "is-callable": "^1.2.7", + "is-date-object": "^1.0.5", + "is-symbol": "^1.0.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/esbuild": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.12.tgz", + "integrity": "sha512-bbPBYYrtZbkt6Os6FiTLCTFxvq4tt3JKall1vRwshA3fdVztsLAatFaZobhkBC8/BrPetoa0oksYoKXoG4ryJg==", + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.25.12", + "@esbuild/android-arm": "0.25.12", + "@esbuild/android-arm64": "0.25.12", + "@esbuild/android-x64": "0.25.12", + "@esbuild/darwin-arm64": "0.25.12", + "@esbuild/darwin-x64": "0.25.12", + "@esbuild/freebsd-arm64": "0.25.12", + "@esbuild/freebsd-x64": "0.25.12", + "@esbuild/linux-arm": "0.25.12", + "@esbuild/linux-arm64": "0.25.12", + "@esbuild/linux-ia32": "0.25.12", + "@esbuild/linux-loong64": "0.25.12", + "@esbuild/linux-mips64el": "0.25.12", + "@esbuild/linux-ppc64": "0.25.12", + "@esbuild/linux-riscv64": "0.25.12", + "@esbuild/linux-s390x": "0.25.12", + "@esbuild/linux-x64": "0.25.12", + "@esbuild/netbsd-arm64": "0.25.12", + "@esbuild/netbsd-x64": "0.25.12", + "@esbuild/openbsd-arm64": "0.25.12", + "@esbuild/openbsd-x64": "0.25.12", + "@esbuild/openharmony-arm64": "0.25.12", + "@esbuild/sunos-x64": "0.25.12", + "@esbuild/win32-arm64": "0.25.12", + "@esbuild/win32-ia32": "0.25.12", + "@esbuild/win32-x64": "0.25.12" + } + }, + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-latex": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/escape-latex/-/escape-latex-1.2.0.tgz", + "integrity": "sha512-nV5aVWW1K0wEiUIEdZ4erkGGH8mDxGyxSeqPzRNtWP7ataw+/olFObw7hujFWlVjNsaDFw5VZ5NzVSIqRgfTiw==", + "license": "MIT" + }, + "node_modules/estree-util-is-identifier-name": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/estree-util-is-identifier-name/-/estree-util-is-identifier-name-3.0.0.tgz", + "integrity": "sha512-hFtqIDZTIUZ9BXLb8y4pYGyk6+wekIivNVTcmvk8NoOh+VeRn5y6cEHzbURrWbfp1fIqdVipilzj+lfaadNZmg==", + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/estree-walker": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz", + "integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==", + "license": "MIT" + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/expect-type": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.3.0.tgz", + "integrity": "sha512-knvyeauYhqjOYvQ66MznSMs83wmHrCycNEN6Ao+2AeYEfxUIkuiVxdEa1qlGEPK+We3n0THiDciYSsCcgW/DoA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "license": "MIT" + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "license": "MIT" + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "license": "MIT" + }, + "node_modules/fast-uri": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.0.tgz", + "integrity": "sha512-iPeeDKJSWf4IEOasVVrknXpaBV0IApz/gp7S2bb7Z4Lljbl2MGJRqInZiUrQwV16cpzw/D3S5j5Julj/gT52AA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fastify" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fastify" + } + ], + "license": "BSD-3-Clause" + }, + "node_modules/fd-slicer": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", + "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", + "license": "MIT", + "dependencies": { + "pend": "~1.2.0" + } + }, + "node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/fetch-blob": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz", + "integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/jimmywarting" + }, + { + "type": "paypal", + "url": "https://paypal.me/jimmywarting" + } + ], + "license": "MIT", + "dependencies": { + "node-domexception": "^1.0.0", + "web-streams-polyfill": "^3.0.3" + }, + "engines": { + "node": "^12.20 || >= 14.13" + } + }, + "node_modules/fflate": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/fflate/-/fflate-0.8.2.tgz", + "integrity": "sha512-cPJU47OaAoCbg0pBvzsgpTPhmhqI5eJjh/JIu8tPj5q+T7iLvW/JAYUqmE7KOB4R1ZyEhzBaIQpQpardBF5z8A==", + "license": "MIT" + }, + "node_modules/filelist": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.4.tgz", + "integrity": "sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==", + "license": "Apache-2.0", + "dependencies": { + "minimatch": "^5.0.1" + } + }, + "node_modules/filelist/node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/for-each": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.5.tgz", + "integrity": "sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg==", + "license": "MIT", + "dependencies": { + "is-callable": "^1.2.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/foreground-child": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz", + "integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==", + "license": "ISC", + "dependencies": { + "cross-spawn": "^7.0.6", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/foreground-child/node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "license": "ISC", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/formdata-polyfill": { + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz", + "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==", + "license": "MIT", + "dependencies": { + "fetch-blob": "^3.1.2" + }, + "engines": { + "node": ">=12.20.0" + } + }, + "node_modules/fraction.js": { + "version": "5.3.4", + "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-5.3.4.tgz", + "integrity": "sha512-1X1NTtiJphryn/uLQz3whtY6jK3fTqoE3ohKs0tT+Ujr1W59oopxmoEh7Lu5p6vBaPbgoM0bzveAW4Qi5RyWDQ==", + "license": "MIT", + "engines": { + "node": "*" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/rawify" + } + }, + "node_modules/framer-motion": { + "version": "12.31.0", + "resolved": "https://registry.npmjs.org/framer-motion/-/framer-motion-12.31.0.tgz", + "integrity": "sha512-Tnd0FU05zGRFI3JJmBegXonF1rfuzYeuXd1QSdQ99Ysnppk0yWBWSW2wUsqzRpS5nv0zPNx+y0wtDj4kf0q5RQ==", + "license": "MIT", + "dependencies": { + "motion-dom": "^12.30.1", + "motion-utils": "^12.29.2", + "tslib": "^2.4.0" + }, + "peerDependencies": { + "@emotion/is-prop-valid": "*", + "react": "^18.0.0 || ^19.0.0", + "react-dom": "^18.0.0 || ^19.0.0" + }, + "peerDependenciesMeta": { + "@emotion/is-prop-valid": { + "optional": true + }, + "react": { + "optional": true + }, + "react-dom": { + "optional": true + } + } + }, + "node_modules/fs-extra": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", + "license": "MIT", + "dependencies": { + "at-least-node": "^1.0.0", + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/fs-minipass": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", + "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", + "license": "ISC", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/fs-minipass/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/fs-minipass/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "license": "ISC" + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "license": "ISC" + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/function.prototype.name": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.8.tgz", + "integrity": "sha512-e5iwyodOHhbMr/yNrc7fDYG4qlbIvI5gajyzPnb5TCwyhjApznQh1BMFou9b30SevY43gCJKXycoCBjMbsuW0Q==", + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", + "define-properties": "^1.2.1", + "functions-have-names": "^1.2.3", + "hasown": "^2.0.2", + "is-callable": "^1.2.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/functions-have-names": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/gaxios": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/gaxios/-/gaxios-7.1.3.tgz", + "integrity": "sha512-YGGyuEdVIjqxkxVH1pUTMY/XtmmsApXrCVv5EU25iX6inEPbV+VakJfLealkBtJN69AQmh1eGOdCl9Sm1UP6XQ==", + "license": "Apache-2.0", + "dependencies": { + "extend": "^3.0.2", + "https-proxy-agent": "^7.0.1", + "node-fetch": "^3.3.2", + "rimraf": "^5.0.1" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/gaxios/node_modules/glob": { + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.5.0.tgz", + "integrity": "sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==", + "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me", + "license": "ISC", + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/gaxios/node_modules/jackspeak": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, + "node_modules/gaxios/node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "license": "ISC" + }, + "node_modules/gaxios/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/gaxios/node_modules/path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/gaxios/node_modules/rimraf": { + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-5.0.10.tgz", + "integrity": "sha512-l0OE8wL34P4nJH/H2ffoaniAokM2qSmrtXHmlpvYr5AVVX8msAyW0l8NVJFDxlSK4u3Uh/f41cQheDVdnYijwQ==", + "license": "ISC", + "dependencies": { + "glob": "^10.3.7" + }, + "bin": { + "rimraf": "dist/esm/bin.mjs" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/gcp-metadata": { + "version": "8.1.2", + "resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-8.1.2.tgz", + "integrity": "sha512-zV/5HKTfCeKWnxG0Dmrw51hEWFGfcF2xiXqcA3+J90WDuP0SvoiSO5ORvcBsifmx/FoIjgQN3oNOGaQ5PhLFkg==", + "license": "Apache-2.0", + "dependencies": { + "gaxios": "^7.0.0", + "google-logging-utils": "^1.0.0", + "json-bigint": "^1.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/generator-function": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/generator-function/-/generator-function-2.0.1.tgz", + "integrity": "sha512-SFdFmIJi+ybC0vjlHN0ZGVGHc3lgE0DxPAT0djjVg+kjOnSqclqmj0KQ7ykTOLP6YxoqOvuAODGdcHJn+43q3g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/get-intrinsic": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "function-bind": "^1.1.2", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-own-enumerable-property-symbols": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-3.0.2.tgz", + "integrity": "sha512-I0UBV/XOz1XkIJHEUDMZAbzCThU/H8DxmSfmdGcKPnVhu2VfFqr34jr9777IyaTYvxjedWhqVIilEDsCdP5G6g==", + "license": "ISC" + }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/get-symbol-description": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.1.0.tgz", + "integrity": "sha512-w9UMqWwJxHNOvoNzSJ2oPF5wvYcvP7jUvYzhp67yEhTi17ZDBBC1z9pTdGuzjD+EFIqLSYRweZjqfiPzQ06Ebg==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/glob": { + "version": "9.3.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-9.3.5.tgz", + "integrity": "sha512-e1LleDykUz2Iu+MTYdkSsuWX8lvAjAcs0Xef0lNIu0S2wOAzuTxCJtcd9S3cijlwYF18EsU3rzb8jPVobxDh9Q==", + "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me", + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "minimatch": "^8.0.2", + "minipass": "^4.2.4", + "path-scurry": "^1.6.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob/node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "license": "ISC" + }, + "node_modules/glob/node_modules/minimatch": { + "version": "8.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-8.0.4.tgz", + "integrity": "sha512-W0Wvr9HyFXZRGIDgCicunpQ299OKXs9RgZfaukz4qAW/pJhcpUfupc9c+OObPOFueNy8VSrZgEmDtk6Kh4WzDA==", + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob/node_modules/minipass": { + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-4.2.8.tgz", + "integrity": "sha512-fNzuVyifolSLFL4NzpF+wEF4qrgqaaKX0haXPQEdQ7NKAN+WecoKMHV09YcuL/DHxrUsYQOK3MiuDf7Ip2OXfQ==", + "license": "ISC", + "engines": { + "node": ">=8" + } + }, + "node_modules/glob/node_modules/path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob/node_modules/path-scurry/node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "license": "ISC", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/globalthis": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz", + "integrity": "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==", + "license": "MIT", + "dependencies": { + "define-properties": "^1.2.1", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/glsl-noise": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/glsl-noise/-/glsl-noise-0.0.0.tgz", + "integrity": "sha512-b/ZCF6amfAUb7dJM/MxRs7AetQEahYzJ8PtgfrmEdtw6uyGOr+ZSGtgjFm6mfsBkxJ4d2W7kg+Nlqzqvn3Bc0w==", + "license": "MIT" + }, + "node_modules/google-auth-library": { + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-10.5.0.tgz", + "integrity": "sha512-7ABviyMOlX5hIVD60YOfHw4/CxOfBhyduaYB+wbFWCWoni4N7SLcV46hrVRktuBbZjFC9ONyqamZITN7q3n32w==", + "license": "Apache-2.0", + "dependencies": { + "base64-js": "^1.3.0", + "ecdsa-sig-formatter": "^1.0.11", + "gaxios": "^7.0.0", + "gcp-metadata": "^8.0.0", + "google-logging-utils": "^1.0.0", + "gtoken": "^8.0.0", + "jws": "^4.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/google-logging-utils": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/google-logging-utils/-/google-logging-utils-1.1.3.tgz", + "integrity": "sha512-eAmLkjDjAFCVXg7A1unxHsLf961m6y17QFqXqAXGj/gVkKFrEICfStRfwUlGNfeCEjNRa32JEWOUTlYXPyyKvA==", + "license": "Apache-2.0", + "engines": { + "node": ">=14" + } + }, + "node_modules/gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "license": "ISC" + }, + "node_modules/gtoken": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/gtoken/-/gtoken-8.0.0.tgz", + "integrity": "sha512-+CqsMbHPiSTdtSO14O51eMNlrp9N79gmeqmXeouJOhfucAedHw9noVe/n5uJk3tbKE6a+6ZCQg3RPhVhHByAIw==", + "license": "MIT", + "dependencies": { + "gaxios": "^7.0.0", + "jws": "^4.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/has-bigints": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.1.0.tgz", + "integrity": "sha512-R3pbpkcIqv2Pm3dUwgjclDRVmWpTJW2DcMzcIhEXEx1oh/CEMObMm3KLmRJOdvhM7o4uQBnwr8pzRK2sJWIqfg==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-property-descriptors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-proto": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.2.0.tgz", + "integrity": "sha512-KIL7eQPfHQRC8+XluaIw7BHUwwqL19bQn4hzNgdr+1wXoU0KKj6rufu47lhY7KbJR2C6T6+PfyN0Ea7wkSS+qQ==", + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "license": "MIT", + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/hast-util-to-jsx-runtime": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/hast-util-to-jsx-runtime/-/hast-util-to-jsx-runtime-2.3.6.tgz", + "integrity": "sha512-zl6s8LwNyo1P9uw+XJGvZtdFF1GdAkOg8ujOw+4Pyb76874fLps4ueHXDhXWdk6YHQ6OgUtinliG7RsYvCbbBg==", + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.0", + "@types/hast": "^3.0.0", + "@types/unist": "^3.0.0", + "comma-separated-tokens": "^2.0.0", + "devlop": "^1.0.0", + "estree-util-is-identifier-name": "^3.0.0", + "hast-util-whitespace": "^3.0.0", + "mdast-util-mdx-expression": "^2.0.0", + "mdast-util-mdx-jsx": "^3.0.0", + "mdast-util-mdxjs-esm": "^2.0.0", + "property-information": "^7.0.0", + "space-separated-tokens": "^2.0.0", + "style-to-js": "^1.0.0", + "unist-util-position": "^5.0.0", + "vfile-message": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-whitespace": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/hast-util-whitespace/-/hast-util-whitespace-3.0.0.tgz", + "integrity": "sha512-88JUN06ipLwsnv+dVn+OIYOvAuvBMy/Qoi6O7mQHxdPXpjy+Cd6xRkWwux7DKO+4sYILtLBRIKgsdpS2gQc7qw==", + "license": "MIT", + "dependencies": { + "@types/hast": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hls.js": { + "version": "1.6.15", + "resolved": "https://registry.npmjs.org/hls.js/-/hls.js-1.6.15.tgz", + "integrity": "sha512-E3a5VwgXimGHwpRGV+WxRTKeSp2DW5DI5MWv34ulL3t5UNmyJWCQ1KmLEHbYzcfThfXG8amBL+fCYPneGHC4VA==", + "license": "Apache-2.0" + }, + "node_modules/html-encoding-sniffer": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-6.0.0.tgz", + "integrity": "sha512-CV9TW3Y3f8/wT0BRFc1/KAVQ3TUHiXmaAb6VW9vtiMFf7SLoMd1PdAc4W3KFOFETBJUb90KatHqlsZMWV+R9Gg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@exodus/bytes": "^1.6.0" + }, + "engines": { + "node": "^20.19.0 || ^22.12.0 || >=24.0.0" + } + }, + "node_modules/html-url-attributes": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/html-url-attributes/-/html-url-attributes-3.0.1.tgz", + "integrity": "sha512-ol6UPyBWqsrO6EJySPz2O7ZSr856WDrEzM5zMqp+FJJLGMW35cLYmmZnl0vztAZxRUoNZJFTCohfjuIJ8I4QBQ==", + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/http-proxy-agent": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", + "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", + "dev": true, + "license": "MIT", + "dependencies": { + "agent-base": "^7.1.0", + "debug": "^4.3.4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/https-proxy-agent": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz", + "integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==", + "license": "MIT", + "dependencies": { + "agent-base": "^7.1.2", + "debug": "4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/idb": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/idb/-/idb-7.1.1.tgz", + "integrity": "sha512-gchesWBzyvGHRO9W8tzUWFDycow5gwjvFKfyV9FF32Y7F50yZMp7mP+T2mJIWFx49zicqyC4uefHM17o6xKIVQ==", + "license": "ISC" + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "BSD-3-Clause" + }, + "node_modules/immediate": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", + "integrity": "sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==", + "license": "MIT" + }, + "node_modules/indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "license": "ISC" + }, + "node_modules/ini": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ini/-/ini-4.1.3.tgz", + "integrity": "sha512-X7rqawQBvfdjS10YU1y1YVreA3SsLrW9dX2CewP2EbBJM4ypVNLDkO5y04gejPwKIY9lR+7r9gn3rFPt/kmWFg==", + "license": "ISC", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/inline-style-parser": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/inline-style-parser/-/inline-style-parser-0.2.7.tgz", + "integrity": "sha512-Nb2ctOyNR8DqQoR0OwRG95uNWIC0C1lCgf5Naz5H6Ji72KZ8OcFZLz2P5sNgwlyoJ8Yif11oMuYs5pBQa86csA==", + "license": "MIT" + }, + "node_modules/internal-slot": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.1.0.tgz", + "integrity": "sha512-4gd7VpWNQNB4UKKCFFVcp1AVv+FMOgs9NKzjHKusc8jTMhd5eL1NqQqOpE0KzMds804/yHlglp3uxgluOqAPLw==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "hasown": "^2.0.2", + "side-channel": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/is-alphabetical": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-2.0.1.tgz", + "integrity": "sha512-FWyyY60MeTNyeSRpkM2Iry0G9hpr7/9kD40mD/cGQEuilcZYS4okz8SN2Q6rLCJ8gbCt6fN+rC+6tMGS99LaxQ==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/is-alphanumerical": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-alphanumerical/-/is-alphanumerical-2.0.1.tgz", + "integrity": "sha512-hmbYhX/9MUMF5uh7tOXyK/n0ZvWpad5caBA17GsC6vyuCqaWliRG5K1qS9inmUhEMaOBIW7/whAnSwveW/LtZw==", + "license": "MIT", + "dependencies": { + "is-alphabetical": "^2.0.0", + "is-decimal": "^2.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/is-array-buffer": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.5.tgz", + "integrity": "sha512-DDfANUiiG2wC1qawP66qlTugJeL5HyzMpfr8lLK+jMQirGzNod0B12cFB/9q838Ru27sBwfw78/rdoU7RERz6A==", + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", + "get-intrinsic": "^1.2.6" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-async-function": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-async-function/-/is-async-function-2.1.1.tgz", + "integrity": "sha512-9dgM/cZBnNvjzaMYHVoxxfPj2QXt22Ev7SuuPrs+xav0ukGB0S6d4ydZdEiM48kLx5kDV+QBPrpVnFyefL8kkQ==", + "license": "MIT", + "dependencies": { + "async-function": "^1.0.0", + "call-bound": "^1.0.3", + "get-proto": "^1.0.1", + "has-tostringtag": "^1.0.2", + "safe-regex-test": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-bigint": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.1.0.tgz", + "integrity": "sha512-n4ZT37wG78iz03xPRKJrHTdZbe3IicyucEtdRsV5yglwc3GyUfbAfpSeD0FJ41NbUNSt5wbhqfp1fS+BgnvDFQ==", + "license": "MIT", + "dependencies": { + "has-bigints": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-boolean-object": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.2.2.tgz", + "integrity": "sha512-wa56o2/ElJMYqjCjGkXri7it5FbebW5usLw/nPmCMs5DeZ7eziSYZhSmPRn0txqeW4LnAmQQU7FgqLpsEFKM4A==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-core-module": { + "version": "2.16.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz", + "integrity": "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==", + "license": "MIT", + "dependencies": { + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-data-view": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.2.tgz", + "integrity": "sha512-RKtWF8pGmS87i2D6gqQu/l7EYRlVdfzemCJN/P3UOs//x1QE7mfhvzHIApBTRf7axvT6DMGwSwBXYCT0nfB9xw==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "get-intrinsic": "^1.2.6", + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-date-object": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.1.0.tgz", + "integrity": "sha512-PwwhEakHVKTdRNVOw+/Gyh0+MzlCl4R6qKvkhuvLtPMggI1WAHt9sOwZxQLSGpUaDnrdyDsomoRgNnCfKNSXXg==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-decimal": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-decimal/-/is-decimal-2.0.1.tgz", + "integrity": "sha512-AAB9hiomQs5DXWcRB1rqsxGUstbRroFOPPVAomNk/3XHR5JyEZChOyTWe2oayKnsSsr/kcGqF+z6yuH6HHpN0A==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/is-docker": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", + "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", + "license": "MIT", + "bin": { + "is-docker": "cli.js" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-finalizationregistry": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-finalizationregistry/-/is-finalizationregistry-1.1.1.tgz", + "integrity": "sha512-1pC6N8qWJbWoPtEjgcL2xyhQOP491EQjeUo3qTKcmV8YSDDJrOepfG8pcC7h/QgnQHYSv0mJ3Z/ZWxmatVrysg==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-generator-function": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.1.2.tgz", + "integrity": "sha512-upqt1SkGkODW9tsGNG5mtXTXtECizwtS2kA161M+gJPc1xdb/Ax629af6YrTwcOeQHbewrPNlE5Dx7kzvXTizA==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.4", + "generator-function": "^2.0.0", + "get-proto": "^1.0.1", + "has-tostringtag": "^1.0.2", + "safe-regex-test": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-hexadecimal": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-2.0.1.tgz", + "integrity": "sha512-DgZQp241c8oO6cA1SbTEWiXeoxV42vlcJxgH+B3hi1AiqqKruZR3ZGF8In3fj4+/y/7rHvlOZLZtgJ/4ttYGZg==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/is-map": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.3.tgz", + "integrity": "sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", + "integrity": "sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==", + "license": "MIT" + }, + "node_modules/is-negative-zero": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.3.tgz", + "integrity": "sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-number-object": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.1.1.tgz", + "integrity": "sha512-lZhclumE1G6VYD8VHe35wFaIif+CTy5SJIi5+3y4psDgWu4wPDoBhF8NxUOinEc7pHgiTsT6MaBb92rKhhD+Xw==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", + "integrity": "sha512-l4RyHgRqGN4Y3+9JHVrNqO+tN0rV5My76uW5/nuO4K1b6vw5G8d/cmFjP9tRfEsdhZNt0IFdZuK/c2Vr4Nb+Qg==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-plain-obj": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-4.1.0.tgz", + "integrity": "sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-potential-custom-element-name": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", + "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/is-promise": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.2.2.tgz", + "integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==", + "license": "MIT" + }, + "node_modules/is-regex": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.2.1.tgz", + "integrity": "sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "gopd": "^1.2.0", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-regexp": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-regexp/-/is-regexp-1.0.0.tgz", + "integrity": "sha512-7zjFAPO4/gwyQAAgRRmqeEeyIICSdmCqa3tsVHMdBzaXXRiqopZL4Cyghg/XulGWrtABTpbnYYzzIRffLkP4oA==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-set": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.3.tgz", + "integrity": "sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-shared-array-buffer": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.4.tgz", + "integrity": "sha512-ISWac8drv4ZGfwKl5slpHG9OwPNty4jOWPRIhBpxOoD+hqITiwuipOQ2bNthAzwA3B4fIjO4Nln74N0S9byq8A==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-string": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.1.1.tgz", + "integrity": "sha512-BtEeSsoaQjlSPBemMQIrY1MY0uM6vnS1g5fmufYOtnxLGUZM2178PKbhsk7Ffv58IX+ZtcvoGwccYsh0PglkAA==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-symbol": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.1.1.tgz", + "integrity": "sha512-9gGx6GTtCQM73BgmHQXfDmLtfjjTUDSyoxTCbp5WtoixAhfgsDirWIcVQ/IHpvI5Vgd5i/J5F7B9cN/WlVbC/w==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "has-symbols": "^1.1.0", + "safe-regex-test": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-typed-array": { + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.15.tgz", + "integrity": "sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ==", + "license": "MIT", + "dependencies": { + "which-typed-array": "^1.1.16" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-weakmap": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.2.tgz", + "integrity": "sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-weakref": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.1.1.tgz", + "integrity": "sha512-6i9mGWSlqzNMEqpCp93KwRS1uUOodk2OJ6b+sq7ZPDSy2WuI5NFIxp/254TytR8ftefexkWn5xNiHUNpPOfSew==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-weakset": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.4.tgz", + "integrity": "sha512-mfcwb6IzQyOKTs84CQMrOwW4gQcaTOAWJ0zzJCl2WSPDrWk/OzDaImWFH3djXhb24g4eudZfLRozAvPGw4d9hQ==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "get-intrinsic": "^1.2.6" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-wsl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", + "license": "MIT", + "dependencies": { + "is-docker": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "license": "MIT" + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "license": "ISC" + }, + "node_modules/its-fine": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/its-fine/-/its-fine-1.2.5.tgz", + "integrity": "sha512-fXtDA0X0t0eBYAGLVM5YsgJGsJ5jEmqZEPrGbzdf5awjv0xE7nqv3TVnvtUF060Tkes15DbDAKW/I48vsb6SyA==", + "license": "MIT", + "dependencies": { + "@types/react-reconciler": "^0.28.0" + }, + "peerDependencies": { + "react": ">=18.0" + } + }, + "node_modules/jackspeak": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-4.1.1.tgz", + "integrity": "sha512-zptv57P3GpL+O0I7VdMJNBZCu+BPHVQUk55Ft8/QCJjTVxrnJHuVuX/0Bl2A6/+2oyR/ZMEuFKwmzqqZ/U5nPQ==", + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/jake": { + "version": "10.9.4", + "resolved": "https://registry.npmjs.org/jake/-/jake-10.9.4.tgz", + "integrity": "sha512-wpHYzhxiVQL+IV05BLE2Xn34zW1S223hvjtqk0+gsPrwd/8JNLXJgZZM/iPFsYc1xyphF+6M6EvdE5E9MBGkDA==", + "license": "Apache-2.0", + "dependencies": { + "async": "^3.2.6", + "filelist": "^1.0.4", + "picocolors": "^1.1.1" + }, + "bin": { + "jake": "bin/cli.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/javascript-natural-sort": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/javascript-natural-sort/-/javascript-natural-sort-0.7.1.tgz", + "integrity": "sha512-nO6jcEfZWQXDhOiBtG2KvKyEptz7RVbpGP4vTD2hLBdmNQSsCiicO2Ioinv6UI4y9ukqnBpy+XZ9H6uLNgJTlw==", + "license": "MIT" + }, + "node_modules/jiti": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.6.1.tgz", + "integrity": "sha512-ekilCSN1jwRvIbgeg/57YFh8qQDNbwDb9xT/qu2DAHbFFZUicIl4ygVaAvzveMhMVr3LnpSKTNnwt8PoOfmKhQ==", + "license": "MIT", + "bin": { + "jiti": "lib/jiti-cli.mjs" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "license": "MIT" + }, + "node_modules/jsdom": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-28.0.0.tgz", + "integrity": "sha512-KDYJgZ6T2TKdU8yBfYueq5EPG/EylMsBvCaenWMJb2OXmjgczzwveRCoJ+Hgj1lXPDyasvrgneSn4GBuR1hYyA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@acemir/cssom": "^0.9.31", + "@asamuzakjp/dom-selector": "^6.7.6", + "@exodus/bytes": "^1.11.0", + "cssstyle": "^5.3.7", + "data-urls": "^7.0.0", + "decimal.js": "^10.6.0", + "html-encoding-sniffer": "^6.0.0", + "http-proxy-agent": "^7.0.2", + "https-proxy-agent": "^7.0.6", + "is-potential-custom-element-name": "^1.0.1", + "parse5": "^8.0.0", + "saxes": "^6.0.0", + "symbol-tree": "^3.2.4", + "tough-cookie": "^6.0.0", + "undici": "^7.20.0", + "w3c-xmlserializer": "^5.0.0", + "webidl-conversions": "^8.0.1", + "whatwg-mimetype": "^5.0.0", + "whatwg-url": "^16.0.0", + "xml-name-validator": "^5.0.0" + }, + "engines": { + "node": "^20.19.0 || ^22.12.0 || >=24.0.0" + }, + "peerDependencies": { + "canvas": "^3.0.0" + }, + "peerDependenciesMeta": { + "canvas": { + "optional": true + } + } + }, + "node_modules/jsdom/node_modules/tr46": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-6.0.0.tgz", + "integrity": "sha512-bLVMLPtstlZ4iMQHpFHTR7GAGj2jxi8Dg0s2h2MafAE4uSWF98FC/3MomU51iQAMf8/qDUbKWf5GxuvvVcXEhw==", + "dev": true, + "license": "MIT", + "dependencies": { + "punycode": "^2.3.1" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/jsdom/node_modules/webidl-conversions": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-8.0.1.tgz", + "integrity": "sha512-BMhLD/Sw+GbJC21C/UgyaZX41nPt8bUTg+jWyDeg7e7YN4xOM05YPSIXceACnXVtqyEw/LMClUQMtMZ+PGGpqQ==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=20" + } + }, + "node_modules/jsdom/node_modules/whatwg-url": { + "version": "16.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-16.0.0.tgz", + "integrity": "sha512-9CcxtEKsf53UFwkSUZjG+9vydAsFO4lFHBpJUtjBcoJOCJpKnSJNwCw813zrYJHpCJ7sgfbtOe0V5Ku7Pa1XMQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@exodus/bytes": "^1.11.0", + "tr46": "^6.0.0", + "webidl-conversions": "^8.0.1" + }, + "engines": { + "node": "^20.19.0 || ^22.12.0 || >=24.0.0" + } + }, + "node_modules/jsesc": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", + "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", + "license": "MIT", + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/json-bigint": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-bigint/-/json-bigint-1.0.0.tgz", + "integrity": "sha512-SiPv/8VpZuWbvLSMtTDU8hEfrZWg/mH/nV/b4o0CYbSxu1UIQPLdwKOCIyLQX+VIPO5vrLX3i8qtqFyhdPSUSQ==", + "license": "MIT", + "dependencies": { + "bignumber.js": "^9.0.0" + } + }, + "node_modules/json-schema": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", + "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", + "license": "(AFL-2.1 OR BSD-3-Clause)" + }, + "node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "license": "MIT" + }, + "node_modules/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "license": "MIT", + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/jsonfile": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.0.tgz", + "integrity": "sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg==", + "license": "MIT", + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/jsonpointer": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-5.0.1.tgz", + "integrity": "sha512-p/nXbhSEcu3pZRdkW1OfJhpsVtW1gd4Wa1fnQc9YLiTfAjn0312eMKimbdIQzuZl9aa9xUGaRlP9T/CJE/ditQ==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/jwa": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-2.0.1.tgz", + "integrity": "sha512-hRF04fqJIP8Abbkq5NKGN0Bbr3JxlQ+qhZufXVr0DvujKy93ZCbXZMHDL4EOtodSbCWxOqR8MS1tXA5hwqCXDg==", + "license": "MIT", + "dependencies": { + "buffer-equal-constant-time": "^1.0.1", + "ecdsa-sig-formatter": "1.0.11", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/jws": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/jws/-/jws-4.0.1.tgz", + "integrity": "sha512-EKI/M/yqPncGUUh44xz0PxSidXFr/+r0pA70+gIYhjv+et7yxM+s29Y+VGDkovRofQem0fs7Uvf4+YmAdyRduA==", + "license": "MIT", + "dependencies": { + "jwa": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/katex": { + "version": "0.16.9", + "resolved": "https://registry.npmjs.org/katex/-/katex-0.16.9.tgz", + "integrity": "sha512-fsSYjWS0EEOwvy81j3vRA8TEAhQhKiqO+FQaKWp0m39qwOzHVBgAUBIXWj1pB+O2W3fIpNa6Y9KSKCVbfPhyAQ==", + "funding": [ + "https://opencollective.com/katex", + "https://github.com/sponsors/katex" + ], + "license": "MIT", + "dependencies": { + "commander": "^8.3.0" + }, + "bin": { + "katex": "cli.js" + } + }, + "node_modules/katex/node_modules/commander": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz", + "integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==", + "license": "MIT", + "engines": { + "node": ">= 12" + } + }, + "node_modules/kleur": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz", + "integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/leven": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", + "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/lie": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/lie/-/lie-3.3.0.tgz", + "integrity": "sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==", + "license": "MIT", + "dependencies": { + "immediate": "~3.0.5" + } + }, + "node_modules/lightningcss": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.32.0.tgz", + "integrity": "sha512-NXYBzinNrblfraPGyrbPoD19C1h9lfI/1mzgWYvXUTe414Gz/X1FD2XBZSZM7rRTrMA8JL3OtAaGifrIKhQ5yQ==", + "license": "MPL-2.0", + "dependencies": { + "detect-libc": "^2.0.3" + }, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "optionalDependencies": { + "lightningcss-android-arm64": "1.32.0", + "lightningcss-darwin-arm64": "1.32.0", + "lightningcss-darwin-x64": "1.32.0", + "lightningcss-freebsd-x64": "1.32.0", + "lightningcss-linux-arm-gnueabihf": "1.32.0", + "lightningcss-linux-arm64-gnu": "1.32.0", + "lightningcss-linux-arm64-musl": "1.32.0", + "lightningcss-linux-x64-gnu": "1.32.0", + "lightningcss-linux-x64-musl": "1.32.0", + "lightningcss-win32-arm64-msvc": "1.32.0", + "lightningcss-win32-x64-msvc": "1.32.0" + } + }, + "node_modules/lightningcss-android-arm64": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-android-arm64/-/lightningcss-android-arm64-1.32.0.tgz", + "integrity": "sha512-YK7/ClTt4kAK0vo6w3X+Pnm0D2cf2vPHbhOXdoNti1Ga0al1P4TBZhwjATvjNwLEBCnKvjJc2jQgHXH0NEwlAg==", + "cpu": [ + "arm64" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-arm64": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.32.0.tgz", + "integrity": "sha512-RzeG9Ju5bag2Bv1/lwlVJvBE3q6TtXskdZLLCyfg5pt+HLz9BqlICO7LZM7VHNTTn/5PRhHFBSjk5lc4cmscPQ==", + "cpu": [ + "arm64" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-x64": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.32.0.tgz", + "integrity": "sha512-U+QsBp2m/s2wqpUYT/6wnlagdZbtZdndSmut/NJqlCcMLTWp5muCrID+K5UJ6jqD2BFshejCYXniPDbNh73V8w==", + "cpu": [ + "x64" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-freebsd-x64": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.32.0.tgz", + "integrity": "sha512-JCTigedEksZk3tHTTthnMdVfGf61Fky8Ji2E4YjUTEQX14xiy/lTzXnu1vwiZe3bYe0q+SpsSH/CTeDXK6WHig==", + "cpu": [ + "x64" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm-gnueabihf": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.32.0.tgz", + "integrity": "sha512-x6rnnpRa2GL0zQOkt6rts3YDPzduLpWvwAF6EMhXFVZXD4tPrBkEFqzGowzCsIWsPjqSK+tyNEODUBXeeVHSkw==", + "cpu": [ + "arm" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-gnu": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.32.0.tgz", + "integrity": "sha512-0nnMyoyOLRJXfbMOilaSRcLH3Jw5z9HDNGfT/gwCPgaDjnx0i8w7vBzFLFR1f6CMLKF8gVbebmkUN3fa/kQJpQ==", + "cpu": [ + "arm64" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-musl": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.32.0.tgz", + "integrity": "sha512-UpQkoenr4UJEzgVIYpI80lDFvRmPVg6oqboNHfoH4CQIfNA+HOrZ7Mo7KZP02dC6LjghPQJeBsvXhJod/wnIBg==", + "cpu": [ + "arm64" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-gnu": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.32.0.tgz", + "integrity": "sha512-V7Qr52IhZmdKPVr+Vtw8o+WLsQJYCTd8loIfpDaMRWGUZfBOYEJeyJIkqGIDMZPwPx24pUMfwSxxI8phr/MbOA==", + "cpu": [ + "x64" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-musl": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.32.0.tgz", + "integrity": "sha512-bYcLp+Vb0awsiXg/80uCRezCYHNg1/l3mt0gzHnWV9XP1W5sKa5/TCdGWaR/zBM2PeF/HbsQv/j2URNOiVuxWg==", + "cpu": [ + "x64" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-arm64-msvc": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.32.0.tgz", + "integrity": "sha512-8SbC8BR40pS6baCM8sbtYDSwEVQd4JlFTOlaD3gWGHfThTcABnNDBda6eTZeqbofalIJhFx0qKzgHJmcPTnGdw==", + "cpu": [ + "arm64" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-x64-msvc": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.32.0.tgz", + "integrity": "sha512-Amq9B/SoZYdDi1kFrojnoqPLxYhQ4Wo5XiL8EVJrVsB8ARoC1PWW6VGtT0WKCemjy8aC+louJnjS7U18x3b06Q==", + "cpu": [ + "x64" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lodash": { + "version": "4.17.23", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.23.tgz", + "integrity": "sha512-LgVTMpQtIopCi79SJeDiP0TfWi5CNEc/L/aRdTh3yIvmZXTnheWpKjSZhnvMl8iXbC1tFg9gdHHDMLoV7CnG+w==", + "license": "MIT" + }, + "node_modules/lodash.debounce": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", + "integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==", + "license": "MIT" + }, + "node_modules/lodash.sortby": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz", + "integrity": "sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA==", + "license": "MIT" + }, + "node_modules/long": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/long/-/long-5.3.2.tgz", + "integrity": "sha512-mNAgZ1GmyNhD7AuqnTG3/VQ26o760+ZYBPKjPvugO8+nLbYfX6TVpJPseBvopbdY+qpZ/lKUnmEc1LeZYS3QAA==", + "license": "Apache-2.0" + }, + "node_modules/longest-streak": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/longest-streak/-/longest-streak-3.1.0.tgz", + "integrity": "sha512-9Ri+o0JYgehTaVBBDoMqIl8GXtbWg711O3srftcHhZ0dqnETqLaoIK0x17fUw9rFSlK/0NlsKe0Ahhyl5pXE2g==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "license": "ISC", + "dependencies": { + "yallist": "^3.0.2" + } + }, + "node_modules/lucide-react": { + "version": "0.554.0", + "resolved": "https://registry.npmjs.org/lucide-react/-/lucide-react-0.554.0.tgz", + "integrity": "sha512-St+z29uthEJVx0Is7ellNkgTEhaeSoA42I7JjOCBCrc5X6LYMGSv0P/2uS5HDLTExP5tpiqRD2PyUEOS6s9UXA==", + "license": "ISC", + "peerDependencies": { + "react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0" + } + }, + "node_modules/lz-string": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/lz-string/-/lz-string-1.5.0.tgz", + "integrity": "sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==", + "dev": true, + "license": "MIT", + "bin": { + "lz-string": "bin/bin.js" + } + }, + "node_modules/maath": { + "version": "0.10.8", + "resolved": "https://registry.npmjs.org/maath/-/maath-0.10.8.tgz", + "integrity": "sha512-tRvbDF0Pgqz+9XUa4jjfgAQ8/aPKmQdWXilFu2tMy4GWj4NOsx99HlULO4IeREfbO3a0sA145DZYyvXPkybm0g==", + "license": "MIT", + "peerDependencies": { + "@types/three": ">=0.134.0", + "three": ">=0.134.0" + } + }, + "node_modules/magic-string": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.9.tgz", + "integrity": "sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==", + "license": "MIT", + "dependencies": { + "sourcemap-codec": "^1.4.8" + } + }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/mathjs": { + "version": "12.4.1", + "resolved": "https://registry.npmjs.org/mathjs/-/mathjs-12.4.1.tgz", + "integrity": "sha512-welnW3khgwYjPYvECFHO+xkCxAx9IKIIPDDWPi8B5rKAvmgoEHnQX9slEmHKZTNaJiE+OS4qrJJcB4sfDn/4sw==", + "license": "Apache-2.0", + "dependencies": { + "@babel/runtime": "^7.24.0", + "complex.js": "^2.1.1", + "decimal.js": "^10.4.3", + "escape-latex": "^1.2.0", + "fraction.js": "4.3.4", + "javascript-natural-sort": "^0.7.1", + "seedrandom": "^3.0.5", + "tiny-emitter": "^2.1.0", + "typed-function": "^4.1.1" + }, + "bin": { + "mathjs": "bin/cli.js" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/mathjs/node_modules/fraction.js": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.3.4.tgz", + "integrity": "sha512-pwiTgt0Q7t+GHZA4yaLjObx4vXmmdcS0iSJ19o8d/goUGgItX9UZWKWNnLHehxviD8wU2IWRsnR8cD5+yOJP2Q==", + "license": "MIT", + "engines": { + "node": "*" + }, + "funding": { + "type": "patreon", + "url": "https://github.com/sponsors/rawify" + } + }, + "node_modules/mdast-util-from-markdown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/mdast-util-from-markdown/-/mdast-util-from-markdown-2.0.2.tgz", + "integrity": "sha512-uZhTV/8NBuw0WHkPTrCqDOl0zVe1BIng5ZtHoDk49ME1qqcjYmmLmOf0gELgcRMxN4w2iuIeVso5/6QymSrgmA==", + "license": "MIT", + "dependencies": { + "@types/mdast": "^4.0.0", + "@types/unist": "^3.0.0", + "decode-named-character-reference": "^1.0.0", + "devlop": "^1.0.0", + "mdast-util-to-string": "^4.0.0", + "micromark": "^4.0.0", + "micromark-util-decode-numeric-character-reference": "^2.0.0", + "micromark-util-decode-string": "^2.0.0", + "micromark-util-normalize-identifier": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0", + "unist-util-stringify-position": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-mdx-expression": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/mdast-util-mdx-expression/-/mdast-util-mdx-expression-2.0.1.tgz", + "integrity": "sha512-J6f+9hUp+ldTZqKRSg7Vw5V6MqjATc+3E4gf3CFNcuZNWD8XdyI6zQ8GqH7f8169MM6P7hMBRDVGnn7oHB9kXQ==", + "license": "MIT", + "dependencies": { + "@types/estree-jsx": "^1.0.0", + "@types/hast": "^3.0.0", + "@types/mdast": "^4.0.0", + "devlop": "^1.0.0", + "mdast-util-from-markdown": "^2.0.0", + "mdast-util-to-markdown": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-mdx-jsx": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/mdast-util-mdx-jsx/-/mdast-util-mdx-jsx-3.2.0.tgz", + "integrity": "sha512-lj/z8v0r6ZtsN/cGNNtemmmfoLAFZnjMbNyLzBafjzikOM+glrjNHPlf6lQDOTccj9n5b0PPihEBbhneMyGs1Q==", + "license": "MIT", + "dependencies": { + "@types/estree-jsx": "^1.0.0", + "@types/hast": "^3.0.0", + "@types/mdast": "^4.0.0", + "@types/unist": "^3.0.0", + "ccount": "^2.0.0", + "devlop": "^1.1.0", + "mdast-util-from-markdown": "^2.0.0", + "mdast-util-to-markdown": "^2.0.0", + "parse-entities": "^4.0.0", + "stringify-entities": "^4.0.0", + "unist-util-stringify-position": "^4.0.0", + "vfile-message": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-mdxjs-esm": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/mdast-util-mdxjs-esm/-/mdast-util-mdxjs-esm-2.0.1.tgz", + "integrity": "sha512-EcmOpxsZ96CvlP03NghtH1EsLtr0n9Tm4lPUJUBccV9RwUOneqSycg19n5HGzCf+10LozMRSObtVr3ee1WoHtg==", + "license": "MIT", + "dependencies": { + "@types/estree-jsx": "^1.0.0", + "@types/hast": "^3.0.0", + "@types/mdast": "^4.0.0", + "devlop": "^1.0.0", + "mdast-util-from-markdown": "^2.0.0", + "mdast-util-to-markdown": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-phrasing": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/mdast-util-phrasing/-/mdast-util-phrasing-4.1.0.tgz", + "integrity": "sha512-TqICwyvJJpBwvGAMZjj4J2n0X8QWp21b9l0o7eXyVJ25YNWYbJDVIyD1bZXE6WtV6RmKJVYmQAKWa0zWOABz2w==", + "license": "MIT", + "dependencies": { + "@types/mdast": "^4.0.0", + "unist-util-is": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-to-hast": { + "version": "13.2.1", + "resolved": "https://registry.npmjs.org/mdast-util-to-hast/-/mdast-util-to-hast-13.2.1.tgz", + "integrity": "sha512-cctsq2wp5vTsLIcaymblUriiTcZd0CwWtCbLvrOzYCDZoWyMNV8sZ7krj09FSnsiJi3WVsHLM4k6Dq/yaPyCXA==", + "license": "MIT", + "dependencies": { + "@types/hast": "^3.0.0", + "@types/mdast": "^4.0.0", + "@ungap/structured-clone": "^1.0.0", + "devlop": "^1.0.0", + "micromark-util-sanitize-uri": "^2.0.0", + "trim-lines": "^3.0.0", + "unist-util-position": "^5.0.0", + "unist-util-visit": "^5.0.0", + "vfile": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-to-markdown": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/mdast-util-to-markdown/-/mdast-util-to-markdown-2.1.2.tgz", + "integrity": "sha512-xj68wMTvGXVOKonmog6LwyJKrYXZPvlwabaryTjLh9LuvovB/KAH+kvi8Gjj+7rJjsFi23nkUxRQv1KqSroMqA==", + "license": "MIT", + "dependencies": { + "@types/mdast": "^4.0.0", + "@types/unist": "^3.0.0", + "longest-streak": "^3.0.0", + "mdast-util-phrasing": "^4.0.0", + "mdast-util-to-string": "^4.0.0", + "micromark-util-classify-character": "^2.0.0", + "micromark-util-decode-string": "^2.0.0", + "unist-util-visit": "^5.0.0", + "zwitch": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-to-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-4.0.0.tgz", + "integrity": "sha512-0H44vDimn51F0YwvxSJSm0eCDOJTRlmN0R1yBh4HLj9wiV1Dn0QoXGbvFAWj2hSItVTlCmBF1hqKlIyUBVFLPg==", + "license": "MIT", + "dependencies": { + "@types/mdast": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdn-data": { + "version": "2.12.2", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.12.2.tgz", + "integrity": "sha512-IEn+pegP1aManZuckezWCO+XZQDplx1366JoVhTpMpBB1sPey/SbveZQUosKiKiGYjg1wH4pMlNgXbCiYgihQA==", + "dev": true, + "license": "CC0-1.0" + }, + "node_modules/meshline": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/meshline/-/meshline-3.3.1.tgz", + "integrity": "sha512-/TQj+JdZkeSUOl5Mk2J7eLcYTLiQm2IDzmlSvYm7ov15anEcDJ92GHqqazxTSreeNgfnYu24kiEvvv0WlbCdFQ==", + "license": "MIT", + "peerDependencies": { + "three": ">=0.137" + } + }, + "node_modules/meshoptimizer": { + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/meshoptimizer/-/meshoptimizer-0.22.0.tgz", + "integrity": "sha512-IebiK79sqIy+E4EgOr+CAw+Ke8hAspXKzBd0JdgEmPHiAwmvEj2S4h1rfvo+o/BnfEYd/jAOg5IeeIjzlzSnDg==", + "license": "MIT" + }, + "node_modules/micromark": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/micromark/-/micromark-4.0.2.tgz", + "integrity": "sha512-zpe98Q6kvavpCr1NPVSCMebCKfD7CA2NqZ+rykeNhONIJBpc1tFKt9hucLGwha3jNTNI8lHpctWJWoimVF4PfA==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "@types/debug": "^4.0.0", + "debug": "^4.0.0", + "decode-named-character-reference": "^1.0.0", + "devlop": "^1.0.0", + "micromark-core-commonmark": "^2.0.0", + "micromark-factory-space": "^2.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-chunked": "^2.0.0", + "micromark-util-combine-extensions": "^2.0.0", + "micromark-util-decode-numeric-character-reference": "^2.0.0", + "micromark-util-encode": "^2.0.0", + "micromark-util-normalize-identifier": "^2.0.0", + "micromark-util-resolve-all": "^2.0.0", + "micromark-util-sanitize-uri": "^2.0.0", + "micromark-util-subtokenize": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark-core-commonmark": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/micromark-core-commonmark/-/micromark-core-commonmark-2.0.3.tgz", + "integrity": "sha512-RDBrHEMSxVFLg6xvnXmb1Ayr2WzLAWjeSATAoxwKYJV94TeNavgoIdA0a9ytzDSVzBy2YKFK+emCPOEibLeCrg==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "decode-named-character-reference": "^1.0.0", + "devlop": "^1.0.0", + "micromark-factory-destination": "^2.0.0", + "micromark-factory-label": "^2.0.0", + "micromark-factory-space": "^2.0.0", + "micromark-factory-title": "^2.0.0", + "micromark-factory-whitespace": "^2.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-chunked": "^2.0.0", + "micromark-util-classify-character": "^2.0.0", + "micromark-util-html-tag-name": "^2.0.0", + "micromark-util-normalize-identifier": "^2.0.0", + "micromark-util-resolve-all": "^2.0.0", + "micromark-util-subtokenize": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark-factory-destination": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-factory-destination/-/micromark-factory-destination-2.0.1.tgz", + "integrity": "sha512-Xe6rDdJlkmbFRExpTOmRj9N3MaWmbAgdpSrBQvCFqhezUn4AHqJHbaEnfbVYYiexVSs//tqOdY/DxhjdCiJnIA==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "micromark-util-character": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark-factory-label": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-factory-label/-/micromark-factory-label-2.0.1.tgz", + "integrity": "sha512-VFMekyQExqIW7xIChcXn4ok29YE3rnuyveW3wZQWWqF4Nv9Wk5rgJ99KzPvHjkmPXF93FXIbBp6YdW3t71/7Vg==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "devlop": "^1.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark-factory-space": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-factory-space/-/micromark-factory-space-2.0.1.tgz", + "integrity": "sha512-zRkxjtBxxLd2Sc0d+fbnEunsTj46SWXgXciZmHq0kDYGnck/ZSGj9/wULTV95uoeYiK5hRXP2mJ98Uo4cq/LQg==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "micromark-util-character": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark-factory-title": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-factory-title/-/micromark-factory-title-2.0.1.tgz", + "integrity": "sha512-5bZ+3CjhAd9eChYTHsjy6TGxpOFSKgKKJPJxr293jTbfry2KDoWkhBb6TcPVB4NmzaPhMs1Frm9AZH7OD4Cjzw==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "micromark-factory-space": "^2.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark-factory-whitespace": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-factory-whitespace/-/micromark-factory-whitespace-2.0.1.tgz", + "integrity": "sha512-Ob0nuZ3PKt/n0hORHyvoD9uZhr+Za8sFoP+OnMcnWK5lngSzALgQYKMr9RJVOWLqQYuyn6ulqGWSXdwf6F80lQ==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "micromark-factory-space": "^2.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark-util-character": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-2.1.1.tgz", + "integrity": "sha512-wv8tdUTJ3thSFFFJKtpYKOYiGP2+v96Hvk4Tu8KpCAsTMs6yi+nVmGh1syvSCsaxz45J6Jbw+9DD6g97+NV67Q==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark-util-chunked": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-chunked/-/micromark-util-chunked-2.0.1.tgz", + "integrity": "sha512-QUNFEOPELfmvv+4xiNg2sRYeS/P84pTW0TCgP5zc9FpXetHY0ab7SxKyAQCNCc1eK0459uoLI1y5oO5Vc1dbhA==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "micromark-util-symbol": "^2.0.0" + } + }, + "node_modules/micromark-util-classify-character": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-classify-character/-/micromark-util-classify-character-2.0.1.tgz", + "integrity": "sha512-K0kHzM6afW/MbeWYWLjoHQv1sgg2Q9EccHEDzSkxiP/EaagNzCm7T/WMKZ3rjMbvIpvBiZgwR3dKMygtA4mG1Q==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "micromark-util-character": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark-util-combine-extensions": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-combine-extensions/-/micromark-util-combine-extensions-2.0.1.tgz", + "integrity": "sha512-OnAnH8Ujmy59JcyZw8JSbK9cGpdVY44NKgSM7E9Eh7DiLS2E9RNQf0dONaGDzEG9yjEl5hcqeIsj4hfRkLH/Bg==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "micromark-util-chunked": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark-util-decode-numeric-character-reference": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/micromark-util-decode-numeric-character-reference/-/micromark-util-decode-numeric-character-reference-2.0.2.tgz", + "integrity": "sha512-ccUbYk6CwVdkmCQMyr64dXz42EfHGkPQlBj5p7YVGzq8I7CtjXZJrubAYezf7Rp+bjPseiROqe7G6foFd+lEuw==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "micromark-util-symbol": "^2.0.0" + } + }, + "node_modules/micromark-util-decode-string": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-decode-string/-/micromark-util-decode-string-2.0.1.tgz", + "integrity": "sha512-nDV/77Fj6eH1ynwscYTOsbK7rR//Uj0bZXBwJZRfaLEJ1iGBR6kIfNmlNqaqJf649EP0F3NWNdeJi03elllNUQ==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "decode-named-character-reference": "^1.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-decode-numeric-character-reference": "^2.0.0", + "micromark-util-symbol": "^2.0.0" + } + }, + "node_modules/micromark-util-encode": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-encode/-/micromark-util-encode-2.0.1.tgz", + "integrity": "sha512-c3cVx2y4KqUnwopcO9b/SCdo2O67LwJJ/UyqGfbigahfegL9myoEFoDYZgkT7f36T0bLrM9hZTAaAyH+PCAXjw==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT" + }, + "node_modules/micromark-util-html-tag-name": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-html-tag-name/-/micromark-util-html-tag-name-2.0.1.tgz", + "integrity": "sha512-2cNEiYDhCWKI+Gs9T0Tiysk136SnR13hhO8yW6BGNyhOC4qYFnwF1nKfD3HFAIXA5c45RrIG1ub11GiXeYd1xA==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT" + }, + "node_modules/micromark-util-normalize-identifier": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-normalize-identifier/-/micromark-util-normalize-identifier-2.0.1.tgz", + "integrity": "sha512-sxPqmo70LyARJs0w2UclACPUUEqltCkJ6PhKdMIDuJ3gSf/Q+/GIe3WKl0Ijb/GyH9lOpUkRAO2wp0GVkLvS9Q==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "micromark-util-symbol": "^2.0.0" + } + }, + "node_modules/micromark-util-resolve-all": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-resolve-all/-/micromark-util-resolve-all-2.0.1.tgz", + "integrity": "sha512-VdQyxFWFT2/FGJgwQnJYbe1jjQoNTS4RjglmSjTUlpUMa95Htx9NHeYW4rGDJzbjvCsl9eLjMQwGeElsqmzcHg==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark-util-sanitize-uri": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-sanitize-uri/-/micromark-util-sanitize-uri-2.0.1.tgz", + "integrity": "sha512-9N9IomZ/YuGGZZmQec1MbgxtlgougxTodVwDzzEouPKo3qFWvymFHWcnDi2vzV1ff6kas9ucW+o3yzJK9YB1AQ==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "micromark-util-character": "^2.0.0", + "micromark-util-encode": "^2.0.0", + "micromark-util-symbol": "^2.0.0" + } + }, + "node_modules/micromark-util-subtokenize": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/micromark-util-subtokenize/-/micromark-util-subtokenize-2.1.0.tgz", + "integrity": "sha512-XQLu552iSctvnEcgXw6+Sx75GflAPNED1qx7eBJ+wydBb2KCbRZe+NwvIEEMM83uml1+2WSXpBAcp9IUCgCYWA==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "devlop": "^1.0.0", + "micromark-util-chunked": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark-util-symbol": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.1.tgz", + "integrity": "sha512-vs5t8Apaud9N28kgCrRUdEed4UJ+wWNvicHLPxCa9ENlYuAY31M0ETy5y1vA33YoNPDFTghEbnh6efaE8h4x0Q==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT" + }, + "node_modules/micromark-util-types": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-2.0.2.tgz", + "integrity": "sha512-Yw0ECSpJoViF1qTU4DC6NwtC4aWGt1EkzaQB8KPPyCRR8z9TWeV0HbEFGTO+ZY1wB22zmxnJqhPyTpOVCpeHTA==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT" + }, + "node_modules/min-indent": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", + "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/minimatch": { + "version": "10.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.1.2.tgz", + "integrity": "sha512-fu656aJ0n2kcXwsnwnv9g24tkU5uSmOlTjd6WyyaKm2Z+h1qmY6bAjrcaIxF/BslFqbZ8UBtbJi7KgQOZD2PTw==", + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/brace-expansion": "^5.0.1" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "license": "ISC", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/minizlib": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", + "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", + "license": "MIT", + "dependencies": { + "minipass": "^3.0.0", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/minizlib/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minizlib/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "license": "ISC" + }, + "node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "license": "MIT", + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/motion-dom": { + "version": "12.30.1", + "resolved": "https://registry.npmjs.org/motion-dom/-/motion-dom-12.30.1.tgz", + "integrity": "sha512-QXB+iFJRzZTqL+Am4a1CRoHdH+0Nq12wLdqQQZZsfHlp9AMt6PA098L/61oVZsDA+Ep3QSGudzpViyRrhYhGcQ==", + "license": "MIT", + "dependencies": { + "motion-utils": "^12.29.2" + } + }, + "node_modules/motion-utils": { + "version": "12.29.2", + "resolved": "https://registry.npmjs.org/motion-utils/-/motion-utils-12.29.2.tgz", + "integrity": "sha512-G3kc34H2cX2gI63RqU+cZq+zWRRPSsNIOjpdl9TN4AQwC4sgwYPl/Q/Obf/d53nOm569T0fYK+tcoSV50BWx8A==", + "license": "MIT" + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT" + }, + "node_modules/nanoid": { + "version": "3.3.11", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz", + "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/native-run": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/native-run/-/native-run-2.0.3.tgz", + "integrity": "sha512-U1PllBuzW5d1gfan+88L+Hky2eZx+9gv3Pf6rNBxKbORxi7boHzqiA6QFGSnqMem4j0A9tZ08NMIs5+0m/VS1Q==", + "license": "MIT", + "dependencies": { + "@ionic/utils-fs": "^3.1.7", + "@ionic/utils-terminal": "^2.3.4", + "bplist-parser": "^0.3.2", + "debug": "^4.3.4", + "elementtree": "^0.1.7", + "ini": "^4.1.1", + "plist": "^3.1.0", + "split2": "^4.2.0", + "through2": "^4.0.2", + "tslib": "^2.6.2", + "yauzl": "^2.10.0" + }, + "bin": { + "native-run": "bin/native-run" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/node-domexception": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", + "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==", + "deprecated": "Use your platform's native DOMException instead", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/jimmywarting" + }, + { + "type": "github", + "url": "https://paypal.me/jimmywarting" + } + ], + "license": "MIT", + "engines": { + "node": ">=10.5.0" + } + }, + "node_modules/node-fetch": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz", + "integrity": "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==", + "license": "MIT", + "dependencies": { + "data-uri-to-buffer": "^4.0.0", + "fetch-blob": "^3.1.4", + "formdata-polyfill": "^4.0.10" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/node-fetch" + } + }, + "node_modules/node-releases": { + "version": "2.0.27", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.27.tgz", + "integrity": "sha512-nmh3lCkYZ3grZvqcCH+fjmQ7X+H0OeZgP40OierEaAptX4XofMh5kwNbWh7lBduUzCcV/8kZ+NDLCwm2iorIlA==", + "license": "MIT" + }, + "node_modules/object-inspect": { + "version": "1.13.4", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", + "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.assign": { + "version": "4.1.7", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.7.tgz", + "integrity": "sha512-nK28WOo+QIjBkDduTINE4JkF/UJJKyf2EJxvJKfblDpyg0Q+pkOHNTL0Qwy6NP6FhE/EnzV73BxxqcJaXY9anw==", + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0", + "has-symbols": "^1.1.0", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/obug": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/obug/-/obug-2.1.1.tgz", + "integrity": "sha512-uTqF9MuPraAQ+IsnPf366RG4cP9RtUi7MLO1N3KEc+wb0a6yKpeL0lmk2IB1jY5KHPAlTc6T/JRdC/YqxHNwkQ==", + "dev": true, + "funding": [ + "https://github.com/sponsors/sxzz", + "https://opencollective.com/debug" + ], + "license": "MIT" + }, + "node_modules/open": { + "version": "8.4.2", + "resolved": "https://registry.npmjs.org/open/-/open-8.4.2.tgz", + "integrity": "sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==", + "license": "MIT", + "dependencies": { + "define-lazy-prop": "^2.0.0", + "is-docker": "^2.1.1", + "is-wsl": "^2.2.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/own-keys": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/own-keys/-/own-keys-1.0.1.tgz", + "integrity": "sha512-qFOyK5PjiWZd+QQIh+1jhdb9LpxTF0qs7Pm8o5QHYZ0M3vKqSqzsZaEB6oWlxZ+q2sJBMI/Ktgd2N5ZwQoRHfg==", + "license": "MIT", + "dependencies": { + "get-intrinsic": "^1.2.6", + "object-keys": "^1.1.1", + "safe-push-apply": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/package-json-from-dist": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", + "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", + "license": "BlueOak-1.0.0" + }, + "node_modules/parse-entities": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-4.0.2.tgz", + "integrity": "sha512-GG2AQYWoLgL877gQIKeRPGO1xF9+eG1ujIb5soS5gPvLQ1y2o8FL90w2QWNdf9I361Mpp7726c+lj3U0qK1uGw==", + "license": "MIT", + "dependencies": { + "@types/unist": "^2.0.0", + "character-entities-legacy": "^3.0.0", + "character-reference-invalid": "^2.0.0", + "decode-named-character-reference": "^1.0.0", + "is-alphanumerical": "^2.0.0", + "is-decimal": "^2.0.0", + "is-hexadecimal": "^2.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/parse-entities/node_modules/@types/unist": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.11.tgz", + "integrity": "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==", + "license": "MIT" + }, + "node_modules/parse5": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-8.0.0.tgz", + "integrity": "sha512-9m4m5GSgXjL4AjumKzq1Fgfp3Z8rsvjRNbnkVwfu2ImRqE5D0LnY2QfDen18FSY9C573YU5XxSapdHZTZ2WolA==", + "dev": true, + "license": "MIT", + "dependencies": { + "entities": "^6.0.0" + }, + "funding": { + "url": "https://github.com/inikulin/parse5?sponsor=1" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "license": "MIT" + }, + "node_modules/path-scurry": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.1.tgz", + "integrity": "sha512-oWyT4gICAu+kaA7QWk/jvCHWarMKNs6pXOGWKDTr7cw4IGcUbW+PeTfbaQiLGheFRpjo6O9J0PmyMfQPjH71oA==", + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^11.0.0", + "minipass": "^7.1.2" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/path-scurry/node_modules/lru-cache": { + "version": "11.2.5", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.5.tgz", + "integrity": "sha512-vFrFJkWtJvJnD5hg+hJvVE8Lh/TcMzKnTgCWmtBipwI5yLX/iX+5UB2tfuyODF5E7k9xEzMdYgGqaSb1c0c5Yw==", + "license": "BlueOak-1.0.0", + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/pathe": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", + "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==", + "dev": true, + "license": "MIT" + }, + "node_modules/pend": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", + "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==", + "license": "MIT" + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", + "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/plist": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/plist/-/plist-3.1.0.tgz", + "integrity": "sha512-uysumyrvkUX0rX/dEVqt8gC3sTBzd4zoWfLeS29nb53imdaXVvLINYXTI2GNqzaMuvacNx4uJQ8+b3zXR0pkgQ==", + "license": "MIT", + "dependencies": { + "@xmldom/xmldom": "^0.8.8", + "base64-js": "^1.5.1", + "xmlbuilder": "^15.1.1" + }, + "engines": { + "node": ">=10.4.0" + } + }, + "node_modules/possible-typed-array-names": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.1.0.tgz", + "integrity": "sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/postcss": { + "version": "8.5.6", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.6.tgz", + "integrity": "sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "nanoid": "^3.3.11", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/postcss-value-parser": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", + "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", + "license": "MIT" + }, + "node_modules/potpack": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/potpack/-/potpack-1.0.2.tgz", + "integrity": "sha512-choctRBIV9EMT9WGAZHn3V7t0Z2pMQyl0EZE6pFc/6ml3ssw7Dlf/oAOvFwjm1HVsqfQN8GfeFyJ+d8tRzqueQ==", + "license": "ISC" + }, + "node_modules/pretty-bytes": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-6.1.1.tgz", + "integrity": "sha512-mQUvGU6aUFQ+rNvTIAcZuWGRT9a6f6Yrg9bHs4ImKF+HZCEK+plBvnAZYSIQztknZF2qnzNtr6F8s0+IuptdlQ==", + "license": "MIT", + "engines": { + "node": "^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/pretty-format": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.5.1.tgz", + "integrity": "sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1", + "ansi-styles": "^5.0.0", + "react-is": "^17.0.1" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/pretty-format/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/promise-worker-transferable": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/promise-worker-transferable/-/promise-worker-transferable-1.0.4.tgz", + "integrity": "sha512-bN+0ehEnrXfxV2ZQvU2PetO0n4gqBD4ulq3MI1WOPLgr7/Mg9yRQkX5+0v1vagr74ZTsl7XtzlaYDo2EuCeYJw==", + "license": "Apache-2.0", + "dependencies": { + "is-promise": "^2.1.0", + "lie": "^3.0.2" + } + }, + "node_modules/prompts": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", + "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", + "license": "MIT", + "dependencies": { + "kleur": "^3.0.3", + "sisteransi": "^1.0.5" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/prompts/node_modules/kleur": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", + "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/property-information": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/property-information/-/property-information-7.1.0.tgz", + "integrity": "sha512-TwEZ+X+yCJmYfL7TPUOcvBZ4QfoT5YenQiJuX//0th53DE6w0xxLEtfK3iyryQFddXuvkIk51EEgrJQ0WJkOmQ==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/protobufjs": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.5.4.tgz", + "integrity": "sha512-CvexbZtbov6jW2eXAvLukXjXUW1TzFaivC46BpWc/3BpcCysb5Vffu+B3XHMm8lVEuy2Mm4XGex8hBSg1yapPg==", + "hasInstallScript": true, + "license": "BSD-3-Clause", + "dependencies": { + "@protobufjs/aspromise": "^1.1.2", + "@protobufjs/base64": "^1.1.2", + "@protobufjs/codegen": "^2.0.4", + "@protobufjs/eventemitter": "^1.1.0", + "@protobufjs/fetch": "^1.1.0", + "@protobufjs/float": "^1.0.2", + "@protobufjs/inquire": "^1.1.0", + "@protobufjs/path": "^1.1.2", + "@protobufjs/pool": "^1.1.0", + "@protobufjs/utf8": "^1.1.0", + "@types/node": ">=13.7.0", + "long": "^5.0.0" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "license": "MIT", + "dependencies": { + "safe-buffer": "^5.1.0" + } + }, + "node_modules/react": { + "version": "19.2.4", + "resolved": "https://registry.npmjs.org/react/-/react-19.2.4.tgz", + "integrity": "sha512-9nfp2hYpCwOjAN+8TZFGhtWEwgvWHXqESH8qT89AT/lWklpLON22Lc8pEtnpsZz7VmawabSU0gCjnj8aC0euHQ==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/react-dom": { + "version": "19.2.4", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.2.4.tgz", + "integrity": "sha512-AXJdLo8kgMbimY95O2aKQqsz2iWi9jMgKJhRBAxECE4IFxfcazB2LmzloIoibJI3C12IlY20+KFaLv+71bUJeQ==", + "license": "MIT", + "dependencies": { + "scheduler": "^0.27.0" + }, + "peerDependencies": { + "react": "^19.2.4" + } + }, + "node_modules/react-dom/node_modules/scheduler": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.27.0.tgz", + "integrity": "sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q==", + "license": "MIT" + }, + "node_modules/react-is": { + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", + "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", + "dev": true, + "license": "MIT" + }, + "node_modules/react-markdown": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/react-markdown/-/react-markdown-10.1.0.tgz", + "integrity": "sha512-qKxVopLT/TyA6BX3Ue5NwabOsAzm0Q7kAPwq6L+wWDwisYs7R8vZ0nRXqq6rkueboxpkjvLGU9fWifiX/ZZFxQ==", + "license": "MIT", + "dependencies": { + "@types/hast": "^3.0.0", + "@types/mdast": "^4.0.0", + "devlop": "^1.0.0", + "hast-util-to-jsx-runtime": "^2.0.0", + "html-url-attributes": "^3.0.0", + "mdast-util-to-hast": "^13.0.0", + "remark-parse": "^11.0.0", + "remark-rehype": "^11.0.0", + "unified": "^11.0.0", + "unist-util-visit": "^5.0.0", + "vfile": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + }, + "peerDependencies": { + "@types/react": ">=18", + "react": ">=18" + } + }, + "node_modules/react-reconciler": { + "version": "0.31.0", + "resolved": "https://registry.npmjs.org/react-reconciler/-/react-reconciler-0.31.0.tgz", + "integrity": "sha512-7Ob7Z+URmesIsIVRjnLoDGwBEG/tVitidU0nMsqX/eeJaLY89RISO/10ERe0MqmzuKUUB1rmY+h1itMbUHg9BQ==", + "license": "MIT", + "dependencies": { + "scheduler": "^0.25.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "peerDependencies": { + "react": "^19.0.0" + } + }, + "node_modules/react-refresh": { + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.18.0.tgz", + "integrity": "sha512-QgT5//D3jfjJb6Gsjxv0Slpj23ip+HtOpnNgnb2S5zU3CB26G/IDPGoy4RJB42wzFE46DRsstbW6tKHoKbhAxw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/redent": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-3.0.0.tgz", + "integrity": "sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==", + "dev": true, + "license": "MIT", + "dependencies": { + "indent-string": "^4.0.0", + "strip-indent": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/reflect.getprototypeof": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.10.tgz", + "integrity": "sha512-00o4I+DVrefhv+nX0ulyi3biSHCPDe+yLv5o/p6d/UVlirijB8E16FtfwSAi4g3tcqrQ4lRAqQSoFEZJehYEcw==", + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.9", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "get-intrinsic": "^1.2.7", + "get-proto": "^1.0.1", + "which-builtin-type": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/regenerate": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", + "integrity": "sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==", + "license": "MIT" + }, + "node_modules/regenerate-unicode-properties": { + "version": "10.2.2", + "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-10.2.2.tgz", + "integrity": "sha512-m03P+zhBeQd1RGnYxrGyDAPpWX/epKirLrp8e3qevZdVkKtnCrjjWczIbYc8+xd6vcTStVlqfycTx1KR4LOr0g==", + "license": "MIT", + "dependencies": { + "regenerate": "^1.4.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/regexp.prototype.flags": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.4.tgz", + "integrity": "sha512-dYqgNSZbDwkaJ2ceRd9ojCGjBq+mOm9LmtXnAnEGyHhN/5R7iDW2TRw3h+o/jCFxus3P2LfWIIiwowAjANm7IA==", + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "define-properties": "^1.2.1", + "es-errors": "^1.3.0", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "set-function-name": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/regexpu-core": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-6.4.0.tgz", + "integrity": "sha512-0ghuzq67LI9bLXpOX/ISfve/Mq33a4aFRzoQYhnnok1JOFpmE/A2TBGkNVenOGEeSBCjIiWcc6MVOG5HEQv0sA==", + "license": "MIT", + "dependencies": { + "regenerate": "^1.4.2", + "regenerate-unicode-properties": "^10.2.2", + "regjsgen": "^0.8.0", + "regjsparser": "^0.13.0", + "unicode-match-property-ecmascript": "^2.0.0", + "unicode-match-property-value-ecmascript": "^2.2.1" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/regjsgen": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.8.0.tgz", + "integrity": "sha512-RvwtGe3d7LvWiDQXeQw8p5asZUmfU1G/l6WbUXeHta7Y2PEIvBTwH6E2EfmYUK8pxcxEdEmaomqyp0vZZ7C+3Q==", + "license": "MIT" + }, + "node_modules/regjsparser": { + "version": "0.13.0", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.13.0.tgz", + "integrity": "sha512-NZQZdC5wOE/H3UT28fVGL+ikOZcEzfMGk/c3iN9UGxzWHMa1op7274oyiUVrAG4B2EuFhus8SvkaYnhvW92p9Q==", + "license": "BSD-2-Clause", + "dependencies": { + "jsesc": "~3.1.0" + }, + "bin": { + "regjsparser": "bin/parser" + } + }, + "node_modules/remark-parse": { + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/remark-parse/-/remark-parse-11.0.0.tgz", + "integrity": "sha512-FCxlKLNGknS5ba/1lmpYijMUzX2esxW5xQqjWxw2eHFfS2MSdaHVINFmhjo+qN1WhZhNimq0dZATN9pH0IDrpA==", + "license": "MIT", + "dependencies": { + "@types/mdast": "^4.0.0", + "mdast-util-from-markdown": "^2.0.0", + "micromark-util-types": "^2.0.0", + "unified": "^11.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-rehype": { + "version": "11.1.2", + "resolved": "https://registry.npmjs.org/remark-rehype/-/remark-rehype-11.1.2.tgz", + "integrity": "sha512-Dh7l57ianaEoIpzbp0PC9UKAdCSVklD8E5Rpw7ETfbTl3FqcOOgq5q2LVDhgGCkaBv7p24JXikPdvhhmHvKMsw==", + "license": "MIT", + "dependencies": { + "@types/hast": "^3.0.0", + "@types/mdast": "^4.0.0", + "mdast-util-to-hast": "^13.0.0", + "unified": "^11.0.0", + "vfile": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/resolve": { + "version": "1.22.11", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.11.tgz", + "integrity": "sha512-RfqAvLnMl313r7c9oclB1HhUEAezcpLjz95wFH4LVuhk9JF/r22qmVP9AMmOU4vMX7Q8pN8jwNg/CSpdFnMjTQ==", + "license": "MIT", + "dependencies": { + "is-core-module": "^2.16.1", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/rimraf": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-4.4.1.tgz", + "integrity": "sha512-Gk8NlF062+T9CqNGn6h4tls3k6T1+/nXdOcSZVikNVtlRdYpA7wRJJMoXmuvOnLW844rPjdQ7JgXCYM6PPC/og==", + "license": "ISC", + "dependencies": { + "glob": "^9.2.0" + }, + "bin": { + "rimraf": "dist/cjs/src/bin.js" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rollup": { + "version": "2.80.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.80.0.tgz", + "integrity": "sha512-cIFJOD1DESzpjOBl763Kp1AH7UE/0fcdHe6rZXUdQ9c50uvgigvW97u3IcSeBwOkgqL/PXPBktBCh0KEu5L8XQ==", + "license": "MIT", + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=10.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/safe-array-concat": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.3.tgz", + "integrity": "sha512-AURm5f0jYEOydBj7VQlVvDrjeFgthDdEF5H1dP+6mNpoXOMo1quQqJ4wvJDyRZ9+pO3kGWoOdmV08cSv2aJV6Q==", + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.2", + "get-intrinsic": "^1.2.6", + "has-symbols": "^1.1.0", + "isarray": "^2.0.5" + }, + "engines": { + "node": ">=0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/safe-push-apply": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/safe-push-apply/-/safe-push-apply-1.0.0.tgz", + "integrity": "sha512-iKE9w/Z7xCzUMIZqdBsp6pEQvwuEebH4vdpjcDWnyzaI6yl6O9FHvVpmGelvEHNsoY6wGblkxR6Zty/h00WiSA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "isarray": "^2.0.5" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/safe-regex-test": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.1.0.tgz", + "integrity": "sha512-x/+Cz4YrimQxQccJf5mKEbIa1NzeCRNI5Ecl/ekmlYaampdNLPalVyIcCZNNH3MvmqBugV5TMYZXv0ljslUlaw==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "is-regex": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/sax": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.1.4.tgz", + "integrity": "sha512-5f3k2PbGGp+YtKJjOItpg3P99IMD84E4HOvcfleTb5joCHNXYLsR9yWFPOYGgaeMPDubQILTCMdsFb2OMeOjtg==", + "license": "ISC" + }, + "node_modules/saxes": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/saxes/-/saxes-6.0.0.tgz", + "integrity": "sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==", + "dev": true, + "license": "ISC", + "dependencies": { + "xmlchars": "^2.2.0" + }, + "engines": { + "node": ">=v12.22.7" + } + }, + "node_modules/scheduler": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.25.0.tgz", + "integrity": "sha512-xFVuu11jh+xcO7JOAGJNOXld8/TcEHK/4CituBUeUb5hqxJLj9YuemAEuvm9gQ/+pgXYfbQuqAkiYu+u7YEsNA==", + "license": "MIT" + }, + "node_modules/seedrandom": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/seedrandom/-/seedrandom-3.0.5.tgz", + "integrity": "sha512-8OwmbklUNzwezjGInmZ+2clQmExQPvomqjL7LFqOYqtmuxRgQYqOD3mHaU+MvZn5FLUeVxVfQjwLZW/n/JFuqg==", + "license": "MIT" + }, + "node_modules/semver": { + "version": "7.7.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", + "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/serialize-javascript": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", + "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", + "license": "BSD-3-Clause", + "dependencies": { + "randombytes": "^2.1.0" + } + }, + "node_modules/set-function-length": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "license": "MIT", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/set-function-name": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz", + "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==", + "license": "MIT", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "functions-have-names": "^1.2.3", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/set-proto": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/set-proto/-/set-proto-1.0.0.tgz", + "integrity": "sha512-RJRdvCo6IAnPdsvP/7m6bsQqNnn1FCBX5ZNtFL98MmFF/4xAIJTIg1YbHW5DC2W5SKZanrC6i4HsJqlajw/dZw==", + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/side-channel": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", + "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3", + "side-channel-list": "^1.0.0", + "side-channel-map": "^1.0.1", + "side-channel-weakmap": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-list": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz", + "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", + "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-weakmap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", + "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3", + "side-channel-map": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/siginfo": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz", + "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==", + "dev": true, + "license": "ISC" + }, + "node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "license": "ISC" + }, + "node_modules/sisteransi": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", + "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", + "license": "MIT" + }, + "node_modules/slice-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", + "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/slice-ansi?sponsor=1" + } + }, + "node_modules/smob": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/smob/-/smob-1.5.0.tgz", + "integrity": "sha512-g6T+p7QO8npa+/hNx9ohv1E5pVCmWrVCUzUXJyLdMmftX6ER0oiWY/w9knEonLpnOp6b6FenKnMfR8gqwWdwig==", + "license": "MIT" + }, + "node_modules/source-map": { + "version": "0.8.0-beta.0", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.8.0-beta.0.tgz", + "integrity": "sha512-2ymg6oRBpebeZi9UUNsgQ89bhx01TcTkmNTGnNO88imTmbSgy4nfujrgVEFKWpMTEGA11EDkTt7mqObTPdigIA==", + "deprecated": "The work that was done in this beta branch won't be included in future versions", + "license": "BSD-3-Clause", + "dependencies": { + "whatwg-url": "^7.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/source-map-js": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-support": { + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "license": "MIT", + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/source-map-support/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/sourcemap-codec": { + "version": "1.4.8", + "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", + "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==", + "deprecated": "Please use @jridgewell/sourcemap-codec instead", + "license": "MIT" + }, + "node_modules/space-separated-tokens": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/space-separated-tokens/-/space-separated-tokens-2.0.2.tgz", + "integrity": "sha512-PEGlAwrG8yXGXRjW32fGbg66JAlOAwbObuqVoJpv/mRgoWDQfgH1wDPvtzWyUSNAXBGSk8h755YDbbcEy3SH2Q==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/split2": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz", + "integrity": "sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==", + "license": "ISC", + "engines": { + "node": ">= 10.x" + } + }, + "node_modules/stackback": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz", + "integrity": "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==", + "dev": true, + "license": "MIT" + }, + "node_modules/stats-gl": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/stats-gl/-/stats-gl-2.4.2.tgz", + "integrity": "sha512-g5O9B0hm9CvnM36+v7SFl39T7hmAlv541tU81ME8YeSb3i1CIP5/QdDeSB3A0la0bKNHpxpwxOVRo2wFTYEosQ==", + "license": "MIT", + "dependencies": { + "@types/three": "*", + "three": "^0.170.0" + }, + "peerDependencies": { + "@types/three": "*", + "three": "*" + } + }, + "node_modules/stats.js": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/stats.js/-/stats.js-0.17.0.tgz", + "integrity": "sha512-hNKz8phvYLPEcRkeG1rsGmV5ChMjKDAWU7/OJJdDErPBNChQXxCo3WZurGpnWc6gZhAzEPFad1aVgyOANH1sMw==", + "license": "MIT" + }, + "node_modules/std-env": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.10.0.tgz", + "integrity": "sha512-5GS12FdOZNliM5mAOxFRg7Ir0pWz8MdpYm6AY6VPkGpbA7ZzmbzNcBJQ0GPvvyWgcY7QAhCgf9Uy89I03faLkg==", + "dev": true, + "license": "MIT" + }, + "node_modules/stop-iteration-iterator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/stop-iteration-iterator/-/stop-iteration-iterator-1.1.0.tgz", + "integrity": "sha512-eLoXW/DHyl62zxY4SCaIgnRhuMr6ri4juEYARS8E6sCEqzKpOiE521Ucofdx+KnDZl5xmvGYaaKCk5FEOxJCoQ==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "internal-slot": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string.prototype.matchall": { + "version": "4.0.12", + "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.12.tgz", + "integrity": "sha512-6CC9uyBL+/48dYizRf7H7VAYCMCNTBeM78x/VTUe9bFEaxBepPJDa1Ow99LqI/1yF7kuy7Q3cQsYMrcjGUcskA==", + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.6", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "get-intrinsic": "^1.2.6", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "internal-slot": "^1.1.0", + "regexp.prototype.flags": "^1.5.3", + "set-function-name": "^2.0.2", + "side-channel": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trim": { + "version": "1.2.10", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.10.tgz", + "integrity": "sha512-Rs66F0P/1kedk5lyYyH9uBzuiI/kNRmwJAR9quK6VOtIpZ2G+hMZd+HQbbv25MgCA6gEffoMZYxlTod4WcdrKA==", + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.2", + "define-data-property": "^1.1.4", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.5", + "es-object-atoms": "^1.0.0", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimend": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.9.tgz", + "integrity": "sha512-G7Ok5C6E/j4SGfyLCloXTrngQIQU3PWtXGst3yM7Bea9FRURf1S42ZHlZZtsNque2FN2PoUhfZXYLNWwEr4dLQ==", + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.2", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimstart": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz", + "integrity": "sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==", + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/stringify-entities": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/stringify-entities/-/stringify-entities-4.0.4.tgz", + "integrity": "sha512-IwfBptatlO+QCJUo19AqvrPNqlVMpW9YEL2LIVY+Rpv2qsjCGxaDLNRgeGsQWJhfItebuJhsGSLjaBbNSQ+ieg==", + "license": "MIT", + "dependencies": { + "character-entities-html4": "^2.0.0", + "character-entities-legacy": "^3.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/stringify-object": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/stringify-object/-/stringify-object-3.3.0.tgz", + "integrity": "sha512-rHqiFh1elqCQ9WPLIC8I0Q/g/wj5J1eMkyoiD6eoQApWHP0FtlK7rqnhmabL5VUY9JQCcqwwvlOaSuutekgyrw==", + "license": "BSD-2-Clause", + "dependencies": { + "get-own-enumerable-property-symbols": "^3.0.0", + "is-obj": "^1.0.1", + "is-regexp": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-comments/-/strip-comments-2.0.1.tgz", + "integrity": "sha512-ZprKx+bBLXv067WTCALv8SSz5l2+XhpYCsVtSqlMnkAXMWDq+/ekVbl1ghqP9rUHTzv6sm/DwCOiYutU/yp1fw==", + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/strip-indent": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", + "integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "min-indent": "^1.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/style-to-js": { + "version": "1.1.21", + "resolved": "https://registry.npmjs.org/style-to-js/-/style-to-js-1.1.21.tgz", + "integrity": "sha512-RjQetxJrrUJLQPHbLku6U/ocGtzyjbJMP9lCNK7Ag0CNh690nSH8woqWH9u16nMjYBAok+i7JO1NP2pOy8IsPQ==", + "license": "MIT", + "dependencies": { + "style-to-object": "1.0.14" + } + }, + "node_modules/style-to-object": { + "version": "1.0.14", + "resolved": "https://registry.npmjs.org/style-to-object/-/style-to-object-1.0.14.tgz", + "integrity": "sha512-LIN7rULI0jBscWQYaSswptyderlarFkjQ+t79nzty8tcIAceVomEVlLzH5VP4Cmsv6MtKhs7qaAiwlcp+Mgaxw==", + "license": "MIT", + "dependencies": { + "inline-style-parser": "0.2.7" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/suspend-react": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/suspend-react/-/suspend-react-0.1.3.tgz", + "integrity": "sha512-aqldKgX9aZqpoDp3e8/BZ8Dm7x1pJl+qI3ZKxDN0i/IQTWUwBx/ManmlVJ3wowqbno6c2bmiIfs+Um6LbsjJyQ==", + "license": "MIT", + "peerDependencies": { + "react": ">=17.0" + } + }, + "node_modules/symbol-tree": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", + "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", + "dev": true, + "license": "MIT" + }, + "node_modules/tailwindcss": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.2.4.tgz", + "integrity": "sha512-HhKppgO81FQof5m6TEnuBWCZGgfRAWbaeOaGT00KOy/Pf/j6oUihdvBpA7ltCeAvZpFhW3j0PTclkxsd4IXYDA==", + "license": "MIT" + }, + "node_modules/tapable": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.3.3.tgz", + "integrity": "sha512-uxc/zpqFg6x7C8vOE7lh6Lbda8eEL9zmVm/PLeTPBRhh1xCgdWaQ+J1CUieGpIfm2HdtsUpRv+HshiasBMcc6A==", + "license": "MIT", + "engines": { + "node": ">=6" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/tar": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.1.tgz", + "integrity": "sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==", + "deprecated": "Old versions of tar are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me", + "license": "ISC", + "dependencies": { + "chownr": "^2.0.0", + "fs-minipass": "^2.0.0", + "minipass": "^5.0.0", + "minizlib": "^2.1.1", + "mkdirp": "^1.0.3", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/tar/node_modules/minipass": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", + "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==", + "license": "ISC", + "engines": { + "node": ">=8" + } + }, + "node_modules/tar/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "license": "ISC" + }, + "node_modules/temp-dir": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/temp-dir/-/temp-dir-2.0.0.tgz", + "integrity": "sha512-aoBAniQmmwtcKp/7BzsH8Cxzv8OL736p7v1ihGb5e9DJ9kTwGWHrQrVB5+lfVDzfGrdRzXch+ig7LHaY1JTOrg==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/tempy": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tempy/-/tempy-0.6.0.tgz", + "integrity": "sha512-G13vtMYPT/J8A4X2SjdtBTphZlrp1gKv6hZiOjw14RCWg6GbHuQBGtjlx75xLbYV/wEc0D7G5K4rxKP/cXk8Bw==", + "license": "MIT", + "dependencies": { + "is-stream": "^2.0.0", + "temp-dir": "^2.0.0", + "type-fest": "^0.16.0", + "unique-string": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/terser": { + "version": "5.46.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.46.0.tgz", + "integrity": "sha512-jTwoImyr/QbOWFFso3YoU3ik0jBBDJ6JTOQiy/J2YxVJdZCc+5u7skhNwiOR3FQIygFqVUPHl7qbbxtjW2K3Qg==", + "license": "BSD-2-Clause", + "dependencies": { + "@jridgewell/source-map": "^0.3.3", + "acorn": "^8.15.0", + "commander": "^2.20.0", + "source-map-support": "~0.5.20" + }, + "bin": { + "terser": "bin/terser" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/terser/node_modules/commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "license": "MIT" + }, + "node_modules/three": { + "version": "0.170.0", + "resolved": "https://registry.npmjs.org/three/-/three-0.170.0.tgz", + "integrity": "sha512-FQK+LEpYc0fBD+J8g6oSEyyNzjp+Q7Ks1C568WWaoMRLW+TkNNWmenWeGgJjV105Gd+p/2ql1ZcjYvNiPZBhuQ==", + "license": "MIT" + }, + "node_modules/three-mesh-bvh": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/three-mesh-bvh/-/three-mesh-bvh-0.8.3.tgz", + "integrity": "sha512-4G5lBaF+g2auKX3P0yqx+MJC6oVt6sB5k+CchS6Ob0qvH0YIhuUk1eYr7ktsIpY+albCqE80/FVQGV190PmiAg==", + "license": "MIT", + "peerDependencies": { + "three": ">= 0.159.0" + } + }, + "node_modules/three-stdlib": { + "version": "2.36.1", + "resolved": "https://registry.npmjs.org/three-stdlib/-/three-stdlib-2.36.1.tgz", + "integrity": "sha512-XyGQrFmNQ5O/IoKm556ftwKsBg11TIb301MB5dWNicziQBEs2g3gtOYIf7pFiLa0zI2gUwhtCjv9fmjnxKZ1Cg==", + "license": "MIT", + "dependencies": { + "@types/draco3d": "^1.4.0", + "@types/offscreencanvas": "^2019.6.4", + "@types/webxr": "^0.5.2", + "draco3d": "^1.4.1", + "fflate": "^0.6.9", + "potpack": "^1.0.1" + }, + "peerDependencies": { + "three": ">=0.128.0" + } + }, + "node_modules/three-stdlib/node_modules/fflate": { + "version": "0.6.10", + "resolved": "https://registry.npmjs.org/fflate/-/fflate-0.6.10.tgz", + "integrity": "sha512-IQrh3lEPM93wVCEczc9SaAOvkmcoQn/G8Bo1e8ZPlY3X3bnAxWaBdvTdvM1hP62iZp0BXWDy4vTAy4fF0+Dlpg==", + "license": "MIT" + }, + "node_modules/through2": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/through2/-/through2-4.0.2.tgz", + "integrity": "sha512-iOqSav00cVxEEICeD7TjLB1sueEL+81Wpzp2bY17uZjZN0pWZPuo4suZ/61VujxmqSGFfgOcNuTZ85QJwNZQpw==", + "license": "MIT", + "dependencies": { + "readable-stream": "3" + } + }, + "node_modules/tiny-emitter": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/tiny-emitter/-/tiny-emitter-2.1.0.tgz", + "integrity": "sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q==", + "license": "MIT" + }, + "node_modules/tinybench": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.9.0.tgz", + "integrity": "sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==", + "dev": true, + "license": "MIT" + }, + "node_modules/tinyexec": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.0.2.tgz", + "integrity": "sha512-W/KYk+NFhkmsYpuHq5JykngiOCnxeVL8v8dFnqxSD8qEEdRfXk1SDM6JzNqcERbcGYj9tMrDQBYV9cjgnunFIg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/tinyglobby": { + "version": "0.2.15", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.15.tgz", + "integrity": "sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==", + "license": "MIT", + "dependencies": { + "fdir": "^6.5.0", + "picomatch": "^4.0.3" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/tinyrainbow": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/tinyrainbow/-/tinyrainbow-3.0.3.tgz", + "integrity": "sha512-PSkbLUoxOFRzJYjjxHJt9xro7D+iilgMX/C9lawzVuYiIdcihh9DXmVibBe8lmcFrRi/VzlPjBxbN7rH24q8/Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/tldts": { + "version": "7.0.22", + "resolved": "https://registry.npmjs.org/tldts/-/tldts-7.0.22.tgz", + "integrity": "sha512-nqpKFC53CgopKPjT6Wfb6tpIcZXHcI6G37hesvikhx0EmUGPkZrujRyAjgnmp1SHNgpQfKVanZ+KfpANFt2Hxw==", + "dev": true, + "license": "MIT", + "dependencies": { + "tldts-core": "^7.0.22" + }, + "bin": { + "tldts": "bin/cli.js" + } + }, + "node_modules/tldts-core": { + "version": "7.0.22", + "resolved": "https://registry.npmjs.org/tldts-core/-/tldts-core-7.0.22.tgz", + "integrity": "sha512-KgbTDC5wzlL6j/x6np6wCnDSMUq4kucHNm00KXPbfNzmllCmtmvtykJHfmgdHntwIeupW04y8s1N/43S1PkQDw==", + "dev": true, + "license": "MIT" + }, + "node_modules/tough-cookie": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-6.0.0.tgz", + "integrity": "sha512-kXuRi1mtaKMrsLUxz3sQYvVl37B0Ns6MzfrtV5DvJceE9bPyspOqk9xxv7XbZWcfLWbFmm997vl83qUWVJA64w==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "tldts": "^7.0.5" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/tr46": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-1.0.1.tgz", + "integrity": "sha512-dTpowEjclQ7Kgx5SdBkqRzVhERQXov8/l9Ft9dVM9fmg0W0KQSVaXX9T4i6twCPNtYiZM53lpSSUAwJbFPOHxA==", + "license": "MIT", + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/tree-kill": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", + "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", + "license": "MIT", + "bin": { + "tree-kill": "cli.js" + } + }, + "node_modules/trim-lines": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/trim-lines/-/trim-lines-3.0.1.tgz", + "integrity": "sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/troika-three-text": { + "version": "0.52.4", + "resolved": "https://registry.npmjs.org/troika-three-text/-/troika-three-text-0.52.4.tgz", + "integrity": "sha512-V50EwcYGruV5rUZ9F4aNsrytGdKcXKALjEtQXIOBfhVoZU9VAqZNIoGQ3TMiooVqFAbR1w15T+f+8gkzoFzawg==", + "license": "MIT", + "dependencies": { + "bidi-js": "^1.0.2", + "troika-three-utils": "^0.52.4", + "troika-worker-utils": "^0.52.0", + "webgl-sdf-generator": "1.1.1" + }, + "peerDependencies": { + "three": ">=0.125.0" + } + }, + "node_modules/troika-three-utils": { + "version": "0.52.4", + "resolved": "https://registry.npmjs.org/troika-three-utils/-/troika-three-utils-0.52.4.tgz", + "integrity": "sha512-NORAStSVa/BDiG52Mfudk4j1FG4jC4ILutB3foPnfGbOeIs9+G5vZLa0pnmnaftZUGm4UwSoqEpWdqvC7zms3A==", + "license": "MIT", + "peerDependencies": { + "three": ">=0.125.0" + } + }, + "node_modules/troika-worker-utils": { + "version": "0.52.0", + "resolved": "https://registry.npmjs.org/troika-worker-utils/-/troika-worker-utils-0.52.0.tgz", + "integrity": "sha512-W1CpvTHykaPH5brv5VHLfQo9D1OYuo0cSBEUQFFT/nBUzM8iD6Lq2/tgG/f1OelbAS1WtaTPQzE5uM49egnngw==", + "license": "MIT" + }, + "node_modules/trough": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/trough/-/trough-2.2.0.tgz", + "integrity": "sha512-tmMpK00BjZiUyVyvrBK7knerNgmgvcV/KLVyuma/SC+TQN167GrMRciANTz09+k3zW8L8t60jWO1GpfkZdjTaw==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, + "node_modules/tunnel-rat": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/tunnel-rat/-/tunnel-rat-0.1.2.tgz", + "integrity": "sha512-lR5VHmkPhzdhrM092lI2nACsLO4QubF0/yoOhzX7c+wIpbN1GjHNzCc91QlpxBi+cnx8vVJ+Ur6vL5cEoQPFpQ==", + "license": "MIT", + "dependencies": { + "zustand": "^4.3.2" + } + }, + "node_modules/tunnel-rat/node_modules/zustand": { + "version": "4.5.7", + "resolved": "https://registry.npmjs.org/zustand/-/zustand-4.5.7.tgz", + "integrity": "sha512-CHOUy7mu3lbD6o6LJLfllpjkzhHXSBlX8B9+qPddUsIfeF5S/UZ5q0kmCsnRqT1UHFQZchNFDDzMbQsuesHWlw==", + "license": "MIT", + "dependencies": { + "use-sync-external-store": "^1.2.2" + }, + "engines": { + "node": ">=12.7.0" + }, + "peerDependencies": { + "@types/react": ">=16.8", + "immer": ">=9.0.6", + "react": ">=16.8" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "immer": { + "optional": true + }, + "react": { + "optional": true + } + } + }, + "node_modules/type-fest": { + "version": "0.16.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.16.0.tgz", + "integrity": "sha512-eaBzG6MxNzEn9kiwvtre90cXaNLkmadMWa1zQMs3XORCXNbsH/OewwbxC5ia9dCxIxnTAsSxXJaa/p5y8DlvJg==", + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/typed-array-buffer": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.3.tgz", + "integrity": "sha512-nAYYwfY3qnzX30IkA6AQZjVbtK6duGontcQm1WSG1MD94YLqK0515GNApXkoxKOWMusVssAHWLh9SeaoefYFGw==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "es-errors": "^1.3.0", + "is-typed-array": "^1.1.14" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/typed-array-byte-length": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.3.tgz", + "integrity": "sha512-BaXgOuIxz8n8pIq3e7Atg/7s+DpiYrxn4vdot3w9KbnBhcRQq6o3xemQdIfynqSeXeDrF32x+WvfzmOjPiY9lg==", + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "for-each": "^0.3.3", + "gopd": "^1.2.0", + "has-proto": "^1.2.0", + "is-typed-array": "^1.1.14" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-byte-offset": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.4.tgz", + "integrity": "sha512-bTlAFB/FBYMcuX81gbL4OcpH5PmlFHqlCCpAl8AlEzMz5k53oNDvN8p1PNOWLEmI2x4orp3raOFB51tv9X+MFQ==", + "license": "MIT", + "dependencies": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.8", + "for-each": "^0.3.3", + "gopd": "^1.2.0", + "has-proto": "^1.2.0", + "is-typed-array": "^1.1.15", + "reflect.getprototypeof": "^1.0.9" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-length": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.7.tgz", + "integrity": "sha512-3KS2b+kL7fsuk/eJZ7EQdnEmQoaho/r6KUef7hxvltNA5DR8NAUM+8wJMbJyZ4G9/7i3v5zPBIMN5aybAh2/Jg==", + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "is-typed-array": "^1.1.13", + "possible-typed-array-names": "^1.0.0", + "reflect.getprototypeof": "^1.0.6" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-function": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/typed-function/-/typed-function-4.2.2.tgz", + "integrity": "sha512-VwaXim9Gp1bngi/q3do8hgttYn2uC3MoT/gfuMWylnj1IeZBUAyPddHZlo1K05BDoj8DYPpMdiHqH1dDYdJf2A==", + "license": "MIT", + "engines": { + "node": ">= 18" + } + }, + "node_modules/typescript": { + "version": "5.8.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz", + "integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/unbox-primitive": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.1.0.tgz", + "integrity": "sha512-nWJ91DjeOkej/TA8pXQ3myruKpKEYgqvpw9lz4OPHj/NWFNluYrjbz9j01CJ8yKQd2g4jFoOkINCTW2I5LEEyw==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "has-bigints": "^1.0.2", + "has-symbols": "^1.1.0", + "which-boxed-primitive": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/undici": { + "version": "7.20.0", + "resolved": "https://registry.npmjs.org/undici/-/undici-7.20.0.tgz", + "integrity": "sha512-MJZrkjyd7DeC+uPZh+5/YaMDxFiiEEaDgbUSVMXayofAkDWF1088CDo+2RPg7B1BuS1qf1vgNE7xqwPxE0DuSQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=20.18.1" + } + }, + "node_modules/undici-types": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", + "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", + "license": "MIT" + }, + "node_modules/unicode-canonical-property-names-ecmascript": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.1.tgz", + "integrity": "sha512-dA8WbNeb2a6oQzAQ55YlT5vQAWGV9WXOsi3SskE3bcCdM0P4SDd+24zS/OCacdRq5BkdsRj9q3Pg6YyQoxIGqg==", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/unicode-match-property-ecmascript": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-2.0.0.tgz", + "integrity": "sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q==", + "license": "MIT", + "dependencies": { + "unicode-canonical-property-names-ecmascript": "^2.0.0", + "unicode-property-aliases-ecmascript": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/unicode-match-property-value-ecmascript": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.2.1.tgz", + "integrity": "sha512-JQ84qTuMg4nVkx8ga4A16a1epI9H6uTXAknqxkGF/aFfRLw1xC/Bp24HNLaZhHSkWd3+84t8iXnp1J0kYcZHhg==", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/unicode-property-aliases-ecmascript": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.2.0.tgz", + "integrity": "sha512-hpbDzxUY9BFwX+UeBnxv3Sh1q7HFxj48DTmXchNgRa46lO8uj3/1iEn3MiNUYTg1g9ctIqXCCERn8gYZhHC5lQ==", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/unified": { + "version": "11.0.5", + "resolved": "https://registry.npmjs.org/unified/-/unified-11.0.5.tgz", + "integrity": "sha512-xKvGhPWw3k84Qjh8bI3ZeJjqnyadK+GEFtazSfZv/rKeTkTjOJho6mFqh2SM96iIcZokxiOpg78GazTSg8+KHA==", + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0", + "bail": "^2.0.0", + "devlop": "^1.0.0", + "extend": "^3.0.0", + "is-plain-obj": "^4.0.0", + "trough": "^2.0.0", + "vfile": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unique-string": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz", + "integrity": "sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg==", + "license": "MIT", + "dependencies": { + "crypto-random-string": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/unist-util-is": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-6.0.1.tgz", + "integrity": "sha512-LsiILbtBETkDz8I9p1dQ0uyRUWuaQzd/cuEeS1hoRSyW5E5XGmTzlwY1OrNzzakGowI9Dr/I8HVaw4hTtnxy8g==", + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-position": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/unist-util-position/-/unist-util-position-5.0.0.tgz", + "integrity": "sha512-fucsC7HjXvkB5R3kTCO7kUjRdrS0BJt3M/FPxmHMBOm8JQi2BsHAHFsy27E0EolP8rp0NzXsJ+jNPyDWvOJZPA==", + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-stringify-position": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-4.0.0.tgz", + "integrity": "sha512-0ASV06AAoKCDkS2+xw5RXJywruurpbC4JZSm7nr7MOt1ojAzvyyaO+UxZf18j8FCF6kmzCZKcAgN/yu2gm2XgQ==", + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-visit": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-5.1.0.tgz", + "integrity": "sha512-m+vIdyeCOpdr/QeQCu2EzxX/ohgS8KbnPDgFni4dQsfSCtpz8UqDyY5GjRru8PDKuYn7Fq19j1CQ+nJSsGKOzg==", + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0", + "unist-util-is": "^6.0.0", + "unist-util-visit-parents": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-visit-parents": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-6.0.2.tgz", + "integrity": "sha512-goh1s1TBrqSqukSc8wrjwWhL0hiJxgA8m4kFxGlQ+8FYQ3C/m11FcTs4YYem7V664AhHVvgoQLk890Ssdsr2IQ==", + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0", + "unist-util-is": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/universalify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "license": "MIT", + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/untildify": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz", + "integrity": "sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/upath": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/upath/-/upath-1.2.0.tgz", + "integrity": "sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==", + "license": "MIT", + "engines": { + "node": ">=4", + "yarn": "*" + } + }, + "node_modules/update-browserslist-db": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.2.3.tgz", + "integrity": "sha512-Js0m9cx+qOgDxo0eMiFGEueWztz+d4+M3rGlmKPT+T4IS/jP4ylw3Nwpu6cpTTP8R1MAC1kF4VbdLt3ARf209w==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "escalade": "^3.2.0", + "picocolors": "^1.1.1" + }, + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "node_modules/use-sync-external-store": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.6.0.tgz", + "integrity": "sha512-Pp6GSwGP/NrPIrxVFAIkOQeyw8lFenOHijQWkUTrDvrF4ALqylP2C/KCkeS9dpUM3KvYRQhna5vt7IL95+ZQ9w==", + "license": "MIT", + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "license": "MIT" + }, + "node_modules/utility-types": { + "version": "3.11.0", + "resolved": "https://registry.npmjs.org/utility-types/-/utility-types-3.11.0.tgz", + "integrity": "sha512-6Z7Ma2aVEWisaL6TvBCy7P8rm2LQoPv6dJ7ecIaIixHcwfbJ0x7mWdbcwlIM5IGQxPZSFYeqRCqlOOeKoJYMkw==", + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/vfile": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/vfile/-/vfile-6.0.3.tgz", + "integrity": "sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q==", + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0", + "vfile-message": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/vfile-message": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-4.0.3.tgz", + "integrity": "sha512-QTHzsGd1EhbZs4AsQ20JX1rC3cOlt/IWJruk893DfLRr57lcnOeMaWG4K0JrRta4mIJZKth2Au3mM3u03/JWKw==", + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0", + "unist-util-stringify-position": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/vite": { + "version": "6.4.1", + "resolved": "https://registry.npmjs.org/vite/-/vite-6.4.1.tgz", + "integrity": "sha512-+Oxm7q9hDoLMyJOYfUYBuHQo+dkAloi33apOPP56pzj+vsdJDzr+j1NISE5pyaAuKL4A3UD34qd0lx5+kfKp2g==", + "license": "MIT", + "dependencies": { + "esbuild": "^0.25.0", + "fdir": "^6.4.4", + "picomatch": "^4.0.2", + "postcss": "^8.5.3", + "rollup": "^4.34.9", + "tinyglobby": "^0.2.13" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^18.0.0 || ^20.0.0 || >=22.0.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", + "jiti": ">=1.21.0", + "less": "*", + "lightningcss": "^1.21.0", + "sass": "*", + "sass-embedded": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.16.0", + "tsx": "^4.8.1", + "yaml": "^2.4.2" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "jiti": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + }, + "tsx": { + "optional": true + }, + "yaml": { + "optional": true + } + } + }, + "node_modules/vite-plugin-pwa": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/vite-plugin-pwa/-/vite-plugin-pwa-1.2.0.tgz", + "integrity": "sha512-a2xld+SJshT9Lgcv8Ji4+srFJL4k/1bVbd1x06JIkvecpQkwkvCncD1+gSzcdm3s+owWLpMJerG3aN5jupJEVw==", + "license": "MIT", + "dependencies": { + "debug": "^4.3.6", + "pretty-bytes": "^6.1.1", + "tinyglobby": "^0.2.10", + "workbox-build": "^7.4.0", + "workbox-window": "^7.4.0" + }, + "engines": { + "node": ">=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + }, + "peerDependencies": { + "@vite-pwa/assets-generator": "^1.0.0", + "vite": "^3.1.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0", + "workbox-build": "^7.4.0", + "workbox-window": "^7.4.0" + }, + "peerDependenciesMeta": { + "@vite-pwa/assets-generator": { + "optional": true + } + } + }, + "node_modules/vite/node_modules/rollup": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.60.2.tgz", + "integrity": "sha512-J9qZyW++QK/09NyN/zeO0dG/1GdGfyp9lV8ajHnRVLfo/uFsbji5mHnDgn/qYdUHyCkM2N+8VyspgZclfAh0eQ==", + "license": "MIT", + "dependencies": { + "@types/estree": "1.0.8" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.60.2", + "@rollup/rollup-android-arm64": "4.60.2", + "@rollup/rollup-darwin-arm64": "4.60.2", + "@rollup/rollup-darwin-x64": "4.60.2", + "@rollup/rollup-freebsd-arm64": "4.60.2", + "@rollup/rollup-freebsd-x64": "4.60.2", + "@rollup/rollup-linux-arm-gnueabihf": "4.60.2", + "@rollup/rollup-linux-arm-musleabihf": "4.60.2", + "@rollup/rollup-linux-arm64-gnu": "4.60.2", + "@rollup/rollup-linux-arm64-musl": "4.60.2", + "@rollup/rollup-linux-loong64-gnu": "4.60.2", + "@rollup/rollup-linux-loong64-musl": "4.60.2", + "@rollup/rollup-linux-ppc64-gnu": "4.60.2", + "@rollup/rollup-linux-ppc64-musl": "4.60.2", + "@rollup/rollup-linux-riscv64-gnu": "4.60.2", + "@rollup/rollup-linux-riscv64-musl": "4.60.2", + "@rollup/rollup-linux-s390x-gnu": "4.60.2", + "@rollup/rollup-linux-x64-gnu": "4.60.2", + "@rollup/rollup-linux-x64-musl": "4.60.2", + "@rollup/rollup-openbsd-x64": "4.60.2", + "@rollup/rollup-openharmony-arm64": "4.60.2", + "@rollup/rollup-win32-arm64-msvc": "4.60.2", + "@rollup/rollup-win32-ia32-msvc": "4.60.2", + "@rollup/rollup-win32-x64-gnu": "4.60.2", + "@rollup/rollup-win32-x64-msvc": "4.60.2", + "fsevents": "~2.3.2" + } + }, + "node_modules/vitest": { + "version": "4.0.18", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-4.0.18.tgz", + "integrity": "sha512-hOQuK7h0FGKgBAas7v0mSAsnvrIgAvWmRFjmzpJ7SwFHH3g1k2u37JtYwOwmEKhK6ZO3v9ggDBBm0La1LCK4uQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/expect": "4.0.18", + "@vitest/mocker": "4.0.18", + "@vitest/pretty-format": "4.0.18", + "@vitest/runner": "4.0.18", + "@vitest/snapshot": "4.0.18", + "@vitest/spy": "4.0.18", + "@vitest/utils": "4.0.18", + "es-module-lexer": "^1.7.0", + "expect-type": "^1.2.2", + "magic-string": "^0.30.21", + "obug": "^2.1.1", + "pathe": "^2.0.3", + "picomatch": "^4.0.3", + "std-env": "^3.10.0", + "tinybench": "^2.9.0", + "tinyexec": "^1.0.2", + "tinyglobby": "^0.2.15", + "tinyrainbow": "^3.0.3", + "vite": "^6.0.0 || ^7.0.0", + "why-is-node-running": "^2.3.0" + }, + "bin": { + "vitest": "vitest.mjs" + }, + "engines": { + "node": "^20.0.0 || ^22.0.0 || >=24.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "@edge-runtime/vm": "*", + "@opentelemetry/api": "^1.9.0", + "@types/node": "^20.0.0 || ^22.0.0 || >=24.0.0", + "@vitest/browser-playwright": "4.0.18", + "@vitest/browser-preview": "4.0.18", + "@vitest/browser-webdriverio": "4.0.18", + "@vitest/ui": "4.0.18", + "happy-dom": "*", + "jsdom": "*" + }, + "peerDependenciesMeta": { + "@edge-runtime/vm": { + "optional": true + }, + "@opentelemetry/api": { + "optional": true + }, + "@types/node": { + "optional": true + }, + "@vitest/browser-playwright": { + "optional": true + }, + "@vitest/browser-preview": { + "optional": true + }, + "@vitest/browser-webdriverio": { + "optional": true + }, + "@vitest/ui": { + "optional": true + }, + "happy-dom": { + "optional": true + }, + "jsdom": { + "optional": true + } + } + }, + "node_modules/vitest/node_modules/magic-string": { + "version": "0.30.21", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz", + "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.5" + } + }, + "node_modules/w3c-xmlserializer": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-5.0.0.tgz", + "integrity": "sha512-o8qghlI8NZHU1lLPrpi2+Uq7abh4GGPpYANlalzWxyWteJOCsr/P+oPBA49TOLu5FTZO4d3F9MnWJfiMo4BkmA==", + "dev": true, + "license": "MIT", + "dependencies": { + "xml-name-validator": "^5.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/web-streams-polyfill": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz", + "integrity": "sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==", + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/webgl-constants": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/webgl-constants/-/webgl-constants-1.1.1.tgz", + "integrity": "sha512-LkBXKjU5r9vAW7Gcu3T5u+5cvSvh5WwINdr0C+9jpzVB41cjQAP5ePArDtk/WHYdVj0GefCgM73BA7FlIiNtdg==" + }, + "node_modules/webgl-sdf-generator": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/webgl-sdf-generator/-/webgl-sdf-generator-1.1.1.tgz", + "integrity": "sha512-9Z0JcMTFxeE+b2x1LJTdnaT8rT8aEp7MVxkNwoycNmJWwPdzoXzMh0BjJSh/AEFP+KPYZUli814h8bJZFIZ2jA==", + "license": "MIT" + }, + "node_modules/webidl-conversions": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz", + "integrity": "sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==", + "license": "BSD-2-Clause" + }, + "node_modules/whatwg-mimetype": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-5.0.0.tgz", + "integrity": "sha512-sXcNcHOC51uPGF0P/D4NVtrkjSU2fNsm9iog4ZvZJsL3rjoDAzXZhkm2MWt1y+PUdggKAYVoMAIYcs78wJ51Cw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=20" + } + }, + "node_modules/whatwg-url": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-7.1.0.tgz", + "integrity": "sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==", + "license": "MIT", + "dependencies": { + "lodash.sortby": "^4.7.0", + "tr46": "^1.0.1", + "webidl-conversions": "^4.0.2" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/which-boxed-primitive": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.1.1.tgz", + "integrity": "sha512-TbX3mj8n0odCBFVlY8AxkqcHASw3L60jIuF8jFP78az3C2YhmGvqbHBpAjTRH2/xqYunrJ9g1jSyjCjpoWzIAA==", + "license": "MIT", + "dependencies": { + "is-bigint": "^1.1.0", + "is-boolean-object": "^1.2.1", + "is-number-object": "^1.1.1", + "is-string": "^1.1.1", + "is-symbol": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-builtin-type": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/which-builtin-type/-/which-builtin-type-1.2.1.tgz", + "integrity": "sha512-6iBczoX+kDQ7a3+YJBnh3T+KZRxM/iYNPXicqk66/Qfm1b93iu+yOImkg0zHbj5LNOcNv1TEADiZ0xa34B4q6Q==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "function.prototype.name": "^1.1.6", + "has-tostringtag": "^1.0.2", + "is-async-function": "^2.0.0", + "is-date-object": "^1.1.0", + "is-finalizationregistry": "^1.1.0", + "is-generator-function": "^1.0.10", + "is-regex": "^1.2.1", + "is-weakref": "^1.0.2", + "isarray": "^2.0.5", + "which-boxed-primitive": "^1.1.0", + "which-collection": "^1.0.2", + "which-typed-array": "^1.1.16" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-collection": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.2.tgz", + "integrity": "sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==", + "license": "MIT", + "dependencies": { + "is-map": "^2.0.3", + "is-set": "^2.0.3", + "is-weakmap": "^2.0.2", + "is-weakset": "^2.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-typed-array": { + "version": "1.1.20", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.20.tgz", + "integrity": "sha512-LYfpUkmqwl0h9A2HL09Mms427Q1RZWuOHsukfVcKRq9q95iQxdw0ix1JQrqbcDR9PH1QDwf5Qo8OZb5lksZ8Xg==", + "license": "MIT", + "dependencies": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.8", + "call-bound": "^1.0.4", + "for-each": "^0.3.5", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/why-is-node-running": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.3.0.tgz", + "integrity": "sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==", + "dev": true, + "license": "MIT", + "dependencies": { + "siginfo": "^2.0.0", + "stackback": "0.0.2" + }, + "bin": { + "why-is-node-running": "cli.js" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/workbox-background-sync": { + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/workbox-background-sync/-/workbox-background-sync-7.4.0.tgz", + "integrity": "sha512-8CB9OxKAgKZKyNMwfGZ1XESx89GryWTfI+V5yEj8sHjFH8MFelUwYXEyldEK6M6oKMmn807GoJFUEA1sC4XS9w==", + "license": "MIT", + "dependencies": { + "idb": "^7.0.1", + "workbox-core": "7.4.0" + } + }, + "node_modules/workbox-broadcast-update": { + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/workbox-broadcast-update/-/workbox-broadcast-update-7.4.0.tgz", + "integrity": "sha512-+eZQwoktlvo62cI0b+QBr40v5XjighxPq3Fzo9AWMiAosmpG5gxRHgTbGGhaJv/q/MFVxwFNGh/UwHZ/8K88lA==", + "license": "MIT", + "dependencies": { + "workbox-core": "7.4.0" + } + }, + "node_modules/workbox-build": { + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/workbox-build/-/workbox-build-7.4.0.tgz", + "integrity": "sha512-Ntk1pWb0caOFIvwz/hfgrov/OJ45wPEhI5PbTywQcYjyZiVhT3UrwwUPl6TRYbTm4moaFYithYnl1lvZ8UjxcA==", + "license": "MIT", + "dependencies": { + "@apideck/better-ajv-errors": "^0.3.1", + "@babel/core": "^7.24.4", + "@babel/preset-env": "^7.11.0", + "@babel/runtime": "^7.11.2", + "@rollup/plugin-babel": "^5.2.0", + "@rollup/plugin-node-resolve": "^15.2.3", + "@rollup/plugin-replace": "^2.4.1", + "@rollup/plugin-terser": "^0.4.3", + "@surma/rollup-plugin-off-main-thread": "^2.2.3", + "ajv": "^8.6.0", + "common-tags": "^1.8.0", + "fast-json-stable-stringify": "^2.1.0", + "fs-extra": "^9.0.1", + "glob": "^11.0.1", + "lodash": "^4.17.20", + "pretty-bytes": "^5.3.0", + "rollup": "^2.79.2", + "source-map": "^0.8.0-beta.0", + "stringify-object": "^3.3.0", + "strip-comments": "^2.0.1", + "tempy": "^0.6.0", + "upath": "^1.2.0", + "workbox-background-sync": "7.4.0", + "workbox-broadcast-update": "7.4.0", + "workbox-cacheable-response": "7.4.0", + "workbox-core": "7.4.0", + "workbox-expiration": "7.4.0", + "workbox-google-analytics": "7.4.0", + "workbox-navigation-preload": "7.4.0", + "workbox-precaching": "7.4.0", + "workbox-range-requests": "7.4.0", + "workbox-recipes": "7.4.0", + "workbox-routing": "7.4.0", + "workbox-strategies": "7.4.0", + "workbox-streams": "7.4.0", + "workbox-sw": "7.4.0", + "workbox-window": "7.4.0" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/workbox-build/node_modules/glob": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-11.1.0.tgz", + "integrity": "sha512-vuNwKSaKiqm7g0THUBu2x7ckSs3XJLXE+2ssL7/MfTGPLLcrJQ/4Uq1CjPTtO5cCIiRxqvN6Twy1qOwhL0Xjcw==", + "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me", + "license": "BlueOak-1.0.0", + "dependencies": { + "foreground-child": "^3.3.1", + "jackspeak": "^4.1.1", + "minimatch": "^10.1.1", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^2.0.0" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/workbox-build/node_modules/pretty-bytes": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.6.0.tgz", + "integrity": "sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg==", + "license": "MIT", + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/workbox-cacheable-response": { + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/workbox-cacheable-response/-/workbox-cacheable-response-7.4.0.tgz", + "integrity": "sha512-0Fb8795zg/x23ISFkAc7lbWes6vbw34DGFIMw31cwuHPgDEC/5EYm6m/ZkylLX0EnEbbOyOCLjKgFS/Z5g0HeQ==", + "license": "MIT", + "dependencies": { + "workbox-core": "7.4.0" + } + }, + "node_modules/workbox-core": { + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/workbox-core/-/workbox-core-7.4.0.tgz", + "integrity": "sha512-6BMfd8tYEnN4baG4emG9U0hdXM4gGuDU3ectXuVHnj71vwxTFI7WOpQJC4siTOlVtGqCUtj0ZQNsrvi6kZZTAQ==", + "license": "MIT" + }, + "node_modules/workbox-expiration": { + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/workbox-expiration/-/workbox-expiration-7.4.0.tgz", + "integrity": "sha512-V50p4BxYhtA80eOvulu8xVfPBgZbkxJ1Jr8UUn0rvqjGhLDqKNtfrDfjJKnLz2U8fO2xGQJTx/SKXNTzHOjnHw==", + "license": "MIT", + "dependencies": { + "idb": "^7.0.1", + "workbox-core": "7.4.0" + } + }, + "node_modules/workbox-google-analytics": { + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/workbox-google-analytics/-/workbox-google-analytics-7.4.0.tgz", + "integrity": "sha512-MVPXQslRF6YHkzGoFw1A4GIB8GrKym/A5+jYDUSL+AeJw4ytQGrozYdiZqUW1TPQHW8isBCBtyFJergUXyNoWQ==", + "license": "MIT", + "dependencies": { + "workbox-background-sync": "7.4.0", + "workbox-core": "7.4.0", + "workbox-routing": "7.4.0", + "workbox-strategies": "7.4.0" + } + }, + "node_modules/workbox-navigation-preload": { + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/workbox-navigation-preload/-/workbox-navigation-preload-7.4.0.tgz", + "integrity": "sha512-etzftSgdQfjMcfPgbfaZCfM2QuR1P+4o8uCA2s4rf3chtKTq/Om7g/qvEOcZkG6v7JZOSOxVYQiOu6PbAZgU6w==", + "license": "MIT", + "dependencies": { + "workbox-core": "7.4.0" + } + }, + "node_modules/workbox-precaching": { + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/workbox-precaching/-/workbox-precaching-7.4.0.tgz", + "integrity": "sha512-VQs37T6jDqf1rTxUJZXRl3yjZMf5JX/vDPhmx2CPgDDKXATzEoqyRqhYnRoxl6Kr0rqaQlp32i9rtG5zTzIlNg==", + "license": "MIT", + "dependencies": { + "workbox-core": "7.4.0", + "workbox-routing": "7.4.0", + "workbox-strategies": "7.4.0" + } + }, + "node_modules/workbox-range-requests": { + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/workbox-range-requests/-/workbox-range-requests-7.4.0.tgz", + "integrity": "sha512-3Vq854ZNuP6Y0KZOQWLaLC9FfM7ZaE+iuQl4VhADXybwzr4z/sMmnLgTeUZLq5PaDlcJBxYXQ3U91V7dwAIfvw==", + "license": "MIT", + "dependencies": { + "workbox-core": "7.4.0" + } + }, + "node_modules/workbox-recipes": { + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/workbox-recipes/-/workbox-recipes-7.4.0.tgz", + "integrity": "sha512-kOkWvsAn4H8GvAkwfJTbwINdv4voFoiE9hbezgB1sb/0NLyTG4rE7l6LvS8lLk5QIRIto+DjXLuAuG3Vmt3cxQ==", + "license": "MIT", + "dependencies": { + "workbox-cacheable-response": "7.4.0", + "workbox-core": "7.4.0", + "workbox-expiration": "7.4.0", + "workbox-precaching": "7.4.0", + "workbox-routing": "7.4.0", + "workbox-strategies": "7.4.0" + } + }, + "node_modules/workbox-routing": { + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/workbox-routing/-/workbox-routing-7.4.0.tgz", + "integrity": "sha512-C/ooj5uBWYAhAqwmU8HYQJdOjjDKBp9MzTQ+otpMmd+q0eF59K+NuXUek34wbL0RFrIXe/KKT+tUWcZcBqxbHQ==", + "license": "MIT", + "dependencies": { + "workbox-core": "7.4.0" + } + }, + "node_modules/workbox-strategies": { + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/workbox-strategies/-/workbox-strategies-7.4.0.tgz", + "integrity": "sha512-T4hVqIi5A4mHi92+5EppMX3cLaVywDp8nsyUgJhOZxcfSV/eQofcOA6/EMo5rnTNmNTpw0rUgjAI6LaVullPpg==", + "license": "MIT", + "dependencies": { + "workbox-core": "7.4.0" + } + }, + "node_modules/workbox-streams": { + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/workbox-streams/-/workbox-streams-7.4.0.tgz", + "integrity": "sha512-QHPBQrey7hQbnTs5GrEVoWz7RhHJXnPT+12qqWM378orDMo5VMJLCkCM1cnCk+8Eq92lccx/VgRZ7WAzZWbSLg==", + "license": "MIT", + "dependencies": { + "workbox-core": "7.4.0", + "workbox-routing": "7.4.0" + } + }, + "node_modules/workbox-sw": { + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/workbox-sw/-/workbox-sw-7.4.0.tgz", + "integrity": "sha512-ltU+Kr3qWR6BtbdlMnCjobZKzeV1hN+S6UvDywBrwM19TTyqA03X66dzw1tEIdJvQ4lYKkBFox6IAEhoSEZ8Xw==", + "license": "MIT" + }, + "node_modules/workbox-window": { + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/workbox-window/-/workbox-window-7.4.0.tgz", + "integrity": "sha512-/bIYdBLAVsNR3v7gYGaV4pQW3M3kEPx5E8vDxGvxo6khTrGtSSCS7QiFKv9ogzBgZiy0OXLP9zO28U/1nF1mfw==", + "license": "MIT", + "dependencies": { + "@types/trusted-types": "^2.0.2", + "workbox-core": "7.4.0" + } + }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/ws": { + "version": "8.19.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.19.0.tgz", + "integrity": "sha512-blAT2mjOEIi0ZzruJfIhb3nps74PRWTCz1IjglWEEpQl5XS/UNama6u2/rjFkDDouqr4L67ry+1aGIALViWjDg==", + "license": "MIT", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/xml-name-validator": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-5.0.0.tgz", + "integrity": "sha512-EvGK8EJ3DhaHfbRlETOWAS5pO9MZITeauHKJyb8wyajUfQUenkIg2MvLDTZ4T/TgIcm3HU0TFBgWWboAZ30UHg==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18" + } + }, + "node_modules/xml2js": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.5.0.tgz", + "integrity": "sha512-drPFnkQJik/O+uPKpqSgr22mpuFHqKdbS835iAQrUC73L2F5WkboIRd63ai/2Yg6I1jzifPFKH2NTK+cfglkIA==", + "license": "MIT", + "dependencies": { + "sax": ">=0.6.0", + "xmlbuilder": "~11.0.0" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/xml2js/node_modules/xmlbuilder": { + "version": "11.0.1", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz", + "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==", + "license": "MIT", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/xmlbuilder": { + "version": "15.1.1", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-15.1.1.tgz", + "integrity": "sha512-yMqGBqtXyeN1e3TGYvgNgDVZ3j84W4cwkOXQswghol6APgZWaff9lnbvN7MHYJOiXsvGPXtjTYJEiC9J2wv9Eg==", + "license": "MIT", + "engines": { + "node": ">=8.0" + } + }, + "node_modules/xmlchars": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", + "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", + "dev": true, + "license": "MIT" + }, + "node_modules/yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "license": "ISC" + }, + "node_modules/yauzl": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", + "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", + "license": "MIT", + "dependencies": { + "buffer-crc32": "~0.2.3", + "fd-slicer": "~1.1.0" + } + }, + "node_modules/zustand": { + "version": "5.0.11", + "resolved": "https://registry.npmjs.org/zustand/-/zustand-5.0.11.tgz", + "integrity": "sha512-fdZY+dk7zn/vbWNCYmzZULHRrss0jx5pPFiOuMZ/5HJN6Yv3u+1Wswy/4MpZEkEGhtNH+pwxZB8OKgUBPzYAGg==", + "license": "MIT", + "engines": { + "node": ">=12.20.0" + }, + "peerDependencies": { + "@types/react": ">=18.0.0", + "immer": ">=9.0.6", + "react": ">=18.0.0", + "use-sync-external-store": ">=1.2.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "immer": { + "optional": true + }, + "react": { + "optional": true + }, + "use-sync-external-store": { + "optional": true + } + } + }, + "node_modules/zwitch": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/zwitch/-/zwitch-2.0.4.tgz", + "integrity": "sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..20846eb --- /dev/null +++ b/package.json @@ -0,0 +1,47 @@ +{ + "name": "math-biotech", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "vite build", + "build:pages": "vite build --base=/Math-Biotech-Project/site/ --outDir site --emptyOutDir", + "preview": "vite preview", + "typecheck": "tsc --noEmit", + "test": "vitest run", + "verify": "npm run typecheck && npm test && npm run build" + }, + "dependencies": { + "@capacitor/android": "^6.2.1", + "@capacitor/cli": "^6.2.1", + "@capacitor/core": "^6.2.1", + "@google/genai": "^1.39.0", + "@react-three/drei": "10.0.0-rc.1", + "@react-three/fiber": "9.0.0-rc.5", + "@tailwindcss/postcss": "^4.1.18", + "autoprefixer": "^10.4.24", + "framer-motion": "^12.23.24", + "katex": "0.16.9", + "lucide-react": "^0.554.0", + "mathjs": "12.4.1", + "postcss": "^8.5.6", + "react": "^19.2.4", + "react-dom": "^19.2.4", + "react-markdown": "^10.1.0", + "tailwindcss": "^4.1.18", + "three": "0.170.0", + "vite-plugin-pwa": "^1.2.0" + }, + "devDependencies": { + "@testing-library/dom": "^10.4.1", + "@testing-library/jest-dom": "^6.9.1", + "@testing-library/react": "^16.3.2", + "@types/node": "^22.14.0", + "@vitejs/plugin-react": "^5.1.3", + "jsdom": "^28.0.0", + "typescript": "~5.8.2", + "vite": "^6.4.1", + "vitest": "^4.0.18" + } +} diff --git a/postcss.config.js b/postcss.config.js new file mode 100644 index 0000000..a7f73a2 --- /dev/null +++ b/postcss.config.js @@ -0,0 +1,5 @@ +export default { + plugins: { + '@tailwindcss/postcss': {}, + }, +} diff --git a/render.yaml b/render.yaml new file mode 100644 index 0000000..108ed10 --- /dev/null +++ b/render.yaml @@ -0,0 +1,7 @@ +services: + - type: web + name: math-biotech-app + env: static + buildCommand: npm install && npm run build + staticPublishPath: ./dist + branch: main diff --git a/server/.env.example b/server/.env.example new file mode 100644 index 0000000..16bf29c --- /dev/null +++ b/server/.env.example @@ -0,0 +1,3 @@ +PORT=5000 +FRONTEND_URL=http://localhost:3000 +NODE_ENV=development diff --git a/server/.gitignore b/server/.gitignore new file mode 100644 index 0000000..af3f68a --- /dev/null +++ b/server/.gitignore @@ -0,0 +1,5 @@ +node_modules +dist +.env +*.log +.DS_Store diff --git a/server/Dockerfile b/server/Dockerfile new file mode 100644 index 0000000..f802333 --- /dev/null +++ b/server/Dockerfile @@ -0,0 +1,45 @@ +# Multi-stage build for optimized production image +FROM node:20-alpine AS builder + +WORKDIR /app + +# Copy package files +COPY package*.json ./ +COPY tsconfig.json ./ + +# Install dependencies +RUN npm ci + +# Copy source code +COPY src ./src + +# Build TypeScript +RUN npm run build + +# Production stage +FROM node:20-alpine + +WORKDIR /app + +# Copy package files +COPY package*.json ./ + +# Install production dependencies only +RUN npm ci --only=production + +# Copy built application from builder +COPY --from=builder /app/dist ./dist + +# Set environment variables +ENV NODE_ENV=production +ENV PORT=5000 + +# Expose port +EXPOSE 5000 + +# Health check +HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \ + CMD node -e "require('http').get('http://localhost:5000/health', (r) => {r.statusCode === 200 ? process.exit(0) : process.exit(1)})" + +# Run the application +CMD ["node", "dist/index.js"] diff --git a/server/QUICKSTART.md b/server/QUICKSTART.md new file mode 100644 index 0000000..510b2bc --- /dev/null +++ b/server/QUICKSTART.md @@ -0,0 +1,139 @@ +# Math Biotech Web API - Quick Start Guide + +## Overview + +This Web API provides backend services for the Math Biotech Project, including: +- Mathematical operations (matrix calculations, linear algebra) +- Exam performance tracking and analytics + +## Quick Start + +### 1. Install Dependencies + +```bash +cd server +npm install +``` + +### 2. Configure Environment + +```bash +cp .env.example .env +``` + +Edit `.env` to set your configuration: +- `PORT=5000` - API server port +- `FRONTEND_URL=http://localhost:3000` - Frontend URL for CORS + +### 3. Run Development Server + +```bash +npm run dev +``` + +Server starts at: `http://localhost:5000` + +### 4. Test the API + +```bash +npm test +``` + +### 5. Access API Documentation + +Open your browser to: `http://localhost:5000/` + +You'll see a JSON response with all available endpoints. + +## Key Endpoints + +### Matrix Operations + +- **POST** `/api/matrix/add` - Add matrices +- **POST** `/api/matrix/multiply` - Multiply matrices +- **POST** `/api/matrix/determinant` - Calculate determinant +- **POST** `/api/matrix/inverse` - Calculate inverse +- **POST** `/api/matrix/eigenvalues` - Get eigenvalues (2x2) + +### Exam Tracking + +- **GET** `/api/exam/performance` - Get all performance data +- **POST** `/api/exam/result` - Save exam result +- **GET** `/api/exam/question/:id` - Get question stats + +## Example Usage + +### Matrix Addition + +```bash +curl -X POST http://localhost:5000/api/matrix/add \ + -H "Content-Type: application/json" \ + -d '{ + "matrixA": [[1, 2], [3, 4]], + "matrixB": [[5, 6], [7, 8]] + }' +``` + +Response: +```json +{ + "success": true, + "result": [[6, 8], [10, 12]] +} +``` + +### Save Exam Result + +```bash +curl -X POST http://localhost:5000/api/exam/result \ + -H "Content-Type: application/json" \ + -d '{ + "questionId": 1, + "isCorrect": true + }' +``` + +## Production Deployment + +### Build for Production + +```bash +npm run build +npm start +``` + +### Docker Deployment + +```bash +docker-compose up -d +``` + +## Project Structure + +``` +server/ +โ”œโ”€โ”€ src/ +โ”‚ โ”œโ”€โ”€ controllers/ # Request handlers +โ”‚ โ”œโ”€โ”€ routes/ # API routes +โ”‚ โ”œโ”€โ”€ types/ # TypeScript types +โ”‚ โ”œโ”€โ”€ utils/ # Utility functions +โ”‚ โ””โ”€โ”€ index.ts # Main server file +โ”œโ”€โ”€ dist/ # Built output (generated) +โ”œโ”€โ”€ test-api.js # Test suite +โ”œโ”€โ”€ Dockerfile # Docker configuration +โ””โ”€โ”€ package.json # Dependencies +``` + +## Technology Stack + +- **Node.js** - Runtime +- **Express.js** - Web framework +- **TypeScript** - Type safety +- **tsx** - TypeScript execution + +## Need Help? + +See full documentation: [server/README.md](README.md) + +--- +ยฉ 2026 Inmersion. All rights reserved. diff --git a/server/README.md b/server/README.md new file mode 100644 index 0000000..807fc4e --- /dev/null +++ b/server/README.md @@ -0,0 +1,411 @@ +# Math Biotech API + +Backend Web API for the Math Biotech Project. This API provides mathematical computation endpoints and exam performance tracking. + +## Features + +- **Matrix Operations**: Add, subtract, multiply, transpose, determinant, inverse, trace, and eigenvalue calculations +- **Exam Performance Tracking**: Save and retrieve exam results and performance statistics +- **RESTful API**: Clean and well-documented REST endpoints +- **CORS Support**: Cross-origin resource sharing enabled for frontend integration +- **TypeScript**: Fully typed with TypeScript for better development experience + +## Installation + +```bash +cd server +npm install +``` + +## Configuration + +Create a `.env` file in the server directory based on `.env.example`: + +```bash +cp .env.example .env +``` + +Configure the following environment variables: +- `PORT`: Port number for the API server (default: 5000) +- `FRONTEND_URL`: URL of the frontend application (default: http://localhost:3000) +- `NODE_ENV`: Environment mode (development/production) + +## Development + +Start the development server with hot reload: + +```bash +npm run dev +``` + +The API will be available at `http://localhost:5000` + +## Production + +Build the TypeScript code: + +```bash +npm run build +``` + +Start the production server: + +```bash +npm start +``` + +### Docker Deployment + +Build and run with Docker: + +```bash +# Build the image +docker build -t math-biotech-api . + +# Run the container +docker run -p 5000:5000 -e FRONTEND_URL=http://localhost:3000 math-biotech-api +``` + +Or use Docker Compose: + +```bash +docker-compose up -d +``` + +## Testing + +Run the API test suite: + +```bash +npm test +``` + +This will execute a comprehensive test of all API endpoints. + +## API Endpoints + +### Health Check + +**GET** `/health` + +Check if the API is running. + +**Response:** +```json +{ + "status": "OK", + "message": "Math Biotech API is running", + "timestamp": "2026-02-04T09:17:13.133Z" +} +``` + +### Matrix Operations + +#### Add Matrices + +**POST** `/api/matrix/add` + +Add two matrices. + +**Request Body:** +```json +{ + "matrixA": [[1, 2], [3, 4]], + "matrixB": [[5, 6], [7, 8]] +} +``` + +**Response:** +```json +{ + "success": true, + "result": [[6, 8], [10, 12]] +} +``` + +#### Subtract Matrices + +**POST** `/api/matrix/subtract` + +Subtract two matrices. + +**Request Body:** +```json +{ + "matrixA": [[5, 6], [7, 8]], + "matrixB": [[1, 2], [3, 4]] +} +``` + +**Response:** +```json +{ + "success": true, + "result": [[4, 4], [4, 4]] +} +``` + +#### Multiply Matrices + +**POST** `/api/matrix/multiply` + +Multiply two matrices. + +**Request Body:** +```json +{ + "matrixA": [[1, 2], [3, 4]], + "matrixB": [[2, 0], [1, 2]] +} +``` + +**Response:** +```json +{ + "success": true, + "result": [[4, 4], [10, 8]] +} +``` + +#### Scalar Multiplication + +**POST** `/api/matrix/scalar` + +Multiply a matrix by a scalar. + +**Request Body:** +```json +{ + "matrixA": [[1, 2], [3, 4]], + "scalar": 3 +} +``` + +**Response:** +```json +{ + "success": true, + "result": [[3, 6], [9, 12]] +} +``` + +#### Transpose Matrix + +**POST** `/api/matrix/transpose` + +Transpose a matrix. + +**Request Body:** +```json +{ + "matrixA": [[1, 2, 3], [4, 5, 6]] +} +``` + +**Response:** +```json +{ + "success": true, + "result": [[1, 4], [2, 5], [3, 6]] +} +``` + +#### Calculate Determinant + +**POST** `/api/matrix/determinant` + +Calculate the determinant of a square matrix. + +**Request Body:** +```json +{ + "matrixA": [[4, 3], [6, 3]] +} +``` + +**Response:** +```json +{ + "success": true, + "result": -6 +} +``` + +#### Calculate Inverse + +**POST** `/api/matrix/inverse` + +Calculate the inverse of a square matrix. + +**Request Body:** +```json +{ + "matrixA": [[4, 7], [2, 6]] +} +``` + +**Response:** +```json +{ + "success": true, + "result": [[0.6, -0.7], [-0.2, 0.4]] +} +``` + +#### Calculate Trace + +**POST** `/api/matrix/trace` + +Calculate the trace (sum of diagonal elements) of a square matrix. + +**Request Body:** +```json +{ + "matrixA": [[1, 2], [3, 4]] +} +``` + +**Response:** +```json +{ + "success": true, + "result": 5 +} +``` + +#### Calculate Eigenvalues (2x2) + +**POST** `/api/matrix/eigenvalues` + +Calculate eigenvalues for a 2x2 matrix. + +**Request Body:** +```json +{ + "matrixA": [[4, 1], [2, 3]] +} +``` + +**Response:** +```json +{ + "success": true, + "result": { + "lambda1": 5, + "lambda2": 2 + } +} +``` + +### Exam Performance + +#### Get All Performance Data + +**GET** `/api/exam/performance` + +Get all exam performance data. + +**Response:** +```json +{ + "success": true, + "data": { + "1": { + "correct": 3, + "incorrect": 1, + "lastAttempt": 1707038233133 + }, + "2": { + "correct": 2, + "incorrect": 0, + "lastAttempt": 1707038235000 + } + } +} +``` + +#### Save Exam Result + +**POST** `/api/exam/result` + +Save a question attempt result. + +**Request Body:** +```json +{ + "questionId": 1, + "isCorrect": true +} +``` + +**Response:** +```json +{ + "success": true, + "data": { + "correct": 1, + "incorrect": 0, + "lastAttempt": 1707038233133 + } +} +``` + +#### Get Question Statistics + +**GET** `/api/exam/question/:questionId` + +Get statistics for a specific question. + +**Response:** +```json +{ + "success": true, + "data": { + "correct": 3, + "incorrect": 1, + "lastAttempt": 1707038233133 + } +} +``` + +#### Reset Exam Data + +**DELETE** `/api/exam/reset` + +Reset all exam performance data. + +**Response:** +```json +{ + "success": true, + "message": "Exam data reset successfully" +} +``` + +## Error Responses + +All endpoints return error responses in the following format: + +```json +{ + "success": false, + "error": "Error message description" +} +``` + +Common HTTP status codes: +- `400` - Bad Request (invalid input) +- `404` - Not Found (endpoint doesn't exist) +- `500` - Internal Server Error + +## Technology Stack + +- **Node.js** - Runtime environment +- **Express.js** - Web framework +- **TypeScript** - Type-safe programming +- **CORS** - Cross-origin support +- **tsx** - TypeScript execution for development + +## License + +ยฉ 2026 Inmersion. All rights reserved. diff --git a/server/docker-compose.yml b/server/docker-compose.yml new file mode 100644 index 0000000..d30e99c --- /dev/null +++ b/server/docker-compose.yml @@ -0,0 +1,20 @@ +version: '3.8' + +services: + api: + build: + context: . + dockerfile: Dockerfile + ports: + - "5000:5000" + environment: + - NODE_ENV=production + - PORT=5000 + - FRONTEND_URL=http://localhost:3000 + restart: unless-stopped + healthcheck: + test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:5000/health"] + interval: 30s + timeout: 3s + retries: 3 + start_period: 5s diff --git a/server/package-lock.json b/server/package-lock.json new file mode 100644 index 0000000..b7a0dc9 --- /dev/null +++ b/server/package-lock.json @@ -0,0 +1,1565 @@ +{ + "name": "math-biotech-api", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "math-biotech-api", + "version": "1.0.0", + "dependencies": { + "cors": "^2.8.5", + "dotenv": "^16.3.1", + "express": "^4.18.2" + }, + "devDependencies": { + "@types/cors": "^2.8.17", + "@types/express": "^4.17.21", + "@types/node": "^20.10.4", + "tsx": "^4.7.0", + "typescript": "^5.3.3" + } + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.27.2.tgz", + "integrity": "sha512-GZMB+a0mOMZs4MpDbj8RJp4cw+w1WV5NYD6xzgvzUJ5Ek2jerwfO2eADyI6ExDSUED+1X8aMbegahsJi+8mgpw==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.27.2.tgz", + "integrity": "sha512-DVNI8jlPa7Ujbr1yjU2PfUSRtAUZPG9I1RwW4F4xFB1Imiu2on0ADiI/c3td+KmDtVKNbi+nffGDQMfcIMkwIA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.27.2.tgz", + "integrity": "sha512-pvz8ZZ7ot/RBphf8fv60ljmaoydPU12VuXHImtAs0XhLLw+EXBi2BLe3OYSBslR4rryHvweW5gmkKFwTiFy6KA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.27.2.tgz", + "integrity": "sha512-z8Ank4Byh4TJJOh4wpz8g2vDy75zFL0TlZlkUkEwYXuPSgX8yzep596n6mT7905kA9uHZsf/o2OJZubl2l3M7A==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.27.2.tgz", + "integrity": "sha512-davCD2Zc80nzDVRwXTcQP/28fiJbcOwvdolL0sOiOsbwBa72kegmVU0Wrh1MYrbuCL98Omp5dVhQFWRKR2ZAlg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.27.2.tgz", + "integrity": "sha512-ZxtijOmlQCBWGwbVmwOF/UCzuGIbUkqB1faQRf5akQmxRJ1ujusWsb3CVfk/9iZKr2L5SMU5wPBi1UWbvL+VQA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.27.2.tgz", + "integrity": "sha512-lS/9CN+rgqQ9czogxlMcBMGd+l8Q3Nj1MFQwBZJyoEKI50XGxwuzznYdwcav6lpOGv5BqaZXqvBSiB/kJ5op+g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.27.2.tgz", + "integrity": "sha512-tAfqtNYb4YgPnJlEFu4c212HYjQWSO/w/h/lQaBK7RbwGIkBOuNKQI9tqWzx7Wtp7bTPaGC6MJvWI608P3wXYA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.27.2.tgz", + "integrity": "sha512-vWfq4GaIMP9AIe4yj1ZUW18RDhx6EPQKjwe7n8BbIecFtCQG4CfHGaHuh7fdfq+y3LIA2vGS/o9ZBGVxIDi9hw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.27.2.tgz", + "integrity": "sha512-hYxN8pr66NsCCiRFkHUAsxylNOcAQaxSSkHMMjcpx0si13t1LHFphxJZUiGwojB1a/Hd5OiPIqDdXONia6bhTw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.27.2.tgz", + "integrity": "sha512-MJt5BRRSScPDwG2hLelYhAAKh9imjHK5+NE/tvnRLbIqUWa+0E9N4WNMjmp/kXXPHZGqPLxggwVhz7QP8CTR8w==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.27.2.tgz", + "integrity": "sha512-lugyF1atnAT463aO6KPshVCJK5NgRnU4yb3FUumyVz+cGvZbontBgzeGFO1nF+dPueHD367a2ZXe1NtUkAjOtg==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.27.2.tgz", + "integrity": "sha512-nlP2I6ArEBewvJ2gjrrkESEZkB5mIoaTswuqNFRv/WYd+ATtUpe9Y09RnJvgvdag7he0OWgEZWhviS1OTOKixw==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.27.2.tgz", + "integrity": "sha512-C92gnpey7tUQONqg1n6dKVbx3vphKtTHJaNG2Ok9lGwbZil6DrfyecMsp9CrmXGQJmZ7iiVXvvZH6Ml5hL6XdQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.27.2.tgz", + "integrity": "sha512-B5BOmojNtUyN8AXlK0QJyvjEZkWwy/FKvakkTDCziX95AowLZKR6aCDhG7LeF7uMCXEJqwa8Bejz5LTPYm8AvA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.27.2.tgz", + "integrity": "sha512-p4bm9+wsPwup5Z8f4EpfN63qNagQ47Ua2znaqGH6bqLlmJ4bx97Y9JdqxgGZ6Y8xVTixUnEkoKSHcpRlDnNr5w==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.27.2.tgz", + "integrity": "sha512-uwp2Tip5aPmH+NRUwTcfLb+W32WXjpFejTIOWZFw/v7/KnpCDKG66u4DLcurQpiYTiYwQ9B7KOeMJvLCu/OvbA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.27.2.tgz", + "integrity": "sha512-Kj6DiBlwXrPsCRDeRvGAUb/LNrBASrfqAIok+xB0LxK8CHqxZ037viF13ugfsIpePH93mX7xfJp97cyDuTZ3cw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.27.2.tgz", + "integrity": "sha512-HwGDZ0VLVBY3Y+Nw0JexZy9o/nUAWq9MlV7cahpaXKW6TOzfVno3y3/M8Ga8u8Yr7GldLOov27xiCnqRZf0tCA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.27.2.tgz", + "integrity": "sha512-DNIHH2BPQ5551A7oSHD0CKbwIA/Ox7+78/AWkbS5QoRzaqlev2uFayfSxq68EkonB+IKjiuxBFoV8ESJy8bOHA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.27.2.tgz", + "integrity": "sha512-/it7w9Nb7+0KFIzjalNJVR5bOzA9Vay+yIPLVHfIQYG/j+j9VTH84aNB8ExGKPU4AzfaEvN9/V4HV+F+vo8OEg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openharmony-arm64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.27.2.tgz", + "integrity": "sha512-LRBbCmiU51IXfeXk59csuX/aSaToeG7w48nMwA6049Y4J4+VbWALAuXcs+qcD04rHDuSCSRKdmY63sruDS5qag==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.27.2.tgz", + "integrity": "sha512-kMtx1yqJHTmqaqHPAzKCAkDaKsffmXkPHThSfRwZGyuqyIeBvf08KSsYXl+abf5HDAPMJIPnbBfXvP2ZC2TfHg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.27.2.tgz", + "integrity": "sha512-Yaf78O/B3Kkh+nKABUF++bvJv5Ijoy9AN1ww904rOXZFLWVc5OLOfL56W+C8F9xn5JQZa3UX6m+IktJnIb1Jjg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.27.2.tgz", + "integrity": "sha512-Iuws0kxo4yusk7sw70Xa2E2imZU5HoixzxfGCdxwBdhiDgt9vX9VUCBhqcwY7/uh//78A1hMkkROMJq9l27oLQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.27.2.tgz", + "integrity": "sha512-sRdU18mcKf7F+YgheI/zGf5alZatMUTKj/jNS6l744f9u3WFu4v7twcUI9vu4mknF4Y9aDlblIie0IM+5xxaqQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@types/body-parser": { + "version": "1.19.6", + "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.6.tgz", + "integrity": "sha512-HLFeCYgz89uk22N5Qg3dvGvsv46B8GLvKKo1zKG4NybA8U2DiEO3w9lqGg29t/tfLRJpJ6iQxnVw4OnB7MoM9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/connect": "*", + "@types/node": "*" + } + }, + "node_modules/@types/connect": { + "version": "3.4.38", + "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.38.tgz", + "integrity": "sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/cors": { + "version": "2.8.19", + "resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.19.tgz", + "integrity": "sha512-mFNylyeyqN93lfe/9CSxOGREz8cpzAhH+E93xJ4xWQf62V8sQ/24reV2nyzUWM6H6Xji+GGHpkbLe7pVoUEskg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/express": { + "version": "4.17.25", + "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.25.tgz", + "integrity": "sha512-dVd04UKsfpINUnK0yBoYHDF3xu7xVH4BuDotC/xGuycx4CgbP48X/KF/586bcObxT0HENHXEU8Nqtu6NR+eKhw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/body-parser": "*", + "@types/express-serve-static-core": "^4.17.33", + "@types/qs": "*", + "@types/serve-static": "^1" + } + }, + "node_modules/@types/express-serve-static-core": { + "version": "4.19.8", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.19.8.tgz", + "integrity": "sha512-02S5fmqeoKzVZCHPZid4b8JH2eM5HzQLZWN2FohQEy/0eXTq8VXZfSN6Pcr3F6N9R/vNrj7cpgbhjie6m/1tCA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*", + "@types/qs": "*", + "@types/range-parser": "*", + "@types/send": "*" + } + }, + "node_modules/@types/http-errors": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.5.tgz", + "integrity": "sha512-r8Tayk8HJnX0FztbZN7oVqGccWgw98T/0neJphO91KkmOzug1KkofZURD4UaD5uH8AqcFLfdPErnBod0u71/qg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/mime": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.5.tgz", + "integrity": "sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/node": { + "version": "20.19.31", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.31.tgz", + "integrity": "sha512-5jsi0wpncvTD33Sh1UCgacK37FFwDn+EG7wCmEvs62fCvBL+n8/76cAYDok21NF6+jaVWIqKwCZyX7Vbu8eB3A==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~6.21.0" + } + }, + "node_modules/@types/qs": { + "version": "6.14.0", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.14.0.tgz", + "integrity": "sha512-eOunJqu0K1923aExK6y8p6fsihYEn/BYuQ4g0CxAAgFc4b/ZLN4CrsRZ55srTdqoiLzU2B2evC+apEIxprEzkQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/range-parser": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.7.tgz", + "integrity": "sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/send": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@types/send/-/send-1.2.1.tgz", + "integrity": "sha512-arsCikDvlU99zl1g69TcAB3mzZPpxgw0UQnaHeC1Nwb015xp8bknZv5rIfri9xTOcMuaVgvabfIRA7PSZVuZIQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/serve-static": { + "version": "1.15.10", + "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.10.tgz", + "integrity": "sha512-tRs1dB+g8Itk72rlSI2ZrW6vZg0YrLI81iQSTkMmOqnqCaNr/8Ek4VwWcN5vZgCYWbg/JJSGBlUaYGAOP73qBw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/http-errors": "*", + "@types/node": "*", + "@types/send": "<1" + } + }, + "node_modules/@types/serve-static/node_modules/@types/send": { + "version": "0.17.6", + "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.6.tgz", + "integrity": "sha512-Uqt8rPBE8SY0RK8JB1EzVOIZ32uqy8HwdxCnoCOsYrvnswqmFZ/k+9Ikidlk/ImhsdvBsloHbAlewb2IEBV/Og==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/mime": "^1", + "@types/node": "*" + } + }, + "node_modules/accepts": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "license": "MIT", + "dependencies": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==", + "license": "MIT" + }, + "node_modules/body-parser": { + "version": "1.20.4", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.4.tgz", + "integrity": "sha512-ZTgYYLMOXY9qKU/57FAo8F+HA2dGX7bqGc71txDRC1rS4frdFI5R7NhluHxH6M0YItAP0sHB4uqAOcYKxO6uGA==", + "license": "MIT", + "dependencies": { + "bytes": "~3.1.2", + "content-type": "~1.0.5", + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "~1.2.0", + "http-errors": "~2.0.1", + "iconv-lite": "~0.4.24", + "on-finished": "~2.4.1", + "qs": "~6.14.0", + "raw-body": "~2.5.3", + "type-is": "~1.6.18", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/call-bound": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz", + "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "get-intrinsic": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/content-disposition": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", + "license": "MIT", + "dependencies": { + "safe-buffer": "5.2.1" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/content-type": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz", + "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie-signature": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.7.tgz", + "integrity": "sha512-NXdYc3dLr47pBkpUCHtKSwIOQXLVn8dZEuywboCOJY/osA0wFSLlSawr3KN8qXJEyX66FcONTH8EIlVuK0yyFA==", + "license": "MIT" + }, + "node_modules/cors": { + "version": "2.8.6", + "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.6.tgz", + "integrity": "sha512-tJtZBBHA6vjIAaF6EnIaq6laBBP9aq/Y3ouVJjEfoHbRBcHBAHYcMh/w8LDrk2PvIMMq8gmopa5D4V8RmbrxGw==", + "license": "MIT", + "dependencies": { + "object-assign": "^4", + "vary": "^1" + }, + "engines": { + "node": ">= 0.10" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/destroy": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", + "license": "MIT", + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/dotenv": { + "version": "16.6.1", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.6.1.tgz", + "integrity": "sha512-uBq4egWHTcTt33a72vpSG0z3HnPuIl6NqYcTrKEg2azoEyl2hpW0zqlxysq2pK9HlDIHyHyakeYaYnSAwd8bow==", + "license": "BSD-2-Clause", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" + } + }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", + "license": "MIT" + }, + "node_modules/encodeurl": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", + "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-object-atoms": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", + "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/esbuild": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.27.2.tgz", + "integrity": "sha512-HyNQImnsOC7X9PMNaCIeAm4ISCQXs5a5YasTXVliKv4uuBo1dKrG0A+uQS8M5eXjVMnLg3WgXaKvprHlFJQffw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.27.2", + "@esbuild/android-arm": "0.27.2", + "@esbuild/android-arm64": "0.27.2", + "@esbuild/android-x64": "0.27.2", + "@esbuild/darwin-arm64": "0.27.2", + "@esbuild/darwin-x64": "0.27.2", + "@esbuild/freebsd-arm64": "0.27.2", + "@esbuild/freebsd-x64": "0.27.2", + "@esbuild/linux-arm": "0.27.2", + "@esbuild/linux-arm64": "0.27.2", + "@esbuild/linux-ia32": "0.27.2", + "@esbuild/linux-loong64": "0.27.2", + "@esbuild/linux-mips64el": "0.27.2", + "@esbuild/linux-ppc64": "0.27.2", + "@esbuild/linux-riscv64": "0.27.2", + "@esbuild/linux-s390x": "0.27.2", + "@esbuild/linux-x64": "0.27.2", + "@esbuild/netbsd-arm64": "0.27.2", + "@esbuild/netbsd-x64": "0.27.2", + "@esbuild/openbsd-arm64": "0.27.2", + "@esbuild/openbsd-x64": "0.27.2", + "@esbuild/openharmony-arm64": "0.27.2", + "@esbuild/sunos-x64": "0.27.2", + "@esbuild/win32-arm64": "0.27.2", + "@esbuild/win32-ia32": "0.27.2", + "@esbuild/win32-x64": "0.27.2" + } + }, + "node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", + "license": "MIT" + }, + "node_modules/etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/express": { + "version": "4.22.1", + "resolved": "https://registry.npmjs.org/express/-/express-4.22.1.tgz", + "integrity": "sha512-F2X8g9P1X7uCPZMA3MVf9wcTqlyNp7IhH5qPCI0izhaOIYXaW9L535tGA3qmjRzpH+bZczqq7hVKxTR4NWnu+g==", + "license": "MIT", + "dependencies": { + "accepts": "~1.3.8", + "array-flatten": "1.1.1", + "body-parser": "~1.20.3", + "content-disposition": "~0.5.4", + "content-type": "~1.0.4", + "cookie": "~0.7.1", + "cookie-signature": "~1.0.6", + "debug": "2.6.9", + "depd": "2.0.0", + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "~1.3.1", + "fresh": "~0.5.2", + "http-errors": "~2.0.0", + "merge-descriptors": "1.0.3", + "methods": "~1.1.2", + "on-finished": "~2.4.1", + "parseurl": "~1.3.3", + "path-to-regexp": "~0.1.12", + "proxy-addr": "~2.0.7", + "qs": "~6.14.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.2.1", + "send": "~0.19.0", + "serve-static": "~1.16.2", + "setprototypeof": "1.2.0", + "statuses": "~2.0.1", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "engines": { + "node": ">= 0.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/finalhandler": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.2.tgz", + "integrity": "sha512-aA4RyPcd3badbdABGDuTXCMTtOneUCAYH/gxoYRTZlIJdF0YPWuGqiAsIrhNnnqdXGswYk6dGujem4w80UJFhg==", + "license": "MIT", + "dependencies": { + "debug": "2.6.9", + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "on-finished": "~2.4.1", + "parseurl": "~1.3.3", + "statuses": "~2.0.2", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-intrinsic": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "function-bind": "^1.1.2", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/get-tsconfig": { + "version": "4.13.1", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.13.1.tgz", + "integrity": "sha512-EoY1N2xCn44xU6750Sx7OjOIT59FkmstNc3X6y5xpz7D5cBtZRe/3pSlTkDJgqsOk3WwZPkWfonhhUJfttQo3w==", + "dev": true, + "license": "MIT", + "dependencies": { + "resolve-pkg-maps": "^1.0.0" + }, + "funding": { + "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" + } + }, + "node_modules/gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/http-errors": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.1.tgz", + "integrity": "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==", + "license": "MIT", + "dependencies": { + "depd": "~2.0.0", + "inherits": "~2.0.4", + "setprototypeof": "~1.2.0", + "statuses": "~2.0.2", + "toidentifier": "~1.0.1" + }, + "engines": { + "node": ">= 0.8" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "license": "ISC" + }, + "node_modules/ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "license": "MIT", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/merge-descriptors": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz", + "integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "license": "MIT", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "license": "MIT" + }, + "node_modules/negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-inspect": { + "version": "1.13.4", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", + "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "license": "MIT", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/path-to-regexp": { + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.12.tgz", + "integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==", + "license": "MIT" + }, + "node_modules/proxy-addr": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "license": "MIT", + "dependencies": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/qs": { + "version": "6.14.1", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.1.tgz", + "integrity": "sha512-4EK3+xJl8Ts67nLYNwqw/dsFVnCf+qR7RgXSK9jEEm9unao3njwMDdmsdvoKBKHzxd7tCYz5e5M+SnMjdtXGQQ==", + "license": "BSD-3-Clause", + "dependencies": { + "side-channel": "^1.1.0" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/raw-body": { + "version": "2.5.3", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.3.tgz", + "integrity": "sha512-s4VSOf6yN0rvbRZGxs8Om5CWj6seneMwK3oDb4lWDH0UPhWcxwOWw5+qk24bxq87szX1ydrwylIOp2uG1ojUpA==", + "license": "MIT", + "dependencies": { + "bytes": "~3.1.2", + "http-errors": "~2.0.1", + "iconv-lite": "~0.4.24", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/resolve-pkg-maps": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", + "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "license": "MIT" + }, + "node_modules/send": { + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/send/-/send-0.19.2.tgz", + "integrity": "sha512-VMbMxbDeehAxpOtWJXlcUS5E8iXh6QmN+BkRX1GARS3wRaXEEgzCcB10gTQazO42tpNIya8xIyNx8fll1OFPrg==", + "license": "MIT", + "dependencies": { + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "~0.5.2", + "http-errors": "~2.0.1", + "mime": "1.6.0", + "ms": "2.1.3", + "on-finished": "~2.4.1", + "range-parser": "~1.2.1", + "statuses": "~2.0.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/send/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT" + }, + "node_modules/serve-static": { + "version": "1.16.3", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.3.tgz", + "integrity": "sha512-x0RTqQel6g5SY7Lg6ZreMmsOzncHFU7nhnRWkKgWuMTu5NN0DR5oruckMqRvacAN9d5w6ARnRBXl9xhDCgfMeA==", + "license": "MIT", + "dependencies": { + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "~0.19.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", + "license": "ISC" + }, + "node_modules/side-channel": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", + "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3", + "side-channel-list": "^1.0.0", + "side-channel-map": "^1.0.1", + "side-channel-weakmap": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-list": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz", + "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", + "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-weakmap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", + "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3", + "side-channel-map": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/statuses": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.2.tgz", + "integrity": "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "license": "MIT", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/tsx": { + "version": "4.21.0", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.21.0.tgz", + "integrity": "sha512-5C1sg4USs1lfG0GFb2RLXsdpXqBSEhAaA/0kPL01wxzpMqLILNxIxIOKiILz+cdg/pLnOUxFYOR5yhHU666wbw==", + "dev": true, + "license": "MIT", + "dependencies": { + "esbuild": "~0.27.0", + "get-tsconfig": "^4.7.5" + }, + "bin": { + "tsx": "dist/cli.mjs" + }, + "engines": { + "node": ">=18.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + } + }, + "node_modules/type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "license": "MIT", + "dependencies": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/typescript": { + "version": "5.9.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", + "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/undici-types": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", + "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", + "license": "MIT", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + } + } +} diff --git a/server/package.json b/server/package.json new file mode 100644 index 0000000..9d64c28 --- /dev/null +++ b/server/package.json @@ -0,0 +1,25 @@ +{ + "name": "math-biotech-api", + "version": "1.0.0", + "description": "Backend API for Math Biotech Project", + "main": "dist/index.js", + "type": "module", + "scripts": { + "dev": "tsx watch src/index.ts", + "build": "tsc", + "start": "node dist/index.js", + "test": "node test-api.js" + }, + "dependencies": { + "express": "^4.18.2", + "cors": "^2.8.5", + "dotenv": "^16.3.1" + }, + "devDependencies": { + "@types/express": "^4.17.21", + "@types/cors": "^2.8.17", + "@types/node": "^20.10.4", + "typescript": "^5.3.3", + "tsx": "^4.7.0" + } +} diff --git a/server/src/controllers/examController.ts b/server/src/controllers/examController.ts new file mode 100644 index 0000000..78918dd --- /dev/null +++ b/server/src/controllers/examController.ts @@ -0,0 +1,67 @@ +import { Request, Response } from 'express'; +import { ExamPerformance, QuestionStats, ExamResultRequest } from '../types/index.js'; + +// In-memory storage (in production, use a database) +let examPerformanceData: ExamPerformance = {}; + +export const getExamPerformance = (req: Request, res: Response) => { + try { + res.json({ success: true, data: examPerformanceData }); + } catch (error) { + res.status(500).json({ success: false, error: 'Internal server error' }); + } +}; + +export const saveExamResult = (req: Request, res: Response) => { + try { + const { questionId, isCorrect } = req.body as ExamResultRequest; + + if (questionId === undefined || isCorrect === undefined) { + return res.status(400).json({ success: false, error: 'questionId and isCorrect are required' }); + } + + const stats: QuestionStats = examPerformanceData[questionId] || { + correct: 0, + incorrect: 0, + lastAttempt: 0 + }; + + if (isCorrect) { + stats.correct++; + } else { + stats.incorrect++; + } + + stats.lastAttempt = Date.now(); + examPerformanceData[questionId] = stats; + + res.json({ success: true, data: stats }); + } catch (error) { + res.status(500).json({ success: false, error: 'Internal server error' }); + } +}; + +export const resetExamData = (req: Request, res: Response) => { + try { + examPerformanceData = {}; + res.json({ success: true, message: 'Exam data reset successfully' }); + } catch (error) { + res.status(500).json({ success: false, error: 'Internal server error' }); + } +}; + +export const getQuestionStats = (req: Request, res: Response) => { + try { + const { questionId } = req.params; + const id = parseInt(questionId); + + if (isNaN(id)) { + return res.status(400).json({ success: false, error: 'Invalid question ID' }); + } + + const stats = examPerformanceData[id]; + res.json({ success: true, data: stats || null }); + } catch (error) { + res.status(500).json({ success: false, error: 'Internal server error' }); + } +}; diff --git a/server/src/controllers/matrixController.ts b/server/src/controllers/matrixController.ts new file mode 100644 index 0000000..4254e9e --- /dev/null +++ b/server/src/controllers/matrixController.ts @@ -0,0 +1,183 @@ +import { Request, Response } from 'express'; +import { + addMatrices, + subtractMatrices, + multiplyMatrices, + multiplyMatrixByScalar, + transposeMatrix, + getDeterminant, + getInverse, + getTrace, + getEigenvalues2x2 +} from '../utils/matrixMath.js'; +import { MatrixOperationRequest } from '../types/index.js'; + +export const addMatricesController = (req: Request, res: Response) => { + try { + const { matrixA, matrixB } = req.body as MatrixOperationRequest; + + if (!matrixA || !matrixB) { + return res.status(400).json({ success: false, error: 'Both matrices are required' }); + } + + const result = addMatrices(matrixA, matrixB); + + if (result === null) { + return res.status(400).json({ success: false, error: 'Matrices must have the same dimensions' }); + } + + res.json({ success: true, result }); + } catch (error) { + res.status(500).json({ success: false, error: 'Internal server error' }); + } +}; + +export const subtractMatricesController = (req: Request, res: Response) => { + try { + const { matrixA, matrixB } = req.body as MatrixOperationRequest; + + if (!matrixA || !matrixB) { + return res.status(400).json({ success: false, error: 'Both matrices are required' }); + } + + const result = subtractMatrices(matrixA, matrixB); + + if (result === null) { + return res.status(400).json({ success: false, error: 'Matrices must have the same dimensions' }); + } + + res.json({ success: true, result }); + } catch (error) { + res.status(500).json({ success: false, error: 'Internal server error' }); + } +}; + +export const multiplyMatricesController = (req: Request, res: Response) => { + try { + const { matrixA, matrixB } = req.body as MatrixOperationRequest; + + if (!matrixA || !matrixB) { + return res.status(400).json({ success: false, error: 'Both matrices are required' }); + } + + const result = multiplyMatrices(matrixA, matrixB); + + if (result === null) { + return res.status(400).json({ success: false, error: 'Invalid matrix dimensions for multiplication' }); + } + + res.json({ success: true, result }); + } catch (error) { + res.status(500).json({ success: false, error: 'Internal server error' }); + } +}; + +export const scalarMultiplyController = (req: Request, res: Response) => { + try { + const { matrixA, scalar } = req.body as MatrixOperationRequest; + + if (!matrixA || scalar === undefined) { + return res.status(400).json({ success: false, error: 'Matrix and scalar are required' }); + } + + const result = multiplyMatrixByScalar(matrixA, scalar); + res.json({ success: true, result }); + } catch (error) { + res.status(500).json({ success: false, error: 'Internal server error' }); + } +}; + +export const transposeController = (req: Request, res: Response) => { + try { + const { matrixA } = req.body as MatrixOperationRequest; + + if (!matrixA) { + return res.status(400).json({ success: false, error: 'Matrix is required' }); + } + + const result = transposeMatrix(matrixA); + res.json({ success: true, result }); + } catch (error) { + res.status(500).json({ success: false, error: 'Internal server error' }); + } +}; + +export const determinantController = (req: Request, res: Response) => { + try { + const { matrixA } = req.body as MatrixOperationRequest; + + if (!matrixA) { + return res.status(400).json({ success: false, error: 'Matrix is required' }); + } + + const result = getDeterminant(matrixA); + + if (result === null) { + return res.status(400).json({ success: false, error: 'Matrix must be square' }); + } + + res.json({ success: true, result }); + } catch (error) { + res.status(500).json({ success: false, error: 'Internal server error' }); + } +}; + +export const inverseController = (req: Request, res: Response) => { + try { + const { matrixA } = req.body as MatrixOperationRequest; + + if (!matrixA) { + return res.status(400).json({ success: false, error: 'Matrix is required' }); + } + + const result = getInverse(matrixA); + + if (result === null) { + return res.status(400).json({ success: false, error: 'Matrix is not invertible or not square' }); + } + + res.json({ success: true, result }); + } catch (error) { + res.status(500).json({ success: false, error: 'Internal server error' }); + } +}; + +export const traceController = (req: Request, res: Response) => { + try { + const { matrixA } = req.body as MatrixOperationRequest; + + if (!matrixA) { + return res.status(400).json({ success: false, error: 'Matrix is required' }); + } + + const result = getTrace(matrixA); + + if (result === null) { + return res.status(400).json({ success: false, error: 'Matrix must be square' }); + } + + res.json({ success: true, result }); + } catch (error) { + res.status(500).json({ success: false, error: 'Internal server error' }); + } +}; + +export const eigenvaluesController = (req: Request, res: Response) => { + try { + const { matrixA } = req.body as MatrixOperationRequest; + + if (!matrixA) { + return res.status(400).json({ success: false, error: 'Matrix is required' }); + } + + const result = getEigenvalues2x2(matrixA); + + if (result === null) { + return res.status(400).json({ success: false, error: 'Matrix must be 2x2 with real eigenvalues' }); + } + + res.json({ success: true, result }); + } catch (error) { + res.status(500).json({ success: false, error: 'Internal server error' }); + } +}; diff --git a/server/src/index.ts b/server/src/index.ts new file mode 100644 index 0000000..1ec4144 --- /dev/null +++ b/server/src/index.ts @@ -0,0 +1,79 @@ +import express, { Request, Response } from 'express'; +import cors from 'cors'; +import matrixRoutes from './routes/matrixRoutes.js'; +import examRoutes from './routes/examRoutes.js'; + +const app = express(); +const PORT = process.env.PORT || 5000; + +// Middleware +app.use(cors({ + origin: process.env.FRONTEND_URL || '*', + methods: ['GET', 'POST', 'PUT', 'DELETE'], + allowedHeaders: ['Content-Type', 'Authorization'] +})); + +app.use(express.json()); +app.use(express.urlencoded({ extended: true })); + +// Health check endpoint +app.get('/health', (req: Request, res: Response) => { + res.json({ + status: 'OK', + message: 'Inmerson Lab API is running', + timestamp: new Date().toISOString() + }); +}); + +// API Routes +app.use('/api/matrix', matrixRoutes); +app.use('/api/exam', examRoutes); + +// Root endpoint +app.get('/', (req: Request, res: Response) => { + res.json({ + name: 'Inmerson Lab API', + version: '1.0.0', + description: 'Backend API for Inmerson Personal Math & Biotech Lab', + endpoints: { + health: '/health', + matrix: { + add: 'POST /api/matrix/add', + subtract: 'POST /api/matrix/subtract', + multiply: 'POST /api/matrix/multiply', + scalar: 'POST /api/matrix/scalar', + transpose: 'POST /api/matrix/transpose', + determinant: 'POST /api/matrix/determinant', + inverse: 'POST /api/matrix/inverse', + trace: 'POST /api/matrix/trace', + eigenvalues: 'POST /api/matrix/eigenvalues' + }, + exam: { + getPerformance: 'GET /api/exam/performance', + saveResult: 'POST /api/exam/result', + resetData: 'DELETE /api/exam/reset', + getQuestion: 'GET /api/exam/question/:questionId' + } + } + }); +}); + +// 404 handler +app.use((req: Request, res: Response) => { + res.status(404).json({ success: false, error: 'Endpoint not found' }); +}); + +// Error handler +app.use((err: Error, req: Request, res: Response, next: express.NextFunction) => { + console.error(err.stack); + res.status(500).json({ success: false, error: 'Something went wrong!' }); +}); + +// Start server +app.listen(PORT, () => { + console.log(`โœ… Inmerson Lab API server running on port ${PORT}`); + console.log(`๐Ÿ“Š Health check available at http://localhost:${PORT}/health`); + console.log(`๐Ÿ“š API documentation at http://localhost:${PORT}/`); +}); + +export default app; \ No newline at end of file diff --git a/server/src/routes/examRoutes.ts b/server/src/routes/examRoutes.ts new file mode 100644 index 0000000..d581a09 --- /dev/null +++ b/server/src/routes/examRoutes.ts @@ -0,0 +1,16 @@ +import express from 'express'; +import { + getExamPerformance, + saveExamResult, + resetExamData, + getQuestionStats +} from '../controllers/examController.js'; + +const router = express.Router(); + +router.get('/performance', getExamPerformance); +router.post('/result', saveExamResult); +router.delete('/reset', resetExamData); +router.get('/question/:questionId', getQuestionStats); + +export default router; diff --git a/server/src/routes/matrixRoutes.ts b/server/src/routes/matrixRoutes.ts new file mode 100644 index 0000000..09aaae5 --- /dev/null +++ b/server/src/routes/matrixRoutes.ts @@ -0,0 +1,26 @@ +import express from 'express'; +import { + addMatricesController, + subtractMatricesController, + multiplyMatricesController, + scalarMultiplyController, + transposeController, + determinantController, + inverseController, + traceController, + eigenvaluesController +} from '../controllers/matrixController.js'; + +const router = express.Router(); + +router.post('/add', addMatricesController); +router.post('/subtract', subtractMatricesController); +router.post('/multiply', multiplyMatricesController); +router.post('/scalar', scalarMultiplyController); +router.post('/transpose', transposeController); +router.post('/determinant', determinantController); +router.post('/inverse', inverseController); +router.post('/trace', traceController); +router.post('/eigenvalues', eigenvaluesController); + +export default router; diff --git a/server/src/types/index.ts b/server/src/types/index.ts new file mode 100644 index 0000000..2744a9d --- /dev/null +++ b/server/src/types/index.ts @@ -0,0 +1,26 @@ +export type MatrixData = number[][]; + +export interface MatrixOperationRequest { + matrixA: MatrixData; + matrixB?: MatrixData; + scalar?: number; +} + +export interface MatrixOperationResponse { + success: boolean; + result?: MatrixData | number; + error?: string; +} + +export interface QuestionStats { + correct: number; + incorrect: number; + lastAttempt: number; +} + +export type ExamPerformance = Record; + +export interface ExamResultRequest { + questionId: number; + isCorrect: boolean; +} diff --git a/server/src/utils/matrixMath.ts b/server/src/utils/matrixMath.ts new file mode 100644 index 0000000..9bf84f0 --- /dev/null +++ b/server/src/utils/matrixMath.ts @@ -0,0 +1,136 @@ +import { MatrixData } from '../types/index.js'; + +export const createMatrix = (rows: number, cols: number, initialValue = 0): MatrixData => { + return Array(rows).fill(0).map(() => Array(cols).fill(initialValue)); +}; + +export const addMatrices = (a: MatrixData, b: MatrixData): MatrixData | null => { + if (a.length !== b.length || a[0].length !== b[0].length) return null; + return a.map((row, i) => row.map((val, j) => val + b[i][j])); +}; + +export const subtractMatrices = (a: MatrixData, b: MatrixData): MatrixData | null => { + if (a.length !== b.length || a[0].length !== b[0].length) return null; + return a.map((row, i) => row.map((val, j) => val - b[i][j])); +}; + +export const multiplyMatrixByScalar = (a: MatrixData, k: number): MatrixData => { + return a.map(row => row.map(val => val * k)); +}; + +export const multiplyMatrices = (a: MatrixData, b: MatrixData): MatrixData | null => { + const r1 = a.length; + const c1 = a[0].length; + const r2 = b.length; + const c2 = b[0].length; + + if (c1 !== r2) return null; + + const result = createMatrix(r1, c2); + for (let i = 0; i < r1; i++) { + for (let j = 0; j < c2; j++) { + let sum = 0; + for (let k = 0; k < c1; k++) { + sum += a[i][k] * b[k][j]; + } + result[i][j] = sum; + } + } + return result; +}; + +export const transposeMatrix = (a: MatrixData): MatrixData => { + return a[0].map((_, colIndex) => a.map(row => row[colIndex])); +}; + +export const getDeterminant = (m: MatrixData): number | null => { + if (m.length !== m[0].length) return null; + const n = m.length; + if (n === 1) return m[0][0]; + if (n === 2) return m[0][0] * m[1][1] - m[0][1] * m[1][0]; + + let det = 0; + for (let j = 0; j < n; j++) { + det += Math.pow(-1, j) * m[0][j] * getDeterminant(getMinor(m, 0, j))!; + } + return det; +}; + +export const getMinor = (m: MatrixData, row: number, col: number): MatrixData => { + return m + .filter((_, i) => i !== row) + .map(r => r.filter((_, j) => j !== col)); +}; + +export const getInverse = (m: MatrixData): MatrixData | null => { + const n = m.length; + if (n !== m[0].length) return null; + + const augmented: number[][] = m.map(row => [...row, ...Array(n).fill(0)]); + for (let i = 0; i < n; i++) { + augmented[i][n + i] = 1; + } + + for (let i = 0; i < n; i++) { + let pivotRow = i; + for (let j = i + 1; j < n; j++) { + if (Math.abs(augmented[j][i]) > Math.abs(augmented[pivotRow][i])) { + pivotRow = j; + } + } + + if (Math.abs(augmented[pivotRow][i]) < 1e-10) return null; + + [augmented[i], augmented[pivotRow]] = [augmented[pivotRow], augmented[i]]; + + const pivot = augmented[i][i]; + for (let j = i; j < 2 * n; j++) { + augmented[i][j] /= pivot; + } + + for (let j = 0; j < n; j++) { + if (i !== j) { + const factor = augmented[j][i]; + for (let k = i; k < 2 * n; k++) { + augmented[j][k] -= factor * augmented[i][k]; + } + } + } + } + + const inverse = createMatrix(n, n); + for (let i = 0; i < n; i++) { + for (let j = 0; j < n; j++) { + inverse[i][j] = augmented[i][n + j]; + } + } + + return inverse; +}; + +export const getTrace = (m: MatrixData): number | null => { + if (m.length !== m[0].length) return null; + let trace = 0; + for (let i = 0; i < m.length; i++) { + trace += m[i][i]; + } + return trace; +}; + +export const getEigenvalues2x2 = (m: MatrixData): { lambda1: number, lambda2: number } | null => { + if (m.length !== 2 || m[0].length !== 2) return null; + + const tr = getTrace(m); + const det = getDeterminant(m); + + if (tr === null || det === null) return null; + + const delta = tr * tr - 4 * det; + if (delta < 0) return null; + + const sqrtDelta = Math.sqrt(delta); + return { + lambda1: (tr + sqrtDelta) / 2, + lambda2: (tr - sqrtDelta) / 2 + }; +}; diff --git a/server/test-api.js b/server/test-api.js new file mode 100644 index 0000000..70daa6f --- /dev/null +++ b/server/test-api.js @@ -0,0 +1,151 @@ +#!/usr/bin/env node + +/** + * Simple test script for Math Biotech API + * Run with: node test-api.js + */ + +const API_BASE_URL = process.env.API_URL || 'http://localhost:5000'; + +async function testEndpoint(name, method, path, body = null) { + console.log(`\n๐Ÿงช Testing: ${name}`); + console.log(` ${method} ${path}`); + + try { + const options = { + method, + headers: { 'Content-Type': 'application/json' } + }; + + if (body) { + options.body = JSON.stringify(body); + } + + const response = await fetch(`${API_BASE_URL}${path}`, options); + const data = await response.json(); + + if (response.ok) { + console.log(` โœ… Success:`, JSON.stringify(data, null, 2)); + } else { + console.log(` โŒ Failed:`, JSON.stringify(data, null, 2)); + } + + return data; + } catch (error) { + console.log(` โŒ Error:`, error.message); + return null; + } +} + +async function runTests() { + console.log('๐Ÿš€ Math Biotech API Test Suite'); + console.log(`๐Ÿ“ Testing against: ${API_BASE_URL}`); + + // Health check + await testEndpoint('Health Check', 'GET', '/health'); + + // Matrix operations + await testEndpoint( + 'Matrix Addition', + 'POST', + '/api/matrix/add', + { + matrixA: [[1, 2], [3, 4]], + matrixB: [[5, 6], [7, 8]] + } + ); + + await testEndpoint( + 'Matrix Multiplication', + 'POST', + '/api/matrix/multiply', + { + matrixA: [[1, 2], [3, 4]], + matrixB: [[2, 0], [1, 2]] + } + ); + + await testEndpoint( + 'Determinant', + 'POST', + '/api/matrix/determinant', + { + matrixA: [[4, 3], [6, 3]] + } + ); + + await testEndpoint( + 'Matrix Inverse', + 'POST', + '/api/matrix/inverse', + { + matrixA: [[4, 7], [2, 6]] + } + ); + + await testEndpoint( + 'Eigenvalues', + 'POST', + '/api/matrix/eigenvalues', + { + matrixA: [[4, 1], [2, 3]] + } + ); + + await testEndpoint( + 'Scalar Multiplication', + 'POST', + '/api/matrix/scalar', + { + matrixA: [[1, 2], [3, 4]], + scalar: 3 + } + ); + + await testEndpoint( + 'Matrix Transpose', + 'POST', + '/api/matrix/transpose', + { + matrixA: [[1, 2, 3], [4, 5, 6]] + } + ); + + // Exam endpoints + await testEndpoint( + 'Save Exam Result', + 'POST', + '/api/exam/result', + { + questionId: 1, + isCorrect: true + } + ); + + await testEndpoint( + 'Save Another Exam Result', + 'POST', + '/api/exam/result', + { + questionId: 1, + isCorrect: false + } + ); + + await testEndpoint( + 'Get Exam Performance', + 'GET', + '/api/exam/performance' + ); + + await testEndpoint( + 'Get Question Stats', + 'GET', + '/api/exam/question/1' + ); + + console.log('\n\nโœจ Test suite completed!'); +} + +// Run tests +runTests().catch(console.error); diff --git a/server/tsconfig.json b/server/tsconfig.json new file mode 100644 index 0000000..fa0fd75 --- /dev/null +++ b/server/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "target": "ES2022", + "module": "ES2022", + "moduleResolution": "node", + "outDir": "./dist", + "rootDir": "./src", + "strict": true, + "esModuleInterop": true, + "skipLibCheck": true, + "forceConsistentCasingInFileNames": true, + "resolveJsonModule": true, + "declaration": true, + "declarationMap": true, + "sourceMap": true + }, + "include": ["src/**/*"], + "exclude": ["node_modules", "dist"] +} diff --git a/services/geminiService.ts b/services/geminiService.ts new file mode 100644 index 0000000..ada064b --- /dev/null +++ b/services/geminiService.ts @@ -0,0 +1,7 @@ + +/** + * SECURITY NOTE: + * This service has been intentionally disabled for the public release. + * No API Keys are stored here. All AI features are turned off. + */ +export {}; diff --git a/site/assets/AIChatView-BugcxH5N.js b/site/assets/AIChatView-BugcxH5N.js new file mode 100644 index 0000000..5a04f7f --- /dev/null +++ b/site/assets/AIChatView-BugcxH5N.js @@ -0,0 +1,286 @@ +import{c as Ot,s as br,j as O,r as Ge,Q as yl,U as vl}from"./index-DJrAq1Rk.js";import{T as Tl}from"./triangle-alert-7X0SgA5l.js";/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const El=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],Sl=Ot("bot",El);/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const _l=[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]],Cl=Ot("key",_l);/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Il=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],Al=Ot("send",Il);/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const xl=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],wl=Ot("settings",xl);function Rl(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Pl=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,kl=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ml={};function yi(e,t){return(Ml.jsx?kl:Pl).test(e)}const Nl=/[ \t\n\f\r]/g;function Dl(e){return typeof e=="object"?e.type==="text"?vi(e.value):!1:vi(e)}function vi(e){return e.replace(Nl,"")===""}class St{constructor(t,n,i){this.normal=n,this.property=t,i&&(this.space=i)}}St.prototype.normal={};St.prototype.property={};St.prototype.space=void 0;function Lr(e,t){const n={},i={};for(const o of e)Object.assign(n,o.property),Object.assign(i,o.normal);return new St(n,i,t)}function yn(e){return e.toLowerCase()}class ue{constructor(t,n){this.attribute=n,this.property=t}}ue.prototype.attribute="";ue.prototype.booleanish=!1;ue.prototype.boolean=!1;ue.prototype.commaOrSpaceSeparated=!1;ue.prototype.commaSeparated=!1;ue.prototype.defined=!1;ue.prototype.mustUseProperty=!1;ue.prototype.number=!1;ue.prototype.overloadedBoolean=!1;ue.prototype.property="";ue.prototype.spaceSeparated=!1;ue.prototype.space=void 0;let bl=0;const z=Be(),ee=Be(),vn=Be(),R=Be(),X=Be(),Qe=Be(),fe=Be();function Be(){return 2**++bl}const Tn=Object.freeze(Object.defineProperty({__proto__:null,boolean:z,booleanish:ee,commaOrSpaceSeparated:fe,commaSeparated:Qe,number:R,overloadedBoolean:vn,spaceSeparated:X},Symbol.toStringTag,{value:"Module"})),jt=Object.keys(Tn);class qn extends ue{constructor(t,n,i,o){let r=-1;if(super(t,n),Ti(this,"space",o),typeof i=="number")for(;++r4&&n.slice(0,4)==="data"&&Gl.test(t)){if(t.charAt(4)==="-"){const r=t.slice(5).replace(Ei,ql);i="data"+r.charAt(0).toUpperCase()+r.slice(1)}else{const r=t.slice(4);if(!Ei.test(r)){let s=r.replace(Vl,Bl);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}o=qn}return new o(i,t)}function Bl(e){return"-"+e.toLowerCase()}function ql(e){return e.charAt(1).toUpperCase()}const Ol=Lr([Ur,Ll,Gr,Hr,Br],"html"),On=Lr([Ur,Ul,Gr,Hr,Br],"svg");function zl(e){return e.join(" ").trim()}var $e={},en,Si;function Jl(){if(Si)return en;Si=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,r=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,u=/^\s+|\s+$/g,d=` +`,c="/",f="*",p="",h="comment",m="declaration";function g(T,S){if(typeof T!="string")throw new TypeError("First argument must be a string");if(!T)return[];S=S||{};var x=1,C=1;function w(U){var M=U.match(t);M&&(x+=M.length);var W=U.lastIndexOf(d);C=~W?U.length-W:C+U.length}function I(){var U={line:x,column:C};return function(M){return M.position=new _(U),P(),M}}function _(U){this.start=U,this.end={line:x,column:C},this.source=S.source}_.prototype.content=T;function b(U){var M=new Error(S.source+":"+x+":"+C+": "+U);if(M.reason=U,M.filename=S.source,M.line=x,M.column=C,M.source=T,!S.silent)throw M}function V(U){var M=U.exec(T);if(M){var W=M[0];return w(W),T=T.slice(W.length),M}}function P(){V(n)}function F(U){var M;for(U=U||[];M=D();)M!==!1&&U.push(M);return U}function D(){var U=I();if(!(c!=T.charAt(0)||f!=T.charAt(1))){for(var M=2;p!=T.charAt(M)&&(f!=T.charAt(M)||c!=T.charAt(M+1));)++M;if(M+=2,p===T.charAt(M-1))return b("End of comment missing");var W=T.slice(2,M-2);return C+=2,w(W),T=T.slice(M),C+=2,U({type:h,comment:W})}}function L(){var U=I(),M=V(i);if(M){if(D(),!V(o))return b("property missing ':'");var W=V(r),Z=U({type:m,property:E(M[0].replace(e,p)),value:W?E(W[0].replace(e,p)):p});return V(s),Z}}function q(){var U=[];F(U);for(var M;M=L();)M!==!1&&(U.push(M),F(U));return U}return P(),q()}function E(T){return T?T.replace(u,p):p}return en=g,en}var _i;function $l(){if(_i)return $e;_i=1;var e=$e&&$e.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty($e,"__esModule",{value:!0}),$e.default=n;const t=e(Jl());function n(i,o){let r=null;if(!i||typeof i!="string")return r;const s=(0,t.default)(i),u=typeof o=="function";return s.forEach(d=>{if(d.type!=="declaration")return;const{property:c,value:f}=d;u?o(c,f,d):f&&(r=r||{},r[c]=f)}),r}return $e}var ut={},Ci;function Wl(){if(Ci)return ut;Ci=1,Object.defineProperty(ut,"__esModule",{value:!0}),ut.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,r=function(c){return!c||n.test(c)||e.test(c)},s=function(c,f){return f.toUpperCase()},u=function(c,f){return"".concat(f,"-")},d=function(c,f){return f===void 0&&(f={}),r(c)?c:(c=c.toLowerCase(),f.reactCompat?c=c.replace(o,u):c=c.replace(i,u),c.replace(t,s))};return ut.camelCase=d,ut}var ct,Ii;function Yl(){if(Ii)return ct;Ii=1;var e=ct&&ct.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},t=e($l()),n=Wl();function i(o,r){var s={};return!o||typeof o!="string"||(0,t.default)(o,function(u,d){u&&d&&(s[(0,n.camelCase)(u,r)]=d)}),s}return i.default=i,ct=i,ct}var Kl=Yl();const Xl=br(Kl),qr=Or("end"),zn=Or("start");function Or(e){return t;function t(n){const i=n&&n.position&&n.position[e]||{};if(typeof i.line=="number"&&i.line>0&&typeof i.column=="number"&&i.column>0)return{line:i.line,column:i.column,offset:typeof i.offset=="number"&&i.offset>-1?i.offset:void 0}}}function Ql(e){const t=zn(e),n=qr(e);if(t&&n)return{start:t,end:n}}function gt(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Ai(e.position):"start"in e||"end"in e?Ai(e):"line"in e||"column"in e?En(e):""}function En(e){return xi(e&&e.line)+":"+xi(e&&e.column)}function Ai(e){return En(e&&e.start)+"-"+En(e&&e.end)}function xi(e){return e&&typeof e=="number"?e:1}class oe extends Error{constructor(t,n,i){super(),typeof n=="string"&&(i=n,n=void 0);let o="",r={},s=!1;if(n&&("line"in n&&"column"in n?r={place:n}:"start"in n&&"end"in n?r={place:n}:"type"in n?r={ancestors:[n],place:n.position}:r={...n}),typeof t=="string"?o=t:!r.cause&&t&&(s=!0,o=t.message,r.cause=t),!r.ruleId&&!r.source&&typeof i=="string"){const d=i.indexOf(":");d===-1?r.ruleId=i:(r.source=i.slice(0,d),r.ruleId=i.slice(d+1))}if(!r.place&&r.ancestors&&r.ancestors){const d=r.ancestors[r.ancestors.length-1];d&&(r.place=d.position)}const u=r.place&&"start"in r.place?r.place.start:r.place;this.ancestors=r.ancestors||void 0,this.cause=r.cause||void 0,this.column=u?u.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=u?u.line:void 0,this.name=gt(r.place)||"1:1",this.place=r.place||void 0,this.reason=this.message,this.ruleId=r.ruleId||void 0,this.source=r.source||void 0,this.stack=s&&r.cause&&typeof r.cause.stack=="string"?r.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}oe.prototype.file="";oe.prototype.name="";oe.prototype.reason="";oe.prototype.message="";oe.prototype.stack="";oe.prototype.column=void 0;oe.prototype.line=void 0;oe.prototype.ancestors=void 0;oe.prototype.cause=void 0;oe.prototype.fatal=void 0;oe.prototype.place=void 0;oe.prototype.ruleId=void 0;oe.prototype.source=void 0;const Jn={}.hasOwnProperty,Zl=new Map,jl=/[A-Z]/g,ea=new Set(["table","tbody","thead","tfoot","tr"]),ta=new Set(["td","th"]),zr="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function na(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let i;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");i=ca(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");i=ua(n,t.jsx,t.jsxs)}const o={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:i,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?On:Ol,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},r=Jr(o,e,void 0);return r&&typeof r!="string"?r:o.create(e,o.Fragment,{children:r||void 0},void 0)}function Jr(e,t,n){if(t.type==="element")return ia(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return oa(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return sa(e,t,n);if(t.type==="mdxjsEsm")return ra(e,t);if(t.type==="root")return la(e,t,n);if(t.type==="text")return aa(e,t)}function ia(e,t,n){const i=e.schema;let o=i;t.tagName.toLowerCase()==="svg"&&i.space==="html"&&(o=On,e.schema=o),e.ancestors.push(t);const r=Wr(e,t.tagName,!1),s=da(e,t);let u=Wn(e,t);return ea.has(t.tagName)&&(u=u.filter(function(d){return typeof d=="string"?!Dl(d):!0})),$r(e,s,r,t),$n(s,u),e.ancestors.pop(),e.schema=i,e.create(t,r,s,n)}function oa(e,t){if(t.data&&t.data.estree&&e.evaluater){const i=t.data.estree.body[0];return i.type,e.evaluater.evaluateExpression(i.expression)}Tt(e,t.position)}function ra(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Tt(e,t.position)}function sa(e,t,n){const i=e.schema;let o=i;t.name==="svg"&&i.space==="html"&&(o=On,e.schema=o),e.ancestors.push(t);const r=t.name===null?e.Fragment:Wr(e,t.name,!0),s=fa(e,t),u=Wn(e,t);return $r(e,s,r,t),$n(s,u),e.ancestors.pop(),e.schema=i,e.create(t,r,s,n)}function la(e,t,n){const i={};return $n(i,Wn(e,t)),e.create(t,e.Fragment,i,n)}function aa(e,t){return t.value}function $r(e,t,n,i){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=i)}function $n(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function ua(e,t,n){return i;function i(o,r,s,u){const c=Array.isArray(s.children)?n:t;return u?c(r,s,u):c(r,s)}}function ca(e,t){return n;function n(i,o,r,s){const u=Array.isArray(r.children),d=zn(i);return t(o,r,s,u,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function da(e,t){const n={};let i,o;for(o in t.properties)if(o!=="children"&&Jn.call(t.properties,o)){const r=pa(e,o,t.properties[o]);if(r){const[s,u]=r;e.tableCellAlignToStyle&&s==="align"&&typeof u=="string"&&ta.has(t.tagName)?i=u:n[s]=u}}if(i){const r=n.style||(n.style={});r[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=i}return n}function fa(e,t){const n={};for(const i of t.attributes)if(i.type==="mdxJsxExpressionAttribute")if(i.data&&i.data.estree&&e.evaluater){const r=i.data.estree.body[0];r.type;const s=r.expression;s.type;const u=s.properties[0];u.type,Object.assign(n,e.evaluater.evaluateExpression(u.argument))}else Tt(e,t.position);else{const o=i.name;let r;if(i.value&&typeof i.value=="object")if(i.value.data&&i.value.data.estree&&e.evaluater){const u=i.value.data.estree.body[0];u.type,r=e.evaluater.evaluateExpression(u.expression)}else Tt(e,t.position);else r=i.value===null?!0:i.value;n[o]=r}return n}function Wn(e,t){const n=[];let i=-1;const o=e.passKeys?new Map:Zl;for(;++io?0:o+t:t=t>o?o:t,n=n>0?n:0,i.length<1e4)s=Array.from(i),s.unshift(t,n),e.splice(...s);else for(n&&e.splice(t,n);r0?(Ae(e,e.length,0,t),e):t}const Pi={}.hasOwnProperty;function Sa(e){const t={};let n=-1;for(;++n13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"๏ฟฝ":String.fromCodePoint(n)}function Ze(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Ie=Le(/[A-Za-z]/),pe=Le(/[\dA-Za-z]/),Ia=Le(/[#-'*+\--9=?A-Z^-~]/);function Sn(e){return e!==null&&(e<32||e===127)}const _n=Le(/\d/),Aa=Le(/[\dA-Fa-f]/),xa=Le(/[!-/:-@[-`{-~]/);function G(e){return e!==null&&e<-2}function ae(e){return e!==null&&(e<0||e===32)}function Y(e){return e===-2||e===-1||e===32}const wa=Le(new RegExp("\\p{P}|\\p{S}","u")),Ra=Le(/\s/);function Le(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function nt(e){const t=[];let n=-1,i=0,o=0;for(;++n55295&&r<57344){const u=e.charCodeAt(n+1);r<56320&&u>56319&&u<57344?(s=String.fromCharCode(r,u),o=1):s="๏ฟฝ"}else s=String.fromCharCode(r);s&&(t.push(e.slice(i,n),encodeURIComponent(s)),i=n+o+1,s=""),o&&(n+=o,o=0)}return t.join("")+e.slice(i)}function Q(e,t,n,i){const o=i?i-1:Number.POSITIVE_INFINITY;let r=0;return s;function s(d){return Y(d)?(e.enter(n),u(d)):t(d)}function u(d){return Y(d)&&r++s))return;const b=t.events.length;let V=b,P,F;for(;V--;)if(t.events[V][0]==="exit"&&t.events[V][1].type==="chunkFlow"){if(P){F=t.events[V][1].end;break}P=!0}for(S(i),_=b;_C;){const I=n[w];t.containerState=I[1],I[0].exit.call(t,e)}n.length=C}function x(){o.write([null]),r=void 0,o=void 0,t.containerState._closeFlow=void 0}}function Da(e,t,n){return Q(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Mi(e){if(e===null||ae(e)||Ra(e))return 1;if(wa(e))return 2}function Kn(e,t,n){const i=[];let o=-1;for(;++o1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const p={...e[i][1].end},h={...e[n][1].start};Ni(p,-d),Ni(h,d),s={type:d>1?"strongSequence":"emphasisSequence",start:p,end:{...e[i][1].end}},u={type:d>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:h},r={type:d>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[n][1].start}},o={type:d>1?"strong":"emphasis",start:{...s.start},end:{...u.end}},e[i][1].end={...s.start},e[n][1].start={...u.end},c=[],e[i][1].end.offset-e[i][1].start.offset&&(c=he(c,[["enter",e[i][1],t],["exit",e[i][1],t]])),c=he(c,[["enter",o,t],["enter",s,t],["exit",s,t],["enter",r,t]]),c=he(c,Kn(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),c=he(c,[["exit",r,t],["enter",u,t],["exit",u,t],["exit",o,t]]),e[n][1].end.offset-e[n][1].start.offset?(f=2,c=he(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):f=0,Ae(e,i-1,n-i+3,c),n=i+c.length-f-2;break}}for(n=-1;++n0&&Y(_)?Q(e,x,"linePrefix",r+1)(_):x(_)}function x(_){return _===null||G(_)?e.check(Di,E,w)(_):(e.enter("codeFlowValue"),C(_))}function C(_){return _===null||G(_)?(e.exit("codeFlowValue"),x(_)):(e.consume(_),C)}function w(_){return e.exit("codeFenced"),t(_)}function I(_,b,V){let P=0;return F;function F(M){return _.enter("lineEnding"),_.consume(M),_.exit("lineEnding"),D}function D(M){return _.enter("codeFencedFence"),Y(M)?Q(_,L,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(M):L(M)}function L(M){return M===u?(_.enter("codeFencedFenceSequence"),q(M)):V(M)}function q(M){return M===u?(P++,_.consume(M),q):P>=s?(_.exit("codeFencedFenceSequence"),Y(M)?Q(_,U,"whitespace")(M):U(M)):V(M)}function U(M){return M===null||G(M)?(_.exit("codeFencedFence"),b(M)):V(M)}}}function Ja(e,t,n){const i=this;return o;function o(s){return s===null?n(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),r)}function r(s){return i.parser.lazy[i.now().line]?n(s):t(s)}}const nn={name:"codeIndented",tokenize:Wa},$a={partial:!0,tokenize:Ya};function Wa(e,t,n){const i=this;return o;function o(c){return e.enter("codeIndented"),Q(e,r,"linePrefix",5)(c)}function r(c){const f=i.events[i.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?s(c):n(c)}function s(c){return c===null?d(c):G(c)?e.attempt($a,s,d)(c):(e.enter("codeFlowValue"),u(c))}function u(c){return c===null||G(c)?(e.exit("codeFlowValue"),s(c)):(e.consume(c),u)}function d(c){return e.exit("codeIndented"),t(c)}}function Ya(e,t,n){const i=this;return o;function o(s){return i.parser.lazy[i.now().line]?n(s):G(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),o):Q(e,r,"linePrefix",5)(s)}function r(s){const u=i.events[i.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(s):G(s)?o(s):n(s)}}const Ka={name:"codeText",previous:Qa,resolve:Xa,tokenize:Za};function Xa(e){let t=e.length-4,n=3,i,o;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(i=n;++i=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return tthis.left.length?this.right.slice(this.right.length-i+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-i+this.left.length).reverse())}splice(t,n,i){const o=n||0;this.setCursor(Math.trunc(t));const r=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return i&&dt(this.left,i),r.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),dt(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),dt(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t=4?t(s):e.interrupt(i.parser.constructs.flow,n,t)(s)}}function es(e,t,n,i,o,r,s,u,d){const c=d||Number.POSITIVE_INFINITY;let f=0;return p;function p(S){return S===60?(e.enter(i),e.enter(o),e.enter(r),e.consume(S),e.exit(r),h):S===null||S===32||S===41||Sn(S)?n(S):(e.enter(i),e.enter(s),e.enter(u),e.enter("chunkString",{contentType:"string"}),E(S))}function h(S){return S===62?(e.enter(r),e.consume(S),e.exit(r),e.exit(o),e.exit(i),t):(e.enter(u),e.enter("chunkString",{contentType:"string"}),m(S))}function m(S){return S===62?(e.exit("chunkString"),e.exit(u),h(S)):S===null||S===60||G(S)?n(S):(e.consume(S),S===92?g:m)}function g(S){return S===60||S===62||S===92?(e.consume(S),m):m(S)}function E(S){return!f&&(S===null||S===41||ae(S))?(e.exit("chunkString"),e.exit(u),e.exit(s),e.exit(i),t(S)):f999||m===null||m===91||m===93&&!d||m===94&&!u&&"_hiddenFootnoteSupport"in s.parser.constructs?n(m):m===93?(e.exit(r),e.enter(o),e.consume(m),e.exit(o),e.exit(i),t):G(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),f):(e.enter("chunkString",{contentType:"string"}),p(m))}function p(m){return m===null||m===91||m===93||G(m)||u++>999?(e.exit("chunkString"),f(m)):(e.consume(m),d||(d=!Y(m)),m===92?h:p)}function h(m){return m===91||m===92||m===93?(e.consume(m),u++,p):p(m)}}function ns(e,t,n,i,o,r){let s;return u;function u(h){return h===34||h===39||h===40?(e.enter(i),e.enter(o),e.consume(h),e.exit(o),s=h===40?41:h,d):n(h)}function d(h){return h===s?(e.enter(o),e.consume(h),e.exit(o),e.exit(i),t):(e.enter(r),c(h))}function c(h){return h===s?(e.exit(r),d(s)):h===null?n(h):G(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),Q(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(h))}function f(h){return h===s||h===null||G(h)?(e.exit("chunkString"),c(h)):(e.consume(h),h===92?p:f)}function p(h){return h===s||h===92?(e.consume(h),f):f(h)}}function yt(e,t){let n;return i;function i(o){return G(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,i):Y(o)?Q(e,i,n?"linePrefix":"lineSuffix")(o):t(o)}}const su={name:"definition",tokenize:au},lu={partial:!0,tokenize:uu};function au(e,t,n){const i=this;let o;return r;function r(m){return e.enter("definition"),s(m)}function s(m){return ts.call(i,e,u,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(m)}function u(m){return o=Ze(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),d):n(m)}function d(m){return ae(m)?yt(e,c)(m):c(m)}function c(m){return es(e,f,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(m)}function f(m){return e.attempt(lu,p,p)(m)}function p(m){return Y(m)?Q(e,h,"whitespace")(m):h(m)}function h(m){return m===null||G(m)?(e.exit("definition"),i.parser.defined.push(o),t(m)):n(m)}}function uu(e,t,n){return i;function i(u){return ae(u)?yt(e,o)(u):n(u)}function o(u){return ns(e,r,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(u)}function r(u){return Y(u)?Q(e,s,"whitespace")(u):s(u)}function s(u){return u===null||G(u)?t(u):n(u)}}const cu={name:"hardBreakEscape",tokenize:du};function du(e,t,n){return i;function i(r){return e.enter("hardBreakEscape"),e.consume(r),o}function o(r){return G(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}const fu={name:"headingAtx",resolve:pu,tokenize:hu};function pu(e,t){let n=e.length-2,i=3,o,r;return e[i][1].type==="whitespace"&&(i+=2),n-2>i&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(i===n-1||n-4>i&&e[n-2][1].type==="whitespace")&&(n-=i+1===n?2:4),n>i&&(o={type:"atxHeadingText",start:e[i][1].start,end:e[n][1].end},r={type:"chunkText",start:e[i][1].start,end:e[n][1].end,contentType:"text"},Ae(e,i,n-i+1,[["enter",o,t],["enter",r,t],["exit",r,t],["exit",o,t]])),e}function hu(e,t,n){let i=0;return o;function o(f){return e.enter("atxHeading"),r(f)}function r(f){return e.enter("atxHeadingSequence"),s(f)}function s(f){return f===35&&i++<6?(e.consume(f),s):f===null||ae(f)?(e.exit("atxHeadingSequence"),u(f)):n(f)}function u(f){return f===35?(e.enter("atxHeadingSequence"),d(f)):f===null||G(f)?(e.exit("atxHeading"),t(f)):Y(f)?Q(e,u,"whitespace")(f):(e.enter("atxHeadingText"),c(f))}function d(f){return f===35?(e.consume(f),d):(e.exit("atxHeadingSequence"),u(f))}function c(f){return f===null||f===35||ae(f)?(e.exit("atxHeadingText"),u(f)):(e.consume(f),c)}}const mu=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Li=["pre","script","style","textarea"],gu={concrete:!0,name:"htmlFlow",resolveTo:Tu,tokenize:Eu},yu={partial:!0,tokenize:_u},vu={partial:!0,tokenize:Su};function Tu(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Eu(e,t,n){const i=this;let o,r,s,u,d;return c;function c(v){return f(v)}function f(v){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(v),p}function p(v){return v===33?(e.consume(v),h):v===47?(e.consume(v),r=!0,E):v===63?(e.consume(v),o=3,i.interrupt?t:y):Ie(v)?(e.consume(v),s=String.fromCharCode(v),T):n(v)}function h(v){return v===45?(e.consume(v),o=2,m):v===91?(e.consume(v),o=5,u=0,g):Ie(v)?(e.consume(v),o=4,i.interrupt?t:y):n(v)}function m(v){return v===45?(e.consume(v),i.interrupt?t:y):n(v)}function g(v){const ve="CDATA[";return v===ve.charCodeAt(u++)?(e.consume(v),u===ve.length?i.interrupt?t:L:g):n(v)}function E(v){return Ie(v)?(e.consume(v),s=String.fromCharCode(v),T):n(v)}function T(v){if(v===null||v===47||v===62||ae(v)){const ve=v===47,Fe=s.toLowerCase();return!ve&&!r&&Li.includes(Fe)?(o=1,i.interrupt?t(v):L(v)):mu.includes(s.toLowerCase())?(o=6,ve?(e.consume(v),S):i.interrupt?t(v):L(v)):(o=7,i.interrupt&&!i.parser.lazy[i.now().line]?n(v):r?x(v):C(v))}return v===45||pe(v)?(e.consume(v),s+=String.fromCharCode(v),T):n(v)}function S(v){return v===62?(e.consume(v),i.interrupt?t:L):n(v)}function x(v){return Y(v)?(e.consume(v),x):F(v)}function C(v){return v===47?(e.consume(v),F):v===58||v===95||Ie(v)?(e.consume(v),w):Y(v)?(e.consume(v),C):F(v)}function w(v){return v===45||v===46||v===58||v===95||pe(v)?(e.consume(v),w):I(v)}function I(v){return v===61?(e.consume(v),_):Y(v)?(e.consume(v),I):C(v)}function _(v){return v===null||v===60||v===61||v===62||v===96?n(v):v===34||v===39?(e.consume(v),d=v,b):Y(v)?(e.consume(v),_):V(v)}function b(v){return v===d?(e.consume(v),d=null,P):v===null||G(v)?n(v):(e.consume(v),b)}function V(v){return v===null||v===34||v===39||v===47||v===60||v===61||v===62||v===96||ae(v)?I(v):(e.consume(v),V)}function P(v){return v===47||v===62||Y(v)?C(v):n(v)}function F(v){return v===62?(e.consume(v),D):n(v)}function D(v){return v===null||G(v)?L(v):Y(v)?(e.consume(v),D):n(v)}function L(v){return v===45&&o===2?(e.consume(v),W):v===60&&o===1?(e.consume(v),Z):v===62&&o===4?(e.consume(v),ye):v===63&&o===3?(e.consume(v),y):v===93&&o===5?(e.consume(v),ce):G(v)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(yu,xe,q)(v)):v===null||G(v)?(e.exit("htmlFlowData"),q(v)):(e.consume(v),L)}function q(v){return e.check(vu,U,xe)(v)}function U(v){return e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),M}function M(v){return v===null||G(v)?q(v):(e.enter("htmlFlowData"),L(v))}function W(v){return v===45?(e.consume(v),y):L(v)}function Z(v){return v===47?(e.consume(v),s="",j):L(v)}function j(v){if(v===62){const ve=s.toLowerCase();return Li.includes(ve)?(e.consume(v),ye):L(v)}return Ie(v)&&s.length<8?(e.consume(v),s+=String.fromCharCode(v),j):L(v)}function ce(v){return v===93?(e.consume(v),y):L(v)}function y(v){return v===62?(e.consume(v),ye):v===45&&o===2?(e.consume(v),y):L(v)}function ye(v){return v===null||G(v)?(e.exit("htmlFlowData"),xe(v)):(e.consume(v),ye)}function xe(v){return e.exit("htmlFlow"),t(v)}}function Su(e,t,n){const i=this;return o;function o(s){return G(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),r):n(s)}function r(s){return i.parser.lazy[i.now().line]?n(s):t(s)}}function _u(e,t,n){return i;function i(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(zt,t,n)}}const Cu={name:"htmlText",tokenize:Iu};function Iu(e,t,n){const i=this;let o,r,s;return u;function u(y){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(y),d}function d(y){return y===33?(e.consume(y),c):y===47?(e.consume(y),I):y===63?(e.consume(y),C):Ie(y)?(e.consume(y),V):n(y)}function c(y){return y===45?(e.consume(y),f):y===91?(e.consume(y),r=0,g):Ie(y)?(e.consume(y),x):n(y)}function f(y){return y===45?(e.consume(y),m):n(y)}function p(y){return y===null?n(y):y===45?(e.consume(y),h):G(y)?(s=p,Z(y)):(e.consume(y),p)}function h(y){return y===45?(e.consume(y),m):p(y)}function m(y){return y===62?W(y):y===45?h(y):p(y)}function g(y){const ye="CDATA[";return y===ye.charCodeAt(r++)?(e.consume(y),r===ye.length?E:g):n(y)}function E(y){return y===null?n(y):y===93?(e.consume(y),T):G(y)?(s=E,Z(y)):(e.consume(y),E)}function T(y){return y===93?(e.consume(y),S):E(y)}function S(y){return y===62?W(y):y===93?(e.consume(y),S):E(y)}function x(y){return y===null||y===62?W(y):G(y)?(s=x,Z(y)):(e.consume(y),x)}function C(y){return y===null?n(y):y===63?(e.consume(y),w):G(y)?(s=C,Z(y)):(e.consume(y),C)}function w(y){return y===62?W(y):C(y)}function I(y){return Ie(y)?(e.consume(y),_):n(y)}function _(y){return y===45||pe(y)?(e.consume(y),_):b(y)}function b(y){return G(y)?(s=b,Z(y)):Y(y)?(e.consume(y),b):W(y)}function V(y){return y===45||pe(y)?(e.consume(y),V):y===47||y===62||ae(y)?P(y):n(y)}function P(y){return y===47?(e.consume(y),W):y===58||y===95||Ie(y)?(e.consume(y),F):G(y)?(s=P,Z(y)):Y(y)?(e.consume(y),P):W(y)}function F(y){return y===45||y===46||y===58||y===95||pe(y)?(e.consume(y),F):D(y)}function D(y){return y===61?(e.consume(y),L):G(y)?(s=D,Z(y)):Y(y)?(e.consume(y),D):P(y)}function L(y){return y===null||y===60||y===61||y===62||y===96?n(y):y===34||y===39?(e.consume(y),o=y,q):G(y)?(s=L,Z(y)):Y(y)?(e.consume(y),L):(e.consume(y),U)}function q(y){return y===o?(e.consume(y),o=void 0,M):y===null?n(y):G(y)?(s=q,Z(y)):(e.consume(y),q)}function U(y){return y===null||y===34||y===39||y===60||y===61||y===96?n(y):y===47||y===62||ae(y)?P(y):(e.consume(y),U)}function M(y){return y===47||y===62||ae(y)?P(y):n(y)}function W(y){return y===62?(e.consume(y),e.exit("htmlTextData"),e.exit("htmlText"),t):n(y)}function Z(y){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),j}function j(y){return Y(y)?Q(e,ce,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(y):ce(y)}function ce(y){return e.enter("htmlTextData"),s(y)}}const Xn={name:"labelEnd",resolveAll:Ru,resolveTo:Pu,tokenize:ku},Au={tokenize:Mu},xu={tokenize:Nu},wu={tokenize:Du};function Ru(e){let t=-1;const n=[];for(;++t=3&&(c===null||G(c))?(e.exit("thematicBreak"),t(c)):n(c)}function d(c){return c===o?(e.consume(c),i++,d):(e.exit("thematicBreakSequence"),Y(c)?Q(e,u,"whitespace")(c):u(c))}}const le={continuation:{tokenize:Ou},exit:Ju,name:"list",tokenize:qu},Hu={partial:!0,tokenize:$u},Bu={partial:!0,tokenize:zu};function qu(e,t,n){const i=this,o=i.events[i.events.length-1];let r=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,s=0;return u;function u(m){const g=i.containerState.type||(m===42||m===43||m===45?"listUnordered":"listOrdered");if(g==="listUnordered"?!i.containerState.marker||m===i.containerState.marker:_n(m)){if(i.containerState.type||(i.containerState.type=g,e.enter(g,{_container:!0})),g==="listUnordered")return e.enter("listItemPrefix"),m===42||m===45?e.check(Nt,n,c)(m):c(m);if(!i.interrupt||m===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(m)}return n(m)}function d(m){return _n(m)&&++s<10?(e.consume(m),d):(!i.interrupt||s<2)&&(i.containerState.marker?m===i.containerState.marker:m===41||m===46)?(e.exit("listItemValue"),c(m)):n(m)}function c(m){return e.enter("listItemMarker"),e.consume(m),e.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||m,e.check(zt,i.interrupt?n:f,e.attempt(Hu,h,p))}function f(m){return i.containerState.initialBlankLine=!0,r++,h(m)}function p(m){return Y(m)?(e.enter("listItemPrefixWhitespace"),e.consume(m),e.exit("listItemPrefixWhitespace"),h):n(m)}function h(m){return i.containerState.size=r+i.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(m)}}function Ou(e,t,n){const i=this;return i.containerState._closeFlow=void 0,e.check(zt,o,r);function o(u){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,Q(e,t,"listItemIndent",i.containerState.size+1)(u)}function r(u){return i.containerState.furtherBlankLines||!Y(u)?(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,s(u)):(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,e.attempt(Bu,t,s)(u))}function s(u){return i.containerState._closeFlow=!0,i.interrupt=void 0,Q(e,e.attempt(le,t,n),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u)}}function zu(e,t,n){const i=this;return Q(e,o,"listItemIndent",i.containerState.size+1);function o(r){const s=i.events[i.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===i.containerState.size?t(r):n(r)}}function Ju(e){e.exit(this.containerState.type)}function $u(e,t,n){const i=this;return Q(e,o,"listItemPrefixWhitespace",i.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(r){const s=i.events[i.events.length-1];return!Y(r)&&s&&s[1].type==="listItemPrefixWhitespace"?t(r):n(r)}}const Ui={name:"setextUnderline",resolveTo:Wu,tokenize:Yu};function Wu(e,t){let n=e.length,i,o,r;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){i=n;break}e[n][1].type==="paragraph"&&(o=n)}else e[n][1].type==="content"&&e.splice(n,1),!r&&e[n][1].type==="definition"&&(r=n);const s={type:"setextHeading",start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[o][1].type="setextHeadingText",r?(e.splice(o,0,["enter",s,t]),e.splice(r+1,0,["exit",e[i][1],t]),e[i][1].end={...e[r][1].end}):e[i][1]=s,e.push(["exit",s,t]),e}function Yu(e,t,n){const i=this;let o;return r;function r(c){let f=i.events.length,p;for(;f--;)if(i.events[f][1].type!=="lineEnding"&&i.events[f][1].type!=="linePrefix"&&i.events[f][1].type!=="content"){p=i.events[f][1].type==="paragraph";break}return!i.parser.lazy[i.now().line]&&(i.interrupt||p)?(e.enter("setextHeadingLine"),o=c,s(c)):n(c)}function s(c){return e.enter("setextHeadingLineSequence"),u(c)}function u(c){return c===o?(e.consume(c),u):(e.exit("setextHeadingLineSequence"),Y(c)?Q(e,d,"lineSuffix")(c):d(c))}function d(c){return c===null||G(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const Ku={tokenize:Xu};function Xu(e){const t=this,n=e.attempt(zt,i,e.attempt(this.parser.constructs.flowInitial,o,Q(e,e.attempt(this.parser.constructs.flow,o,e.attempt(tu,o)),"linePrefix")));return n;function i(r){if(r===null){e.consume(r);return}return e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function o(r){if(r===null){e.consume(r);return}return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const Qu={resolveAll:os()},Zu=is("string"),ju=is("text");function is(e){return{resolveAll:os(e==="text"?ec:void 0),tokenize:t};function t(n){const i=this,o=this.parser.constructs[e],r=n.attempt(o,s,u);return s;function s(f){return c(f)?r(f):u(f)}function u(f){if(f===null){n.consume(f);return}return n.enter("data"),n.consume(f),d}function d(f){return c(f)?(n.exit("data"),r(f)):(n.consume(f),d)}function c(f){if(f===null)return!0;const p=o[f];let h=-1;if(p)for(;++h-1){const u=s[0];typeof u=="string"?s[0]=u.slice(i):s.shift()}r>0&&s.push(e[o].slice(0,r))}return s}function pc(e,t){let n=-1;const i=[];let o;for(;++n0){const Te=B.tokenStack[B.tokenStack.length-1];(Te[1]||Vi).call(B,void 0,Te[0])}for(k.position={start:De(A.length>0?A[0][1].start:{line:1,column:1,offset:0}),end:De(A.length>0?A[A.length-2][1].end:{line:1,column:1,offset:0})},K=-1;++K0&&(i.className=["language-"+o[0]]);let r={type:"element",tagName:"code",properties:i,children:[{type:"text",value:n}]};return t.meta&&(r.data={meta:t.meta}),e.patch(t,r),r=e.applyData(t,r),r={type:"element",tagName:"pre",properties:{},children:[r]},e.patch(t,r),r}function wc(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Rc(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Pc(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=String(t.identifier).toUpperCase(),o=nt(i.toLowerCase()),r=e.footnoteOrder.indexOf(i);let s,u=e.footnoteCounts.get(i);u===void 0?(u=0,e.footnoteOrder.push(i),s=e.footnoteOrder.length):s=r+1,u+=1,e.footnoteCounts.set(i,u);const d={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+o,id:n+"fnref-"+o+(u>1?"-"+u:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(t,d);const c={type:"element",tagName:"sup",properties:{},children:[d]};return e.patch(t,c),e.applyData(t,c)}function kc(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Mc(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function ls(e,t){const n=t.referenceType;let i="]";if(n==="collapsed"?i+="[]":n==="full"&&(i+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+i}];const o=e.all(t),r=o[0];r&&r.type==="text"?r.value="["+r.value:o.unshift({type:"text",value:"["});const s=o[o.length-1];return s&&s.type==="text"?s.value+=i:o.push({type:"text",value:i}),o}function Nc(e,t){const n=String(t.identifier).toUpperCase(),i=e.definitionById.get(n);if(!i)return ls(e,t);const o={src:nt(i.url||""),alt:t.alt};i.title!==null&&i.title!==void 0&&(o.title=i.title);const r={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,r),e.applyData(t,r)}function Dc(e,t){const n={src:nt(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const i={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,i),e.applyData(t,i)}function bc(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const i={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,i),e.applyData(t,i)}function Lc(e,t){const n=String(t.identifier).toUpperCase(),i=e.definitionById.get(n);if(!i)return ls(e,t);const o={href:nt(i.url||"")};i.title!==null&&i.title!==void 0&&(o.title=i.title);const r={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Uc(e,t){const n={href:nt(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const i={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function Fc(e,t,n){const i=e.all(t),o=n?Vc(n):as(t),r={},s=[];if(typeof t.checked=="boolean"){const f=i[0];let p;f&&f.type==="element"&&f.tagName==="p"?p=f:(p={type:"element",tagName:"p",properties:{},children:[]},i.unshift(p)),p.children.length>0&&p.children.unshift({type:"text",value:" "}),p.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),r.className=["task-list-item"]}let u=-1;for(;++u1}function Gc(e,t){const n={},i=e.all(t);let o=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++o0){const s={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},u=zn(t.children[1]),d=qr(t.children[t.children.length-1]);u&&d&&(s.position={start:u,end:d}),o.push(s)}const r={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,r),e.applyData(t,r)}function zc(e,t,n){const i=n?n.children:void 0,r=(i?i.indexOf(t):1)===0?"th":"td",s=n&&n.type==="table"?n.align:void 0,u=s?s.length:t.children.length;let d=-1;const c=[];for(;++d0,!0),i[0]),o=i.index+i[0].length,i=n.exec(t);return r.push(Bi(t.slice(o),o>0,!1)),r.join("")}function Bi(e,t,n){let i=0,o=e.length;if(t){let r=e.codePointAt(i);for(;r===Gi||r===Hi;)i++,r=e.codePointAt(i)}if(n){let r=e.codePointAt(o-1);for(;r===Gi||r===Hi;)o--,r=e.codePointAt(o-1)}return o>i?e.slice(i,o):""}function Wc(e,t){const n={type:"text",value:$c(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Yc(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const Kc={blockquote:Ic,break:Ac,code:xc,delete:wc,emphasis:Rc,footnoteReference:Pc,heading:kc,html:Mc,imageReference:Nc,image:Dc,inlineCode:bc,linkReference:Lc,link:Uc,listItem:Fc,list:Gc,paragraph:Hc,root:Bc,strong:qc,table:Oc,tableCell:Jc,tableRow:zc,text:Wc,thematicBreak:Yc,toml:It,yaml:It,definition:It,footnoteDefinition:It};function It(){}const us=-1,Jt=0,vt=1,Lt=2,Qn=3,Zn=4,jn=5,ei=6,cs=7,ds=8,qi=typeof self=="object"?self:globalThis,Xc=(e,t)=>{const n=(o,r)=>(e.set(r,o),o),i=o=>{if(e.has(o))return e.get(o);const[r,s]=t[o];switch(r){case Jt:case us:return n(s,o);case vt:{const u=n([],o);for(const d of s)u.push(i(d));return u}case Lt:{const u=n({},o);for(const[d,c]of s)u[i(d)]=i(c);return u}case Qn:return n(new Date(s),o);case Zn:{const{source:u,flags:d}=s;return n(new RegExp(u,d),o)}case jn:{const u=n(new Map,o);for(const[d,c]of s)u.set(i(d),i(c));return u}case ei:{const u=n(new Set,o);for(const d of s)u.add(i(d));return u}case cs:{const{name:u,message:d}=s;return n(new qi[u](d),o)}case ds:return n(BigInt(s),o);case"BigInt":return n(Object(BigInt(s)),o);case"ArrayBuffer":return n(new Uint8Array(s).buffer,s);case"DataView":{const{buffer:u}=new Uint8Array(s);return n(new DataView(u),s)}}return n(new qi[r](s),o)};return i},Oi=e=>Xc(new Map,e)(0),We="",{toString:Qc}={},{keys:Zc}=Object,ft=e=>{const t=typeof e;if(t!=="object"||!e)return[Jt,t];const n=Qc.call(e).slice(8,-1);switch(n){case"Array":return[vt,We];case"Object":return[Lt,We];case"Date":return[Qn,We];case"RegExp":return[Zn,We];case"Map":return[jn,We];case"Set":return[ei,We];case"DataView":return[vt,n]}return n.includes("Array")?[vt,n]:n.includes("Error")?[cs,n]:[Lt,n]},At=([e,t])=>e===Jt&&(t==="function"||t==="symbol"),jc=(e,t,n,i)=>{const o=(s,u)=>{const d=i.push(s)-1;return n.set(u,d),d},r=s=>{if(n.has(s))return n.get(s);let[u,d]=ft(s);switch(u){case Jt:{let f=s;switch(d){case"bigint":u=ds,f=s.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);f=null;break;case"undefined":return o([us],s)}return o([u,f],s)}case vt:{if(d){let h=s;return d==="DataView"?h=new Uint8Array(s.buffer):d==="ArrayBuffer"&&(h=new Uint8Array(s)),o([d,[...h]],s)}const f=[],p=o([u,f],s);for(const h of s)f.push(r(h));return p}case Lt:{if(d)switch(d){case"BigInt":return o([d,s.toString()],s);case"Boolean":case"Number":case"String":return o([d,s.valueOf()],s)}if(t&&"toJSON"in s)return r(s.toJSON());const f=[],p=o([u,f],s);for(const h of Zc(s))(e||!At(ft(s[h])))&&f.push([r(h),r(s[h])]);return p}case Qn:return o([u,s.toISOString()],s);case Zn:{const{source:f,flags:p}=s;return o([u,{source:f,flags:p}],s)}case jn:{const f=[],p=o([u,f],s);for(const[h,m]of s)(e||!(At(ft(h))||At(ft(m))))&&f.push([r(h),r(m)]);return p}case ei:{const f=[],p=o([u,f],s);for(const h of s)(e||!At(ft(h)))&&f.push(r(h));return p}}const{message:c}=s;return o([u,{name:d,message:c}],s)};return r},zi=(e,{json:t,lossy:n}={})=>{const i=[];return jc(!(t||n),!!t,new Map,i)(e),i},Ut=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Oi(zi(e,t)):structuredClone(e):(e,t)=>Oi(zi(e,t));function ed(e,t){const n=[{type:"text",value:"โ†ฉ"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function td(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function nd(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||ed,i=e.options.footnoteBackLabel||td,o=e.options.footnoteLabel||"Footnotes",r=e.options.footnoteLabelTagName||"h2",s=e.options.footnoteLabelProperties||{className:["sr-only"]},u=[];let d=-1;for(;++d0&&g.push({type:"text",value:" "});let x=typeof n=="string"?n:n(d,m);typeof x=="string"&&(x={type:"text",value:x}),g.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+h+(m>1?"-"+m:""),dataFootnoteBackref:"",ariaLabel:typeof i=="string"?i:i(d,m),className:["data-footnote-backref"]},children:Array.isArray(x)?x:[x]})}const T=f[f.length-1];if(T&&T.type==="element"&&T.tagName==="p"){const x=T.children[T.children.length-1];x&&x.type==="text"?x.value+=" ":T.children.push({type:"text",value:" "}),T.children.push(...g)}else f.push(...g);const S={type:"element",tagName:"li",properties:{id:t+"fn-"+h},children:e.wrap(f,!0)};e.patch(c,S),u.push(S)}if(u.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:r,properties:{...Ut(s),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:` +`},{type:"element",tagName:"ol",properties:{},children:e.wrap(u,!0)},{type:"text",value:` +`}]}}const fs=(function(e){if(e==null)return sd;if(typeof e=="function")return $t(e);if(typeof e=="object")return Array.isArray(e)?id(e):od(e);if(typeof e=="string")return rd(e);throw new Error("Expected function, string, or object as test")});function id(e){const t=[];let n=-1;for(;++n":""))+")"})}return h;function h(){let m=ps,g,E,T;if((!t||r(d,c,f[f.length-1]||void 0))&&(m=dd(n(d,f)),m[0]===Ji))return m;if("children"in d&&d.children){const S=d;if(S.children&&m[0]!==ud)for(E=(i?S.children.length:-1)+s,T=f.concat(S);E>-1&&E0&&n.push({type:"text",value:` +`}),n}function $i(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Wi(e,t){const n=pd(e,t),i=n.one(e,void 0),o=nd(n),r=Array.isArray(i)?{type:"root",children:i}:i||{type:"root",children:[]};return o&&r.children.push({type:"text",value:` +`},o),r}function vd(e,t){return e&&"run"in e?async function(n,i){const o=Wi(n,{file:i,...t});await e.run(o,i)}:function(n,i){return Wi(n,{file:i,...e||t})}}function Yi(e){if(e)throw e}var rn,Ki;function Td(){if(Ki)return rn;Ki=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,i=Object.getOwnPropertyDescriptor,o=function(c){return typeof Array.isArray=="function"?Array.isArray(c):t.call(c)==="[object Array]"},r=function(c){if(!c||t.call(c)!=="[object Object]")return!1;var f=e.call(c,"constructor"),p=c.constructor&&c.constructor.prototype&&e.call(c.constructor.prototype,"isPrototypeOf");if(c.constructor&&!f&&!p)return!1;var h;for(h in c);return typeof h>"u"||e.call(c,h)},s=function(c,f){n&&f.name==="__proto__"?n(c,f.name,{enumerable:!0,configurable:!0,value:f.newValue,writable:!0}):c[f.name]=f.newValue},u=function(c,f){if(f==="__proto__")if(e.call(c,f)){if(i)return i(c,f).value}else return;return c[f]};return rn=function d(){var c,f,p,h,m,g,E=arguments[0],T=1,S=arguments.length,x=!1;for(typeof E=="boolean"&&(x=E,E=arguments[1]||{},T=2),(E==null||typeof E!="object"&&typeof E!="function")&&(E={});Ts.length;let d;u&&s.push(o);try{d=e.apply(this,s)}catch(c){const f=c;if(u&&n)throw f;return o(f)}u||(d&&d.then&&typeof d.then=="function"?d.then(r,o):d instanceof Error?o(d):r(d))}function o(s,...u){n||(n=!0,t(s,...u))}function r(s){o(null,s)}}const Ce={basename:Cd,dirname:Id,extname:Ad,join:xd,sep:"/"};function Cd(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');_t(e);let n=0,i=-1,o=e.length,r;if(t===void 0||t.length===0||t.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(r){n=o+1;break}}else i<0&&(r=!0,i=o+1);return i<0?"":e.slice(n,i)}if(t===e)return"";let s=-1,u=t.length-1;for(;o--;)if(e.codePointAt(o)===47){if(r){n=o+1;break}}else s<0&&(r=!0,s=o+1),u>-1&&(e.codePointAt(o)===t.codePointAt(u--)?u<0&&(i=o):(u=-1,i=s));return n===i?i=s:i<0&&(i=e.length),e.slice(n,i)}function Id(e){if(_t(e),e.length===0)return".";let t=-1,n=e.length,i;for(;--n;)if(e.codePointAt(n)===47){if(i){t=n;break}}else i||(i=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function Ad(e){_t(e);let t=e.length,n=-1,i=0,o=-1,r=0,s;for(;t--;){const u=e.codePointAt(t);if(u===47){if(s){i=t+1;break}continue}n<0&&(s=!0,n=t+1),u===46?o<0?o=t:r!==1&&(r=1):o>-1&&(r=-1)}return o<0||n<0||r===0||r===1&&o===n-1&&o===i+1?"":e.slice(o,n)}function xd(...e){let t=-1,n;for(;++t0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function Rd(e,t){let n="",i=0,o=-1,r=0,s=-1,u,d;for(;++s<=e.length;){if(s2){if(d=n.lastIndexOf("/"),d!==n.length-1){d<0?(n="",i=0):(n=n.slice(0,d),i=n.length-1-n.lastIndexOf("/")),o=s,r=0;continue}}else if(n.length>0){n="",i=0,o=s,r=0;continue}}t&&(n=n.length>0?n+"/..":"..",i=2)}else n.length>0?n+="/"+e.slice(o+1,s):n=e.slice(o+1,s),i=s-o-1;o=s,r=0}else u===46&&r>-1?r++:r=-1}return n}function _t(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Pd={cwd:kd};function kd(){return"/"}function xn(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Md(e){if(typeof e=="string")e=new URL(e);else if(!xn(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return Nd(e)}function Nd(e){if(e.hostname!==""){const i=new TypeError('File URL host must be "localhost" or empty on darwin');throw i.code="ERR_INVALID_FILE_URL_HOST",i}const t=e.pathname;let n=-1;for(;++n0){let[m,...g]=f;const E=i[h][1];An(E)&&An(m)&&(m=sn(!0,E,m)),i[h]=[c,m,...g]}}}}const Ud=new ti().freeze();function cn(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function dn(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function fn(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Qi(e){if(!An(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Zi(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function xt(e){return Fd(e)?e:new ms(e)}function Fd(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Vd(e){return typeof e=="string"||Gd(e)}function Gd(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Hd="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",ji=[],eo={allowDangerousHtml:!0},Bd=/^(https?|ircs?|mailto|xmpp)$/i,qd=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function Od(e){const t=zd(e),n=Jd(e);return $d(t.runSync(t.parse(n),n),e)}function zd(e){const t=e.rehypePlugins||ji,n=e.remarkPlugins||ji,i=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...eo}:eo;return Ud().use(Cc).use(n).use(vd,i).use(t)}function Jd(e){const t=e.children||"",n=new ms;return typeof t=="string"&&(n.value=t),n}function $d(e,t){const n=t.allowedElements,i=t.allowElement,o=t.components,r=t.disallowedElements,s=t.skipHtml,u=t.unwrapDisallowed,d=t.urlTransform||Wd;for(const f of qd)Object.hasOwn(t,f.from)&&(""+f.from+(f.to?"use `"+f.to+"` instead":"remove it")+Hd+f.id,void 0);return hs(e,c),na(e,{Fragment:O.Fragment,components:o,ignoreInvalidStyle:!0,jsx:O.jsx,jsxs:O.jsxs,passKeys:!0,passNode:!0});function c(f,p,h){if(f.type==="raw"&&h&&typeof p=="number")return s?h.children.splice(p,1):h.children[p]={type:"text",value:f.value},p;if(f.type==="element"){let m;for(m in tn)if(Object.hasOwn(tn,m)&&Object.hasOwn(f.properties,m)){const g=f.properties[m],E=tn[m];(E===null||E.includes(f.tagName))&&(f.properties[m]=d(String(g||""),m,f))}}if(f.type==="element"){let m=n?!n.includes(f.tagName):r?r.includes(f.tagName):!1;if(!m&&i&&typeof p=="number"&&(m=!i(f,p,h)),m&&h&&typeof p=="number")return u&&f.children?h.children.splice(p,1,...f.children):h.children.splice(p,1),p}}}function Wd(e){const t=e.indexOf(":"),n=e.indexOf("?"),i=e.indexOf("#"),o=e.indexOf("/");return t===-1||o!==-1&&t>o||n!==-1&&t>n||i!==-1&&t>i||Bd.test(e.slice(0,t))?e:""}var Yd={};/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */let Kd,Xd;function Qd(){return{geminiUrl:Kd,vertexUrl:Xd}}function Zd(e,t,n,i){var o,r;if(!(e!=null&&e.baseUrl)){const s=Qd();return t?(o=s.vertexUrl)!==null&&o!==void 0?o:n:(r=s.geminiUrl)!==null&&r!==void 0?r:i}return e.baseUrl}/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */class ke{}function N(e,t){const n=/\{([^}]+)\}/g;return e.replace(n,(i,o)=>{if(Object.prototype.hasOwnProperty.call(t,o)){const r=t[o];return r!=null?String(r):""}else throw new Error(`Key '${o}' not found in valueMap.`)})}function a(e,t,n){for(let r=0;r({}));else throw new Error(`Value must be a list given an array path ${s}`);if(Array.isArray(e[u])){const d=e[u];if(Array.isArray(n))for(let c=0;cl(u,t.slice(i+1),n)):n}else return n}else e=e[o]}return e}catch(i){if(i instanceof TypeError)return n;throw i}}function jd(e,t){for(const[n,i]of Object.entries(t)){const o=n.split("."),r=i.split("."),s=new Set;let u=-1;for(let d=0;du)for(let d=u;d=t.length||typeof e!="object"||e===null)return;const r=t[i];if(r.endsWith("[]")){const s=r.slice(0,-2),u=e;if(s in u&&Array.isArray(u[s]))for(const d of u[s])wn(d,t,n,i+1,o)}else if(r==="*"){if(typeof e=="object"&&e!==null&&!Array.isArray(e)){const s=e,u=Object.keys(s).filter(c=>!c.startsWith("_")&&!o.has(c)),d={};for(const c of u)d[c]=s[c];for(const[c,f]of Object.entries(d)){const p=[];for(const h of n.slice(i))h==="*"?p.push(c):p.push(h);a(s,p,f)}for(const c of u)delete s[c]}}else{const s=e;r in s&&wn(s[r],t,n,i+1,o)}}/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */function ni(e){if(typeof e!="string")throw new Error("fromImageBytes must be a string");return e}/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */function ef(e){const t={},n=l(e,["operationName"]);n!=null&&a(t,["operationName"],n);const i=l(e,["resourceName"]);return i!=null&&a(t,["_url","resourceName"],i),t}function tf(e){const t={},n=l(e,["name"]);n!=null&&a(t,["name"],n);const i=l(e,["metadata"]);i!=null&&a(t,["metadata"],i);const o=l(e,["done"]);o!=null&&a(t,["done"],o);const r=l(e,["error"]);r!=null&&a(t,["error"],r);const s=l(e,["response","generateVideoResponse"]);return s!=null&&a(t,["response"],of(s)),t}function nf(e){const t={},n=l(e,["name"]);n!=null&&a(t,["name"],n);const i=l(e,["metadata"]);i!=null&&a(t,["metadata"],i);const o=l(e,["done"]);o!=null&&a(t,["done"],o);const r=l(e,["error"]);r!=null&&a(t,["error"],r);const s=l(e,["response"]);return s!=null&&a(t,["response"],rf(s)),t}function of(e){const t={},n=l(e,["generatedSamples"]);if(n!=null){let r=n;Array.isArray(r)&&(r=r.map(s=>sf(s))),a(t,["generatedVideos"],r)}const i=l(e,["raiMediaFilteredCount"]);i!=null&&a(t,["raiMediaFilteredCount"],i);const o=l(e,["raiMediaFilteredReasons"]);return o!=null&&a(t,["raiMediaFilteredReasons"],o),t}function rf(e){const t={},n=l(e,["videos"]);if(n!=null){let r=n;Array.isArray(r)&&(r=r.map(s=>lf(s))),a(t,["generatedVideos"],r)}const i=l(e,["raiMediaFilteredCount"]);i!=null&&a(t,["raiMediaFilteredCount"],i);const o=l(e,["raiMediaFilteredReasons"]);return o!=null&&a(t,["raiMediaFilteredReasons"],o),t}function sf(e){const t={},n=l(e,["video"]);return n!=null&&a(t,["video"],pf(n)),t}function lf(e){const t={},n=l(e,["_self"]);return n!=null&&a(t,["video"],hf(n)),t}function af(e){const t={},n=l(e,["operationName"]);return n!=null&&a(t,["_url","operationName"],n),t}function uf(e){const t={},n=l(e,["operationName"]);return n!=null&&a(t,["_url","operationName"],n),t}function cf(e){const t={},n=l(e,["name"]);n!=null&&a(t,["name"],n);const i=l(e,["metadata"]);i!=null&&a(t,["metadata"],i);const o=l(e,["done"]);o!=null&&a(t,["done"],o);const r=l(e,["error"]);r!=null&&a(t,["error"],r);const s=l(e,["response"]);return s!=null&&a(t,["response"],df(s)),t}function df(e){const t={},n=l(e,["sdkHttpResponse"]);n!=null&&a(t,["sdkHttpResponse"],n);const i=l(e,["parent"]);i!=null&&a(t,["parent"],i);const o=l(e,["documentName"]);return o!=null&&a(t,["documentName"],o),t}function gs(e){const t={},n=l(e,["name"]);n!=null&&a(t,["name"],n);const i=l(e,["metadata"]);i!=null&&a(t,["metadata"],i);const o=l(e,["done"]);o!=null&&a(t,["done"],o);const r=l(e,["error"]);r!=null&&a(t,["error"],r);const s=l(e,["response"]);return s!=null&&a(t,["response"],ff(s)),t}function ff(e){const t={},n=l(e,["sdkHttpResponse"]);n!=null&&a(t,["sdkHttpResponse"],n);const i=l(e,["parent"]);i!=null&&a(t,["parent"],i);const o=l(e,["documentName"]);return o!=null&&a(t,["documentName"],o),t}function pf(e){const t={},n=l(e,["uri"]);n!=null&&a(t,["uri"],n);const i=l(e,["encodedVideo"]);i!=null&&a(t,["videoBytes"],ni(i));const o=l(e,["encoding"]);return o!=null&&a(t,["mimeType"],o),t}function hf(e){const t={},n=l(e,["gcsUri"]);n!=null&&a(t,["uri"],n);const i=l(e,["bytesBase64Encoded"]);i!=null&&a(t,["videoBytes"],ni(i));const o=l(e,["mimeType"]);return o!=null&&a(t,["mimeType"],o),t}/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */var to;(function(e){e.OUTCOME_UNSPECIFIED="OUTCOME_UNSPECIFIED",e.OUTCOME_OK="OUTCOME_OK",e.OUTCOME_FAILED="OUTCOME_FAILED",e.OUTCOME_DEADLINE_EXCEEDED="OUTCOME_DEADLINE_EXCEEDED"})(to||(to={}));var no;(function(e){e.LANGUAGE_UNSPECIFIED="LANGUAGE_UNSPECIFIED",e.PYTHON="PYTHON"})(no||(no={}));var io;(function(e){e.SCHEDULING_UNSPECIFIED="SCHEDULING_UNSPECIFIED",e.SILENT="SILENT",e.WHEN_IDLE="WHEN_IDLE",e.INTERRUPT="INTERRUPT"})(io||(io={}));var be;(function(e){e.TYPE_UNSPECIFIED="TYPE_UNSPECIFIED",e.STRING="STRING",e.NUMBER="NUMBER",e.INTEGER="INTEGER",e.BOOLEAN="BOOLEAN",e.ARRAY="ARRAY",e.OBJECT="OBJECT",e.NULL="NULL"})(be||(be={}));var oo;(function(e){e.API_SPEC_UNSPECIFIED="API_SPEC_UNSPECIFIED",e.SIMPLE_SEARCH="SIMPLE_SEARCH",e.ELASTIC_SEARCH="ELASTIC_SEARCH"})(oo||(oo={}));var ro;(function(e){e.AUTH_TYPE_UNSPECIFIED="AUTH_TYPE_UNSPECIFIED",e.NO_AUTH="NO_AUTH",e.API_KEY_AUTH="API_KEY_AUTH",e.HTTP_BASIC_AUTH="HTTP_BASIC_AUTH",e.GOOGLE_SERVICE_ACCOUNT_AUTH="GOOGLE_SERVICE_ACCOUNT_AUTH",e.OAUTH="OAUTH",e.OIDC_AUTH="OIDC_AUTH"})(ro||(ro={}));var so;(function(e){e.HTTP_IN_UNSPECIFIED="HTTP_IN_UNSPECIFIED",e.HTTP_IN_QUERY="HTTP_IN_QUERY",e.HTTP_IN_HEADER="HTTP_IN_HEADER",e.HTTP_IN_PATH="HTTP_IN_PATH",e.HTTP_IN_BODY="HTTP_IN_BODY",e.HTTP_IN_COOKIE="HTTP_IN_COOKIE"})(so||(so={}));var lo;(function(e){e.PHISH_BLOCK_THRESHOLD_UNSPECIFIED="PHISH_BLOCK_THRESHOLD_UNSPECIFIED",e.BLOCK_LOW_AND_ABOVE="BLOCK_LOW_AND_ABOVE",e.BLOCK_MEDIUM_AND_ABOVE="BLOCK_MEDIUM_AND_ABOVE",e.BLOCK_HIGH_AND_ABOVE="BLOCK_HIGH_AND_ABOVE",e.BLOCK_HIGHER_AND_ABOVE="BLOCK_HIGHER_AND_ABOVE",e.BLOCK_VERY_HIGH_AND_ABOVE="BLOCK_VERY_HIGH_AND_ABOVE",e.BLOCK_ONLY_EXTREMELY_HIGH="BLOCK_ONLY_EXTREMELY_HIGH"})(lo||(lo={}));var ao;(function(e){e.UNSPECIFIED="UNSPECIFIED",e.BLOCKING="BLOCKING",e.NON_BLOCKING="NON_BLOCKING"})(ao||(ao={}));var uo;(function(e){e.MODE_UNSPECIFIED="MODE_UNSPECIFIED",e.MODE_DYNAMIC="MODE_DYNAMIC"})(uo||(uo={}));var co;(function(e){e.MODE_UNSPECIFIED="MODE_UNSPECIFIED",e.AUTO="AUTO",e.ANY="ANY",e.NONE="NONE",e.VALIDATED="VALIDATED"})(co||(co={}));var fo;(function(e){e.THINKING_LEVEL_UNSPECIFIED="THINKING_LEVEL_UNSPECIFIED",e.LOW="LOW",e.MEDIUM="MEDIUM",e.HIGH="HIGH",e.MINIMAL="MINIMAL"})(fo||(fo={}));var po;(function(e){e.HARM_CATEGORY_UNSPECIFIED="HARM_CATEGORY_UNSPECIFIED",e.HARM_CATEGORY_HARASSMENT="HARM_CATEGORY_HARASSMENT",e.HARM_CATEGORY_HATE_SPEECH="HARM_CATEGORY_HATE_SPEECH",e.HARM_CATEGORY_SEXUALLY_EXPLICIT="HARM_CATEGORY_SEXUALLY_EXPLICIT",e.HARM_CATEGORY_DANGEROUS_CONTENT="HARM_CATEGORY_DANGEROUS_CONTENT",e.HARM_CATEGORY_CIVIC_INTEGRITY="HARM_CATEGORY_CIVIC_INTEGRITY",e.HARM_CATEGORY_IMAGE_HATE="HARM_CATEGORY_IMAGE_HATE",e.HARM_CATEGORY_IMAGE_DANGEROUS_CONTENT="HARM_CATEGORY_IMAGE_DANGEROUS_CONTENT",e.HARM_CATEGORY_IMAGE_HARASSMENT="HARM_CATEGORY_IMAGE_HARASSMENT",e.HARM_CATEGORY_IMAGE_SEXUALLY_EXPLICIT="HARM_CATEGORY_IMAGE_SEXUALLY_EXPLICIT",e.HARM_CATEGORY_JAILBREAK="HARM_CATEGORY_JAILBREAK"})(po||(po={}));var ho;(function(e){e.HARM_BLOCK_METHOD_UNSPECIFIED="HARM_BLOCK_METHOD_UNSPECIFIED",e.SEVERITY="SEVERITY",e.PROBABILITY="PROBABILITY"})(ho||(ho={}));var mo;(function(e){e.HARM_BLOCK_THRESHOLD_UNSPECIFIED="HARM_BLOCK_THRESHOLD_UNSPECIFIED",e.BLOCK_LOW_AND_ABOVE="BLOCK_LOW_AND_ABOVE",e.BLOCK_MEDIUM_AND_ABOVE="BLOCK_MEDIUM_AND_ABOVE",e.BLOCK_ONLY_HIGH="BLOCK_ONLY_HIGH",e.BLOCK_NONE="BLOCK_NONE",e.OFF="OFF"})(mo||(mo={}));var go;(function(e){e.FINISH_REASON_UNSPECIFIED="FINISH_REASON_UNSPECIFIED",e.STOP="STOP",e.MAX_TOKENS="MAX_TOKENS",e.SAFETY="SAFETY",e.RECITATION="RECITATION",e.LANGUAGE="LANGUAGE",e.OTHER="OTHER",e.BLOCKLIST="BLOCKLIST",e.PROHIBITED_CONTENT="PROHIBITED_CONTENT",e.SPII="SPII",e.MALFORMED_FUNCTION_CALL="MALFORMED_FUNCTION_CALL",e.IMAGE_SAFETY="IMAGE_SAFETY",e.UNEXPECTED_TOOL_CALL="UNEXPECTED_TOOL_CALL",e.IMAGE_PROHIBITED_CONTENT="IMAGE_PROHIBITED_CONTENT",e.NO_IMAGE="NO_IMAGE",e.IMAGE_RECITATION="IMAGE_RECITATION",e.IMAGE_OTHER="IMAGE_OTHER"})(go||(go={}));var yo;(function(e){e.HARM_PROBABILITY_UNSPECIFIED="HARM_PROBABILITY_UNSPECIFIED",e.NEGLIGIBLE="NEGLIGIBLE",e.LOW="LOW",e.MEDIUM="MEDIUM",e.HIGH="HIGH"})(yo||(yo={}));var vo;(function(e){e.HARM_SEVERITY_UNSPECIFIED="HARM_SEVERITY_UNSPECIFIED",e.HARM_SEVERITY_NEGLIGIBLE="HARM_SEVERITY_NEGLIGIBLE",e.HARM_SEVERITY_LOW="HARM_SEVERITY_LOW",e.HARM_SEVERITY_MEDIUM="HARM_SEVERITY_MEDIUM",e.HARM_SEVERITY_HIGH="HARM_SEVERITY_HIGH"})(vo||(vo={}));var To;(function(e){e.URL_RETRIEVAL_STATUS_UNSPECIFIED="URL_RETRIEVAL_STATUS_UNSPECIFIED",e.URL_RETRIEVAL_STATUS_SUCCESS="URL_RETRIEVAL_STATUS_SUCCESS",e.URL_RETRIEVAL_STATUS_ERROR="URL_RETRIEVAL_STATUS_ERROR",e.URL_RETRIEVAL_STATUS_PAYWALL="URL_RETRIEVAL_STATUS_PAYWALL",e.URL_RETRIEVAL_STATUS_UNSAFE="URL_RETRIEVAL_STATUS_UNSAFE"})(To||(To={}));var Eo;(function(e){e.BLOCKED_REASON_UNSPECIFIED="BLOCKED_REASON_UNSPECIFIED",e.SAFETY="SAFETY",e.OTHER="OTHER",e.BLOCKLIST="BLOCKLIST",e.PROHIBITED_CONTENT="PROHIBITED_CONTENT",e.IMAGE_SAFETY="IMAGE_SAFETY",e.MODEL_ARMOR="MODEL_ARMOR",e.JAILBREAK="JAILBREAK"})(Eo||(Eo={}));var So;(function(e){e.TRAFFIC_TYPE_UNSPECIFIED="TRAFFIC_TYPE_UNSPECIFIED",e.ON_DEMAND="ON_DEMAND",e.PROVISIONED_THROUGHPUT="PROVISIONED_THROUGHPUT"})(So||(So={}));var Ft;(function(e){e.MODALITY_UNSPECIFIED="MODALITY_UNSPECIFIED",e.TEXT="TEXT",e.IMAGE="IMAGE",e.AUDIO="AUDIO"})(Ft||(Ft={}));var _o;(function(e){e.MEDIA_RESOLUTION_UNSPECIFIED="MEDIA_RESOLUTION_UNSPECIFIED",e.MEDIA_RESOLUTION_LOW="MEDIA_RESOLUTION_LOW",e.MEDIA_RESOLUTION_MEDIUM="MEDIA_RESOLUTION_MEDIUM",e.MEDIA_RESOLUTION_HIGH="MEDIA_RESOLUTION_HIGH"})(_o||(_o={}));var Co;(function(e){e.TUNING_MODE_UNSPECIFIED="TUNING_MODE_UNSPECIFIED",e.TUNING_MODE_FULL="TUNING_MODE_FULL",e.TUNING_MODE_PEFT_ADAPTER="TUNING_MODE_PEFT_ADAPTER"})(Co||(Co={}));var Io;(function(e){e.ADAPTER_SIZE_UNSPECIFIED="ADAPTER_SIZE_UNSPECIFIED",e.ADAPTER_SIZE_ONE="ADAPTER_SIZE_ONE",e.ADAPTER_SIZE_TWO="ADAPTER_SIZE_TWO",e.ADAPTER_SIZE_FOUR="ADAPTER_SIZE_FOUR",e.ADAPTER_SIZE_EIGHT="ADAPTER_SIZE_EIGHT",e.ADAPTER_SIZE_SIXTEEN="ADAPTER_SIZE_SIXTEEN",e.ADAPTER_SIZE_THIRTY_TWO="ADAPTER_SIZE_THIRTY_TWO"})(Io||(Io={}));var Rn;(function(e){e.JOB_STATE_UNSPECIFIED="JOB_STATE_UNSPECIFIED",e.JOB_STATE_QUEUED="JOB_STATE_QUEUED",e.JOB_STATE_PENDING="JOB_STATE_PENDING",e.JOB_STATE_RUNNING="JOB_STATE_RUNNING",e.JOB_STATE_SUCCEEDED="JOB_STATE_SUCCEEDED",e.JOB_STATE_FAILED="JOB_STATE_FAILED",e.JOB_STATE_CANCELLING="JOB_STATE_CANCELLING",e.JOB_STATE_CANCELLED="JOB_STATE_CANCELLED",e.JOB_STATE_PAUSED="JOB_STATE_PAUSED",e.JOB_STATE_EXPIRED="JOB_STATE_EXPIRED",e.JOB_STATE_UPDATING="JOB_STATE_UPDATING",e.JOB_STATE_PARTIALLY_SUCCEEDED="JOB_STATE_PARTIALLY_SUCCEEDED"})(Rn||(Rn={}));var Ao;(function(e){e.TUNING_TASK_UNSPECIFIED="TUNING_TASK_UNSPECIFIED",e.TUNING_TASK_I2V="TUNING_TASK_I2V",e.TUNING_TASK_T2V="TUNING_TASK_T2V",e.TUNING_TASK_R2V="TUNING_TASK_R2V"})(Ao||(Ao={}));var xo;(function(e){e.MEDIA_RESOLUTION_UNSPECIFIED="MEDIA_RESOLUTION_UNSPECIFIED",e.MEDIA_RESOLUTION_LOW="MEDIA_RESOLUTION_LOW",e.MEDIA_RESOLUTION_MEDIUM="MEDIA_RESOLUTION_MEDIUM",e.MEDIA_RESOLUTION_HIGH="MEDIA_RESOLUTION_HIGH",e.MEDIA_RESOLUTION_ULTRA_HIGH="MEDIA_RESOLUTION_ULTRA_HIGH"})(xo||(xo={}));var Pn;(function(e){e.COLLECTION="COLLECTION"})(Pn||(Pn={}));var wo;(function(e){e.FEATURE_SELECTION_PREFERENCE_UNSPECIFIED="FEATURE_SELECTION_PREFERENCE_UNSPECIFIED",e.PRIORITIZE_QUALITY="PRIORITIZE_QUALITY",e.BALANCED="BALANCED",e.PRIORITIZE_COST="PRIORITIZE_COST"})(wo||(wo={}));var Ro;(function(e){e.ENVIRONMENT_UNSPECIFIED="ENVIRONMENT_UNSPECIFIED",e.ENVIRONMENT_BROWSER="ENVIRONMENT_BROWSER"})(Ro||(Ro={}));var Po;(function(e){e.BLOCK_LOW_AND_ABOVE="BLOCK_LOW_AND_ABOVE",e.BLOCK_MEDIUM_AND_ABOVE="BLOCK_MEDIUM_AND_ABOVE",e.BLOCK_ONLY_HIGH="BLOCK_ONLY_HIGH",e.BLOCK_NONE="BLOCK_NONE"})(Po||(Po={}));var ko;(function(e){e.DONT_ALLOW="DONT_ALLOW",e.ALLOW_ADULT="ALLOW_ADULT",e.ALLOW_ALL="ALLOW_ALL"})(ko||(ko={}));var Mo;(function(e){e.auto="auto",e.en="en",e.ja="ja",e.ko="ko",e.hi="hi",e.zh="zh",e.pt="pt",e.es="es"})(Mo||(Mo={}));var No;(function(e){e.MASK_MODE_DEFAULT="MASK_MODE_DEFAULT",e.MASK_MODE_USER_PROVIDED="MASK_MODE_USER_PROVIDED",e.MASK_MODE_BACKGROUND="MASK_MODE_BACKGROUND",e.MASK_MODE_FOREGROUND="MASK_MODE_FOREGROUND",e.MASK_MODE_SEMANTIC="MASK_MODE_SEMANTIC"})(No||(No={}));var Do;(function(e){e.CONTROL_TYPE_DEFAULT="CONTROL_TYPE_DEFAULT",e.CONTROL_TYPE_CANNY="CONTROL_TYPE_CANNY",e.CONTROL_TYPE_SCRIBBLE="CONTROL_TYPE_SCRIBBLE",e.CONTROL_TYPE_FACE_MESH="CONTROL_TYPE_FACE_MESH"})(Do||(Do={}));var bo;(function(e){e.SUBJECT_TYPE_DEFAULT="SUBJECT_TYPE_DEFAULT",e.SUBJECT_TYPE_PERSON="SUBJECT_TYPE_PERSON",e.SUBJECT_TYPE_ANIMAL="SUBJECT_TYPE_ANIMAL",e.SUBJECT_TYPE_PRODUCT="SUBJECT_TYPE_PRODUCT"})(bo||(bo={}));var Lo;(function(e){e.EDIT_MODE_DEFAULT="EDIT_MODE_DEFAULT",e.EDIT_MODE_INPAINT_REMOVAL="EDIT_MODE_INPAINT_REMOVAL",e.EDIT_MODE_INPAINT_INSERTION="EDIT_MODE_INPAINT_INSERTION",e.EDIT_MODE_OUTPAINT="EDIT_MODE_OUTPAINT",e.EDIT_MODE_CONTROLLED_EDITING="EDIT_MODE_CONTROLLED_EDITING",e.EDIT_MODE_STYLE="EDIT_MODE_STYLE",e.EDIT_MODE_BGSWAP="EDIT_MODE_BGSWAP",e.EDIT_MODE_PRODUCT_IMAGE="EDIT_MODE_PRODUCT_IMAGE"})(Lo||(Lo={}));var Uo;(function(e){e.FOREGROUND="FOREGROUND",e.BACKGROUND="BACKGROUND",e.PROMPT="PROMPT",e.SEMANTIC="SEMANTIC",e.INTERACTIVE="INTERACTIVE"})(Uo||(Uo={}));var Fo;(function(e){e.ASSET="ASSET",e.STYLE="STYLE"})(Fo||(Fo={}));var Vo;(function(e){e.INSERT="INSERT",e.REMOVE="REMOVE",e.REMOVE_STATIC="REMOVE_STATIC",e.OUTPAINT="OUTPAINT"})(Vo||(Vo={}));var Go;(function(e){e.OPTIMIZED="OPTIMIZED",e.LOSSLESS="LOSSLESS"})(Go||(Go={}));var Ho;(function(e){e.SUPERVISED_FINE_TUNING="SUPERVISED_FINE_TUNING",e.PREFERENCE_TUNING="PREFERENCE_TUNING",e.DISTILLATION="DISTILLATION"})(Ho||(Ho={}));var Bo;(function(e){e.STATE_UNSPECIFIED="STATE_UNSPECIFIED",e.STATE_PENDING="STATE_PENDING",e.STATE_ACTIVE="STATE_ACTIVE",e.STATE_FAILED="STATE_FAILED"})(Bo||(Bo={}));var qo;(function(e){e.STATE_UNSPECIFIED="STATE_UNSPECIFIED",e.PROCESSING="PROCESSING",e.ACTIVE="ACTIVE",e.FAILED="FAILED"})(qo||(qo={}));var Oo;(function(e){e.SOURCE_UNSPECIFIED="SOURCE_UNSPECIFIED",e.UPLOADED="UPLOADED",e.GENERATED="GENERATED",e.REGISTERED="REGISTERED"})(Oo||(Oo={}));var zo;(function(e){e.TURN_COMPLETE_REASON_UNSPECIFIED="TURN_COMPLETE_REASON_UNSPECIFIED",e.MALFORMED_FUNCTION_CALL="MALFORMED_FUNCTION_CALL",e.RESPONSE_REJECTED="RESPONSE_REJECTED",e.NEED_MORE_INPUT="NEED_MORE_INPUT"})(zo||(zo={}));var Jo;(function(e){e.MODALITY_UNSPECIFIED="MODALITY_UNSPECIFIED",e.TEXT="TEXT",e.IMAGE="IMAGE",e.VIDEO="VIDEO",e.AUDIO="AUDIO",e.DOCUMENT="DOCUMENT"})(Jo||(Jo={}));var $o;(function(e){e.VAD_SIGNAL_TYPE_UNSPECIFIED="VAD_SIGNAL_TYPE_UNSPECIFIED",e.VAD_SIGNAL_TYPE_SOS="VAD_SIGNAL_TYPE_SOS",e.VAD_SIGNAL_TYPE_EOS="VAD_SIGNAL_TYPE_EOS"})($o||($o={}));var Wo;(function(e){e.TYPE_UNSPECIFIED="TYPE_UNSPECIFIED",e.ACTIVITY_START="ACTIVITY_START",e.ACTIVITY_END="ACTIVITY_END"})(Wo||(Wo={}));var Yo;(function(e){e.START_SENSITIVITY_UNSPECIFIED="START_SENSITIVITY_UNSPECIFIED",e.START_SENSITIVITY_HIGH="START_SENSITIVITY_HIGH",e.START_SENSITIVITY_LOW="START_SENSITIVITY_LOW"})(Yo||(Yo={}));var Ko;(function(e){e.END_SENSITIVITY_UNSPECIFIED="END_SENSITIVITY_UNSPECIFIED",e.END_SENSITIVITY_HIGH="END_SENSITIVITY_HIGH",e.END_SENSITIVITY_LOW="END_SENSITIVITY_LOW"})(Ko||(Ko={}));var Xo;(function(e){e.ACTIVITY_HANDLING_UNSPECIFIED="ACTIVITY_HANDLING_UNSPECIFIED",e.START_OF_ACTIVITY_INTERRUPTS="START_OF_ACTIVITY_INTERRUPTS",e.NO_INTERRUPTION="NO_INTERRUPTION"})(Xo||(Xo={}));var Qo;(function(e){e.TURN_COVERAGE_UNSPECIFIED="TURN_COVERAGE_UNSPECIFIED",e.TURN_INCLUDES_ONLY_ACTIVITY="TURN_INCLUDES_ONLY_ACTIVITY",e.TURN_INCLUDES_ALL_INPUT="TURN_INCLUDES_ALL_INPUT"})(Qo||(Qo={}));var Zo;(function(e){e.SCALE_UNSPECIFIED="SCALE_UNSPECIFIED",e.C_MAJOR_A_MINOR="C_MAJOR_A_MINOR",e.D_FLAT_MAJOR_B_FLAT_MINOR="D_FLAT_MAJOR_B_FLAT_MINOR",e.D_MAJOR_B_MINOR="D_MAJOR_B_MINOR",e.E_FLAT_MAJOR_C_MINOR="E_FLAT_MAJOR_C_MINOR",e.E_MAJOR_D_FLAT_MINOR="E_MAJOR_D_FLAT_MINOR",e.F_MAJOR_D_MINOR="F_MAJOR_D_MINOR",e.G_FLAT_MAJOR_E_FLAT_MINOR="G_FLAT_MAJOR_E_FLAT_MINOR",e.G_MAJOR_E_MINOR="G_MAJOR_E_MINOR",e.A_FLAT_MAJOR_F_MINOR="A_FLAT_MAJOR_F_MINOR",e.A_MAJOR_G_FLAT_MINOR="A_MAJOR_G_FLAT_MINOR",e.B_FLAT_MAJOR_G_MINOR="B_FLAT_MAJOR_G_MINOR",e.B_MAJOR_A_FLAT_MINOR="B_MAJOR_A_FLAT_MINOR"})(Zo||(Zo={}));var jo;(function(e){e.MUSIC_GENERATION_MODE_UNSPECIFIED="MUSIC_GENERATION_MODE_UNSPECIFIED",e.QUALITY="QUALITY",e.DIVERSITY="DIVERSITY",e.VOCALIZATION="VOCALIZATION"})(jo||(jo={}));var Ke;(function(e){e.PLAYBACK_CONTROL_UNSPECIFIED="PLAYBACK_CONTROL_UNSPECIFIED",e.PLAY="PLAY",e.PAUSE="PAUSE",e.STOP="STOP",e.RESET_CONTEXT="RESET_CONTEXT"})(Ke||(Ke={}));class kn{constructor(t){const n={};for(const i of t.headers.entries())n[i[0]]=i[1];this.headers=n,this.responseInternal=t}json(){return this.responseInternal.json()}}class pt{get text(){var t,n,i,o,r,s,u,d;if(((o=(i=(n=(t=this.candidates)===null||t===void 0?void 0:t[0])===null||n===void 0?void 0:n.content)===null||i===void 0?void 0:i.parts)===null||o===void 0?void 0:o.length)===0)return;this.candidates&&this.candidates.length>1&&console.warn("there are multiple candidates in the response, returning text from the first one.");let c="",f=!1;const p=[];for(const h of(d=(u=(s=(r=this.candidates)===null||r===void 0?void 0:r[0])===null||s===void 0?void 0:s.content)===null||u===void 0?void 0:u.parts)!==null&&d!==void 0?d:[]){for(const[m,g]of Object.entries(h))m!=="text"&&m!=="thought"&&m!=="thoughtSignature"&&(g!==null||g!==void 0)&&p.push(m);if(typeof h.text=="string"){if(typeof h.thought=="boolean"&&h.thought)continue;f=!0,c+=h.text}}return p.length>0&&console.warn(`there are non-text parts ${p} in the response, returning concatenation of all text parts. Please refer to the non text parts for a full response from model.`),f?c:void 0}get data(){var t,n,i,o,r,s,u,d;if(((o=(i=(n=(t=this.candidates)===null||t===void 0?void 0:t[0])===null||n===void 0?void 0:n.content)===null||i===void 0?void 0:i.parts)===null||o===void 0?void 0:o.length)===0)return;this.candidates&&this.candidates.length>1&&console.warn("there are multiple candidates in the response, returning data from the first one.");let c="";const f=[];for(const p of(d=(u=(s=(r=this.candidates)===null||r===void 0?void 0:r[0])===null||s===void 0?void 0:s.content)===null||u===void 0?void 0:u.parts)!==null&&d!==void 0?d:[]){for(const[h,m]of Object.entries(p))h!=="inlineData"&&(m!==null||m!==void 0)&&f.push(h);p.inlineData&&typeof p.inlineData.data=="string"&&(c+=atob(p.inlineData.data))}return f.length>0&&console.warn(`there are non-data parts ${f} in the response, returning concatenation of all data parts. Please refer to the non data parts for a full response from model.`),c.length>0?btoa(c):void 0}get functionCalls(){var t,n,i,o,r,s,u,d;if(((o=(i=(n=(t=this.candidates)===null||t===void 0?void 0:t[0])===null||n===void 0?void 0:n.content)===null||i===void 0?void 0:i.parts)===null||o===void 0?void 0:o.length)===0)return;this.candidates&&this.candidates.length>1&&console.warn("there are multiple candidates in the response, returning function calls from the first one.");const c=(d=(u=(s=(r=this.candidates)===null||r===void 0?void 0:r[0])===null||s===void 0?void 0:s.content)===null||u===void 0?void 0:u.parts)===null||d===void 0?void 0:d.filter(f=>f.functionCall).map(f=>f.functionCall).filter(f=>f!==void 0);if((c==null?void 0:c.length)!==0)return c}get executableCode(){var t,n,i,o,r,s,u,d,c;if(((o=(i=(n=(t=this.candidates)===null||t===void 0?void 0:t[0])===null||n===void 0?void 0:n.content)===null||i===void 0?void 0:i.parts)===null||o===void 0?void 0:o.length)===0)return;this.candidates&&this.candidates.length>1&&console.warn("there are multiple candidates in the response, returning executable code from the first one.");const f=(d=(u=(s=(r=this.candidates)===null||r===void 0?void 0:r[0])===null||s===void 0?void 0:s.content)===null||u===void 0?void 0:u.parts)===null||d===void 0?void 0:d.filter(p=>p.executableCode).map(p=>p.executableCode).filter(p=>p!==void 0);if((f==null?void 0:f.length)!==0)return(c=f==null?void 0:f[0])===null||c===void 0?void 0:c.code}get codeExecutionResult(){var t,n,i,o,r,s,u,d,c;if(((o=(i=(n=(t=this.candidates)===null||t===void 0?void 0:t[0])===null||n===void 0?void 0:n.content)===null||i===void 0?void 0:i.parts)===null||o===void 0?void 0:o.length)===0)return;this.candidates&&this.candidates.length>1&&console.warn("there are multiple candidates in the response, returning code execution result from the first one.");const f=(d=(u=(s=(r=this.candidates)===null||r===void 0?void 0:r[0])===null||s===void 0?void 0:s.content)===null||u===void 0?void 0:u.parts)===null||d===void 0?void 0:d.filter(p=>p.codeExecutionResult).map(p=>p.codeExecutionResult).filter(p=>p!==void 0);if((f==null?void 0:f.length)!==0)return(c=f==null?void 0:f[0])===null||c===void 0?void 0:c.output}}class er{}class tr{}class mf{}class gf{}class yf{}class vf{}class nr{}class ir{}class or{}class Tf{}class Vt{_fromAPIResponse({apiResponse:t,_isVertexAI:n}){const i=new Vt;let o;const r=t;return n?o=nf(r):o=tf(r),Object.assign(i,o),i}}class rr{}class sr{}class lr{}class ar{}class Ef{}class Sf{}class _f{}class ii{_fromAPIResponse({apiResponse:t,_isVertexAI:n}){const i=new ii,r=cf(t);return Object.assign(i,r),i}}class Cf{}class If{}class Af{}class xf{}class ur{}class wf{get text(){var t,n,i;let o="",r=!1;const s=[];for(const u of(i=(n=(t=this.serverContent)===null||t===void 0?void 0:t.modelTurn)===null||n===void 0?void 0:n.parts)!==null&&i!==void 0?i:[]){for(const[d,c]of Object.entries(u))d!=="text"&&d!=="thought"&&c!==null&&s.push(d);if(typeof u.text=="string"){if(typeof u.thought=="boolean"&&u.thought)continue;r=!0,o+=u.text}}return s.length>0&&console.warn(`there are non-text parts ${s} in the response, returning concatenation of all text parts. Please refer to the non text parts for a full response from model.`),r?o:void 0}get data(){var t,n,i;let o="";const r=[];for(const s of(i=(n=(t=this.serverContent)===null||t===void 0?void 0:t.modelTurn)===null||n===void 0?void 0:n.parts)!==null&&i!==void 0?i:[]){for(const[u,d]of Object.entries(s))u!=="inlineData"&&d!==null&&r.push(u);s.inlineData&&typeof s.inlineData.data=="string"&&(o+=atob(s.inlineData.data))}return r.length>0&&console.warn(`there are non-data parts ${r} in the response, returning concatenation of all data parts. Please refer to the non data parts for a full response from model.`),o.length>0?btoa(o):void 0}}class Rf{get audioChunk(){if(this.serverContent&&this.serverContent.audioChunks&&this.serverContent.audioChunks.length>0)return this.serverContent.audioChunks[0]}}class oi{_fromAPIResponse({apiResponse:t,_isVertexAI:n}){const i=new oi,r=gs(t);return Object.assign(i,r),i}}/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */function $(e,t){if(!t||typeof t!="string")throw new Error("model is required and must be a string");if(t.includes("..")||t.includes("?")||t.includes("&"))throw new Error("invalid model parameter");if(e.isVertexAI()){if(t.startsWith("publishers/")||t.startsWith("projects/")||t.startsWith("models/"))return t;if(t.indexOf("/")>=0){const n=t.split("/",2);return`publishers/${n[0]}/models/${n[1]}`}else return`publishers/google/models/${t}`}else return t.startsWith("models/")||t.startsWith("tunedModels/")?t:`models/${t}`}function ys(e,t){const n=$(e,t);return n?n.startsWith("publishers/")&&e.isVertexAI()?`projects/${e.getProject()}/locations/${e.getLocation()}/${n}`:n.startsWith("models/")&&e.isVertexAI()?`projects/${e.getProject()}/locations/${e.getLocation()}/publishers/google/${n}`:n:""}function vs(e){return Array.isArray(e)?e.map(t=>Gt(t)):[Gt(e)]}function Gt(e){if(typeof e=="object"&&e!==null)return e;throw new Error(`Could not parse input as Blob. Unsupported blob type: ${typeof e}`)}function Ts(e){const t=Gt(e);if(t.mimeType&&t.mimeType.startsWith("image/"))return t;throw new Error(`Unsupported mime type: ${t.mimeType}`)}function Es(e){const t=Gt(e);if(t.mimeType&&t.mimeType.startsWith("audio/"))return t;throw new Error(`Unsupported mime type: ${t.mimeType}`)}function cr(e){if(e==null)throw new Error("PartUnion is required");if(typeof e=="object")return e;if(typeof e=="string")return{text:e};throw new Error(`Unsupported part type: ${typeof e}`)}function Ss(e){if(e==null||Array.isArray(e)&&e.length===0)throw new Error("PartListUnion is required");return Array.isArray(e)?e.map(t=>cr(t)):[cr(e)]}function Mn(e){return e!=null&&typeof e=="object"&&"parts"in e&&Array.isArray(e.parts)}function dr(e){return e!=null&&typeof e=="object"&&"functionCall"in e}function fr(e){return e!=null&&typeof e=="object"&&"functionResponse"in e}function ie(e){if(e==null)throw new Error("ContentUnion is required");return Mn(e)?e:{role:"user",parts:Ss(e)}}function ri(e,t){if(!t)return[];if(e.isVertexAI()&&Array.isArray(t))return t.flatMap(n=>{const i=ie(n);return i.parts&&i.parts.length>0&&i.parts[0].text!==void 0?[i.parts[0].text]:[]});if(e.isVertexAI()){const n=ie(t);return n.parts&&n.parts.length>0&&n.parts[0].text!==void 0?[n.parts[0].text]:[]}return Array.isArray(t)?t.map(n=>ie(n)):[ie(t)]}function me(e){if(e==null||Array.isArray(e)&&e.length===0)throw new Error("contents are required");if(!Array.isArray(e)){if(dr(e)||fr(e))throw new Error("To specify functionCall or functionResponse parts, please wrap them in a Content object, specifying the role for them");return[ie(e)]}const t=[],n=[],i=Mn(e[0]);for(const o of e){const r=Mn(o);if(r!=i)throw new Error("Mixing Content and Parts is not supported, please group the parts into a the appropriate Content objects and specify the roles for them");if(r)t.push(o);else{if(dr(o)||fr(o))throw new Error("To specify functionCall or functionResponse parts, please wrap them, and any other parts, in Content objects as appropriate, specifying the role for them");n.push(o)}}return i||t.push({role:"user",parts:Ss(n)}),t}function Pf(e,t){e.includes("null")&&(t.nullable=!0);const n=e.filter(i=>i!=="null");if(n.length===1)t.type=Object.values(be).includes(n[0].toUpperCase())?n[0].toUpperCase():be.TYPE_UNSPECIFIED;else{t.anyOf=[];for(const i of n)t.anyOf.push({type:Object.values(be).includes(i.toUpperCase())?i.toUpperCase():be.TYPE_UNSPECIFIED})}}function je(e){const t={},n=["items"],i=["anyOf"],o=["properties"];if(e.type&&e.anyOf)throw new Error("type and anyOf cannot be both populated.");const r=e.anyOf;r!=null&&r.length==2&&(r[0].type==="null"?(t.nullable=!0,e=r[1]):r[1].type==="null"&&(t.nullable=!0,e=r[0])),e.type instanceof Array&&Pf(e.type,t);for(const[s,u]of Object.entries(e))if(u!=null)if(s=="type"){if(u==="null")throw new Error("type: null can not be the only possible type for the field.");if(u instanceof Array)continue;t.type=Object.values(be).includes(u.toUpperCase())?u.toUpperCase():be.TYPE_UNSPECIFIED}else if(n.includes(s))t[s]=je(u);else if(i.includes(s)){const d=[];for(const c of u){if(c.type=="null"){t.nullable=!0;continue}d.push(je(c))}t[s]=d}else if(o.includes(s)){const d={};for(const[c,f]of Object.entries(u))d[c]=je(f);t[s]=d}else{if(s==="additionalProperties")continue;t[s]=u}return t}function si(e){return je(e)}function li(e){if(typeof e=="object")return e;if(typeof e=="string")return{voiceConfig:{prebuiltVoiceConfig:{voiceName:e}}};throw new Error(`Unsupported speechConfig type: ${typeof e}`)}function ai(e){if("multiSpeakerVoiceConfig"in e)throw new Error("multiSpeakerVoiceConfig is not supported in the live API.");return e}function it(e){if(e.functionDeclarations)for(const t of e.functionDeclarations)t.parameters&&(Object.keys(t.parameters).includes("$schema")?t.parametersJsonSchema||(t.parametersJsonSchema=t.parameters,delete t.parameters):t.parameters=je(t.parameters)),t.response&&(Object.keys(t.response).includes("$schema")?t.responseJsonSchema||(t.responseJsonSchema=t.response,delete t.response):t.response=je(t.response));return e}function ot(e){if(e==null)throw new Error("tools is required");if(!Array.isArray(e))throw new Error("tools is required and must be an array of Tools");const t=[];for(const n of e)t.push(n);return t}function kf(e,t,n,i=1){const o=!t.startsWith(`${n}/`)&&t.split("/").length===i;return e.isVertexAI()?t.startsWith("projects/")?t:t.startsWith("locations/")?`projects/${e.getProject()}/${t}`:t.startsWith(`${n}/`)?`projects/${e.getProject()}/locations/${e.getLocation()}/${t}`:o?`projects/${e.getProject()}/locations/${e.getLocation()}/${n}/${t}`:t:o?`${n}/${t}`:t}function Me(e,t){if(typeof t!="string")throw new Error("name must be a string");return kf(e,t,"cachedContents")}function _s(e){switch(e){case"STATE_UNSPECIFIED":return"JOB_STATE_UNSPECIFIED";case"CREATING":return"JOB_STATE_RUNNING";case"ACTIVE":return"JOB_STATE_SUCCEEDED";case"FAILED":return"JOB_STATE_FAILED";default:return e}}function Ue(e){return ni(e)}function Mf(e){return e!=null&&typeof e=="object"&&"name"in e}function Nf(e){return e!=null&&typeof e=="object"&&"video"in e}function Df(e){return e!=null&&typeof e=="object"&&"uri"in e}function Cs(e){var t;let n;if(Mf(e)&&(n=e.name),!(Df(e)&&(n=e.uri,n===void 0))&&!(Nf(e)&&(n=(t=e.video)===null||t===void 0?void 0:t.uri,n===void 0))){if(typeof e=="string"&&(n=e),n===void 0)throw new Error("Could not extract file name from the provided input.");if(n.startsWith("https://")){const o=n.split("files/")[1].match(/[a-z0-9]+/);if(o===null)throw new Error(`Could not extract file name from URI ${n}`);n=o[0]}else n.startsWith("files/")&&(n=n.split("files/")[1]);return n}}function Is(e,t){let n;return e.isVertexAI()?n=t?"publishers/google/models":"models":n=t?"models":"tunedModels",n}function As(e){for(const t of["models","tunedModels","publisherModels"])if(bf(e,t))return e[t];return[]}function bf(e,t){return e!==null&&typeof e=="object"&&t in e}function Lf(e,t={}){const n=e,i={name:n.name,description:n.description,parametersJsonSchema:n.inputSchema};return n.outputSchema&&(i.responseJsonSchema=n.outputSchema),t.behavior&&(i.behavior=t.behavior),{functionDeclarations:[i]}}function Uf(e,t={}){const n=[],i=new Set;for(const o of e){const r=o.name;if(i.has(r))throw new Error(`Duplicate function name ${r} found in MCP tools. Please ensure function names are unique.`);i.add(r);const s=Lf(o,t);s.functionDeclarations&&n.push(...s.functionDeclarations)}return{functionDeclarations:n}}function xs(e,t){let n;if(typeof t=="string")if(e.isVertexAI())if(t.startsWith("gs://"))n={format:"jsonl",gcsUri:[t]};else if(t.startsWith("bq://"))n={format:"bigquery",bigqueryUri:t};else throw new Error(`Unsupported string source for Vertex AI: ${t}`);else if(t.startsWith("files/"))n={fileName:t};else throw new Error(`Unsupported string source for Gemini API: ${t}`);else if(Array.isArray(t)){if(e.isVertexAI())throw new Error("InlinedRequest[] is not supported in Vertex AI.");n={inlinedRequests:t}}else n=t;const i=[n.gcsUri,n.bigqueryUri].filter(Boolean).length,o=[n.inlinedRequests,n.fileName].filter(Boolean).length;if(e.isVertexAI()){if(o>0||i!==1)throw new Error("Exactly one of `gcsUri` or `bigqueryUri` must be set for Vertex AI.")}else if(i>0||o!==1)throw new Error("Exactly one of `inlinedRequests`, `fileName`, must be set for Gemini API.");return n}function Ff(e){if(typeof e!="string")return e;const t=e;if(t.startsWith("gs://"))return{format:"jsonl",gcsUri:t};if(t.startsWith("bq://"))return{format:"bigquery",bigqueryUri:t};throw new Error(`Unsupported destination: ${t}`)}function ws(e){if(typeof e!="object"||e===null)return{};const t=e,n=t.inlinedResponses;if(typeof n!="object"||n===null)return e;const o=n.inlinedResponses;if(!Array.isArray(o)||o.length===0)return e;let r=!1;for(const s of o){if(typeof s!="object"||s===null)continue;const d=s.response;if(typeof d!="object"||d===null)continue;if(d.embedding!==void 0){r=!0;break}}return r&&(t.inlinedEmbedContentResponses=t.inlinedResponses,delete t.inlinedResponses),e}function rt(e,t){const n=t;if(!e.isVertexAI()){if(/batches\/[^/]+$/.test(n))return n.split("/").pop();throw new Error(`Invalid batch job name: ${n}.`)}if(/^projects\/[^/]+\/locations\/[^/]+\/batchPredictionJobs\/[^/]+$/.test(n))return n.split("/").pop();if(/^\d+$/.test(n))return n;throw new Error(`Invalid batch job name: ${n}.`)}function Rs(e){const t=e;return t==="BATCH_STATE_UNSPECIFIED"?"JOB_STATE_UNSPECIFIED":t==="BATCH_STATE_PENDING"?"JOB_STATE_PENDING":t==="BATCH_STATE_RUNNING"?"JOB_STATE_RUNNING":t==="BATCH_STATE_SUCCEEDED"?"JOB_STATE_SUCCEEDED":t==="BATCH_STATE_FAILED"?"JOB_STATE_FAILED":t==="BATCH_STATE_CANCELLED"?"JOB_STATE_CANCELLED":t==="BATCH_STATE_EXPIRED"?"JOB_STATE_EXPIRED":t}/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */function Vf(e){const t={},n=l(e,["responsesFile"]);n!=null&&a(t,["fileName"],n);const i=l(e,["inlinedResponses","inlinedResponses"]);if(i!=null){let r=i;Array.isArray(r)&&(r=r.map(s=>vp(s))),a(t,["inlinedResponses"],r)}const o=l(e,["inlinedEmbedContentResponses","inlinedResponses"]);if(o!=null){let r=o;Array.isArray(r)&&(r=r.map(s=>s)),a(t,["inlinedEmbedContentResponses"],r)}return t}function Gf(e){const t={},n=l(e,["predictionsFormat"]);n!=null&&a(t,["format"],n);const i=l(e,["gcsDestination","outputUriPrefix"]);i!=null&&a(t,["gcsUri"],i);const o=l(e,["bigqueryDestination","outputUri"]);return o!=null&&a(t,["bigqueryUri"],o),t}function Hf(e){const t={},n=l(e,["format"]);n!=null&&a(t,["predictionsFormat"],n);const i=l(e,["gcsUri"]);i!=null&&a(t,["gcsDestination","outputUriPrefix"],i);const o=l(e,["bigqueryUri"]);if(o!=null&&a(t,["bigqueryDestination","outputUri"],o),l(e,["fileName"])!==void 0)throw new Error("fileName parameter is not supported in Vertex AI.");if(l(e,["inlinedResponses"])!==void 0)throw new Error("inlinedResponses parameter is not supported in Vertex AI.");if(l(e,["inlinedEmbedContentResponses"])!==void 0)throw new Error("inlinedEmbedContentResponses parameter is not supported in Vertex AI.");return t}function Dt(e){const t={},n=l(e,["name"]);n!=null&&a(t,["name"],n);const i=l(e,["metadata","displayName"]);i!=null&&a(t,["displayName"],i);const o=l(e,["metadata","state"]);o!=null&&a(t,["state"],Rs(o));const r=l(e,["metadata","createTime"]);r!=null&&a(t,["createTime"],r);const s=l(e,["metadata","endTime"]);s!=null&&a(t,["endTime"],s);const u=l(e,["metadata","updateTime"]);u!=null&&a(t,["updateTime"],u);const d=l(e,["metadata","model"]);d!=null&&a(t,["model"],d);const c=l(e,["metadata","output"]);return c!=null&&a(t,["dest"],Vf(ws(c))),t}function Nn(e){const t={},n=l(e,["name"]);n!=null&&a(t,["name"],n);const i=l(e,["displayName"]);i!=null&&a(t,["displayName"],i);const o=l(e,["state"]);o!=null&&a(t,["state"],Rs(o));const r=l(e,["error"]);r!=null&&a(t,["error"],r);const s=l(e,["createTime"]);s!=null&&a(t,["createTime"],s);const u=l(e,["startTime"]);u!=null&&a(t,["startTime"],u);const d=l(e,["endTime"]);d!=null&&a(t,["endTime"],d);const c=l(e,["updateTime"]);c!=null&&a(t,["updateTime"],c);const f=l(e,["model"]);f!=null&&a(t,["model"],f);const p=l(e,["inputConfig"]);p!=null&&a(t,["src"],Bf(p));const h=l(e,["outputConfig"]);h!=null&&a(t,["dest"],Gf(ws(h)));const m=l(e,["completionStats"]);return m!=null&&a(t,["completionStats"],m),t}function Bf(e){const t={},n=l(e,["instancesFormat"]);n!=null&&a(t,["format"],n);const i=l(e,["gcsSource","uris"]);i!=null&&a(t,["gcsUri"],i);const o=l(e,["bigquerySource","inputUri"]);return o!=null&&a(t,["bigqueryUri"],o),t}function qf(e,t){const n={};if(l(t,["format"])!==void 0)throw new Error("format parameter is not supported in Gemini API.");if(l(t,["gcsUri"])!==void 0)throw new Error("gcsUri parameter is not supported in Gemini API.");if(l(t,["bigqueryUri"])!==void 0)throw new Error("bigqueryUri parameter is not supported in Gemini API.");const i=l(t,["fileName"]);i!=null&&a(n,["fileName"],i);const o=l(t,["inlinedRequests"]);if(o!=null){let r=o;Array.isArray(r)&&(r=r.map(s=>yp(e,s))),a(n,["requests","requests"],r)}return n}function Of(e){const t={},n=l(e,["format"]);n!=null&&a(t,["instancesFormat"],n);const i=l(e,["gcsUri"]);i!=null&&a(t,["gcsSource","uris"],i);const o=l(e,["bigqueryUri"]);if(o!=null&&a(t,["bigquerySource","inputUri"],o),l(e,["fileName"])!==void 0)throw new Error("fileName parameter is not supported in Vertex AI.");if(l(e,["inlinedRequests"])!==void 0)throw new Error("inlinedRequests parameter is not supported in Vertex AI.");return t}function zf(e){const t={},n=l(e,["data"]);if(n!=null&&a(t,["data"],n),l(e,["displayName"])!==void 0)throw new Error("displayName parameter is not supported in Gemini API.");const i=l(e,["mimeType"]);return i!=null&&a(t,["mimeType"],i),t}function Jf(e,t){const n={},i=l(t,["name"]);return i!=null&&a(n,["_url","name"],rt(e,i)),n}function $f(e,t){const n={},i=l(t,["name"]);return i!=null&&a(n,["_url","name"],rt(e,i)),n}function Wf(e){const t={},n=l(e,["content"]);n!=null&&a(t,["content"],n);const i=l(e,["citationMetadata"]);i!=null&&a(t,["citationMetadata"],Yf(i));const o=l(e,["tokenCount"]);o!=null&&a(t,["tokenCount"],o);const r=l(e,["finishReason"]);r!=null&&a(t,["finishReason"],r);const s=l(e,["avgLogprobs"]);s!=null&&a(t,["avgLogprobs"],s);const u=l(e,["groundingMetadata"]);u!=null&&a(t,["groundingMetadata"],u);const d=l(e,["index"]);d!=null&&a(t,["index"],d);const c=l(e,["logprobsResult"]);c!=null&&a(t,["logprobsResult"],c);const f=l(e,["safetyRatings"]);if(f!=null){let h=f;Array.isArray(h)&&(h=h.map(m=>m)),a(t,["safetyRatings"],h)}const p=l(e,["urlContextMetadata"]);return p!=null&&a(t,["urlContextMetadata"],p),t}function Yf(e){const t={},n=l(e,["citationSources"]);if(n!=null){let i=n;Array.isArray(i)&&(i=i.map(o=>o)),a(t,["citations"],i)}return t}function Ps(e){const t={},n=l(e,["parts"]);if(n!=null){let o=n;Array.isArray(o)&&(o=o.map(r=>Ap(r))),a(t,["parts"],o)}const i=l(e,["role"]);return i!=null&&a(t,["role"],i),t}function Kf(e,t){const n={},i=l(e,["displayName"]);if(t!==void 0&&i!=null&&a(t,["batch","displayName"],i),l(e,["dest"])!==void 0)throw new Error("dest parameter is not supported in Gemini API.");return n}function Xf(e,t){const n={},i=l(e,["displayName"]);t!==void 0&&i!=null&&a(t,["displayName"],i);const o=l(e,["dest"]);return t!==void 0&&o!=null&&a(t,["outputConfig"],Hf(Ff(o))),n}function pr(e,t){const n={},i=l(t,["model"]);i!=null&&a(n,["_url","model"],$(e,i));const o=l(t,["src"]);o!=null&&a(n,["batch","inputConfig"],qf(e,xs(e,o)));const r=l(t,["config"]);return r!=null&&Kf(r,n),n}function Qf(e,t){const n={},i=l(t,["model"]);i!=null&&a(n,["model"],$(e,i));const o=l(t,["src"]);o!=null&&a(n,["inputConfig"],Of(xs(e,o)));const r=l(t,["config"]);return r!=null&&Xf(r,n),n}function Zf(e,t){const n={},i=l(e,["displayName"]);return t!==void 0&&i!=null&&a(t,["batch","displayName"],i),n}function jf(e,t){const n={},i=l(t,["model"]);i!=null&&a(n,["_url","model"],$(e,i));const o=l(t,["src"]);o!=null&&a(n,["batch","inputConfig"],sp(e,o));const r=l(t,["config"]);return r!=null&&Zf(r,n),n}function ep(e,t){const n={},i=l(t,["name"]);return i!=null&&a(n,["_url","name"],rt(e,i)),n}function tp(e,t){const n={},i=l(t,["name"]);return i!=null&&a(n,["_url","name"],rt(e,i)),n}function np(e){const t={},n=l(e,["sdkHttpResponse"]);n!=null&&a(t,["sdkHttpResponse"],n);const i=l(e,["name"]);i!=null&&a(t,["name"],i);const o=l(e,["done"]);o!=null&&a(t,["done"],o);const r=l(e,["error"]);return r!=null&&a(t,["error"],r),t}function ip(e){const t={},n=l(e,["sdkHttpResponse"]);n!=null&&a(t,["sdkHttpResponse"],n);const i=l(e,["name"]);i!=null&&a(t,["name"],i);const o=l(e,["done"]);o!=null&&a(t,["done"],o);const r=l(e,["error"]);return r!=null&&a(t,["error"],r),t}function op(e,t){const n={},i=l(t,["contents"]);if(i!=null){let r=ri(e,i);Array.isArray(r)&&(r=r.map(s=>s)),a(n,["requests[]","request","content"],r)}const o=l(t,["config"]);return o!=null&&(a(n,["_self"],rp(o,n)),jd(n,{"requests[].*":"requests[].request.*"})),n}function rp(e,t){const n={},i=l(e,["taskType"]);t!==void 0&&i!=null&&a(t,["requests[]","taskType"],i);const o=l(e,["title"]);t!==void 0&&o!=null&&a(t,["requests[]","title"],o);const r=l(e,["outputDimensionality"]);if(t!==void 0&&r!=null&&a(t,["requests[]","outputDimensionality"],r),l(e,["mimeType"])!==void 0)throw new Error("mimeType parameter is not supported in Gemini API.");if(l(e,["autoTruncate"])!==void 0)throw new Error("autoTruncate parameter is not supported in Gemini API.");return n}function sp(e,t){const n={},i=l(t,["fileName"]);i!=null&&a(n,["file_name"],i);const o=l(t,["inlinedRequests"]);return o!=null&&a(n,["requests"],op(e,o)),n}function lp(e){const t={};if(l(e,["displayName"])!==void 0)throw new Error("displayName parameter is not supported in Gemini API.");const n=l(e,["fileUri"]);n!=null&&a(t,["fileUri"],n);const i=l(e,["mimeType"]);return i!=null&&a(t,["mimeType"],i),t}function ap(e){const t={},n=l(e,["id"]);n!=null&&a(t,["id"],n);const i=l(e,["args"]);i!=null&&a(t,["args"],i);const o=l(e,["name"]);if(o!=null&&a(t,["name"],o),l(e,["partialArgs"])!==void 0)throw new Error("partialArgs parameter is not supported in Gemini API.");if(l(e,["willContinue"])!==void 0)throw new Error("willContinue parameter is not supported in Gemini API.");return t}function up(e){const t={},n=l(e,["allowedFunctionNames"]);n!=null&&a(t,["allowedFunctionNames"],n);const i=l(e,["mode"]);if(i!=null&&a(t,["mode"],i),l(e,["streamFunctionCallArguments"])!==void 0)throw new Error("streamFunctionCallArguments parameter is not supported in Gemini API.");return t}function cp(e,t,n){const i={},o=l(t,["systemInstruction"]);n!==void 0&&o!=null&&a(n,["systemInstruction"],Ps(ie(o)));const r=l(t,["temperature"]);r!=null&&a(i,["temperature"],r);const s=l(t,["topP"]);s!=null&&a(i,["topP"],s);const u=l(t,["topK"]);u!=null&&a(i,["topK"],u);const d=l(t,["candidateCount"]);d!=null&&a(i,["candidateCount"],d);const c=l(t,["maxOutputTokens"]);c!=null&&a(i,["maxOutputTokens"],c);const f=l(t,["stopSequences"]);f!=null&&a(i,["stopSequences"],f);const p=l(t,["responseLogprobs"]);p!=null&&a(i,["responseLogprobs"],p);const h=l(t,["logprobs"]);h!=null&&a(i,["logprobs"],h);const m=l(t,["presencePenalty"]);m!=null&&a(i,["presencePenalty"],m);const g=l(t,["frequencyPenalty"]);g!=null&&a(i,["frequencyPenalty"],g);const E=l(t,["seed"]);E!=null&&a(i,["seed"],E);const T=l(t,["responseMimeType"]);T!=null&&a(i,["responseMimeType"],T);const S=l(t,["responseSchema"]);S!=null&&a(i,["responseSchema"],si(S));const x=l(t,["responseJsonSchema"]);if(x!=null&&a(i,["responseJsonSchema"],x),l(t,["routingConfig"])!==void 0)throw new Error("routingConfig parameter is not supported in Gemini API.");if(l(t,["modelSelectionConfig"])!==void 0)throw new Error("modelSelectionConfig parameter is not supported in Gemini API.");const C=l(t,["safetySettings"]);if(n!==void 0&&C!=null){let q=C;Array.isArray(q)&&(q=q.map(U=>xp(U))),a(n,["safetySettings"],q)}const w=l(t,["tools"]);if(n!==void 0&&w!=null){let q=ot(w);Array.isArray(q)&&(q=q.map(U=>Rp(it(U)))),a(n,["tools"],q)}const I=l(t,["toolConfig"]);if(n!==void 0&&I!=null&&a(n,["toolConfig"],wp(I)),l(t,["labels"])!==void 0)throw new Error("labels parameter is not supported in Gemini API.");const _=l(t,["cachedContent"]);n!==void 0&&_!=null&&a(n,["cachedContent"],Me(e,_));const b=l(t,["responseModalities"]);b!=null&&a(i,["responseModalities"],b);const V=l(t,["mediaResolution"]);V!=null&&a(i,["mediaResolution"],V);const P=l(t,["speechConfig"]);if(P!=null&&a(i,["speechConfig"],li(P)),l(t,["audioTimestamp"])!==void 0)throw new Error("audioTimestamp parameter is not supported in Gemini API.");const F=l(t,["thinkingConfig"]);F!=null&&a(i,["thinkingConfig"],F);const D=l(t,["imageConfig"]);D!=null&&a(i,["imageConfig"],gp(D));const L=l(t,["enableEnhancedCivicAnswers"]);if(L!=null&&a(i,["enableEnhancedCivicAnswers"],L),l(t,["modelArmorConfig"])!==void 0)throw new Error("modelArmorConfig parameter is not supported in Gemini API.");return i}function dp(e){const t={},n=l(e,["sdkHttpResponse"]);n!=null&&a(t,["sdkHttpResponse"],n);const i=l(e,["candidates"]);if(i!=null){let d=i;Array.isArray(d)&&(d=d.map(c=>Wf(c))),a(t,["candidates"],d)}const o=l(e,["modelVersion"]);o!=null&&a(t,["modelVersion"],o);const r=l(e,["promptFeedback"]);r!=null&&a(t,["promptFeedback"],r);const s=l(e,["responseId"]);s!=null&&a(t,["responseId"],s);const u=l(e,["usageMetadata"]);return u!=null&&a(t,["usageMetadata"],u),t}function fp(e,t){const n={},i=l(t,["name"]);return i!=null&&a(n,["_url","name"],rt(e,i)),n}function pp(e,t){const n={},i=l(t,["name"]);return i!=null&&a(n,["_url","name"],rt(e,i)),n}function hp(e){const t={};if(l(e,["authConfig"])!==void 0)throw new Error("authConfig parameter is not supported in Gemini API.");const n=l(e,["enableWidget"]);return n!=null&&a(t,["enableWidget"],n),t}function mp(e){const t={};if(l(e,["excludeDomains"])!==void 0)throw new Error("excludeDomains parameter is not supported in Gemini API.");if(l(e,["blockingConfidence"])!==void 0)throw new Error("blockingConfidence parameter is not supported in Gemini API.");const n=l(e,["timeRangeFilter"]);return n!=null&&a(t,["timeRangeFilter"],n),t}function gp(e){const t={},n=l(e,["aspectRatio"]);n!=null&&a(t,["aspectRatio"],n);const i=l(e,["imageSize"]);if(i!=null&&a(t,["imageSize"],i),l(e,["personGeneration"])!==void 0)throw new Error("personGeneration parameter is not supported in Gemini API.");if(l(e,["outputMimeType"])!==void 0)throw new Error("outputMimeType parameter is not supported in Gemini API.");if(l(e,["outputCompressionQuality"])!==void 0)throw new Error("outputCompressionQuality parameter is not supported in Gemini API.");return t}function yp(e,t){const n={},i=l(t,["model"]);i!=null&&a(n,["request","model"],$(e,i));const o=l(t,["contents"]);if(o!=null){let u=me(o);Array.isArray(u)&&(u=u.map(d=>Ps(d))),a(n,["request","contents"],u)}const r=l(t,["metadata"]);r!=null&&a(n,["metadata"],r);const s=l(t,["config"]);return s!=null&&a(n,["request","generationConfig"],cp(e,s,l(n,["request"],{}))),n}function vp(e){const t={},n=l(e,["response"]);n!=null&&a(t,["response"],dp(n));const i=l(e,["metadata"]);i!=null&&a(t,["metadata"],i);const o=l(e,["error"]);return o!=null&&a(t,["error"],o),t}function Tp(e,t){const n={},i=l(e,["pageSize"]);t!==void 0&&i!=null&&a(t,["_query","pageSize"],i);const o=l(e,["pageToken"]);if(t!==void 0&&o!=null&&a(t,["_query","pageToken"],o),l(e,["filter"])!==void 0)throw new Error("filter parameter is not supported in Gemini API.");return n}function Ep(e,t){const n={},i=l(e,["pageSize"]);t!==void 0&&i!=null&&a(t,["_query","pageSize"],i);const o=l(e,["pageToken"]);t!==void 0&&o!=null&&a(t,["_query","pageToken"],o);const r=l(e,["filter"]);return t!==void 0&&r!=null&&a(t,["_query","filter"],r),n}function Sp(e){const t={},n=l(e,["config"]);return n!=null&&Tp(n,t),t}function _p(e){const t={},n=l(e,["config"]);return n!=null&&Ep(n,t),t}function Cp(e){const t={},n=l(e,["sdkHttpResponse"]);n!=null&&a(t,["sdkHttpResponse"],n);const i=l(e,["nextPageToken"]);i!=null&&a(t,["nextPageToken"],i);const o=l(e,["operations"]);if(o!=null){let r=o;Array.isArray(r)&&(r=r.map(s=>Dt(s))),a(t,["batchJobs"],r)}return t}function Ip(e){const t={},n=l(e,["sdkHttpResponse"]);n!=null&&a(t,["sdkHttpResponse"],n);const i=l(e,["nextPageToken"]);i!=null&&a(t,["nextPageToken"],i);const o=l(e,["batchPredictionJobs"]);if(o!=null){let r=o;Array.isArray(r)&&(r=r.map(s=>Nn(s))),a(t,["batchJobs"],r)}return t}function Ap(e){const t={},n=l(e,["mediaResolution"]);n!=null&&a(t,["mediaResolution"],n);const i=l(e,["codeExecutionResult"]);i!=null&&a(t,["codeExecutionResult"],i);const o=l(e,["executableCode"]);o!=null&&a(t,["executableCode"],o);const r=l(e,["fileData"]);r!=null&&a(t,["fileData"],lp(r));const s=l(e,["functionCall"]);s!=null&&a(t,["functionCall"],ap(s));const u=l(e,["functionResponse"]);u!=null&&a(t,["functionResponse"],u);const d=l(e,["inlineData"]);d!=null&&a(t,["inlineData"],zf(d));const c=l(e,["text"]);c!=null&&a(t,["text"],c);const f=l(e,["thought"]);f!=null&&a(t,["thought"],f);const p=l(e,["thoughtSignature"]);p!=null&&a(t,["thoughtSignature"],p);const h=l(e,["videoMetadata"]);return h!=null&&a(t,["videoMetadata"],h),t}function xp(e){const t={},n=l(e,["category"]);if(n!=null&&a(t,["category"],n),l(e,["method"])!==void 0)throw new Error("method parameter is not supported in Gemini API.");const i=l(e,["threshold"]);return i!=null&&a(t,["threshold"],i),t}function wp(e){const t={},n=l(e,["retrievalConfig"]);n!=null&&a(t,["retrievalConfig"],n);const i=l(e,["functionCallingConfig"]);return i!=null&&a(t,["functionCallingConfig"],up(i)),t}function Rp(e){const t={};if(l(e,["retrieval"])!==void 0)throw new Error("retrieval parameter is not supported in Gemini API.");const n=l(e,["computerUse"]);n!=null&&a(t,["computerUse"],n);const i=l(e,["fileSearch"]);i!=null&&a(t,["fileSearch"],i);const o=l(e,["codeExecution"]);if(o!=null&&a(t,["codeExecution"],o),l(e,["enterpriseWebSearch"])!==void 0)throw new Error("enterpriseWebSearch parameter is not supported in Gemini API.");const r=l(e,["functionDeclarations"]);if(r!=null){let f=r;Array.isArray(f)&&(f=f.map(p=>p)),a(t,["functionDeclarations"],f)}const s=l(e,["googleMaps"]);s!=null&&a(t,["googleMaps"],hp(s));const u=l(e,["googleSearch"]);u!=null&&a(t,["googleSearch"],mp(u));const d=l(e,["googleSearchRetrieval"]);d!=null&&a(t,["googleSearchRetrieval"],d);const c=l(e,["urlContext"]);return c!=null&&a(t,["urlContext"],c),t}/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */var Pe;(function(e){e.PAGED_ITEM_BATCH_JOBS="batchJobs",e.PAGED_ITEM_MODELS="models",e.PAGED_ITEM_TUNING_JOBS="tuningJobs",e.PAGED_ITEM_FILES="files",e.PAGED_ITEM_CACHED_CONTENTS="cachedContents",e.PAGED_ITEM_FILE_SEARCH_STORES="fileSearchStores",e.PAGED_ITEM_DOCUMENTS="documents"})(Pe||(Pe={}));class qe{constructor(t,n,i,o){this.pageInternal=[],this.paramsInternal={},this.requestInternal=n,this.init(t,i,o)}init(t,n,i){var o,r;this.nameInternal=t,this.pageInternal=n[this.nameInternal]||[],this.sdkHttpResponseInternal=n==null?void 0:n.sdkHttpResponse,this.idxInternal=0;let s={config:{}};!i||Object.keys(i).length===0?s={config:{}}:typeof i=="object"?s=Object.assign({},i):s=i,s.config&&(s.config.pageToken=n.nextPageToken),this.paramsInternal=s,this.pageInternalSize=(r=(o=s.config)===null||o===void 0?void 0:o.pageSize)!==null&&r!==void 0?r:this.pageInternal.length}initNextPage(t){this.init(this.nameInternal,t,this.paramsInternal)}get page(){return this.pageInternal}get name(){return this.nameInternal}get pageSize(){return this.pageInternalSize}get sdkHttpResponse(){return this.sdkHttpResponseInternal}get params(){return this.paramsInternal}get pageLength(){return this.pageInternal.length}getItem(t){return this.pageInternal[t]}[Symbol.asyncIterator](){return{next:async()=>{if(this.idxInternal>=this.pageLength)if(this.hasNextPage())await this.nextPage();else return{value:void 0,done:!0};const t=this.getItem(this.idxInternal);return this.idxInternal+=1,{value:t,done:!1}},return:async()=>({value:void 0,done:!0})}}async nextPage(){if(!this.hasNextPage())throw new Error("No more pages to fetch.");const t=await this.requestInternal(this.params);return this.initNextPage(t),this.page}hasNextPage(){var t;return((t=this.params.config)===null||t===void 0?void 0:t.pageToken)!==void 0}}/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */class Pp extends ke{constructor(t){super(),this.apiClient=t,this.list=async(n={})=>new qe(Pe.PAGED_ITEM_BATCH_JOBS,i=>this.listInternal(i),await this.listInternal(n),n),this.create=async n=>(this.apiClient.isVertexAI()&&(n.config=this.formatDestination(n.src,n.config)),this.createInternal(n)),this.createEmbeddings=async n=>{if(console.warn("batches.createEmbeddings() is experimental and may change without notice."),this.apiClient.isVertexAI())throw new Error("Vertex AI does not support batches.createEmbeddings.");return this.createEmbeddingsInternal(n)}}createInlinedGenerateContentRequest(t){const n=pr(this.apiClient,t),i=n._url,o=N("{model}:batchGenerateContent",i),u=n.batch.inputConfig.requests,d=u.requests,c=[];for(const f of d){const p=Object.assign({},f);if(p.systemInstruction){const h=p.systemInstruction;delete p.systemInstruction;const m=p.request;m.systemInstruction=h,p.request=m}c.push(p)}return u.requests=c,delete n.config,delete n._url,delete n._query,{path:o,body:n}}getGcsUri(t){if(typeof t=="string")return t.startsWith("gs://")?t:void 0;if(!Array.isArray(t)&&t.gcsUri&&t.gcsUri.length>0)return t.gcsUri[0]}getBigqueryUri(t){if(typeof t=="string")return t.startsWith("bq://")?t:void 0;if(!Array.isArray(t))return t.bigqueryUri}formatDestination(t,n){const i=n?Object.assign({},n):{},o=Date.now().toString();if(i.displayName||(i.displayName=`genaiBatchJob_${o}`),i.dest===void 0){const r=this.getGcsUri(t),s=this.getBigqueryUri(t);if(r)r.endsWith(".jsonl")?i.dest=`${r.slice(0,-6)}/dest`:i.dest=`${r}_dest_${o}`;else if(s)i.dest=`${s}_dest_${o}`;else throw new Error("Unsupported source for Vertex AI: No GCS or BigQuery URI found.")}return i}async createInternal(t){var n,i,o,r;let s,u="",d={};if(this.apiClient.isVertexAI()){const c=Qf(this.apiClient,t);return u=N("batchPredictionJobs",c._url),d=c._query,delete c._url,delete c._query,s=this.apiClient.request({path:u,queryParams:d,body:JSON.stringify(c),httpMethod:"POST",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(i=t.config)===null||i===void 0?void 0:i.abortSignal}).then(f=>f.json()),s.then(f=>Nn(f))}else{const c=pr(this.apiClient,t);return u=N("{model}:batchGenerateContent",c._url),d=c._query,delete c._url,delete c._query,s=this.apiClient.request({path:u,queryParams:d,body:JSON.stringify(c),httpMethod:"POST",httpOptions:(o=t.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(r=t.config)===null||r===void 0?void 0:r.abortSignal}).then(f=>f.json()),s.then(f=>Dt(f))}}async createEmbeddingsInternal(t){var n,i;let o,r="",s={};if(this.apiClient.isVertexAI())throw new Error("This method is only supported by the Gemini Developer API.");{const u=jf(this.apiClient,t);return r=N("{model}:asyncBatchEmbedContent",u._url),s=u._query,delete u._url,delete u._query,o=this.apiClient.request({path:r,queryParams:s,body:JSON.stringify(u),httpMethod:"POST",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(i=t.config)===null||i===void 0?void 0:i.abortSignal}).then(d=>d.json()),o.then(d=>Dt(d))}}async get(t){var n,i,o,r;let s,u="",d={};if(this.apiClient.isVertexAI()){const c=pp(this.apiClient,t);return u=N("batchPredictionJobs/{name}",c._url),d=c._query,delete c._url,delete c._query,s=this.apiClient.request({path:u,queryParams:d,body:JSON.stringify(c),httpMethod:"GET",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(i=t.config)===null||i===void 0?void 0:i.abortSignal}).then(f=>f.json()),s.then(f=>Nn(f))}else{const c=fp(this.apiClient,t);return u=N("batches/{name}",c._url),d=c._query,delete c._url,delete c._query,s=this.apiClient.request({path:u,queryParams:d,body:JSON.stringify(c),httpMethod:"GET",httpOptions:(o=t.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(r=t.config)===null||r===void 0?void 0:r.abortSignal}).then(f=>f.json()),s.then(f=>Dt(f))}}async cancel(t){var n,i,o,r;let s="",u={};if(this.apiClient.isVertexAI()){const d=$f(this.apiClient,t);s=N("batchPredictionJobs/{name}:cancel",d._url),u=d._query,delete d._url,delete d._query,await this.apiClient.request({path:s,queryParams:u,body:JSON.stringify(d),httpMethod:"POST",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(i=t.config)===null||i===void 0?void 0:i.abortSignal})}else{const d=Jf(this.apiClient,t);s=N("batches/{name}:cancel",d._url),u=d._query,delete d._url,delete d._query,await this.apiClient.request({path:s,queryParams:u,body:JSON.stringify(d),httpMethod:"POST",httpOptions:(o=t.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(r=t.config)===null||r===void 0?void 0:r.abortSignal})}}async listInternal(t){var n,i,o,r;let s,u="",d={};if(this.apiClient.isVertexAI()){const c=_p(t);return u=N("batchPredictionJobs",c._url),d=c._query,delete c._url,delete c._query,s=this.apiClient.request({path:u,queryParams:d,body:JSON.stringify(c),httpMethod:"GET",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(i=t.config)===null||i===void 0?void 0:i.abortSignal}).then(f=>f.json().then(p=>{const h=p;return h.sdkHttpResponse={headers:f.headers},h})),s.then(f=>{const p=Ip(f),h=new ur;return Object.assign(h,p),h})}else{const c=Sp(t);return u=N("batches",c._url),d=c._query,delete c._url,delete c._query,s=this.apiClient.request({path:u,queryParams:d,body:JSON.stringify(c),httpMethod:"GET",httpOptions:(o=t.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(r=t.config)===null||r===void 0?void 0:r.abortSignal}).then(f=>f.json().then(p=>{const h=p;return h.sdkHttpResponse={headers:f.headers},h})),s.then(f=>{const p=Cp(f),h=new ur;return Object.assign(h,p),h})}}async delete(t){var n,i,o,r;let s,u="",d={};if(this.apiClient.isVertexAI()){const c=tp(this.apiClient,t);return u=N("batchPredictionJobs/{name}",c._url),d=c._query,delete c._url,delete c._query,s=this.apiClient.request({path:u,queryParams:d,body:JSON.stringify(c),httpMethod:"DELETE",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(i=t.config)===null||i===void 0?void 0:i.abortSignal}).then(f=>f.json().then(p=>{const h=p;return h.sdkHttpResponse={headers:f.headers},h})),s.then(f=>ip(f))}else{const c=ep(this.apiClient,t);return u=N("batches/{name}",c._url),d=c._query,delete c._url,delete c._query,s=this.apiClient.request({path:u,queryParams:d,body:JSON.stringify(c),httpMethod:"DELETE",httpOptions:(o=t.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(r=t.config)===null||r===void 0?void 0:r.abortSignal}).then(f=>f.json().then(p=>{const h=p;return h.sdkHttpResponse={headers:f.headers},h})),s.then(f=>np(f))}}}/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */function kp(e){const t={},n=l(e,["data"]);if(n!=null&&a(t,["data"],n),l(e,["displayName"])!==void 0)throw new Error("displayName parameter is not supported in Gemini API.");const i=l(e,["mimeType"]);return i!=null&&a(t,["mimeType"],i),t}function hr(e){const t={},n=l(e,["parts"]);if(n!=null){let o=n;Array.isArray(o)&&(o=o.map(r=>jp(r))),a(t,["parts"],o)}const i=l(e,["role"]);return i!=null&&a(t,["role"],i),t}function Mp(e,t){const n={},i=l(e,["ttl"]);t!==void 0&&i!=null&&a(t,["ttl"],i);const o=l(e,["expireTime"]);t!==void 0&&o!=null&&a(t,["expireTime"],o);const r=l(e,["displayName"]);t!==void 0&&r!=null&&a(t,["displayName"],r);const s=l(e,["contents"]);if(t!==void 0&&s!=null){let f=me(s);Array.isArray(f)&&(f=f.map(p=>hr(p))),a(t,["contents"],f)}const u=l(e,["systemInstruction"]);t!==void 0&&u!=null&&a(t,["systemInstruction"],hr(ie(u)));const d=l(e,["tools"]);if(t!==void 0&&d!=null){let f=d;Array.isArray(f)&&(f=f.map(p=>th(p))),a(t,["tools"],f)}const c=l(e,["toolConfig"]);if(t!==void 0&&c!=null&&a(t,["toolConfig"],eh(c)),l(e,["kmsKeyName"])!==void 0)throw new Error("kmsKeyName parameter is not supported in Gemini API.");return n}function Np(e,t){const n={},i=l(e,["ttl"]);t!==void 0&&i!=null&&a(t,["ttl"],i);const o=l(e,["expireTime"]);t!==void 0&&o!=null&&a(t,["expireTime"],o);const r=l(e,["displayName"]);t!==void 0&&r!=null&&a(t,["displayName"],r);const s=l(e,["contents"]);if(t!==void 0&&s!=null){let p=me(s);Array.isArray(p)&&(p=p.map(h=>h)),a(t,["contents"],p)}const u=l(e,["systemInstruction"]);t!==void 0&&u!=null&&a(t,["systemInstruction"],ie(u));const d=l(e,["tools"]);if(t!==void 0&&d!=null){let p=d;Array.isArray(p)&&(p=p.map(h=>nh(h))),a(t,["tools"],p)}const c=l(e,["toolConfig"]);t!==void 0&&c!=null&&a(t,["toolConfig"],c);const f=l(e,["kmsKeyName"]);return t!==void 0&&f!=null&&a(t,["encryption_spec","kmsKeyName"],f),n}function Dp(e,t){const n={},i=l(t,["model"]);i!=null&&a(n,["model"],ys(e,i));const o=l(t,["config"]);return o!=null&&Mp(o,n),n}function bp(e,t){const n={},i=l(t,["model"]);i!=null&&a(n,["model"],ys(e,i));const o=l(t,["config"]);return o!=null&&Np(o,n),n}function Lp(e,t){const n={},i=l(t,["name"]);return i!=null&&a(n,["_url","name"],Me(e,i)),n}function Up(e,t){const n={},i=l(t,["name"]);return i!=null&&a(n,["_url","name"],Me(e,i)),n}function Fp(e){const t={},n=l(e,["sdkHttpResponse"]);return n!=null&&a(t,["sdkHttpResponse"],n),t}function Vp(e){const t={},n=l(e,["sdkHttpResponse"]);return n!=null&&a(t,["sdkHttpResponse"],n),t}function Gp(e){const t={};if(l(e,["displayName"])!==void 0)throw new Error("displayName parameter is not supported in Gemini API.");const n=l(e,["fileUri"]);n!=null&&a(t,["fileUri"],n);const i=l(e,["mimeType"]);return i!=null&&a(t,["mimeType"],i),t}function Hp(e){const t={},n=l(e,["id"]);n!=null&&a(t,["id"],n);const i=l(e,["args"]);i!=null&&a(t,["args"],i);const o=l(e,["name"]);if(o!=null&&a(t,["name"],o),l(e,["partialArgs"])!==void 0)throw new Error("partialArgs parameter is not supported in Gemini API.");if(l(e,["willContinue"])!==void 0)throw new Error("willContinue parameter is not supported in Gemini API.");return t}function Bp(e){const t={},n=l(e,["allowedFunctionNames"]);n!=null&&a(t,["allowedFunctionNames"],n);const i=l(e,["mode"]);if(i!=null&&a(t,["mode"],i),l(e,["streamFunctionCallArguments"])!==void 0)throw new Error("streamFunctionCallArguments parameter is not supported in Gemini API.");return t}function qp(e){const t={},n=l(e,["description"]);n!=null&&a(t,["description"],n);const i=l(e,["name"]);i!=null&&a(t,["name"],i);const o=l(e,["parameters"]);o!=null&&a(t,["parameters"],o);const r=l(e,["parametersJsonSchema"]);r!=null&&a(t,["parametersJsonSchema"],r);const s=l(e,["response"]);s!=null&&a(t,["response"],s);const u=l(e,["responseJsonSchema"]);if(u!=null&&a(t,["responseJsonSchema"],u),l(e,["behavior"])!==void 0)throw new Error("behavior parameter is not supported in Vertex AI.");return t}function Op(e,t){const n={},i=l(t,["name"]);return i!=null&&a(n,["_url","name"],Me(e,i)),n}function zp(e,t){const n={},i=l(t,["name"]);return i!=null&&a(n,["_url","name"],Me(e,i)),n}function Jp(e){const t={};if(l(e,["authConfig"])!==void 0)throw new Error("authConfig parameter is not supported in Gemini API.");const n=l(e,["enableWidget"]);return n!=null&&a(t,["enableWidget"],n),t}function $p(e){const t={};if(l(e,["excludeDomains"])!==void 0)throw new Error("excludeDomains parameter is not supported in Gemini API.");if(l(e,["blockingConfidence"])!==void 0)throw new Error("blockingConfidence parameter is not supported in Gemini API.");const n=l(e,["timeRangeFilter"]);return n!=null&&a(t,["timeRangeFilter"],n),t}function Wp(e,t){const n={},i=l(e,["pageSize"]);t!==void 0&&i!=null&&a(t,["_query","pageSize"],i);const o=l(e,["pageToken"]);return t!==void 0&&o!=null&&a(t,["_query","pageToken"],o),n}function Yp(e,t){const n={},i=l(e,["pageSize"]);t!==void 0&&i!=null&&a(t,["_query","pageSize"],i);const o=l(e,["pageToken"]);return t!==void 0&&o!=null&&a(t,["_query","pageToken"],o),n}function Kp(e){const t={},n=l(e,["config"]);return n!=null&&Wp(n,t),t}function Xp(e){const t={},n=l(e,["config"]);return n!=null&&Yp(n,t),t}function Qp(e){const t={},n=l(e,["sdkHttpResponse"]);n!=null&&a(t,["sdkHttpResponse"],n);const i=l(e,["nextPageToken"]);i!=null&&a(t,["nextPageToken"],i);const o=l(e,["cachedContents"]);if(o!=null){let r=o;Array.isArray(r)&&(r=r.map(s=>s)),a(t,["cachedContents"],r)}return t}function Zp(e){const t={},n=l(e,["sdkHttpResponse"]);n!=null&&a(t,["sdkHttpResponse"],n);const i=l(e,["nextPageToken"]);i!=null&&a(t,["nextPageToken"],i);const o=l(e,["cachedContents"]);if(o!=null){let r=o;Array.isArray(r)&&(r=r.map(s=>s)),a(t,["cachedContents"],r)}return t}function jp(e){const t={},n=l(e,["mediaResolution"]);n!=null&&a(t,["mediaResolution"],n);const i=l(e,["codeExecutionResult"]);i!=null&&a(t,["codeExecutionResult"],i);const o=l(e,["executableCode"]);o!=null&&a(t,["executableCode"],o);const r=l(e,["fileData"]);r!=null&&a(t,["fileData"],Gp(r));const s=l(e,["functionCall"]);s!=null&&a(t,["functionCall"],Hp(s));const u=l(e,["functionResponse"]);u!=null&&a(t,["functionResponse"],u);const d=l(e,["inlineData"]);d!=null&&a(t,["inlineData"],kp(d));const c=l(e,["text"]);c!=null&&a(t,["text"],c);const f=l(e,["thought"]);f!=null&&a(t,["thought"],f);const p=l(e,["thoughtSignature"]);p!=null&&a(t,["thoughtSignature"],p);const h=l(e,["videoMetadata"]);return h!=null&&a(t,["videoMetadata"],h),t}function eh(e){const t={},n=l(e,["retrievalConfig"]);n!=null&&a(t,["retrievalConfig"],n);const i=l(e,["functionCallingConfig"]);return i!=null&&a(t,["functionCallingConfig"],Bp(i)),t}function th(e){const t={};if(l(e,["retrieval"])!==void 0)throw new Error("retrieval parameter is not supported in Gemini API.");const n=l(e,["computerUse"]);n!=null&&a(t,["computerUse"],n);const i=l(e,["fileSearch"]);i!=null&&a(t,["fileSearch"],i);const o=l(e,["codeExecution"]);if(o!=null&&a(t,["codeExecution"],o),l(e,["enterpriseWebSearch"])!==void 0)throw new Error("enterpriseWebSearch parameter is not supported in Gemini API.");const r=l(e,["functionDeclarations"]);if(r!=null){let f=r;Array.isArray(f)&&(f=f.map(p=>p)),a(t,["functionDeclarations"],f)}const s=l(e,["googleMaps"]);s!=null&&a(t,["googleMaps"],Jp(s));const u=l(e,["googleSearch"]);u!=null&&a(t,["googleSearch"],$p(u));const d=l(e,["googleSearchRetrieval"]);d!=null&&a(t,["googleSearchRetrieval"],d);const c=l(e,["urlContext"]);return c!=null&&a(t,["urlContext"],c),t}function nh(e){const t={},n=l(e,["retrieval"]);n!=null&&a(t,["retrieval"],n);const i=l(e,["computerUse"]);if(i!=null&&a(t,["computerUse"],i),l(e,["fileSearch"])!==void 0)throw new Error("fileSearch parameter is not supported in Vertex AI.");const o=l(e,["codeExecution"]);o!=null&&a(t,["codeExecution"],o);const r=l(e,["enterpriseWebSearch"]);r!=null&&a(t,["enterpriseWebSearch"],r);const s=l(e,["functionDeclarations"]);if(s!=null){let p=s;Array.isArray(p)&&(p=p.map(h=>qp(h))),a(t,["functionDeclarations"],p)}const u=l(e,["googleMaps"]);u!=null&&a(t,["googleMaps"],u);const d=l(e,["googleSearch"]);d!=null&&a(t,["googleSearch"],d);const c=l(e,["googleSearchRetrieval"]);c!=null&&a(t,["googleSearchRetrieval"],c);const f=l(e,["urlContext"]);return f!=null&&a(t,["urlContext"],f),t}function ih(e,t){const n={},i=l(e,["ttl"]);t!==void 0&&i!=null&&a(t,["ttl"],i);const o=l(e,["expireTime"]);return t!==void 0&&o!=null&&a(t,["expireTime"],o),n}function oh(e,t){const n={},i=l(e,["ttl"]);t!==void 0&&i!=null&&a(t,["ttl"],i);const o=l(e,["expireTime"]);return t!==void 0&&o!=null&&a(t,["expireTime"],o),n}function rh(e,t){const n={},i=l(t,["name"]);i!=null&&a(n,["_url","name"],Me(e,i));const o=l(t,["config"]);return o!=null&&ih(o,n),n}function sh(e,t){const n={},i=l(t,["name"]);i!=null&&a(n,["_url","name"],Me(e,i));const o=l(t,["config"]);return o!=null&&oh(o,n),n}/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */class lh extends ke{constructor(t){super(),this.apiClient=t,this.list=async(n={})=>new qe(Pe.PAGED_ITEM_CACHED_CONTENTS,i=>this.listInternal(i),await this.listInternal(n),n)}async create(t){var n,i,o,r;let s,u="",d={};if(this.apiClient.isVertexAI()){const c=bp(this.apiClient,t);return u=N("cachedContents",c._url),d=c._query,delete c._url,delete c._query,s=this.apiClient.request({path:u,queryParams:d,body:JSON.stringify(c),httpMethod:"POST",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(i=t.config)===null||i===void 0?void 0:i.abortSignal}).then(f=>f.json()),s.then(f=>f)}else{const c=Dp(this.apiClient,t);return u=N("cachedContents",c._url),d=c._query,delete c._url,delete c._query,s=this.apiClient.request({path:u,queryParams:d,body:JSON.stringify(c),httpMethod:"POST",httpOptions:(o=t.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(r=t.config)===null||r===void 0?void 0:r.abortSignal}).then(f=>f.json()),s.then(f=>f)}}async get(t){var n,i,o,r;let s,u="",d={};if(this.apiClient.isVertexAI()){const c=zp(this.apiClient,t);return u=N("{name}",c._url),d=c._query,delete c._url,delete c._query,s=this.apiClient.request({path:u,queryParams:d,body:JSON.stringify(c),httpMethod:"GET",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(i=t.config)===null||i===void 0?void 0:i.abortSignal}).then(f=>f.json()),s.then(f=>f)}else{const c=Op(this.apiClient,t);return u=N("{name}",c._url),d=c._query,delete c._url,delete c._query,s=this.apiClient.request({path:u,queryParams:d,body:JSON.stringify(c),httpMethod:"GET",httpOptions:(o=t.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(r=t.config)===null||r===void 0?void 0:r.abortSignal}).then(f=>f.json()),s.then(f=>f)}}async delete(t){var n,i,o,r;let s,u="",d={};if(this.apiClient.isVertexAI()){const c=Up(this.apiClient,t);return u=N("{name}",c._url),d=c._query,delete c._url,delete c._query,s=this.apiClient.request({path:u,queryParams:d,body:JSON.stringify(c),httpMethod:"DELETE",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(i=t.config)===null||i===void 0?void 0:i.abortSignal}).then(f=>f.json().then(p=>{const h=p;return h.sdkHttpResponse={headers:f.headers},h})),s.then(f=>{const p=Vp(f),h=new lr;return Object.assign(h,p),h})}else{const c=Lp(this.apiClient,t);return u=N("{name}",c._url),d=c._query,delete c._url,delete c._query,s=this.apiClient.request({path:u,queryParams:d,body:JSON.stringify(c),httpMethod:"DELETE",httpOptions:(o=t.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(r=t.config)===null||r===void 0?void 0:r.abortSignal}).then(f=>f.json().then(p=>{const h=p;return h.sdkHttpResponse={headers:f.headers},h})),s.then(f=>{const p=Fp(f),h=new lr;return Object.assign(h,p),h})}}async update(t){var n,i,o,r;let s,u="",d={};if(this.apiClient.isVertexAI()){const c=sh(this.apiClient,t);return u=N("{name}",c._url),d=c._query,delete c._url,delete c._query,s=this.apiClient.request({path:u,queryParams:d,body:JSON.stringify(c),httpMethod:"PATCH",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(i=t.config)===null||i===void 0?void 0:i.abortSignal}).then(f=>f.json()),s.then(f=>f)}else{const c=rh(this.apiClient,t);return u=N("{name}",c._url),d=c._query,delete c._url,delete c._query,s=this.apiClient.request({path:u,queryParams:d,body:JSON.stringify(c),httpMethod:"PATCH",httpOptions:(o=t.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(r=t.config)===null||r===void 0?void 0:r.abortSignal}).then(f=>f.json()),s.then(f=>f)}}async listInternal(t){var n,i,o,r;let s,u="",d={};if(this.apiClient.isVertexAI()){const c=Xp(t);return u=N("cachedContents",c._url),d=c._query,delete c._url,delete c._query,s=this.apiClient.request({path:u,queryParams:d,body:JSON.stringify(c),httpMethod:"GET",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(i=t.config)===null||i===void 0?void 0:i.abortSignal}).then(f=>f.json().then(p=>{const h=p;return h.sdkHttpResponse={headers:f.headers},h})),s.then(f=>{const p=Zp(f),h=new ar;return Object.assign(h,p),h})}else{const c=Kp(t);return u=N("cachedContents",c._url),d=c._query,delete c._url,delete c._query,s=this.apiClient.request({path:u,queryParams:d,body:JSON.stringify(c),httpMethod:"GET",httpOptions:(o=t.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(r=t.config)===null||r===void 0?void 0:r.abortSignal}).then(f=>f.json().then(p=>{const h=p;return h.sdkHttpResponse={headers:f.headers},h})),s.then(f=>{const p=Qp(f),h=new ar;return Object.assign(h,p),h})}}}function Ht(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(e);o=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function H(e){return this instanceof H?(this.v=e,this):new H(e)}function Ee(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i=n.apply(e,t||[]),o,r=[];return o=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),u("next"),u("throw"),u("return",s),o[Symbol.asyncIterator]=function(){return this},o;function s(m){return function(g){return Promise.resolve(g).then(m,p)}}function u(m,g){i[m]&&(o[m]=function(E){return new Promise(function(T,S){r.push([m,E,T,S])>1||d(m,E)})},g&&(o[m]=g(o[m])))}function d(m,g){try{c(i[m](g))}catch(E){h(r[0][3],E)}}function c(m){m.value instanceof H?Promise.resolve(m.value.v).then(f,p):h(r[0][2],m)}function f(m){d("next",m)}function p(m){d("throw",m)}function h(m,g){m(g),r.shift(),r.length&&d(r[0][0],r[0][1])}}function Se(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof mr=="function"?mr(e):e[Symbol.iterator](),n={},i("next"),i("throw"),i("return"),n[Symbol.asyncIterator]=function(){return this},n);function i(r){n[r]=e[r]&&function(s){return new Promise(function(u,d){s=e[r](s),o(u,d,s.done,s.value)})}}function o(r,s,u,d){Promise.resolve(d).then(function(c){r({value:c,done:u})},s)}}/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */function ah(e){var t;if(e.candidates==null||e.candidates.length===0)return!1;const n=(t=e.candidates[0])===null||t===void 0?void 0:t.content;return n===void 0?!1:ks(n)}function ks(e){if(e.parts===void 0||e.parts.length===0)return!1;for(const t of e.parts)if(t===void 0||Object.keys(t).length===0)return!1;return!0}function uh(e){if(e.length!==0){for(const t of e)if(t.role!=="user"&&t.role!=="model")throw new Error(`Role must be user or model, but got ${t.role}.`)}}function gr(e){if(e===void 0||e.length===0)return[];const t=[],n=e.length;let i=0;for(;i{var r,s,u;const d=await o,c=(s=(r=d.candidates)===null||r===void 0?void 0:r[0])===null||s===void 0?void 0:s.content,f=d.automaticFunctionCallingHistory,p=this.getHistory(!0).length;let h=[];f!=null&&(h=(u=f.slice(p))!==null&&u!==void 0?u:[]);const m=c?[c]:[];this.recordHistory(i,m,h)})(),await this.sendPromise.catch(()=>{this.sendPromise=Promise.resolve()}),o}async sendMessageStream(t){var n;await this.sendPromise;const i=ie(t.message),o=this.modelsModule.generateContentStream({model:this.model,contents:this.getHistory(!0).concat(i),config:(n=t.config)!==null&&n!==void 0?n:this.config});this.sendPromise=o.then(()=>{}).catch(()=>{});const r=await o;return this.processStreamResponse(r,i)}getHistory(t=!1){const n=t?gr(this.history):this.history;return structuredClone(n)}processStreamResponse(t,n){return Ee(this,arguments,function*(){var o,r,s,u,d,c;const f=[];try{for(var p=!0,h=Se(t),m;m=yield H(h.next()),o=m.done,!o;p=!0){u=m.value,p=!1;const g=u;if(ah(g)){const E=(c=(d=g.candidates)===null||d===void 0?void 0:d[0])===null||c===void 0?void 0:c.content;E!==void 0&&f.push(E)}yield yield H(g)}}catch(g){r={error:g}}finally{try{!p&&!o&&(s=h.return)&&(yield H(s.call(h)))}finally{if(r)throw r.error}}this.recordHistory(n,f)})}recordHistory(t,n,i){let o=[];n.length>0&&n.every(r=>r.role!==void 0)?o=n:o.push({role:"model",parts:[]}),i&&i.length>0?this.history.push(...gr(i)):this.history.push(t),this.history.push(...o)}}/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */class Et extends Error{constructor(t){super(t.message),this.name="ApiError",this.status=t.status,Object.setPrototypeOf(this,Et.prototype)}}/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */function fh(e){const t={},n=l(e,["file"]);return n!=null&&a(t,["file"],n),t}function ph(e){const t={},n=l(e,["sdkHttpResponse"]);return n!=null&&a(t,["sdkHttpResponse"],n),t}function hh(e){const t={},n=l(e,["name"]);return n!=null&&a(t,["_url","file"],Cs(n)),t}function mh(e){const t={},n=l(e,["sdkHttpResponse"]);return n!=null&&a(t,["sdkHttpResponse"],n),t}function gh(e){const t={},n=l(e,["name"]);return n!=null&&a(t,["_url","file"],Cs(n)),t}function yh(e){const t={},n=l(e,["uris"]);return n!=null&&a(t,["uris"],n),t}function vh(e,t){const n={},i=l(e,["pageSize"]);t!==void 0&&i!=null&&a(t,["_query","pageSize"],i);const o=l(e,["pageToken"]);return t!==void 0&&o!=null&&a(t,["_query","pageToken"],o),n}function Th(e){const t={},n=l(e,["config"]);return n!=null&&vh(n,t),t}function Eh(e){const t={},n=l(e,["sdkHttpResponse"]);n!=null&&a(t,["sdkHttpResponse"],n);const i=l(e,["nextPageToken"]);i!=null&&a(t,["nextPageToken"],i);const o=l(e,["files"]);if(o!=null){let r=o;Array.isArray(r)&&(r=r.map(s=>s)),a(t,["files"],r)}return t}function Sh(e){const t={},n=l(e,["sdkHttpResponse"]);n!=null&&a(t,["sdkHttpResponse"],n);const i=l(e,["files"]);if(i!=null){let o=i;Array.isArray(o)&&(o=o.map(r=>r)),a(t,["files"],o)}return t}/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */class _h extends ke{constructor(t){super(),this.apiClient=t,this.list=async(n={})=>new qe(Pe.PAGED_ITEM_FILES,i=>this.listInternal(i),await this.listInternal(n),n)}async upload(t){if(this.apiClient.isVertexAI())throw new Error("Vertex AI does not support uploading files. You can share files through a GCS bucket.");return this.apiClient.uploadFile(t.file,t.config).then(n=>n)}async download(t){await this.apiClient.downloadFile(t)}async registerFiles(t){throw new Error("registerFiles is only supported in Node.js environments.")}async _registerFiles(t){return this.registerFilesInternal(t)}async listInternal(t){var n,i;let o,r="",s={};if(this.apiClient.isVertexAI())throw new Error("This method is only supported by the Gemini Developer API.");{const u=Th(t);return r=N("files",u._url),s=u._query,delete u._url,delete u._query,o=this.apiClient.request({path:r,queryParams:s,body:JSON.stringify(u),httpMethod:"GET",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(i=t.config)===null||i===void 0?void 0:i.abortSignal}).then(d=>d.json().then(c=>{const f=c;return f.sdkHttpResponse={headers:d.headers},f})),o.then(d=>{const c=Eh(d),f=new Cf;return Object.assign(f,c),f})}}async createInternal(t){var n,i;let o,r="",s={};if(this.apiClient.isVertexAI())throw new Error("This method is only supported by the Gemini Developer API.");{const u=fh(t);return r=N("upload/v1beta/files",u._url),s=u._query,delete u._url,delete u._query,o=this.apiClient.request({path:r,queryParams:s,body:JSON.stringify(u),httpMethod:"POST",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(i=t.config)===null||i===void 0?void 0:i.abortSignal}).then(d=>d.json()),o.then(d=>{const c=ph(d),f=new If;return Object.assign(f,c),f})}}async get(t){var n,i;let o,r="",s={};if(this.apiClient.isVertexAI())throw new Error("This method is only supported by the Gemini Developer API.");{const u=gh(t);return r=N("files/{file}",u._url),s=u._query,delete u._url,delete u._query,o=this.apiClient.request({path:r,queryParams:s,body:JSON.stringify(u),httpMethod:"GET",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(i=t.config)===null||i===void 0?void 0:i.abortSignal}).then(d=>d.json()),o.then(d=>d)}}async delete(t){var n,i;let o,r="",s={};if(this.apiClient.isVertexAI())throw new Error("This method is only supported by the Gemini Developer API.");{const u=hh(t);return r=N("files/{file}",u._url),s=u._query,delete u._url,delete u._query,o=this.apiClient.request({path:r,queryParams:s,body:JSON.stringify(u),httpMethod:"DELETE",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(i=t.config)===null||i===void 0?void 0:i.abortSignal}).then(d=>d.json().then(c=>{const f=c;return f.sdkHttpResponse={headers:d.headers},f})),o.then(d=>{const c=mh(d),f=new Af;return Object.assign(f,c),f})}}async registerFilesInternal(t){var n,i;let o,r="",s={};if(this.apiClient.isVertexAI())throw new Error("This method is only supported by the Gemini Developer API.");{const u=yh(t);return r=N("files:register",u._url),s=u._query,delete u._url,delete u._query,o=this.apiClient.request({path:r,queryParams:s,body:JSON.stringify(u),httpMethod:"POST",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(i=t.config)===null||i===void 0?void 0:i.abortSignal}).then(d=>d.json()),o.then(d=>{const c=Sh(d),f=new xf;return Object.assign(f,c),f})}}}/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */function bt(e){const t={},n=l(e,["data"]);if(n!=null&&a(t,["data"],n),l(e,["displayName"])!==void 0)throw new Error("displayName parameter is not supported in Gemini API.");const i=l(e,["mimeType"]);return i!=null&&a(t,["mimeType"],i),t}function Ch(e){const t={},n=l(e,["parts"]);if(n!=null){let o=n;Array.isArray(o)&&(o=o.map(r=>Gh(r))),a(t,["parts"],o)}const i=l(e,["role"]);return i!=null&&a(t,["role"],i),t}function Ih(e){const t={};if(l(e,["displayName"])!==void 0)throw new Error("displayName parameter is not supported in Gemini API.");const n=l(e,["fileUri"]);n!=null&&a(t,["fileUri"],n);const i=l(e,["mimeType"]);return i!=null&&a(t,["mimeType"],i),t}function Ah(e){const t={},n=l(e,["id"]);n!=null&&a(t,["id"],n);const i=l(e,["args"]);i!=null&&a(t,["args"],i);const o=l(e,["name"]);if(o!=null&&a(t,["name"],o),l(e,["partialArgs"])!==void 0)throw new Error("partialArgs parameter is not supported in Gemini API.");if(l(e,["willContinue"])!==void 0)throw new Error("willContinue parameter is not supported in Gemini API.");return t}function xh(e){const t={},n=l(e,["description"]);n!=null&&a(t,["description"],n);const i=l(e,["name"]);i!=null&&a(t,["name"],i);const o=l(e,["parameters"]);o!=null&&a(t,["parameters"],o);const r=l(e,["parametersJsonSchema"]);r!=null&&a(t,["parametersJsonSchema"],r);const s=l(e,["response"]);s!=null&&a(t,["response"],s);const u=l(e,["responseJsonSchema"]);if(u!=null&&a(t,["responseJsonSchema"],u),l(e,["behavior"])!==void 0)throw new Error("behavior parameter is not supported in Vertex AI.");return t}function wh(e){const t={},n=l(e,["modelSelectionConfig"]);n!=null&&a(t,["modelConfig"],n);const i=l(e,["responseJsonSchema"]);i!=null&&a(t,["responseJsonSchema"],i);const o=l(e,["audioTimestamp"]);o!=null&&a(t,["audioTimestamp"],o);const r=l(e,["candidateCount"]);r!=null&&a(t,["candidateCount"],r);const s=l(e,["enableAffectiveDialog"]);s!=null&&a(t,["enableAffectiveDialog"],s);const u=l(e,["frequencyPenalty"]);u!=null&&a(t,["frequencyPenalty"],u);const d=l(e,["logprobs"]);d!=null&&a(t,["logprobs"],d);const c=l(e,["maxOutputTokens"]);c!=null&&a(t,["maxOutputTokens"],c);const f=l(e,["mediaResolution"]);f!=null&&a(t,["mediaResolution"],f);const p=l(e,["presencePenalty"]);p!=null&&a(t,["presencePenalty"],p);const h=l(e,["responseLogprobs"]);h!=null&&a(t,["responseLogprobs"],h);const m=l(e,["responseMimeType"]);m!=null&&a(t,["responseMimeType"],m);const g=l(e,["responseModalities"]);g!=null&&a(t,["responseModalities"],g);const E=l(e,["responseSchema"]);E!=null&&a(t,["responseSchema"],E);const T=l(e,["routingConfig"]);T!=null&&a(t,["routingConfig"],T);const S=l(e,["seed"]);S!=null&&a(t,["seed"],S);const x=l(e,["speechConfig"]);x!=null&&a(t,["speechConfig"],x);const C=l(e,["stopSequences"]);C!=null&&a(t,["stopSequences"],C);const w=l(e,["temperature"]);w!=null&&a(t,["temperature"],w);const I=l(e,["thinkingConfig"]);I!=null&&a(t,["thinkingConfig"],I);const _=l(e,["topK"]);_!=null&&a(t,["topK"],_);const b=l(e,["topP"]);if(b!=null&&a(t,["topP"],b),l(e,["enableEnhancedCivicAnswers"])!==void 0)throw new Error("enableEnhancedCivicAnswers parameter is not supported in Vertex AI.");return t}function Rh(e){const t={};if(l(e,["authConfig"])!==void 0)throw new Error("authConfig parameter is not supported in Gemini API.");const n=l(e,["enableWidget"]);return n!=null&&a(t,["enableWidget"],n),t}function Ph(e){const t={};if(l(e,["excludeDomains"])!==void 0)throw new Error("excludeDomains parameter is not supported in Gemini API.");if(l(e,["blockingConfidence"])!==void 0)throw new Error("blockingConfidence parameter is not supported in Gemini API.");const n=l(e,["timeRangeFilter"]);return n!=null&&a(t,["timeRangeFilter"],n),t}function kh(e,t){const n={},i=l(e,["generationConfig"]);t!==void 0&&i!=null&&a(t,["setup","generationConfig"],i);const o=l(e,["responseModalities"]);t!==void 0&&o!=null&&a(t,["setup","generationConfig","responseModalities"],o);const r=l(e,["temperature"]);t!==void 0&&r!=null&&a(t,["setup","generationConfig","temperature"],r);const s=l(e,["topP"]);t!==void 0&&s!=null&&a(t,["setup","generationConfig","topP"],s);const u=l(e,["topK"]);t!==void 0&&u!=null&&a(t,["setup","generationConfig","topK"],u);const d=l(e,["maxOutputTokens"]);t!==void 0&&d!=null&&a(t,["setup","generationConfig","maxOutputTokens"],d);const c=l(e,["mediaResolution"]);t!==void 0&&c!=null&&a(t,["setup","generationConfig","mediaResolution"],c);const f=l(e,["seed"]);t!==void 0&&f!=null&&a(t,["setup","generationConfig","seed"],f);const p=l(e,["speechConfig"]);t!==void 0&&p!=null&&a(t,["setup","generationConfig","speechConfig"],ai(p));const h=l(e,["thinkingConfig"]);t!==void 0&&h!=null&&a(t,["setup","generationConfig","thinkingConfig"],h);const m=l(e,["enableAffectiveDialog"]);t!==void 0&&m!=null&&a(t,["setup","generationConfig","enableAffectiveDialog"],m);const g=l(e,["systemInstruction"]);t!==void 0&&g!=null&&a(t,["setup","systemInstruction"],Ch(ie(g)));const E=l(e,["tools"]);if(t!==void 0&&E!=null){let _=ot(E);Array.isArray(_)&&(_=_.map(b=>Bh(it(b)))),a(t,["setup","tools"],_)}const T=l(e,["sessionResumption"]);t!==void 0&&T!=null&&a(t,["setup","sessionResumption"],Hh(T));const S=l(e,["inputAudioTranscription"]);t!==void 0&&S!=null&&a(t,["setup","inputAudioTranscription"],S);const x=l(e,["outputAudioTranscription"]);t!==void 0&&x!=null&&a(t,["setup","outputAudioTranscription"],x);const C=l(e,["realtimeInputConfig"]);t!==void 0&&C!=null&&a(t,["setup","realtimeInputConfig"],C);const w=l(e,["contextWindowCompression"]);t!==void 0&&w!=null&&a(t,["setup","contextWindowCompression"],w);const I=l(e,["proactivity"]);if(t!==void 0&&I!=null&&a(t,["setup","proactivity"],I),l(e,["explicitVadSignal"])!==void 0)throw new Error("explicitVadSignal parameter is not supported in Gemini API.");return n}function Mh(e,t){const n={},i=l(e,["generationConfig"]);t!==void 0&&i!=null&&a(t,["setup","generationConfig"],wh(i));const o=l(e,["responseModalities"]);t!==void 0&&o!=null&&a(t,["setup","generationConfig","responseModalities"],o);const r=l(e,["temperature"]);t!==void 0&&r!=null&&a(t,["setup","generationConfig","temperature"],r);const s=l(e,["topP"]);t!==void 0&&s!=null&&a(t,["setup","generationConfig","topP"],s);const u=l(e,["topK"]);t!==void 0&&u!=null&&a(t,["setup","generationConfig","topK"],u);const d=l(e,["maxOutputTokens"]);t!==void 0&&d!=null&&a(t,["setup","generationConfig","maxOutputTokens"],d);const c=l(e,["mediaResolution"]);t!==void 0&&c!=null&&a(t,["setup","generationConfig","mediaResolution"],c);const f=l(e,["seed"]);t!==void 0&&f!=null&&a(t,["setup","generationConfig","seed"],f);const p=l(e,["speechConfig"]);t!==void 0&&p!=null&&a(t,["setup","generationConfig","speechConfig"],ai(p));const h=l(e,["thinkingConfig"]);t!==void 0&&h!=null&&a(t,["setup","generationConfig","thinkingConfig"],h);const m=l(e,["enableAffectiveDialog"]);t!==void 0&&m!=null&&a(t,["setup","generationConfig","enableAffectiveDialog"],m);const g=l(e,["systemInstruction"]);t!==void 0&&g!=null&&a(t,["setup","systemInstruction"],ie(g));const E=l(e,["tools"]);if(t!==void 0&&E!=null){let b=ot(E);Array.isArray(b)&&(b=b.map(V=>qh(it(V)))),a(t,["setup","tools"],b)}const T=l(e,["sessionResumption"]);t!==void 0&&T!=null&&a(t,["setup","sessionResumption"],T);const S=l(e,["inputAudioTranscription"]);t!==void 0&&S!=null&&a(t,["setup","inputAudioTranscription"],S);const x=l(e,["outputAudioTranscription"]);t!==void 0&&x!=null&&a(t,["setup","outputAudioTranscription"],x);const C=l(e,["realtimeInputConfig"]);t!==void 0&&C!=null&&a(t,["setup","realtimeInputConfig"],C);const w=l(e,["contextWindowCompression"]);t!==void 0&&w!=null&&a(t,["setup","contextWindowCompression"],w);const I=l(e,["proactivity"]);t!==void 0&&I!=null&&a(t,["setup","proactivity"],I);const _=l(e,["explicitVadSignal"]);return t!==void 0&&_!=null&&a(t,["setup","explicitVadSignal"],_),n}function Nh(e,t){const n={},i=l(t,["model"]);i!=null&&a(n,["setup","model"],$(e,i));const o=l(t,["config"]);return o!=null&&a(n,["config"],kh(o,n)),n}function Dh(e,t){const n={},i=l(t,["model"]);i!=null&&a(n,["setup","model"],$(e,i));const o=l(t,["config"]);return o!=null&&a(n,["config"],Mh(o,n)),n}function bh(e){const t={},n=l(e,["musicGenerationConfig"]);return n!=null&&a(t,["musicGenerationConfig"],n),t}function Lh(e){const t={},n=l(e,["weightedPrompts"]);if(n!=null){let i=n;Array.isArray(i)&&(i=i.map(o=>o)),a(t,["weightedPrompts"],i)}return t}function Uh(e){const t={},n=l(e,["media"]);if(n!=null){let c=vs(n);Array.isArray(c)&&(c=c.map(f=>bt(f))),a(t,["mediaChunks"],c)}const i=l(e,["audio"]);i!=null&&a(t,["audio"],bt(Es(i)));const o=l(e,["audioStreamEnd"]);o!=null&&a(t,["audioStreamEnd"],o);const r=l(e,["video"]);r!=null&&a(t,["video"],bt(Ts(r)));const s=l(e,["text"]);s!=null&&a(t,["text"],s);const u=l(e,["activityStart"]);u!=null&&a(t,["activityStart"],u);const d=l(e,["activityEnd"]);return d!=null&&a(t,["activityEnd"],d),t}function Fh(e){const t={},n=l(e,["media"]);if(n!=null){let c=vs(n);Array.isArray(c)&&(c=c.map(f=>f)),a(t,["mediaChunks"],c)}const i=l(e,["audio"]);i!=null&&a(t,["audio"],Es(i));const o=l(e,["audioStreamEnd"]);o!=null&&a(t,["audioStreamEnd"],o);const r=l(e,["video"]);r!=null&&a(t,["video"],Ts(r));const s=l(e,["text"]);s!=null&&a(t,["text"],s);const u=l(e,["activityStart"]);u!=null&&a(t,["activityStart"],u);const d=l(e,["activityEnd"]);return d!=null&&a(t,["activityEnd"],d),t}function Vh(e){const t={},n=l(e,["setupComplete"]);n!=null&&a(t,["setupComplete"],n);const i=l(e,["serverContent"]);i!=null&&a(t,["serverContent"],i);const o=l(e,["toolCall"]);o!=null&&a(t,["toolCall"],o);const r=l(e,["toolCallCancellation"]);r!=null&&a(t,["toolCallCancellation"],r);const s=l(e,["usageMetadata"]);s!=null&&a(t,["usageMetadata"],Oh(s));const u=l(e,["goAway"]);u!=null&&a(t,["goAway"],u);const d=l(e,["sessionResumptionUpdate"]);d!=null&&a(t,["sessionResumptionUpdate"],d);const c=l(e,["voiceActivityDetectionSignal"]);c!=null&&a(t,["voiceActivityDetectionSignal"],c);const f=l(e,["voiceActivity"]);return f!=null&&a(t,["voiceActivity"],zh(f)),t}function Gh(e){const t={},n=l(e,["mediaResolution"]);n!=null&&a(t,["mediaResolution"],n);const i=l(e,["codeExecutionResult"]);i!=null&&a(t,["codeExecutionResult"],i);const o=l(e,["executableCode"]);o!=null&&a(t,["executableCode"],o);const r=l(e,["fileData"]);r!=null&&a(t,["fileData"],Ih(r));const s=l(e,["functionCall"]);s!=null&&a(t,["functionCall"],Ah(s));const u=l(e,["functionResponse"]);u!=null&&a(t,["functionResponse"],u);const d=l(e,["inlineData"]);d!=null&&a(t,["inlineData"],bt(d));const c=l(e,["text"]);c!=null&&a(t,["text"],c);const f=l(e,["thought"]);f!=null&&a(t,["thought"],f);const p=l(e,["thoughtSignature"]);p!=null&&a(t,["thoughtSignature"],p);const h=l(e,["videoMetadata"]);return h!=null&&a(t,["videoMetadata"],h),t}function Hh(e){const t={},n=l(e,["handle"]);if(n!=null&&a(t,["handle"],n),l(e,["transparent"])!==void 0)throw new Error("transparent parameter is not supported in Gemini API.");return t}function Bh(e){const t={};if(l(e,["retrieval"])!==void 0)throw new Error("retrieval parameter is not supported in Gemini API.");const n=l(e,["computerUse"]);n!=null&&a(t,["computerUse"],n);const i=l(e,["fileSearch"]);i!=null&&a(t,["fileSearch"],i);const o=l(e,["codeExecution"]);if(o!=null&&a(t,["codeExecution"],o),l(e,["enterpriseWebSearch"])!==void 0)throw new Error("enterpriseWebSearch parameter is not supported in Gemini API.");const r=l(e,["functionDeclarations"]);if(r!=null){let f=r;Array.isArray(f)&&(f=f.map(p=>p)),a(t,["functionDeclarations"],f)}const s=l(e,["googleMaps"]);s!=null&&a(t,["googleMaps"],Rh(s));const u=l(e,["googleSearch"]);u!=null&&a(t,["googleSearch"],Ph(u));const d=l(e,["googleSearchRetrieval"]);d!=null&&a(t,["googleSearchRetrieval"],d);const c=l(e,["urlContext"]);return c!=null&&a(t,["urlContext"],c),t}function qh(e){const t={},n=l(e,["retrieval"]);n!=null&&a(t,["retrieval"],n);const i=l(e,["computerUse"]);if(i!=null&&a(t,["computerUse"],i),l(e,["fileSearch"])!==void 0)throw new Error("fileSearch parameter is not supported in Vertex AI.");const o=l(e,["codeExecution"]);o!=null&&a(t,["codeExecution"],o);const r=l(e,["enterpriseWebSearch"]);r!=null&&a(t,["enterpriseWebSearch"],r);const s=l(e,["functionDeclarations"]);if(s!=null){let p=s;Array.isArray(p)&&(p=p.map(h=>xh(h))),a(t,["functionDeclarations"],p)}const u=l(e,["googleMaps"]);u!=null&&a(t,["googleMaps"],u);const d=l(e,["googleSearch"]);d!=null&&a(t,["googleSearch"],d);const c=l(e,["googleSearchRetrieval"]);c!=null&&a(t,["googleSearchRetrieval"],c);const f=l(e,["urlContext"]);return f!=null&&a(t,["urlContext"],f),t}function Oh(e){const t={},n=l(e,["promptTokenCount"]);n!=null&&a(t,["promptTokenCount"],n);const i=l(e,["cachedContentTokenCount"]);i!=null&&a(t,["cachedContentTokenCount"],i);const o=l(e,["candidatesTokenCount"]);o!=null&&a(t,["responseTokenCount"],o);const r=l(e,["toolUsePromptTokenCount"]);r!=null&&a(t,["toolUsePromptTokenCount"],r);const s=l(e,["thoughtsTokenCount"]);s!=null&&a(t,["thoughtsTokenCount"],s);const u=l(e,["totalTokenCount"]);u!=null&&a(t,["totalTokenCount"],u);const d=l(e,["promptTokensDetails"]);if(d!=null){let m=d;Array.isArray(m)&&(m=m.map(g=>g)),a(t,["promptTokensDetails"],m)}const c=l(e,["cacheTokensDetails"]);if(c!=null){let m=c;Array.isArray(m)&&(m=m.map(g=>g)),a(t,["cacheTokensDetails"],m)}const f=l(e,["candidatesTokensDetails"]);if(f!=null){let m=f;Array.isArray(m)&&(m=m.map(g=>g)),a(t,["responseTokensDetails"],m)}const p=l(e,["toolUsePromptTokensDetails"]);if(p!=null){let m=p;Array.isArray(m)&&(m=m.map(g=>g)),a(t,["toolUsePromptTokensDetails"],m)}const h=l(e,["trafficType"]);return h!=null&&a(t,["trafficType"],h),t}function zh(e){const t={},n=l(e,["type"]);return n!=null&&a(t,["voiceActivityType"],n),t}/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */function Jh(e,t){const n={},i=l(e,["data"]);if(i!=null&&a(n,["data"],i),l(e,["displayName"])!==void 0)throw new Error("displayName parameter is not supported in Gemini API.");const o=l(e,["mimeType"]);return o!=null&&a(n,["mimeType"],o),n}function $h(e,t){const n={},i=l(e,["content"]);i!=null&&a(n,["content"],i);const o=l(e,["citationMetadata"]);o!=null&&a(n,["citationMetadata"],Wh(o));const r=l(e,["tokenCount"]);r!=null&&a(n,["tokenCount"],r);const s=l(e,["finishReason"]);s!=null&&a(n,["finishReason"],s);const u=l(e,["avgLogprobs"]);u!=null&&a(n,["avgLogprobs"],u);const d=l(e,["groundingMetadata"]);d!=null&&a(n,["groundingMetadata"],d);const c=l(e,["index"]);c!=null&&a(n,["index"],c);const f=l(e,["logprobsResult"]);f!=null&&a(n,["logprobsResult"],f);const p=l(e,["safetyRatings"]);if(p!=null){let m=p;Array.isArray(m)&&(m=m.map(g=>g)),a(n,["safetyRatings"],m)}const h=l(e,["urlContextMetadata"]);return h!=null&&a(n,["urlContextMetadata"],h),n}function Wh(e,t){const n={},i=l(e,["citationSources"]);if(i!=null){let o=i;Array.isArray(o)&&(o=o.map(r=>r)),a(n,["citations"],o)}return n}function Yh(e,t,n){const i={},o=l(t,["model"]);o!=null&&a(i,["_url","model"],$(e,o));const r=l(t,["contents"]);if(r!=null){let s=me(r);Array.isArray(s)&&(s=s.map(u=>u)),a(i,["contents"],s)}return i}function Kh(e,t){const n={},i=l(e,["sdkHttpResponse"]);i!=null&&a(n,["sdkHttpResponse"],i);const o=l(e,["tokensInfo"]);if(o!=null){let r=o;Array.isArray(r)&&(r=r.map(s=>s)),a(n,["tokensInfo"],r)}return n}function Xh(e,t){const n={},i=l(e,["values"]);i!=null&&a(n,["values"],i);const o=l(e,["statistics"]);return o!=null&&a(n,["statistics"],Qh(o)),n}function Qh(e,t){const n={},i=l(e,["truncated"]);i!=null&&a(n,["truncated"],i);const o=l(e,["token_count"]);return o!=null&&a(n,["tokenCount"],o),n}function Wt(e,t){const n={},i=l(e,["parts"]);if(i!=null){let r=i;Array.isArray(r)&&(r=r.map(s=>sg(s))),a(n,["parts"],r)}const o=l(e,["role"]);return o!=null&&a(n,["role"],o),n}function Zh(e,t){const n={},i=l(e,["controlType"]);i!=null&&a(n,["controlType"],i);const o=l(e,["enableControlImageComputation"]);return o!=null&&a(n,["computeControl"],o),n}function jh(e,t){const n={};if(l(e,["systemInstruction"])!==void 0)throw new Error("systemInstruction parameter is not supported in Gemini API.");if(l(e,["tools"])!==void 0)throw new Error("tools parameter is not supported in Gemini API.");if(l(e,["generationConfig"])!==void 0)throw new Error("generationConfig parameter is not supported in Gemini API.");return n}function em(e,t,n){const i={},o=l(e,["systemInstruction"]);t!==void 0&&o!=null&&a(t,["systemInstruction"],ie(o));const r=l(e,["tools"]);if(t!==void 0&&r!=null){let u=r;Array.isArray(u)&&(u=u.map(d=>bs(d))),a(t,["tools"],u)}const s=l(e,["generationConfig"]);return t!==void 0&&s!=null&&a(t,["generationConfig"],Jm(s)),i}function tm(e,t,n){const i={},o=l(t,["model"]);o!=null&&a(i,["_url","model"],$(e,o));const r=l(t,["contents"]);if(r!=null){let u=me(r);Array.isArray(u)&&(u=u.map(d=>Wt(d))),a(i,["contents"],u)}const s=l(t,["config"]);return s!=null&&jh(s),i}function nm(e,t,n){const i={},o=l(t,["model"]);o!=null&&a(i,["_url","model"],$(e,o));const r=l(t,["contents"]);if(r!=null){let u=me(r);Array.isArray(u)&&(u=u.map(d=>d)),a(i,["contents"],u)}const s=l(t,["config"]);return s!=null&&em(s,i),i}function im(e,t){const n={},i=l(e,["sdkHttpResponse"]);i!=null&&a(n,["sdkHttpResponse"],i);const o=l(e,["totalTokens"]);o!=null&&a(n,["totalTokens"],o);const r=l(e,["cachedContentTokenCount"]);return r!=null&&a(n,["cachedContentTokenCount"],r),n}function om(e,t){const n={},i=l(e,["sdkHttpResponse"]);i!=null&&a(n,["sdkHttpResponse"],i);const o=l(e,["totalTokens"]);return o!=null&&a(n,["totalTokens"],o),n}function rm(e,t,n){const i={},o=l(t,["model"]);return o!=null&&a(i,["_url","name"],$(e,o)),i}function sm(e,t,n){const i={},o=l(t,["model"]);return o!=null&&a(i,["_url","name"],$(e,o)),i}function lm(e,t){const n={},i=l(e,["sdkHttpResponse"]);return i!=null&&a(n,["sdkHttpResponse"],i),n}function am(e,t){const n={},i=l(e,["sdkHttpResponse"]);return i!=null&&a(n,["sdkHttpResponse"],i),n}function um(e,t,n){const i={},o=l(e,["outputGcsUri"]);t!==void 0&&o!=null&&a(t,["parameters","storageUri"],o);const r=l(e,["negativePrompt"]);t!==void 0&&r!=null&&a(t,["parameters","negativePrompt"],r);const s=l(e,["numberOfImages"]);t!==void 0&&s!=null&&a(t,["parameters","sampleCount"],s);const u=l(e,["aspectRatio"]);t!==void 0&&u!=null&&a(t,["parameters","aspectRatio"],u);const d=l(e,["guidanceScale"]);t!==void 0&&d!=null&&a(t,["parameters","guidanceScale"],d);const c=l(e,["seed"]);t!==void 0&&c!=null&&a(t,["parameters","seed"],c);const f=l(e,["safetyFilterLevel"]);t!==void 0&&f!=null&&a(t,["parameters","safetySetting"],f);const p=l(e,["personGeneration"]);t!==void 0&&p!=null&&a(t,["parameters","personGeneration"],p);const h=l(e,["includeSafetyAttributes"]);t!==void 0&&h!=null&&a(t,["parameters","includeSafetyAttributes"],h);const m=l(e,["includeRaiReason"]);t!==void 0&&m!=null&&a(t,["parameters","includeRaiReason"],m);const g=l(e,["language"]);t!==void 0&&g!=null&&a(t,["parameters","language"],g);const E=l(e,["outputMimeType"]);t!==void 0&&E!=null&&a(t,["parameters","outputOptions","mimeType"],E);const T=l(e,["outputCompressionQuality"]);t!==void 0&&T!=null&&a(t,["parameters","outputOptions","compressionQuality"],T);const S=l(e,["addWatermark"]);t!==void 0&&S!=null&&a(t,["parameters","addWatermark"],S);const x=l(e,["labels"]);t!==void 0&&x!=null&&a(t,["labels"],x);const C=l(e,["editMode"]);t!==void 0&&C!=null&&a(t,["parameters","editMode"],C);const w=l(e,["baseSteps"]);return t!==void 0&&w!=null&&a(t,["parameters","editConfig","baseSteps"],w),i}function cm(e,t,n){const i={},o=l(t,["model"]);o!=null&&a(i,["_url","model"],$(e,o));const r=l(t,["prompt"]);r!=null&&a(i,["instances[0]","prompt"],r);const s=l(t,["referenceImages"]);if(s!=null){let d=s;Array.isArray(d)&&(d=d.map(c=>fg(c))),a(i,["instances[0]","referenceImages"],d)}const u=l(t,["config"]);return u!=null&&um(u,i),i}function dm(e,t){const n={},i=l(e,["sdkHttpResponse"]);i!=null&&a(n,["sdkHttpResponse"],i);const o=l(e,["predictions"]);if(o!=null){let r=o;Array.isArray(r)&&(r=r.map(s=>Yt(s))),a(n,["generatedImages"],r)}return n}function fm(e,t,n){const i={},o=l(e,["taskType"]);t!==void 0&&o!=null&&a(t,["requests[]","taskType"],o);const r=l(e,["title"]);t!==void 0&&r!=null&&a(t,["requests[]","title"],r);const s=l(e,["outputDimensionality"]);if(t!==void 0&&s!=null&&a(t,["requests[]","outputDimensionality"],s),l(e,["mimeType"])!==void 0)throw new Error("mimeType parameter is not supported in Gemini API.");if(l(e,["autoTruncate"])!==void 0)throw new Error("autoTruncate parameter is not supported in Gemini API.");return i}function pm(e,t,n){const i={},o=l(e,["taskType"]);t!==void 0&&o!=null&&a(t,["instances[]","task_type"],o);const r=l(e,["title"]);t!==void 0&&r!=null&&a(t,["instances[]","title"],r);const s=l(e,["outputDimensionality"]);t!==void 0&&s!=null&&a(t,["parameters","outputDimensionality"],s);const u=l(e,["mimeType"]);t!==void 0&&u!=null&&a(t,["instances[]","mimeType"],u);const d=l(e,["autoTruncate"]);return t!==void 0&&d!=null&&a(t,["parameters","autoTruncate"],d),i}function hm(e,t,n){const i={},o=l(t,["model"]);o!=null&&a(i,["_url","model"],$(e,o));const r=l(t,["contents"]);if(r!=null){let d=ri(e,r);Array.isArray(d)&&(d=d.map(c=>c)),a(i,["requests[]","content"],d)}const s=l(t,["config"]);s!=null&&fm(s,i);const u=l(t,["model"]);return u!==void 0&&a(i,["requests[]","model"],$(e,u)),i}function mm(e,t,n){const i={},o=l(t,["model"]);o!=null&&a(i,["_url","model"],$(e,o));const r=l(t,["contents"]);if(r!=null){let u=ri(e,r);Array.isArray(u)&&(u=u.map(d=>d)),a(i,["instances[]","content"],u)}const s=l(t,["config"]);return s!=null&&pm(s,i),i}function gm(e,t){const n={},i=l(e,["sdkHttpResponse"]);i!=null&&a(n,["sdkHttpResponse"],i);const o=l(e,["embeddings"]);if(o!=null){let s=o;Array.isArray(s)&&(s=s.map(u=>u)),a(n,["embeddings"],s)}const r=l(e,["metadata"]);return r!=null&&a(n,["metadata"],r),n}function ym(e,t){const n={},i=l(e,["sdkHttpResponse"]);i!=null&&a(n,["sdkHttpResponse"],i);const o=l(e,["predictions[]","embeddings"]);if(o!=null){let s=o;Array.isArray(s)&&(s=s.map(u=>Xh(u))),a(n,["embeddings"],s)}const r=l(e,["metadata"]);return r!=null&&a(n,["metadata"],r),n}function vm(e,t){const n={},i=l(e,["endpoint"]);i!=null&&a(n,["name"],i);const o=l(e,["deployedModelId"]);return o!=null&&a(n,["deployedModelId"],o),n}function Tm(e,t){const n={};if(l(e,["displayName"])!==void 0)throw new Error("displayName parameter is not supported in Gemini API.");const i=l(e,["fileUri"]);i!=null&&a(n,["fileUri"],i);const o=l(e,["mimeType"]);return o!=null&&a(n,["mimeType"],o),n}function Em(e,t){const n={},i=l(e,["id"]);i!=null&&a(n,["id"],i);const o=l(e,["args"]);o!=null&&a(n,["args"],o);const r=l(e,["name"]);if(r!=null&&a(n,["name"],r),l(e,["partialArgs"])!==void 0)throw new Error("partialArgs parameter is not supported in Gemini API.");if(l(e,["willContinue"])!==void 0)throw new Error("willContinue parameter is not supported in Gemini API.");return n}function Sm(e,t){const n={},i=l(e,["allowedFunctionNames"]);i!=null&&a(n,["allowedFunctionNames"],i);const o=l(e,["mode"]);if(o!=null&&a(n,["mode"],o),l(e,["streamFunctionCallArguments"])!==void 0)throw new Error("streamFunctionCallArguments parameter is not supported in Gemini API.");return n}function _m(e,t){const n={},i=l(e,["description"]);i!=null&&a(n,["description"],i);const o=l(e,["name"]);o!=null&&a(n,["name"],o);const r=l(e,["parameters"]);r!=null&&a(n,["parameters"],r);const s=l(e,["parametersJsonSchema"]);s!=null&&a(n,["parametersJsonSchema"],s);const u=l(e,["response"]);u!=null&&a(n,["response"],u);const d=l(e,["responseJsonSchema"]);if(d!=null&&a(n,["responseJsonSchema"],d),l(e,["behavior"])!==void 0)throw new Error("behavior parameter is not supported in Vertex AI.");return n}function Cm(e,t,n,i){const o={},r=l(t,["systemInstruction"]);n!==void 0&&r!=null&&a(n,["systemInstruction"],Wt(ie(r)));const s=l(t,["temperature"]);s!=null&&a(o,["temperature"],s);const u=l(t,["topP"]);u!=null&&a(o,["topP"],u);const d=l(t,["topK"]);d!=null&&a(o,["topK"],d);const c=l(t,["candidateCount"]);c!=null&&a(o,["candidateCount"],c);const f=l(t,["maxOutputTokens"]);f!=null&&a(o,["maxOutputTokens"],f);const p=l(t,["stopSequences"]);p!=null&&a(o,["stopSequences"],p);const h=l(t,["responseLogprobs"]);h!=null&&a(o,["responseLogprobs"],h);const m=l(t,["logprobs"]);m!=null&&a(o,["logprobs"],m);const g=l(t,["presencePenalty"]);g!=null&&a(o,["presencePenalty"],g);const E=l(t,["frequencyPenalty"]);E!=null&&a(o,["frequencyPenalty"],E);const T=l(t,["seed"]);T!=null&&a(o,["seed"],T);const S=l(t,["responseMimeType"]);S!=null&&a(o,["responseMimeType"],S);const x=l(t,["responseSchema"]);x!=null&&a(o,["responseSchema"],si(x));const C=l(t,["responseJsonSchema"]);if(C!=null&&a(o,["responseJsonSchema"],C),l(t,["routingConfig"])!==void 0)throw new Error("routingConfig parameter is not supported in Gemini API.");if(l(t,["modelSelectionConfig"])!==void 0)throw new Error("modelSelectionConfig parameter is not supported in Gemini API.");const w=l(t,["safetySettings"]);if(n!==void 0&&w!=null){let U=w;Array.isArray(U)&&(U=U.map(M=>pg(M))),a(n,["safetySettings"],U)}const I=l(t,["tools"]);if(n!==void 0&&I!=null){let U=ot(I);Array.isArray(U)&&(U=U.map(M=>Eg(it(M)))),a(n,["tools"],U)}const _=l(t,["toolConfig"]);if(n!==void 0&&_!=null&&a(n,["toolConfig"],Tg(_)),l(t,["labels"])!==void 0)throw new Error("labels parameter is not supported in Gemini API.");const b=l(t,["cachedContent"]);n!==void 0&&b!=null&&a(n,["cachedContent"],Me(e,b));const V=l(t,["responseModalities"]);V!=null&&a(o,["responseModalities"],V);const P=l(t,["mediaResolution"]);P!=null&&a(o,["mediaResolution"],P);const F=l(t,["speechConfig"]);if(F!=null&&a(o,["speechConfig"],li(F)),l(t,["audioTimestamp"])!==void 0)throw new Error("audioTimestamp parameter is not supported in Gemini API.");const D=l(t,["thinkingConfig"]);D!=null&&a(o,["thinkingConfig"],D);const L=l(t,["imageConfig"]);L!=null&&a(o,["imageConfig"],Xm(L));const q=l(t,["enableEnhancedCivicAnswers"]);if(q!=null&&a(o,["enableEnhancedCivicAnswers"],q),l(t,["modelArmorConfig"])!==void 0)throw new Error("modelArmorConfig parameter is not supported in Gemini API.");return o}function Im(e,t,n,i){const o={},r=l(t,["systemInstruction"]);n!==void 0&&r!=null&&a(n,["systemInstruction"],ie(r));const s=l(t,["temperature"]);s!=null&&a(o,["temperature"],s);const u=l(t,["topP"]);u!=null&&a(o,["topP"],u);const d=l(t,["topK"]);d!=null&&a(o,["topK"],d);const c=l(t,["candidateCount"]);c!=null&&a(o,["candidateCount"],c);const f=l(t,["maxOutputTokens"]);f!=null&&a(o,["maxOutputTokens"],f);const p=l(t,["stopSequences"]);p!=null&&a(o,["stopSequences"],p);const h=l(t,["responseLogprobs"]);h!=null&&a(o,["responseLogprobs"],h);const m=l(t,["logprobs"]);m!=null&&a(o,["logprobs"],m);const g=l(t,["presencePenalty"]);g!=null&&a(o,["presencePenalty"],g);const E=l(t,["frequencyPenalty"]);E!=null&&a(o,["frequencyPenalty"],E);const T=l(t,["seed"]);T!=null&&a(o,["seed"],T);const S=l(t,["responseMimeType"]);S!=null&&a(o,["responseMimeType"],S);const x=l(t,["responseSchema"]);x!=null&&a(o,["responseSchema"],si(x));const C=l(t,["responseJsonSchema"]);C!=null&&a(o,["responseJsonSchema"],C);const w=l(t,["routingConfig"]);w!=null&&a(o,["routingConfig"],w);const I=l(t,["modelSelectionConfig"]);I!=null&&a(o,["modelConfig"],I);const _=l(t,["safetySettings"]);if(n!==void 0&&_!=null){let j=_;Array.isArray(j)&&(j=j.map(ce=>ce)),a(n,["safetySettings"],j)}const b=l(t,["tools"]);if(n!==void 0&&b!=null){let j=ot(b);Array.isArray(j)&&(j=j.map(ce=>bs(it(ce)))),a(n,["tools"],j)}const V=l(t,["toolConfig"]);n!==void 0&&V!=null&&a(n,["toolConfig"],V);const P=l(t,["labels"]);n!==void 0&&P!=null&&a(n,["labels"],P);const F=l(t,["cachedContent"]);n!==void 0&&F!=null&&a(n,["cachedContent"],Me(e,F));const D=l(t,["responseModalities"]);D!=null&&a(o,["responseModalities"],D);const L=l(t,["mediaResolution"]);L!=null&&a(o,["mediaResolution"],L);const q=l(t,["speechConfig"]);q!=null&&a(o,["speechConfig"],li(q));const U=l(t,["audioTimestamp"]);U!=null&&a(o,["audioTimestamp"],U);const M=l(t,["thinkingConfig"]);M!=null&&a(o,["thinkingConfig"],M);const W=l(t,["imageConfig"]);if(W!=null&&a(o,["imageConfig"],Qm(W)),l(t,["enableEnhancedCivicAnswers"])!==void 0)throw new Error("enableEnhancedCivicAnswers parameter is not supported in Vertex AI.");const Z=l(t,["modelArmorConfig"]);return n!==void 0&&Z!=null&&a(n,["modelArmorConfig"],Z),o}function yr(e,t,n){const i={},o=l(t,["model"]);o!=null&&a(i,["_url","model"],$(e,o));const r=l(t,["contents"]);if(r!=null){let u=me(r);Array.isArray(u)&&(u=u.map(d=>Wt(d))),a(i,["contents"],u)}const s=l(t,["config"]);return s!=null&&a(i,["generationConfig"],Cm(e,s,i)),i}function vr(e,t,n){const i={},o=l(t,["model"]);o!=null&&a(i,["_url","model"],$(e,o));const r=l(t,["contents"]);if(r!=null){let u=me(r);Array.isArray(u)&&(u=u.map(d=>d)),a(i,["contents"],u)}const s=l(t,["config"]);return s!=null&&a(i,["generationConfig"],Im(e,s,i)),i}function Tr(e,t){const n={},i=l(e,["sdkHttpResponse"]);i!=null&&a(n,["sdkHttpResponse"],i);const o=l(e,["candidates"]);if(o!=null){let c=o;Array.isArray(c)&&(c=c.map(f=>$h(f))),a(n,["candidates"],c)}const r=l(e,["modelVersion"]);r!=null&&a(n,["modelVersion"],r);const s=l(e,["promptFeedback"]);s!=null&&a(n,["promptFeedback"],s);const u=l(e,["responseId"]);u!=null&&a(n,["responseId"],u);const d=l(e,["usageMetadata"]);return d!=null&&a(n,["usageMetadata"],d),n}function Er(e,t){const n={},i=l(e,["sdkHttpResponse"]);i!=null&&a(n,["sdkHttpResponse"],i);const o=l(e,["candidates"]);if(o!=null){let f=o;Array.isArray(f)&&(f=f.map(p=>p)),a(n,["candidates"],f)}const r=l(e,["createTime"]);r!=null&&a(n,["createTime"],r);const s=l(e,["modelVersion"]);s!=null&&a(n,["modelVersion"],s);const u=l(e,["promptFeedback"]);u!=null&&a(n,["promptFeedback"],u);const d=l(e,["responseId"]);d!=null&&a(n,["responseId"],d);const c=l(e,["usageMetadata"]);return c!=null&&a(n,["usageMetadata"],c),n}function Am(e,t,n){const i={};if(l(e,["outputGcsUri"])!==void 0)throw new Error("outputGcsUri parameter is not supported in Gemini API.");if(l(e,["negativePrompt"])!==void 0)throw new Error("negativePrompt parameter is not supported in Gemini API.");const o=l(e,["numberOfImages"]);t!==void 0&&o!=null&&a(t,["parameters","sampleCount"],o);const r=l(e,["aspectRatio"]);t!==void 0&&r!=null&&a(t,["parameters","aspectRatio"],r);const s=l(e,["guidanceScale"]);if(t!==void 0&&s!=null&&a(t,["parameters","guidanceScale"],s),l(e,["seed"])!==void 0)throw new Error("seed parameter is not supported in Gemini API.");const u=l(e,["safetyFilterLevel"]);t!==void 0&&u!=null&&a(t,["parameters","safetySetting"],u);const d=l(e,["personGeneration"]);t!==void 0&&d!=null&&a(t,["parameters","personGeneration"],d);const c=l(e,["includeSafetyAttributes"]);t!==void 0&&c!=null&&a(t,["parameters","includeSafetyAttributes"],c);const f=l(e,["includeRaiReason"]);t!==void 0&&f!=null&&a(t,["parameters","includeRaiReason"],f);const p=l(e,["language"]);t!==void 0&&p!=null&&a(t,["parameters","language"],p);const h=l(e,["outputMimeType"]);t!==void 0&&h!=null&&a(t,["parameters","outputOptions","mimeType"],h);const m=l(e,["outputCompressionQuality"]);if(t!==void 0&&m!=null&&a(t,["parameters","outputOptions","compressionQuality"],m),l(e,["addWatermark"])!==void 0)throw new Error("addWatermark parameter is not supported in Gemini API.");if(l(e,["labels"])!==void 0)throw new Error("labels parameter is not supported in Gemini API.");const g=l(e,["imageSize"]);if(t!==void 0&&g!=null&&a(t,["parameters","sampleImageSize"],g),l(e,["enhancePrompt"])!==void 0)throw new Error("enhancePrompt parameter is not supported in Gemini API.");return i}function xm(e,t,n){const i={},o=l(e,["outputGcsUri"]);t!==void 0&&o!=null&&a(t,["parameters","storageUri"],o);const r=l(e,["negativePrompt"]);t!==void 0&&r!=null&&a(t,["parameters","negativePrompt"],r);const s=l(e,["numberOfImages"]);t!==void 0&&s!=null&&a(t,["parameters","sampleCount"],s);const u=l(e,["aspectRatio"]);t!==void 0&&u!=null&&a(t,["parameters","aspectRatio"],u);const d=l(e,["guidanceScale"]);t!==void 0&&d!=null&&a(t,["parameters","guidanceScale"],d);const c=l(e,["seed"]);t!==void 0&&c!=null&&a(t,["parameters","seed"],c);const f=l(e,["safetyFilterLevel"]);t!==void 0&&f!=null&&a(t,["parameters","safetySetting"],f);const p=l(e,["personGeneration"]);t!==void 0&&p!=null&&a(t,["parameters","personGeneration"],p);const h=l(e,["includeSafetyAttributes"]);t!==void 0&&h!=null&&a(t,["parameters","includeSafetyAttributes"],h);const m=l(e,["includeRaiReason"]);t!==void 0&&m!=null&&a(t,["parameters","includeRaiReason"],m);const g=l(e,["language"]);t!==void 0&&g!=null&&a(t,["parameters","language"],g);const E=l(e,["outputMimeType"]);t!==void 0&&E!=null&&a(t,["parameters","outputOptions","mimeType"],E);const T=l(e,["outputCompressionQuality"]);t!==void 0&&T!=null&&a(t,["parameters","outputOptions","compressionQuality"],T);const S=l(e,["addWatermark"]);t!==void 0&&S!=null&&a(t,["parameters","addWatermark"],S);const x=l(e,["labels"]);t!==void 0&&x!=null&&a(t,["labels"],x);const C=l(e,["imageSize"]);t!==void 0&&C!=null&&a(t,["parameters","sampleImageSize"],C);const w=l(e,["enhancePrompt"]);return t!==void 0&&w!=null&&a(t,["parameters","enhancePrompt"],w),i}function wm(e,t,n){const i={},o=l(t,["model"]);o!=null&&a(i,["_url","model"],$(e,o));const r=l(t,["prompt"]);r!=null&&a(i,["instances[0]","prompt"],r);const s=l(t,["config"]);return s!=null&&Am(s,i),i}function Rm(e,t,n){const i={},o=l(t,["model"]);o!=null&&a(i,["_url","model"],$(e,o));const r=l(t,["prompt"]);r!=null&&a(i,["instances[0]","prompt"],r);const s=l(t,["config"]);return s!=null&&xm(s,i),i}function Pm(e,t){const n={},i=l(e,["sdkHttpResponse"]);i!=null&&a(n,["sdkHttpResponse"],i);const o=l(e,["predictions"]);if(o!=null){let s=o;Array.isArray(s)&&(s=s.map(u=>Bm(u))),a(n,["generatedImages"],s)}const r=l(e,["positivePromptSafetyAttributes"]);return r!=null&&a(n,["positivePromptSafetyAttributes"],Ns(r)),n}function km(e,t){const n={},i=l(e,["sdkHttpResponse"]);i!=null&&a(n,["sdkHttpResponse"],i);const o=l(e,["predictions"]);if(o!=null){let s=o;Array.isArray(s)&&(s=s.map(u=>Yt(u))),a(n,["generatedImages"],s)}const r=l(e,["positivePromptSafetyAttributes"]);return r!=null&&a(n,["positivePromptSafetyAttributes"],Ds(r)),n}function Mm(e,t,n){const i={},o=l(e,["numberOfVideos"]);if(t!==void 0&&o!=null&&a(t,["parameters","sampleCount"],o),l(e,["outputGcsUri"])!==void 0)throw new Error("outputGcsUri parameter is not supported in Gemini API.");if(l(e,["fps"])!==void 0)throw new Error("fps parameter is not supported in Gemini API.");const r=l(e,["durationSeconds"]);if(t!==void 0&&r!=null&&a(t,["parameters","durationSeconds"],r),l(e,["seed"])!==void 0)throw new Error("seed parameter is not supported in Gemini API.");const s=l(e,["aspectRatio"]);t!==void 0&&s!=null&&a(t,["parameters","aspectRatio"],s);const u=l(e,["resolution"]);t!==void 0&&u!=null&&a(t,["parameters","resolution"],u);const d=l(e,["personGeneration"]);if(t!==void 0&&d!=null&&a(t,["parameters","personGeneration"],d),l(e,["pubsubTopic"])!==void 0)throw new Error("pubsubTopic parameter is not supported in Gemini API.");const c=l(e,["negativePrompt"]);t!==void 0&&c!=null&&a(t,["parameters","negativePrompt"],c);const f=l(e,["enhancePrompt"]);if(t!==void 0&&f!=null&&a(t,["parameters","enhancePrompt"],f),l(e,["generateAudio"])!==void 0)throw new Error("generateAudio parameter is not supported in Gemini API.");const p=l(e,["lastFrame"]);t!==void 0&&p!=null&&a(t,["instances[0]","lastFrame"],Kt(p));const h=l(e,["referenceImages"]);if(t!==void 0&&h!=null){let m=h;Array.isArray(m)&&(m=m.map(g=>Dg(g))),a(t,["instances[0]","referenceImages"],m)}if(l(e,["mask"])!==void 0)throw new Error("mask parameter is not supported in Gemini API.");if(l(e,["compressionQuality"])!==void 0)throw new Error("compressionQuality parameter is not supported in Gemini API.");return i}function Nm(e,t,n){const i={},o=l(e,["numberOfVideos"]);t!==void 0&&o!=null&&a(t,["parameters","sampleCount"],o);const r=l(e,["outputGcsUri"]);t!==void 0&&r!=null&&a(t,["parameters","storageUri"],r);const s=l(e,["fps"]);t!==void 0&&s!=null&&a(t,["parameters","fps"],s);const u=l(e,["durationSeconds"]);t!==void 0&&u!=null&&a(t,["parameters","durationSeconds"],u);const d=l(e,["seed"]);t!==void 0&&d!=null&&a(t,["parameters","seed"],d);const c=l(e,["aspectRatio"]);t!==void 0&&c!=null&&a(t,["parameters","aspectRatio"],c);const f=l(e,["resolution"]);t!==void 0&&f!=null&&a(t,["parameters","resolution"],f);const p=l(e,["personGeneration"]);t!==void 0&&p!=null&&a(t,["parameters","personGeneration"],p);const h=l(e,["pubsubTopic"]);t!==void 0&&h!=null&&a(t,["parameters","pubsubTopic"],h);const m=l(e,["negativePrompt"]);t!==void 0&&m!=null&&a(t,["parameters","negativePrompt"],m);const g=l(e,["enhancePrompt"]);t!==void 0&&g!=null&&a(t,["parameters","enhancePrompt"],g);const E=l(e,["generateAudio"]);t!==void 0&&E!=null&&a(t,["parameters","generateAudio"],E);const T=l(e,["lastFrame"]);t!==void 0&&T!=null&&a(t,["instances[0]","lastFrame"],_e(T));const S=l(e,["referenceImages"]);if(t!==void 0&&S!=null){let w=S;Array.isArray(w)&&(w=w.map(I=>bg(I))),a(t,["instances[0]","referenceImages"],w)}const x=l(e,["mask"]);t!==void 0&&x!=null&&a(t,["instances[0]","mask"],Ng(x));const C=l(e,["compressionQuality"]);return t!==void 0&&C!=null&&a(t,["parameters","compressionQuality"],C),i}function Dm(e,t){const n={},i=l(e,["name"]);i!=null&&a(n,["name"],i);const o=l(e,["metadata"]);o!=null&&a(n,["metadata"],o);const r=l(e,["done"]);r!=null&&a(n,["done"],r);const s=l(e,["error"]);s!=null&&a(n,["error"],s);const u=l(e,["response","generateVideoResponse"]);return u!=null&&a(n,["response"],Fm(u)),n}function bm(e,t){const n={},i=l(e,["name"]);i!=null&&a(n,["name"],i);const o=l(e,["metadata"]);o!=null&&a(n,["metadata"],o);const r=l(e,["done"]);r!=null&&a(n,["done"],r);const s=l(e,["error"]);s!=null&&a(n,["error"],s);const u=l(e,["response"]);return u!=null&&a(n,["response"],Vm(u)),n}function Lm(e,t,n){const i={},o=l(t,["model"]);o!=null&&a(i,["_url","model"],$(e,o));const r=l(t,["prompt"]);r!=null&&a(i,["instances[0]","prompt"],r);const s=l(t,["image"]);s!=null&&a(i,["instances[0]","image"],Kt(s));const u=l(t,["video"]);u!=null&&a(i,["instances[0]","video"],Ls(u));const d=l(t,["source"]);d!=null&&Gm(d,i);const c=l(t,["config"]);return c!=null&&Mm(c,i),i}function Um(e,t,n){const i={},o=l(t,["model"]);o!=null&&a(i,["_url","model"],$(e,o));const r=l(t,["prompt"]);r!=null&&a(i,["instances[0]","prompt"],r);const s=l(t,["image"]);s!=null&&a(i,["instances[0]","image"],_e(s));const u=l(t,["video"]);u!=null&&a(i,["instances[0]","video"],Us(u));const d=l(t,["source"]);d!=null&&Hm(d,i);const c=l(t,["config"]);return c!=null&&Nm(c,i),i}function Fm(e,t){const n={},i=l(e,["generatedSamples"]);if(i!=null){let s=i;Array.isArray(s)&&(s=s.map(u=>Om(u))),a(n,["generatedVideos"],s)}const o=l(e,["raiMediaFilteredCount"]);o!=null&&a(n,["raiMediaFilteredCount"],o);const r=l(e,["raiMediaFilteredReasons"]);return r!=null&&a(n,["raiMediaFilteredReasons"],r),n}function Vm(e,t){const n={},i=l(e,["videos"]);if(i!=null){let s=i;Array.isArray(s)&&(s=s.map(u=>zm(u))),a(n,["generatedVideos"],s)}const o=l(e,["raiMediaFilteredCount"]);o!=null&&a(n,["raiMediaFilteredCount"],o);const r=l(e,["raiMediaFilteredReasons"]);return r!=null&&a(n,["raiMediaFilteredReasons"],r),n}function Gm(e,t,n){const i={},o=l(e,["prompt"]);t!==void 0&&o!=null&&a(t,["instances[0]","prompt"],o);const r=l(e,["image"]);t!==void 0&&r!=null&&a(t,["instances[0]","image"],Kt(r));const s=l(e,["video"]);return t!==void 0&&s!=null&&a(t,["instances[0]","video"],Ls(s)),i}function Hm(e,t,n){const i={},o=l(e,["prompt"]);t!==void 0&&o!=null&&a(t,["instances[0]","prompt"],o);const r=l(e,["image"]);t!==void 0&&r!=null&&a(t,["instances[0]","image"],_e(r));const s=l(e,["video"]);return t!==void 0&&s!=null&&a(t,["instances[0]","video"],Us(s)),i}function Bm(e,t){const n={},i=l(e,["_self"]);i!=null&&a(n,["image"],Zm(i));const o=l(e,["raiFilteredReason"]);o!=null&&a(n,["raiFilteredReason"],o);const r=l(e,["_self"]);return r!=null&&a(n,["safetyAttributes"],Ns(r)),n}function Yt(e,t){const n={},i=l(e,["_self"]);i!=null&&a(n,["image"],Ms(i));const o=l(e,["raiFilteredReason"]);o!=null&&a(n,["raiFilteredReason"],o);const r=l(e,["_self"]);r!=null&&a(n,["safetyAttributes"],Ds(r));const s=l(e,["prompt"]);return s!=null&&a(n,["enhancedPrompt"],s),n}function qm(e,t){const n={},i=l(e,["_self"]);i!=null&&a(n,["mask"],Ms(i));const o=l(e,["labels"]);if(o!=null){let r=o;Array.isArray(r)&&(r=r.map(s=>s)),a(n,["labels"],r)}return n}function Om(e,t){const n={},i=l(e,["video"]);return i!=null&&a(n,["video"],kg(i)),n}function zm(e,t){const n={},i=l(e,["_self"]);return i!=null&&a(n,["video"],Mg(i)),n}function Jm(e,t){const n={},i=l(e,["modelSelectionConfig"]);i!=null&&a(n,["modelConfig"],i);const o=l(e,["responseJsonSchema"]);o!=null&&a(n,["responseJsonSchema"],o);const r=l(e,["audioTimestamp"]);r!=null&&a(n,["audioTimestamp"],r);const s=l(e,["candidateCount"]);s!=null&&a(n,["candidateCount"],s);const u=l(e,["enableAffectiveDialog"]);u!=null&&a(n,["enableAffectiveDialog"],u);const d=l(e,["frequencyPenalty"]);d!=null&&a(n,["frequencyPenalty"],d);const c=l(e,["logprobs"]);c!=null&&a(n,["logprobs"],c);const f=l(e,["maxOutputTokens"]);f!=null&&a(n,["maxOutputTokens"],f);const p=l(e,["mediaResolution"]);p!=null&&a(n,["mediaResolution"],p);const h=l(e,["presencePenalty"]);h!=null&&a(n,["presencePenalty"],h);const m=l(e,["responseLogprobs"]);m!=null&&a(n,["responseLogprobs"],m);const g=l(e,["responseMimeType"]);g!=null&&a(n,["responseMimeType"],g);const E=l(e,["responseModalities"]);E!=null&&a(n,["responseModalities"],E);const T=l(e,["responseSchema"]);T!=null&&a(n,["responseSchema"],T);const S=l(e,["routingConfig"]);S!=null&&a(n,["routingConfig"],S);const x=l(e,["seed"]);x!=null&&a(n,["seed"],x);const C=l(e,["speechConfig"]);C!=null&&a(n,["speechConfig"],C);const w=l(e,["stopSequences"]);w!=null&&a(n,["stopSequences"],w);const I=l(e,["temperature"]);I!=null&&a(n,["temperature"],I);const _=l(e,["thinkingConfig"]);_!=null&&a(n,["thinkingConfig"],_);const b=l(e,["topK"]);b!=null&&a(n,["topK"],b);const V=l(e,["topP"]);if(V!=null&&a(n,["topP"],V),l(e,["enableEnhancedCivicAnswers"])!==void 0)throw new Error("enableEnhancedCivicAnswers parameter is not supported in Vertex AI.");return n}function $m(e,t,n){const i={},o=l(t,["model"]);return o!=null&&a(i,["_url","name"],$(e,o)),i}function Wm(e,t,n){const i={},o=l(t,["model"]);return o!=null&&a(i,["_url","name"],$(e,o)),i}function Ym(e,t){const n={};if(l(e,["authConfig"])!==void 0)throw new Error("authConfig parameter is not supported in Gemini API.");const i=l(e,["enableWidget"]);return i!=null&&a(n,["enableWidget"],i),n}function Km(e,t){const n={};if(l(e,["excludeDomains"])!==void 0)throw new Error("excludeDomains parameter is not supported in Gemini API.");if(l(e,["blockingConfidence"])!==void 0)throw new Error("blockingConfidence parameter is not supported in Gemini API.");const i=l(e,["timeRangeFilter"]);return i!=null&&a(n,["timeRangeFilter"],i),n}function Xm(e,t){const n={},i=l(e,["aspectRatio"]);i!=null&&a(n,["aspectRatio"],i);const o=l(e,["imageSize"]);if(o!=null&&a(n,["imageSize"],o),l(e,["personGeneration"])!==void 0)throw new Error("personGeneration parameter is not supported in Gemini API.");if(l(e,["outputMimeType"])!==void 0)throw new Error("outputMimeType parameter is not supported in Gemini API.");if(l(e,["outputCompressionQuality"])!==void 0)throw new Error("outputCompressionQuality parameter is not supported in Gemini API.");return n}function Qm(e,t){const n={},i=l(e,["aspectRatio"]);i!=null&&a(n,["aspectRatio"],i);const o=l(e,["imageSize"]);o!=null&&a(n,["imageSize"],o);const r=l(e,["personGeneration"]);r!=null&&a(n,["personGeneration"],r);const s=l(e,["outputMimeType"]);s!=null&&a(n,["imageOutputOptions","mimeType"],s);const u=l(e,["outputCompressionQuality"]);return u!=null&&a(n,["imageOutputOptions","compressionQuality"],u),n}function Zm(e,t){const n={},i=l(e,["bytesBase64Encoded"]);i!=null&&a(n,["imageBytes"],Ue(i));const o=l(e,["mimeType"]);return o!=null&&a(n,["mimeType"],o),n}function Ms(e,t){const n={},i=l(e,["gcsUri"]);i!=null&&a(n,["gcsUri"],i);const o=l(e,["bytesBase64Encoded"]);o!=null&&a(n,["imageBytes"],Ue(o));const r=l(e,["mimeType"]);return r!=null&&a(n,["mimeType"],r),n}function Kt(e,t){const n={};if(l(e,["gcsUri"])!==void 0)throw new Error("gcsUri parameter is not supported in Gemini API.");const i=l(e,["imageBytes"]);i!=null&&a(n,["bytesBase64Encoded"],Ue(i));const o=l(e,["mimeType"]);return o!=null&&a(n,["mimeType"],o),n}function _e(e,t){const n={},i=l(e,["gcsUri"]);i!=null&&a(n,["gcsUri"],i);const o=l(e,["imageBytes"]);o!=null&&a(n,["bytesBase64Encoded"],Ue(o));const r=l(e,["mimeType"]);return r!=null&&a(n,["mimeType"],r),n}function jm(e,t,n,i){const o={},r=l(t,["pageSize"]);n!==void 0&&r!=null&&a(n,["_query","pageSize"],r);const s=l(t,["pageToken"]);n!==void 0&&s!=null&&a(n,["_query","pageToken"],s);const u=l(t,["filter"]);n!==void 0&&u!=null&&a(n,["_query","filter"],u);const d=l(t,["queryBase"]);return n!==void 0&&d!=null&&a(n,["_url","models_url"],Is(e,d)),o}function eg(e,t,n,i){const o={},r=l(t,["pageSize"]);n!==void 0&&r!=null&&a(n,["_query","pageSize"],r);const s=l(t,["pageToken"]);n!==void 0&&s!=null&&a(n,["_query","pageToken"],s);const u=l(t,["filter"]);n!==void 0&&u!=null&&a(n,["_query","filter"],u);const d=l(t,["queryBase"]);return n!==void 0&&d!=null&&a(n,["_url","models_url"],Is(e,d)),o}function tg(e,t,n){const i={},o=l(t,["config"]);return o!=null&&jm(e,o,i),i}function ng(e,t,n){const i={},o=l(t,["config"]);return o!=null&&eg(e,o,i),i}function ig(e,t){const n={},i=l(e,["sdkHttpResponse"]);i!=null&&a(n,["sdkHttpResponse"],i);const o=l(e,["nextPageToken"]);o!=null&&a(n,["nextPageToken"],o);const r=l(e,["_self"]);if(r!=null){let s=As(r);Array.isArray(s)&&(s=s.map(u=>Dn(u))),a(n,["models"],s)}return n}function og(e,t){const n={},i=l(e,["sdkHttpResponse"]);i!=null&&a(n,["sdkHttpResponse"],i);const o=l(e,["nextPageToken"]);o!=null&&a(n,["nextPageToken"],o);const r=l(e,["_self"]);if(r!=null){let s=As(r);Array.isArray(s)&&(s=s.map(u=>bn(u))),a(n,["models"],s)}return n}function rg(e,t){const n={},i=l(e,["maskMode"]);i!=null&&a(n,["maskMode"],i);const o=l(e,["segmentationClasses"]);o!=null&&a(n,["maskClasses"],o);const r=l(e,["maskDilation"]);return r!=null&&a(n,["dilation"],r),n}function Dn(e,t){const n={},i=l(e,["name"]);i!=null&&a(n,["name"],i);const o=l(e,["displayName"]);o!=null&&a(n,["displayName"],o);const r=l(e,["description"]);r!=null&&a(n,["description"],r);const s=l(e,["version"]);s!=null&&a(n,["version"],s);const u=l(e,["_self"]);u!=null&&a(n,["tunedModelInfo"],Sg(u));const d=l(e,["inputTokenLimit"]);d!=null&&a(n,["inputTokenLimit"],d);const c=l(e,["outputTokenLimit"]);c!=null&&a(n,["outputTokenLimit"],c);const f=l(e,["supportedGenerationMethods"]);f!=null&&a(n,["supportedActions"],f);const p=l(e,["temperature"]);p!=null&&a(n,["temperature"],p);const h=l(e,["maxTemperature"]);h!=null&&a(n,["maxTemperature"],h);const m=l(e,["topP"]);m!=null&&a(n,["topP"],m);const g=l(e,["topK"]);g!=null&&a(n,["topK"],g);const E=l(e,["thinking"]);return E!=null&&a(n,["thinking"],E),n}function bn(e,t){const n={},i=l(e,["name"]);i!=null&&a(n,["name"],i);const o=l(e,["displayName"]);o!=null&&a(n,["displayName"],o);const r=l(e,["description"]);r!=null&&a(n,["description"],r);const s=l(e,["versionId"]);s!=null&&a(n,["version"],s);const u=l(e,["deployedModels"]);if(u!=null){let h=u;Array.isArray(h)&&(h=h.map(m=>vm(m))),a(n,["endpoints"],h)}const d=l(e,["labels"]);d!=null&&a(n,["labels"],d);const c=l(e,["_self"]);c!=null&&a(n,["tunedModelInfo"],_g(c));const f=l(e,["defaultCheckpointId"]);f!=null&&a(n,["defaultCheckpointId"],f);const p=l(e,["checkpoints"]);if(p!=null){let h=p;Array.isArray(h)&&(h=h.map(m=>m)),a(n,["checkpoints"],h)}return n}function sg(e,t){const n={},i=l(e,["mediaResolution"]);i!=null&&a(n,["mediaResolution"],i);const o=l(e,["codeExecutionResult"]);o!=null&&a(n,["codeExecutionResult"],o);const r=l(e,["executableCode"]);r!=null&&a(n,["executableCode"],r);const s=l(e,["fileData"]);s!=null&&a(n,["fileData"],Tm(s));const u=l(e,["functionCall"]);u!=null&&a(n,["functionCall"],Em(u));const d=l(e,["functionResponse"]);d!=null&&a(n,["functionResponse"],d);const c=l(e,["inlineData"]);c!=null&&a(n,["inlineData"],Jh(c));const f=l(e,["text"]);f!=null&&a(n,["text"],f);const p=l(e,["thought"]);p!=null&&a(n,["thought"],p);const h=l(e,["thoughtSignature"]);h!=null&&a(n,["thoughtSignature"],h);const m=l(e,["videoMetadata"]);return m!=null&&a(n,["videoMetadata"],m),n}function lg(e,t){const n={},i=l(e,["productImage"]);return i!=null&&a(n,["image"],_e(i)),n}function ag(e,t,n){const i={},o=l(e,["numberOfImages"]);t!==void 0&&o!=null&&a(t,["parameters","sampleCount"],o);const r=l(e,["baseSteps"]);t!==void 0&&r!=null&&a(t,["parameters","baseSteps"],r);const s=l(e,["outputGcsUri"]);t!==void 0&&s!=null&&a(t,["parameters","storageUri"],s);const u=l(e,["seed"]);t!==void 0&&u!=null&&a(t,["parameters","seed"],u);const d=l(e,["safetyFilterLevel"]);t!==void 0&&d!=null&&a(t,["parameters","safetySetting"],d);const c=l(e,["personGeneration"]);t!==void 0&&c!=null&&a(t,["parameters","personGeneration"],c);const f=l(e,["addWatermark"]);t!==void 0&&f!=null&&a(t,["parameters","addWatermark"],f);const p=l(e,["outputMimeType"]);t!==void 0&&p!=null&&a(t,["parameters","outputOptions","mimeType"],p);const h=l(e,["outputCompressionQuality"]);t!==void 0&&h!=null&&a(t,["parameters","outputOptions","compressionQuality"],h);const m=l(e,["enhancePrompt"]);t!==void 0&&m!=null&&a(t,["parameters","enhancePrompt"],m);const g=l(e,["labels"]);return t!==void 0&&g!=null&&a(t,["labels"],g),i}function ug(e,t,n){const i={},o=l(t,["model"]);o!=null&&a(i,["_url","model"],$(e,o));const r=l(t,["source"]);r!=null&&dg(r,i);const s=l(t,["config"]);return s!=null&&ag(s,i),i}function cg(e,t){const n={},i=l(e,["predictions"]);if(i!=null){let o=i;Array.isArray(o)&&(o=o.map(r=>Yt(r))),a(n,["generatedImages"],o)}return n}function dg(e,t,n){const i={},o=l(e,["prompt"]);t!==void 0&&o!=null&&a(t,["instances[0]","prompt"],o);const r=l(e,["personImage"]);t!==void 0&&r!=null&&a(t,["instances[0]","personImage","image"],_e(r));const s=l(e,["productImages"]);if(t!==void 0&&s!=null){let u=s;Array.isArray(u)&&(u=u.map(d=>lg(d))),a(t,["instances[0]","productImages"],u)}return i}function fg(e,t){const n={},i=l(e,["referenceImage"]);i!=null&&a(n,["referenceImage"],_e(i));const o=l(e,["referenceId"]);o!=null&&a(n,["referenceId"],o);const r=l(e,["referenceType"]);r!=null&&a(n,["referenceType"],r);const s=l(e,["maskImageConfig"]);s!=null&&a(n,["maskImageConfig"],rg(s));const u=l(e,["controlImageConfig"]);u!=null&&a(n,["controlImageConfig"],Zh(u));const d=l(e,["styleImageConfig"]);d!=null&&a(n,["styleImageConfig"],d);const c=l(e,["subjectImageConfig"]);return c!=null&&a(n,["subjectImageConfig"],c),n}function Ns(e,t){const n={},i=l(e,["safetyAttributes","categories"]);i!=null&&a(n,["categories"],i);const o=l(e,["safetyAttributes","scores"]);o!=null&&a(n,["scores"],o);const r=l(e,["contentType"]);return r!=null&&a(n,["contentType"],r),n}function Ds(e,t){const n={},i=l(e,["safetyAttributes","categories"]);i!=null&&a(n,["categories"],i);const o=l(e,["safetyAttributes","scores"]);o!=null&&a(n,["scores"],o);const r=l(e,["contentType"]);return r!=null&&a(n,["contentType"],r),n}function pg(e,t){const n={},i=l(e,["category"]);if(i!=null&&a(n,["category"],i),l(e,["method"])!==void 0)throw new Error("method parameter is not supported in Gemini API.");const o=l(e,["threshold"]);return o!=null&&a(n,["threshold"],o),n}function hg(e,t){const n={},i=l(e,["image"]);return i!=null&&a(n,["image"],_e(i)),n}function mg(e,t,n){const i={},o=l(e,["mode"]);t!==void 0&&o!=null&&a(t,["parameters","mode"],o);const r=l(e,["maxPredictions"]);t!==void 0&&r!=null&&a(t,["parameters","maxPredictions"],r);const s=l(e,["confidenceThreshold"]);t!==void 0&&s!=null&&a(t,["parameters","confidenceThreshold"],s);const u=l(e,["maskDilation"]);t!==void 0&&u!=null&&a(t,["parameters","maskDilation"],u);const d=l(e,["binaryColorThreshold"]);t!==void 0&&d!=null&&a(t,["parameters","binaryColorThreshold"],d);const c=l(e,["labels"]);return t!==void 0&&c!=null&&a(t,["labels"],c),i}function gg(e,t,n){const i={},o=l(t,["model"]);o!=null&&a(i,["_url","model"],$(e,o));const r=l(t,["source"]);r!=null&&vg(r,i);const s=l(t,["config"]);return s!=null&&mg(s,i),i}function yg(e,t){const n={},i=l(e,["predictions"]);if(i!=null){let o=i;Array.isArray(o)&&(o=o.map(r=>qm(r))),a(n,["generatedMasks"],o)}return n}function vg(e,t,n){const i={},o=l(e,["prompt"]);t!==void 0&&o!=null&&a(t,["instances[0]","prompt"],o);const r=l(e,["image"]);t!==void 0&&r!=null&&a(t,["instances[0]","image"],_e(r));const s=l(e,["scribbleImage"]);return t!==void 0&&s!=null&&a(t,["instances[0]","scribble"],hg(s)),i}function Tg(e,t){const n={},i=l(e,["retrievalConfig"]);i!=null&&a(n,["retrievalConfig"],i);const o=l(e,["functionCallingConfig"]);return o!=null&&a(n,["functionCallingConfig"],Sm(o)),n}function Eg(e,t){const n={};if(l(e,["retrieval"])!==void 0)throw new Error("retrieval parameter is not supported in Gemini API.");const i=l(e,["computerUse"]);i!=null&&a(n,["computerUse"],i);const o=l(e,["fileSearch"]);o!=null&&a(n,["fileSearch"],o);const r=l(e,["codeExecution"]);if(r!=null&&a(n,["codeExecution"],r),l(e,["enterpriseWebSearch"])!==void 0)throw new Error("enterpriseWebSearch parameter is not supported in Gemini API.");const s=l(e,["functionDeclarations"]);if(s!=null){let p=s;Array.isArray(p)&&(p=p.map(h=>h)),a(n,["functionDeclarations"],p)}const u=l(e,["googleMaps"]);u!=null&&a(n,["googleMaps"],Ym(u));const d=l(e,["googleSearch"]);d!=null&&a(n,["googleSearch"],Km(d));const c=l(e,["googleSearchRetrieval"]);c!=null&&a(n,["googleSearchRetrieval"],c);const f=l(e,["urlContext"]);return f!=null&&a(n,["urlContext"],f),n}function bs(e,t){const n={},i=l(e,["retrieval"]);i!=null&&a(n,["retrieval"],i);const o=l(e,["computerUse"]);if(o!=null&&a(n,["computerUse"],o),l(e,["fileSearch"])!==void 0)throw new Error("fileSearch parameter is not supported in Vertex AI.");const r=l(e,["codeExecution"]);r!=null&&a(n,["codeExecution"],r);const s=l(e,["enterpriseWebSearch"]);s!=null&&a(n,["enterpriseWebSearch"],s);const u=l(e,["functionDeclarations"]);if(u!=null){let h=u;Array.isArray(h)&&(h=h.map(m=>_m(m))),a(n,["functionDeclarations"],h)}const d=l(e,["googleMaps"]);d!=null&&a(n,["googleMaps"],d);const c=l(e,["googleSearch"]);c!=null&&a(n,["googleSearch"],c);const f=l(e,["googleSearchRetrieval"]);f!=null&&a(n,["googleSearchRetrieval"],f);const p=l(e,["urlContext"]);return p!=null&&a(n,["urlContext"],p),n}function Sg(e,t){const n={},i=l(e,["baseModel"]);i!=null&&a(n,["baseModel"],i);const o=l(e,["createTime"]);o!=null&&a(n,["createTime"],o);const r=l(e,["updateTime"]);return r!=null&&a(n,["updateTime"],r),n}function _g(e,t){const n={},i=l(e,["labels","google-vertex-llm-tuning-base-model-id"]);i!=null&&a(n,["baseModel"],i);const o=l(e,["createTime"]);o!=null&&a(n,["createTime"],o);const r=l(e,["updateTime"]);return r!=null&&a(n,["updateTime"],r),n}function Cg(e,t,n){const i={},o=l(e,["displayName"]);t!==void 0&&o!=null&&a(t,["displayName"],o);const r=l(e,["description"]);t!==void 0&&r!=null&&a(t,["description"],r);const s=l(e,["defaultCheckpointId"]);return t!==void 0&&s!=null&&a(t,["defaultCheckpointId"],s),i}function Ig(e,t,n){const i={},o=l(e,["displayName"]);t!==void 0&&o!=null&&a(t,["displayName"],o);const r=l(e,["description"]);t!==void 0&&r!=null&&a(t,["description"],r);const s=l(e,["defaultCheckpointId"]);return t!==void 0&&s!=null&&a(t,["defaultCheckpointId"],s),i}function Ag(e,t,n){const i={},o=l(t,["model"]);o!=null&&a(i,["_url","name"],$(e,o));const r=l(t,["config"]);return r!=null&&Cg(r,i),i}function xg(e,t,n){const i={},o=l(t,["model"]);o!=null&&a(i,["_url","model"],$(e,o));const r=l(t,["config"]);return r!=null&&Ig(r,i),i}function wg(e,t,n){const i={},o=l(e,["outputGcsUri"]);t!==void 0&&o!=null&&a(t,["parameters","storageUri"],o);const r=l(e,["safetyFilterLevel"]);t!==void 0&&r!=null&&a(t,["parameters","safetySetting"],r);const s=l(e,["personGeneration"]);t!==void 0&&s!=null&&a(t,["parameters","personGeneration"],s);const u=l(e,["includeRaiReason"]);t!==void 0&&u!=null&&a(t,["parameters","includeRaiReason"],u);const d=l(e,["outputMimeType"]);t!==void 0&&d!=null&&a(t,["parameters","outputOptions","mimeType"],d);const c=l(e,["outputCompressionQuality"]);t!==void 0&&c!=null&&a(t,["parameters","outputOptions","compressionQuality"],c);const f=l(e,["enhanceInputImage"]);t!==void 0&&f!=null&&a(t,["parameters","upscaleConfig","enhanceInputImage"],f);const p=l(e,["imagePreservationFactor"]);t!==void 0&&p!=null&&a(t,["parameters","upscaleConfig","imagePreservationFactor"],p);const h=l(e,["labels"]);t!==void 0&&h!=null&&a(t,["labels"],h);const m=l(e,["numberOfImages"]);t!==void 0&&m!=null&&a(t,["parameters","sampleCount"],m);const g=l(e,["mode"]);return t!==void 0&&g!=null&&a(t,["parameters","mode"],g),i}function Rg(e,t,n){const i={},o=l(t,["model"]);o!=null&&a(i,["_url","model"],$(e,o));const r=l(t,["image"]);r!=null&&a(i,["instances[0]","image"],_e(r));const s=l(t,["upscaleFactor"]);s!=null&&a(i,["parameters","upscaleConfig","upscaleFactor"],s);const u=l(t,["config"]);return u!=null&&wg(u,i),i}function Pg(e,t){const n={},i=l(e,["sdkHttpResponse"]);i!=null&&a(n,["sdkHttpResponse"],i);const o=l(e,["predictions"]);if(o!=null){let r=o;Array.isArray(r)&&(r=r.map(s=>Yt(s))),a(n,["generatedImages"],r)}return n}function kg(e,t){const n={},i=l(e,["uri"]);i!=null&&a(n,["uri"],i);const o=l(e,["encodedVideo"]);o!=null&&a(n,["videoBytes"],Ue(o));const r=l(e,["encoding"]);return r!=null&&a(n,["mimeType"],r),n}function Mg(e,t){const n={},i=l(e,["gcsUri"]);i!=null&&a(n,["uri"],i);const o=l(e,["bytesBase64Encoded"]);o!=null&&a(n,["videoBytes"],Ue(o));const r=l(e,["mimeType"]);return r!=null&&a(n,["mimeType"],r),n}function Ng(e,t){const n={},i=l(e,["image"]);i!=null&&a(n,["_self"],_e(i));const o=l(e,["maskMode"]);return o!=null&&a(n,["maskMode"],o),n}function Dg(e,t){const n={},i=l(e,["image"]);i!=null&&a(n,["image"],Kt(i));const o=l(e,["referenceType"]);return o!=null&&a(n,["referenceType"],o),n}function bg(e,t){const n={},i=l(e,["image"]);i!=null&&a(n,["image"],_e(i));const o=l(e,["referenceType"]);return o!=null&&a(n,["referenceType"],o),n}function Ls(e,t){const n={},i=l(e,["uri"]);i!=null&&a(n,["uri"],i);const o=l(e,["videoBytes"]);o!=null&&a(n,["encodedVideo"],Ue(o));const r=l(e,["mimeType"]);return r!=null&&a(n,["encoding"],r),n}function Us(e,t){const n={},i=l(e,["uri"]);i!=null&&a(n,["gcsUri"],i);const o=l(e,["videoBytes"]);o!=null&&a(n,["bytesBase64Encoded"],Ue(o));const r=l(e,["mimeType"]);return r!=null&&a(n,["mimeType"],r),n}/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */function Lg(e,t){const n={},i=l(e,["displayName"]);return t!==void 0&&i!=null&&a(t,["displayName"],i),n}function Ug(e){const t={},n=l(e,["config"]);return n!=null&&Lg(n,t),t}function Fg(e,t){const n={},i=l(e,["force"]);return t!==void 0&&i!=null&&a(t,["_query","force"],i),n}function Vg(e){const t={},n=l(e,["name"]);n!=null&&a(t,["_url","name"],n);const i=l(e,["config"]);return i!=null&&Fg(i,t),t}function Gg(e){const t={},n=l(e,["name"]);return n!=null&&a(t,["_url","name"],n),t}function Hg(e,t){const n={},i=l(e,["customMetadata"]);if(t!==void 0&&i!=null){let r=i;Array.isArray(r)&&(r=r.map(s=>s)),a(t,["customMetadata"],r)}const o=l(e,["chunkingConfig"]);return t!==void 0&&o!=null&&a(t,["chunkingConfig"],o),n}function Bg(e){const t={},n=l(e,["name"]);n!=null&&a(t,["name"],n);const i=l(e,["metadata"]);i!=null&&a(t,["metadata"],i);const o=l(e,["done"]);o!=null&&a(t,["done"],o);const r=l(e,["error"]);r!=null&&a(t,["error"],r);const s=l(e,["response"]);return s!=null&&a(t,["response"],Og(s)),t}function qg(e){const t={},n=l(e,["fileSearchStoreName"]);n!=null&&a(t,["_url","file_search_store_name"],n);const i=l(e,["fileName"]);i!=null&&a(t,["fileName"],i);const o=l(e,["config"]);return o!=null&&Hg(o,t),t}function Og(e){const t={},n=l(e,["sdkHttpResponse"]);n!=null&&a(t,["sdkHttpResponse"],n);const i=l(e,["parent"]);i!=null&&a(t,["parent"],i);const o=l(e,["documentName"]);return o!=null&&a(t,["documentName"],o),t}function zg(e,t){const n={},i=l(e,["pageSize"]);t!==void 0&&i!=null&&a(t,["_query","pageSize"],i);const o=l(e,["pageToken"]);return t!==void 0&&o!=null&&a(t,["_query","pageToken"],o),n}function Jg(e){const t={},n=l(e,["config"]);return n!=null&&zg(n,t),t}function $g(e){const t={},n=l(e,["sdkHttpResponse"]);n!=null&&a(t,["sdkHttpResponse"],n);const i=l(e,["nextPageToken"]);i!=null&&a(t,["nextPageToken"],i);const o=l(e,["fileSearchStores"]);if(o!=null){let r=o;Array.isArray(r)&&(r=r.map(s=>s)),a(t,["fileSearchStores"],r)}return t}function Fs(e,t){const n={},i=l(e,["mimeType"]);t!==void 0&&i!=null&&a(t,["mimeType"],i);const o=l(e,["displayName"]);t!==void 0&&o!=null&&a(t,["displayName"],o);const r=l(e,["customMetadata"]);if(t!==void 0&&r!=null){let u=r;Array.isArray(u)&&(u=u.map(d=>d)),a(t,["customMetadata"],u)}const s=l(e,["chunkingConfig"]);return t!==void 0&&s!=null&&a(t,["chunkingConfig"],s),n}function Wg(e){const t={},n=l(e,["fileSearchStoreName"]);n!=null&&a(t,["_url","file_search_store_name"],n);const i=l(e,["config"]);return i!=null&&Fs(i,t),t}function Yg(e){const t={},n=l(e,["sdkHttpResponse"]);return n!=null&&a(t,["sdkHttpResponse"],n),t}/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */const Kg="Content-Type",Xg="X-Server-Timeout",Qg="User-Agent",Ln="x-goog-api-client",Zg="1.39.0",jg=`google-genai-sdk/${Zg}`,ey="v1beta1",ty="v1beta";class ny{constructor(t){var n,i,o;this.clientOptions=Object.assign({},t),this.customBaseUrl=(n=t.httpOptions)===null||n===void 0?void 0:n.baseUrl,this.clientOptions.vertexai&&(this.clientOptions.project&&this.clientOptions.location?this.clientOptions.apiKey=void 0:this.clientOptions.apiKey&&(this.clientOptions.project=void 0,this.clientOptions.location=void 0));const r={};if(this.clientOptions.vertexai){if(!this.clientOptions.location&&!this.clientOptions.apiKey&&!this.customBaseUrl&&(this.clientOptions.location="global"),!(this.clientOptions.project&&this.clientOptions.location||this.clientOptions.apiKey)&&!this.customBaseUrl)throw new Error("Authentication is not set up. Please provide either a project and location, or an API key, or a custom base URL.");const u=t.project&&t.location||!!t.apiKey;this.customBaseUrl&&!u?(r.baseUrl=this.customBaseUrl,this.clientOptions.project=void 0,this.clientOptions.location=void 0):this.clientOptions.apiKey||this.clientOptions.location==="global"?r.baseUrl="https://aiplatform.googleapis.com/":this.clientOptions.project&&this.clientOptions.location&&(r.baseUrl=`https://${this.clientOptions.location}-aiplatform.googleapis.com/`),r.apiVersion=(i=this.clientOptions.apiVersion)!==null&&i!==void 0?i:ey}else{if(!this.clientOptions.apiKey)throw new Et({message:"API key must be set when using the Gemini API.",status:403});r.apiVersion=(o=this.clientOptions.apiVersion)!==null&&o!==void 0?o:ty,r.baseUrl="https://generativelanguage.googleapis.com/"}r.headers=this.getDefaultHeaders(),this.clientOptions.httpOptions=r,t.httpOptions&&(this.clientOptions.httpOptions=this.patchHttpOptions(r,t.httpOptions))}isVertexAI(){var t;return(t=this.clientOptions.vertexai)!==null&&t!==void 0?t:!1}getProject(){return this.clientOptions.project}getLocation(){return this.clientOptions.location}getCustomBaseUrl(){return this.customBaseUrl}async getAuthHeaders(){const t=new Headers;return await this.clientOptions.auth.addAuthHeaders(t),t}getApiVersion(){if(this.clientOptions.httpOptions&&this.clientOptions.httpOptions.apiVersion!==void 0)return this.clientOptions.httpOptions.apiVersion;throw new Error("API version is not set.")}getBaseUrl(){if(this.clientOptions.httpOptions&&this.clientOptions.httpOptions.baseUrl!==void 0)return this.clientOptions.httpOptions.baseUrl;throw new Error("Base URL is not set.")}getRequestUrl(){return this.getRequestUrlInternal(this.clientOptions.httpOptions)}getHeaders(){if(this.clientOptions.httpOptions&&this.clientOptions.httpOptions.headers!==void 0)return this.clientOptions.httpOptions.headers;throw new Error("Headers are not set.")}getRequestUrlInternal(t){if(!t||t.baseUrl===void 0||t.apiVersion===void 0)throw new Error("HTTP options are not correctly set.");const i=[t.baseUrl.endsWith("/")?t.baseUrl.slice(0,-1):t.baseUrl];return t.apiVersion&&t.apiVersion!==""&&i.push(t.apiVersion),i.join("/")}getBaseResourcePath(){return`projects/${this.clientOptions.project}/locations/${this.clientOptions.location}`}getApiKey(){return this.clientOptions.apiKey}getWebsocketBaseUrl(){const t=this.getBaseUrl(),n=new URL(t);return n.protocol=n.protocol=="http:"?"ws":"wss",n.toString()}setBaseUrl(t){if(this.clientOptions.httpOptions)this.clientOptions.httpOptions.baseUrl=t;else throw new Error("HTTP options are not correctly set.")}constructUrl(t,n,i){const o=[this.getRequestUrlInternal(n)];return i&&o.push(this.getBaseResourcePath()),t!==""&&o.push(t),new URL(`${o.join("/")}`)}shouldPrependVertexProjectPath(t,n){return!(n.baseUrl&&n.baseUrlResourceScope===Pn.COLLECTION||this.clientOptions.apiKey||!this.clientOptions.vertexai||t.path.startsWith("projects/")||t.httpMethod==="GET"&&t.path.startsWith("publishers/google/models"))}async request(t){let n=this.clientOptions.httpOptions;t.httpOptions&&(n=this.patchHttpOptions(this.clientOptions.httpOptions,t.httpOptions));const i=this.shouldPrependVertexProjectPath(t,n),o=this.constructUrl(t.path,n,i);if(t.queryParams)for(const[s,u]of Object.entries(t.queryParams))o.searchParams.append(s,String(u));let r={};if(t.httpMethod==="GET"){if(t.body&&t.body!=="{}")throw new Error("Request body should be empty for GET request, but got non empty request body")}else r.body=t.body;return r=await this.includeExtraHttpOptionsToRequestInit(r,n,o.toString(),t.abortSignal),this.unaryApiCall(o,r,t.httpMethod)}patchHttpOptions(t,n){const i=JSON.parse(JSON.stringify(t));for(const[o,r]of Object.entries(n))typeof r=="object"?i[o]=Object.assign(Object.assign({},i[o]),r):r!==void 0&&(i[o]=r);return i}async requestStream(t){let n=this.clientOptions.httpOptions;t.httpOptions&&(n=this.patchHttpOptions(this.clientOptions.httpOptions,t.httpOptions));const i=this.shouldPrependVertexProjectPath(t,n),o=this.constructUrl(t.path,n,i);(!o.searchParams.has("alt")||o.searchParams.get("alt")!=="sse")&&o.searchParams.set("alt","sse");let r={};return r.body=t.body,r=await this.includeExtraHttpOptionsToRequestInit(r,n,o.toString(),t.abortSignal),this.streamApiCall(o,r,t.httpMethod)}async includeExtraHttpOptionsToRequestInit(t,n,i,o){if(n&&n.timeout||o){const r=new AbortController,s=r.signal;if(n.timeout&&(n==null?void 0:n.timeout)>0){const u=setTimeout(()=>r.abort(),n.timeout);u&&typeof u.unref=="function"&&u.unref()}o&&o.addEventListener("abort",()=>{r.abort()}),t.signal=s}return n&&n.extraBody!==null&&iy(t,n.extraBody),t.headers=await this.getHeadersInternal(n,i),t}async unaryApiCall(t,n,i){return this.apiCall(t.toString(),Object.assign(Object.assign({},n),{method:i})).then(async o=>(await Sr(o),new kn(o))).catch(o=>{throw o instanceof Error?o:new Error(JSON.stringify(o))})}async streamApiCall(t,n,i){return this.apiCall(t.toString(),Object.assign(Object.assign({},n),{method:i})).then(async o=>(await Sr(o),this.processStreamResponse(o))).catch(o=>{throw o instanceof Error?o:new Error(JSON.stringify(o))})}processStreamResponse(t){return Ee(this,arguments,function*(){var i;const o=(i=t==null?void 0:t.body)===null||i===void 0?void 0:i.getReader(),r=new TextDecoder("utf-8");if(!o)throw new Error("Response body is empty");try{let s="";const u="data:",d=[` + +`,"\r\r",`\r +\r +`];for(;;){const{done:c,value:f}=yield H(o.read());if(c){if(s.trim().length>0)throw new Error("Incomplete JSON segment at the end");break}const p=r.decode(f,{stream:!0});try{const g=JSON.parse(p);if("error"in g){const E=JSON.parse(JSON.stringify(g.error)),T=E.status,S=E.code,x=`got status: ${T}. ${JSON.stringify(g)}`;if(S>=400&&S<600)throw new Et({message:x,status:S})}}catch(g){if(g.name==="ApiError")throw g}s+=p;let h=-1,m=0;for(;;){h=-1,m=0;for(const T of d){const S=s.indexOf(T);S!==-1&&(h===-1||S{throw new Error(`exception ${i} sending request`)})}getDefaultHeaders(){const t={},n=jg+" "+this.clientOptions.userAgentExtra;return t[Qg]=n,t[Ln]=n,t[Kg]="application/json",t}async getHeadersInternal(t,n){const i=new Headers;if(t&&t.headers){for(const[o,r]of Object.entries(t.headers))i.append(o,r);t.timeout&&t.timeout>0&&i.append(Xg,String(Math.ceil(t.timeout/1e3)))}return await this.clientOptions.auth.addAuthHeaders(i,n),i}getFileName(t){var n;let i="";return typeof t=="string"&&(i=t.replace(/[/\\]+$/,""),i=(n=i.split(/[/\\]/).pop())!==null&&n!==void 0?n:""),i}async uploadFile(t,n){var i;const o={};n!=null&&(o.mimeType=n.mimeType,o.name=n.name,o.displayName=n.displayName),o.name&&!o.name.startsWith("files/")&&(o.name=`files/${o.name}`);const r=this.clientOptions.uploader,s=await r.stat(t);o.sizeBytes=String(s.size);const u=(i=n==null?void 0:n.mimeType)!==null&&i!==void 0?i:s.type;if(u===void 0||u==="")throw new Error("Can not determine mimeType. Please provide mimeType in the config.");o.mimeType=u;const d={file:o},c=this.getFileName(t),f=N("upload/v1beta/files",d._url),p=await this.fetchUploadUrl(f,o.sizeBytes,o.mimeType,c,d,n==null?void 0:n.httpOptions);return r.upload(t,p,this)}async uploadFileToFileSearchStore(t,n,i){var o;const r=this.clientOptions.uploader,s=await r.stat(n),u=String(s.size),d=(o=i==null?void 0:i.mimeType)!==null&&o!==void 0?o:s.type;if(d===void 0||d==="")throw new Error("Can not determine mimeType. Please provide mimeType in the config.");const c=`upload/v1beta/${t}:uploadToFileSearchStore`,f=this.getFileName(n),p={};i!=null&&Fs(i,p);const h=await this.fetchUploadUrl(c,u,d,f,p,i==null?void 0:i.httpOptions);return r.uploadToFileSearchStore(n,h,this)}async downloadFile(t){await this.clientOptions.downloader.download(t,this)}async fetchUploadUrl(t,n,i,o,r,s){var u;let d={};s?d=s:d={apiVersion:"",headers:Object.assign({"Content-Type":"application/json","X-Goog-Upload-Protocol":"resumable","X-Goog-Upload-Command":"start","X-Goog-Upload-Header-Content-Length":`${n}`,"X-Goog-Upload-Header-Content-Type":`${i}`},o?{"X-Goog-Upload-File-Name":o}:{})};const c=await this.request({path:t,body:JSON.stringify(r),httpMethod:"POST",httpOptions:d});if(!c||!(c!=null&&c.headers))throw new Error("Server did not return an HttpResponse or the returned HttpResponse did not have headers.");const f=(u=c==null?void 0:c.headers)===null||u===void 0?void 0:u["x-goog-upload-url"];if(f===void 0)throw new Error("Failed to get upload url. Server did not return the x-google-upload-url in the headers");return f}}async function Sr(e){var t;if(e===void 0)throw new Error("response is undefined");if(!e.ok){const n=e.status;let i;!((t=e.headers.get("content-type"))===null||t===void 0)&&t.includes("application/json")?i=await e.json():i={error:{message:await e.text(),code:e.status,status:e.statusText}};const o=JSON.stringify(i);throw n>=400&&n<600?new Et({message:o,status:n}):new Error(o)}}function iy(e,t){if(!t||Object.keys(t).length===0)return;if(e.body instanceof Blob){console.warn("includeExtraBodyToRequestInit: extraBody provided but current request body is a Blob. extraBody will be ignored as merging is not supported for Blob bodies.");return}let n={};if(typeof e.body=="string"&&e.body.length>0)try{const r=JSON.parse(e.body);if(typeof r=="object"&&r!==null&&!Array.isArray(r))n=r;else{console.warn("includeExtraBodyToRequestInit: Original request body is valid JSON but not a non-array object. Skip applying extraBody to the request body.");return}}catch{console.warn("includeExtraBodyToRequestInit: Original request body is not valid JSON. Skip applying extraBody to the request body.");return}function i(r,s){const u=Object.assign({},r);for(const d in s)if(Object.prototype.hasOwnProperty.call(s,d)){const c=s[d],f=u[d];c&&typeof c=="object"&&!Array.isArray(c)&&f&&typeof f=="object"&&!Array.isArray(f)?u[d]=i(f,c):(f&&c&&typeof f!=typeof c&&console.warn(`includeExtraBodyToRequestInit:deepMerge: Type mismatch for key "${d}". Original type: ${typeof f}, New type: ${typeof c}. Overwriting.`),u[d]=c)}return u}const o=i(n,t);e.body=JSON.stringify(o)}/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */const oy="mcp_used/unknown";let ry=!1;function Vs(e){for(const t of e)if(sy(t)||typeof t=="object"&&"inputSchema"in t)return!0;return ry}function Gs(e){var t;const n=(t=e[Ln])!==null&&t!==void 0?t:"";e[Ln]=(n+` ${oy}`).trimStart()}function sy(e){return e!==null&&typeof e=="object"&&e instanceof ui}function ly(e){return Ee(this,arguments,function*(n,i=100){let o,r=0;for(;r0)return;const r={},s=[];for(const f of this.mcpClients)try{for(var u=!0,d=(n=void 0,Se(ly(f))),c;c=await d.next(),t=c.done,!t;u=!0){o=c.value,u=!1;const p=o;s.push(p);const h=p.name;if(r[h])throw new Error(`Duplicate function name ${h} found in MCP tools. Please ensure function names are unique.`);r[h]=f}}catch(p){n={error:p}}finally{try{!u&&!t&&(i=d.return)&&await i.call(d)}finally{if(n)throw n.error}}this.mcpTools=s,this.functionNameToMcpClient=r}async tool(){return await this.initialize(),Uf(this.mcpTools,this.config)}async callTool(t){await this.initialize();const n=[];for(const i of t)if(i.name in this.functionNameToMcpClient){const o=this.functionNameToMcpClient[i.name];let r;this.config.timeout&&(r={timeout:this.config.timeout});const s=await o.callTool({name:i.name,arguments:i.args},void 0,r);n.push({functionResponse:{name:i.name,response:s.isError?{error:s}:s}})}return n}}/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */async function ay(e,t,n){const i=new Rf;let o;n.data instanceof Blob?o=JSON.parse(await n.data.text()):o=JSON.parse(n.data),Object.assign(i,o),t(i)}class uy{constructor(t,n,i){this.apiClient=t,this.auth=n,this.webSocketFactory=i}async connect(t){var n,i;if(this.apiClient.isVertexAI())throw new Error("Live music is not supported for Vertex AI.");console.warn("Live music generation is experimental and may change in future versions.");const o=this.apiClient.getWebsocketBaseUrl(),r=this.apiClient.getApiVersion(),s=fy(this.apiClient.getDefaultHeaders()),u=this.apiClient.getApiKey(),d=`${o}/ws/google.ai.generativelanguage.${r}.GenerativeService.BidiGenerateMusic?key=${u}`;let c=()=>{};const f=new Promise(C=>{c=C}),p=t.callbacks,h=function(){c({})},m=this.apiClient,g={onopen:h,onmessage:C=>{ay(m,p.onmessage,C)},onerror:(n=p==null?void 0:p.onerror)!==null&&n!==void 0?n:function(C){},onclose:(i=p==null?void 0:p.onclose)!==null&&i!==void 0?i:function(C){}},E=this.webSocketFactory.create(d,dy(s),g);E.connect(),await f;const x={setup:{model:$(this.apiClient,t.model)}};return E.send(JSON.stringify(x)),new cy(E,this.apiClient)}}class cy{constructor(t,n){this.conn=t,this.apiClient=n}async setWeightedPrompts(t){if(!t.weightedPrompts||Object.keys(t.weightedPrompts).length===0)throw new Error("Weighted prompts must be set and contain at least one entry.");const n=Lh(t);this.conn.send(JSON.stringify({clientContent:n}))}async setMusicGenerationConfig(t){t.musicGenerationConfig||(t.musicGenerationConfig={});const n=bh(t);this.conn.send(JSON.stringify(n))}sendPlaybackControl(t){const n={playbackControl:t};this.conn.send(JSON.stringify(n))}play(){this.sendPlaybackControl(Ke.PLAY)}pause(){this.sendPlaybackControl(Ke.PAUSE)}stop(){this.sendPlaybackControl(Ke.STOP)}resetContext(){this.sendPlaybackControl(Ke.RESET_CONTEXT)}close(){this.conn.close()}}function dy(e){const t={};return e.forEach((n,i)=>{t[i]=n}),t}function fy(e){const t=new Headers;for(const[n,i]of Object.entries(e))t.append(n,i);return t}/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */const py="FunctionResponse request must have an `id` field from the response of a ToolCall.FunctionalCalls in Google AI.";async function hy(e,t,n){const i=new wf;let o;n.data instanceof Blob?o=await n.data.text():n.data instanceof ArrayBuffer?o=new TextDecoder().decode(n.data):o=n.data;const r=JSON.parse(o);if(e.isVertexAI()){const s=Vh(r);Object.assign(i,s)}else Object.assign(i,r);t(i)}class my{constructor(t,n,i){this.apiClient=t,this.auth=n,this.webSocketFactory=i,this.music=new uy(this.apiClient,this.auth,this.webSocketFactory)}async connect(t){var n,i,o,r,s,u;if(t.config&&t.config.httpOptions)throw new Error("The Live module does not support httpOptions at request-level in LiveConnectConfig yet. Please use the client-level httpOptions configuration instead.");const d=this.apiClient.getWebsocketBaseUrl(),c=this.apiClient.getApiVersion();let f;const p=this.apiClient.getHeaders();t.config&&t.config.tools&&Vs(t.config.tools)&&Gs(p);const h=Ty(p);if(this.apiClient.isVertexAI()){const P=this.apiClient.getProject(),F=this.apiClient.getLocation(),D=this.apiClient.getApiKey(),L=!!P&&!!F||!!D;this.apiClient.getCustomBaseUrl()&&!L?f=d:(f=`${d}/ws/google.cloud.aiplatform.${c}.LlmBidiService/BidiGenerateContent`,await this.auth.addAuthHeaders(h,f))}else{const P=this.apiClient.getApiKey();let F="BidiGenerateContent",D="key";P!=null&&P.startsWith("auth_tokens/")&&(console.warn("Warning: Ephemeral token support is experimental and may change in future versions."),c!=="v1alpha"&&console.warn("Warning: The SDK's ephemeral token support is in v1alpha only. Please use const ai = new GoogleGenAI({apiKey: token.name, httpOptions: { apiVersion: 'v1alpha' }}); before session connection."),F="BidiGenerateContentConstrained",D="access_token"),f=`${d}/ws/google.ai.generativelanguage.${c}.GenerativeService.${F}?${D}=${P}`}let m=()=>{};const g=new Promise(P=>{m=P}),E=t.callbacks,T=function(){var P;(P=E==null?void 0:E.onopen)===null||P===void 0||P.call(E),m({})},S=this.apiClient,x={onopen:T,onmessage:P=>{hy(S,E.onmessage,P)},onerror:(n=E==null?void 0:E.onerror)!==null&&n!==void 0?n:function(P){},onclose:(i=E==null?void 0:E.onclose)!==null&&i!==void 0?i:function(P){}},C=this.webSocketFactory.create(f,vy(h),x);C.connect(),await g;let w=$(this.apiClient,t.model);if(this.apiClient.isVertexAI()&&w.startsWith("publishers/")){const P=this.apiClient.getProject(),F=this.apiClient.getLocation();P&&F&&(w=`projects/${P}/locations/${F}/`+w)}let I={};this.apiClient.isVertexAI()&&((o=t.config)===null||o===void 0?void 0:o.responseModalities)===void 0&&(t.config===void 0?t.config={responseModalities:[Ft.AUDIO]}:t.config.responseModalities=[Ft.AUDIO]),!((r=t.config)===null||r===void 0)&&r.generationConfig&&console.warn("Setting `LiveConnectConfig.generation_config` is deprecated, please set the fields on `LiveConnectConfig` directly. This will become an error in a future version (not before Q3 2025).");const _=(u=(s=t.config)===null||s===void 0?void 0:s.tools)!==null&&u!==void 0?u:[],b=[];for(const P of _)if(this.isCallableTool(P)){const F=P;b.push(await F.tool())}else b.push(P);b.length>0&&(t.config.tools=b);const V={model:w,config:t.config,callbacks:t.callbacks};return this.apiClient.isVertexAI()?I=Dh(this.apiClient,V):I=Nh(this.apiClient,V),delete I.config,C.send(JSON.stringify(I)),new yy(C,this.apiClient)}isCallableTool(t){return"callTool"in t&&typeof t.callTool=="function"}}const gy={turnComplete:!0};class yy{constructor(t,n){this.conn=t,this.apiClient=n}tLiveClientContent(t,n){if(n.turns!==null&&n.turns!==void 0){let i=[];try{i=me(n.turns),t.isVertexAI()||(i=i.map(o=>Wt(o)))}catch{throw new Error(`Failed to parse client content "turns", type: '${typeof n.turns}'`)}return{clientContent:{turns:i,turnComplete:n.turnComplete}}}return{clientContent:{turnComplete:n.turnComplete}}}tLiveClienttToolResponse(t,n){let i=[];if(n.functionResponses==null)throw new Error("functionResponses is required.");if(Array.isArray(n.functionResponses)?i=n.functionResponses:i=[n.functionResponses],i.length===0)throw new Error("functionResponses is required.");for(const r of i){if(typeof r!="object"||r===null||!("name"in r)||!("response"in r))throw new Error(`Could not parse function response, type '${typeof r}'.`);if(!t.isVertexAI()&&!("id"in r))throw new Error(py)}return{toolResponse:{functionResponses:i}}}sendClientContent(t){t=Object.assign(Object.assign({},gy),t);const n=this.tLiveClientContent(this.apiClient,t);this.conn.send(JSON.stringify(n))}sendRealtimeInput(t){let n={};this.apiClient.isVertexAI()?n={realtimeInput:Fh(t)}:n={realtimeInput:Uh(t)},this.conn.send(JSON.stringify(n))}sendToolResponse(t){if(t.functionResponses==null)throw new Error("Tool response parameters are required.");const n=this.tLiveClienttToolResponse(this.apiClient,t);this.conn.send(JSON.stringify(n))}close(){this.conn.close()}}function vy(e){const t={};return e.forEach((n,i)=>{t[i]=n}),t}function Ty(e){const t=new Headers;for(const[n,i]of Object.entries(e))t.append(n,i);return t}/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */const _r=10;function Cr(e){var t,n,i;if(!((t=e==null?void 0:e.automaticFunctionCalling)===null||t===void 0)&&t.disable)return!0;let o=!1;for(const s of(n=e==null?void 0:e.tools)!==null&&n!==void 0?n:[])if(et(s)){o=!0;break}if(!o)return!0;const r=(i=e==null?void 0:e.automaticFunctionCalling)===null||i===void 0?void 0:i.maximumRemoteCalls;return r&&(r<0||!Number.isInteger(r))||r==0?(console.warn("Invalid maximumRemoteCalls value provided for automatic function calling. Disabled automatic function calling. Please provide a valid integer value greater than 0. maximumRemoteCalls provided:",r),!0):!1}function et(e){return"callTool"in e&&typeof e.callTool=="function"}function Ey(e){var t,n,i;return(i=(n=(t=e.config)===null||t===void 0?void 0:t.tools)===null||n===void 0?void 0:n.some(o=>et(o)))!==null&&i!==void 0?i:!1}function Ir(e){var t;const n=[];return!((t=e==null?void 0:e.config)===null||t===void 0)&&t.tools&&e.config.tools.forEach((i,o)=>{if(et(i))return;const r=i;r.functionDeclarations&&r.functionDeclarations.length>0&&n.push(o)}),n}function Ar(e){var t;return!(!((t=e==null?void 0:e.automaticFunctionCalling)===null||t===void 0)&&t.ignoreCallHistory)}/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */class Sy extends ke{constructor(t){super(),this.apiClient=t,this.generateContent=async n=>{var i,o,r,s,u;const d=await this.processParamsMaybeAddMcpUsage(n);if(this.maybeMoveToResponseJsonSchem(n),!Ey(n)||Cr(n.config))return await this.generateContentInternal(d);const c=Ir(n);if(c.length>0){const E=c.map(T=>`tools[${T}]`).join(", ");throw new Error(`Automatic function calling with CallableTools (or MCP objects) and basic FunctionDeclarations is not yet supported. Incompatible tools found at ${E}.`)}let f,p;const h=me(d.contents),m=(r=(o=(i=d.config)===null||i===void 0?void 0:i.automaticFunctionCalling)===null||o===void 0?void 0:o.maximumRemoteCalls)!==null&&r!==void 0?r:_r;let g=0;for(;g{var i,o,r,s,u;if(this.maybeMoveToResponseJsonSchem(n),Cr(n.config)){const p=await this.processParamsMaybeAddMcpUsage(n);return await this.generateContentStreamInternal(p)}const d=Ir(n);if(d.length>0){const p=d.map(h=>`tools[${h}]`).join(", ");throw new Error(`Incompatible tools found at ${p}. Automatic function calling with CallableTools (or MCP objects) and basic FunctionDeclarations" is not yet supported.`)}const c=(r=(o=(i=n==null?void 0:n.config)===null||i===void 0?void 0:i.toolConfig)===null||o===void 0?void 0:o.functionCallingConfig)===null||r===void 0?void 0:r.streamFunctionCallArguments,f=(u=(s=n==null?void 0:n.config)===null||s===void 0?void 0:s.automaticFunctionCalling)===null||u===void 0?void 0:u.disable;if(c&&!f)throw new Error("Running in streaming mode with 'streamFunctionCallArguments' enabled, this feature is not compatible with automatic function calling (AFC). Please set 'config.automaticFunctionCalling.disable' to true to disable AFC or leave 'config.toolConfig.functionCallingConfig.streamFunctionCallArguments' to be undefined or set to false to disable streaming function call arguments feature.");return await this.processAfcStream(n)},this.generateImages=async n=>await this.generateImagesInternal(n).then(i=>{var o;let r;const s=[];if(i!=null&&i.generatedImages)for(const d of i.generatedImages)d&&(d!=null&&d.safetyAttributes)&&((o=d==null?void 0:d.safetyAttributes)===null||o===void 0?void 0:o.contentType)==="Positive Prompt"?r=d==null?void 0:d.safetyAttributes:s.push(d);let u;return r?u={generatedImages:s,positivePromptSafetyAttributes:r,sdkHttpResponse:i.sdkHttpResponse}:u={generatedImages:s,sdkHttpResponse:i.sdkHttpResponse},u}),this.list=async n=>{var i;const s={config:Object.assign(Object.assign({},{queryBase:!0}),n==null?void 0:n.config)};if(this.apiClient.isVertexAI()&&!s.config.queryBase){if(!((i=s.config)===null||i===void 0)&&i.filter)throw new Error("Filtering tuned models list for Vertex AI is not currently supported");s.config.filter="labels.tune-type:*"}return new qe(Pe.PAGED_ITEM_MODELS,u=>this.listInternal(u),await this.listInternal(s),s)},this.editImage=async n=>{const i={model:n.model,prompt:n.prompt,referenceImages:[],config:n.config};return n.referenceImages&&n.referenceImages&&(i.referenceImages=n.referenceImages.map(o=>o.toReferenceImageAPI())),await this.editImageInternal(i)},this.upscaleImage=async n=>{let i={numberOfImages:1,mode:"upscale"};n.config&&(i=Object.assign(Object.assign({},i),n.config));const o={model:n.model,image:n.image,upscaleFactor:n.upscaleFactor,config:i};return await this.upscaleImageInternal(o)},this.generateVideos=async n=>{var i,o,r,s,u,d;if((n.prompt||n.image||n.video)&&n.source)throw new Error("Source and prompt/image/video are mutually exclusive. Please only use source.");return this.apiClient.isVertexAI()||(!((i=n.video)===null||i===void 0)&&i.uri&&(!((o=n.video)===null||o===void 0)&&o.videoBytes)?n.video={uri:n.video.uri,mimeType:n.video.mimeType}:!((s=(r=n.source)===null||r===void 0?void 0:r.video)===null||s===void 0)&&s.uri&&(!((d=(u=n.source)===null||u===void 0?void 0:u.video)===null||d===void 0)&&d.videoBytes)&&(n.source.video={uri:n.source.video.uri,mimeType:n.source.video.mimeType})),await this.generateVideosInternal(n)}}maybeMoveToResponseJsonSchem(t){t.config&&t.config.responseSchema&&(t.config.responseJsonSchema||Object.keys(t.config.responseSchema).includes("$schema")&&(t.config.responseJsonSchema=t.config.responseSchema,delete t.config.responseSchema))}async processParamsMaybeAddMcpUsage(t){var n,i,o;const r=(n=t.config)===null||n===void 0?void 0:n.tools;if(!r)return t;const s=await Promise.all(r.map(async d=>et(d)?await d.tool():d)),u={model:t.model,contents:t.contents,config:Object.assign(Object.assign({},t.config),{tools:s})};if(u.config.tools=s,t.config&&t.config.tools&&Vs(t.config.tools)){const d=(o=(i=t.config.httpOptions)===null||i===void 0?void 0:i.headers)!==null&&o!==void 0?o:{};let c=Object.assign({},d);Object.keys(c).length===0&&(c=this.apiClient.getDefaultHeaders()),Gs(c),u.config.httpOptions=Object.assign(Object.assign({},t.config.httpOptions),{headers:c})}return u}async initAfcToolsMap(t){var n,i,o;const r=new Map;for(const s of(i=(n=t.config)===null||n===void 0?void 0:n.tools)!==null&&i!==void 0?i:[])if(et(s)){const u=s,d=await u.tool();for(const c of(o=d.functionDeclarations)!==null&&o!==void 0?o:[]){if(!c.name)throw new Error("Function declaration name is required.");if(r.has(c.name))throw new Error(`Duplicate tool declaration name: ${c.name}`);r.set(c.name,u)}}return r}async processAfcStream(t){var n,i,o;const r=(o=(i=(n=t.config)===null||n===void 0?void 0:n.automaticFunctionCalling)===null||i===void 0?void 0:i.maximumRemoteCalls)!==null&&o!==void 0?o:_r;let s=!1,u=0;const d=await this.initAfcToolsMap(t);return(function(c,f,p){return Ee(this,arguments,function*(){for(var h,m,g,E,T,S;u0){s=!0;const P=new pt;P.candidates=[{content:{role:"user",parts:b}}],yield yield H(P);const F=[];F.push(...V),F.push({role:"user",parts:b});const D=me(p.contents).concat(F);p.contents=D}else break}})})(this,d,t)}async generateContentInternal(t){var n,i,o,r;let s,u="",d={};if(this.apiClient.isVertexAI()){const c=vr(this.apiClient,t);return u=N("{model}:generateContent",c._url),d=c._query,delete c._url,delete c._query,s=this.apiClient.request({path:u,queryParams:d,body:JSON.stringify(c),httpMethod:"POST",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(i=t.config)===null||i===void 0?void 0:i.abortSignal}).then(f=>f.json().then(p=>{const h=p;return h.sdkHttpResponse={headers:f.headers},h})),s.then(f=>{const p=Er(f),h=new pt;return Object.assign(h,p),h})}else{const c=yr(this.apiClient,t);return u=N("{model}:generateContent",c._url),d=c._query,delete c._url,delete c._query,s=this.apiClient.request({path:u,queryParams:d,body:JSON.stringify(c),httpMethod:"POST",httpOptions:(o=t.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(r=t.config)===null||r===void 0?void 0:r.abortSignal}).then(f=>f.json().then(p=>{const h=p;return h.sdkHttpResponse={headers:f.headers},h})),s.then(f=>{const p=Tr(f),h=new pt;return Object.assign(h,p),h})}}async generateContentStreamInternal(t){var n,i,o,r;let s,u="",d={};if(this.apiClient.isVertexAI()){const c=vr(this.apiClient,t);return u=N("{model}:streamGenerateContent?alt=sse",c._url),d=c._query,delete c._url,delete c._query,s=this.apiClient.requestStream({path:u,queryParams:d,body:JSON.stringify(c),httpMethod:"POST",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(i=t.config)===null||i===void 0?void 0:i.abortSignal}),s.then(function(p){return Ee(this,arguments,function*(){var h,m,g,E;try{for(var T=!0,S=Se(p),x;x=yield H(S.next()),h=x.done,!h;T=!0){E=x.value,T=!1;const C=E,w=Er(yield H(C.json()),t);w.sdkHttpResponse={headers:C.headers};const I=new pt;Object.assign(I,w),yield yield H(I)}}catch(C){m={error:C}}finally{try{!T&&!h&&(g=S.return)&&(yield H(g.call(S)))}finally{if(m)throw m.error}}})})}else{const c=yr(this.apiClient,t);return u=N("{model}:streamGenerateContent?alt=sse",c._url),d=c._query,delete c._url,delete c._query,s=this.apiClient.requestStream({path:u,queryParams:d,body:JSON.stringify(c),httpMethod:"POST",httpOptions:(o=t.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(r=t.config)===null||r===void 0?void 0:r.abortSignal}),s.then(function(p){return Ee(this,arguments,function*(){var h,m,g,E;try{for(var T=!0,S=Se(p),x;x=yield H(S.next()),h=x.done,!h;T=!0){E=x.value,T=!1;const C=E,w=Tr(yield H(C.json()),t);w.sdkHttpResponse={headers:C.headers};const I=new pt;Object.assign(I,w),yield yield H(I)}}catch(C){m={error:C}}finally{try{!T&&!h&&(g=S.return)&&(yield H(g.call(S)))}finally{if(m)throw m.error}}})})}}async embedContent(t){var n,i,o,r;let s,u="",d={};if(this.apiClient.isVertexAI()){const c=mm(this.apiClient,t);return u=N("{model}:predict",c._url),d=c._query,delete c._url,delete c._query,s=this.apiClient.request({path:u,queryParams:d,body:JSON.stringify(c),httpMethod:"POST",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(i=t.config)===null||i===void 0?void 0:i.abortSignal}).then(f=>f.json().then(p=>{const h=p;return h.sdkHttpResponse={headers:f.headers},h})),s.then(f=>{const p=ym(f),h=new er;return Object.assign(h,p),h})}else{const c=hm(this.apiClient,t);return u=N("{model}:batchEmbedContents",c._url),d=c._query,delete c._url,delete c._query,s=this.apiClient.request({path:u,queryParams:d,body:JSON.stringify(c),httpMethod:"POST",httpOptions:(o=t.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(r=t.config)===null||r===void 0?void 0:r.abortSignal}).then(f=>f.json().then(p=>{const h=p;return h.sdkHttpResponse={headers:f.headers},h})),s.then(f=>{const p=gm(f),h=new er;return Object.assign(h,p),h})}}async generateImagesInternal(t){var n,i,o,r;let s,u="",d={};if(this.apiClient.isVertexAI()){const c=Rm(this.apiClient,t);return u=N("{model}:predict",c._url),d=c._query,delete c._url,delete c._query,s=this.apiClient.request({path:u,queryParams:d,body:JSON.stringify(c),httpMethod:"POST",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(i=t.config)===null||i===void 0?void 0:i.abortSignal}).then(f=>f.json().then(p=>{const h=p;return h.sdkHttpResponse={headers:f.headers},h})),s.then(f=>{const p=km(f),h=new tr;return Object.assign(h,p),h})}else{const c=wm(this.apiClient,t);return u=N("{model}:predict",c._url),d=c._query,delete c._url,delete c._query,s=this.apiClient.request({path:u,queryParams:d,body:JSON.stringify(c),httpMethod:"POST",httpOptions:(o=t.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(r=t.config)===null||r===void 0?void 0:r.abortSignal}).then(f=>f.json().then(p=>{const h=p;return h.sdkHttpResponse={headers:f.headers},h})),s.then(f=>{const p=Pm(f),h=new tr;return Object.assign(h,p),h})}}async editImageInternal(t){var n,i;let o,r="",s={};if(this.apiClient.isVertexAI()){const u=cm(this.apiClient,t);return r=N("{model}:predict",u._url),s=u._query,delete u._url,delete u._query,o=this.apiClient.request({path:r,queryParams:s,body:JSON.stringify(u),httpMethod:"POST",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(i=t.config)===null||i===void 0?void 0:i.abortSignal}).then(d=>d.json().then(c=>{const f=c;return f.sdkHttpResponse={headers:d.headers},f})),o.then(d=>{const c=dm(d),f=new mf;return Object.assign(f,c),f})}else throw new Error("This method is only supported by the Vertex AI.")}async upscaleImageInternal(t){var n,i;let o,r="",s={};if(this.apiClient.isVertexAI()){const u=Rg(this.apiClient,t);return r=N("{model}:predict",u._url),s=u._query,delete u._url,delete u._query,o=this.apiClient.request({path:r,queryParams:s,body:JSON.stringify(u),httpMethod:"POST",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(i=t.config)===null||i===void 0?void 0:i.abortSignal}).then(d=>d.json().then(c=>{const f=c;return f.sdkHttpResponse={headers:d.headers},f})),o.then(d=>{const c=Pg(d),f=new gf;return Object.assign(f,c),f})}else throw new Error("This method is only supported by the Vertex AI.")}async recontextImage(t){var n,i;let o,r="",s={};if(this.apiClient.isVertexAI()){const u=ug(this.apiClient,t);return r=N("{model}:predict",u._url),s=u._query,delete u._url,delete u._query,o=this.apiClient.request({path:r,queryParams:s,body:JSON.stringify(u),httpMethod:"POST",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(i=t.config)===null||i===void 0?void 0:i.abortSignal}).then(d=>d.json()),o.then(d=>{const c=cg(d),f=new yf;return Object.assign(f,c),f})}else throw new Error("This method is only supported by the Vertex AI.")}async segmentImage(t){var n,i;let o,r="",s={};if(this.apiClient.isVertexAI()){const u=gg(this.apiClient,t);return r=N("{model}:predict",u._url),s=u._query,delete u._url,delete u._query,o=this.apiClient.request({path:r,queryParams:s,body:JSON.stringify(u),httpMethod:"POST",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(i=t.config)===null||i===void 0?void 0:i.abortSignal}).then(d=>d.json()),o.then(d=>{const c=yg(d),f=new vf;return Object.assign(f,c),f})}else throw new Error("This method is only supported by the Vertex AI.")}async get(t){var n,i,o,r;let s,u="",d={};if(this.apiClient.isVertexAI()){const c=Wm(this.apiClient,t);return u=N("{name}",c._url),d=c._query,delete c._url,delete c._query,s=this.apiClient.request({path:u,queryParams:d,body:JSON.stringify(c),httpMethod:"GET",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(i=t.config)===null||i===void 0?void 0:i.abortSignal}).then(f=>f.json()),s.then(f=>bn(f))}else{const c=$m(this.apiClient,t);return u=N("{name}",c._url),d=c._query,delete c._url,delete c._query,s=this.apiClient.request({path:u,queryParams:d,body:JSON.stringify(c),httpMethod:"GET",httpOptions:(o=t.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(r=t.config)===null||r===void 0?void 0:r.abortSignal}).then(f=>f.json()),s.then(f=>Dn(f))}}async listInternal(t){var n,i,o,r;let s,u="",d={};if(this.apiClient.isVertexAI()){const c=ng(this.apiClient,t);return u=N("{models_url}",c._url),d=c._query,delete c._url,delete c._query,s=this.apiClient.request({path:u,queryParams:d,body:JSON.stringify(c),httpMethod:"GET",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(i=t.config)===null||i===void 0?void 0:i.abortSignal}).then(f=>f.json().then(p=>{const h=p;return h.sdkHttpResponse={headers:f.headers},h})),s.then(f=>{const p=og(f),h=new nr;return Object.assign(h,p),h})}else{const c=tg(this.apiClient,t);return u=N("{models_url}",c._url),d=c._query,delete c._url,delete c._query,s=this.apiClient.request({path:u,queryParams:d,body:JSON.stringify(c),httpMethod:"GET",httpOptions:(o=t.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(r=t.config)===null||r===void 0?void 0:r.abortSignal}).then(f=>f.json().then(p=>{const h=p;return h.sdkHttpResponse={headers:f.headers},h})),s.then(f=>{const p=ig(f),h=new nr;return Object.assign(h,p),h})}}async update(t){var n,i,o,r;let s,u="",d={};if(this.apiClient.isVertexAI()){const c=xg(this.apiClient,t);return u=N("{model}",c._url),d=c._query,delete c._url,delete c._query,s=this.apiClient.request({path:u,queryParams:d,body:JSON.stringify(c),httpMethod:"PATCH",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(i=t.config)===null||i===void 0?void 0:i.abortSignal}).then(f=>f.json()),s.then(f=>bn(f))}else{const c=Ag(this.apiClient,t);return u=N("{name}",c._url),d=c._query,delete c._url,delete c._query,s=this.apiClient.request({path:u,queryParams:d,body:JSON.stringify(c),httpMethod:"PATCH",httpOptions:(o=t.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(r=t.config)===null||r===void 0?void 0:r.abortSignal}).then(f=>f.json()),s.then(f=>Dn(f))}}async delete(t){var n,i,o,r;let s,u="",d={};if(this.apiClient.isVertexAI()){const c=sm(this.apiClient,t);return u=N("{name}",c._url),d=c._query,delete c._url,delete c._query,s=this.apiClient.request({path:u,queryParams:d,body:JSON.stringify(c),httpMethod:"DELETE",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(i=t.config)===null||i===void 0?void 0:i.abortSignal}).then(f=>f.json().then(p=>{const h=p;return h.sdkHttpResponse={headers:f.headers},h})),s.then(f=>{const p=am(f),h=new ir;return Object.assign(h,p),h})}else{const c=rm(this.apiClient,t);return u=N("{name}",c._url),d=c._query,delete c._url,delete c._query,s=this.apiClient.request({path:u,queryParams:d,body:JSON.stringify(c),httpMethod:"DELETE",httpOptions:(o=t.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(r=t.config)===null||r===void 0?void 0:r.abortSignal}).then(f=>f.json().then(p=>{const h=p;return h.sdkHttpResponse={headers:f.headers},h})),s.then(f=>{const p=lm(f),h=new ir;return Object.assign(h,p),h})}}async countTokens(t){var n,i,o,r;let s,u="",d={};if(this.apiClient.isVertexAI()){const c=nm(this.apiClient,t);return u=N("{model}:countTokens",c._url),d=c._query,delete c._url,delete c._query,s=this.apiClient.request({path:u,queryParams:d,body:JSON.stringify(c),httpMethod:"POST",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(i=t.config)===null||i===void 0?void 0:i.abortSignal}).then(f=>f.json().then(p=>{const h=p;return h.sdkHttpResponse={headers:f.headers},h})),s.then(f=>{const p=om(f),h=new or;return Object.assign(h,p),h})}else{const c=tm(this.apiClient,t);return u=N("{model}:countTokens",c._url),d=c._query,delete c._url,delete c._query,s=this.apiClient.request({path:u,queryParams:d,body:JSON.stringify(c),httpMethod:"POST",httpOptions:(o=t.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(r=t.config)===null||r===void 0?void 0:r.abortSignal}).then(f=>f.json().then(p=>{const h=p;return h.sdkHttpResponse={headers:f.headers},h})),s.then(f=>{const p=im(f),h=new or;return Object.assign(h,p),h})}}async computeTokens(t){var n,i;let o,r="",s={};if(this.apiClient.isVertexAI()){const u=Yh(this.apiClient,t);return r=N("{model}:computeTokens",u._url),s=u._query,delete u._url,delete u._query,o=this.apiClient.request({path:r,queryParams:s,body:JSON.stringify(u),httpMethod:"POST",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(i=t.config)===null||i===void 0?void 0:i.abortSignal}).then(d=>d.json().then(c=>{const f=c;return f.sdkHttpResponse={headers:d.headers},f})),o.then(d=>{const c=Kh(d),f=new Tf;return Object.assign(f,c),f})}else throw new Error("This method is only supported by the Vertex AI.")}async generateVideosInternal(t){var n,i,o,r;let s,u="",d={};if(this.apiClient.isVertexAI()){const c=Um(this.apiClient,t);return u=N("{model}:predictLongRunning",c._url),d=c._query,delete c._url,delete c._query,s=this.apiClient.request({path:u,queryParams:d,body:JSON.stringify(c),httpMethod:"POST",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(i=t.config)===null||i===void 0?void 0:i.abortSignal}).then(f=>f.json()),s.then(f=>{const p=bm(f),h=new Vt;return Object.assign(h,p),h})}else{const c=Lm(this.apiClient,t);return u=N("{model}:predictLongRunning",c._url),d=c._query,delete c._url,delete c._query,s=this.apiClient.request({path:u,queryParams:d,body:JSON.stringify(c),httpMethod:"POST",httpOptions:(o=t.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(r=t.config)===null||r===void 0?void 0:r.abortSignal}).then(f=>f.json()),s.then(f=>{const p=Dm(f),h=new Vt;return Object.assign(h,p),h})}}}/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */class _y extends ke{constructor(t){super(),this.apiClient=t}async getVideosOperation(t){const n=t.operation,i=t.config;if(n.name===void 0||n.name==="")throw new Error("Operation name is required.");if(this.apiClient.isVertexAI()){const o=n.name.split("/operations/")[0];let r;i&&"httpOptions"in i&&(r=i.httpOptions);const s=await this.fetchPredictVideosOperationInternal({operationName:n.name,resourceName:o,config:{httpOptions:r}});return n._fromAPIResponse({apiResponse:s,_isVertexAI:!0})}else{const o=await this.getVideosOperationInternal({operationName:n.name,config:i});return n._fromAPIResponse({apiResponse:o,_isVertexAI:!1})}}async get(t){const n=t.operation,i=t.config;if(n.name===void 0||n.name==="")throw new Error("Operation name is required.");if(this.apiClient.isVertexAI()){const o=n.name.split("/operations/")[0];let r;i&&"httpOptions"in i&&(r=i.httpOptions);const s=await this.fetchPredictVideosOperationInternal({operationName:n.name,resourceName:o,config:{httpOptions:r}});return n._fromAPIResponse({apiResponse:s,_isVertexAI:!0})}else{const o=await this.getVideosOperationInternal({operationName:n.name,config:i});return n._fromAPIResponse({apiResponse:o,_isVertexAI:!1})}}async getVideosOperationInternal(t){var n,i,o,r;let s,u="",d={};if(this.apiClient.isVertexAI()){const c=uf(t);return u=N("{operationName}",c._url),d=c._query,delete c._url,delete c._query,s=this.apiClient.request({path:u,queryParams:d,body:JSON.stringify(c),httpMethod:"GET",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(i=t.config)===null||i===void 0?void 0:i.abortSignal}).then(f=>f.json()),s}else{const c=af(t);return u=N("{operationName}",c._url),d=c._query,delete c._url,delete c._query,s=this.apiClient.request({path:u,queryParams:d,body:JSON.stringify(c),httpMethod:"GET",httpOptions:(o=t.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(r=t.config)===null||r===void 0?void 0:r.abortSignal}).then(f=>f.json()),s}}async fetchPredictVideosOperationInternal(t){var n,i;let o,r="",s={};if(this.apiClient.isVertexAI()){const u=ef(t);return r=N("{resourceName}:fetchPredictOperation",u._url),s=u._query,delete u._url,delete u._query,o=this.apiClient.request({path:r,queryParams:s,body:JSON.stringify(u),httpMethod:"POST",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(i=t.config)===null||i===void 0?void 0:i.abortSignal}).then(d=>d.json()),o}else throw new Error("This method is only supported by the Vertex AI.")}}/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */function Cy(e){const t={},n=l(e,["data"]);if(n!=null&&a(t,["data"],n),l(e,["displayName"])!==void 0)throw new Error("displayName parameter is not supported in Gemini API.");const i=l(e,["mimeType"]);return i!=null&&a(t,["mimeType"],i),t}function Iy(e){const t={},n=l(e,["parts"]);if(n!=null){let o=n;Array.isArray(o)&&(o=o.map(r=>Dy(r))),a(t,["parts"],o)}const i=l(e,["role"]);return i!=null&&a(t,["role"],i),t}function Ay(e,t,n){const i={},o=l(t,["expireTime"]);n!==void 0&&o!=null&&a(n,["expireTime"],o);const r=l(t,["newSessionExpireTime"]);n!==void 0&&r!=null&&a(n,["newSessionExpireTime"],r);const s=l(t,["uses"]);n!==void 0&&s!=null&&a(n,["uses"],s);const u=l(t,["liveConnectConstraints"]);n!==void 0&&u!=null&&a(n,["bidiGenerateContentSetup"],Ny(e,u));const d=l(t,["lockAdditionalFields"]);return n!==void 0&&d!=null&&a(n,["fieldMask"],d),i}function xy(e,t){const n={},i=l(t,["config"]);return i!=null&&a(n,["config"],Ay(e,i,n)),n}function wy(e){const t={};if(l(e,["displayName"])!==void 0)throw new Error("displayName parameter is not supported in Gemini API.");const n=l(e,["fileUri"]);n!=null&&a(t,["fileUri"],n);const i=l(e,["mimeType"]);return i!=null&&a(t,["mimeType"],i),t}function Ry(e){const t={},n=l(e,["id"]);n!=null&&a(t,["id"],n);const i=l(e,["args"]);i!=null&&a(t,["args"],i);const o=l(e,["name"]);if(o!=null&&a(t,["name"],o),l(e,["partialArgs"])!==void 0)throw new Error("partialArgs parameter is not supported in Gemini API.");if(l(e,["willContinue"])!==void 0)throw new Error("willContinue parameter is not supported in Gemini API.");return t}function Py(e){const t={};if(l(e,["authConfig"])!==void 0)throw new Error("authConfig parameter is not supported in Gemini API.");const n=l(e,["enableWidget"]);return n!=null&&a(t,["enableWidget"],n),t}function ky(e){const t={};if(l(e,["excludeDomains"])!==void 0)throw new Error("excludeDomains parameter is not supported in Gemini API.");if(l(e,["blockingConfidence"])!==void 0)throw new Error("blockingConfidence parameter is not supported in Gemini API.");const n=l(e,["timeRangeFilter"]);return n!=null&&a(t,["timeRangeFilter"],n),t}function My(e,t){const n={},i=l(e,["generationConfig"]);t!==void 0&&i!=null&&a(t,["setup","generationConfig"],i);const o=l(e,["responseModalities"]);t!==void 0&&o!=null&&a(t,["setup","generationConfig","responseModalities"],o);const r=l(e,["temperature"]);t!==void 0&&r!=null&&a(t,["setup","generationConfig","temperature"],r);const s=l(e,["topP"]);t!==void 0&&s!=null&&a(t,["setup","generationConfig","topP"],s);const u=l(e,["topK"]);t!==void 0&&u!=null&&a(t,["setup","generationConfig","topK"],u);const d=l(e,["maxOutputTokens"]);t!==void 0&&d!=null&&a(t,["setup","generationConfig","maxOutputTokens"],d);const c=l(e,["mediaResolution"]);t!==void 0&&c!=null&&a(t,["setup","generationConfig","mediaResolution"],c);const f=l(e,["seed"]);t!==void 0&&f!=null&&a(t,["setup","generationConfig","seed"],f);const p=l(e,["speechConfig"]);t!==void 0&&p!=null&&a(t,["setup","generationConfig","speechConfig"],ai(p));const h=l(e,["thinkingConfig"]);t!==void 0&&h!=null&&a(t,["setup","generationConfig","thinkingConfig"],h);const m=l(e,["enableAffectiveDialog"]);t!==void 0&&m!=null&&a(t,["setup","generationConfig","enableAffectiveDialog"],m);const g=l(e,["systemInstruction"]);t!==void 0&&g!=null&&a(t,["setup","systemInstruction"],Iy(ie(g)));const E=l(e,["tools"]);if(t!==void 0&&E!=null){let _=ot(E);Array.isArray(_)&&(_=_.map(b=>Ly(it(b)))),a(t,["setup","tools"],_)}const T=l(e,["sessionResumption"]);t!==void 0&&T!=null&&a(t,["setup","sessionResumption"],by(T));const S=l(e,["inputAudioTranscription"]);t!==void 0&&S!=null&&a(t,["setup","inputAudioTranscription"],S);const x=l(e,["outputAudioTranscription"]);t!==void 0&&x!=null&&a(t,["setup","outputAudioTranscription"],x);const C=l(e,["realtimeInputConfig"]);t!==void 0&&C!=null&&a(t,["setup","realtimeInputConfig"],C);const w=l(e,["contextWindowCompression"]);t!==void 0&&w!=null&&a(t,["setup","contextWindowCompression"],w);const I=l(e,["proactivity"]);if(t!==void 0&&I!=null&&a(t,["setup","proactivity"],I),l(e,["explicitVadSignal"])!==void 0)throw new Error("explicitVadSignal parameter is not supported in Gemini API.");return n}function Ny(e,t){const n={},i=l(t,["model"]);i!=null&&a(n,["setup","model"],$(e,i));const o=l(t,["config"]);return o!=null&&a(n,["config"],My(o,n)),n}function Dy(e){const t={},n=l(e,["mediaResolution"]);n!=null&&a(t,["mediaResolution"],n);const i=l(e,["codeExecutionResult"]);i!=null&&a(t,["codeExecutionResult"],i);const o=l(e,["executableCode"]);o!=null&&a(t,["executableCode"],o);const r=l(e,["fileData"]);r!=null&&a(t,["fileData"],wy(r));const s=l(e,["functionCall"]);s!=null&&a(t,["functionCall"],Ry(s));const u=l(e,["functionResponse"]);u!=null&&a(t,["functionResponse"],u);const d=l(e,["inlineData"]);d!=null&&a(t,["inlineData"],Cy(d));const c=l(e,["text"]);c!=null&&a(t,["text"],c);const f=l(e,["thought"]);f!=null&&a(t,["thought"],f);const p=l(e,["thoughtSignature"]);p!=null&&a(t,["thoughtSignature"],p);const h=l(e,["videoMetadata"]);return h!=null&&a(t,["videoMetadata"],h),t}function by(e){const t={},n=l(e,["handle"]);if(n!=null&&a(t,["handle"],n),l(e,["transparent"])!==void 0)throw new Error("transparent parameter is not supported in Gemini API.");return t}function Ly(e){const t={};if(l(e,["retrieval"])!==void 0)throw new Error("retrieval parameter is not supported in Gemini API.");const n=l(e,["computerUse"]);n!=null&&a(t,["computerUse"],n);const i=l(e,["fileSearch"]);i!=null&&a(t,["fileSearch"],i);const o=l(e,["codeExecution"]);if(o!=null&&a(t,["codeExecution"],o),l(e,["enterpriseWebSearch"])!==void 0)throw new Error("enterpriseWebSearch parameter is not supported in Gemini API.");const r=l(e,["functionDeclarations"]);if(r!=null){let f=r;Array.isArray(f)&&(f=f.map(p=>p)),a(t,["functionDeclarations"],f)}const s=l(e,["googleMaps"]);s!=null&&a(t,["googleMaps"],Py(s));const u=l(e,["googleSearch"]);u!=null&&a(t,["googleSearch"],ky(u));const d=l(e,["googleSearchRetrieval"]);d!=null&&a(t,["googleSearchRetrieval"],d);const c=l(e,["urlContext"]);return c!=null&&a(t,["urlContext"],c),t}/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */function Uy(e){const t=[];for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)){const i=e[n];if(typeof i=="object"&&i!=null&&Object.keys(i).length>0){const o=Object.keys(i).map(r=>`${n}.${r}`);t.push(...o)}else t.push(n)}return t.join(",")}function Fy(e,t){let n=null;const i=e.bidiGenerateContentSetup;if(typeof i=="object"&&i!==null&&"setup"in i){const r=i.setup;typeof r=="object"&&r!==null?(e.bidiGenerateContentSetup=r,n=r):delete e.bidiGenerateContentSetup}else i!==void 0&&delete e.bidiGenerateContentSetup;const o=e.fieldMask;if(n){const r=Uy(n);if(Array.isArray(t==null?void 0:t.lockAdditionalFields)&&(t==null?void 0:t.lockAdditionalFields.length)===0)r?e.fieldMask=r:delete e.fieldMask;else if(t!=null&&t.lockAdditionalFields&&t.lockAdditionalFields.length>0&&o!==null&&Array.isArray(o)&&o.length>0){const s=["temperature","topK","topP","maxOutputTokens","responseModalities","seed","speechConfig"];let u=[];o.length>0&&(u=o.map(c=>s.includes(c)?`generationConfig.${c}`:c));const d=[];r&&d.push(r),u.length>0&&d.push(...u),d.length>0?e.fieldMask=d.join(","):delete e.fieldMask}else delete e.fieldMask}else o!==null&&Array.isArray(o)&&o.length>0?e.fieldMask=o.join(","):delete e.fieldMask;return e}class Vy extends ke{constructor(t){super(),this.apiClient=t}async create(t){var n,i;let o,r="",s={};if(this.apiClient.isVertexAI())throw new Error("The client.tokens.create method is only supported by the Gemini Developer API.");{const u=xy(this.apiClient,t);r=N("auth_tokens",u._url),s=u._query,delete u.config,delete u._url,delete u._query;const d=Fy(u,t.config);return o=this.apiClient.request({path:r,queryParams:s,body:JSON.stringify(d),httpMethod:"POST",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(i=t.config)===null||i===void 0?void 0:i.abortSignal}).then(c=>c.json()),o.then(c=>c)}}}/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */function Gy(e,t){const n={},i=l(e,["force"]);return t!==void 0&&i!=null&&a(t,["_query","force"],i),n}function Hy(e){const t={},n=l(e,["name"]);n!=null&&a(t,["_url","name"],n);const i=l(e,["config"]);return i!=null&&Gy(i,t),t}function By(e){const t={},n=l(e,["name"]);return n!=null&&a(t,["_url","name"],n),t}function qy(e,t){const n={},i=l(e,["pageSize"]);t!==void 0&&i!=null&&a(t,["_query","pageSize"],i);const o=l(e,["pageToken"]);return t!==void 0&&o!=null&&a(t,["_query","pageToken"],o),n}function Oy(e){const t={},n=l(e,["parent"]);n!=null&&a(t,["_url","parent"],n);const i=l(e,["config"]);return i!=null&&qy(i,t),t}function zy(e){const t={},n=l(e,["sdkHttpResponse"]);n!=null&&a(t,["sdkHttpResponse"],n);const i=l(e,["nextPageToken"]);i!=null&&a(t,["nextPageToken"],i);const o=l(e,["documents"]);if(o!=null){let r=o;Array.isArray(r)&&(r=r.map(s=>s)),a(t,["documents"],r)}return t}/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */class Jy extends ke{constructor(t){super(),this.apiClient=t,this.list=async n=>new qe(Pe.PAGED_ITEM_DOCUMENTS,i=>this.listInternal({parent:n.parent,config:i.config}),await this.listInternal(n),n)}async get(t){var n,i;let o,r="",s={};if(this.apiClient.isVertexAI())throw new Error("This method is only supported by the Gemini Developer API.");{const u=By(t);return r=N("{name}",u._url),s=u._query,delete u._url,delete u._query,o=this.apiClient.request({path:r,queryParams:s,body:JSON.stringify(u),httpMethod:"GET",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(i=t.config)===null||i===void 0?void 0:i.abortSignal}).then(d=>d.json()),o.then(d=>d)}}async delete(t){var n,i;let o="",r={};if(this.apiClient.isVertexAI())throw new Error("This method is only supported by the Gemini Developer API.");{const s=Hy(t);o=N("{name}",s._url),r=s._query,delete s._url,delete s._query,await this.apiClient.request({path:o,queryParams:r,body:JSON.stringify(s),httpMethod:"DELETE",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(i=t.config)===null||i===void 0?void 0:i.abortSignal})}}async listInternal(t){var n,i;let o,r="",s={};if(this.apiClient.isVertexAI())throw new Error("This method is only supported by the Gemini Developer API.");{const u=Oy(t);return r=N("{parent}/documents",u._url),s=u._query,delete u._url,delete u._query,o=this.apiClient.request({path:r,queryParams:s,body:JSON.stringify(u),httpMethod:"GET",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(i=t.config)===null||i===void 0?void 0:i.abortSignal}).then(d=>d.json()),o.then(d=>{const c=zy(d),f=new Ef;return Object.assign(f,c),f})}}}/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */class $y extends ke{constructor(t,n=new Jy(t)){super(),this.apiClient=t,this.documents=n,this.list=async(i={})=>new qe(Pe.PAGED_ITEM_FILE_SEARCH_STORES,o=>this.listInternal(o),await this.listInternal(i),i)}async uploadToFileSearchStore(t){if(this.apiClient.isVertexAI())throw new Error("Vertex AI does not support uploading files to a file search store.");return this.apiClient.uploadFileToFileSearchStore(t.fileSearchStoreName,t.file,t.config)}async create(t){var n,i;let o,r="",s={};if(this.apiClient.isVertexAI())throw new Error("This method is only supported by the Gemini Developer API.");{const u=Ug(t);return r=N("fileSearchStores",u._url),s=u._query,delete u._url,delete u._query,o=this.apiClient.request({path:r,queryParams:s,body:JSON.stringify(u),httpMethod:"POST",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(i=t.config)===null||i===void 0?void 0:i.abortSignal}).then(d=>d.json()),o.then(d=>d)}}async get(t){var n,i;let o,r="",s={};if(this.apiClient.isVertexAI())throw new Error("This method is only supported by the Gemini Developer API.");{const u=Gg(t);return r=N("{name}",u._url),s=u._query,delete u._url,delete u._query,o=this.apiClient.request({path:r,queryParams:s,body:JSON.stringify(u),httpMethod:"GET",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(i=t.config)===null||i===void 0?void 0:i.abortSignal}).then(d=>d.json()),o.then(d=>d)}}async delete(t){var n,i;let o="",r={};if(this.apiClient.isVertexAI())throw new Error("This method is only supported by the Gemini Developer API.");{const s=Vg(t);o=N("{name}",s._url),r=s._query,delete s._url,delete s._query,await this.apiClient.request({path:o,queryParams:r,body:JSON.stringify(s),httpMethod:"DELETE",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(i=t.config)===null||i===void 0?void 0:i.abortSignal})}}async listInternal(t){var n,i;let o,r="",s={};if(this.apiClient.isVertexAI())throw new Error("This method is only supported by the Gemini Developer API.");{const u=Jg(t);return r=N("fileSearchStores",u._url),s=u._query,delete u._url,delete u._query,o=this.apiClient.request({path:r,queryParams:s,body:JSON.stringify(u),httpMethod:"GET",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(i=t.config)===null||i===void 0?void 0:i.abortSignal}).then(d=>d.json()),o.then(d=>{const c=$g(d),f=new Sf;return Object.assign(f,c),f})}}async uploadToFileSearchStoreInternal(t){var n,i;let o,r="",s={};if(this.apiClient.isVertexAI())throw new Error("This method is only supported by the Gemini Developer API.");{const u=Wg(t);return r=N("upload/v1beta/{file_search_store_name}:uploadToFileSearchStore",u._url),s=u._query,delete u._url,delete u._query,o=this.apiClient.request({path:r,queryParams:s,body:JSON.stringify(u),httpMethod:"POST",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(i=t.config)===null||i===void 0?void 0:i.abortSignal}).then(d=>d.json()),o.then(d=>{const c=Yg(d),f=new _f;return Object.assign(f,c),f})}}async importFile(t){var n,i;let o,r="",s={};if(this.apiClient.isVertexAI())throw new Error("This method is only supported by the Gemini Developer API.");{const u=qg(t);return r=N("{file_search_store_name}:importFile",u._url),s=u._query,delete u._url,delete u._query,o=this.apiClient.request({path:r,queryParams:s,body:JSON.stringify(u),httpMethod:"POST",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(i=t.config)===null||i===void 0?void 0:i.abortSignal}).then(d=>d.json()),o.then(d=>{const c=Bg(d),f=new ii;return Object.assign(f,c),f})}}}/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */let Hs=function(){const{crypto:e}=globalThis;if(e!=null&&e.randomUUID)return Hs=e.randomUUID.bind(e),e.randomUUID();const t=new Uint8Array(1),n=e?()=>e.getRandomValues(t)[0]:()=>Math.random()*255&255;return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,i=>(+i^n()&15>>+i/4).toString(16))};const Wy=()=>Hs();/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */function Un(e){return typeof e=="object"&&e!==null&&("name"in e&&e.name==="AbortError"||"message"in e&&String(e.message).includes("FetchRequestCanceledException"))}const Fn=e=>{if(e instanceof Error)return e;if(typeof e=="object"&&e!==null){try{if(Object.prototype.toString.call(e)==="[object Error]"){const t=new Error(e.message,e.cause?{cause:e.cause}:{});return e.stack&&(t.stack=e.stack),e.cause&&!t.cause&&(t.cause=e.cause),e.name&&(t.name=e.name),t}}catch{}try{return new Error(JSON.stringify(e))}catch{}}return new Error(e)};/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */class ge extends Error{}class se extends ge{constructor(t,n,i,o){super(`${se.makeMessage(t,n,i)}`),this.status=t,this.headers=o,this.error=n}static makeMessage(t,n,i){const o=n!=null&&n.message?typeof n.message=="string"?n.message:JSON.stringify(n.message):n?JSON.stringify(n):i;return t&&o?`${t} ${o}`:t?`${t} status code (no body)`:o||"(no status code or body)"}static generate(t,n,i,o){if(!t||!o)return new Xt({message:i,cause:Fn(n)});const r=n;return t===400?new qs(t,r,i,o):t===401?new Os(t,r,i,o):t===403?new zs(t,r,i,o):t===404?new Js(t,r,i,o):t===409?new $s(t,r,i,o):t===422?new Ws(t,r,i,o):t===429?new Ys(t,r,i,o):t>=500?new Ks(t,r,i,o):new se(t,r,i,o)}}class Vn extends se{constructor({message:t}={}){super(void 0,void 0,t||"Request was aborted.",void 0)}}class Xt extends se{constructor({message:t,cause:n}){super(void 0,void 0,t||"Connection error.",void 0),n&&(this.cause=n)}}class Bs extends Xt{constructor({message:t}={}){super({message:t??"Request timed out."})}}class qs extends se{}class Os extends se{}class zs extends se{}class Js extends se{}class $s extends se{}class Ws extends se{}class Ys extends se{}class Ks extends se{}/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */const Yy=/^[a-z][a-z0-9+.-]*:/i,Ky=e=>Yy.test(e);let Gn=e=>(Gn=Array.isArray,Gn(e));const Xy=Gn;let Qy=Xy;const xr=Qy;function Zy(e){if(!e)return!0;for(const t in e)return!1;return!0}function jy(e,t){return Object.prototype.hasOwnProperty.call(e,t)}const ev=(e,t)=>{if(typeof t!="number"||!Number.isInteger(t))throw new ge(`${e} must be an integer`);if(t<0)throw new ge(`${e} must be a positive integer`);return t},tv=e=>{try{return JSON.parse(e)}catch{return}};/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */const nv=e=>new Promise(t=>setTimeout(t,e));/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */const Ye="0.0.1";/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */function iv(){return typeof Deno<"u"&&Deno.build!=null?"deno":typeof EdgeRuntime<"u"?"edge":Object.prototype.toString.call(typeof globalThis.process<"u"?globalThis.process:0)==="[object process]"?"node":"unknown"}const ov=()=>{var e,t,n,i,o;const r=iv();if(r==="deno")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":Ye,"X-Stainless-OS":Rr(Deno.build.os),"X-Stainless-Arch":wr(Deno.build.arch),"X-Stainless-Runtime":"deno","X-Stainless-Runtime-Version":typeof Deno.version=="string"?Deno.version:(t=(e=Deno.version)===null||e===void 0?void 0:e.deno)!==null&&t!==void 0?t:"unknown"};if(typeof EdgeRuntime<"u")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":Ye,"X-Stainless-OS":"Unknown","X-Stainless-Arch":`other:${EdgeRuntime}`,"X-Stainless-Runtime":"edge","X-Stainless-Runtime-Version":globalThis.process.version};if(r==="node")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":Ye,"X-Stainless-OS":Rr((n=globalThis.process.platform)!==null&&n!==void 0?n:"unknown"),"X-Stainless-Arch":wr((i=globalThis.process.arch)!==null&&i!==void 0?i:"unknown"),"X-Stainless-Runtime":"node","X-Stainless-Runtime-Version":(o=globalThis.process.version)!==null&&o!==void 0?o:"unknown"};const s=rv();return s?{"X-Stainless-Lang":"js","X-Stainless-Package-Version":Ye,"X-Stainless-OS":"Unknown","X-Stainless-Arch":"unknown","X-Stainless-Runtime":`browser:${s.browser}`,"X-Stainless-Runtime-Version":s.version}:{"X-Stainless-Lang":"js","X-Stainless-Package-Version":Ye,"X-Stainless-OS":"Unknown","X-Stainless-Arch":"unknown","X-Stainless-Runtime":"unknown","X-Stainless-Runtime-Version":"unknown"}};function rv(){if(typeof navigator>"u"||!navigator)return null;const e=[{key:"edge",pattern:/Edge(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"ie",pattern:/MSIE(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"ie",pattern:/Trident(?:.*rv\:(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"chrome",pattern:/Chrome(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"firefox",pattern:/Firefox(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"safari",pattern:/(?:Version\W+(\d+)\.(\d+)(?:\.(\d+))?)?(?:\W+Mobile\S*)?\W+Safari/}];for(const{key:t,pattern:n}of e){const i=n.exec(navigator.userAgent);if(i){const o=i[1]||0,r=i[2]||0,s=i[3]||0;return{browser:t,version:`${o}.${r}.${s}`}}}return null}const wr=e=>e==="x32"?"x32":e==="x86_64"||e==="x64"?"x64":e==="arm"?"arm":e==="aarch64"||e==="arm64"?"arm64":e?`other:${e}`:"unknown",Rr=e=>(e=e.toLowerCase(),e.includes("ios")?"iOS":e==="android"?"Android":e==="darwin"?"MacOS":e==="win32"?"Windows":e==="freebsd"?"FreeBSD":e==="openbsd"?"OpenBSD":e==="linux"?"Linux":e?`Other:${e}`:"Unknown");let wt;const sv=()=>wt??(wt=ov());/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */function lv(){if(typeof fetch<"u")return fetch;throw new Error("`fetch` is not defined as a global; Either pass `fetch` to the client, `new GeminiNextGenAPIClient({ fetch })` or polyfill the global, `globalThis.fetch = fetch`")}function Xs(...e){const t=globalThis.ReadableStream;if(typeof t>"u")throw new Error("`ReadableStream` is not defined as a global; You will need to polyfill it, `globalThis.ReadableStream = ReadableStream`");return new t(...e)}function av(e){let t=Symbol.asyncIterator in e?e[Symbol.asyncIterator]():e[Symbol.iterator]();return Xs({start(){},async pull(n){const{done:i,value:o}=await t.next();i?n.close():n.enqueue(o)},async cancel(){var n;await((n=t.return)===null||n===void 0?void 0:n.call(t))}})}function Qs(e){if(e[Symbol.asyncIterator])return e;const t=e.getReader();return{async next(){try{const n=await t.read();return n!=null&&n.done&&t.releaseLock(),n}catch(n){throw t.releaseLock(),n}},async return(){const n=t.cancel();return t.releaseLock(),await n,{done:!0,value:void 0}},[Symbol.asyncIterator](){return this}}}async function uv(e){var t,n;if(e===null||typeof e!="object")return;if(e[Symbol.asyncIterator]){await((n=(t=e[Symbol.asyncIterator]()).return)===null||n===void 0?void 0:n.call(t));return}const i=e.getReader(),o=i.cancel();i.releaseLock(),await o}/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */const cv=({headers:e,body:t})=>({bodyHeaders:{"content-type":"application/json"},body:JSON.stringify(t)});/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */const Zs=()=>{var e;if(typeof File>"u"){const{process:t}=globalThis,n=typeof((e=t==null?void 0:t.versions)===null||e===void 0?void 0:e.node)=="string"&&parseInt(t.versions.node.split("."))<20;throw new Error("`File` is not defined as a global, which is required for file uploads."+(n?" Update to Node 20 LTS or newer, or set `globalThis.File` to `import('node:buffer').File`.":""))}};function pn(e,t,n){return Zs(),new File(e,t??"unknown_file",n)}function dv(e){return(typeof e=="object"&&e!==null&&("name"in e&&e.name&&String(e.name)||"url"in e&&e.url&&String(e.url)||"filename"in e&&e.filename&&String(e.filename)||"path"in e&&e.path&&String(e.path))||"").split(/[\\/]/).pop()||void 0}const fv=e=>e!=null&&typeof e=="object"&&typeof e[Symbol.asyncIterator]=="function";/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */const js=e=>e!=null&&typeof e=="object"&&typeof e.size=="number"&&typeof e.type=="string"&&typeof e.text=="function"&&typeof e.slice=="function"&&typeof e.arrayBuffer=="function",pv=e=>e!=null&&typeof e=="object"&&typeof e.name=="string"&&typeof e.lastModified=="number"&&js(e),hv=e=>e!=null&&typeof e=="object"&&typeof e.url=="string"&&typeof e.blob=="function";async function mv(e,t,n){if(Zs(),e=await e,pv(e))return e instanceof File?e:pn([await e.arrayBuffer()],e.name);if(hv(e)){const o=await e.blob();return t||(t=new URL(e.url).pathname.split(/[\\/]/).pop()),pn(await Hn(o),t,n)}const i=await Hn(e);if(t||(t=dv(e)),!(n!=null&&n.type)){const o=i.find(r=>typeof r=="object"&&"type"in r&&r.type);typeof o=="string"&&(n=Object.assign(Object.assign({},n),{type:o}))}return pn(i,t,n)}async function Hn(e){var t,n,i,o,r;let s=[];if(typeof e=="string"||ArrayBuffer.isView(e)||e instanceof ArrayBuffer)s.push(e);else if(js(e))s.push(e instanceof Blob?e:await e.arrayBuffer());else if(fv(e))try{for(var u=!0,d=Se(e),c;c=await d.next(),t=c.done,!t;u=!0){o=c.value,u=!1;const f=o;s.push(...await Hn(f))}}catch(f){n={error:f}}finally{try{!u&&!t&&(i=d.return)&&await i.call(d)}finally{if(n)throw n.error}}else{const f=(r=e==null?void 0:e.constructor)===null||r===void 0?void 0:r.name;throw new Error(`Unexpected data type: ${typeof e}${f?`; constructor: ${f}`:""}${gv(e)}`)}return s}function gv(e){return typeof e!="object"||e===null?"":`; props: [${Object.getOwnPropertyNames(e).map(n=>`"${n}"`).join(", ")}]`}/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */class el{constructor(t){this._client=t}}el._key=[];/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */function tl(e){return e.replace(/[^A-Za-z0-9\-._~!$&'()*+,;=:@]+/g,encodeURIComponent)}const Pr=Object.freeze(Object.create(null)),yv=(e=tl)=>(function(n,...i){if(n.length===1)return n[0];let o=!1;const r=[],s=n.reduce((f,p,h)=>{var m,g,E;/[?#]/.test(p)&&(o=!0);const T=i[h];let S=(o?encodeURIComponent:e)(""+T);return h!==i.length&&(T==null||typeof T=="object"&&T.toString===((E=Object.getPrototypeOf((g=Object.getPrototypeOf((m=T.hasOwnProperty)!==null&&m!==void 0?m:Pr))!==null&&g!==void 0?g:Pr))===null||E===void 0?void 0:E.toString))&&(S=T+"",r.push({start:f.length+p.length,length:S.length,error:`Value of type ${Object.prototype.toString.call(T).slice(8,-1)} is not a valid path parameter`})),f+p+(h===i.length?"":S)},""),u=s.split(/[?#]/,1)[0],d=new RegExp("(?<=^|\\/)(?:\\.|%2e){1,2}(?=\\/|$)","gi");let c;for(;(c=d.exec(u))!==null;)r.push({start:c.index,length:c[0].length,error:`Value "${c[0]}" can't be safely passed as a path parameter`});if(r.sort((f,p)=>f.start-p.start),r.length>0){let f=0;const p=r.reduce((h,m)=>{const g=" ".repeat(m.start-f),E="^".repeat(m.length);return f=m.start+m.length,h+g+E},"");throw new ge(`Path parameters result in path with invalid segments: +${r.map(h=>h.error).join(` +`)} +${s} +${p}`)}return s}),Rt=yv(tl);/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */class nl extends el{create(t,n){var i;const{api_version:o=this._client.apiVersion}=t,r=Ht(t,["api_version"]);if("model"in r&&"agent_config"in r)throw new ge("Invalid request: specified `model` and `agent_config`. If specifying `model`, use `generation_config`.");if("agent"in r&&"generation_config"in r)throw new ge("Invalid request: specified `agent` and `generation_config`. If specifying `agent`, use `agent_config`.");return this._client.post(Rt`/${o}/interactions`,Object.assign(Object.assign({body:r},n),{stream:(i=t.stream)!==null&&i!==void 0?i:!1}))}delete(t,n={},i){const{api_version:o=this._client.apiVersion}=n??{};return this._client.delete(Rt`/${o}/interactions/${t}`,i)}cancel(t,n={},i){const{api_version:o=this._client.apiVersion}=n??{};return this._client.post(Rt`/${o}/interactions/${t}/cancel`,i)}get(t,n={},i){var o;const r=n??{},{api_version:s=this._client.apiVersion}=r,u=Ht(r,["api_version"]);return this._client.get(Rt`/${s}/interactions/${t}`,Object.assign(Object.assign({query:u},i),{stream:(o=n==null?void 0:n.stream)!==null&&o!==void 0?o:!1}))}}nl._key=Object.freeze(["interactions"]);class il extends nl{}/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */function vv(e){let t=0;for(const o of e)t+=o.length;const n=new Uint8Array(t);let i=0;for(const o of e)n.set(o,i),i+=o.length;return n}let Pt;function ci(e){let t;return(Pt??(t=new globalThis.TextEncoder,Pt=t.encode.bind(t)))(e)}let kt;function kr(e){let t;return(kt??(t=new globalThis.TextDecoder,kt=t.decode.bind(t)))(e)}/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */class Qt{constructor(){this.buffer=new Uint8Array,this.carriageReturnIndex=null}decode(t){if(t==null)return[];const n=t instanceof ArrayBuffer?new Uint8Array(t):typeof t=="string"?ci(t):t;this.buffer=vv([this.buffer,n]);const i=[];let o;for(;(o=Tv(this.buffer,this.carriageReturnIndex))!=null;){if(o.carriage&&this.carriageReturnIndex==null){this.carriageReturnIndex=o.index;continue}if(this.carriageReturnIndex!=null&&(o.index!==this.carriageReturnIndex+1||o.carriage)){i.push(kr(this.buffer.subarray(0,this.carriageReturnIndex-1))),this.buffer=this.buffer.subarray(this.carriageReturnIndex),this.carriageReturnIndex=null;continue}const r=this.carriageReturnIndex!==null?o.preceding-1:o.preceding,s=kr(this.buffer.subarray(0,r));i.push(s),this.buffer=this.buffer.subarray(o.index),this.carriageReturnIndex=null}return i}flush(){return this.buffer.length?this.decode(` +`):[]}}Qt.NEWLINE_CHARS=new Set([` +`,"\r"]);Qt.NEWLINE_REGEXP=/\r\n|[\n\r]/g;function Tv(e,t){for(let o=t??0;o{if(e){if(jy(Bt,e))return e;re(n).warn(`${t} was set to ${JSON.stringify(e)}, expected one of ${JSON.stringify(Object.keys(Bt))}`)}};function mt(){}function Mt(e,t,n){return!t||Bt[e]>Bt[n]?mt:t[e].bind(t)}const Sv={error:mt,warn:mt,info:mt,debug:mt};let Nr=new WeakMap;function re(e){var t;const n=e.logger,i=(t=e.logLevel)!==null&&t!==void 0?t:"off";if(!n)return Sv;const o=Nr.get(n);if(o&&o[0]===i)return o[1];const r={error:Mt("error",n,i),warn:Mt("warn",n,i),info:Mt("info",n,i),debug:Mt("debug",n,i)};return Nr.set(n,[i,r]),r}const He=e=>(e.options&&(e.options=Object.assign({},e.options),delete e.options.headers),e.headers&&(e.headers=Object.fromEntries((e.headers instanceof Headers?[...e.headers]:Object.entries(e.headers)).map(([t,n])=>[t,t.toLowerCase()==="x-goog-api-key"||t.toLowerCase()==="authorization"||t.toLowerCase()==="cookie"||t.toLowerCase()==="set-cookie"?"***":n]))),"retryOfRequestLogID"in e&&(e.retryOfRequestLogID&&(e.retryOf=e.retryOfRequestLogID),delete e.retryOfRequestLogID),e);/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */class Xe{constructor(t,n,i){this.iterator=t,this.controller=n,this.client=i}static fromSSEResponse(t,n,i){let o=!1;const r=i?re(i):console;function s(){return Ee(this,arguments,function*(){var d,c,f,p;if(o)throw new ge("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");o=!0;let h=!1;try{try{for(var m=!0,g=Se(_v(t,n)),E;E=yield H(g.next()),d=E.done,!d;m=!0){p=E.value,m=!1;const T=p;if(!h)if(T.data.startsWith("[DONE]")){h=!0;continue}else try{yield yield H(JSON.parse(T.data))}catch(S){throw r.error("Could not parse message into JSON:",T.data),r.error("From chunk:",T.raw),S}}}catch(T){c={error:T}}finally{try{!m&&!d&&(f=g.return)&&(yield H(f.call(g)))}finally{if(c)throw c.error}}h=!0}catch(T){if(Un(T))return yield H(void 0);throw T}finally{h||n.abort()}})}return new Xe(s,n,i)}static fromReadableStream(t,n,i){let o=!1;function r(){return Ee(this,arguments,function*(){var d,c,f,p;const h=new Qt,m=Qs(t);try{for(var g=!0,E=Se(m),T;T=yield H(E.next()),d=T.done,!d;g=!0){p=T.value,g=!1;const S=p;for(const x of h.decode(S))yield yield H(x)}}catch(S){c={error:S}}finally{try{!g&&!d&&(f=E.return)&&(yield H(f.call(E)))}finally{if(c)throw c.error}}for(const S of h.flush())yield yield H(S)})}function s(){return Ee(this,arguments,function*(){var d,c,f,p;if(o)throw new ge("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");o=!0;let h=!1;try{try{for(var m=!0,g=Se(r()),E;E=yield H(g.next()),d=E.done,!d;m=!0){p=E.value,m=!1;const T=p;h||T&&(yield yield H(JSON.parse(T)))}}catch(T){c={error:T}}finally{try{!m&&!d&&(f=g.return)&&(yield H(f.call(g)))}finally{if(c)throw c.error}}h=!0}catch(T){if(Un(T))return yield H(void 0);throw T}finally{h||n.abort()}})}return new Xe(s,n,i)}[Symbol.asyncIterator](){return this.iterator()}tee(){const t=[],n=[],i=this.iterator(),o=r=>({next:()=>{if(r.length===0){const s=i.next();t.push(s),n.push(s)}return r.shift()}});return[new Xe(()=>o(t),this.controller,this.client),new Xe(()=>o(n),this.controller,this.client)]}toReadableStream(){const t=this;let n;return Xs({async start(){n=t[Symbol.asyncIterator]()},async pull(i){try{const{value:o,done:r}=await n.next();if(r)return i.close();const s=ci(JSON.stringify(o)+` +`);i.enqueue(s)}catch(o){i.error(o)}},async cancel(){var i;await((i=n.return)===null||i===void 0?void 0:i.call(n))}})}}function _v(e,t){return Ee(this,arguments,function*(){var i,o,r,s;if(!e.body)throw t.abort(),typeof globalThis.navigator<"u"&&globalThis.navigator.product==="ReactNative"?new ge("The default react-native fetch implementation does not support streaming. Please use expo/fetch: https://docs.expo.dev/versions/latest/sdk/expo/#expofetch-api"):new ge("Attempted to iterate over a response with no body");const u=new Iv,d=new Qt,c=Qs(e.body);try{for(var f=!0,p=Se(Cv(c)),h;h=yield H(p.next()),i=h.done,!i;f=!0){s=h.value,f=!1;const m=s;for(const g of d.decode(m)){const E=u.decode(g);E&&(yield yield H(E))}}}catch(m){o={error:m}}finally{try{!f&&!i&&(r=p.return)&&(yield H(r.call(p)))}finally{if(o)throw o.error}}for(const m of d.flush()){const g=u.decode(m);g&&(yield yield H(g))}})}function Cv(e){return Ee(this,arguments,function*(){var n,i,o,r;let s=new Uint8Array;try{for(var u=!0,d=Se(e),c;c=yield H(d.next()),n=c.done,!n;u=!0){r=c.value,u=!1;const f=r;if(f==null)continue;const p=f instanceof ArrayBuffer?new Uint8Array(f):typeof f=="string"?ci(f):f;let h=new Uint8Array(s.length+p.length);h.set(s),h.set(p,s.length),s=h;let m;for(;(m=Ev(s))!==-1;)yield yield H(s.slice(0,m)),s=s.slice(m)}}catch(f){i={error:f}}finally{try{!u&&!n&&(o=d.return)&&(yield H(o.call(d)))}finally{if(i)throw i.error}}s.length>0&&(yield yield H(s))})}class Iv{constructor(){this.event=null,this.data=[],this.chunks=[]}decode(t){if(t.endsWith("\r")&&(t=t.substring(0,t.length-1)),!t){if(!this.event&&!this.data.length)return null;const r={event:this.event,data:this.data.join(` +`),raw:this.chunks};return this.event=null,this.data=[],this.chunks=[],r}if(this.chunks.push(t),t.startsWith(":"))return null;let[n,i,o]=Av(t,":");return o.startsWith(" ")&&(o=o.substring(1)),n==="event"?this.event=o:n==="data"&&this.data.push(o),null}}function Av(e,t){const n=e.indexOf(t);return n!==-1?[e.substring(0,n),t,e.substring(n+t.length)]:[e,"",""]}/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */async function xv(e,t){const{response:n,requestLogID:i,retryOfRequestLogID:o,startTime:r}=t,s=await(async()=>{var u;if(t.options.stream)return re(e).debug("response",n.status,n.url,n.headers,n.body),t.options.__streamClass?t.options.__streamClass.fromSSEResponse(n,t.controller,e):Xe.fromSSEResponse(n,t.controller,e);if(n.status===204)return null;if(t.options.__binaryResponse)return n;const d=n.headers.get("content-type"),c=(u=d==null?void 0:d.split(";")[0])===null||u===void 0?void 0:u.trim();return(c==null?void 0:c.includes("application/json"))||(c==null?void 0:c.endsWith("+json"))?await n.json():await n.text()})();return re(e).debug(`[${i}] response parsed`,He({retryOfRequestLogID:o,url:n.url,status:n.status,body:s,durationMs:Date.now()-r})),s}/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */class di extends Promise{constructor(t,n,i=xv){super(o=>{o(null)}),this.responsePromise=n,this.parseResponse=i,this.client=t}_thenUnwrap(t){return new di(this.client,this.responsePromise,async(n,i)=>t(await this.parseResponse(n,i),i))}asResponse(){return this.responsePromise.then(t=>t.response)}async withResponse(){const[t,n]=await Promise.all([this.parse(),this.asResponse()]);return{data:t,response:n}}parse(){return this.parsedPromise||(this.parsedPromise=this.responsePromise.then(t=>this.parseResponse(this.client,t))),this.parsedPromise}then(t,n){return this.parse().then(t,n)}catch(t){return this.parse().catch(t)}finally(t){return this.parse().finally(t)}}/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */const ol=Symbol("brand.privateNullableHeaders");function*wv(e){if(!e)return;if(ol in e){const{values:i,nulls:o}=e;yield*i.entries();for(const r of o)yield[r,null];return}let t=!1,n;e instanceof Headers?n=e.entries():xr(e)?n=e:(t=!0,n=Object.entries(e??{}));for(let i of n){const o=i[0];if(typeof o!="string")throw new TypeError("expected header name to be a string");const r=xr(i[1])?i[1]:[i[1]];let s=!1;for(const u of r)u!==void 0&&(t&&!s&&(s=!0,yield[o,null]),yield[o,u])}}const ht=e=>{const t=new Headers,n=new Set;for(const i of e){const o=new Set;for(const[r,s]of wv(i)){const u=r.toLowerCase();o.has(u)||(t.delete(r),o.add(u)),s===null?(t.delete(r),n.add(u)):(t.append(r,s),n.delete(u))}}return{[ol]:!0,values:t,nulls:n}};/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */const hn=e=>{var t,n,i,o,r,s;if(typeof globalThis.process<"u")return(i=(n=(t=Yd)===null||t===void 0?void 0:t[e])===null||n===void 0?void 0:n.trim())!==null&&i!==void 0?i:void 0;if(typeof globalThis.Deno<"u")return(s=(r=(o=globalThis.Deno.env)===null||o===void 0?void 0:o.get)===null||r===void 0?void 0:r.call(o,e))===null||s===void 0?void 0:s.trim()};/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */var rl;class Zt{constructor(t){var n,i,o,r,s,u,d,{baseURL:c=hn("GEMINI_NEXT_GEN_API_BASE_URL"),apiKey:f=(n=hn("GEMINI_API_KEY"))!==null&&n!==void 0?n:null,apiVersion:p="v1beta"}=t,h=Ht(t,["baseURL","apiKey","apiVersion"]);const m=Object.assign(Object.assign({apiKey:f,apiVersion:p},h),{baseURL:c||"https://generativelanguage.googleapis.com"});this.baseURL=m.baseURL,this.timeout=(i=m.timeout)!==null&&i!==void 0?i:Zt.DEFAULT_TIMEOUT,this.logger=(o=m.logger)!==null&&o!==void 0?o:console;const g="warn";this.logLevel=g,this.logLevel=(s=(r=Mr(m.logLevel,"ClientOptions.logLevel",this))!==null&&r!==void 0?r:Mr(hn("GEMINI_NEXT_GEN_API_LOG"),"process.env['GEMINI_NEXT_GEN_API_LOG']",this))!==null&&s!==void 0?s:g,this.fetchOptions=m.fetchOptions,this.maxRetries=(u=m.maxRetries)!==null&&u!==void 0?u:2,this.fetch=(d=m.fetch)!==null&&d!==void 0?d:lv(),this.encoder=cv,this._options=m,this.apiKey=f,this.apiVersion=p,this.clientAdapter=m.clientAdapter}withOptions(t){return new this.constructor(Object.assign(Object.assign(Object.assign({},this._options),{baseURL:this.baseURL,maxRetries:this.maxRetries,timeout:this.timeout,logger:this.logger,logLevel:this.logLevel,fetch:this.fetch,fetchOptions:this.fetchOptions,apiKey:this.apiKey,apiVersion:this.apiVersion}),t))}baseURLOverridden(){return this.baseURL!=="https://generativelanguage.googleapis.com"}defaultQuery(){return this._options.defaultQuery}validateHeaders({values:t,nulls:n}){if(!(t.has("authorization")||t.has("x-goog-api-key"))&&!(this.apiKey&&t.get("x-goog-api-key"))&&!n.has("x-goog-api-key"))throw new Error('Could not resolve authentication method. Expected the apiKey to be set. Or for the "x-goog-api-key" headers to be explicitly omitted')}async authHeaders(t){const n=ht([t.headers]);if(!(n.values.has("authorization")||n.values.has("x-goog-api-key"))){if(this.apiKey)return ht([{"x-goog-api-key":this.apiKey}]);if(this.clientAdapter.isVertexAI())return ht([await this.clientAdapter.getAuthHeaders()])}}stringifyQuery(t){return Object.entries(t).filter(([n,i])=>typeof i<"u").map(([n,i])=>{if(typeof i=="string"||typeof i=="number"||typeof i=="boolean")return`${encodeURIComponent(n)}=${encodeURIComponent(i)}`;if(i===null)return`${encodeURIComponent(n)}=`;throw new ge(`Cannot stringify type ${typeof i}; Expected string, number, boolean, or null. If you need to pass nested query parameters, you can manually encode them, e.g. { query: { 'foo[key1]': value1, 'foo[key2]': value2 } }, and please open a GitHub issue requesting better support for your use case.`)}).join("&")}getUserAgent(){return`${this.constructor.name}/JS ${Ye}`}defaultIdempotencyKey(){return`stainless-node-retry-${Wy()}`}makeStatusError(t,n,i,o){return se.generate(t,n,i,o)}buildURL(t,n,i){const o=!this.baseURLOverridden()&&i||this.baseURL,r=Ky(t)?new URL(t):new URL(o+(o.endsWith("/")&&t.startsWith("/")?t.slice(1):t)),s=this.defaultQuery();return Zy(s)||(n=Object.assign(Object.assign({},s),n)),typeof n=="object"&&n&&!Array.isArray(n)&&(r.search=this.stringifyQuery(n)),r.toString()}async prepareOptions(t){if(this.clientAdapter&&this.clientAdapter.isVertexAI()&&!t.path.startsWith(`/${this.apiVersion}/projects/`)){const n=t.path.slice(this.apiVersion.length+1);t.path=`/${this.apiVersion}/projects/${this.clientAdapter.getProject()}/locations/${this.clientAdapter.getLocation()}${n}`}}async prepareRequest(t,{url:n,options:i}){}get(t,n){return this.methodRequest("get",t,n)}post(t,n){return this.methodRequest("post",t,n)}patch(t,n){return this.methodRequest("patch",t,n)}put(t,n){return this.methodRequest("put",t,n)}delete(t,n){return this.methodRequest("delete",t,n)}methodRequest(t,n,i){return this.request(Promise.resolve(i).then(o=>Object.assign({method:t,path:n},o)))}request(t,n=null){return new di(this,this.makeRequest(t,n,void 0))}async makeRequest(t,n,i){var o,r,s;const u=await t,d=(o=u.maxRetries)!==null&&o!==void 0?o:this.maxRetries;n==null&&(n=d),await this.prepareOptions(u);const{req:c,url:f,timeout:p}=await this.buildRequest(u,{retryCount:d-n});await this.prepareRequest(c,{url:f,options:u});const h="log_"+(Math.random()*(1<<24)|0).toString(16).padStart(6,"0"),m=i===void 0?"":`, retryOf: ${i}`,g=Date.now();if(re(this).debug(`[${h}] sending request`,He({retryOfRequestLogID:i,method:u.method,url:f,options:u,headers:c.headers})),!((r=u.signal)===null||r===void 0)&&r.aborted)throw new Vn;const E=new AbortController,T=await this.fetchWithTimeout(f,c,p,E).catch(Fn),S=Date.now();if(T instanceof globalThis.Error){const C=`retrying, ${n} attempts remaining`;if(!((s=u.signal)===null||s===void 0)&&s.aborted)throw new Vn;const w=Un(T)||/timed? ?out/i.test(String(T)+("cause"in T?String(T.cause):""));if(n)return re(this).info(`[${h}] connection ${w?"timed out":"failed"} - ${C}`),re(this).debug(`[${h}] connection ${w?"timed out":"failed"} (${C})`,He({retryOfRequestLogID:i,url:f,durationMs:S-g,message:T.message})),this.retryRequest(u,n,i??h);throw re(this).info(`[${h}] connection ${w?"timed out":"failed"} - error; no more retries left`),re(this).debug(`[${h}] connection ${w?"timed out":"failed"} (error; no more retries left)`,He({retryOfRequestLogID:i,url:f,durationMs:S-g,message:T.message})),w?new Bs:new Xt({cause:T})}const x=`[${h}${m}] ${c.method} ${f} ${T.ok?"succeeded":"failed"} with status ${T.status} in ${S-g}ms`;if(!T.ok){const C=await this.shouldRetry(T);if(n&&C){const P=`retrying, ${n} attempts remaining`;return await uv(T.body),re(this).info(`${x} - ${P}`),re(this).debug(`[${h}] response error (${P})`,He({retryOfRequestLogID:i,url:T.url,status:T.status,headers:T.headers,durationMs:S-g})),this.retryRequest(u,n,i??h,T.headers)}const w=C?"error; no more retries left":"error; not retryable";re(this).info(`${x} - ${w}`);const I=await T.text().catch(P=>Fn(P).message),_=tv(I),b=_?void 0:I;throw re(this).debug(`[${h}] response error (${w})`,He({retryOfRequestLogID:i,url:T.url,status:T.status,headers:T.headers,message:b,durationMs:Date.now()-g})),this.makeStatusError(T.status,_,b,T.headers)}return re(this).info(x),re(this).debug(`[${h}] response start`,He({retryOfRequestLogID:i,url:T.url,status:T.status,headers:T.headers,durationMs:S-g})),{response:T,options:u,controller:E,requestLogID:h,retryOfRequestLogID:i,startTime:g}}async fetchWithTimeout(t,n,i,o){const r=n||{},{signal:s,method:u}=r,d=Ht(r,["signal","method"]);s&&s.addEventListener("abort",()=>o.abort());const c=setTimeout(()=>o.abort(),i),f=globalThis.ReadableStream&&d.body instanceof globalThis.ReadableStream||typeof d.body=="object"&&d.body!==null&&Symbol.asyncIterator in d.body,p=Object.assign(Object.assign(Object.assign({signal:o.signal},f?{duplex:"half"}:{}),{method:"GET"}),d);u&&(p.method=u.toUpperCase());try{return await this.fetch.call(void 0,t,p)}finally{clearTimeout(c)}}async shouldRetry(t){const n=t.headers.get("x-should-retry");return n==="true"?!0:n==="false"?!1:t.status===408||t.status===409||t.status===429||t.status>=500}async retryRequest(t,n,i,o){var r;let s;const u=o==null?void 0:o.get("retry-after-ms");if(u){const c=parseFloat(u);Number.isNaN(c)||(s=c)}const d=o==null?void 0:o.get("retry-after");if(d&&!s){const c=parseFloat(d);Number.isNaN(c)?s=Date.parse(d)-Date.now():s=c*1e3}if(!(s&&0<=s&&s<60*1e3)){const c=(r=t.maxRetries)!==null&&r!==void 0?r:this.maxRetries;s=this.calculateDefaultRetryTimeoutMillis(n,c)}return await nv(s),this.makeRequest(t,n-1,i)}calculateDefaultRetryTimeoutMillis(t,n){const r=n-t,s=Math.min(.5*Math.pow(2,r),8),u=1-Math.random()*.25;return s*u*1e3}async buildRequest(t,{retryCount:n=0}={}){var i,o,r;const s=Object.assign({},t),{method:u,path:d,query:c,defaultBaseURL:f}=s,p=this.buildURL(d,c,f);"timeout"in s&&ev("timeout",s.timeout),s.timeout=(i=s.timeout)!==null&&i!==void 0?i:this.timeout;const{bodyHeaders:h,body:m}=this.buildBody({options:s}),g=await this.buildHeaders({options:t,method:u,bodyHeaders:h,retryCount:n});return{req:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({method:u,headers:g},s.signal&&{signal:s.signal}),globalThis.ReadableStream&&m instanceof globalThis.ReadableStream&&{duplex:"half"}),m&&{body:m}),(o=this.fetchOptions)!==null&&o!==void 0?o:{}),(r=s.fetchOptions)!==null&&r!==void 0?r:{}),url:p,timeout:s.timeout}}async buildHeaders({options:t,method:n,bodyHeaders:i,retryCount:o}){let r={};this.idempotencyHeader&&n!=="get"&&(t.idempotencyKey||(t.idempotencyKey=this.defaultIdempotencyKey()),r[this.idempotencyHeader]=t.idempotencyKey);const s=await this.authHeaders(t);let u=ht([r,Object.assign(Object.assign({Accept:"application/json","User-Agent":this.getUserAgent(),"X-Stainless-Retry-Count":String(o)},t.timeout?{"X-Stainless-Timeout":String(Math.trunc(t.timeout/1e3))}:{}),sv()),this._options.defaultHeaders,i,t.headers,s]);return this.validateHeaders(u),u.values}buildBody({options:{body:t,headers:n}}){if(!t)return{bodyHeaders:void 0,body:void 0};const i=ht([n]);return ArrayBuffer.isView(t)||t instanceof ArrayBuffer||t instanceof DataView||typeof t=="string"&&i.values.has("content-type")||globalThis.Blob&&t instanceof globalThis.Blob||t instanceof FormData||t instanceof URLSearchParams||globalThis.ReadableStream&&t instanceof globalThis.ReadableStream?{bodyHeaders:void 0,body:t}:typeof t=="object"&&(Symbol.asyncIterator in t||Symbol.iterator in t&&"next"in t&&typeof t.next=="function")?{bodyHeaders:void 0,body:av(t)}:this.encoder({body:t,headers:i})}}Zt.DEFAULT_TIMEOUT=6e4;class te extends Zt{constructor(){super(...arguments),this.interactions=new il(this)}}rl=te;te.GeminiNextGenAPIClient=rl;te.GeminiNextGenAPIClientError=ge;te.APIError=se;te.APIConnectionError=Xt;te.APIConnectionTimeoutError=Bs;te.APIUserAbortError=Vn;te.NotFoundError=Js;te.ConflictError=$s;te.RateLimitError=Ys;te.BadRequestError=qs;te.AuthenticationError=Os;te.InternalServerError=Ks;te.PermissionDeniedError=zs;te.UnprocessableEntityError=Ws;te.toFile=mv;te.Interactions=il;/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */function Rv(e,t){const n={},i=l(e,["name"]);return i!=null&&a(n,["_url","name"],i),n}function Pv(e,t){const n={},i=l(e,["name"]);return i!=null&&a(n,["_url","name"],i),n}function kv(e,t){const n={},i=l(e,["sdkHttpResponse"]);return i!=null&&a(n,["sdkHttpResponse"],i),n}function Mv(e,t){const n={},i=l(e,["sdkHttpResponse"]);return i!=null&&a(n,["sdkHttpResponse"],i),n}function Nv(e,t,n){const i={};if(l(e,["validationDataset"])!==void 0)throw new Error("validationDataset parameter is not supported in Gemini API.");const o=l(e,["tunedModelDisplayName"]);if(t!==void 0&&o!=null&&a(t,["displayName"],o),l(e,["description"])!==void 0)throw new Error("description parameter is not supported in Gemini API.");const r=l(e,["epochCount"]);t!==void 0&&r!=null&&a(t,["tuningTask","hyperparameters","epochCount"],r);const s=l(e,["learningRateMultiplier"]);if(s!=null&&a(i,["tuningTask","hyperparameters","learningRateMultiplier"],s),l(e,["exportLastCheckpointOnly"])!==void 0)throw new Error("exportLastCheckpointOnly parameter is not supported in Gemini API.");if(l(e,["preTunedModelCheckpointId"])!==void 0)throw new Error("preTunedModelCheckpointId parameter is not supported in Gemini API.");if(l(e,["adapterSize"])!==void 0)throw new Error("adapterSize parameter is not supported in Gemini API.");if(l(e,["tuningMode"])!==void 0)throw new Error("tuningMode parameter is not supported in Gemini API.");if(l(e,["customBaseModel"])!==void 0)throw new Error("customBaseModel parameter is not supported in Gemini API.");const u=l(e,["batchSize"]);t!==void 0&&u!=null&&a(t,["tuningTask","hyperparameters","batchSize"],u);const d=l(e,["learningRate"]);if(t!==void 0&&d!=null&&a(t,["tuningTask","hyperparameters","learningRate"],d),l(e,["labels"])!==void 0)throw new Error("labels parameter is not supported in Gemini API.");if(l(e,["beta"])!==void 0)throw new Error("beta parameter is not supported in Gemini API.");if(l(e,["baseTeacherModel"])!==void 0)throw new Error("baseTeacherModel parameter is not supported in Gemini API.");if(l(e,["tunedTeacherModelSource"])!==void 0)throw new Error("tunedTeacherModelSource parameter is not supported in Gemini API.");if(l(e,["sftLossWeightMultiplier"])!==void 0)throw new Error("sftLossWeightMultiplier parameter is not supported in Gemini API.");if(l(e,["outputUri"])!==void 0)throw new Error("outputUri parameter is not supported in Gemini API.");return i}function Dv(e,t,n){const i={};let o=l(n,["config","method"]);if(o===void 0&&(o="SUPERVISED_FINE_TUNING"),o==="SUPERVISED_FINE_TUNING"){const I=l(e,["validationDataset"]);t!==void 0&&I!=null&&a(t,["supervisedTuningSpec"],mn(I))}else if(o==="PREFERENCE_TUNING"){const I=l(e,["validationDataset"]);t!==void 0&&I!=null&&a(t,["preferenceOptimizationSpec"],mn(I))}else if(o==="DISTILLATION"){const I=l(e,["validationDataset"]);t!==void 0&&I!=null&&a(t,["distillationSpec"],mn(I))}const r=l(e,["tunedModelDisplayName"]);t!==void 0&&r!=null&&a(t,["tunedModelDisplayName"],r);const s=l(e,["description"]);t!==void 0&&s!=null&&a(t,["description"],s);let u=l(n,["config","method"]);if(u===void 0&&(u="SUPERVISED_FINE_TUNING"),u==="SUPERVISED_FINE_TUNING"){const I=l(e,["epochCount"]);t!==void 0&&I!=null&&a(t,["supervisedTuningSpec","hyperParameters","epochCount"],I)}else if(u==="PREFERENCE_TUNING"){const I=l(e,["epochCount"]);t!==void 0&&I!=null&&a(t,["preferenceOptimizationSpec","hyperParameters","epochCount"],I)}else if(u==="DISTILLATION"){const I=l(e,["epochCount"]);t!==void 0&&I!=null&&a(t,["distillationSpec","hyperParameters","epochCount"],I)}let d=l(n,["config","method"]);if(d===void 0&&(d="SUPERVISED_FINE_TUNING"),d==="SUPERVISED_FINE_TUNING"){const I=l(e,["learningRateMultiplier"]);t!==void 0&&I!=null&&a(t,["supervisedTuningSpec","hyperParameters","learningRateMultiplier"],I)}else if(d==="PREFERENCE_TUNING"){const I=l(e,["learningRateMultiplier"]);t!==void 0&&I!=null&&a(t,["preferenceOptimizationSpec","hyperParameters","learningRateMultiplier"],I)}else if(d==="DISTILLATION"){const I=l(e,["learningRateMultiplier"]);t!==void 0&&I!=null&&a(t,["distillationSpec","hyperParameters","learningRateMultiplier"],I)}let c=l(n,["config","method"]);if(c===void 0&&(c="SUPERVISED_FINE_TUNING"),c==="SUPERVISED_FINE_TUNING"){const I=l(e,["exportLastCheckpointOnly"]);t!==void 0&&I!=null&&a(t,["supervisedTuningSpec","exportLastCheckpointOnly"],I)}else if(c==="PREFERENCE_TUNING"){const I=l(e,["exportLastCheckpointOnly"]);t!==void 0&&I!=null&&a(t,["preferenceOptimizationSpec","exportLastCheckpointOnly"],I)}else if(c==="DISTILLATION"){const I=l(e,["exportLastCheckpointOnly"]);t!==void 0&&I!=null&&a(t,["distillationSpec","exportLastCheckpointOnly"],I)}let f=l(n,["config","method"]);if(f===void 0&&(f="SUPERVISED_FINE_TUNING"),f==="SUPERVISED_FINE_TUNING"){const I=l(e,["adapterSize"]);t!==void 0&&I!=null&&a(t,["supervisedTuningSpec","hyperParameters","adapterSize"],I)}else if(f==="PREFERENCE_TUNING"){const I=l(e,["adapterSize"]);t!==void 0&&I!=null&&a(t,["preferenceOptimizationSpec","hyperParameters","adapterSize"],I)}else if(f==="DISTILLATION"){const I=l(e,["adapterSize"]);t!==void 0&&I!=null&&a(t,["distillationSpec","hyperParameters","adapterSize"],I)}let p=l(n,["config","method"]);if(p===void 0&&(p="SUPERVISED_FINE_TUNING"),p==="SUPERVISED_FINE_TUNING"){const I=l(e,["tuningMode"]);t!==void 0&&I!=null&&a(t,["supervisedTuningSpec","tuningMode"],I)}const h=l(e,["customBaseModel"]);t!==void 0&&h!=null&&a(t,["customBaseModel"],h);let m=l(n,["config","method"]);if(m===void 0&&(m="SUPERVISED_FINE_TUNING"),m==="SUPERVISED_FINE_TUNING"){const I=l(e,["batchSize"]);t!==void 0&&I!=null&&a(t,["supervisedTuningSpec","hyperParameters","batchSize"],I)}let g=l(n,["config","method"]);if(g===void 0&&(g="SUPERVISED_FINE_TUNING"),g==="SUPERVISED_FINE_TUNING"){const I=l(e,["learningRate"]);t!==void 0&&I!=null&&a(t,["supervisedTuningSpec","hyperParameters","learningRate"],I)}const E=l(e,["labels"]);t!==void 0&&E!=null&&a(t,["labels"],E);const T=l(e,["beta"]);t!==void 0&&T!=null&&a(t,["preferenceOptimizationSpec","hyperParameters","beta"],T);const S=l(e,["baseTeacherModel"]);t!==void 0&&S!=null&&a(t,["distillationSpec","baseTeacherModel"],S);const x=l(e,["tunedTeacherModelSource"]);t!==void 0&&x!=null&&a(t,["distillationSpec","tunedTeacherModelSource"],x);const C=l(e,["sftLossWeightMultiplier"]);t!==void 0&&C!=null&&a(t,["distillationSpec","hyperParameters","sftLossWeightMultiplier"],C);const w=l(e,["outputUri"]);return t!==void 0&&w!=null&&a(t,["outputUri"],w),i}function bv(e,t){const n={},i=l(e,["baseModel"]);i!=null&&a(n,["baseModel"],i);const o=l(e,["preTunedModel"]);o!=null&&a(n,["preTunedModel"],o);const r=l(e,["trainingDataset"]);r!=null&&Jv(r);const s=l(e,["config"]);return s!=null&&Nv(s,n),n}function Lv(e,t){const n={},i=l(e,["baseModel"]);i!=null&&a(n,["baseModel"],i);const o=l(e,["preTunedModel"]);o!=null&&a(n,["preTunedModel"],o);const r=l(e,["trainingDataset"]);r!=null&&$v(r,n,t);const s=l(e,["config"]);return s!=null&&Dv(s,n,t),n}function Uv(e,t){const n={},i=l(e,["name"]);return i!=null&&a(n,["_url","name"],i),n}function Fv(e,t){const n={},i=l(e,["name"]);return i!=null&&a(n,["_url","name"],i),n}function Vv(e,t,n){const i={},o=l(e,["pageSize"]);t!==void 0&&o!=null&&a(t,["_query","pageSize"],o);const r=l(e,["pageToken"]);t!==void 0&&r!=null&&a(t,["_query","pageToken"],r);const s=l(e,["filter"]);return t!==void 0&&s!=null&&a(t,["_query","filter"],s),i}function Gv(e,t,n){const i={},o=l(e,["pageSize"]);t!==void 0&&o!=null&&a(t,["_query","pageSize"],o);const r=l(e,["pageToken"]);t!==void 0&&r!=null&&a(t,["_query","pageToken"],r);const s=l(e,["filter"]);return t!==void 0&&s!=null&&a(t,["_query","filter"],s),i}function Hv(e,t){const n={},i=l(e,["config"]);return i!=null&&Vv(i,n),n}function Bv(e,t){const n={},i=l(e,["config"]);return i!=null&&Gv(i,n),n}function qv(e,t){const n={},i=l(e,["sdkHttpResponse"]);i!=null&&a(n,["sdkHttpResponse"],i);const o=l(e,["nextPageToken"]);o!=null&&a(n,["nextPageToken"],o);const r=l(e,["tunedModels"]);if(r!=null){let s=r;Array.isArray(s)&&(s=s.map(u=>sl(u))),a(n,["tuningJobs"],s)}return n}function Ov(e,t){const n={},i=l(e,["sdkHttpResponse"]);i!=null&&a(n,["sdkHttpResponse"],i);const o=l(e,["nextPageToken"]);o!=null&&a(n,["nextPageToken"],o);const r=l(e,["tuningJobs"]);if(r!=null){let s=r;Array.isArray(s)&&(s=s.map(u=>Bn(u))),a(n,["tuningJobs"],s)}return n}function zv(e,t){const n={},i=l(e,["name"]);i!=null&&a(n,["model"],i);const o=l(e,["name"]);return o!=null&&a(n,["endpoint"],o),n}function Jv(e,t){const n={};if(l(e,["gcsUri"])!==void 0)throw new Error("gcsUri parameter is not supported in Gemini API.");if(l(e,["vertexDatasetResource"])!==void 0)throw new Error("vertexDatasetResource parameter is not supported in Gemini API.");const i=l(e,["examples"]);if(i!=null){let o=i;Array.isArray(o)&&(o=o.map(r=>r)),a(n,["examples","examples"],o)}return n}function $v(e,t,n){const i={};let o=l(n,["config","method"]);if(o===void 0&&(o="SUPERVISED_FINE_TUNING"),o==="SUPERVISED_FINE_TUNING"){const s=l(e,["gcsUri"]);t!==void 0&&s!=null&&a(t,["supervisedTuningSpec","trainingDatasetUri"],s)}else if(o==="PREFERENCE_TUNING"){const s=l(e,["gcsUri"]);t!==void 0&&s!=null&&a(t,["preferenceOptimizationSpec","trainingDatasetUri"],s)}else if(o==="DISTILLATION"){const s=l(e,["gcsUri"]);t!==void 0&&s!=null&&a(t,["distillationSpec","promptDatasetUri"],s)}let r=l(n,["config","method"]);if(r===void 0&&(r="SUPERVISED_FINE_TUNING"),r==="SUPERVISED_FINE_TUNING"){const s=l(e,["vertexDatasetResource"]);t!==void 0&&s!=null&&a(t,["supervisedTuningSpec","trainingDatasetUri"],s)}else if(r==="PREFERENCE_TUNING"){const s=l(e,["vertexDatasetResource"]);t!==void 0&&s!=null&&a(t,["preferenceOptimizationSpec","trainingDatasetUri"],s)}else if(r==="DISTILLATION"){const s=l(e,["vertexDatasetResource"]);t!==void 0&&s!=null&&a(t,["distillationSpec","promptDatasetUri"],s)}if(l(e,["examples"])!==void 0)throw new Error("examples parameter is not supported in Vertex AI.");return i}function sl(e,t){const n={},i=l(e,["sdkHttpResponse"]);i!=null&&a(n,["sdkHttpResponse"],i);const o=l(e,["name"]);o!=null&&a(n,["name"],o);const r=l(e,["state"]);r!=null&&a(n,["state"],_s(r));const s=l(e,["createTime"]);s!=null&&a(n,["createTime"],s);const u=l(e,["tuningTask","startTime"]);u!=null&&a(n,["startTime"],u);const d=l(e,["tuningTask","completeTime"]);d!=null&&a(n,["endTime"],d);const c=l(e,["updateTime"]);c!=null&&a(n,["updateTime"],c);const f=l(e,["description"]);f!=null&&a(n,["description"],f);const p=l(e,["baseModel"]);p!=null&&a(n,["baseModel"],p);const h=l(e,["_self"]);return h!=null&&a(n,["tunedModel"],zv(h)),n}function Bn(e,t){const n={},i=l(e,["sdkHttpResponse"]);i!=null&&a(n,["sdkHttpResponse"],i);const o=l(e,["name"]);o!=null&&a(n,["name"],o);const r=l(e,["state"]);r!=null&&a(n,["state"],_s(r));const s=l(e,["createTime"]);s!=null&&a(n,["createTime"],s);const u=l(e,["startTime"]);u!=null&&a(n,["startTime"],u);const d=l(e,["endTime"]);d!=null&&a(n,["endTime"],d);const c=l(e,["updateTime"]);c!=null&&a(n,["updateTime"],c);const f=l(e,["error"]);f!=null&&a(n,["error"],f);const p=l(e,["description"]);p!=null&&a(n,["description"],p);const h=l(e,["baseModel"]);h!=null&&a(n,["baseModel"],h);const m=l(e,["tunedModel"]);m!=null&&a(n,["tunedModel"],m);const g=l(e,["preTunedModel"]);g!=null&&a(n,["preTunedModel"],g);const E=l(e,["supervisedTuningSpec"]);E!=null&&a(n,["supervisedTuningSpec"],E);const T=l(e,["preferenceOptimizationSpec"]);T!=null&&a(n,["preferenceOptimizationSpec"],T);const S=l(e,["distillationSpec"]);S!=null&&a(n,["distillationSpec"],S);const x=l(e,["tuningDataStats"]);x!=null&&a(n,["tuningDataStats"],x);const C=l(e,["encryptionSpec"]);C!=null&&a(n,["encryptionSpec"],C);const w=l(e,["partnerModelTuningSpec"]);w!=null&&a(n,["partnerModelTuningSpec"],w);const I=l(e,["customBaseModel"]);I!=null&&a(n,["customBaseModel"],I);const _=l(e,["experiment"]);_!=null&&a(n,["experiment"],_);const b=l(e,["labels"]);b!=null&&a(n,["labels"],b);const V=l(e,["outputUri"]);V!=null&&a(n,["outputUri"],V);const P=l(e,["pipelineJob"]);P!=null&&a(n,["pipelineJob"],P);const F=l(e,["serviceAccount"]);F!=null&&a(n,["serviceAccount"],F);const D=l(e,["tunedModelDisplayName"]);D!=null&&a(n,["tunedModelDisplayName"],D);const L=l(e,["veoTuningSpec"]);return L!=null&&a(n,["veoTuningSpec"],L),n}function Wv(e,t){const n={},i=l(e,["sdkHttpResponse"]);i!=null&&a(n,["sdkHttpResponse"],i);const o=l(e,["name"]);o!=null&&a(n,["name"],o);const r=l(e,["metadata"]);r!=null&&a(n,["metadata"],r);const s=l(e,["done"]);s!=null&&a(n,["done"],s);const u=l(e,["error"]);return u!=null&&a(n,["error"],u),n}function mn(e,t){const n={},i=l(e,["gcsUri"]);i!=null&&a(n,["validationDatasetUri"],i);const o=l(e,["vertexDatasetResource"]);return o!=null&&a(n,["validationDatasetUri"],o),n}/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */class Yv extends ke{constructor(t){super(),this.apiClient=t,this.list=async(n={})=>new qe(Pe.PAGED_ITEM_TUNING_JOBS,i=>this.listInternal(i),await this.listInternal(n),n),this.get=async n=>await this.getInternal(n),this.tune=async n=>{var i;if(this.apiClient.isVertexAI())if(n.baseModel.startsWith("projects/")){const o={tunedModelName:n.baseModel};!((i=n.config)===null||i===void 0)&&i.preTunedModelCheckpointId&&(o.checkpointId=n.config.preTunedModelCheckpointId);const r=Object.assign(Object.assign({},n),{preTunedModel:o});return r.baseModel=void 0,await this.tuneInternal(r)}else{const o=Object.assign({},n);return await this.tuneInternal(o)}else{const o=Object.assign({},n),r=await this.tuneMldevInternal(o);let s="";return r.metadata!==void 0&&r.metadata.tunedModel!==void 0?s=r.metadata.tunedModel:r.name!==void 0&&r.name.includes("/operations/")&&(s=r.name.split("/operations/")[0]),{name:s,state:Rn.JOB_STATE_QUEUED}}}}async getInternal(t){var n,i,o,r;let s,u="",d={};if(this.apiClient.isVertexAI()){const c=Fv(t);return u=N("{name}",c._url),d=c._query,delete c._url,delete c._query,s=this.apiClient.request({path:u,queryParams:d,body:JSON.stringify(c),httpMethod:"GET",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(i=t.config)===null||i===void 0?void 0:i.abortSignal}).then(f=>f.json().then(p=>{const h=p;return h.sdkHttpResponse={headers:f.headers},h})),s.then(f=>Bn(f))}else{const c=Uv(t);return u=N("{name}",c._url),d=c._query,delete c._url,delete c._query,s=this.apiClient.request({path:u,queryParams:d,body:JSON.stringify(c),httpMethod:"GET",httpOptions:(o=t.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(r=t.config)===null||r===void 0?void 0:r.abortSignal}).then(f=>f.json().then(p=>{const h=p;return h.sdkHttpResponse={headers:f.headers},h})),s.then(f=>sl(f))}}async listInternal(t){var n,i,o,r;let s,u="",d={};if(this.apiClient.isVertexAI()){const c=Bv(t);return u=N("tuningJobs",c._url),d=c._query,delete c._url,delete c._query,s=this.apiClient.request({path:u,queryParams:d,body:JSON.stringify(c),httpMethod:"GET",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(i=t.config)===null||i===void 0?void 0:i.abortSignal}).then(f=>f.json().then(p=>{const h=p;return h.sdkHttpResponse={headers:f.headers},h})),s.then(f=>{const p=Ov(f),h=new rr;return Object.assign(h,p),h})}else{const c=Hv(t);return u=N("tunedModels",c._url),d=c._query,delete c._url,delete c._query,s=this.apiClient.request({path:u,queryParams:d,body:JSON.stringify(c),httpMethod:"GET",httpOptions:(o=t.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(r=t.config)===null||r===void 0?void 0:r.abortSignal}).then(f=>f.json().then(p=>{const h=p;return h.sdkHttpResponse={headers:f.headers},h})),s.then(f=>{const p=qv(f),h=new rr;return Object.assign(h,p),h})}}async cancel(t){var n,i,o,r;let s,u="",d={};if(this.apiClient.isVertexAI()){const c=Pv(t);return u=N("{name}:cancel",c._url),d=c._query,delete c._url,delete c._query,s=this.apiClient.request({path:u,queryParams:d,body:JSON.stringify(c),httpMethod:"POST",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(i=t.config)===null||i===void 0?void 0:i.abortSignal}).then(f=>f.json().then(p=>{const h=p;return h.sdkHttpResponse={headers:f.headers},h})),s.then(f=>{const p=Mv(f),h=new sr;return Object.assign(h,p),h})}else{const c=Rv(t);return u=N("{name}:cancel",c._url),d=c._query,delete c._url,delete c._query,s=this.apiClient.request({path:u,queryParams:d,body:JSON.stringify(c),httpMethod:"POST",httpOptions:(o=t.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(r=t.config)===null||r===void 0?void 0:r.abortSignal}).then(f=>f.json().then(p=>{const h=p;return h.sdkHttpResponse={headers:f.headers},h})),s.then(f=>{const p=kv(f),h=new sr;return Object.assign(h,p),h})}}async tuneInternal(t){var n,i;let o,r="",s={};if(this.apiClient.isVertexAI()){const u=Lv(t,t);return r=N("tuningJobs",u._url),s=u._query,delete u._url,delete u._query,o=this.apiClient.request({path:r,queryParams:s,body:JSON.stringify(u),httpMethod:"POST",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(i=t.config)===null||i===void 0?void 0:i.abortSignal}).then(d=>d.json().then(c=>{const f=c;return f.sdkHttpResponse={headers:d.headers},f})),o.then(d=>Bn(d))}else throw new Error("This method is only supported by the Vertex AI.")}async tuneMldevInternal(t){var n,i;let o,r="",s={};if(this.apiClient.isVertexAI())throw new Error("This method is only supported by the Gemini Developer API.");{const u=bv(t);return r=N("tunedModels",u._url),s=u._query,delete u._url,delete u._query,o=this.apiClient.request({path:r,queryParams:s,body:JSON.stringify(u),httpMethod:"POST",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(i=t.config)===null||i===void 0?void 0:i.abortSignal}).then(d=>d.json().then(c=>{const f=c;return f.sdkHttpResponse={headers:d.headers},f})),o.then(d=>Wv(d))}}}/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */class Kv{async download(t,n){throw new Error("Download to file is not supported in the browser, please use a browser compliant download like an tag.")}}const Xv=1024*1024*8,Qv=3,Zv=1e3,jv=2,qt="x-goog-upload-status";async function eT(e,t,n){var i;const o=await ll(e,t,n),r=await(o==null?void 0:o.json());if(((i=o==null?void 0:o.headers)===null||i===void 0?void 0:i[qt])!=="final")throw new Error("Failed to upload file: Upload status is not finalized.");return r.file}async function tT(e,t,n){var i;const o=await ll(e,t,n),r=await(o==null?void 0:o.json());if(((i=o==null?void 0:o.headers)===null||i===void 0?void 0:i[qt])!=="final")throw new Error("Failed to upload file: Upload status is not finalized.");const s=gs(r),u=new oi;return Object.assign(u,s),u}async function ll(e,t,n){var i,o;let r=0,s=0,u=new kn(new Response),d="upload";for(r=e.size;s=r&&(d+=", finalize");let p=0,h=Zv;for(;psetTimeout(t,e))}class oT{async upload(t,n,i){if(typeof t=="string")throw new Error("File path is not supported in browser uploader.");return await eT(t,n,i)}async uploadToFileSearchStore(t,n,i){if(typeof t=="string")throw new Error("File path is not supported in browser uploader.");return await tT(t,n,i)}async stat(t){if(typeof t=="string")throw new Error("File path is not supported in browser uploader.");return await nT(t)}}/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */class rT{create(t,n,i){return new sT(t,n,i)}}class sT{constructor(t,n,i){this.url=t,this.headers=n,this.callbacks=i}connect(){this.ws=new WebSocket(this.url),this.ws.onopen=this.callbacks.onopen,this.ws.onerror=this.callbacks.onerror,this.ws.onclose=this.callbacks.onclose,this.ws.onmessage=this.callbacks.onmessage}send(t){if(this.ws===void 0)throw new Error("WebSocket is not connected");this.ws.send(t)}close(){if(this.ws===void 0)throw new Error("WebSocket is not connected");this.ws.close()}}/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */const Dr="x-goog-api-key";class lT{constructor(t){this.apiKey=t}async addAuthHeaders(t,n){if(t.get(Dr)===null){if(this.apiKey.startsWith("auth_tokens/"))throw new Error("Ephemeral tokens are only supported by the live API.");if(!this.apiKey)throw new Error("API key is missing. Please provide a valid API key.");t.append(Dr,this.apiKey)}}}/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */const aT="gl-node/";class uT{get interactions(){if(this._interactions!==void 0)return this._interactions;console.warn("GoogleGenAI.interactions: Interactions usage is experimental and may change in future versions.");const t=this.httpOptions;t!=null&&t.extraBody&&console.warn("GoogleGenAI.interactions: Client level httpOptions.extraBody is not supported by the interactions client and will be ignored.");const n=new te({baseURL:this.apiClient.getBaseUrl(),apiKey:this.apiKey,apiVersion:this.apiClient.getApiVersion(),clientAdapter:this.apiClient,defaultHeaders:this.apiClient.getDefaultHeaders(),timeout:t==null?void 0:t.timeout});return this._interactions=n.interactions,this._interactions}constructor(t){var n;if(t.apiKey==null)throw new Error("An API Key must be set when running in a browser");if(t.project||t.location)throw new Error("Vertex AI project based authentication is not supported on browser runtimes. Please do not provide a project or location.");this.vertexai=(n=t.vertexai)!==null&&n!==void 0?n:!1,this.apiKey=t.apiKey;const i=Zd(t.httpOptions,t.vertexai,void 0,void 0);i&&(t.httpOptions?t.httpOptions.baseUrl=i:t.httpOptions={baseUrl:i}),this.apiVersion=t.apiVersion,this.httpOptions=t.httpOptions;const o=new lT(this.apiKey);this.apiClient=new ny({auth:o,apiVersion:this.apiVersion,apiKey:this.apiKey,vertexai:this.vertexai,httpOptions:this.httpOptions,userAgentExtra:aT+"web",uploader:new oT,downloader:new Kv}),this.models=new Sy(this.apiClient),this.live=new my(this.apiClient,o,new rT),this.batches=new Pp(this.apiClient),this.chats=new ch(this.models,this.apiClient),this.caches=new lh(this.apiClient),this.files=new _h(this.apiClient),this.operations=new _y(this.apiClient),this.authTokens=new Vy(this.apiClient),this.tunings=new Yv(this.apiClient),this.fileSearchStores=new $y(this.apiClient)}}const gn="inmersion_ai_key",fT=()=>{const[e,t]=Ge.useState(()=>localStorage.getItem(gn)||""),[n,i]=Ge.useState(""),[o,r]=Ge.useState(()=>!localStorage.getItem(gn)),[s,u]=Ge.useState([{id:"1",role:"model",text:`Hello! I am your ${yl} Assistant. ๐Ÿงฌ + +I can solve math problems or explain biological concepts. How can I help you today?`}]),[d,c]=Ge.useState(!1),f=Ge.useRef(null),p=()=>{e.trim().startsWith("AIza")?(localStorage.setItem(gn,e.trim()),r(!1)):alert("Please enter a valid Google Gemini API Key (starts with AIza...).")},h=async()=>{if(!n.trim()||d)return;if(!e){r(!0);return}const m=n;i(""),u(g=>[...g,{id:Date.now().toString(),role:"user",text:m}]),c(!0);try{const T=(await new uT({apiKey:e}).models.generateContent({model:"gemini-1.5-flash",contents:[{role:"user",parts:[{text:`You are an expert in Mathematics and Biotechnology. Explain questions step-by-step with formulas and biological examples where applicable. + +Question: ${m}`}]}]})).text;if(!T)throw new Error("No response generated.");u(S=>[...S,{id:Date.now().toString(),role:"model",text:T}])}catch(g){console.error("AI Error:",g);let E=g.message||"An error occurred.";E.includes("403")&&(E="Invalid API Key or quota exceeded."),u(T=>[...T,{id:Date.now().toString(),role:"model",text:`โš ๏ธ Error: ${E}`}])}finally{c(!1)}};return Ge.useEffect(()=>{var m;(m=f.current)==null||m.scrollIntoView({behavior:"smooth"})},[s]),O.jsxs("div",{className:"flex flex-col h-[calc(100vh-100px)] max-w-4xl mx-auto",children:[O.jsxs("div",{className:"flex justify-between items-center mb-6",children:[O.jsxs("div",{className:"flex items-center gap-3",children:[O.jsx("div",{className:"p-3 bg-gradient-to-br from-cyan-500 to-blue-600 rounded-xl shadow-lg shadow-cyan-500/20",children:O.jsx(vl,{className:"text-white w-6 h-6"})}),O.jsxs("div",{children:[O.jsx("h2",{className:"text-2xl font-bold text-white tracking-tight",children:"AI Assistant"}),O.jsx("p",{className:"text-slate-400 text-xs font-mono uppercase tracking-wider",children:"Powered by Gemini"})]})]}),O.jsx("button",{onClick:()=>r(!o),className:"p-2 rounded-lg bg-slate-800 border border-slate-700 hover:bg-slate-700 transition-colors text-slate-400 hover:text-white",children:O.jsx(wl,{size:20})})]}),o&&O.jsxs("div",{className:"mb-6 p-6 bg-slate-900/80 border border-slate-700 rounded-2xl animate-in fade-in slide-in-from-top-4",children:[O.jsxs("h3",{className:"text-lg font-bold text-white mb-4 flex items-center gap-2",children:[O.jsx(Cl,{className:"text-yellow-500 w-5 h-5"}),"API Key Setup"]}),O.jsxs("p",{className:"text-sm text-slate-400 mb-4",children:["To use AI features, please enter your own ",O.jsx("strong",{children:"Google Gemini API Key"}),". Your key is stored locally in your browser."]}),O.jsxs("div",{className:"flex gap-2",children:[O.jsx("input",{type:"password",value:e,onChange:m=>t(m.target.value),placeholder:"AIzaSy...",className:"flex-1 bg-slate-950 border border-slate-800 rounded-xl px-4 py-3 text-white placeholder-slate-600 outline-none focus:ring-2 focus:ring-cyan-500/50 transition-all font-mono text-sm"}),O.jsx("button",{onClick:p,className:"bg-cyan-600 hover:bg-cyan-500 text-white px-6 py-3 rounded-xl font-bold transition-colors",children:"Save"})]}),O.jsxs("p",{className:"text-[10px] text-slate-500 mt-3 flex items-center gap-1",children:[O.jsx(Tl,{size:12}),"Please keep your API key secure."]})]}),O.jsxs("div",{className:"flex-1 bg-slate-900/50 border border-slate-800 rounded-3xl p-4 overflow-hidden flex flex-col relative",children:[O.jsxs("div",{className:"flex-1 overflow-y-auto space-y-4 pr-2 custom-scrollbar pb-20",children:[s.map(m=>O.jsx("div",{className:`flex ${m.role==="user"?"justify-end":"justify-start"}`,children:O.jsx("div",{className:`max-w-[85%] p-4 rounded-2xl ${m.role==="user"?"bg-cyan-600 text-white rounded-tr-none":"bg-slate-800 border border-slate-700 text-slate-200 rounded-tl-none"}`,children:m.role==="model"?O.jsx("div",{className:"prose prose-invert prose-sm max-w-none",children:O.jsx(Od,{children:m.text})}):O.jsx("p",{className:"text-sm leading-relaxed",children:m.text})})},m.id)),d&&O.jsx("div",{className:"flex justify-start",children:O.jsxs("div",{className:"bg-slate-800 border border-slate-700 rounded-2xl rounded-tl-none p-4 flex items-center gap-2",children:[O.jsx(Sl,{className:"w-4 h-4 text-cyan-400 animate-bounce"}),O.jsx("span",{className:"text-xs text-slate-400",children:"Thinking..."})]})}),O.jsx("div",{ref:f})]}),O.jsx("div",{className:"absolute bottom-4 left-4 right-4",children:O.jsxs("div",{className:"relative group",children:[O.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-cyan-500 to-blue-500 rounded-2xl blur opacity-20 group-hover:opacity-30 transition-opacity"}),O.jsxs("div",{className:"relative bg-slate-950 border border-slate-800 rounded-2xl flex items-center p-1.5 pl-4 shadow-xl",children:[O.jsx("input",{type:"text",value:n,onChange:m=>i(m.target.value),onKeyDown:m=>m.key==="Enter"&&h(),"aria-label":"Ask a math question",placeholder:"Ask a math question or topic...",className:"flex-1 bg-transparent text-white placeholder-slate-500 outline-none text-sm font-medium",disabled:d}),O.jsx("button",{onClick:h,disabled:!n.trim()||d,className:"p-2.5 bg-cyan-600 hover:bg-cyan-500 disabled:bg-slate-800 disabled:text-slate-600 text-white rounded-xl transition-all shadow-lg shadow-cyan-900/20",children:O.jsx(Al,{size:18})})]})]})})]})]})};export{fT as AIChatView}; diff --git a/site/assets/AreaUnderCurveView-D8J_c91U.js b/site/assets/AreaUnderCurveView-D8J_c91U.js new file mode 100644 index 0000000..acf790f --- /dev/null +++ b/site/assets/AreaUnderCurveView-D8J_c91U.js @@ -0,0 +1 @@ +import{r as b,j as e,S as M,m as L}from"./index-DJrAq1Rk.js";import{M as p}from"./MathRenderer-DoWdgGCt.js";const W=()=>{const[r,$]=b.useState(-1),[i,k]=b.useState(1),[c,g]=b.useState("between"),m=600,x=400,a={x:[-3,3],y:[-5,5]},n=s=>(s-a.x[0])/(a.x[1]-a.x[0])*m,d=s=>x-(s-a.y[0])/(a.y[1]-a.y[0])*x,f=s=>s*s,u=s=>2*s-s*s,v=s=>{let j="";for(let l=a.x[0];l<=a.x[1];l+=.05){const t=s(l),w=n(l),N=d(t);l===a.x[0]?j+=`M ${w} ${N}`:j+=` L ${w} ${N}`}return j},F=()=>{let s="";const o=Math.max(r,a.x[0]),l=Math.min(i,a.x[1]);if(o>=l)return"";if(c==="single"){s=`M ${n(o)} ${d(0)}`;for(let t=o;t<=l;t+=.05)s+=` L ${n(t)} ${d(f(t))}`;s+=` L ${n(l)} ${d(0)} Z`}else{s=`M ${n(o)} ${d(u(o))}`;for(let t=o;t<=l;t+=.05)s+=` L ${n(t)} ${d(u(t))}`;for(let t=l;t>=o;t-=.05)s+=` L ${n(t)} ${d(f(t))}`;s+=" Z"}return s},h=s=>Math.pow(s,3)/3,y=s=>s*s-Math.pow(s,3)/3,C=c==="single"?h(i)-h(r):y(i)-h(i)-(y(r)-h(r));return e.jsxs("div",{className:"space-y-8 pb-20",children:[e.jsxs("header",{className:"border-b border-white/10 pb-6 flex flex-col md:flex-row justify-between items-end gap-4",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-4xl font-bold text-white mb-2",children:"Definite Integral & Area"}),e.jsxs("p",{className:"text-slate-400 max-w-2xl",children:["The definite integral ",e.jsx(p,{expression:"\\int_a^b f(x)dx",inline:!0})," represents the signed area under the curve."]})]}),e.jsxs("div",{className:"bg-slate-900 p-1 rounded-xl border border-slate-800 flex gap-1",children:[e.jsx("button",{onClick:()=>g("single"),className:`px-4 py-2 text-xs font-bold uppercase rounded-lg transition-all ${c==="single"?"bg-cyan-600 text-white":"text-slate-500 hover:text-white hover:bg-white/5"}`,children:"Area under f(x)"}),e.jsx("button",{onClick:()=>g("between"),className:`px-4 py-2 text-xs font-bold uppercase rounded-lg transition-all ${c==="between"?"bg-purple-600 text-white":"text-slate-500 hover:text-white hover:bg-white/5"}`,children:"Between Curves"})]})]}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-8",children:[e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"bg-slate-800/50 p-6 rounded-2xl border border-slate-700",children:[e.jsx("h3",{className:"text-xs font-bold text-slate-500 uppercase tracking-widest mb-6",children:"Integration Limits"}),e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex justify-between text-sm text-slate-300 mb-2",children:[e.jsx("span",{children:"Lower Limit (a)"}),e.jsx("span",{className:"font-mono text-cyan-400",children:r.toFixed(2)})]}),e.jsx("input",{type:"range",min:"-2",max:"2",step:"0.1",value:r,onChange:s=>$(parseFloat(s.target.value)),className:"w-full h-2 bg-slate-700 rounded-lg appearance-none cursor-pointer accent-cyan-500"})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex justify-between text-sm text-slate-300 mb-2",children:[e.jsx("span",{children:"Upper Limit (b)"}),e.jsx("span",{className:"font-mono text-purple-400",children:i.toFixed(2)})]}),e.jsx("input",{type:"range",min:"-2",max:"2",step:"0.1",value:i,onChange:s=>k(parseFloat(s.target.value)),className:"w-full h-2 bg-slate-700 rounded-lg appearance-none cursor-pointer accent-purple-500"})]})]})]}),e.jsxs("div",{className:"bg-slate-900 p-6 rounded-2xl border border-slate-800",children:[e.jsxs("h3",{className:"text-xs font-bold text-slate-500 uppercase tracking-widest mb-4 flex items-center gap-2",children:[e.jsx(M,{size:16})," Calculation (FTC)"]}),e.jsxs("div",{className:"text-center mb-4",children:[e.jsx("div",{className:"text-3xl font-mono font-bold text-white",children:C.toFixed(4)}),e.jsx("div",{className:"text-xs text-slate-500 mt-1",children:"Calculated Area"})]}),e.jsx("div",{className:"text-xs text-slate-400 space-y-2 border-t border-white/5 pt-4",children:c==="single"?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{children:"Function:"})," ",e.jsx(p,{expression:"x^2",inline:!0})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{children:"Primitive F(x):"})," ",e.jsx(p,{expression:"\\frac{x^3}{3}",inline:!0})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{children:"F(b) - F(a):"})," ",e.jsxs("span",{children:[h(i).toFixed(2)," - ",h(r).toFixed(2)]})]})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{children:"Top Curve:"})," ",e.jsx(p,{expression:"2x - x^2",inline:!0})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{children:"Bottom Curve:"})," ",e.jsx(p,{expression:"x^2",inline:!0})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{children:"Integrand:"})," ",e.jsx(p,{expression:"(2x - x^2) - x^2",inline:!0})]})]})})]})]}),e.jsxs("div",{className:"lg:col-span-2 bg-slate-900 rounded-3xl border border-slate-700 relative overflow-hidden shadow-2xl flex flex-col h-[500px]",children:[e.jsx("div",{className:"absolute inset-0 bg-[url('https://grainy-gradients.vercel.app/noise.svg')] opacity-5 pointer-events-none"}),e.jsxs("div",{className:"absolute top-4 right-4 z-10 flex flex-col gap-2 text-xs font-mono",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-4 h-0.5 bg-cyan-400"}),e.jsx("span",{className:"text-slate-400",children:"f(x) = xยฒ"})]}),c==="between"&&e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-4 h-0.5 bg-purple-400"}),e.jsx("span",{className:"text-slate-400",children:"g(x) = 2x - xยฒ"})]})]}),e.jsxs("svg",{viewBox:`0 0 ${m} ${x}`,className:"w-full h-full",children:[e.jsx("line",{x1:m/2,y1:0,x2:m/2,y2:x,stroke:"#475569",strokeWidth:"1"}),e.jsx("line",{x1:0,y1:x/2,x2:m,y2:x/2,stroke:"#475569",strokeWidth:"1"}),e.jsx(L.path,{d:F(),fill:c==="single"?"rgba(34, 211, 238, 0.2)":"rgba(168, 85, 247, 0.2)",stroke:"none"}),e.jsx("path",{d:v(f),fill:"none",stroke:"#22d3ee",strokeWidth:"2"}),c==="between"&&e.jsx("path",{d:v(u),fill:"none",stroke:"#c084fc",strokeWidth:"2"}),e.jsx("line",{x1:n(r),y1:0,x2:n(r),y2:x,stroke:"#22d3ee",strokeWidth:"1",strokeDasharray:"4 4",opacity:"0.5"}),e.jsx("line",{x1:n(i),y1:0,x2:n(i),y2:x,stroke:"#c084fc",strokeWidth:"1",strokeDasharray:"4 4",opacity:"0.5"}),e.jsx("text",{x:n(r),y:x-10,fill:"#22d3ee",fontSize:"12",textAnchor:"middle",children:"a"}),e.jsx("text",{x:n(i),y:x-10,fill:"#c084fc",fontSize:"12",textAnchor:"middle",children:"b"})]})]})]})]})};export{W as AreaUnderCurveView}; diff --git a/site/assets/BasicsView-Ces5tTvG.js b/site/assets/BasicsView-Ces5tTvG.js new file mode 100644 index 0000000..5847de1 --- /dev/null +++ b/site/assets/BasicsView-Ces5tTvG.js @@ -0,0 +1,6 @@ +import{c as R,r,j as e,B as C,m as k,a as M,T as S}from"./index-DJrAq1Rk.js";import{M as z}from"./MatrixInput-BvG_poIz.js";import{W as A}from"./WolframHelper-C3f14kAl.js";import{M as I}from"./MathRenderer-DoWdgGCt.js";import{S as $}from"./settings-2-BYyATKYL.js";import{M as h}from"./maximize-BW0NideE.js";import"./chevron-right-KbXem8Tn.js";/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const E=[["path",{d:"m16 3 4 4-4 4",key:"1x1c3m"}],["path",{d:"M20 7H4",key:"zbl0bi"}],["path",{d:"m8 21-4-4 4-4",key:"h9nckh"}],["path",{d:"M4 17h16",key:"g4d7ey"}]],u=R("arrow-right-left",E),O=()=>{const[a,g]=r.useState(3),[s,b]=r.useState(3),[i,d]=r.useState(null),[c,x]=r.useState(null),[m,j]=r.useState(null),f=Array(a).fill(0).map((t,l)=>Array(s).fill(0).map((p,y)=>l*s+y+1)),o=a===s,v=a===1,N=s===1,w=a*s,n=(()=>{if(m){const{r:t,c:l}=m,p=t===l;return{title:`Element a_{${t+1}${l+1}}`,desc:`This element is located at Row ${t+1} and Column ${l+1}.`,math:`a_{${t+1},${l+1}} \\in \\mathbb{R}`,extra:p?"This element lies on the Main Diagonal (i=j).":"Off-diagonal element (iโ‰ j)."}}return o?{title:"Square Matrix",desc:"A matrix with equal number of rows and columns (n = m). Only square matrices have determinants, eigenvalues, and inverses.",math:"A \\in \\mathbb{R}^{n \\times n}"}:v?{title:"Row Vector",desc:"A matrix with a single row. Often represents a coordinate or a linear equation.",math:"v \\in \\mathbb{R}^{1 \\times m}"}:N?{title:"Column Vector",desc:"A matrix with a single column. Standard representation for vectors in linear systems Ax=b.",math:"v \\in \\mathbb{R}^{n \\times 1}"}:{title:"Rectangular Matrix",desc:"A general system of numbers where rows โ‰  columns. It represents a linear transformation between spaces of different dimensions.",math:"A \\in \\mathbb{R}^{n \\times m}"}})();return e.jsxs("div",{className:"space-y-6 pb-20",children:[e.jsx("header",{className:"flex flex-col md:flex-row justify-between items-start md:items-end border-b border-white/5 pb-4 gap-4",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-white mb-2 tracking-tight",children:"Matrix Anatomy"}),e.jsxs("p",{className:"text-slate-400 max-w-2xl font-light text-sm md:text-base",children:["Understanding the structural properties of linear arrays. Indices ",e.jsx("span",{className:"font-mono text-cyan-400",children:"i"})," (row) and ",e.jsx("span",{className:"font-mono text-purple-400",children:"j"})," (column) define the address of every element."]})]})}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-12 gap-6",children:[e.jsxs("div",{className:"md:col-span-4 space-y-6",children:[e.jsxs("div",{className:"glass-panel p-6 rounded-3xl relative overflow-hidden group",children:[e.jsx("div",{className:"absolute top-0 right-0 p-4 opacity-5 group-hover:opacity-10 transition-opacity",children:e.jsx($,{size:80})}),e.jsxs("h3",{className:"text-xs font-bold text-slate-400 uppercase tracking-widest mb-6 flex items-center gap-2",children:[e.jsx(C,{size:14,className:"text-cyan-400"})," Dimensions Setup"]}),e.jsxs("div",{className:"space-y-6 z-10 relative",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex justify-between items-end",children:[e.jsxs("label",{className:"text-[10px] text-slate-300 font-bold uppercase tracking-wider flex items-center gap-2",children:[e.jsx("div",{className:"w-2 h-2 rounded-full bg-cyan-500"})," Rows (i)"]}),e.jsx("span",{className:"text-xl font-mono text-cyan-400 font-bold",children:a})]}),e.jsx("input",{type:"range",min:"1",max:"6",value:a,onChange:t=>g(parseInt(t.target.value)),className:"w-full h-1.5 bg-slate-800 rounded-lg appearance-none cursor-pointer accent-cyan-500 hover:accent-cyan-400 transition-all"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex justify-between items-end",children:[e.jsxs("label",{className:"text-[10px] text-slate-300 font-bold uppercase tracking-wider flex items-center gap-2",children:[e.jsx("div",{className:"w-2 h-2 rounded-full bg-purple-500"})," Columns (j)"]}),e.jsx("span",{className:"text-xl font-mono text-purple-400 font-bold",children:s})]}),e.jsx("input",{type:"range",min:"1",max:"6",value:s,onChange:t=>b(parseInt(t.target.value)),className:"w-full h-1.5 bg-slate-800 rounded-lg appearance-none cursor-pointer accent-purple-500 hover:accent-purple-400 transition-all"})]})]})]}),e.jsxs(k.div,{layout:!0,className:"glass-panel p-6 rounded-3xl border-l-2 border-l-emerald-500 bg-slate-900/60",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[e.jsx(M,{size:16,className:"text-emerald-400"}),e.jsx("h3",{className:"text-xs font-bold text-emerald-400 uppercase tracking-widest",children:"Concept Guide"})]}),e.jsx("h4",{className:"text-lg font-bold text-white mb-2",children:n.title}),e.jsx("div",{className:"mb-4 bg-slate-950/50 p-3 rounded-lg border border-white/5",children:e.jsx(I,{expression:n.math,className:"text-lg text-center",color:"#fbbf24"})}),e.jsx("p",{className:"text-sm text-slate-400 leading-relaxed font-light",children:n.desc}),n.extra&&e.jsx("div",{className:"mt-3 text-xs text-emerald-300/80 italic border-t border-emerald-500/10 pt-2",children:n.extra})]})]}),e.jsxs("div",{className:"md:col-span-8 flex flex-col gap-6",children:[e.jsxs("div",{className:"glass-panel p-0 rounded-3xl relative flex flex-col items-center justify-center min-h-[400px] bg-slate-900/40",children:[e.jsx("div",{className:"absolute inset-0 opacity-20",style:{backgroundImage:"linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px)",backgroundSize:"40px 40px"}}),e.jsxs("div",{className:"absolute top-4 left-4 flex gap-4 text-[10px] font-mono uppercase tracking-widest opacity-60",children:[e.jsxs("div",{className:"flex items-center gap-1 text-cyan-400",children:[e.jsx("div",{className:"w-3 h-0.5 bg-cyan-400"})," Row Index"]}),e.jsxs("div",{className:"flex items-center gap-1 text-purple-400",children:[e.jsx("div",{className:"h-3 w-0.5 bg-purple-400"})," Col Index"]})]}),e.jsxs("div",{className:"relative z-10 w-full overflow-x-auto flex flex-col items-center justify-center py-8 px-4",onMouseLeave:()=>j(null),children:[e.jsx(z,{data:f,label:`Matrix A [${a}ร—${s}]`,color:"orange",highlightRow:i,highlightCol:c}),e.jsx("div",{className:"absolute inset-0 grid gap-2 pointer-events-none",style:{gridTemplateColumns:`repeat(${s}, minmax(min-content, 1fr))`,width:"fit-content",margin:"auto"}})]}),e.jsx("div",{className:"absolute bottom-6 left-6 right-6",children:e.jsxs("div",{className:"bg-slate-950/90 backdrop-blur-xl rounded-2xl border border-white/10 p-4 flex justify-between items-center shadow-2xl",children:[i!==null?e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("div",{className:"p-2 bg-cyan-500/10 rounded-lg text-cyan-400",children:e.jsx(u,{size:18})}),e.jsxs("div",{children:[e.jsx("div",{className:"text-[10px] font-bold uppercase text-cyan-500 tracking-wider",children:"Row Scan"}),e.jsxs("div",{className:"text-white text-sm",children:["Inspecting Row ",e.jsx("span",{className:"font-mono text-cyan-400",children:i+1})," (index i=",i+1,")"]})]})]}):c!==null?e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("div",{className:"p-2 bg-purple-500/10 rounded-lg text-purple-400",children:e.jsx(h,{size:18,className:"rotate-90"})}),e.jsxs("div",{children:[e.jsx("div",{className:"text-[10px] font-bold uppercase text-purple-500 tracking-wider",children:"Column Scan"}),e.jsxs("div",{className:"text-white text-sm",children:["Inspecting Column ",e.jsx("span",{className:"font-mono text-purple-400",children:c+1})," (index j=",c+1,")"]})]})]}):e.jsxs("div",{className:"flex items-center gap-4 opacity-50",children:[e.jsx("div",{className:"p-2 bg-slate-800 rounded-lg text-slate-400",children:e.jsx(S,{size:18})}),e.jsxs("div",{children:[e.jsx("div",{className:"text-[10px] font-bold uppercase text-slate-500 tracking-wider",children:"Inspector Ready"}),e.jsx("div",{className:"text-slate-400 text-sm",children:"Hover over controls to analyze structure"})]})]}),e.jsxs("div",{className:"hidden sm:flex items-center gap-6 text-[10px] font-mono text-slate-500 uppercase tracking-widest border-l border-white/10 pl-6",children:[e.jsxs("div",{children:[e.jsx("span",{className:"block text-slate-600 mb-0.5",children:"Total Elements"}),e.jsx("span",{className:"text-white text-lg",children:w})]}),e.jsxs("div",{children:[e.jsx("span",{className:"block text-slate-600 mb-0.5",children:"Shape"}),e.jsx("span",{className:`text-lg ${o?"text-emerald-400":"text-slate-300"}`,children:o?"Square":"Rect"})]})]})]})})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("button",{onMouseEnter:()=>d(1),onMouseLeave:()=>d(null),className:"p-4 bg-slate-800/40 hover:bg-slate-800 rounded-2xl border border-slate-700/50 hover:border-cyan-500/50 transition-all group flex items-start gap-3",children:[e.jsx("div",{className:"mt-1",children:e.jsx(u,{size:16,className:"text-cyan-500"})}),e.jsxs("div",{className:"text-left",children:[e.jsx("div",{className:"text-xs font-bold text-white mb-1 group-hover:text-cyan-400",children:"Scan Rows"}),e.jsx("p",{className:"text-[10px] text-slate-400 leading-snug",children:"Rows represent individual equations in linear systems."})]})]}),e.jsxs("button",{onMouseEnter:()=>x(1),onMouseLeave:()=>x(null),className:"p-4 bg-slate-800/40 hover:bg-slate-800 rounded-2xl border border-slate-700/50 hover:border-purple-500/50 transition-all group flex items-start gap-3",children:[e.jsx("div",{className:"mt-1",children:e.jsx(h,{size:16,className:"text-purple-500 rotate-90"})}),e.jsxs("div",{className:"text-left",children:[e.jsx("div",{className:"text-xs font-bold text-white mb-1 group-hover:text-purple-400",children:"Scan Columns"}),e.jsx("p",{className:"text-[10px] text-slate-400 leading-snug",children:"Columns often represent variable coefficients (x, y, z)."})]})]})]})]})]}),e.jsx(A,{context:"matrix_basics"})]})};export{O as BasicsView}; diff --git a/site/assets/CheatSheetView-Cyb0L-8D.js b/site/assets/CheatSheetView-Cyb0L-8D.js new file mode 100644 index 0000000..2572add --- /dev/null +++ b/site/assets/CheatSheetView-Cyb0L-8D.js @@ -0,0 +1,11 @@ +import{c as r,j as e,m as f,C as c,F as x,M as t,L as u,p as b,o as d,I as p,d as g,n as y,e as h}from"./index-DJrAq1Rk.js";import{M as _}from"./MathRenderer-DoWdgGCt.js";/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const A=[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]],v=r("braces",A);/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const C=[["path",{d:"M15.707 21.293a1 1 0 0 1-1.414 0l-1.586-1.586a1 1 0 0 1 0-1.414l5.586-5.586a1 1 0 0 1 1.414 0l1.586 1.586a1 1 0 0 1 0 1.414z",key:"nt11vn"}],["path",{d:"m18 13-1.375-6.874a1 1 0 0 0-.746-.776L3.235 2.028a1 1 0 0 0-1.207 1.207L5.35 15.879a1 1 0 0 0 .776.746L13 18",key:"15qc1e"}],["path",{d:"m2.3 2.3 7.286 7.286",key:"1wuzzi"}],["circle",{cx:"11",cy:"11",r:"2",key:"xmgehs"}]],j=r("pen-tool",C),T=({module:n})=>{const l=(()=>{switch(n){case t.MATRIX:return{color:"text-orange-400",icon:h,sections:[{title:"Basic Definitions",items:[{label:"Matrix Dimensions",formula:"A_{m \\times n}",note:"m rows, n columns"},{label:"Square Matrix",formula:"m = n",note:"Essential for det(A) & Aโปยน"},{label:"Identity Matrix (I)",formula:"I = \\text{diag}(1,1,\\dots,1)",note:"A \\cdot I = A"},{label:"Zero Matrix (0)",formula:"O_{ij} = 0",note:"A + O = A"},{label:"Transpose",formula:"(A^T)_{ij} = A_{ji}",note:"Rows become columns"},{label:"Symmetric Matrix",formula:"A = A^T",note:"Must be square"},{label:"Skew-Symmetric",formula:"A^T = -A",note:"Diag elements must be 0"}]},{title:"Operations",items:[{label:"Addition",formula:"C_{ij} = a_{ij} + b_{ij}",note:"Dims must match exactly"},{label:"Scalar Mult",formula:"(kA)_{ij} = k \\cdot a_{ij}",note:"Multiply every element"},{label:"Matrix Mult",formula:"C_{ij} = \\sum_k a_{ik}b_{kj}",note:"Cols(A) must equal Rows(B)"},{label:"Properties",formula:"AB \\neq BA",note:"Generally not commutative"},{label:"Transpose Prop",formula:"(AB)^T = B^T A^T",note:"Order reverses!"},{label:"Trace",formula:"\\text{Tr}(A) = \\sum a_{ii}",note:"Sum of main diagonal"}]},{title:"Determinants (Det)",items:[{label:"2x2 Formula",formula:"ad - bc",note:"For [[a,b],[c,d]]"},{label:"Sarrus Rule (3x3)",formula:"\\text{diag sum} - \\text{anti-diag sum}",note:"Only for 3x3 matrices"},{label:"Laplace Expansion",formula:"\\det A = \\sum (-1)^{i+j} a_{ij} M_{ij}",note:"Expansion by any row/col"},{label:"Product Rule",formula:"\\det(AB) = \\det(A)\\det(B)",note:""},{label:"Transpose Rule",formula:"\\det(A^T) = \\det(A)",note:""},{label:"Inverse Rule",formula:"\\det(A^{-1}) = 1/\\det(A)",note:""},{label:"Scalar Rule",formula:"\\det(kA) = k^n \\det(A)",note:"n is dimension size"}]},{title:"Inverse Matrix",items:[{label:"Condition",formula:"\\det(A) \\neq 0",note:"Matrix is Non-Singular"},{label:"Adjugate Formula",formula:"A^{-1} = \\frac{1}{\\det A} (C_{ij})^T",note:"Transpose of cofactor matrix"},{label:"2x2 Shortcut",formula:"\\frac{1}{ad-bc} \\begin{bmatrix} d & -b \\\\ -c & a \\end{bmatrix}",note:"Swap diag, negate off-diag"},{label:"Product Inverse",formula:"(AB)^{-1} = B^{-1}A^{-1}",note:"Order reverses!"}]},{title:"Systems of Equations",items:[{label:"Matrix Form",formula:"AX = B",note:""},{label:"Cramer's Rule",formula:"x_i = \\frac{\\det(A_i)}{\\det(A)}",note:"Valid if det(A) โ‰  0"},{label:"Rouche-Capelli",formula:"\\text{rank}(A) = \\text{rank}(A|B)",note:"Condition for consistency"},{label:"Unique Solution",formula:"\\text{rank}(A) = \\text{rank}(A|B) = n",note:"n = variables"},{label:"Infinite Solutions",formula:"\\text{rank}(A) = \\text{rank}(A|B) < n",note:"Free parameters exist"}]}]};case t.SEQUENCES:return{color:"text-amber-400",icon:y,sections:[{title:"Definitions",items:[{label:"General Term",formula:"a_n = f(n)",note:"n โˆˆ โ„•"},{label:"Monotonicity",formula:"a_{n+1} - a_n",note:">0 increasing, <0 decreasing"},{label:"Convergence",formula:"\\lim_{n\\to\\infty} a_n = g",note:"g is finite number"},{label:"Boundedness",formula:"|a_n| \\le M",note:"For all n"}]},{title:"Arithmetic Progression",items:[{label:"Definition",formula:"a_{n+1} - a_n = r",note:"r is const difference"},{label:"N-th Term",formula:"a_n = a_1 + (n-1)r",note:""},{label:"Sum S_n",formula:"\\frac{a_1 + a_n}{2} \\cdot n",note:""},{label:"Monotonicity",formula:"r > 0 \\implies \\nearrow",note:"r < 0 implies decreasing"}]},{title:"Geometric Progression",items:[{label:"Definition",formula:"a_{n+1} / a_n = q",note:"q is const ratio"},{label:"N-th Term",formula:"a_n = a_1 \\cdot q^{n-1}",note:""},{label:"Sum S_n (qโ‰ 1)",formula:"a_1 \\frac{1-q^n}{1-q}",note:""},{label:"Infinite Sum",formula:"S = \\frac{a_1}{1-q}",note:"Converges if |q| < 1"}]},{title:"Key Limits",items:[{label:"Reciprocal",formula:"\\lim \\frac{1}{n} = 0",note:""},{label:"Polynomials",formula:"\\lim \\frac{P(n)}{Q(n)}",note:"Compare highest degrees"},{label:"Euler Number",formula:"\\lim (1 + \\frac{1}{n})^n = e",note:""},{label:"Root Test",formula:"\\lim \\sqrt[n]{n} = 1",note:""},{label:"Constant Root",formula:"\\lim \\sqrt[n]{A} = 1",note:"For A > 0"},{label:"Geometric",formula:"\\lim q^n = 0",note:"If |q| < 1"}]},{title:"Theorems",items:[{label:"Squeeze Theorem",formula:"a_n \\le b_n \\le c_n",note:"If lim a = lim c, then lim b is same"},{label:"Weierstrass",formula:"Bounded & Monotonic",note:"Implies Convergence"},{label:"Arithmetic Ops",formula:"\\lim(a_n \\pm b_n) = A \\pm B",note:"Only for finite limits"}]}]};case t.FUNCTIONS:return{color:"text-rose-400",icon:g,sections:[{title:"Function Basics",items:[{label:"Domain (D)",formula:"x \\text{ values}",note:"Where f(x) exists"},{label:"Range (R)",formula:"y \\text{ values}",note:"Output set"},{label:"Roots",formula:"f(x) = 0",note:"x-intercepts"},{label:"Injection (1-to-1)",formula:"f(x_1)=f(x_2) \\implies x_1=x_2",note:"Horizontal line test"},{label:"Inverse",formula:"y=f(x) \\iff x=f^{-1}(y)",note:"Requires Injection"}]},{title:"Domain Constraints",items:[{label:"Denominator",formula:"\\text{denom} \\neq 0",note:"Division by zero"},{label:"Even Roots",formula:"\\text{inside} \\ge 0",note:"sqrt(x), x^(1/4)"},{label:"Logarithms",formula:"\\text{argument} > 0",note:"ln(x)"},{label:"Arcsin/Arccos",formula:"-1 \\le x \\le 1",note:"Domain restricted"}]},{title:"Parity & Symmetry",items:[{label:"Even Function",formula:"f(-x) = f(x)",note:"Symmetric to Y-axis (e.g., xยฒ, cos x)"},{label:"Odd Function",formula:"f(-x) = -f(x)",note:"Symmetric to Origin (e.g., xยณ, sin x)"},{label:"Periodic",formula:"f(x+T) = f(x)",note:"Trig functions"}]},{title:"Elementary Functions",items:[{label:"Linear",formula:"y = ax+b",note:"Slope a, intercept b"},{label:"Quadratic",formula:"y = ax^2+bx+c",note:"Vertex x = -b/2a"},{label:"Exponential",formula:"y = a^x",note:"Always > 0 (if a>0)"},{label:"Logarithm",formula:"y = \\log_a x",note:"Inverse of exp"}]},{title:"Trigonometry",items:[{label:"Pythagorean",formula:"\\sin^2 x + \\cos^2 x = 1",note:""},{label:"Double Angle (sin)",formula:"\\sin 2x = 2\\sin x \\cos x",note:""},{label:"Double Angle (cos)",formula:"\\cos 2x = \\cos^2 x - \\sin^2 x",note:""}]}]};case t.LIMITS:return{color:"text-pink-400",icon:p,sections:[{title:"Rules of Calculation",items:[{label:"Const Mult",formula:"\\lim k f(x) = k \\lim f(x)",note:""},{label:"Sum/Diff",formula:"\\lim (f \\pm g) = \\lim f \\pm \\lim g",note:""},{label:"Product",formula:"\\lim (f \\cdot g) = \\lim f \\cdot \\lim g",note:""},{label:"Quotient",formula:"\\lim (f/g) = (\\lim f)/(\\lim g)",note:"If lim g โ‰  0"},{label:"Power",formula:"\\lim f(x)^{g(x)} = (\\lim f)^{\\lim g}",note:""}]},{title:"Important Limits",items:[{label:"Sinc Limit",formula:"\\lim_{x\\to 0} \\frac{\\sin x}{x} = 1",note:"Very common"},{label:"Euler Limit",formula:"\\lim_{x\\to 0} (1+x)^{1/x} = e",note:""},{label:"Log Growth",formula:"\\lim_{x\\to 0} \\frac{\\ln(1+x)}{x} = 1",note:""},{label:"Exp Growth",formula:"\\lim_{x\\to 0} \\frac{e^x - 1}{x} = 1",note:""},{label:"Infinity Ratio",formula:"\\frac{x^n}{e^x} \\to 0",note:"As x โ†’ โˆž"}]},{title:"Continuity & Asymptotes",items:[{label:"Continuity Def",formula:"\\lim_{x\\to c} f(x) = f(c)",note:"No holes, no jumps"},{label:"Vertical Asym",formula:"\\lim_{x\\to c} f(x) = \\pm \\infty",note:"Line x = c"},{label:"Horizontal Asym",formula:"\\lim_{x\\to \\infty} f(x) = L",note:"Line y = L"},{label:"Oblique Asym",formula:"y = ax+b",note:"a = lim f(x)/x"}]},{title:"Indeterminate Forms",items:[{label:"Types",formula:"\\frac{0}{0}, \\frac{\\infty}{\\infty}, 0 \\cdot \\infty, \\infty - \\infty",note:"Requires work"},{label:"Exponential",formula:"1^\\infty, \\infty^0, 0^0",note:"Use ln() transform"},{label:"Strategy",formula:"Factor, Conjugate, L'Hospital",note:""}]}]};case t.DERIVATIVES:return{color:"text-cyan-400",icon:d,sections:[{title:"Definition",items:[{label:"Limit Def",formula:"f'(x) = \\lim_{h\\to 0} \\frac{f(x+h)-f(x)}{h}",note:""},{label:"Tangent Slope",formula:"m = f'(x_0)",note:""},{label:"Tangent Line",formula:"y - y_0 = f'(x_0)(x - x_0)",note:""},{label:"Normal Line",formula:"y - y_0 = -\\frac{1}{f'(x_0)}(x - x_0)",note:"Perpendicular"}]},{title:"Differentiation Rules",items:[{label:"Power Rule",formula:"(x^n)' = nx^{n-1}",note:""},{label:"Product Rule",formula:"(uv)' = u'v + uv'",note:""},{label:"Quotient Rule",formula:"(\\frac{u}{v})' = \\frac{u'v - uv'}{v^2}",note:""},{label:"Chain Rule",formula:"(f(g(x)))' = f'(g) \\cdot g'(x)",note:"Outer' ยท Inner'"},{label:"Inverse Func",formula:"(f^{-1})'(y) = \\frac{1}{f'(x)}",note:""}]},{title:"Standard Derivatives",items:[{label:"Trig",formula:"(\\sin)'=\\cos, (\\cos)'=-\\sin",note:""},{label:"Tan/Cot",formula:"(\\tan)'=\\frac{1}{\\cos^2}, (\\cot)'=\\frac{-1}{\\sin^2}",note:""},{label:"Exponentials",formula:"(e^x)' = e^x, (a^x)' = a^x \\ln a",note:""},{label:"Logarithms",formula:"(\\ln x)' = \\frac{1}{x}, (\\log_a x)' = \\frac{1}{x \\ln a}",note:""},{label:"Inverse Trig",formula:"(\\arctan x)' = \\frac{1}{1+x^2}",note:""},{label:"Arcsin",formula:"(\\arcsin x)' = \\frac{1}{\\sqrt{1-x^2}}",note:""}]},{title:"Applications (Analysis)",items:[{label:"Monotonicity",formula:"f' > 0 \\implies \\nearrow",note:"f' < 0 implies decreasing"},{label:"Extrema",formula:"f'(c)=0 \\text{ & sign change}",note:"Local Max/Min"},{label:"Convexity",formula:"f'' > 0 \\implies \\cup",note:"Concave Up (Convex)"},{label:"Concavity",formula:"f'' < 0 \\implies \\cap",note:"Concave Down"},{label:"Inflection Pt",formula:"f''(c)=0 \\text{ & sign change}",note:"Change in curvature"},{label:"L'Hospital",formula:"\\lim \\frac{f}{g} = \\lim \\frac{f'}{g'}",note:"For 0/0 or โˆž/โˆž"}]}]};case t.INTEGRALS:return{color:"text-emerald-400",icon:b,sections:[{title:"Indefinite Integrals",items:[{label:"Power Rule",formula:"\\int x^a dx = \\frac{x^{a+1}}{a+1} + C",note:"a โ‰  -1"},{label:"Log Rule",formula:"\\int \\frac{1}{x} dx = \\ln|x| + C",note:""},{label:"Exponential",formula:"\\int e^x dx = e^x + C",note:""},{label:"General Exp",formula:"\\int a^x dx = \\frac{a^x}{\\ln a} + C",note:""}]},{title:"Definite Integrals",items:[{label:"Newton-Leibniz",formula:"\\int_a^b f(x)dx = F(b) - F(a)",note:"F is antiderivative"},{label:"Additivity",formula:"\\int_a^c = \\int_a^b + \\int_b^c",note:""},{label:"Linearity",formula:"\\int (af + bg) = a\\int f + b\\int g",note:""}]},{title:"Area Calculation",items:[{label:"Under Curve",formula:"S = \\int_a^b f(x)dx",note:"If f(x) โ‰ฅ 0"},{label:"Between Curves",formula:"S = \\int_a^b (f(x) - g(x))dx",note:"If f(x) โ‰ฅ g(x)"}]}]};case t.DIFF_EQ:return{color:"text-indigo-400",icon:u,sections:[{title:"First Order ODEs",items:[{label:"Separable",formula:"\\frac{dy}{dx} = g(x)h(y) \\implies \\int \\frac{dy}{h(y)} = \\int g(x)dx",note:""},{label:"Linear",formula:"\\frac{dy}{dx} + P(x)y = Q(x)",note:"Use Integrating Factor"},{label:"Integrating Factor",formula:"I(x) = e^{\\int P(x)dx}",note:"Multiply eq by I(x)"},{label:"Solution (Linear)",formula:"y = \\frac{1}{I(x)} \\int I(x)Q(x)dx",note:""}]},{title:"Second Order Linear",items:[{label:"Homogeneous",formula:"ay'' + by' + cy = 0",note:"Const coeffs"},{label:"Characteristic Eq",formula:"ar^2 + br + c = 0",note:"Find roots r1, r2"},{label:"Distinct Roots",formula:"y = C_1 e^{r_1 x} + C_2 e^{r_2 x}",note:"ฮ” > 0"},{label:"Repeated Roots",formula:"y = C_1 e^{rx} + C_2 x e^{rx}",note:"ฮ” = 0"},{label:"Complex Roots",formula:"y = e^{\\alpha x}(C_1 \\cos \\beta x + C_2 \\sin \\beta x)",note:"r = ฮฑ ยฑ iฮฒ"}]},{title:"Modeling",items:[{label:"Exponential Growth",formula:"\\frac{dP}{dt} = kP \\implies P(t) = P_0 e^{kt}",note:"k > 0"},{label:"Decay",formula:"\\frac{dN}{dt} = -\\lambda N \\implies N(t) = N_0 e^{-\\lambda t}",note:"Half-life relation"},{label:"Logistic Growth",formula:"\\frac{dP}{dt} = rP(1 - \\frac{P}{K})",note:"K is carrying capacity"}]}]};default:return{color:"text-slate-400",icon:x,sections:[]}}})(),s=l.icon;return e.jsxs("div",{className:"pb-20 space-y-8",children:[e.jsxs("header",{className:"flex flex-col md:flex-row items-start md:items-center gap-6 mb-8 border-b border-white/10 pb-6",children:[e.jsx("div",{className:`p-4 rounded-2xl bg-slate-900 border border-slate-700 shadow-xl ${l.color}`,children:e.jsx(s,{size:40})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-4xl font-black text-white tracking-tight mb-2",children:"Exam Cheat Sheet"}),e.jsxs("p",{className:"text-slate-400 text-lg font-light max-w-2xl",children:["Complete revision guide for ",e.jsx("strong",{className:"text-white",children:n}),". Contains essential definitions, formulas, and theorems required for final exams."]})]})]}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-6 items-start",children:l.sections.map((i,a)=>e.jsxs(f.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:a*.1},className:"bg-slate-900/40 backdrop-blur-md border border-slate-700/60 rounded-3xl overflow-hidden hover:border-slate-500/50 transition-all shadow-lg group",children:[e.jsxs("div",{className:"bg-slate-950/40 px-6 py-4 border-b border-slate-800/50 flex justify-between items-center",children:[e.jsxs("h3",{className:`font-bold uppercase tracking-widest text-xs flex items-center gap-2 ${l.color}`,children:[a===0?e.jsx(v,{size:14}):a===1?e.jsx(c,{size:14}):e.jsx(j,{size:14}),i.title]}),e.jsxs("span",{className:"text-[10px] text-slate-600 font-mono font-bold bg-slate-900 px-2 py-0.5 rounded",children:["SEC ",a+1]})]}),e.jsx("div",{className:"p-5 space-y-3",children:i.items.map((o,m)=>e.jsxs("div",{className:"relative p-3 rounded-xl hover:bg-white/5 transition-colors border border-transparent hover:border-white/5 group/item",children:[e.jsxs("div",{className:"flex justify-between items-center mb-1.5",children:[e.jsx("span",{className:"text-slate-300 text-xs font-bold",children:o.label}),o.note&&e.jsx("span",{className:"text-[9px] text-slate-500 font-medium bg-slate-950 px-1.5 py-0.5 rounded border border-slate-800/50",children:o.note})]}),e.jsx("div",{className:"font-mono text-sm text-cyan-100/90 overflow-x-auto whitespace-nowrap pb-1 custom-scrollbar",children:e.jsx(_,{expression:o.formula,inline:!0})})]},m))})]},a))}),e.jsx("div",{className:"mt-8 text-center",children:e.jsx("p",{className:"text-xs text-slate-500 font-mono",children:"PRO TIP: Practice applying these formulas in the Homework section before the exam."})})]})};export{T as CheatSheetView}; diff --git a/site/assets/CobwebView-CUIyp2dZ.js b/site/assets/CobwebView-CUIyp2dZ.js new file mode 100644 index 0000000..d073bb9 --- /dev/null +++ b/site/assets/CobwebView-CUIyp2dZ.js @@ -0,0 +1 @@ +import{r as d,j as e,m as j}from"./index-DJrAq1Rk.js";const u=()=>{const[l,x]=d.useState(2.8),[n,h]=d.useState(.1),m=s=>l*s*(1-s),p=50,r=600,t=600,a=r,b=()=>{let s=`M ${n*a} ${t}`,o=n;for(let c=0;cx(parseFloat(s.target.value)),className:"w-full h-2 bg-slate-700 rounded-lg appearance-none cursor-pointer accent-cyan-500"}),e.jsxs("div",{className:"flex justify-between text-[10px] text-slate-600 mt-1 font-mono",children:[e.jsx("span",{children:"Divergence"}),e.jsx("span",{children:"Stable"}),e.jsx("span",{children:"Chaos (r > 3.57)"})]})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"flex justify-between text-sm text-slate-400 mb-2",children:[e.jsx("span",{children:"Initial Value (xโ‚€)"}),e.jsx("span",{className:"text-pink-400 font-mono",children:n})]}),e.jsx("input",{type:"range",min:"0",max:"1",step:"0.01",value:n,onChange:s=>h(parseFloat(s.target.value)),className:"w-full h-2 bg-slate-700 rounded-lg appearance-none cursor-pointer accent-pink-500"})]}),e.jsxs("div",{className:"p-4 bg-slate-900 rounded-lg border border-slate-800 text-xs text-slate-400 leading-relaxed",children:[e.jsxs("p",{className:"mb-2",children:[e.jsx("strong",{className:"text-white",children:"Cobweb Plot:"})," Visualizes the behavior of the sequence iteratively."]}),e.jsx("p",{children:"If lines spiral inward, the system stabilizes (Convergence)."}),e.jsx("p",{children:"If lines fill the box randomly, the system is Chaotic."})]})]})]}),e.jsxs("div",{className:"lg:col-span-2 bg-slate-900 rounded-2xl border border-slate-700 p-4 relative shadow-2xl flex justify-center items-center overflow-hidden",children:[e.jsx("div",{className:"w-full max-w-[600px]",children:e.jsxs("svg",{viewBox:`0 0 ${r} ${t}`,className:"w-full h-auto bg-slate-950 rounded-xl border border-slate-800 overflow-visible",children:[e.jsx("line",{x1:"0",y1:t,x2:r,y2:"0",stroke:"#475569",strokeWidth:"1",strokeDasharray:"5 5"}),e.jsx("path",{d:`M 0 ${t} Q ${r/2} ${t-l*.25*a} ${r} ${t}`,fill:"none",stroke:"#0ea5e9",strokeWidth:"2"}),e.jsx(j.path,{d:b(),fill:"none",stroke:"#ec4899",strokeWidth:"1",initial:{pathLength:0,opacity:0},animate:{pathLength:1,opacity:.8},transition:{duration:.5}},`${l}-${n}`)]})}),e.jsx("div",{className:"absolute bottom-6 right-6 text-xs text-slate-500 font-mono",children:"Domain [0, 1]"})]})]})]})};export{u as CobwebView}; diff --git a/site/assets/ContinuityView-CSRJFUO9.js b/site/assets/ContinuityView-CSRJFUO9.js new file mode 100644 index 0000000..a9e8aa2 --- /dev/null +++ b/site/assets/ContinuityView-CSRJFUO9.js @@ -0,0 +1,13 @@ +import{c as g,r as u,j as e,m as x,b as N,A as w}from"./index-DJrAq1Rk.js";import{W as M}from"./WolframHelper-C3f14kAl.js";import{M as $}from"./MathRenderer-DoWdgGCt.js";import{L}from"./lightbulb-CK5FIpYu.js";import{C}from"./circle-check-7SRCYW7Y.js";import"./chevron-right-KbXem8Tn.js";/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const R=[["path",{d:"M12 16h.01",key:"1drbdi"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z",key:"1fd625"}]],A=g("octagon-alert",R);/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const T=[["path",{d:"M21.3 15.3a2.4 2.4 0 0 1 0 3.4l-2.6 2.6a2.4 2.4 0 0 1-3.4 0L2.7 8.7a2.41 2.41 0 0 1 0-3.4l2.6-2.6a2.41 2.41 0 0 1 3.4 0Z",key:"icamh8"}],["path",{d:"m14.5 12.5 2-2",key:"inckbg"}],["path",{d:"m11.5 9.5 2-2",key:"fmmyf7"}],["path",{d:"m8.5 6.5 2-2",key:"vc6u1g"}],["path",{d:"m17.5 15.5 2-2",key:"wo5hmg"}]],W=g("ruler",T),m=[{id:"rule1",name:"1. Point Exists",condition:"f(c) \\text{ is defined}",desc:"The function must actually have a value at x = c. There cannot be a hole with no filled point.",analogy:"Like a bridge having a specific plank to step on at the center. If the plank is missing, you can't cross.",interactiveMode:"HOLE"},{id:"rule2",name:"2. Limit Exists",condition:"\\lim_{x \\to c} f(x) \\text{ exists}",desc:"The left-hand path and the right-hand path must meet at the same location. No jumps allowed.",analogy:"Two road crews building a bridge from opposite sides must meet at the same height.",interactiveMode:"JUMP"},{id:"rule3",name:"3. Agreement",condition:"\\lim_{x \\to c} f(x) = f(c)",desc:'The value of the limit must equal the actual function value. The "bridge plank" must be exactly where the road ends, not floating above.',analogy:"The pothole (limit) must be perfectly filled by the asphalt patch (point).",interactiveMode:"CONTINUOUS"}],U=()=>{const[i,f]=u.useState("rule3"),[o,v]=u.useState(2),n=m.find(t=>t.id===i)||m[0],r=2,c=4,h=600,d=300,s=t=>(t+2)/8*h,a=t=>d-t/8*d,p=n.interactiveMode==="JUMP"?2:0,j=`M ${s(-2)} ${a(0)} L ${s(r-.1)} ${a(c-.1)}`,y=`M ${s(r+.1)} ${a(c-.1+p)} L ${s(6)} ${a(8+p)}`,b=n.interactiveMode!=="JUMP",k=Math.abs(o-c)<.2,l=b&&k;return e.jsxs("div",{className:"space-y-8 pb-20",children:[e.jsxs("header",{className:"border-b border-white/10 pb-6",children:[e.jsx("h2",{className:"text-4xl font-bold text-white mb-2 tracking-tight",children:"Continuity & Limits"}),e.jsxs("p",{className:"text-slate-400 max-w-3xl font-light",children:["The three fundamental laws that determine if a function is continuous at a point ",e.jsx("span",{className:"font-mono text-cyan-400",children:"x = c"}),"."]})]}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-8 items-start",children:[e.jsx("div",{className:"lg:col-span-4 space-y-4",children:m.map(t=>e.jsxs("button",{onClick:()=>f(t.id),className:`w-full text-left p-4 rounded-xl border transition-all duration-300 group relative overflow-hidden + ${i===t.id?"bg-slate-800 border-cyan-500/50 shadow-lg shadow-cyan-900/20":"bg-slate-900/40 border-slate-700 hover:bg-slate-800 hover:border-slate-600"} + `,children:[i===t.id&&e.jsx(x.div,{layoutId:"activeRuleGlow",className:"absolute inset-0 bg-cyan-500/5"}),e.jsxs("div",{className:"relative z-10 flex justify-between items-center",children:[e.jsxs("div",{children:[e.jsx("span",{className:`text-[10px] font-bold uppercase tracking-widest mb-1 block ${i===t.id?"text-cyan-400":"text-slate-500"}`,children:"Condition"}),e.jsx("h3",{className:`font-bold text-base ${i===t.id?"text-white":"text-slate-300"}`,children:t.name})]}),i===t.id&&e.jsx(N,{size:18,className:"text-cyan-400"})]})]},t.id))}),e.jsx("div",{className:"lg:col-span-8",children:e.jsx(w,{mode:"wait",children:e.jsxs(x.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},transition:{duration:.3},className:"glass-panel p-8 rounded-[32px] border-l-4 border-l-cyan-500 relative overflow-hidden",children:[e.jsx("div",{className:"absolute inset-0 bg-[url('https://grainy-gradients.vercel.app/noise.svg')] opacity-5 pointer-events-none"}),e.jsxs("div",{className:"mb-8 text-center",children:[e.jsx($,{expression:n.condition,className:"text-3xl text-white mb-4"}),e.jsx("p",{className:"text-slate-400 text-sm leading-relaxed max-w-lg mx-auto",children:n.desc})]}),e.jsxs("div",{className:"mb-8 bg-amber-500/5 p-5 rounded-xl border border-amber-500/20 flex gap-4 items-start",children:[e.jsx("div",{className:"p-2 bg-amber-500/10 rounded-lg text-amber-500 shrink-0",children:e.jsx(L,{size:20})}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-xs font-bold text-amber-400 uppercase tracking-widest mb-1",children:"Real World Analogy"}),e.jsxs("p",{className:"text-sm text-amber-100/80 italic",children:['"',n.analogy,'"']})]})]}),e.jsxs("div",{className:"bg-slate-900/40 rounded-2xl border border-white/5 p-6 relative overflow-hidden",children:[e.jsxs("div",{className:"flex justify-between items-center mb-4 relative z-10",children:[e.jsxs("h4",{className:"text-xs font-bold text-cyan-400 uppercase tracking-widest flex items-center gap-2",children:[e.jsx(W,{size:16})," Repair Lab"]}),e.jsxs("div",{className:`px-2 py-1 rounded text-[10px] font-bold uppercase border flex items-center gap-2 ${l?"border-emerald-500/30 text-emerald-400 bg-emerald-500/10":"border-pink-500/30 text-pink-400 bg-pink-500/10"}`,children:[l?e.jsx(C,{size:12}):e.jsx(A,{size:12}),l?"Function Continuous":"Discontinuity Detected"]})]}),e.jsxs("div",{className:"relative h-[250px] w-full bg-slate-950/50 rounded-xl border border-slate-800 mb-4",children:[e.jsxs("svg",{viewBox:`0 0 ${h} ${d}`,className:"w-full h-full overflow-visible",children:[e.jsx("line",{x1:s(-2),y1:a(0),x2:s(6),y2:a(0),stroke:"#334155",strokeWidth:"1"}),e.jsx("line",{x1:s(0),y1:d,x2:s(0),y2:0,stroke:"#334155",strokeWidth:"1"}),e.jsx("path",{d:j,stroke:"#22d3ee",strokeWidth:"3",fill:"none",strokeLinecap:"round",opacity:.6}),e.jsx("path",{d:y,stroke:"#22d3ee",strokeWidth:"3",fill:"none",strokeLinecap:"round",opacity:.6}),b&&e.jsx("circle",{cx:s(r),cy:a(c),r:"6",fill:"#020617",stroke:"#94a3b8",strokeWidth:"2",strokeDasharray:"2 2"}),e.jsx(x.circle,{cx:s(r),animate:{cy:a(o)},r:"6",className:`${l?"fill-emerald-400 stroke-emerald-200":"fill-pink-500 stroke-pink-200"} cursor-grab active:cursor-grabbing`,strokeWidth:"2"})]}),e.jsxs("div",{className:"absolute top-2 right-2 bg-slate-900/80 p-2 rounded text-xs font-mono border border-slate-800",children:["f(2) = ",e.jsx("span",{className:l?"text-emerald-400":"text-pink-400",children:o.toFixed(1)})]})]}),e.jsxs("div",{className:"flex gap-4 items-center",children:[e.jsx("span",{className:"text-xs text-slate-400 font-bold uppercase",children:"Adjust f(2):"}),e.jsx("input",{type:"range",min:"1",max:"7",step:"0.1",value:o,onChange:t=>v(parseFloat(t.target.value)),className:"flex-1 h-1.5 bg-slate-700 rounded-lg appearance-none cursor-pointer accent-cyan-500"})]})]})]},n.id)})})]}),e.jsx(M,{context:"limits"})]})};export{U as ContinuityView}; diff --git a/site/assets/DerivativesRulesView-CcHPI4L5.js b/site/assets/DerivativesRulesView-CcHPI4L5.js new file mode 100644 index 0000000..39fc7b8 --- /dev/null +++ b/site/assets/DerivativesRulesView-CcHPI4L5.js @@ -0,0 +1,3 @@ +import{r as d,j as e,m as r,b as i,A as c,L as x}from"./index-DJrAq1Rk.js";import{W as m}from"./WolframHelper-C3f14kAl.js";import{M as s}from"./MathRenderer-DoWdgGCt.js";import{L as p}from"./lightbulb-CK5FIpYu.js";import{Z as g}from"./zap-Bss3mUov.js";import"./chevron-right-KbXem8Tn.js";const n=[{id:"def",name:"Definition of Derivative",formula:"f'(x) = \\lim_{\\Delta x \\to 0} \\frac{f(x + \\Delta x) - f(x)}{\\Delta x}",desc:"The fundamental measure of instantaneous change. Geometrically, it represents the slope of the tangent line at a specific point.",analogy:"Like a speedometer in a car. It tells you your exact speed at a specific instant, not just the average speed over the whole trip.",breakdown:[{term:"f(x + \\Delta x) - f(x)",meaning:"Change in Output (Rise)",color:"text-cyan-400"},{term:"\\Delta x",meaning:"Change in Input (Run)",color:"text-purple-400"},{term:"\\lim",meaning:"Approaching Zero Interval",color:"text-emerald-400"}],example:{problem:"f(x) = x^2",solution:"2x"}},{id:"power",name:"Power Rule",formula:"\\frac{d}{dx}(x^n) = n \\cdot x^{n-1}",desc:"Used for polynomials. You bring the exponent down as a multiplier and subtract one from the power.",analogy:"Think of it as 'demoting' the power. A cubic function becomes quadratic, a quadratic becomes linear.",breakdown:[{term:"n",meaning:"Original Exponent becomes Multiplier",color:"text-pink-400"},{term:"n-1",meaning:"Power reduces by one degree",color:"text-orange-400"}],example:{problem:"\\frac{d}{dx}(x^4)",solution:"4x^3"}},{id:"product",name:"Product Rule",formula:"(f \\cdot g)' = f'g + fg'",desc:"Derivative of two multiplied functions. It's NOT just f' times g'. It's the 'first times derivative of second plus second times derivative of first'.",analogy:"Imagine tracking the growth of a rectangular garden where both Length (f) and Width (g) are expanding simultaneously.",breakdown:[{term:"f'g",meaning:"Growth due to change in first function",color:"text-cyan-400"},{term:"fg'",meaning:"Growth due to change in second function",color:"text-purple-400"}],example:{problem:"(x^2)(\\sin x)",solution:"2x\\sin x + x^2\\cos x"}},{id:"chain",name:"Chain Rule",formula:"\\frac{d}{dx}f(g(x)) = f'(g(x)) \\cdot g'(x)",desc:"Used for composition functions (functions inside functions). Differentiate the outer layer, keep inner same, multiply by derivative of inner.",analogy:"Like peeling an onion. You have to peel the outer layer (f) before you can deal with the inner layer (g).",breakdown:[{term:"f'(g(x))",meaning:"Outer Derivative (Inner unchanged)",color:"text-emerald-400"},{term:"g'(x)",meaning:"Inner Derivative (Chain)",color:"text-rose-400"}],example:{problem:"\\sin(x^3)",solution:"\\cos(x^3) \\cdot 3x^2"}},{id:"quotient",name:"Quotient Rule",formula:"\\left(\\frac{f}{g}\\right)' = \\frac{f'g - fg'}{g^2}",desc:"Derivative of division. Mnemonic: 'Low d-High minus High d-Low, over Low Low'.",analogy:"Measuring the rate of change of a ratio, like population density (People / Area) where both change over time.",breakdown:[{term:"f'g - fg'",meaning:"Opposing rates of change",color:"text-cyan-400"},{term:"g^2",meaning:"Normalization factor",color:"text-slate-400"}],example:{problem:"\\frac{x}{e^x}",solution:"\\frac{1\\cdot e^x - x\\cdot e^x}{(e^x)^2}"}}],w=()=>{const[a,o]=d.useState(n[0]);return e.jsxs("div",{className:"space-y-8 pb-20",children:[e.jsxs("header",{className:"border-b border-white/10 pb-6",children:[e.jsx("h2",{className:"text-4xl font-bold text-white mb-2 tracking-tight",children:"Differentiation Codex"}),e.jsx("p",{className:"text-slate-400 max-w-3xl font-light",children:"The fundamental laws of Calculus. Select a rule to explore its mechanism, geometric meaning, and application."})]}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-8 items-start",children:[e.jsx("div",{className:"lg:col-span-4 space-y-4",children:n.map(t=>e.jsxs("button",{onClick:()=>o(t),className:`w-full text-left p-4 rounded-xl border transition-all duration-300 group relative overflow-hidden + ${a.id===t.id?"bg-slate-800 border-cyan-500/50 shadow-lg shadow-cyan-900/20":"bg-slate-900/40 border-slate-700 hover:bg-slate-800 hover:border-slate-600"} + `,children:[a.id===t.id&&e.jsx(r.div,{layoutId:"activeGlow",className:"absolute inset-0 bg-cyan-500/5"}),e.jsxs("div",{className:"relative z-10 flex justify-between items-center",children:[e.jsxs("div",{children:[e.jsxs("span",{className:`text-xs font-bold uppercase tracking-widest mb-1 block ${a.id===t.id?"text-cyan-400":"text-slate-500"}`,children:["Rule 0",n.indexOf(t)+1]}),e.jsx("h3",{className:`font-bold text-lg ${a.id===t.id?"text-white":"text-slate-300"}`,children:t.name})]}),a.id===t.id&&e.jsx(i,{size:20,className:"text-cyan-400"})]})]},t.id))}),e.jsx("div",{className:"lg:col-span-8",children:e.jsx(c,{mode:"wait",children:e.jsxs(r.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},transition:{duration:.3},className:"glass-panel p-8 rounded-[32px] border-l-4 border-l-cyan-500 relative overflow-hidden",children:[e.jsx("div",{className:"absolute inset-0 bg-[url('https://grainy-gradients.vercel.app/noise.svg')] opacity-5 pointer-events-none"}),e.jsxs("div",{className:"bg-slate-950/80 p-6 rounded-2xl border border-white/5 mb-8 text-center shadow-inner relative group",children:[e.jsx("div",{className:"absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity",children:e.jsx("span",{className:"text-[10px] text-slate-500 uppercase tracking-widest border border-slate-800 px-2 py-1 rounded",children:"LaTeX"})}),e.jsx(s,{expression:a.formula,className:"text-2xl md:text-3xl text-white"})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-8 mb-8",children:[e.jsxs("div",{children:[e.jsxs("h4",{className:"text-sm font-bold text-slate-400 uppercase tracking-widest mb-4 flex items-center gap-2",children:[e.jsx(x,{size:16,className:"text-purple-400"})," Formula Anatomy"]}),e.jsx("div",{className:"space-y-3",children:a.breakdown.map((t,l)=>e.jsxs("div",{className:"bg-slate-900/50 p-3 rounded-lg border border-slate-800 flex items-start gap-3",children:[e.jsx("div",{className:"mt-1",children:e.jsx("div",{className:`w-2 h-2 rounded-full ${t.color.replace("text-","bg-")}`})}),e.jsxs("div",{children:[e.jsx("div",{className:`font-mono font-bold text-sm ${t.color}`,children:e.jsx(s,{expression:t.term,inline:!0})}),e.jsx("p",{className:"text-xs text-slate-400 leading-snug",children:t.meaning})]})]},l))})]}),e.jsxs("div",{children:[e.jsxs("h4",{className:"text-sm font-bold text-slate-400 uppercase tracking-widest mb-4 flex items-center gap-2",children:[e.jsx(p,{size:16,className:"text-amber-400"})," Intuition & Analogy"]}),e.jsxs("div",{className:"bg-amber-500/5 p-5 rounded-xl border border-amber-500/20 text-amber-100/80 text-sm leading-relaxed mb-4",children:['"',a.analogy,'"']}),e.jsx("p",{className:"text-slate-400 text-sm leading-relaxed",children:a.desc})]})]}),e.jsxs("div",{className:"border-t border-white/10 pt-6",children:[e.jsxs("h4",{className:"text-sm font-bold text-slate-400 uppercase tracking-widest mb-4 flex items-center gap-2",children:[e.jsx(g,{size:16,className:"text-pink-400"})," Worked Example"]}),e.jsxs("div",{className:"flex flex-col md:flex-row items-center gap-4 bg-slate-900/80 p-4 rounded-xl border border-slate-800",children:[e.jsxs("div",{className:"text-slate-400 font-mono text-sm",children:["Problem: ",e.jsx(s,{expression:a.example.problem,inline:!0})]}),e.jsx(i,{size:16,className:"text-slate-600 hidden md:block"}),e.jsx("div",{className:"rotate-90 md:rotate-0 text-slate-600 md:hidden",children:e.jsx(i,{size:16})}),e.jsx("div",{className:"text-cyan-400 font-mono text-lg font-bold",children:e.jsx(s,{expression:a.example.solution,inline:!0})})]})]})]},a.id)})})]}),e.jsx(m,{context:"derivatives"})]})};export{w as DerivativesRulesView}; diff --git a/site/assets/DeterminantView-B12-SV-Q.js b/site/assets/DeterminantView-B12-SV-Q.js new file mode 100644 index 0000000..50ece61 --- /dev/null +++ b/site/assets/DeterminantView-B12-SV-Q.js @@ -0,0 +1,15 @@ +import{c as g,u as v,r as h,j as e,d as j,e as N,m as w,L as y}from"./index-DJrAq1Rk.js";import{g as k,f as M}from"./matrixMath-CNHWal2D.js";import{W as z}from"./WolframHelper-C3f14kAl.js";import{S as _}from"./scan-BEuCCSbY.js";import"./chevron-right-KbXem8Tn.js";/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const S=[["path",{d:"M19 13V19H13",key:"10vkzq"}],["path",{d:"M5 5L19 19",key:"5zm2fv"}]],D=g("move-down-right",S);/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const L=[["path",{d:"M13 5H19V11",key:"1n1gyv"}],["path",{d:"M19 5L5 19",key:"72u4yj"}]],$=g("move-up-right",L),C=()=>{const[a,u]=v("det_matrix",[[5,3,-1],[2,0,4],[-3,6,2]]),[l,i]=h.useState(null),r=h.useMemo(()=>k(a),[a]),c=a.length===3&&a[0].length===3,b=(t,s,n)=>{var d;return!c||!n?!1:(d={main1:["0-0","1-1","2-2"],main2:["0-1","1-2","2-0"],main3:["0-2","1-0","2-1"],anti1:["0-2","1-1","2-0"],anti2:["0-0","1-2","2-1"],anti3:["0-1","1-0","2-2"]}[n])==null?void 0:d.includes(`${t}-${s}`)};return e.jsxs("div",{className:"space-y-8 pb-20",children:[e.jsxs("header",{className:"flex flex-col md:flex-row justify-between items-end border-b border-white/10 pb-6 gap-4",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-4xl font-bold text-white mb-2 tracking-tight",children:"Determinant Analysis"}),e.jsxs("p",{className:"text-slate-400 max-w-2xl font-light",children:["The geometric scaling factor of a linear transformation. ",e.jsx("br",{}),e.jsx("span",{className:"text-cyan-400",children:"det(A) = 0"})," implies dimension loss (singular matrix)."]})]}),e.jsxs("div",{className:`px-4 py-2 rounded-lg border text-xs font-mono uppercase tracking-wider flex items-center gap-2 ${r===0?"bg-pink-500/10 border-pink-500/20 text-pink-400":"bg-emerald-500/10 border-emerald-500/20 text-emerald-400"}`,children:[e.jsx(j,{size:14}),"Status: ",r===0?"Singular":"Invertible"]})]}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-8 items-start",children:[e.jsx("div",{className:"lg:col-span-7 space-y-6",children:e.jsxs("div",{className:"glass-panel p-8 rounded-[32px] relative overflow-hidden bg-slate-900/60 min-h-[450px] flex flex-col items-center justify-center",children:[e.jsx("div",{className:"absolute inset-0",style:{backgroundImage:"radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.05) 1px, transparent 0)",backgroundSize:"30px 30px"}}),e.jsxs("div",{className:"relative z-10 w-full flex flex-col items-center",children:[e.jsxs("div",{className:"mb-6 flex items-center gap-2 text-slate-500 text-xs font-bold uppercase tracking-widest",children:[e.jsx(N,{size:14})," Matrix A Input"]}),e.jsxs("div",{className:"relative p-6",children:[c&&l&&e.jsx("svg",{className:"absolute inset-0 w-full h-full pointer-events-none z-0",style:{transform:"scale(1.1)"}}),e.jsx("div",{className:"grid gap-2",style:{gridTemplateColumns:`repeat(${a[0].length}, minmax(min-content, 1fr))`},children:a.map((t,s)=>t.map((n,o)=>{const d=b(s,o,l),f=l==null?void 0:l.startsWith("main");return e.jsx("div",{className:"relative",children:e.jsx("input",{className:` + w-14 h-14 text-center font-mono text-lg rounded-xl transition-all duration-300 outline-none + border border-transparent + ${d?f?"bg-emerald-500/20 text-emerald-300 border-emerald-500/50 scale-110 shadow-[0_0_15px_rgba(16,185,129,0.3)]":"bg-pink-500/20 text-pink-300 border-pink-500/50 scale-110 shadow-[0_0_15px_rgba(236,72,153,0.3)]":"bg-slate-800/60 text-slate-300 hover:bg-slate-800"} + `,value:n,onChange:x=>{const m=parseFloat(x.target.value);if(!isNaN(m)||x.target.value===""||x.target.value==="-"){const p=[...a];p[s][o]=isNaN(m)?0:m,u(p)}}})},`${s}-${o}`)}))})]}),c?e.jsxs("div",{className:"mt-8 w-full max-w-md bg-slate-950/50 p-4 rounded-2xl border border-white/5 backdrop-blur-sm",children:[e.jsx("div",{className:"text-center text-[10px] text-slate-500 font-bold uppercase tracking-widest mb-3",children:"Sarrus Rule Visualizer"}),e.jsxs("div",{className:"flex justify-between items-center gap-4",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"text-[10px] text-emerald-400 font-bold flex items-center gap-1",children:[e.jsx(D,{size:10})," Positive Diagonals"]}),e.jsx("div",{className:"flex gap-1",children:["main1","main2","main3"].map((t,s)=>e.jsxs("button",{onMouseEnter:()=>i(t),onMouseLeave:()=>i(null),className:"w-8 h-8 rounded bg-emerald-500/10 border border-emerald-500/30 text-emerald-400 text-xs font-mono hover:bg-emerald-500 hover:text-white transition-colors",children:["D",s+1]},t))})]}),e.jsx("div",{className:"text-slate-600 font-light text-2xl",children:"-"}),e.jsxs("div",{className:"space-y-1 text-right",children:[e.jsxs("div",{className:"text-[10px] text-pink-400 font-bold flex items-center justify-end gap-1",children:["Negative Diagonals ",e.jsx($,{size:10})]}),e.jsx("div",{className:"flex gap-1 justify-end",children:["anti1","anti2","anti3"].map((t,s)=>e.jsxs("button",{onMouseEnter:()=>i(t),onMouseLeave:()=>i(null),className:"w-8 h-8 rounded bg-pink-500/10 border border-pink-500/30 text-pink-400 text-xs font-mono hover:bg-pink-500 hover:text-white transition-colors",children:["A",s+1]},t))})]})]})]}):e.jsx("div",{className:"mt-8 text-slate-500 text-xs italic",children:"Sarrus visualization available for 3x3 matrices."})]})]})}),e.jsxs("div",{className:"lg:col-span-5 space-y-6",children:[e.jsxs("div",{className:"glass-panel p-8 rounded-[32px] flex flex-col items-center justify-center relative overflow-hidden min-h-[250px] border-t-4 border-t-purple-500",children:[e.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-purple-500/5 to-transparent pointer-events-none"}),e.jsx("h3",{className:"text-xs font-bold text-slate-500 uppercase tracking-widest mb-2",children:"Computed Determinant"}),e.jsx(w.div,{initial:{scale:.5,opacity:0,filter:"blur(10px)"},animate:{scale:1,opacity:1,filter:"blur(0px)"},className:"relative z-10",children:e.jsx("div",{className:"text-7xl font-mono font-bold text-white drop-shadow-[0_0_30px_rgba(168,85,247,0.4)]",children:r!==null?M(r):"Err"})},r),e.jsx("div",{className:"mt-6 flex flex-wrap gap-2 justify-center",children:r===0?e.jsx("span",{className:"px-3 py-1 rounded-full bg-pink-500/20 text-pink-300 text-xs font-bold border border-pink-500/30",children:"Volume Collapsed (Singular)"}):e.jsx("span",{className:"px-3 py-1 rounded-full bg-emerald-500/20 text-emerald-300 text-xs font-bold border border-emerald-500/30",children:"Volume Preserved (Invertible)"})})]}),e.jsxs("div",{className:"grid gap-4",children:[e.jsxs("div",{className:"bg-slate-900/50 p-5 rounded-2xl border border-white/5 hover:border-cyan-500/30 transition-colors group",children:[e.jsxs("h4",{className:"text-sm font-bold text-white mb-2 flex items-center gap-2",children:[e.jsx(y,{size:16,className:"text-cyan-400 group-hover:scale-110 transition-transform"}),"Geometric Interpretation"]}),e.jsxs("p",{className:"text-xs text-slate-400 leading-relaxed",children:["The determinant represents the ",e.jsx("strong",{className:"text-cyan-400",children:"signed volume"})," of the parallelepiped formed by the column vectors of the matrix."]})]}),e.jsxs("div",{className:"bg-slate-900/50 p-5 rounded-2xl border border-white/5 hover:border-purple-500/30 transition-colors group",children:[e.jsxs("h4",{className:"text-sm font-bold text-white mb-2 flex items-center gap-2",children:[e.jsx(_,{size:16,className:"text-purple-400 group-hover:scale-110 transition-transform"}),"Laplace Expansion"]}),e.jsxs("p",{className:"text-xs text-slate-400 leading-relaxed",children:["Recursive method: ",e.jsx("span",{className:"font-mono text-purple-300",children:"det(A) = ฮฃ (-1)โฑโบสฒ ยท aแตขโฑผ ยท Mแตขโฑผ"}),". Useful for matrices larger than 3x3."]})]})]})]})]}),e.jsx(z,{context:"determinant"})]})};export{C as DeterminantView}; diff --git a/site/assets/DiffEq3DView-B2vjbbYS.js b/site/assets/DiffEq3DView-B2vjbbYS.js new file mode 100644 index 0000000..f7fcfdf --- /dev/null +++ b/site/assets/DiffEq3DView-B2vjbbYS.js @@ -0,0 +1 @@ +import{j as e,z as h,r as l}from"./index-DJrAq1Rk.js";import{C as j,V as b,u as y}from"./react-three-fiber.esm-DbvaK_kO.js";import{O as v}from"./OrbitControls-C12Qjv1w.js";import{L as w}from"./Line-DRGYPd7c.js";import"./extends-CF3RwP-h.js";const g=()=>{const o=l.useRef(null),c=10,x=28,d=8/3,a=.01,f=l.useMemo(()=>{const n=[];let t=.1,s=0,r=0;for(let i=0;i<3e3;i++){const m=c*(s-t),p=t*(x-r)-s,u=t*s-d*r;t+=m*a,s+=p*a,r+=u*a,n.push(new b(t,s,r))}return n},[]);return y(n=>{o.current&&(o.current.rotation.y+=.002)}),e.jsx("group",{ref:o,position:[0,-25,0],children:e.jsx(w,{points:f,color:"#f472b6",lineWidth:1.5,opacity:.8,transparent:!0})})},L=()=>e.jsxs("div",{className:"space-y-6 h-[calc(100vh-140px)] flex flex-col pb-6",children:[e.jsx("header",{className:"flex justify-between items-end border-b border-white/10 pb-4 shrink-0",children:e.jsxs("div",{children:[e.jsxs("h2",{className:"text-3xl font-bold text-white mb-2 flex items-center gap-3",children:[e.jsx(h,{className:"text-pink-400"})," Lorenz Attractor"]}),e.jsx("p",{className:"text-slate-400 text-sm max-w-2xl",children:"A chaotic system of differential equations. Small changes in initial conditions lead to vastly different trajectories (Butterfly Effect)."})]})}),e.jsx("div",{className:"flex-1 bg-slate-950 rounded-3xl border border-slate-800 relative overflow-hidden shadow-2xl",children:e.jsxs(j,{camera:{position:[50,40,50],fov:45},children:[e.jsx("color",{attach:"background",args:["#020617"]}),e.jsx(v,{makeDefault:!0,autoRotate:!0,autoRotateSpeed:.5}),e.jsx(g,{})]})})]});export{L as DiffEq3DView}; diff --git a/site/assets/DiffEqBasicsView-GrafeQN7.js b/site/assets/DiffEqBasicsView-GrafeQN7.js new file mode 100644 index 0000000..50f41fc --- /dev/null +++ b/site/assets/DiffEqBasicsView-GrafeQN7.js @@ -0,0 +1 @@ +import{r as j,j as e,w,m as g}from"./index-DJrAq1Rk.js";import{M as r}from"./MathRenderer-DoWdgGCt.js";import{L as k}from"./lightbulb-CK5FIpYu.js";const W=()=>{const[x,y]=j.useState(0),[d,C]=j.useState(0),[l,N]=j.useState(4),p=600,n=400,t={x:[-2,2],y:[-2,20]},i=s=>(s-t.x[0])/(t.x[1]-t.x[0])*p,o=s=>n-(s-t.y[0])/(t.y[1]-t.y[0])*n,v=(s,a)=>a*Math.exp(2*s),m=l/Math.exp(2*d),h=s=>{let a="";for(let c=t.x[0];c<=t.x[1];c+=.05){const b=v(c,s),f=i(c),u=o(b);if(b>t.y[1]||be.jsx("path",{d:h(s),fill:"none",stroke:"#334155",strokeWidth:"1",strokeDasharray:"4 4"},a)),e.jsx(g.path,{d:h(x),fill:"none",stroke:"#22d3ee",strokeWidth:"2",opacity:.5}),e.jsx(g.path,{d:h(m),fill:"none",stroke:"#c084fc",strokeWidth:"4"}),e.jsx("circle",{cx:i(d),cy:o(l),r:"6",fill:"#c084fc",stroke:"white",strokeWidth:"2"})]})}),e.jsxs("div",{className:"p-6 bg-slate-950/50 border-t border-white/5 space-y-6",children:[e.jsxs("div",{children:[e.jsxs("label",{className:"flex items-center justify-between text-xs font-bold text-slate-400 uppercase tracking-widest mb-2",children:[e.jsx("span",{className:"flex items-center gap-2",children:"Manual C Exploration"}),e.jsx("span",{className:"text-cyan-400 font-mono text-lg",children:x.toFixed(1)})]}),e.jsx("input",{type:"range",min:"-5",max:"5",step:"0.1",value:x,onChange:s=>y(parseFloat(s.target.value)),className:"w-full h-2 bg-slate-800 rounded-lg appearance-none cursor-pointer accent-cyan-500"})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4 pt-4 border-t border-white/5",children:[e.jsxs("div",{children:[e.jsx("label",{className:"text-xs font-bold text-purple-400 uppercase tracking-widest mb-2 block",children:"Set Initial Y(0)"}),e.jsx("input",{type:"number",value:l,onChange:s=>N(parseFloat(s.target.value)),className:"w-full bg-slate-800 border border-slate-700 rounded p-2 text-white font-mono focus:border-purple-500 outline-none"})]}),e.jsx("div",{className:"flex items-end pb-2",children:e.jsxs("span",{className:"text-xs text-slate-500",children:["Particular Solution: ",e.jsxs("span",{className:"text-white font-mono font-bold",children:["y = ",m.toFixed(2),"e^{2x}"]})]})})]})]})]})]})]})};export{W as DiffEqBasicsView}; diff --git a/site/assets/EigenView-vzcUWw_g.js b/site/assets/EigenView-vzcUWw_g.js new file mode 100644 index 0000000..f830e0a --- /dev/null +++ b/site/assets/EigenView-vzcUWw_g.js @@ -0,0 +1,6 @@ +import{c as x,r as i,j as e,m as c}from"./index-DJrAq1Rk.js";import{M as m}from"./MatrixInput-BvG_poIz.js";import{e as h,g as p,h as b,f as n}from"./matrixMath-CNHWal2D.js";/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const g=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M14 15H9v-5",key:"pi4jk9"}],["path",{d:"M16 3h5v5",key:"1806ms"}],["path",{d:"M21 3 9 15",key:"15kdhq"}]],u=x("scaling",g),f=()=>{const[t,o]=i.useState([[4,1],[2,3]]),a=i.useMemo(()=>h(t),[t]),l=i.useMemo(()=>p(t),[t]),s=i.useMemo(()=>b(t),[t]),r=a!==null?-a:0,d=l!==null?l:0;return e.jsxs("div",{className:"space-y-10 pb-20",children:[e.jsxs("header",{className:"mb-8",children:[e.jsx("h2",{className:"text-4xl font-bold text-white mb-2",children:"Eigenvalues (Stability)"}),e.jsxs("p",{className:"text-slate-400 max-w-2xl",children:["Eigenvalues (",e.jsx("span",{className:"font-mono text-pink-400",children:"ฮป"}),') are the "scaling factors" of the matrix. They determine whether a dynamic system grows, decays, or rotates.',e.jsx("br",{}),"Calculated via characteristic equation: ",e.jsx("span",{className:"font-mono text-cyan-400",children:"det(A - ฮปI) = 0"}),"."]})]}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-12 items-center",children:[e.jsxs("div",{className:"flex flex-col items-center gap-8",children:[e.jsxs("div",{className:"bg-slate-800/50 p-8 rounded-3xl border border-white/5 backdrop-blur-xl relative",children:[e.jsx("div",{className:"absolute -top-3 -left-3 bg-pink-500 text-white text-xs font-bold px-2 py-1 rounded",children:"INPUT A"}),e.jsx(m,{data:t,onChange:o,editable:!0,color:"pink"})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4 w-full max-w-md",children:[e.jsxs("div",{className:"bg-slate-900 p-4 rounded-xl border border-slate-800 text-center",children:[e.jsx("span",{className:"text-xs text-slate-500 uppercase tracking-widest",children:"Trace (Tr)"}),e.jsx("div",{className:"text-2xl font-mono font-bold text-white mt-1",children:a!==null?n(a):"-"})]}),e.jsxs("div",{className:"bg-slate-900 p-4 rounded-xl border border-slate-800 text-center",children:[e.jsx("span",{className:"text-xs text-slate-500 uppercase tracking-widest",children:"Determinant"}),e.jsx("div",{className:"text-2xl font-mono font-bold text-white mt-1",children:l!==null?n(l):"-"})]})]})]}),e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"bg-slate-900/60 p-5 rounded-2xl border border-white/5 flex gap-4",children:[e.jsx("div",{className:"p-3 bg-purple-500/20 rounded-xl h-fit",children:e.jsx(u,{className:"text-purple-400",size:24})}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-sm font-bold text-purple-300 uppercase tracking-wide mb-1",children:"Geometric Meaning"}),e.jsxs("p",{className:"text-sm text-slate-400 leading-relaxed",children:["When Matrix A acts on a vector, it usually rotates and stretches it.",e.jsx("strong",{className:"text-white",children:" Eigenvectors"})," are the special directions that ",e.jsx("em",{children:"do not rotate"}),"โ€”they only get stretched by the factor ",e.jsx("strong",{className:"text-pink-400",children:"ฮป"})," (Eigenvalue)."]})]})]}),e.jsxs(c.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},className:"bg-slate-800/30 p-6 rounded-xl border border-slate-700",children:[e.jsxs("h3",{className:"text-cyan-400 font-bold mb-4 flex items-center gap-2",children:[e.jsx("span",{className:"w-2 h-2 bg-cyan-400 rounded-full"}),"Characteristic Equation"]}),e.jsxs("div",{className:"text-lg md:text-2xl font-mono text-white text-center bg-slate-900 p-4 rounded-lg border border-slate-800 shadow-inner break-all",children:["ฮปยฒ ",r>=0?"+":"-"," ",Math.abs(r).toFixed(2),"ฮป ",d>=0?"+":"-"," ",Math.abs(d).toFixed(2)," = 0"]}),e.jsx("p",{className:"text-xs text-slate-500 mt-4 text-center",children:"Derived from: ฮปยฒ - Tr(A)ฮป + det(A) = 0"})]}),e.jsxs(c.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},transition:{delay:.2},className:"bg-gradient-to-br from-pink-900/20 to-slate-900 p-6 rounded-xl border border-pink-500/30",children:[e.jsxs("h3",{className:"text-pink-400 font-bold mb-4 flex items-center gap-2",children:[e.jsx("span",{className:"w-2 h-2 bg-pink-400 rounded-full"}),"Results (Roots)"]}),s?e.jsxs("div",{className:"flex justify-around items-center",children:[e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"text-sm text-pink-300/70 mb-1",children:"ฮปโ‚"}),e.jsx("div",{className:"text-4xl font-mono font-bold text-white",children:n(s.l1)})]}),e.jsx("div",{className:"h-12 w-px bg-white/10"}),e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"text-sm text-pink-300/70 mb-1",children:"ฮปโ‚‚"}),e.jsx("div",{className:"text-4xl font-mono font-bold text-white",children:n(s.l2)})]})]}):e.jsx("div",{className:"text-center text-slate-400 py-4",children:"Complex roots (Rotation without scaling on real axes)."})]}),e.jsxs("div",{className:"bg-emerald-900/10 border border-emerald-500/20 p-4 rounded-lg",children:[e.jsx("h4",{className:"text-emerald-400 text-sm font-bold mb-2",children:"Stability Interpretation"}),e.jsx("p",{className:"text-sm text-slate-300",children:s&&Math.abs(Math.max(Math.abs(s.l1),Math.abs(s.l2)))>1?"The dominant eigenvalue magnitude is > 1. The system is expanding and may become unstable.":"The dominant eigenvalue magnitude is < 1. The system will decay towards zero or stabilize."})]})]})]})]})};export{f as EigenView}; diff --git a/site/assets/ExamAnalysisView-DyppqzSR.js b/site/assets/ExamAnalysisView-DyppqzSR.js new file mode 100644 index 0000000..990bb5c --- /dev/null +++ b/site/assets/ExamAnalysisView-DyppqzSR.js @@ -0,0 +1,6 @@ +import{c as k,r as C,j as e,l as E,m as c,d as M}from"./index-DJrAq1Rk.js";import{g as A,e as b,q as T,a as P,T as S,B as z,r as D}from"./examStorage-DURyP8UF.js";import{C as Q}from"./circle-check-7SRCYW7Y.js";/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const R=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],O=k("trash-2",R),G=()=>{const j=A(),t=C.useMemo(()=>{let d=0,p=0,u=0,l=0,s=0,r=0,o=0;const i={};b.forEach(x=>{i[x.id]={total:0,attempted:0,correct:0,mastered:0}}),Object.entries(T).forEach(([x,m])=>{if(!m)return;const a=x;m.forEach(h=>{o++;const n=j[h.id],f=P(n);i[a]&&i[a].total++,f==="UNSEEN"?r++:n&&(s+=f==="LEARNING"?1:0,l+=f==="MASTERED"?1:0,d+=n.correct+n.incorrect,p+=n.correct,u+=n.incorrect,i[a]&&(i[a].attempted++,i[a].correct+=n.correct,f==="MASTERED"&&i[a].mastered++))})});const v=o>0?Math.round(l/o*100):0,w=o>0?Math.round(s/o*100):0;let g=null,y=101;return Object.entries(i).forEach(([x,m])=>{const a=m;if(a.attempted>0){const h=a.mastered/a.total*100;hn.id===x))}}),{totalQuestions:o,masteredCount:l,learningCount:s,unseenCount:r,masteryPercentage:v,learningPercentage:w,topicStats:i,weakestTopic:g,totalAttempts:d}},[j]),N=()=>{window.confirm("Are you sure you want to reset all progress? This cannot be undone.")&&(D(),window.location.reload())};return e.jsxs("div",{className:"space-y-8 pb-20 max-w-5xl mx-auto",children:[e.jsxs("header",{className:"flex flex-col md:flex-row justify-between items-start md:items-end border-b border-white/10 pb-6 gap-6",children:[e.jsxs("div",{children:[e.jsxs("h2",{className:"text-4xl font-black text-white mb-2 tracking-tight flex items-center gap-3",children:[e.jsx(E,{className:"text-cyan-400"})," Performance Analysis"]}),e.jsx("p",{className:"text-slate-400 max-w-2xl font-light text-base",children:"Long-term tracking of your mastery across all modules. Based on correct answer streaks and error rates."})]}),e.jsxs("button",{onClick:N,className:"flex items-center gap-2 px-4 py-2 bg-slate-900/50 hover:bg-red-900/20 text-slate-400 hover:text-red-400 border border-slate-800 hover:border-red-500/30 rounded-xl transition-all text-xs font-bold uppercase tracking-wider",children:[e.jsx(O,{size:14})," Reset Data"]})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[e.jsxs(c.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"bg-slate-900/40 rounded-3xl border border-slate-800 p-8 flex flex-col items-center justify-center relative overflow-hidden min-h-[320px]",children:[e.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-emerald-500/5 to-transparent pointer-events-none"}),e.jsxs("div",{className:"text-xs font-bold uppercase tracking-[0.2em] text-slate-500 mb-8 flex items-center gap-2 z-10",children:[e.jsx(S,{size:16,className:"text-emerald-400"})," Global Mastery"]}),e.jsxs("div",{className:"relative w-48 h-48 flex items-center justify-center mb-8 z-10",children:[e.jsxs("svg",{className:"w-full h-full transform -rotate-90 drop-shadow-2xl",viewBox:"0 0 100 100",children:[e.jsx("defs",{children:e.jsxs("linearGradient",{id:"progressGradient",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[e.jsx("stop",{offset:"0%",stopColor:t.masteryPercentage>=80?"#10b981":t.masteryPercentage>=50?"#3b82f6":"#f59e0b"}),e.jsx("stop",{offset:"100%",stopColor:t.masteryPercentage>=80?"#34d399":t.masteryPercentage>=50?"#60a5fa":"#fbbf24"})]})}),e.jsx("circle",{cx:"50",cy:"50",r:"40",fill:"none",stroke:"#0f172a",strokeWidth:"8"}),e.jsx("circle",{cx:"50",cy:"50",r:"40",fill:"none",stroke:"#1e293b",strokeWidth:"8",strokeOpacity:"0.5"}),e.jsx(c.circle,{initial:{strokeDashoffset:251.3},animate:{strokeDashoffset:251.3-251.3*t.masteryPercentage/100},transition:{duration:1.5,ease:"easeOut",delay:.2},cx:"50",cy:"50",r:"40",fill:"none",stroke:"url(#progressGradient)",strokeWidth:"8",strokeDasharray:"251.3",strokeLinecap:"round",className:"drop-shadow-[0_0_15px_rgba(16,185,129,0.2)]"})]}),e.jsx("div",{className:"absolute inset-0 flex flex-col items-center justify-center",children:e.jsxs(c.span,{initial:{scale:.5,opacity:0},animate:{scale:1,opacity:1},transition:{delay:.5},className:"text-5xl font-black text-white tracking-tighter",children:[t.masteryPercentage,e.jsx("span",{className:"text-2xl text-slate-500 align-top ml-1",children:"%"})]})})]}),e.jsxs("div",{className:"flex gap-4 text-[10px] font-mono font-bold uppercase tracking-widest z-10 bg-slate-950/50 px-5 py-2.5 rounded-full border border-white/5",children:[e.jsxs("span",{className:"text-emerald-400 flex items-center gap-2",children:[e.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-emerald-400"}),t.masteredCount," Mastered"]}),e.jsxs("span",{className:"text-amber-400 flex items-center gap-2",children:[e.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-amber-400"}),t.learningCount," Learning"]})]})]}),e.jsxs(c.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.1},className:"bg-slate-900/40 rounded-3xl border border-slate-800 p-8 flex flex-col justify-between min-h-[320px]",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"text-xs font-bold uppercase tracking-[0.2em] text-slate-500 mb-8 flex items-center gap-2",children:[e.jsx(M,{size:16,className:"text-blue-400"})," Activity Log"]}),e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex justify-between items-end pb-4 border-b border-white/5",children:[e.jsx("span",{className:"text-slate-400 text-sm font-medium",children:"Total Attempts"}),e.jsx("span",{className:"text-3xl font-mono font-bold text-white",children:t.totalAttempts})]}),e.jsxs("div",{className:"flex justify-between items-end",children:[e.jsx("span",{className:"text-slate-400 text-sm font-medium",children:"Questions Exposed"}),e.jsxs("div",{className:"text-right",children:[e.jsx("span",{className:"text-3xl font-mono font-bold text-blue-400 block mb-1",children:t.totalQuestions-t.unseenCount}),e.jsxs("span",{className:"text-xs text-slate-600 font-bold uppercase tracking-wider",children:["OUT OF ",t.totalQuestions]})]})]})]})]}),e.jsx("div",{className:"w-full bg-slate-800 rounded-full h-3 overflow-hidden mt-6 shadow-inner",children:e.jsx("div",{className:"h-full bg-gradient-to-r from-blue-600 to-cyan-400",style:{width:`${t.totalQuestions>0?(t.totalQuestions-t.unseenCount)/t.totalQuestions*100:0}%`}})})]}),e.jsxs(c.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.2},className:"bg-slate-900/40 rounded-3xl border border-slate-800 p-8 flex flex-col justify-between min-h-[320px]",children:[e.jsxs("div",{className:"text-xs font-bold uppercase tracking-[0.2em] text-slate-500 mb-8 flex items-center gap-2",children:[e.jsx(z,{size:16,className:"text-pink-400"})," Focus Area"]}),t.weakestTopic?e.jsxs("div",{className:"flex flex-col h-full justify-between",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-4xl font-black text-white mb-3 tracking-tight",children:t.weakestTopic.label}),e.jsx("div",{className:"h-1 w-12 bg-pink-500 rounded-full mb-6"}),e.jsx("p",{className:"text-sm text-slate-400 leading-relaxed font-light",children:"This topic has the lowest mastery rate among those you've attempted."})]}),e.jsxs("div",{className:"mt-6 p-4 bg-pink-500/10 border border-pink-500/20 rounded-2xl text-pink-300 text-xs font-medium leading-relaxed",children:["Recommendation: Review ",e.jsx("span",{className:"text-white font-bold",children:"Concept Drills"})," or check the ",e.jsx("span",{className:"text-white font-bold",children:"Cheat Sheet"}),"."]})]}):e.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-slate-500 text-sm text-center font-medium",children:[e.jsx("div",{className:"w-16 h-16 rounded-full bg-slate-800 flex items-center justify-center mb-4 text-slate-600",children:e.jsx(Q,{size:32})}),"Start solving questions to generate insights."]})]})]}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:Object.entries(t.topicStats).map(([d,p],u)=>{const l=b.find(o=>o.id===d),s=p;if(!l)return null;const r=s.total>0?Math.round(s.mastered/s.total*100):0;return e.jsxs(c.div,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},transition:{delay:.3+u*.05},className:"bg-slate-900/30 border border-slate-800 p-6 rounded-3xl flex items-center gap-6 hover:bg-slate-900/50 transition-colors group",children:[e.jsx("div",{className:`w-14 h-14 rounded-2xl flex items-center justify-center ${l.bg} ${l.color} group-hover:scale-110 transition-transform`,children:e.jsx(l.icon,{size:26})}),e.jsxs("div",{className:"flex-1",children:[e.jsxs("div",{className:"flex justify-between mb-2",children:[e.jsx("h4",{className:"font-bold text-white text-base",children:l.label}),e.jsxs("span",{className:`text-sm font-mono font-bold ${r>=80?"text-emerald-400":r>=50?"text-blue-400":"text-slate-400"}`,children:[r,"%"]})]}),e.jsx("div",{className:"w-full bg-slate-800 rounded-full h-2 overflow-hidden mb-3",children:e.jsx(c.div,{initial:{width:0},animate:{width:`${r}%`},className:`h-full rounded-full ${r>=80?"bg-emerald-500":r>=50?"bg-blue-500":"bg-slate-600"}`})}),e.jsxs("div",{className:"flex gap-4 text-[10px] text-slate-500 font-mono uppercase tracking-wide",children:[e.jsxs("span",{children:[e.jsx("strong",{className:"text-slate-300",children:s.mastered}),"/",s.total," Mastered"]}),e.jsxs("span",{children:[e.jsx("strong",{className:"text-slate-300",children:s.attempted})," Attempted"]})]})]})]},d)})})]})};export{G as ExamAnalysisView}; diff --git a/site/assets/ExercisesView-C-gZzMQC.js b/site/assets/ExercisesView-C-gZzMQC.js new file mode 100644 index 0000000..d849dc1 --- /dev/null +++ b/site/assets/ExercisesView-C-gZzMQC.js @@ -0,0 +1,12 @@ +import{c as h,r as C,j as e,m as p,A as B,M as n}from"./index-DJrAq1Rk.js";import{M as b}from"./MathRenderer-DoWdgGCt.js";import{L as _}from"./lightbulb-CK5FIpYu.js";/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const S=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],T=h("chevron-down",S);/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const q=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],I=h("chevron-up",q),D=({module:i})=>{const[c,x]=C.useState(null),A=s=>{x(c===s?null:s)},l=[{category:"Definitions & Dimensions",items:[{id:"m_1",text:"1. What is a matrix?",options:["A) Any sequence of numbers","B) A rectangular array of numbers arranged in rows and columns","C) A graph of a function"],correctAnswer:"B",solutionSteps:["A matrix is defined as a rectangular array of numbers (or symbols/expressions) arranged in rows and columns."]},{id:"m_2",text:"2. The dimension of matrix Anร—m means:",options:["A) n columns and m rows","B) n rows and m columns","C) m rows and n columns"],correctAnswer:"B",solutionSteps:["Convention: Rows ร— Columns (n ร— m)."]},{id:"m_3",text:"3. A square matrix is a matrix in which:",options:["A) n โ‰  m","B) all elements are zeros","C) n = m"],correctAnswer:"C",solutionSteps:["Square implies equal sides, so number of rows (n) equals number of columns (m)."]},{id:"m_4",text:"4. The identity matrix is:",options:["A) a matrix with ones on the main diagonal and zeros elsewhere","B) a matrix with all elements equal to 1","C) the zero matrix"],correctAnswer:"A",solutionSteps:["Identity matrix I has 1s on diagonal, 0s elsewhere. AI = IA = A."]},{id:"m_6",text:"6. A diagonal matrix is:",options:["A) non-zero elements only on the main diagonal","B) ones on the diagonal","C) zeros in the columns"],correctAnswer:"A",solutionSteps:["A diagonal matrix has entries outside the main diagonal equal to zero."]}]},{category:"Operations & Properties",items:[{id:"m_7",text:"7. To add two matrices, they must have:",options:["A) the same number of rows","B) the same number of columns","C) identical dimensions"],correctAnswer:"C",solutionSteps:["Matrix addition is element-wise, so dimensions (rows and columns) must match."]},{id:"m_8",text:"8. The transposition of a matrix means:",options:["A) reversing the order of columns","B) swapping rows and columns","C) squaring the matrix"],correctAnswer:"B",solutionSteps:["Transpose A^T swaps indices ij to ji, effectively turning rows into columns."]},{id:"m_10",text:"10. The product A(nร—m) * B(pร—q) exists when:",options:["A) n = q","B) m = p","C) n = p"],correctAnswer:"B",solutionSteps:["Inner dimensions must match. (nร—m) * (mร—q) yields (nร—q)."]},{id:"m_12",text:"12. The transposition rule of a matrix product is:",options:["A) (AB)^T = A^T B^T","B) (AB)^T = B^T A^T","C) (AB)^T = AB"],correctAnswer:"B",solutionSteps:["The transpose of a product is the product of transposes in reverse order."]},{id:"m_14",text:"14. A symmetric matrix satisfies:",options:["A) A = -A^T","B) A = A^T","C) A^T = 0"],correctAnswer:"B",solutionSteps:["Symmetry means the matrix is equal to its transpose."]}]},{category:"Determinants & Inverse",items:[{id:"m_17",text:"17. A matrix is singular when:",options:["A) detA โ‰  0","B) detA = 0","C) A^-1 exists"],correctAnswer:"B",solutionSteps:["A singular matrix has a determinant of zero and no inverse."]},{id:"m_18",text:"18. For a 2ร—2 matrix, |A| equals:",options:["A) a+b+c+d","B) ad - bc","C) ab - cd"],correctAnswer:"B",solutionSteps:["Standard formula for 2x2 determinant."]},{id:"m_25",text:"25. The inverse matrix exists only when:",options:["A) detA โ‰  0","B) detA = 0","C) A is rectangular"],correctAnswer:"A",solutionSteps:["A non-zero determinant is required to calculate the inverse (1/detA)."]},{id:"m_28",text:"28. The product of determinants satisfies:",options:["A) det(AB) = detA + detB","B) det(AB) = detA * detB","C) det(AB) = 0"],correctAnswer:"B",solutionSteps:["The determinant of a product is the product of the determinants."]}]},{category:"Systems of Equations",items:[{id:"m_31",text:"31. The matrix form of a system of equations is:",options:["A) A + X = B","B) A * X = B","C) X = A + B"],correctAnswer:"B",solutionSteps:["Coefficient Matrix (A) * Variable Vector (X) = Constant Vector (B)."]},{id:"m_33",text:"33. A Cramer's system has a solution when:",options:["A) detA = 0","B) detA โ‰  0","C) A is rectangular"],correctAnswer:"B",solutionSteps:["Cramer's rule requires dividing by the main determinant W (detA), so it must be non-zero."]},{id:"m_36",text:"36. If W=0 and at least one Wiโ‰ 0, the system:",options:["A) is inconsistent (no solution)","B) has one solution","C) has many solutions"],correctAnswer:"A",solutionSteps:["This represents a contradiction (0 * x = non-zero), so no solution exists."]}]}],d=[{category:"Fundamentals",items:[{id:"s_1",text:"1. A number sequence is:",options:["A) a real function of two variables","B) an assignment of one real number to each natural number","C) an arbitrary set"],correctAnswer:"B",solutionSteps:["A sequence is essentially a function f: N -> R."]},{id:"s_3",text:"3. A sequence that has a finite limit is called:",options:["A) divergent","B) convergent","C) monotonic"],correctAnswer:"B",solutionSteps:["Convergence is defined as approaching a finite limit g."]},{id:"s_8",text:"8. An arithmetic sequence satisfies:",options:["A) a_{n+1} = a_n + r","B) a_{n+1} = a_n * q","C) a_{n+1} = a_n^2 + r"],correctAnswer:"A",solutionSteps:["Terms change by adding a constant difference r."]},{id:"s_9",text:"9. A geometric sequence satisfies:",options:["A) a_{n+1} = a_n + q","B) a_{n+1} = a_n * q","C) a_{n+1} = a_n / q"],correctAnswer:"B",solutionSteps:["Terms change by multiplying by a constant ratio q."]}]},{category:"Limits & Properties",items:[{id:"s_13",text:"13. The number e (Euler's number) is the limit of:",options:["A) (1 + 1/n)^n","B) 1/n","C) sqrt(n)"],correctAnswer:"A",solutionSteps:["Standard definition of e."]},{id:"s_14",text:"14. The sequence a_n = q^n converges to zero when:",options:["A) |q| > 1","B) -1 < q < 1","C) q = 1"],correctAnswer:"B",solutionSteps:["Geometric sequence converges to 0 if the absolute value of the ratio is less than 1."]},{id:"s_15",text:"15. The theorem of three sequences (Squeeze Theorem) states that:",options:["A) if a_n <= b_n <= c_n and lim a_n = lim c_n = g, then lim b_n = g","B) if a_n = b_n + c_n...","C) if a_n > b_n..."],correctAnswer:"A",solutionSteps:["If a sequence is squeezed between two others converging to the same limit, it must also converge to that limit."]}]}],u=[{category:"Domain & Properties",items:[{id:"f_15",text:"15. The domain of ln(x) is:",options:["A) (-โˆž, โˆž)","B) (0, โˆž)","C) (1, โˆž)"],correctAnswer:"B",solutionSteps:["Logarithm is only defined for positive numbers."]},{id:"f_42",text:"42. The function 1/x is undefined for:",options:["A) x = 1","B) x < 0","C) x = 0"],correctAnswer:"C",solutionSteps:["Division by zero is undefined."]},{id:"f_46",text:"46. The function e^x is:",options:["A) A parabola","B) Decreasing","C) Increasing on its entire domain"],correctAnswer:"C",solutionSteps:["Exponential functions with base > 1 are strictly increasing."]}]},{category:"Limits & Asymptotes",items:[{id:"f_12",text:"12. A vertical asymptote means:",options:["A) The limit equals 0","B) The limit exists","C) The limit tends to โˆž or -โˆž"],correctAnswer:"C",solutionSteps:["Function grows unbounded near the asymptote."]},{id:"f_34",text:"34. A function is continuous at a point when:",options:["A) It has no asymptotes","B) It is differentiable","C) The limit equals the function value"],correctAnswer:"C",solutionSteps:["Definition of continuity: lim(x->c) f(x) = f(c)."]},{id:"f_39",text:"39. A horizontal asymptote exists when:",options:["A) The derivative changes sign","B) There is a square in denominator","C) The limit at ยฑโˆž is finite"],correctAnswer:"C",solutionSteps:["If lim(x->inf) f(x) = L, then y=L is a horizontal asymptote."]}]}],f=[{category:"Basic Rules",items:[{id:"d_1",text:"1. The derivative of a constant function equals:",options:["A) A positive constant","B) The same constant","C) 0"],correctAnswer:"C",solutionSteps:["Rate of change of a constant is zero."]},{id:"d_2",text:"2. The derivative of x^a (for a โˆˆ R) equals:",options:["A) x^{a+1}","B) ax^{a+1}","C) ax^{a-1}"],correctAnswer:"C",solutionSteps:["Power Rule: nx^{n-1}."]},{id:"d_8",text:"8. The derivative of a multiplication is:",options:["A) f'g + fg'","B) f'g' - fg'","C) f'g + fg'"],correctAnswer:"A",solutionSteps:["Product Rule: (uv)' = u'v + uv'."]},{id:"d_10",text:"10. The derivative of the composition f(g(x)) is:",options:["A) f(x)g(x)","B) f'g + fg'","C) f'(g(x))g'(x)"],correctAnswer:"C",solutionSteps:["Chain Rule: Outer derivative times inner derivative."]}]},{category:"Analysis & Geometry",items:[{id:"d_5",text:"5. A necessary condition for a local extremum is:",options:["A) f(x)=0","B) The function is increasing","C) f'(x)=0"],correctAnswer:"C",solutionSteps:["Fermat's Theorem: If f has a local extremum and is differentiable, f'(x)=0."]},{id:"d_6",text:"6. If f'(x) > 0, the function is:",options:["A) Constant","B) Decreasing","C) Increasing"],correctAnswer:"C",solutionSteps:["Positive derivative implies growth."]},{id:"d_33",text:"33. The derivative describes:",options:["A) The area under the graph","B) The limit of a function","C) The rate of change"],correctAnswer:"C",solutionSteps:["Instantaneous rate of change or slope."]}]}],g=[{category:"Indefinite Integrals",items:[{id:"i_1",text:"1. An antiderivative of the function f(x) is a function:",options:["A) continuous","B) whose derivative equals f(x)","C) increasing"],correctAnswer:"B",solutionSteps:["F'(x) = f(x)."]},{id:"i_3",text:"3. The integral โˆซ x^a dx for aโ‰ โˆ’1 equals:",options:["A) ln|x|+C","B) x^{a+1}+C","C) 1/(a+1) * x^{a+1} + C"],correctAnswer:"C",solutionSteps:["Power Rule for integration."]},{id:"i_4",text:"4. The integral โˆซ 1/x dx equals:",options:["A) 1/x + C","B) ln|x| + C","C) x + C"],correctAnswer:"B",solutionSteps:["Special case of power rule where n=-1."]},{id:"i_20",text:"20. Integration by parts is based on the formula:",options:["A) (uv)'=u'v'","B) d(uv)=udv+vdu","C) (u+v)'=u'v'"],correctAnswer:"B",solutionSteps:["Derived from the product rule of differentiation."]}]},{category:"Definite Integrals",items:[{id:"i_35",text:"35. A definite integral is a number:",options:["A) always positive","B) dependent on constant C","C) dependent on limits of integration"],correctAnswer:"C",solutionSteps:["It evaluates to a value determined by the function and the interval [a, b]."]},{id:"i_36",text:"36. If F'(x)=f(x), then โˆซ_a^b f(x)dx equals:",options:["A) F(a)-F(b)","B) F(b)-F(a)","C) C"],correctAnswer:"B",solutionSteps:["Newton-Leibniz formula (Fundamental Theorem of Calculus)."]},{id:"i_37",text:"37. The area under the graph of a positive function:",options:["A) is equal to the definite integral","B) is indefinite","C) has no interpretation"],correctAnswer:"A",solutionSteps:["Geometric interpretation of the definite integral."]}]}],w=[{category:"Differential Equations",items:[{id:"de_62",text:"62. A first-order differential equation is:",options:["A) an algebraic equation","B) an equation containing a first derivative","C) a quadratic equation"],correctAnswer:"B",solutionSteps:["Order is determined by the highest derivative present."]},{id:"de_65",text:"65. The equation y'=2y is:",options:["A) linear/separable","B) separable","C) second-order"],correctAnswer:"B",solutionSteps:["Can be written as dy/y = 2dx."]},{id:"de_66",text:"66. The method of separation of variables consists of:",options:["A) changing variable","B) separating y and x onto opposite sides","C) integration by parts"],correctAnswer:"B",solutionSteps:["Group all y terms with dy and x terms with dx."]},{id:"de_69",text:"69. The Malthus model describes:",options:["A) limited growth","B) exponential population growth","C) decline"],correctAnswer:"B",solutionSteps:["Unconstrained growth proportional to population size (y' = ky)."]},{id:"de_71",text:"71. The Verhulst model accounts for:",options:["A) reproduction only","B) limited environmental resources","C) mortality only"],correctAnswer:"B",solutionSteps:["Logistic growth model that introduces a carrying capacity K."]}]}],m=(()=>{switch(i){case n.MATRIX:return l;case n.SEQUENCES:return d;case n.FUNCTIONS:return u;case n.LIMITS:return u.filter(s=>s.category.includes("Limits"));case n.DERIVATIVES:return f;case n.INTEGRALS:return g;case n.DIFF_EQ:return w;default:return[...l,...d]}})(),v=i?i.charAt(0).toUpperCase()+i.slice(1).toLowerCase().replace("_"," "):"General";return e.jsxs("div",{className:"space-y-12 pb-20",children:[e.jsxs("header",{children:[e.jsxs("h2",{className:"text-4xl font-bold text-white mb-4",children:[v," Homework"]}),e.jsx("p",{className:"text-slate-400",children:"Practice problems from the lecture material. Click to reveal step-by-step solutions."})]}),m.length===0?e.jsx("div",{className:"p-8 text-center border border-slate-800 rounded-xl bg-slate-900/50",children:e.jsx("p",{className:"text-slate-500",children:"No exercises available for this specific module view."})}):e.jsx("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-8",children:m.map((s,y)=>e.jsxs("div",{className:"space-y-6",children:[e.jsx("h3",{className:"text-xl font-semibold text-cyan-400 border-b border-slate-800 pb-2",children:s.category}),e.jsx("div",{className:"space-y-4",children:s.items.map(t=>{const o=c===t.id;return e.jsxs(p.div,{initial:{opacity:0,y:10},whileInView:{opacity:1,y:0},className:`group relative rounded-xl border transition-all duration-300 overflow-hidden + ${o?"bg-slate-800 border-cyan-500/50 shadow-lg shadow-cyan-900/20":"bg-slate-800/40 border-slate-700 hover:bg-slate-800/60 hover:border-slate-600"}`,children:[e.jsxs("div",{className:"p-5 cursor-pointer flex justify-between items-start gap-4",onClick:()=>A(t.id),children:[e.jsx("div",{className:"flex-1",children:e.jsxs("div",{className:"text-slate-200 text-sm leading-relaxed",children:[e.jsx("p",{className:"mb-3 font-medium text-base",children:t.text}),t.options&&e.jsx("div",{className:"grid gap-2 pl-2",children:t.options.map((r,a)=>e.jsx("div",{className:`text-slate-400 text-xs ${o&&r.startsWith(t.correctAnswer||"")?"text-emerald-400 font-bold":""}`,children:r},a))})]})}),e.jsx("div",{className:"text-slate-500 hover:text-cyan-400 transition-colors",children:o?e.jsx(I,{}):e.jsx(T,{})})]}),e.jsx(B,{children:o&&e.jsx(p.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.3,ease:"easeInOut"},className:"border-t border-slate-700 bg-slate-900/50",children:e.jsxs("div",{className:"p-5 space-y-4",children:[e.jsxs("div",{className:"flex items-center gap-2 text-emerald-400 font-bold text-xs uppercase tracking-widest",children:[e.jsx(_,{size:14})," Correct Answer: ",t.correctAnswer]}),e.jsx("div",{className:"space-y-3 pl-4 border-l-2 border-slate-600/50",children:t.solutionSteps.map((r,a)=>e.jsx("div",{className:"text-sm text-slate-300",children:e.jsx(b,{expression:r,inline:!0})},a))})]})})})]},t.id)})})]},y))})]})};export{D as HomeworkView}; diff --git a/site/assets/FinalExamView-Bd8W2xqo.js b/site/assets/FinalExamView-Bd8W2xqo.js new file mode 100644 index 0000000..10b6f2b --- /dev/null +++ b/site/assets/FinalExamView-Bd8W2xqo.js @@ -0,0 +1,27 @@ +import{c as C,r,j as e,A as q,m as u,L as re,a as ie,h as ne,i as oe,b as ce,k as de}from"./index-DJrAq1Rk.js";import{C as xe}from"./react-three-fiber.esm-DbvaK_kO.js";import{M as me}from"./MathRenderer-DoWdgGCt.js";import{g as he,q as M,a as pe,B as P,e as U,T as ue,s as fe}from"./examStorage-DURyP8UF.js";import{Z as be}from"./zap-Bss3mUov.js";import{C as ge}from"./chevron-right-KbXem8Tn.js";import{T as je}from"./triangle-alert-7X0SgA5l.js";import{R as ve}from"./refresh-ccw-DTX90cW0.js";import{F as Ne}from"./Float-DkPwlzaD.js";import{_ as we}from"./extends-CF3RwP-h.js";import{S as ye}from"./Stars-m_MGQ0wC.js";import"./constants-Br-Ti-Jl.js";/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ke=[["path",{d:"M5 21v-6",key:"1hz6c0"}],["path",{d:"M12 21V3",key:"1lcnhd"}],["path",{d:"M19 21V9",key:"unv183"}]],Se=C("chart-no-axes-column",ke);/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Me=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],R=C("circle-check-big",Me);/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ze=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],O=C("circle-x",ze);/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Ce=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Ee=C("clock",Ce);function Te(f,x){const n=f+"Geometry";return r.forwardRef(({args:o,children:E,...b},i)=>{const g=r.useRef(null);return r.useImperativeHandle(i,()=>g.current),r.useLayoutEffect(()=>void(x==null?void 0:x(g.current))),r.createElement("mesh",we({ref:g},b),r.createElement(n,{attach:"geometry",args:o}),E)})}const D=Te("icosahedron"),_e=({score:f,total:x})=>{const n=x>0?Math.round(f/x*100):0,o=n>=80?"#10b981":n>=50?"#fbbf24":"#ef4444";return e.jsxs("div",{className:"h-64 w-full rounded-2xl overflow-hidden bg-slate-900 border border-slate-700 relative shadow-2xl",children:[e.jsxs(xe,{camera:{position:[0,0,5]},children:[e.jsx("ambientLight",{intensity:.5}),e.jsx("pointLight",{position:[10,10,10],intensity:1,color:o}),e.jsx(Ne,{speed:2,rotationIntensity:.5,floatIntensity:.5,children:e.jsxs("group",{children:[e.jsx(D,{args:[1.2,0],position:[0,0,0],children:e.jsx("meshStandardMaterial",{color:o,wireframe:!0})}),e.jsx(D,{args:[1,0],position:[0,0,0],children:e.jsx("meshStandardMaterial",{color:o,transparent:!0,opacity:.2})})]})}),e.jsx(ye,{radius:50,count:1e3,factor:4,fade:!0,speed:1})]}),e.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center pointer-events-none",children:[e.jsxs("div",{className:"text-6xl font-black text-white drop-shadow-lg tracking-tighter",children:[n,"%"]}),e.jsxs("div",{className:"text-sm font-mono text-slate-300 bg-slate-900/50 px-3 py-1 rounded-full border border-white/10 backdrop-blur-md mt-2",children:[f," / ",x," Correct"]})]})]})},De=({module:f,examMode:x})=>{const[n,o]=r.useState("MENU"),[E,b]=r.useState("Full Exam"),[i,g]=r.useState([]),[h,Q]=r.useState(0),[T,B]=r.useState(0),[G,_]=r.useState(null),[p,A]=r.useState(!1),[j,F]=r.useState([]),[H,V]=r.useState(0),[K,I]=r.useState(0),m=r.useMemo(()=>{const s=he(),t=[];return Object.values(M).forEach(a=>{a&&t.push(...a)}),t.filter(a=>{const l=s[a.id];if(!l)return!1;const c=pe(l);return l.incorrect>0&&c!=="MASTERED"})},[n]),L=s=>{var l;let t=[];const a=Date.now();if(V(a),I(0),s==="MISTAKES"){if(t=[...m].sort(()=>Math.random()-.5),t.length===0)return;b("Mistake Clinic")}else if(s==="ALL")Object.entries(M).forEach(([c,d])=>{if(d){const S=d.map(le=>({...le,topic:c}));t=[...t,...S]}}),t=t.sort(()=>Math.random()-.5),b("Full Exam");else{t=(M[s]||[]).map(S=>({...S,topic:s})),t=[...t].sort(()=>Math.random()-.5);const d=((l=U.find(S=>S.id===s))==null?void 0:l.label)||"Topic";b(`${d} Exam`)}if(t.length===0){console.log("No questions available in this module yet.");return}g(t),B(0),Q(0),F([]),_(null),A(!1),o("PLAY")},W=s=>{if(p)return;_(s),A(!0);const t=i[h],a=s===t.correct;a?B(l=>l+1):F(l=>[...l,t.id]),fe(t.id,a)},Y=()=>{hs+1),A(!1),_(null)):(I(Date.now()),o("RESULT"))},Z=i.length>0?(h+(p?1:0))/i.length*100:0,v=i[h],X=T,J=j.length,N=s=>{if(!s)return null;const t=s.split("$");return e.jsx("span",{className:"inline-block",children:t.map((a,l)=>l%2===1?e.jsx(me,{expression:a,inline:!0,className:"text-cyan-200 font-bold mx-1"},l):e.jsx("span",{dangerouslySetInnerHTML:{__html:a}},l))})},$=K-H,ee=Math.floor($/6e4),te=Math.floor($%6e4/1e3),se=`${ee}m ${te}s`,ae=i.length>0?($/i.length/1e3).toFixed(1):"0",z=i.length>0?T/i.length*100:0;let w="F",y="text-red-500";z>=90?(w="S",y="text-transparent bg-clip-text bg-gradient-to-r from-cyan-400 to-purple-400"):z>=80?(w="A",y="text-emerald-400"):z>=70?(w="B",y="text-blue-400"):z>=60&&(w="C",y="text-orange-400");const k={};return i.forEach(s=>{const t=s.topic||"General";k[t]||(k[t]={total:0,correct:0}),k[t].total++,j.includes(s.id)||k[t].correct++}),e.jsx("div",{className:"min-h-[80vh] flex flex-col pb-20 max-w-3xl mx-auto w-full",children:e.jsxs(q,{mode:"wait",children:[n==="MENU"&&e.jsxs(u.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},className:"flex flex-col items-center flex-1 p-6",children:[e.jsxs("div",{className:"flex flex-col items-center text-center mb-10 w-full",children:[e.jsx("div",{className:"w-20 h-20 rounded-2xl bg-gradient-to-tr from-cyan-500 to-blue-600 flex items-center justify-center shadow-lg shadow-cyan-500/20 mb-6 text-white transform hover:scale-105 transition-transform duration-300",children:e.jsx(P,{size:42,strokeWidth:1.5})}),e.jsx("h1",{className:"text-3xl md:text-4xl font-black text-white mb-3 tracking-tight",children:"Examination Hall"}),e.jsx("p",{className:"text-slate-400 text-sm max-w-xs mx-auto leading-relaxed",children:"Choose your challenge level. Regular practice adapts to your performance."})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mb-12 w-full",children:[e.jsxs("button",{onClick:()=>L("ALL"),className:"group relative overflow-hidden rounded-3xl p-[1px] transition-all hover:scale-[1.02] active:scale-[0.98] shadow-2xl shadow-purple-900/20",children:[e.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-cyan-400 via-purple-500 to-pink-500 opacity-70 group-hover:opacity-100 transition-opacity animate-gradient-xy"}),e.jsxs("div",{className:"relative h-full bg-[#0B1121] rounded-[23px] p-6 flex flex-col justify-between overflow-hidden min-h-[140px]",children:[e.jsx("div",{className:"absolute right-0 top-0 w-32 h-32 bg-purple-500/10 blur-3xl rounded-full -translate-y-1/2 translate-x-1/2 pointer-events-none"}),e.jsx("div",{className:"flex justify-between items-start mb-4 relative z-10",children:e.jsx("div",{className:"w-12 h-12 rounded-xl bg-gradient-to-br from-cyan-500/20 to-purple-500/20 flex items-center justify-center text-cyan-200 border border-white/5 backdrop-blur-sm",children:e.jsx(re,{size:24})})}),e.jsxs("div",{className:"relative z-10 text-left",children:[e.jsx("h3",{className:"text-lg font-bold text-white mb-1 group-hover:text-cyan-200 transition-colors",children:"Full Exam"}),e.jsx("p",{className:"text-xs text-slate-400 font-medium",children:"All topics. The ultimate test."})]})]})]}),e.jsxs("button",{onClick:()=>L("MISTAKES"),disabled:m.length===0,className:`group relative overflow-hidden rounded-3xl p-[1px] transition-all duration-300 ${m.length>0?"hover:scale-[1.02] active:scale-[0.98] shadow-2xl shadow-amber-900/20":"opacity-60 cursor-not-allowed"}`,children:[e.jsx("div",{className:`absolute inset-0 bg-gradient-to-r from-amber-400 via-red-500 to-orange-500 opacity-70 ${m.length>0?"group-hover:opacity-100 animate-gradient-xy":""}`}),e.jsxs("div",{className:"relative h-full bg-[#0B1121] rounded-[23px] p-6 flex flex-col justify-between overflow-hidden min-h-[140px]",children:[e.jsx("div",{className:"absolute right-0 top-0 w-32 h-32 bg-orange-500/10 blur-3xl rounded-full -translate-y-1/2 translate-x-1/2 pointer-events-none"}),e.jsxs("div",{className:"flex justify-between items-start mb-4 relative z-10",children:[e.jsx("div",{className:"w-12 h-12 rounded-xl bg-gradient-to-br from-amber-500/20 to-red-500/20 flex items-center justify-center text-amber-400 border border-amber-500/20",children:e.jsx(be,{size:24})}),m.length>0&&e.jsxs("div",{className:"bg-red-500 text-white text-[10px] font-bold px-2 py-1 rounded-full animate-pulse shadow-lg shadow-red-500/30",children:[m.length," Issues"]})]}),e.jsxs("div",{className:"relative z-10 text-left",children:[e.jsx("h3",{className:"text-lg font-bold text-white mb-1 group-hover:text-amber-200 transition-colors",children:"Mistake Clinic"}),e.jsx("p",{className:"text-xs text-slate-400 font-medium",children:m.length>0?"Targeted practice on weak spots.":"No mistakes pending. Great job!"})]})]})]})]}),e.jsxs("div",{className:"w-full",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-5 px-1",children:[e.jsx(ie,{size:16,className:"text-slate-500"}),e.jsx("span",{className:"text-xs font-bold text-slate-500 uppercase tracking-widest",children:"Topic Drills"})]}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:U.map(s=>{var t;return e.jsxs("button",{onClick:()=>L(s.id),className:"flex items-center gap-4 p-4 rounded-2xl border border-white/5 bg-slate-900/40 hover:bg-slate-800 hover:border-white/10 transition-all group text-left relative overflow-hidden",children:[e.jsx("div",{className:`w-12 h-12 rounded-xl flex items-center justify-center ${s.bg} ${s.color} transition-transform group-hover:scale-110`,children:e.jsx(s.icon,{size:22})}),e.jsxs("div",{className:"relative z-10 flex-1",children:[e.jsx("div",{className:"font-bold text-sm text-slate-200 group-hover:text-white mb-0.5",children:s.label}),e.jsx("div",{className:"text-[10px] text-slate-500 font-medium group-hover:text-slate-400",children:"Subject Drill"})]}),!M[s.id]||((t=M[s.id])==null?void 0:t.length)===0?e.jsx(ne,{size:16,className:"text-slate-700"}):e.jsx(ge,{size:16,className:"text-slate-600 opacity-0 group-hover:opacity-100 transition-all -translate-x-2 group-hover:translate-x-0"})]},s.id)})})]})]},"menu"),n==="PLAY"&&v&&e.jsxs(u.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"flex flex-col h-full w-full max-w-2xl mx-auto",children:[e.jsx("div",{className:"md:hidden w-full mb-4",children:e.jsxs("button",{onClick:()=>o("MENU"),className:"flex items-center gap-2 text-slate-500 hover:text-white transition-colors active:scale-95",children:[e.jsx(oe,{size:18}),e.jsx("span",{className:"text-xs font-bold uppercase tracking-widest",children:"Quit Exam"})]})}),e.jsxs("div",{className:"mb-8 w-full",children:[e.jsxs("div",{className:"flex justify-between items-end mb-4",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-[10px] font-bold text-slate-500 uppercase tracking-widest mb-1",children:E}),e.jsxs("div",{className:"flex items-baseline gap-2",children:[e.jsx("span",{className:"text-4xl font-black text-white tracking-tighter",children:(h+1).toString().padStart(2,"0")}),e.jsxs("span",{className:"text-sm font-bold text-slate-600",children:["/ ",i.length]})]})]}),e.jsxs("div",{className:"flex items-center bg-slate-900/80 border border-slate-800 rounded-2xl p-1.5 backdrop-blur-md shadow-lg",children:[e.jsxs("div",{className:"flex items-center gap-2 px-3 border-r border-slate-800",children:[e.jsx(R,{size:16,className:"text-emerald-500"}),e.jsx("span",{className:"text-base font-black text-white font-mono",children:X})]}),e.jsxs("div",{className:"flex items-center gap-2 px-3",children:[e.jsx(O,{size:16,className:"text-red-500"}),e.jsx("span",{className:"text-base font-black text-white font-mono",children:J})]})]})]}),e.jsx("div",{className:"relative h-2 w-full bg-slate-800 rounded-full overflow-hidden",children:e.jsx(u.div,{className:"absolute top-0 left-0 bottom-0 bg-gradient-to-r from-cyan-400 to-blue-600 shadow-[0_0_15px_rgba(34,211,238,0.4)]",initial:{width:0},animate:{width:`${Z}%`},transition:{type:"spring",stiffness:50,damping:20},children:e.jsx("div",{className:"absolute inset-0 bg-white/20 animate-pulse"})})})]}),e.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto pb-32 md:pb-0 custom-scrollbar px-1",children:e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"bg-gradient-to-b from-slate-800/60 to-slate-900/60 border border-white/10 p-6 md:p-8 rounded-3xl text-center shadow-xl relative overflow-hidden group",children:[e.jsx("div",{className:"absolute inset-0 bg-cyan-500/5 opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none"}),e.jsx("div",{className:"absolute top-0 left-0 right-0 h-px bg-gradient-to-r from-transparent via-cyan-500/50 to-transparent opacity-50"}),e.jsx("h3",{className:"text-lg md:text-2xl font-bold text-slate-100 leading-snug relative z-10",children:N(v.text)})]}),e.jsx("div",{className:"grid gap-3",children:v.options.map(s=>{const t=G===s.key,a=s.key===v.correct,l=p;let c="bg-slate-900/40 border-slate-800 text-slate-400 hover:bg-slate-800 hover:border-slate-600 hover:text-slate-200",d=null;return l?a?(c="bg-emerald-500/10 border-emerald-500/50 text-emerald-100 shadow-[0_0_15px_rgba(16,185,129,0.1)]",d=e.jsx(R,{size:20,className:"text-emerald-400 shrink-0 drop-shadow-md"})):t&&!a?(c="bg-red-500/10 border-red-500/50 text-red-100 shadow-[0_0_15px_rgba(239,68,68,0.1)]",d=e.jsx(O,{size:20,className:"text-red-400 shrink-0 drop-shadow-md"})):c="opacity-40 grayscale border-transparent bg-transparent":t&&(c="bg-cyan-600 border-cyan-500 text-white shadow-lg shadow-cyan-500/30 scale-[1.02]"),e.jsxs("button",{onClick:()=>W(s.key),disabled:p,className:` + w-full p-4 rounded-2xl border text-left font-medium text-sm md:text-lg transition-all duration-200 flex items-center justify-between group + ${c} ${p?"":"active:scale-[0.98]"} + `,children:[e.jsxs("span",{className:"flex items-center gap-4",children:[e.jsx("span",{className:` + w-8 h-8 rounded-lg flex items-center justify-center text-xs font-bold shadow-inner + ${l&&a?"bg-emerald-500 text-white":l&&t?"bg-red-500 text-white":t?"bg-white text-cyan-600":"bg-slate-950 border border-slate-800 text-slate-500 group-hover:text-white group-hover:border-slate-600"} + `,children:s.key}),e.jsx("span",{className:"leading-snug",children:N(s.text)})]}),d]},s.key)})})]})}),e.jsx(q,{children:p&&e.jsx(u.div,{initial:{y:20,opacity:0},animate:{y:0,opacity:1},exit:{y:20,opacity:0},transition:{type:"spring",stiffness:300,damping:30},className:"fixed bottom-0 left-0 right-0 p-4 z-50 md:static md:p-0 md:mt-8 bg-[#020617]/90 backdrop-blur-lg md:bg-transparent border-t border-slate-800 md:border-0",children:e.jsxs("div",{className:"max-w-2xl mx-auto space-y-4",children:[e.jsxs("div",{className:"bg-slate-900/80 border border-slate-800 rounded-2xl p-4 flex gap-4 items-start shadow-xl relative overflow-hidden",children:[e.jsx("div",{className:"absolute top-0 left-0 w-1 h-full bg-amber-500"}),e.jsx("div",{className:"p-2 bg-amber-500/10 rounded-xl text-amber-400 shrink-0",children:e.jsx(P,{size:20})}),e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"text-[10px] font-bold text-amber-500 uppercase tracking-widest flex items-center gap-2",children:[e.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-amber-500 animate-pulse"}),"Logic Breakdown"]}),e.jsx("p",{className:"text-sm text-slate-300 leading-relaxed font-medium",children:N(v.explanation||"")})]})]}),e.jsxs("button",{onClick:Y,className:"w-full py-4 bg-gradient-to-r from-cyan-600 to-blue-600 hover:from-cyan-500 hover:to-blue-500 text-white rounded-2xl font-bold shadow-lg shadow-cyan-900/20 flex items-center justify-center gap-3 text-sm uppercase tracking-widest transition-all active:scale-[0.98] group",children:[h{const a=Math.round(t.correct/t.total*100),l=s.charAt(0).toUpperCase()+s.slice(1).toLowerCase().replace("_"," ");return e.jsxs("div",{children:[e.jsxs("div",{className:"flex justify-between items-end mb-1",children:[e.jsx("span",{className:"text-sm font-medium text-slate-300",children:l}),e.jsxs("div",{className:"flex gap-2 text-xs",children:[e.jsxs("span",{className:"text-slate-500",children:[t.correct,"/",t.total]}),e.jsxs("span",{className:a>70?"text-emerald-400":a>40?"text-amber-400":"text-red-400",children:[a,"%"]})]})]}),e.jsx("div",{className:"h-1.5 w-full bg-slate-800 rounded-full overflow-hidden",children:e.jsx(u.div,{initial:{width:0},animate:{width:`${a}%`},className:`h-full rounded-full ${a>70?"bg-emerald-500":a>40?"bg-amber-500":"bg-red-500"}`})})]},s)})})]}),j.length>0&&e.jsxs("div",{className:"w-full",children:[e.jsxs("h3",{className:"text-sm font-bold text-slate-400 uppercase tracking-widest mb-4 flex items-center gap-2",children:[e.jsx(je,{size:16})," Review Mistakes (",j.length,")"]}),e.jsx("div",{className:"space-y-3 max-h-60 overflow-y-auto custom-scrollbar pr-2",children:j.map(s=>{var a;const t=i.find(l=>l.id===s);return t?e.jsxs("div",{className:"bg-slate-900/80 p-4 rounded-xl border border-red-500/20 border-l-4 border-l-red-500",children:[e.jsx("div",{className:"text-sm text-white font-medium mb-2",children:N(t.text)}),e.jsxs("div",{className:"text-xs text-slate-400 bg-slate-950 p-2 rounded flex items-center gap-2",children:[e.jsx(R,{size:12,className:"text-emerald-500"}),"Correct: ",N(((a=t.options.find(l=>l.key===t.correct))==null?void 0:a.text)||"")]})]},s):null})})]}),e.jsx("div",{className:"flex gap-4 w-full pt-4",children:e.jsxs("button",{onClick:()=>o("MENU"),className:"flex-1 py-4 bg-slate-800 hover:bg-slate-700 text-white rounded-2xl font-bold flex items-center justify-center gap-2 transition-colors",children:[e.jsx(ve,{size:18})," Back to Menu"]})})]},"result")]})})};export{De as FinalExamView}; diff --git a/site/assets/Float-DkPwlzaD.js b/site/assets/Float-DkPwlzaD.js new file mode 100644 index 0000000..63421c7 --- /dev/null +++ b/site/assets/Float-DkPwlzaD.js @@ -0,0 +1 @@ +import{r as t}from"./index-DJrAq1Rk.js";import{u as h,M as x}from"./react-three-fiber.esm-DbvaK_kO.js";const R=t.forwardRef(({children:s,enabled:f=!0,speed:e=1,rotationIntensity:n=1,floatIntensity:m=1,floatingRange:a=[-.1,.1],autoInvalidate:p=!1,...M},d)=>{const r=t.useRef(null);t.useImperativeHandle(d,()=>r.current,[]);const v=t.useRef(Math.random()*1e4);return h(c=>{var u,i;if(!f||e===0)return;p&&c.invalidate();const o=v.current+c.clock.getElapsedTime();r.current.rotation.x=Math.cos(o/4*e)/8*n,r.current.rotation.y=Math.sin(o/4*e)/8*n,r.current.rotation.z=Math.sin(o/4*e)/20*n;let l=Math.sin(o/4*e)/10;l=x.mapLinear(l,-.1,.1,(u=a==null?void 0:a[0])!==null&&u!==void 0?u:-.1,(i=a==null?void 0:a[1])!==null&&i!==void 0?i:.1),r.current.position.y=l*m,r.current.updateMatrix()}),t.createElement("group",M,t.createElement("group",{ref:r,matrixAutoUpdate:!1},s))});export{R as F}; diff --git a/site/assets/FunctionAnalysisView-BppRFCo9.js b/site/assets/FunctionAnalysisView-BppRFCo9.js new file mode 100644 index 0000000..45bc342 --- /dev/null +++ b/site/assets/FunctionAnalysisView-BppRFCo9.js @@ -0,0 +1,11 @@ +import{c as R,u as $,r as h,j as e,g as L,m as H,q as U}from"./index-DJrAq1Rk.js";import{W as B}from"./WolframHelper-C3f14kAl.js";import{p as T,d as V}from"./impureFunctionsAny.generated-DwS8eMcc.js";import"./chevron-right-KbXem8Tn.js";import"./extends-CF3RwP-h.js";/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const q=[["path",{d:"m7 7 10 10",key:"1fmybs"}],["path",{d:"M17 7v10H7",key:"6fjiku"}]],J=R("arrow-down-right",q);/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Z=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14",key:"1vmskp"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]],G=R("zoom-in",Z),se=()=>{const[j,P]=$("analysis_input","x^3 + 3x^2 - 9x - 2"),[n,F]=h.useState(null),w=h.useRef(null),[x,z]=h.useState({f:null,df:null,dfStr:"",error:!1}),[s,X]=$("analysis_domain",{x:[-10,10],y:[-20,20]}),[N,k]=h.useState(!1),M=h.useRef({x:0,y:0}),d=h.useRef({x:[-10,10],y:[-20,20]}),y=800,g=400,m=t=>(t-s.x[0])/(s.x[1]-s.x[0])*y,u=t=>g-(t-s.y[0])/(s.y[1]-s.y[0])*g,W=t=>s.x[0]+t/y*(s.x[1]-s.x[0]);h.useEffect(()=>{try{const t=T(j),r=t.compile(),o=V(t,"x"),a=o.compile();z({f:r,df:a,dfStr:o.toString(),error:!1})}catch{z(r=>({...r,error:!0}))}},[j]);const S=t=>{try{return x.f?x.f.evaluate({x:t}):0}catch{return 0}},p=t=>{try{return x.df?x.df.evaluate({x:t}):0}catch{return 0}},D=h.useMemo(()=>{if(x.error||!x.df)return[];const t=[],o=(s.x[1]-s.x[0])/500;let a=p(s.x[0]);for(let l=s.x[0];l<=s.x[1];l+=o){const c=p(l);if(a>0&&c<0||a<0&&c>0){const i=l-o/2,f=S(i);t.push({x:i,y:f,type:a>0?"max":"min"})}a=c}return t},[x,s.x]),Y=()=>{if(x.error)return"";let t="";const r=s.x[1]-s.x[0],o=r/800;let a=!1;const l=s.x[0]-r*.1,c=s.x[1]+r*.1;for(let i=l;i<=c;i+=o){const f=S(i);if(isNaN(f)||Math.abs(f)>Math.max(Math.abs(s.y[0]),Math.abs(s.y[1]))*10){a=!1;continue}const b=m(i),v=u(f);a?t+=` L ${b} ${v}`:(t+=`M ${b} ${v}`,a=!0)}return t},A=t=>{t.preventDefault();const r=t.deltaY>0?1.1:.9,o=s.x[1]-s.x[0],a=s.y[1]-s.y[0],l=(s.x[0]+s.x[1])/2,c=(s.y[0]+s.y[1])/2;X({x:[l-o*r/2,l+o*r/2],y:[c-a*r/2,c+a*r/2]})},C=t=>{k(!0),M.current={x:t.clientX,y:t.clientY},d.current=s},I=t=>{if(N){const l=t.clientX-M.current.x,c=t.clientY-M.current.y,i=d.current.x[1]-d.current.x[0],f=d.current.y[1]-d.current.y[0],b=-(l/y)*i,v=c/g*f;X({x:[d.current.x[0]+b,d.current.x[1]+b],y:[d.current.y[0]+v,d.current.y[1]+v]});return}if(!w.current)return;const r=w.current.getBoundingClientRect(),o=t.clientX-r.left,a=W(o);F({x:a,y:S(a)})},_=()=>{k(!1)},E=()=>{if(!n)return null;const t=p(n.x),o=(s.x[1]-s.x[0])*.15,a=n.x-o,l=n.y-t*o,c=n.x+o,i=n.y+t*o;return e.jsx("line",{x1:m(a),y1:u(l),x2:m(c),y2:u(i),stroke:"#fbbf24",strokeWidth:"2",strokeDasharray:"4 4"})};return e.jsxs("div",{className:"space-y-8 pb-20",children:[e.jsxs("header",{className:"mb-8",children:[e.jsx("h2",{className:"text-4xl font-bold text-white mb-4",children:"Function Analysis"}),e.jsx("p",{className:"text-slate-400 max-w-3xl",children:"Interactive graph. Scroll to zoom, drag to pan. Analyze extrema and derivatives."})]}),e.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-3 gap-8",children:[e.jsxs("div",{className:"xl:col-span-2 bg-slate-900 rounded-2xl border border-slate-700 relative overflow-hidden shadow-2xl group min-h-[400px] flex flex-col",children:[e.jsx("div",{className:"absolute inset-0 bg-[url('https://grainy-gradients.vercel.app/noise.svg')] opacity-5 pointer-events-none"}),e.jsxs("div",{className:"p-4 border-b border-slate-800 flex flex-col sm:flex-row justify-between items-start sm:items-center bg-slate-900/80 backdrop-blur z-10 relative gap-4",children:[e.jsxs("div",{className:"flex items-center gap-4 w-full sm:w-auto",children:[e.jsx("span",{className:"text-slate-400 text-sm font-bold",children:"f(x) ="}),e.jsx("input",{type:"text",value:j,onChange:t=>P(t.target.value),className:"bg-slate-950 border border-slate-700 text-white px-3 py-1 rounded-lg font-mono text-sm focus:border-cyan-500 outline-none w-full sm:w-64"})]}),e.jsxs("div",{className:"flex gap-4 text-xs font-mono shrink-0 items-center",children:[e.jsxs("span",{className:"text-cyan-400 flex items-center gap-1",children:[e.jsx("div",{className:"w-2 h-2 bg-cyan-400 rounded-full"})," Curve"]}),e.jsxs("span",{className:"text-amber-400 flex items-center gap-1",children:[e.jsx("div",{className:"w-2 h-2 bg-amber-400 rounded-full"})," Tangent"]}),e.jsxs("span",{className:"text-slate-500 flex items-center gap-1",children:[e.jsx(L,{size:12})," Drag"]}),e.jsxs("span",{className:"text-slate-500 flex items-center gap-1",children:[e.jsx(G,{size:12})," Scroll"]})]})]}),e.jsxs("div",{className:`relative flex-1 w-full ${N?"cursor-grabbing":"cursor-crosshair"} touch-none`,style:{touchAction:"none"},onWheel:A,onMouseDown:C,onMouseMove:I,onMouseUp:_,onMouseLeave:()=>{F(null),k(!1)},children:[e.jsxs("svg",{ref:w,viewBox:`0 0 ${y} ${g}`,className:"w-full h-full overflow-visible select-none",children:[s.y[0]<0&&s.y[1]>0&&e.jsx("line",{x1:0,y1:u(0),x2:y,y2:u(0),stroke:"#475569",strokeWidth:"1"}),s.x[0]<0&&s.x[1]>0&&e.jsx("line",{x1:m(0),y1:0,x2:m(0),y2:g,stroke:"#475569",strokeWidth:"1"}),[Math.round(s.x[0]),0,Math.round(s.x[1])].map(t=>e.jsx("text",{x:m(t)+4,y:g-6,fill:"#64748b",fontSize:"10",fontFamily:"monospace",children:t},`x-${t}`)),[Math.round(s.y[0]),0,Math.round(s.y[1])].map(t=>e.jsx("text",{x:4,y:u(t)-4,fill:"#64748b",fontSize:"10",fontFamily:"monospace",children:t},`y-${t}`)),e.jsx(H.path,{d:Y(),fill:"none",stroke:"#22d3ee",strokeWidth:"2.5"}),n&&!N&&e.jsxs(e.Fragment,{children:[E(),e.jsx("circle",{cx:m(n.x),cy:u(n.y),r:"4",fill:"#fbbf24"})]}),D.map((t,r)=>e.jsx("g",{children:e.jsx("circle",{cx:m(t.x),cy:u(t.y),r:"5",className:"fill-pink-500 stroke-white stroke-2"})},r))]}),n&&!N&&e.jsxs("div",{className:"absolute pointer-events-none bg-slate-800/90 text-white text-xs p-3 rounded-lg border border-amber-500/50 shadow-xl font-mono whitespace-nowrap z-20 backdrop-blur-md",style:{left:Math.min(m(n.x)+10,y-150),top:Math.max(u(n.y)-80,10)},children:[e.jsxs("div",{className:"mb-1",children:["x: ",e.jsx("span",{className:"text-slate-300",children:n.x.toFixed(2)})]}),e.jsxs("div",{className:"mb-1",children:["y: ",e.jsx("span",{className:"text-cyan-300",children:n.y.toFixed(2)})]}),e.jsxs("div",{children:["m: ",e.jsx("span",{className:"text-amber-400 font-bold",children:p(n.x).toFixed(2)})]})]})]})]}),e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"bg-slate-800/50 p-6 rounded-2xl border border-slate-700 backdrop-blur-md",children:[e.jsx("h4",{className:"text-xs font-bold text-slate-500 uppercase tracking-widest mb-4",children:"Derivative Calculation"}),e.jsxs("div",{className:"bg-slate-900 p-4 rounded-xl border border-slate-800 mb-4",children:[e.jsxs("div",{className:"text-xs text-slate-500 mb-1 font-mono",children:["f'(x) = d/dx[",j,"]"]}),e.jsx("div",{className:"text-lg text-pink-400 font-mono break-all",children:x.dfStr||"Computing..."})]}),n?e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex justify-between items-center pt-2 border-t border-slate-700",children:[e.jsxs("span",{className:"text-slate-400 text-sm",children:["Slope at x=",n.x.toFixed(1)]}),e.jsx("span",{className:`font-mono font-bold ${p(n.x)>0?"text-green-400":"text-red-400"}`,children:p(n.x).toFixed(3)})]}),e.jsx("div",{className:"text-xs text-right text-slate-500",children:p(n.x)>0?"Function is Increasing":"Function is Decreasing"})]}):e.jsx("div",{className:"text-center text-slate-500 py-2 text-sm",children:"Hover over graph to evaluate"})]}),e.jsxs("div",{className:"bg-slate-800/50 p-6 rounded-2xl border border-slate-700 backdrop-blur-md",children:[e.jsx("h4",{className:"text-xs font-bold text-slate-500 uppercase tracking-widest mb-4",children:"Detected Extrema in View"}),D.length>0?e.jsx("div",{className:"space-y-3 max-h-[200px] overflow-y-auto pr-2 custom-scrollbar",children:D.map((t,r)=>e.jsxs("div",{className:"flex items-center justify-between bg-slate-900/50 p-3 rounded-lg border border-slate-800",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:`p-2 rounded-md ${t.type==="max"?"bg-green-500/10 text-green-400":"bg-red-500/10 text-red-400"}`,children:t.type==="max"?e.jsx(U,{size:16}):e.jsx(J,{size:16})}),e.jsxs("div",{children:[e.jsxs("div",{className:"text-xs font-bold text-slate-300 uppercase",children:[t.type,"imum"]}),e.jsxs("div",{className:"text-[10px] text-slate-500 font-mono",children:["at x โ‰ˆ ",t.x.toFixed(2)]})]})]}),e.jsx("div",{className:"text-right font-mono text-sm text-cyan-400",children:t.y.toFixed(2)})]},r))}):e.jsx("div",{className:"text-center py-6 text-slate-500 text-sm bg-slate-900/30 rounded-xl border border-slate-800/50 border-dashed",children:"No critical points found in view range."})]}),e.jsx("div",{className:"text-[10px] text-slate-600 text-center",children:"Powered by MathJS Symbolic Differentiation"})]})]}),e.jsx(B,{context:"analysis"})]})};export{se as FunctionAnalysisView}; diff --git a/site/assets/FunctionsView-CURlAo-G.js b/site/assets/FunctionsView-CURlAo-G.js new file mode 100644 index 0000000..06c2b66 --- /dev/null +++ b/site/assets/FunctionsView-CURlAo-G.js @@ -0,0 +1,8 @@ +import{c as K,u as S,r as p,j as e,C as O,d as Q,f as ee,g as te,m as C,A as se}from"./index-DJrAq1Rk.js";import{W as ae}from"./WolframHelper-C3f14kAl.js";import{M as ne}from"./mouse-pointer-2-CKfMob4f.js";import{c as R}from"./impureFunctionsAny.generated-DwS8eMcc.js";import"./chevron-right-KbXem8Tn.js";import"./extends-CF3RwP-h.js";/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const re=[["path",{d:"M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18",key:"gugj83"}]],le=K("table-2",re),me=()=>{const[m,$]=S("func_input","1/x"),[u,A]=S("func_limit_pt","0"),[w,z]=p.useState(null),[k,E]=p.useState(!1),[s,D]=S("func_domain",{x:[-8,8],y:[-6,6]}),[y,M]=p.useState(!1),F=p.useRef({x:0,y:0}),x=p.useRef({x:[-8,8],y:[-6,6]}),P=p.useRef(null),[r,X]=p.useState(null),_=[{label:"Rational",expr:"(x - 1) / (x^2 - 4)"},{label:"Semi-circle",expr:"2 * sqrt(1 - x^2)"},{label:"Polynomial",expr:"x^2 - 1"},{label:"Trig",expr:"sin(x) + cos(2x)"}];let g=null;try{g=R(m)}catch{}const j=t=>{try{if(!g)return NaN;const a=g.evaluate({x:t});return typeof a=="number"?a:NaN}catch{return NaN}},f=800,h=500,c=t=>(t-s.x[0])/(s.x[1]-s.x[0])*f,d=t=>h-(t-s.y[0])/(s.y[1]-s.y[0])*h,I=t=>s.x[0]+t/f*(s.x[1]-s.x[0]),T=(()=>{if(!g)return[];const t=[];let a="";const n=s.x[1]-s.x[0],i=n/1e3;let o=!1,l=NaN;const N=s.x[0]-n*.1,U=s.x[1]+n*.1;for(let v=N;v<=U;v+=i){const b=j(v),q=isNaN(b)||!isFinite(b),G=s.y[1]-s.y[0],J=!isNaN(l)&&Math.abs(b-l)>G*1.5;if(q||J){o&&(t.push(a),a="",o=!1),l=b;continue}const L=c(v),Z=Math.max(Math.min(b,s.y[1]*5),s.y[0]*5),W=d(Z);o?a+=`L ${L} ${W} `:(a=`M ${L} ${W} `,o=!0),l=b}return a&&t.push(a),t})(),Y=(t,a)=>{try{const n=parseFloat(t);if(isNaN(n))return"N/A";const i=1e-4,o=a==="left"?n-i:n+i,l=j(o);return l>1e3?"+โˆž":l<-1e3?"-โˆž":isNaN(l)?"Undef":Math.abs(l)<.001?"0":l.toFixed(3)}catch{return"Err"}},H=t=>{t.preventDefault();const a=t.deltaY>0?1.1:.9,n=s.x[1]-s.x[0],i=s.y[1]-s.y[0],o=(s.x[0]+s.x[1])/2,l=(s.y[0]+s.y[1])/2;D({x:[o-n*a/2,o+n*a/2],y:[l-i*a/2,l+i*a/2]})},V=t=>{M(!0),F.current={x:t.clientX,y:t.clientY},x.current=s},B=t=>{if(y){const a=t.clientX-F.current.x,n=t.clientY-F.current.y,i=x.current.x[1]-x.current.x[0],o=x.current.y[1]-x.current.y[0],l=-(a/f)*i,N=n/h*o;D({x:[x.current.x[0]+l,x.current.x[1]+l],y:[x.current.y[0]+N,x.current.y[1]+N]})}else if(P.current){const a=P.current.getBoundingClientRect(),n=t.clientX-a.left,i=I(n),o=j(i);X({x:i,y:o})}};return p.useEffect(()=>{try{R(m),z(null)}catch{z("Invalid Syntax")}},[m]),e.jsxs("div",{className:"space-y-8 pb-20",children:[e.jsxs("header",{className:"flex flex-col md:flex-row justify-between items-start md:items-end border-b border-white/10 pb-6 gap-6",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-4xl font-black text-white mb-2 tracking-tight",children:"Function Grapher"}),e.jsxs("p",{className:"text-slate-400 max-w-2xl font-light text-base",children:["Visualize ",e.jsx("span",{className:"font-mono text-cyan-400",children:"y = f(x)"})," with automatic asymptote detection and limit analysis."]})]}),e.jsx("div",{className:"bg-slate-900/80 backdrop-blur border border-white/10 px-4 py-2 rounded-lg text-slate-400 font-mono text-xs uppercase tracking-widest",children:"Math.js Engine"})]}),e.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-12 gap-8",children:[e.jsxs("div",{className:"xl:col-span-4 space-y-6",children:[e.jsxs("div",{className:"glass-panel p-6 rounded-3xl backdrop-blur-md",children:[e.jsxs("h3",{className:"text-xs font-bold text-slate-400 uppercase tracking-widest mb-4 flex items-center gap-2",children:[e.jsx(O,{size:16,className:"text-purple-400"})," Expression"]}),e.jsxs("div",{className:"relative mb-6",children:[e.jsx("div",{className:"absolute left-4 top-1/2 -translate-y-1/2 text-purple-400 font-serif italic font-bold text-lg pointer-events-none",children:"f(x) ="}),e.jsx("input",{type:"text",value:m,onChange:t=>$(t.target.value),className:`w-full bg-slate-950 border ${w?"border-pink-500 shadow-pink-500/20 shadow-lg":"border-slate-800"} rounded-2xl py-4 pl-16 pr-4 text-white focus:border-cyan-500 outline-none font-mono text-base transition-all`,placeholder:"e.g. x^2 + 2x"}),w&&e.jsx("span",{className:"absolute right-4 top-1/2 -translate-y-1/2 text-[10px] text-pink-400 font-bold uppercase tracking-wider bg-pink-500/10 px-2 py-1 rounded",children:w})]}),e.jsx("div",{className:"flex flex-wrap gap-2",children:_.map(t=>e.jsx("button",{onClick:()=>$(t.expr),className:`px-3 py-1.5 rounded-lg border font-mono text-xs transition-all + ${m===t.expr?"bg-cyan-500/20 border-cyan-500/50 text-cyan-300":"bg-slate-900/50 border-slate-800 text-slate-400 hover:bg-slate-800"} + `,children:t.label},t.label))})]}),e.jsxs("div",{className:"glass-panel p-6 rounded-3xl",children:[e.jsxs("h3",{className:"text-xs font-bold text-slate-400 uppercase tracking-widest mb-4 flex items-center gap-2",children:[e.jsx(Q,{size:16,className:"text-pink-400"})," Limit Scanner"]}),e.jsxs("div",{className:"bg-slate-950/50 p-5 rounded-2xl border border-white/5",children:[e.jsxs("div",{className:"flex justify-between items-center mb-4 pb-4 border-b border-white/5",children:[e.jsx("p",{className:"text-xs text-slate-400 uppercase tracking-wider font-bold",children:"Target Point (a)"}),e.jsx("input",{type:"text",value:u,onChange:t=>A(t.target.value),className:"w-20 bg-slate-900 border border-slate-700 rounded-lg px-3 py-1 text-right font-mono text-white focus:border-pink-500 outline-none"})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"bg-slate-900 p-4 rounded-xl border border-slate-800 text-center",children:[e.jsx("div",{className:"text-[10px] text-slate-500 mb-2 font-mono uppercase tracking-widest",children:"Left Limit (xโ†’aโป)"}),e.jsx("div",{className:"font-mono font-bold text-xl text-white",children:Y(u,"left")})]}),e.jsxs("div",{className:"bg-slate-900 p-4 rounded-xl border border-slate-800 text-center",children:[e.jsx("div",{className:"text-[10px] text-slate-500 mb-2 font-mono uppercase tracking-widest",children:"Right Limit (xโ†’aโบ)"}),e.jsx("div",{className:"font-mono font-bold text-xl text-white",children:Y(u,"right")})]})]})]})]})]}),e.jsx("div",{className:"xl:col-span-8 flex flex-col gap-4",children:e.jsxs("div",{className:"glass-panel rounded-3xl relative overflow-hidden flex flex-col shadow-2xl min-h-[500px] border border-white/10 bg-slate-900/60",children:[e.jsx("div",{className:"absolute inset-0 bg-[url('https://grainy-gradients.vercel.app/noise.svg')] opacity-5 pointer-events-none"}),e.jsxs("div",{className:"p-4 border-b border-white/5 flex flex-col sm:flex-row justify-between items-center z-10 bg-slate-950/50 backdrop-blur-sm gap-2",children:[e.jsxs("span",{className:"text-slate-300 text-sm font-mono flex items-center gap-2",children:[e.jsx(ee,{size:16,className:"text-cyan-400"}),"y = ",m]}),e.jsxs("div",{className:"flex gap-4 items-center",children:[e.jsx("button",{onClick:()=>E(!k),className:`p-2 rounded-lg transition-colors ${k?"bg-cyan-500/20 text-cyan-400":"text-slate-500 hover:text-white"}`,children:e.jsx(le,{size:18})}),e.jsx("div",{className:"h-4 w-px bg-white/10"}),e.jsxs("span",{className:"text-[10px] uppercase tracking-widest text-slate-500 flex items-center gap-1",children:[e.jsx(ne,{size:12})," ",y?"Panning":"Trace"]}),e.jsxs("span",{className:"text-[10px] uppercase tracking-widest text-slate-500 flex items-center gap-1",children:[e.jsx(te,{size:12})," Scroll Zoom"]})]})]}),e.jsxs("div",{className:"flex flex-1 relative overflow-hidden",children:[e.jsxs("div",{className:`flex-1 relative w-full ${y?"cursor-grabbing":"cursor-crosshair"} touch-none`,onWheel:H,onMouseDown:V,onMouseMove:B,onMouseUp:()=>M(!1),onMouseLeave:()=>{M(!1),X(null)},children:[e.jsxs("svg",{ref:P,viewBox:`0 0 ${f} ${h}`,className:"w-full h-full overflow-visible z-10 p-0 select-none",children:[s.y[0]<0&&s.y[1]>0&&e.jsx("line",{x1:0,y1:d(0),x2:f,y2:d(0),stroke:"#475569",strokeWidth:"1.5"}),s.x[0]<0&&s.x[1]>0&&e.jsx("line",{x1:c(0),y1:0,x2:c(0),y2:h,stroke:"#475569",strokeWidth:"1.5"}),[Math.ceil(s.x[0]),0,Math.floor(s.x[1])].map(t=>e.jsx("text",{x:c(t),y:h-10,fill:"#64748b",fontSize:"10",textAnchor:"middle",fontFamily:"monospace",children:t},`x-${t}`)),[Math.ceil(s.y[0]),0,Math.floor(s.y[1])].map(t=>e.jsx("text",{x:6,y:d(t)+4,fill:"#64748b",fontSize:"10",textAnchor:"start",fontFamily:"monospace",children:t},`y-${t}`)),!isNaN(parseFloat(u))&&e.jsx("line",{x1:c(parseFloat(u)),y1:0,x2:c(parseFloat(u)),y2:h,stroke:"#ec4899",strokeWidth:"1",strokeDasharray:"4 4",opacity:"0.6"}),T.map((t,a)=>e.jsx(C.path,{d:t,fill:"none",stroke:"#22d3ee",strokeWidth:"2.5",strokeLinecap:"round",initial:{opacity:0},animate:{opacity:1},style:{filter:"drop-shadow(0 0 8px rgba(34,211,238,0.4))"}},`${m}-${a}`)),r&&!y&&!isNaN(r.y)&&Math.abs(r.y){const n=(s.x[0]+s.x[1])/2+(a-10)*((s.x[1]-s.x[0])/20),i=j(n);return e.jsxs("tr",{className:"hover:bg-white/5",children:[e.jsx("td",{className:"py-2 pl-4 text-slate-400",children:n.toFixed(1)}),e.jsx("td",{className:"py-2 pr-4 text-right text-cyan-400",children:i.toFixed(2)})]},a)})})]})})]})})]})]})})]}),e.jsx(ae,{context:"functions"})]})};export{me as FunctionsView}; diff --git a/site/assets/GaussianView-CVoXY7jU.js b/site/assets/GaussianView-CVoXY7jU.js new file mode 100644 index 0000000..889ac55 --- /dev/null +++ b/site/assets/GaussianView-CVoXY7jU.js @@ -0,0 +1,21 @@ +import{c as b,r as p,j as e,L as j,A as v,m as y,P as N}from"./index-DJrAq1Rk.js";import{M as f}from"./MatrixInput-BvG_poIz.js";import{C as R}from"./chevron-right-KbXem8Tn.js";/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const S=[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["path",{d:"m21 8-4-4-4 4",key:"1c9v7m"}],["path",{d:"M17 4v16",key:"7dpous"}]],k=b("arrow-down-up",S);/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const M=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],$=b("chevron-left",M);/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const C=[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]],P=b("pause",C);/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const z=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],A=b("rotate-ccw",z),E=m=>{const d=[];let s=m.map(i=>[...i]);const n=s.length,x=s[0].length;d.push({title:"System Initialization",data:s.map(i=>[...i]),desc:"Starting Augmented Matrix [A|b]. Goal: Upper Triangular Form.",formula:"Start"});let a=0,r=0;for(;ao&&(o=Math.abs(s[t][r]),i=t);if(i!==a){const t=s[a];s[a]=s[i],s[i]=t,d.push({title:"Pivot Swap",data:s.map(h=>[...h]),desc:`Swapping Row ${a+1} with Row ${i+1} to place the largest value (${s[a][r].toFixed(1)}) on the diagonal for stability.`,highlightRow:i,pivotRow:a,formula:`R${a+1} โ†” R${i+1}`,isSwap:!0})}if(Math.abs(s[a][r])<1e-6){r++;continue}for(let t=a+1;t1e-6){const l=s[a][r],c=h/l,u=s[t].map((g,w)=>g-c*s[a][w]);s[t]=u,d.push({title:"Elimination",data:s.map(g=>[...g]),desc:`Eliminating term in R${t+1} using pivot from R${a+1}.`,highlightRow:t,pivotRow:a,formula:`R${t+1} โ† R${t+1} - (${c.toFixed(2)})ยทR${a+1}`})}}a++,r++}return d.push({title:"Row Echelon Form",data:s.map(i=>[...i]),desc:"Matrix is now in Upper Triangular Form. Back-substitution can now solve for variables.",formula:"Done"}),d},_=()=>{const[m,d]=p.useState([[0,1,-1,8],[-3,-1,2,-11],[-2,1,2,-3]]),[s,n]=p.useState(0),[x,a]=p.useState(!1),[r,i]=p.useState(1500),o=p.useMemo(()=>E(m),[m]),t=o[s];p.useEffect(()=>{let l;return x&&(l=setInterval(()=>{n(c=>cclearInterval(l)},[x,o.length,r]);const h=l=>{d(l),n(0),a(!1)};return e.jsxs("div",{className:"space-y-8 pb-20",children:[e.jsxs("header",{className:"border-b border-white/10 pb-6 flex justify-between items-end",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-4xl font-black text-white mb-2 tracking-tight",children:"Gaussian Elimination"}),e.jsxs("p",{className:"text-slate-400 font-light max-w-3xl text-base",children:["Algorithmic visualization of row reduction with ",e.jsx("strong",{children:"Partial Pivoting"})," strategy."]})]}),e.jsx("div",{className:"bg-slate-900 px-3 py-1 rounded border border-slate-800 text-[10px] font-mono text-slate-500 uppercase tracking-widest",children:"Algorithm: Gauss-Jordan"})]}),e.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-12 items-start",children:[e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"glass-panel p-8 rounded-3xl relative border-l-4 border-l-cyan-500",children:[e.jsx("div",{className:"absolute top-4 right-4 opacity-10",children:e.jsx(j,{size:48})}),e.jsxs("div",{className:"mb-6",children:[e.jsx("h3",{className:"text-lg font-bold text-white",children:"Input System"}),e.jsx("p",{className:"text-xs text-slate-400",children:"Edit the Augmented Matrix [A|b] below."})]}),e.jsx(f,{data:m,onChange:h,editable:!0,color:"blue",label:""})]}),e.jsxs("div",{className:"bg-slate-900/50 p-6 rounded-2xl border border-white/5 backdrop-blur-sm",children:[e.jsx("h3",{className:"text-purple-400 font-bold mb-4 flex items-center gap-2 text-sm uppercase tracking-wider",children:"Step Logic"}),e.jsxs("div",{className:"relative pl-6 space-y-4 border-l border-slate-700",children:[e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute -left-[31px] top-1 w-2.5 h-2.5 rounded-full bg-cyan-500"}),e.jsx("h4",{className:"text-white font-bold text-sm",children:"1. Pivot Selection"}),e.jsx("p",{className:"text-xs text-slate-400 mt-1",children:"Locate largest absolute value in current column to minimize error."})]}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute -left-[31px] top-1 w-2.5 h-2.5 rounded-full bg-purple-500"}),e.jsx("h4",{className:"text-white font-bold text-sm",children:"2. Row Swap"}),e.jsx("p",{className:"text-xs text-slate-400 mt-1",children:"Move best pivot to diagonal position."})]}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute -left-[31px] top-1 w-2.5 h-2.5 rounded-full bg-orange-500"}),e.jsx("h4",{className:"text-white font-bold text-sm",children:"3. Elimination"}),e.jsx("p",{className:"text-xs text-slate-400 mt-1",children:"Subtract multiples of pivot row to create zeros below."})]})]})]})]}),e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"glass-panel p-1 rounded-[32px] border-white/10 relative min-h-[420px] flex flex-col shadow-2xl bg-slate-900/40",children:[e.jsxs("div",{className:"bg-slate-950/80 rounded-t-[30px] p-4 flex justify-between items-center border-b border-white/5",children:[e.jsxs("span",{className:"text-xs font-mono text-cyan-400 font-bold uppercase tracking-widest flex items-center gap-2",children:[e.jsx("div",{className:"w-2 h-2 rounded-full bg-cyan-400 animate-pulse"}),"Live Process"]}),e.jsxs("span",{className:"text-xs font-mono text-slate-500",children:["Step ",s+1," / ",o.length]})]}),e.jsxs("div",{className:"relative z-10 flex-1 flex flex-col items-center justify-center p-8 overflow-hidden",children:[e.jsx(v,{mode:"wait",children:e.jsx(y.div,{initial:{opacity:0,scale:.95,y:10},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:1.05,y:-10},className:"scale-110",children:e.jsx(f,{data:t.data.map(l=>l.map(c=>{const u=parseFloat(c.toFixed(2));return Object.is(u,-0)?0:u})),color:t.isSwap?"purple":s===o.length-1?"green":"orange",highlightRow:t.highlightRow,highlightCol:null})},s)}),t.pivotRow!==void 0&&e.jsxs("div",{className:"mt-10 flex gap-6 text-[10px] uppercase tracking-widest font-bold",children:[e.jsxs("div",{className:"flex items-center gap-2 text-cyan-400 bg-cyan-500/10 px-3 py-1.5 rounded-full border border-cyan-500/20",children:["Pivot R",t.pivotRow+1]}),e.jsx("div",{className:`flex items-center gap-2 px-3 py-1.5 rounded-full border ${t.isSwap?"text-purple-400 bg-purple-500/10 border-purple-500/20":"text-orange-400 bg-orange-500/10 border-orange-500/20"}`,children:t.isSwap?`Swap R${t.highlightRow+1}`:`Target R${t.highlightRow+1}`})]})]})]}),e.jsxs("div",{className:"glass-panel p-6 rounded-3xl flex flex-col gap-5",children:[e.jsxs("div",{className:"flex justify-between items-start",children:[e.jsxs("div",{children:[e.jsxs("h3",{className:"text-lg font-bold text-white flex items-center gap-2 mb-1",children:[t.isSwap&&e.jsx(k,{size:18,className:"text-purple-400"}),t.title]}),e.jsx("p",{className:"text-slate-400 text-sm",children:t.desc})]}),t.formula&&e.jsx("div",{className:"px-3 py-1.5 bg-slate-900 rounded-lg border border-slate-700 font-mono text-cyan-400 text-xs shadow-inner",children:t.formula})]}),e.jsxs("div",{className:"flex items-center gap-3 pt-4 border-t border-white/5",children:[e.jsx("button",{onClick:()=>{a(!1),n(0)},className:"p-3 rounded-xl bg-slate-800 text-slate-400 hover:text-white hover:bg-slate-700 transition-colors",children:e.jsx(A,{size:18})}),e.jsx("button",{onClick:()=>{a(!1),n(l=>Math.max(0,l-1))},disabled:s===0,className:"p-3 rounded-xl bg-slate-800 text-slate-200 hover:bg-slate-700 disabled:opacity-50 transition-colors",children:e.jsx($,{size:18})}),e.jsx("button",{onClick:()=>a(!x),className:`flex-1 py-3 rounded-xl font-bold flex items-center justify-center gap-2 transition-all shadow-lg ${x?"bg-cyan-500/20 text-cyan-400 border border-cyan-500/50":"bg-cyan-600 text-white hover:bg-cyan-500"}`,children:x?e.jsxs(e.Fragment,{children:[e.jsx(P,{size:18})," Pause"]}):e.jsxs(e.Fragment,{children:[e.jsx(N,{size:18,fill:"currentColor"})," Auto-Play"]})}),e.jsx("button",{onClick:()=>{a(!1),n(l=>Math.min(o.length-1,l+1))},disabled:s===o.length-1,className:"p-3 rounded-xl bg-slate-800 text-slate-200 hover:bg-slate-700 disabled:opacity-50 transition-colors",children:e.jsx(R,{size:18})})]}),e.jsx("div",{className:"flex justify-center gap-4",children:[2e3,1e3,500].map(l=>e.jsxs("button",{onClick:()=>i(l),className:`text-[10px] uppercase font-bold px-3 py-1 rounded-full border transition-all ${r===l?"bg-white text-black border-white":"bg-transparent text-slate-500 border-slate-700 hover:border-slate-500"}`,children:[l===2e3?"1x":l===1e3?"2x":"4x"," Speed"]},l))})]})]})]})]})};export{_ as GaussianView}; diff --git a/site/assets/Grid-BzfIX0gF.js b/site/assets/Grid-BzfIX0gF.js new file mode 100644 index 0000000..77ff7ce --- /dev/null +++ b/site/assets/Grid-BzfIX0gF.js @@ -0,0 +1,61 @@ +import{_ as w}from"./extends-CF3RwP-h.js";import{r as e}from"./index-DJrAq1Rk.js";import{M as F,b as G,U as b,r as T,g as D,V as a,u as U,s as E,a as p}from"./react-three-fiber.esm-DbvaK_kO.js";import{v as V}from"./constants-Br-Ti-Jl.js";function I(s,l,c,u){const t=class extends G{constructor(f={}){const n=Object.entries(s);super({uniforms:n.reduce((o,[i,m])=>{const d=b.clone({[i]:{value:m}});return{...o,...d}},{}),vertexShader:l,fragmentShader:c}),this.key="",n.forEach(([o])=>Object.defineProperty(this,o,{get:()=>this.uniforms[o].value,set:i=>this.uniforms[o].value=i})),Object.assign(this,f)}};return t.key=F.generateUUID(),t}const O=I({cellSize:.5,sectionSize:1,fadeDistance:100,fadeStrength:1,fadeFrom:1,cellThickness:.5,sectionThickness:1,cellColor:new p,sectionColor:new p,infiniteGrid:!1,followCamera:!1,worldCamProjPosition:new a,worldPlanePosition:new a},` + varying vec3 localPosition; + varying vec4 worldPosition; + + uniform vec3 worldCamProjPosition; + uniform vec3 worldPlanePosition; + uniform float fadeDistance; + uniform bool infiniteGrid; + uniform bool followCamera; + + void main() { + localPosition = position.xzy; + if (infiniteGrid) localPosition *= 1.0 + fadeDistance; + + worldPosition = modelMatrix * vec4(localPosition, 1.0); + if (followCamera) { + worldPosition.xyz += (worldCamProjPosition - worldPlanePosition); + localPosition = (inverse(modelMatrix) * worldPosition).xyz; + } + + gl_Position = projectionMatrix * viewMatrix * worldPosition; + } + `,` + varying vec3 localPosition; + varying vec4 worldPosition; + + uniform vec3 worldCamProjPosition; + uniform float cellSize; + uniform float sectionSize; + uniform vec3 cellColor; + uniform vec3 sectionColor; + uniform float fadeDistance; + uniform float fadeStrength; + uniform float fadeFrom; + uniform float cellThickness; + uniform float sectionThickness; + + float getGrid(float size, float thickness) { + vec2 r = localPosition.xz / size; + vec2 grid = abs(fract(r - 0.5) - 0.5) / fwidth(r); + float line = min(grid.x, grid.y) + 1.0 - thickness; + return 1.0 - min(line, 1.0); + } + + void main() { + float g1 = getGrid(cellSize, cellThickness); + float g2 = getGrid(sectionSize, sectionThickness); + + vec3 from = worldCamProjPosition*vec3(fadeFrom); + float dist = distance(from, worldPosition.xyz); + float d = 1.0 - min(dist / fadeDistance, 1.0); + vec3 color = mix(cellColor, sectionColor, min(1.0, sectionThickness * g2)); + + gl_FragColor = vec4(color, (g1 + g2) * pow(d, fadeStrength)); + gl_FragColor.a = mix(0.75 * gl_FragColor.a, gl_FragColor.a, g2); + if (gl_FragColor.a <= 0.0) discard; + + #include + #include <${V>=154?"colorspace_fragment":"encodings_fragment"}> + } + `),N=e.forwardRef(({args:s,cellColor:l="#000000",sectionColor:c="#2080ff",cellSize:u=.5,sectionSize:t=1,followCamera:P=!1,infiniteGrid:f=!1,fadeDistance:n=100,fadeStrength:o=1,fadeFrom:i=1,cellThickness:m=.5,sectionThickness:d=1,side:C=E,...h},x)=>{T({GridMaterial:O});const r=e.useRef(null);e.useImperativeHandle(x,()=>r.current,[]);const g=new D,y=new a(0,1,0),z=new a(0,0,0);U(k=>{g.setFromNormalAndCoplanarPoint(y,z).applyMatrix4(r.current.matrixWorld);const v=r.current.material,S=v.uniforms.worldCamProjPosition,_=v.uniforms.worldPlanePosition;g.projectPoint(k.camera.position,S.value),_.value.set(0,0,0).applyMatrix4(r.current.matrixWorld)});const M={cellSize:u,sectionSize:t,cellColor:l,sectionColor:c,cellThickness:m,sectionThickness:d},j={fadeDistance:n,fadeStrength:o,fadeFrom:i,infiniteGrid:f,followCamera:P};return e.createElement("mesh",w({ref:r,frustumCulled:!1},h),e.createElement("gridMaterial",w({transparent:!0,"extensions-derivatives":!0,side:C},M,j)),e.createElement("planeGeometry",{args:s}))});export{N as G}; diff --git a/site/assets/IntegralBasicsView-IHUY2mpE.js b/site/assets/IntegralBasicsView-IHUY2mpE.js new file mode 100644 index 0000000..23d489a --- /dev/null +++ b/site/assets/IntegralBasicsView-IHUY2mpE.js @@ -0,0 +1,6 @@ +import{c as g,r as v,j as e,H as y,L as N,m as f}from"./index-DJrAq1Rk.js";import{M as t}from"./MathRenderer-DoWdgGCt.js";/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const w=[["path",{d:"m17 11-5-5-5 5",key:"e8nh98"}],["path",{d:"m17 18-5-5-5 5",key:"2avn1x"}]],k=g("chevrons-up",w),T=()=>{const[i,j]=v.useState(0),r=600,l=400,n={x:[-3,3],y:[-5,10]},x=s=>(s-n.x[0])/(n.x[1]-n.x[0])*r,o=s=>l-(s-n.y[0])/(n.y[1]-n.y[0])*l,c=s=>{let d="";for(let a=n.x[0];a<=n.x[1];a+=.1){const u=s(a),h=x(a),m=o(u);a===n.x[0]?d+=`M ${h} ${m}`:d+=` L ${h} ${m}`}return d},b=s=>3*s*s,p=s=>s*s*s+i;return e.jsxs("div",{className:"space-y-8 pb-20",children:[e.jsxs("header",{className:"border-b border-white/10 pb-6",children:[e.jsx("h2",{className:"text-4xl font-bold text-white mb-2",children:"The Antiderivative"}),e.jsxs("p",{className:"text-slate-400 max-w-3xl",children:["Integration is the inverse operation of differentiation. The indefinite integral represents the family of functions ",e.jsx("span",{className:"font-mono text-cyan-400",children:"F(x) + C"})," whose derivative is ",e.jsx("span",{className:"font-mono text-purple-400",children:"f(x)"}),"."]})]}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-8",children:[e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"bg-slate-900/50 p-6 rounded-2xl border border-slate-700",children:[e.jsxs("h3",{className:"text-lg font-bold text-white mb-4 flex items-center gap-2",children:[e.jsx(y,{className:"text-cyan-400",size:20})," Definition"]}),e.jsxs("p",{className:"text-slate-300 text-sm leading-relaxed mb-4",children:["The prime function ",e.jsx(t,{expression:"F(x)",inline:!0})," is any function whose derivative equals ",e.jsx(t,{expression:"f(x)",inline:!0}),"."]}),e.jsxs("div",{className:"bg-slate-950 p-4 rounded-xl border border-slate-800 text-center",children:[e.jsx(t,{expression:"\\int f(x)dx = F(x) + C",className:"text-xl text-white"}),e.jsxs("p",{className:"text-xs text-slate-500 mt-2",children:["if ",e.jsx(t,{expression:"F'(x) = f(x)",inline:!0})]})]})]}),e.jsxs("div",{className:"bg-slate-900/50 p-6 rounded-2xl border border-slate-700",children:[e.jsxs("h3",{className:"text-lg font-bold text-white mb-4 flex items-center gap-2",children:[e.jsx(N,{className:"text-purple-400",size:20})," The Constant C"]}),e.jsxs("p",{className:"text-slate-300 text-sm leading-relaxed",children:["Two functions with the same derivative differ only by a vertical shift.",e.jsx("br",{}),e.jsx("br",{}),"Example: If ",e.jsx(t,{expression:"f(x) = 3x^2",inline:!0}),", then ",e.jsx(t,{expression:"F(x)",inline:!0})," can be:"]}),e.jsxs("ul",{className:"list-disc list-inside text-sm text-slate-400 mt-2 space-y-1 ml-2",children:[e.jsx("li",{children:e.jsx(t,{expression:"x^3",inline:!0})}),e.jsx("li",{children:e.jsx(t,{expression:"x^3 + 4",inline:!0})}),e.jsx("li",{children:e.jsx(t,{expression:"x^3 - 1",inline:!0})}),e.jsxs("li",{children:["Generally: ",e.jsx(t,{expression:"x^3 + C",inline:!0})]})]})]})]}),e.jsxs("div",{className:"bg-slate-900 rounded-3xl border border-slate-700 p-1 shadow-2xl relative overflow-hidden flex flex-col",children:[e.jsx("div",{className:"absolute inset-0 bg-[url('https://grainy-gradients.vercel.app/noise.svg')] opacity-5 pointer-events-none"}),e.jsxs("div",{className:"p-4 bg-slate-950/80 backdrop-blur-sm border-b border-white/5 flex justify-between items-center z-10",children:[e.jsx("span",{className:"text-xs font-bold text-slate-400 uppercase tracking-widest",children:"Family of Curves"}),e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsxs("span",{className:"text-xs font-mono text-cyan-400",children:["F(x) = xยณ + ",i.toFixed(1)]}),e.jsx("span",{className:"text-xs font-mono text-purple-400",children:"f(x) = 3xยฒ"})]})]}),e.jsxs("div",{className:"relative flex-1",children:[e.jsxs("svg",{viewBox:`0 0 ${r} ${l}`,className:"w-full h-full",children:[e.jsx("line",{x1:0,y1:o(0),x2:r,y2:o(0),stroke:"#475569",strokeWidth:"1"}),e.jsx("line",{x1:x(0),y1:0,x2:x(0),y2:l,stroke:"#475569",strokeWidth:"1"}),e.jsx("path",{d:c(s=>b(s)/3),fill:"none",stroke:"#a855f7",strokeWidth:"2",strokeDasharray:"4 4",opacity:"0.5"}),e.jsx(f.path,{d:c(p),fill:"none",stroke:"#22d3ee",strokeWidth:"3",initial:!1,animate:{d:c(p)},transition:{type:"spring",stiffness:300,damping:30}})]}),e.jsx(f.div,{className:"absolute left-1/2 top-1/2 w-px bg-white/20 h-full -translate-x-1/2 pointer-events-none"})]}),e.jsxs("div",{className:"p-6 bg-slate-950/50 border-t border-white/5",children:[e.jsxs("label",{className:"flex items-center justify-between text-xs font-bold text-slate-400 uppercase tracking-widest mb-2",children:[e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(k,{size:14})," Constant C"]}),e.jsx("span",{className:"text-cyan-400 font-mono text-lg",children:i.toFixed(1)})]}),e.jsx("input",{type:"range",min:"-4",max:"4",step:"0.1",value:i,onChange:s=>j(parseFloat(s.target.value)),className:"w-full h-2 bg-slate-800 rounded-lg appearance-none cursor-pointer accent-cyan-500"})]})]})]})]})};export{T as IntegralBasicsView}; diff --git a/site/assets/IntegralRulesView-C3PlQOL5.js b/site/assets/IntegralRulesView-C3PlQOL5.js new file mode 100644 index 0000000..ad721e0 --- /dev/null +++ b/site/assets/IntegralRulesView-C3PlQOL5.js @@ -0,0 +1 @@ +import{j as e,V as x}from"./index-DJrAq1Rk.js";import{M as a}from"./MathRenderer-DoWdgGCt.js";import{C as l}from"./circle-check-7SRCYW7Y.js";const r=[{name:"Power Rule",latex:"\\int x^a dx = \\frac{1}{a+1}x^{a+1} + C",cond:"a \\neq -1",ex:"\\int x^2 dx = \\frac{x^3}{3} + C"},{name:"Constant Rule",latex:"\\int dx = x + C",cond:"",ex:"\\int 5 dx = 5x + C"},{name:"Reciprocal Rule",latex:"\\int \\frac{1}{x} dx = \\ln|x| + C",cond:"x \\neq 0",ex:""},{name:"Exponential Rule",latex:"\\int e^x dx = e^x + C",cond:"",ex:""},{name:"General Exponential",latex:"\\int a^x dx = \\frac{a^x}{\\ln a} + C",cond:"a > 0, a \\neq 1",ex:"\\int 2^x dx = \\frac{2^x}{\\ln 2} + C"},{name:"Root Rule",latex:"\\int \\frac{1}{\\sqrt{x}} dx = 2\\sqrt{x} + C",cond:"x > 0",ex:"\\text{Derived from } x^{-1/2}"}],n=[{name:"Sum/Difference",latex:"\\int (f(x) \\pm g(x)) dx = \\int f(x) dx \\pm \\int g(x) dx"},{name:"Constant Multiple",latex:"\\int k f(x) dx = k \\int f(x) dx"}],o=()=>e.jsxs("div",{className:"space-y-8 pb-20",children:[e.jsxs("header",{className:"border-b border-white/10 pb-6",children:[e.jsx("h2",{className:"text-4xl font-bold text-white mb-2",children:"Integration Rules"}),e.jsx("p",{className:"text-slate-400",children:"Essential formulas and properties for solving indefinite integrals."})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[e.jsxs("div",{className:"md:col-span-2",children:[e.jsxs("h3",{className:"text-sm font-bold text-slate-500 uppercase tracking-widest mb-4 flex items-center gap-2",children:[e.jsx(l,{className:"text-emerald-400",size:16})," Properties"]}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:n.map((s,t)=>e.jsxs("div",{className:"bg-slate-900/50 border border-slate-700 rounded-xl p-4 flex flex-col justify-center",children:[e.jsx("span",{className:"text-xs text-slate-400 mb-2 font-bold",children:s.name}),e.jsx(a,{expression:s.latex,className:"text-white text-lg"})]},t))})]}),e.jsxs("div",{className:"md:col-span-2",children:[e.jsxs("h3",{className:"text-sm font-bold text-slate-500 uppercase tracking-widest mb-4 flex items-center gap-2",children:[e.jsx(x,{className:"text-purple-400",size:16})," Basic Formulas"]}),e.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:r.map((s,t)=>e.jsxs("div",{className:"bg-slate-800/40 border border-slate-700/50 rounded-xl p-5 hover:border-purple-500/30 transition-colors group",children:[e.jsxs("div",{className:"flex justify-between items-start mb-3",children:[e.jsx("h4",{className:"text-cyan-400 font-bold",children:s.name}),s.cond&&e.jsx("span",{className:"text-[10px] bg-slate-900 text-slate-500 px-2 py-1 rounded border border-slate-800",children:s.cond})]}),e.jsx("div",{className:"bg-slate-900 rounded-lg p-3 text-center border border-slate-800 mb-3 group-hover:border-purple-500/20 transition-colors",children:e.jsx(a,{expression:s.latex,className:"text-xl text-white"})}),s.ex&&e.jsxs("div",{className:"text-xs text-slate-400 border-t border-white/5 pt-2 flex gap-2 items-center",children:[e.jsx("span",{className:"opacity-50",children:"Ex:"}),e.jsx(a,{expression:s.ex,inline:!0,className:"text-slate-300"})]})]},t))})]})]})]});export{o as IntegralRulesView}; diff --git a/site/assets/Integrals3DView-CLF6cvHs.js b/site/assets/Integrals3DView-CLF6cvHs.js new file mode 100644 index 0000000..1df2865 --- /dev/null +++ b/site/assets/Integrals3DView-CLF6cvHs.js @@ -0,0 +1,11 @@ +import{c as p,r,j as e,v as w}from"./index-DJrAq1Rk.js";import{L as y,C as N,D as h,c as k}from"./react-three-fiber.esm-DbvaK_kO.js";import{M as S}from"./maximize-BW0NideE.js";import{O as M}from"./OrbitControls-C12Qjv1w.js";import{G as C}from"./Grid-BzfIX0gF.js";import{F as R}from"./Float-DkPwlzaD.js";import"./extends-CF3RwP-h.js";import"./constants-Br-Ti-Jl.js";/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const z=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],I=p("eye",z);/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const L=[["path",{d:"M16.466 7.5C15.643 4.237 13.952 2 12 2 9.239 2 7 6.477 7 12s2.239 10 5 10c.342 0 .677-.069 1-.2",key:"10n0gc"}],["path",{d:"m15.194 13.707 3.814 1.86-1.86 3.814",key:"16shm9"}],["path",{d:"M19 15.57c-1.804.885-4.274 1.43-7 1.43-5.523 0-10-2.239-10-5s4.477-5 10-5c4.838 0 8.873 1.718 9.8 4",key:"1lxi77"}]],D=p("rotate-3d",L),V=()=>{const[n,u]=r.useState(32),[i,b]=r.useState("parabola"),[s,f]=r.useState(6),[a,g]=r.useState(!1),c={parabola:{label:"Parabola",fn:t=>.15*t*t+1,desc:"f(x) = 0.15xยฒ + 1"},sine:{label:"Sine Vase",fn:t=>Math.sin(t)*.5+1.5,desc:"f(x) = sin(x)*0.5 + 1.5"},funnel:{label:"Trumpet",fn:t=>2/(Math.abs(t)+1),desc:"f(x) = 2/(|x|+1)"},cone:{label:"Linear",fn:t=>.4*Math.abs(t)+.5,desc:"f(x) = 0.4|x| + 0.5"}},l=c[i],d=r.useMemo(()=>{const t=[],j=-s/2;for(let o=0;o<=100;o++){const m=j+o/100*s,v=l.fn(m);t.push(new k(Math.max(.01,v),m))}return new y(t,n)},[l,s,n]);return e.jsxs("div",{className:"space-y-6 h-[calc(100vh-140px)] flex flex-col pb-6",children:[e.jsx("header",{className:"flex flex-col md:flex-row justify-between items-end border-b border-white/10 pb-4 shrink-0 gap-4",children:e.jsxs("div",{children:[e.jsxs("h2",{className:"text-3xl font-bold text-white mb-2 flex items-center gap-3",children:[e.jsx(D,{className:"text-emerald-400"})," Solid of Revolution"]}),e.jsxs("p",{className:"text-slate-400 text-sm max-w-2xl",children:["Generate 3D volumes by rotating a function ",e.jsx("span",{className:"font-mono text-emerald-400",children:"f(x)"})," around the central axis. This visualizes the method of disks/washers used in integral calculus."]})]})}),e.jsxs("div",{className:"flex-1 bg-slate-950 rounded-3xl border border-slate-800 relative overflow-hidden shadow-2xl flex flex-col md:flex-row",children:[e.jsxs("div",{className:"absolute top-4 left-4 z-10 w-64 bg-slate-900/90 backdrop-blur-md p-5 rounded-2xl border border-slate-700/50 flex flex-col gap-5 shadow-xl",children:[e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-bold text-slate-500 uppercase tracking-widest mb-3 flex items-center gap-2",children:[e.jsx(w,{size:14})," Generating Function"]}),e.jsx("div",{className:"grid grid-cols-2 gap-2",children:Object.entries(c).map(([t,x])=>e.jsx("button",{onClick:()=>b(t),className:`px-3 py-2 rounded-lg text-xs font-bold border transition-all ${i===t?"bg-emerald-600 border-emerald-500 text-white shadow-lg shadow-emerald-900/50":"bg-slate-800 border-slate-700 text-slate-400 hover:text-white"}`,children:x.label},t))}),e.jsx("div",{className:"mt-2 text-[10px] font-mono text-emerald-400 text-center bg-emerald-900/10 p-1 rounded border border-emerald-900/30",children:l.desc})]}),e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-bold text-slate-500 uppercase tracking-widest mb-3 flex items-center gap-2",children:[e.jsx(S,{size:14})," Dimensions"]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex justify-between text-[10px] text-slate-400 mb-1",children:[e.jsx("span",{children:"Height Range"}),e.jsxs("span",{className:"text-white",children:[s,"u"]})]}),e.jsx("input",{type:"range",min:"2",max:"10",step:"0.5",value:s,onChange:t=>f(parseFloat(t.target.value)),className:"w-full h-1.5 bg-slate-700 rounded-lg appearance-none cursor-pointer accent-emerald-500"})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex justify-between text-[10px] text-slate-400 mb-1",children:[e.jsx("span",{children:"Resolution (Segments)"}),e.jsx("span",{className:"text-white",children:n})]}),e.jsx("input",{type:"range",min:"3",max:"64",step:"1",value:n,onChange:t=>u(parseInt(t.target.value)),className:"w-full h-1.5 bg-slate-700 rounded-lg appearance-none cursor-pointer accent-emerald-500"})]})]})]}),e.jsx("div",{children:e.jsxs("button",{onClick:()=>g(!a),className:`w-full py-2 rounded-lg text-xs font-bold border transition-all flex items-center justify-center gap-2 ${a?"bg-white text-slate-900 border-white":"bg-transparent text-slate-300 border-slate-600 hover:border-slate-400"}`,children:[e.jsx(I,{size:14})," Toggle Structure"]})})]}),e.jsxs("div",{className:"w-full h-full",children:[e.jsx("div",{className:"absolute inset-0 bg-[url('https://grainy-gradients.vercel.app/noise.svg')] opacity-5 pointer-events-none z-0"}),e.jsxs(N,{camera:{position:[8,6,8],fov:45},shadows:!0,children:[e.jsx("color",{attach:"background",args:["#020617"]}),e.jsx("ambientLight",{intensity:.5}),e.jsx("pointLight",{position:[10,10,10],intensity:1,castShadow:!0}),e.jsx("pointLight",{position:[-10,-5,-5],intensity:.5,color:"#10b981"}),e.jsx(M,{makeDefault:!0,autoRotate:!0,autoRotateSpeed:.5,minPolarAngle:0,maxPolarAngle:Math.PI/1.5}),e.jsx(C,{infiniteGrid:!0,sectionSize:3,cellColor:"#1e293b",sectionColor:"#334155",fadeDistance:30,position:[0,-s/2-1,0]}),e.jsx(R,{speed:2,rotationIntensity:.2,floatIntensity:.5,children:e.jsxs("group",{position:[0,0,0],children:[e.jsx("mesh",{geometry:d,castShadow:!0,receiveShadow:!0,children:e.jsx("meshStandardMaterial",{color:"#10b981",side:h,metalness:.6,roughness:.2,wireframe:a,transparent:!0,opacity:a?.3:.9})}),!a&&e.jsx("mesh",{geometry:d,children:e.jsx("meshBasicMaterial",{color:"#34d399",wireframe:!0,transparent:!0,opacity:.1,side:h})}),e.jsxs("mesh",{position:[0,0,0],children:[e.jsx("cylinderGeometry",{args:[.02,.02,s+2,8]}),e.jsx("meshBasicMaterial",{color:"#ef4444",opacity:.8,transparent:!0})]})]})})]}),e.jsx("div",{className:"absolute bottom-4 right-4 pointer-events-none text-[10px] text-slate-500 font-mono bg-black/20 p-2 rounded backdrop-blur-sm",children:"Left Click: Rotate โ€ข Scroll: Zoom โ€ข Right Click: Pan"})]})]})]})};export{V as Integrals3DView}; diff --git a/site/assets/InverseView-f4AQbsbM.js b/site/assets/InverseView-f4AQbsbM.js new file mode 100644 index 0000000..4ca9b52 --- /dev/null +++ b/site/assets/InverseView-f4AQbsbM.js @@ -0,0 +1,11 @@ +import{c as u,r as n,j as e,m as o,e as g}from"./index-DJrAq1Rk.js";import{M as c}from"./MatrixInput-BvG_poIz.js";import{g as h,d as y,f}from"./matrixMath-CNHWal2D.js";import{W as b}from"./WolframHelper-C3f14kAl.js";import{C as v}from"./circle-check-7SRCYW7Y.js";import{T as N}from"./triangle-alert-7X0SgA5l.js";import"./chevron-right-KbXem8Tn.js";/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const w=[["path",{d:"M12 16h.01",key:"1drbdi"}],["path",{d:"M16 16h.01",key:"1f9h7w"}],["path",{d:"M3 19a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V8.5a.5.5 0 0 0-.769-.422l-4.462 2.844A.5.5 0 0 1 15 10.5v-2a.5.5 0 0 0-.769-.422L9.77 10.922A.5.5 0 0 1 9 10.5V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2z",key:"1iv0i2"}],["path",{d:"M8 16h.01",key:"18s6g9"}]],k=u("factory",w);/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const M=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],z=u("refresh-cw",M),$=()=>{const[a,d]=n.useState([[2,1,1],[3,2,1],[2,1,2]]),t=n.useMemo(()=>h(a),[a]),l=n.useMemo(()=>t?a.map((r,s)=>r.map((p,m)=>{const j=h(y(a,s,m))||0;return((s+m)%2===0?1:-1)*j})):null,[a,t]),i=n.useMemo(()=>l?l[0].map((r,s)=>l.map(p=>p[s])):null,[l]),x=n.useMemo(()=>!i||!t?null:i.map(r=>r.map(s=>s/t)),[i,t]);return e.jsxs("div",{className:"space-y-8 pb-20",children:[e.jsxs("header",{className:"flex flex-col md:flex-row justify-between items-end border-b border-white/10 pb-6 gap-6",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-4xl font-bold text-white mb-2",children:"Inversion Factory"}),e.jsxs("p",{className:"text-slate-400 max-w-2xl font-light",children:["Visualizing the 4-stage pipeline to transform ",e.jsx("span",{className:"font-mono text-cyan-400",children:"A"})," into ",e.jsx("span",{className:"font-mono text-cyan-400",children:"Aโปยน"}),"."]})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("button",{onClick:()=>d([[2,1,1],[3,2,1],[2,1,2]]),className:"px-3 py-1.5 bg-slate-800 rounded text-xs text-slate-300 hover:text-white transition-colors",children:"Example 1"}),e.jsx("button",{onClick:()=>d([[1,2,3],[0,1,4],[5,6,0]]),className:"px-3 py-1.5 bg-slate-800 rounded text-xs text-slate-300 hover:text-white transition-colors",children:"Example 2"})]})]}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-4 relative",children:[e.jsx("div",{className:"hidden lg:block absolute top-1/2 left-0 w-full h-1 bg-gradient-to-r from-slate-800 via-cyan-900 to-purple-900 -translate-y-1/2 z-0 rounded-full"}),e.jsxs(o.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.1},className:"glass-panel p-5 rounded-2xl relative z-10 flex flex-col gap-4 border-t-4 border-t-slate-500",children:[e.jsxs("div",{className:"flex justify-between items-start",children:[e.jsx("span",{className:"text-[10px] font-bold text-slate-500 uppercase tracking-widest bg-slate-950 px-2 py-1 rounded",children:"Stage 1: Input"}),e.jsxs("div",{className:`text-xs font-bold px-2 py-1 rounded flex items-center gap-1 ${t?"text-emerald-400 bg-emerald-500/10":"text-pink-400 bg-pink-500/10"}`,children:[t?e.jsx(v,{size:12}):e.jsx(N,{size:12})," Det: ",t!==null?f(t):"-"]})]}),e.jsx("div",{className:"flex-1 flex items-center justify-center",children:e.jsx(c,{data:a,onChange:d,editable:!0,color:"blue",label:""})})]}),e.jsxs(o.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.2},className:`glass-panel p-5 rounded-2xl relative z-10 flex flex-col gap-4 border-t-4 ${t?"border-t-cyan-500":"border-t-slate-800 opacity-50"}`,children:[e.jsxs("div",{className:"flex justify-between items-start",children:[e.jsx("span",{className:"text-[10px] font-bold text-slate-500 uppercase tracking-widest bg-slate-950 px-2 py-1 rounded",children:"Stage 2: Cofactors"}),e.jsx(g,{size:14,className:"text-cyan-500"})]}),e.jsx("div",{className:"flex-1 flex flex-col items-center justify-center gap-2",children:l?e.jsxs(e.Fragment,{children:[e.jsx(c,{data:l,color:"cyan",label:""}),e.jsx("p",{className:"text-[9px] text-slate-500 text-center",children:"Applied (+ - +) checkerboard to Minors."})]}):e.jsx("div",{className:"text-xs text-slate-500 italic",children:"Waiting for valid input..."})})]}),e.jsxs(o.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.3},className:`glass-panel p-5 rounded-2xl relative z-10 flex flex-col gap-4 border-t-4 ${t?"border-t-purple-500":"border-t-slate-800 opacity-50"}`,children:[e.jsxs("div",{className:"flex justify-between items-start",children:[e.jsx("span",{className:"text-[10px] font-bold text-slate-500 uppercase tracking-widest bg-slate-950 px-2 py-1 rounded",children:"Stage 3: Adjugate"}),e.jsx(z,{size:14,className:"text-purple-500"})]}),e.jsx("div",{className:"flex-1 flex flex-col items-center justify-center gap-2",children:i?e.jsxs(e.Fragment,{children:[e.jsx(c,{data:i,color:"purple",label:""}),e.jsx("p",{className:"text-[9px] text-slate-500 text-center",children:"Transposed rows to columns."})]}):e.jsx("div",{className:"text-xs text-slate-500 italic",children:"..."})})]}),e.jsxs(o.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.4},className:`glass-panel p-5 rounded-2xl relative z-10 flex flex-col gap-4 border-t-4 ${t?"border-t-emerald-500":"border-t-slate-800 opacity-50"}`,children:[e.jsxs("div",{className:"flex justify-between items-start",children:[e.jsx("span",{className:"text-[10px] font-bold text-slate-500 uppercase tracking-widest bg-slate-950 px-2 py-1 rounded",children:"Stage 4: Output"}),e.jsx(k,{size:14,className:"text-emerald-500"})]}),e.jsx("div",{className:"flex-1 flex flex-col items-center justify-center gap-2",children:x?e.jsxs(e.Fragment,{children:[e.jsx(c,{data:x.map(r=>r.map(s=>parseFloat(s.toFixed(2)))),color:"green",label:""}),e.jsxs("p",{className:"text-[9px] text-slate-500 text-center",children:["Divided Adjugate by Det (",f(t),")."]})]}):e.jsx("div",{className:"p-4 border border-dashed border-pink-500/30 bg-pink-500/5 rounded-lg text-pink-400 text-xs text-center",children:"Cannot invert singular matrix."})})]})]}),e.jsxs("div",{className:"mt-8 bg-slate-900/50 p-6 rounded-2xl border border-white/5 flex flex-col md:flex-row items-center justify-center gap-6",children:[e.jsx("div",{className:"text-sm font-bold text-slate-400 uppercase tracking-widest",children:"Master Formula"}),e.jsxs("div",{className:"px-6 py-3 bg-slate-950 rounded-xl border border-slate-800 text-xl font-mono text-white shadow-inner",children:["Aโปยน = ",e.jsx("span",{className:"text-emerald-400",children:"1/det(A)"})," ยท ",e.jsx("span",{className:"text-purple-400",children:"adj(A)"})]}),e.jsx("p",{className:"text-xs text-slate-500 max-w-md text-center md:text-left",children:"The adjugate matrix adj(A) is the transpose of the cofactor matrix. This formula works for any square non-singular matrix."})]}),e.jsx(b,{context:"inverse"})]})};export{$ as InverseView}; diff --git a/site/assets/Line-DRGYPd7c.js b/site/assets/Line-DRGYPd7c.js new file mode 100644 index 0000000..d208108 --- /dev/null +++ b/site/assets/Line-DRGYPd7c.js @@ -0,0 +1,409 @@ +import{_ as G}from"./extends-CF3RwP-h.js";import{r as y}from"./index-DJrAq1Rk.js";import{i as ie,I as se,F as V,j as H,k as B,W as oe,B as j,l as Q,V as b,b as re,U as F,m as q,c as Y,n as ae,o as M,p as le,q as ce,M as de,h as fe,a as ue}from"./react-three-fiber.esm-DbvaK_kO.js";const Z=parseInt(ie.replace(/\D+/g,"")),ee=Z>=125?"uv1":"uv2",k=new j,O=new b;class W extends se{constructor(){super(),this.isLineSegmentsGeometry=!0,this.type="LineSegmentsGeometry";const e=[-1,2,0,1,2,0,-1,1,0,1,1,0,-1,0,0,1,0,0,-1,-1,0,1,-1,0],t=[-1,2,1,2,-1,1,1,1,-1,-1,1,-1,-1,-2,1,-2],s=[0,2,1,2,3,1,2,4,3,4,5,3,4,6,5,6,7,5];this.setIndex(s),this.setAttribute("position",new V(e,3)),this.setAttribute("uv",new V(t,2))}applyMatrix4(e){const t=this.attributes.instanceStart,s=this.attributes.instanceEnd;return t!==void 0&&(t.applyMatrix4(e),s.applyMatrix4(e),t.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}setPositions(e){let t;e instanceof Float32Array?t=e:Array.isArray(e)&&(t=new Float32Array(e));const s=new H(t,6,1);return this.setAttribute("instanceStart",new B(s,3,0)),this.setAttribute("instanceEnd",new B(s,3,3)),this.computeBoundingBox(),this.computeBoundingSphere(),this}setColors(e,t=3){let s;e instanceof Float32Array?s=e:Array.isArray(e)&&(s=new Float32Array(e));const n=new H(s,t*2,1);return this.setAttribute("instanceColorStart",new B(n,t,0)),this.setAttribute("instanceColorEnd",new B(n,t,t)),this}fromWireframeGeometry(e){return this.setPositions(e.attributes.position.array),this}fromEdgesGeometry(e){return this.setPositions(e.attributes.position.array),this}fromMesh(e){return this.fromWireframeGeometry(new oe(e.geometry)),this}fromLineSegments(e){const t=e.geometry;return this.setPositions(t.attributes.position.array),this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new j);const e=this.attributes.instanceStart,t=this.attributes.instanceEnd;e!==void 0&&t!==void 0&&(this.boundingBox.setFromBufferAttribute(e),k.setFromBufferAttribute(t),this.boundingBox.union(k))}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new Q),this.boundingBox===null&&this.computeBoundingBox();const e=this.attributes.instanceStart,t=this.attributes.instanceEnd;if(e!==void 0&&t!==void 0){const s=this.boundingSphere.center;this.boundingBox.getCenter(s);let n=0;for(let i=0,a=e.count;i + #include + #include + #include + + uniform float linewidth; + uniform vec2 resolution; + + attribute vec3 instanceStart; + attribute vec3 instanceEnd; + + #ifdef USE_COLOR + #ifdef USE_LINE_COLOR_ALPHA + varying vec4 vLineColor; + attribute vec4 instanceColorStart; + attribute vec4 instanceColorEnd; + #else + varying vec3 vLineColor; + attribute vec3 instanceColorStart; + attribute vec3 instanceColorEnd; + #endif + #endif + + #ifdef WORLD_UNITS + + varying vec4 worldPos; + varying vec3 worldStart; + varying vec3 worldEnd; + + #ifdef USE_DASH + + varying vec2 vUv; + + #endif + + #else + + varying vec2 vUv; + + #endif + + #ifdef USE_DASH + + uniform float dashScale; + attribute float instanceDistanceStart; + attribute float instanceDistanceEnd; + varying float vLineDistance; + + #endif + + void trimSegment( const in vec4 start, inout vec4 end ) { + + // trim end segment so it terminates between the camera plane and the near plane + + // conservative estimate of the near plane + float a = projectionMatrix[ 2 ][ 2 ]; // 3nd entry in 3th column + float b = projectionMatrix[ 3 ][ 2 ]; // 3nd entry in 4th column + float nearEstimate = - 0.5 * b / a; + + float alpha = ( nearEstimate - start.z ) / ( end.z - start.z ); + + end.xyz = mix( start.xyz, end.xyz, alpha ); + + } + + void main() { + + #ifdef USE_COLOR + + vLineColor = ( position.y < 0.5 ) ? instanceColorStart : instanceColorEnd; + + #endif + + #ifdef USE_DASH + + vLineDistance = ( position.y < 0.5 ) ? dashScale * instanceDistanceStart : dashScale * instanceDistanceEnd; + vUv = uv; + + #endif + + float aspect = resolution.x / resolution.y; + + // camera space + vec4 start = modelViewMatrix * vec4( instanceStart, 1.0 ); + vec4 end = modelViewMatrix * vec4( instanceEnd, 1.0 ); + + #ifdef WORLD_UNITS + + worldStart = start.xyz; + worldEnd = end.xyz; + + #else + + vUv = uv; + + #endif + + // special case for perspective projection, and segments that terminate either in, or behind, the camera plane + // clearly the gpu firmware has a way of addressing this issue when projecting into ndc space + // but we need to perform ndc-space calculations in the shader, so we must address this issue directly + // perhaps there is a more elegant solution -- WestLangley + + bool perspective = ( projectionMatrix[ 2 ][ 3 ] == - 1.0 ); // 4th entry in the 3rd column + + if ( perspective ) { + + if ( start.z < 0.0 && end.z >= 0.0 ) { + + trimSegment( start, end ); + + } else if ( end.z < 0.0 && start.z >= 0.0 ) { + + trimSegment( end, start ); + + } + + } + + // clip space + vec4 clipStart = projectionMatrix * start; + vec4 clipEnd = projectionMatrix * end; + + // ndc space + vec3 ndcStart = clipStart.xyz / clipStart.w; + vec3 ndcEnd = clipEnd.xyz / clipEnd.w; + + // direction + vec2 dir = ndcEnd.xy - ndcStart.xy; + + // account for clip-space aspect ratio + dir.x *= aspect; + dir = normalize( dir ); + + #ifdef WORLD_UNITS + + // get the offset direction as perpendicular to the view vector + vec3 worldDir = normalize( end.xyz - start.xyz ); + vec3 offset; + if ( position.y < 0.5 ) { + + offset = normalize( cross( start.xyz, worldDir ) ); + + } else { + + offset = normalize( cross( end.xyz, worldDir ) ); + + } + + // sign flip + if ( position.x < 0.0 ) offset *= - 1.0; + + float forwardOffset = dot( worldDir, vec3( 0.0, 0.0, 1.0 ) ); + + // don't extend the line if we're rendering dashes because we + // won't be rendering the endcaps + #ifndef USE_DASH + + // extend the line bounds to encompass endcaps + start.xyz += - worldDir * linewidth * 0.5; + end.xyz += worldDir * linewidth * 0.5; + + // shift the position of the quad so it hugs the forward edge of the line + offset.xy -= dir * forwardOffset; + offset.z += 0.5; + + #endif + + // endcaps + if ( position.y > 1.0 || position.y < 0.0 ) { + + offset.xy += dir * 2.0 * forwardOffset; + + } + + // adjust for linewidth + offset *= linewidth * 0.5; + + // set the world position + worldPos = ( position.y < 0.5 ) ? start : end; + worldPos.xyz += offset; + + // project the worldpos + vec4 clip = projectionMatrix * worldPos; + + // shift the depth of the projected points so the line + // segments overlap neatly + vec3 clipPose = ( position.y < 0.5 ) ? ndcStart : ndcEnd; + clip.z = clipPose.z * clip.w; + + #else + + vec2 offset = vec2( dir.y, - dir.x ); + // undo aspect ratio adjustment + dir.x /= aspect; + offset.x /= aspect; + + // sign flip + if ( position.x < 0.0 ) offset *= - 1.0; + + // endcaps + if ( position.y < 0.0 ) { + + offset += - dir; + + } else if ( position.y > 1.0 ) { + + offset += dir; + + } + + // adjust for linewidth + offset *= linewidth; + + // adjust for clip-space to screen-space conversion // maybe resolution should be based on viewport ... + offset /= resolution.y; + + // select end + vec4 clip = ( position.y < 0.5 ) ? clipStart : clipEnd; + + // back to clip space + offset *= clip.w; + + clip.xy += offset; + + #endif + + gl_Position = clip; + + vec4 mvPosition = ( position.y < 0.5 ) ? start : end; // this is an approximation + + #include + #include + #include + + } + `,fragmentShader:` + uniform vec3 diffuse; + uniform float opacity; + uniform float linewidth; + + #ifdef USE_DASH + + uniform float dashOffset; + uniform float dashSize; + uniform float gapSize; + + #endif + + varying float vLineDistance; + + #ifdef WORLD_UNITS + + varying vec4 worldPos; + varying vec3 worldStart; + varying vec3 worldEnd; + + #ifdef USE_DASH + + varying vec2 vUv; + + #endif + + #else + + varying vec2 vUv; + + #endif + + #include + #include + #include + #include + + #ifdef USE_COLOR + #ifdef USE_LINE_COLOR_ALPHA + varying vec4 vLineColor; + #else + varying vec3 vLineColor; + #endif + #endif + + vec2 closestLineToLine(vec3 p1, vec3 p2, vec3 p3, vec3 p4) { + + float mua; + float mub; + + vec3 p13 = p1 - p3; + vec3 p43 = p4 - p3; + + vec3 p21 = p2 - p1; + + float d1343 = dot( p13, p43 ); + float d4321 = dot( p43, p21 ); + float d1321 = dot( p13, p21 ); + float d4343 = dot( p43, p43 ); + float d2121 = dot( p21, p21 ); + + float denom = d2121 * d4343 - d4321 * d4321; + + float numer = d1343 * d4321 - d1321 * d4343; + + mua = numer / denom; + mua = clamp( mua, 0.0, 1.0 ); + mub = ( d1343 + d4321 * ( mua ) ) / d4343; + mub = clamp( mub, 0.0, 1.0 ); + + return vec2( mua, mub ); + + } + + void main() { + + #include + + #ifdef USE_DASH + + if ( vUv.y < - 1.0 || vUv.y > 1.0 ) discard; // discard endcaps + + if ( mod( vLineDistance + dashOffset, dashSize + gapSize ) > dashSize ) discard; // todo - FIX + + #endif + + float alpha = opacity; + + #ifdef WORLD_UNITS + + // Find the closest points on the view ray and the line segment + vec3 rayEnd = normalize( worldPos.xyz ) * 1e5; + vec3 lineDir = worldEnd - worldStart; + vec2 params = closestLineToLine( worldStart, worldEnd, vec3( 0.0, 0.0, 0.0 ), rayEnd ); + + vec3 p1 = worldStart + lineDir * params.x; + vec3 p2 = rayEnd * params.y; + vec3 delta = p1 - p2; + float len = length( delta ); + float norm = len / linewidth; + + #ifndef USE_DASH + + #ifdef USE_ALPHA_TO_COVERAGE + + float dnorm = fwidth( norm ); + alpha = 1.0 - smoothstep( 0.5 - dnorm, 0.5 + dnorm, norm ); + + #else + + if ( norm > 0.5 ) { + + discard; + + } + + #endif + + #endif + + #else + + #ifdef USE_ALPHA_TO_COVERAGE + + // artifacts appear on some hardware if a derivative is taken within a conditional + float a = vUv.x; + float b = ( vUv.y > 0.0 ) ? vUv.y - 1.0 : vUv.y + 1.0; + float len2 = a * a + b * b; + float dlen = fwidth( len2 ); + + if ( abs( vUv.y ) > 1.0 ) { + + alpha = 1.0 - smoothstep( 1.0 - dlen, 1.0 + dlen, len2 ); + + } + + #else + + if ( abs( vUv.y ) > 1.0 ) { + + float a = vUv.x; + float b = ( vUv.y > 0.0 ) ? vUv.y - 1.0 : vUv.y + 1.0; + float len2 = a * a + b * b; + + if ( len2 > 1.0 ) discard; + + } + + #endif + + #endif + + vec4 diffuseColor = vec4( diffuse, alpha ); + #ifdef USE_COLOR + #ifdef USE_LINE_COLOR_ALPHA + diffuseColor *= vLineColor; + #else + diffuseColor.rgb *= vLineColor; + #endif + #endif + + #include + + gl_FragColor = diffuseColor; + + #include + #include <${Z>=154?"colorspace_fragment":"encodings_fragment"}> + #include + #include + + } + `,clipping:!0}),this.isLineMaterial=!0,this.onBeforeCompile=function(){this.transparent?this.defines.USE_LINE_COLOR_ALPHA="1":delete this.defines.USE_LINE_COLOR_ALPHA},Object.defineProperties(this,{color:{enumerable:!0,get:function(){return this.uniforms.diffuse.value},set:function(t){this.uniforms.diffuse.value=t}},worldUnits:{enumerable:!0,get:function(){return"WORLD_UNITS"in this.defines},set:function(t){t===!0?this.defines.WORLD_UNITS="":delete this.defines.WORLD_UNITS}},linewidth:{enumerable:!0,get:function(){return this.uniforms.linewidth.value},set:function(t){this.uniforms.linewidth.value=t}},dashed:{enumerable:!0,get:function(){return"USE_DASH"in this.defines},set(t){!!t!="USE_DASH"in this.defines&&(this.needsUpdate=!0),t===!0?this.defines.USE_DASH="":delete this.defines.USE_DASH}},dashScale:{enumerable:!0,get:function(){return this.uniforms.dashScale.value},set:function(t){this.uniforms.dashScale.value=t}},dashSize:{enumerable:!0,get:function(){return this.uniforms.dashSize.value},set:function(t){this.uniforms.dashSize.value=t}},dashOffset:{enumerable:!0,get:function(){return this.uniforms.dashOffset.value},set:function(t){this.uniforms.dashOffset.value=t}},gapSize:{enumerable:!0,get:function(){return this.uniforms.gapSize.value},set:function(t){this.uniforms.gapSize.value=t}},opacity:{enumerable:!0,get:function(){return this.uniforms.opacity.value},set:function(t){this.uniforms.opacity.value=t}},resolution:{enumerable:!0,get:function(){return this.uniforms.resolution.value},set:function(t){this.uniforms.resolution.value.copy(t)}},alphaToCoverage:{enumerable:!0,get:function(){return"USE_ALPHA_TO_COVERAGE"in this.defines},set:function(t){!!t!="USE_ALPHA_TO_COVERAGE"in this.defines&&(this.needsUpdate=!0),t===!0?(this.defines.USE_ALPHA_TO_COVERAGE="",this.extensions.derivatives=!0):(delete this.defines.USE_ALPHA_TO_COVERAGE,this.extensions.derivatives=!1)}}}),this.setValues(e)}}const T=new M,$=new b,J=new b,c=new M,d=new M,S=new M,I=new b,R=new ce,f=new le,X=new b,C=new j,D=new Q,w=new M;let x,L;function K(l,e,t){return w.set(0,0,-e,1).applyMatrix4(l.projectionMatrix),w.multiplyScalar(1/w.w),w.x=L/t.width,w.y=L/t.height,w.applyMatrix4(l.projectionMatrixInverse),w.multiplyScalar(1/w.w),Math.abs(Math.max(w.x,w.y))}function pe(l,e){const t=l.matrixWorld,s=l.geometry,n=s.attributes.instanceStart,i=s.attributes.instanceEnd,a=Math.min(s.instanceCount,n.count);for(let o=0,p=a;ou&&d.z>u)continue;if(c.z>u){const r=c.z-d.z,h=(c.z-u)/r;c.lerp(d,h)}else if(d.z>u){const r=d.z-c.z,h=(d.z-u)/r;d.lerp(c,h)}c.applyMatrix4(s),d.applyMatrix4(s),c.multiplyScalar(1/c.w),d.multiplyScalar(1/d.w),c.x*=i.x/2,c.y*=i.y/2,d.x*=i.x/2,d.y*=i.y/2,f.start.copy(c),f.start.z=0,f.end.copy(d),f.end.z=0;const A=f.closestPointToPointParameter(I,!0);f.at(A,X);const U=de.lerp(c.z,d.z,A),E=U>=-1&&U<=1,P=I.distanceTo(X)E.size),z=y.useMemo(()=>a?new ne:new me,[a]),[_]=y.useState(()=>new N),A=(s==null||(m=s[0])==null?void 0:m.length)===4?4:3,U=y.useMemo(()=>{const E=a?new W:new te,P=e.map(r=>{const h=Array.isArray(r);return r instanceof b||r instanceof M?[r.x,r.y,r.z]:r instanceof Y?[r.x,r.y,0]:h&&r.length===3?[r[0],r[1],r[2]]:h&&r.length===2?[r[0],r[1],0]:r});if(E.setPositions(P.flat()),s){t=16777215;const r=s.map(h=>h instanceof ue?h.toArray():h);E.setColors(r.flat(),A)}return E},[e,a,s,A]);return y.useLayoutEffect(()=>{z.computeLineDistances()},[e,z]),y.useLayoutEffect(()=>{o?_.defines.USE_DASH="":delete _.defines.USE_DASH,_.needsUpdate=!0},[o,_]),y.useEffect(()=>()=>{U.dispose(),_.dispose()},[U]),y.createElement("primitive",G({object:z,ref:v},p),y.createElement("primitive",{object:U,attach:"geometry"}),y.createElement("primitive",G({object:_,attach:"material",color:t,vertexColors:!!s,resolution:[g.width,g.height],linewidth:(u=n??i)!==null&&u!==void 0?u:1,dashed:o,transparent:A===4},p)))});export{Se as L}; diff --git a/site/assets/LinearTransformation3DView-CiwQ5lqc.js b/site/assets/LinearTransformation3DView-CiwQ5lqc.js new file mode 100644 index 0000000..4abc9a3 --- /dev/null +++ b/site/assets/LinearTransformation3DView-CiwQ5lqc.js @@ -0,0 +1 @@ +import{r as x,j as e,B as y,L as T,V as w}from"./index-DJrAq1Rk.js";import{V as m,C as A,P as L,D}from"./react-three-fiber.esm-DbvaK_kO.js";import{M as P}from"./MatrixInput-BvG_poIz.js";import{g as F,f as R}from"./matrixMath-CNHWal2D.js";import{R as N}from"./refresh-ccw-DTX90cW0.js";import{M as B}from"./mouse-pointer-2-CKfMob4f.js";import{O as W}from"./OrbitControls-C12Qjv1w.js";import{G as Z}from"./Grid-BzfIX0gF.js";import{L as h}from"./Line-DRGYPd7c.js";import{T as E}from"./Text-BaglAl3o.js";import"./extends-CF3RwP-h.js";import"./constants-Br-Ti-Jl.js";const G=(s,t,i)=>s.map((r,l)=>r.map((o,c)=>o+(t[l][c]-o)*i)),M=(s,t)=>({x:s[0][0]*t.x+s[0][1]*t.y+s[0][2]*t.z,y:s[1][0]*t.x+s[1][1]*t.y+s[1][2]*t.z,z:s[2][0]*t.x+s[2][1]*t.y+s[2][2]*t.z}),p=({start:s=new m(0,0,0),end:t,color:i,label:r})=>{const l=new m().subVectors(t,s).normalize(),o=s.distanceTo(t);return o<.01?null:e.jsxs("group",{children:[e.jsx("arrowHelper",{args:[l,s,o,i,.3,.15]}),r&&e.jsx(E,{position:[t.x+.1,t.y+.1,t.z],fontSize:.25,color:i,fontWeight:"bold",anchorX:"left",anchorY:"bottom",outlineWidth:.02,outlineColor:"#000",children:r})]})},H=({matrix:s})=>{const t=x.useMemo(()=>{const i=new L(10,10,20,20),r=i.attributes.position,l=new m;for(let o=0;o{const[s,t]=x.useState([[1,0,0],[0,1,0],[0,0,1]]),[i,r]=x.useState(1),[l,o]=x.useState(!1),[c,v]=x.useState({x:1,y:1,z:1}),k=[[1,0,0],[0,1,0],[0,0,1]],n=x.useMemo(()=>G(k,s,i),[s,i]),b=x.useMemo(()=>F(n),[n]),z=new m(n[0][0],n[1][0],n[2][0]),V=new m(n[0][1],n[1][1],n[2][1]),C=new m(n[0][2],n[1][2],n[2][2]),f=M(n,c),j=new m(f.x,f.y,f.z),g=new m(c.x,c.y,c.z);x.useEffect(()=>{let a;if(l){const d=()=>{r(u=>u>=1?(o(!1),1):u+.02),a=requestAnimationFrame(d)};a=requestAnimationFrame(d)}return()=>cancelAnimationFrame(a)},[l]);const S=a=>{switch(r(0),setTimeout(()=>o(!0),100),a){case"identity":t([[1,0,0],[0,1,0],[0,0,1]]);break;case"scale":t([[2,0,0],[0,.5,0],[0,0,1]]);break;case"shear":t([[1,1,0],[0,1,0],[0,0,1]]);break;case"rotateZ":const d=Math.PI/4;t([[Math.cos(d),-Math.sin(d),0],[Math.sin(d),Math.cos(d),0],[0,0,1]]);break;case"projection":t([[1,0,0],[0,1,0],[0,0,0]]);break;case"random":t([[(Math.random()-.5)*3,(Math.random()-.5)*3,(Math.random()-.5)*3],[(Math.random()-.5)*3,(Math.random()-.5)*3,(Math.random()-.5)*3],[(Math.random()-.5)*3,(Math.random()-.5)*3,(Math.random()-.5)*3]]);break}};return e.jsxs("div",{className:"space-y-6 h-[calc(100vh-140px)] flex flex-col pb-6",children:[e.jsxs("header",{className:"flex flex-col md:flex-row justify-between items-end border-b border-white/10 pb-4 shrink-0 gap-4",children:[e.jsxs("div",{children:[e.jsxs("h2",{className:"text-3xl font-bold text-white mb-2 flex items-center gap-3",children:[e.jsx(y,{className:"text-cyan-400"})," Matrix Space Warper"]}),e.jsxs("p",{className:"text-slate-400 text-sm max-w-2xl",children:["Visualize how a linear transformation ",e.jsx("span",{className:"font-mono text-cyan-400",children:"T(x) = Ax"})," deforms the entire fabric of space. The blue grid represents the XY plane being transformed."]})]}),e.jsxs("div",{className:"flex gap-6 items-center",children:[e.jsxs("div",{className:"text-right",children:[e.jsx("div",{className:"text-[10px] uppercase text-slate-500 font-bold tracking-widest",children:"Progress"}),e.jsx("div",{className:"flex items-center gap-2",children:e.jsx("input",{type:"range",min:"0",max:"1",step:"0.01",value:i,onChange:a=>r(parseFloat(a.target.value)),className:"w-24 h-1.5 bg-slate-700 rounded-lg appearance-none cursor-pointer accent-cyan-500"})})]}),e.jsxs("div",{className:"text-right pl-6 border-l border-white/10",children:[e.jsx("div",{className:"text-[10px] uppercase text-slate-500 font-bold tracking-widest",children:"Volume Scaling"}),e.jsx("div",{className:`text-2xl font-mono font-bold ${b===0?"text-pink-500":"text-white"}`,children:b!==null?R(b):"Err"})]})]})]}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 flex-1 min-h-0",children:[e.jsxs("div",{className:"lg:col-span-1 flex flex-col gap-6 overflow-y-auto pr-2 custom-scrollbar",children:[e.jsx("div",{className:"grid grid-cols-3 gap-2",children:[{id:"identity",label:"Reset",icon:N},{id:"scale",label:"Scale",icon:T},{id:"shear",label:"Shear",icon:w},{id:"rotateZ",label:"Rot Z",icon:N},{id:"projection",label:"Flat",icon:y},{id:"random",label:"Chaos",icon:w}].map(a=>e.jsxs("button",{onClick:()=>S(a.id),className:"flex flex-col items-center justify-center p-3 bg-slate-900 border border-slate-700 rounded-xl hover:bg-slate-800 hover:border-cyan-500/50 transition-all group",children:[e.jsx(a.icon,{size:16,className:"mb-1 text-slate-500 group-hover:text-cyan-400"}),e.jsx("span",{className:"text-[10px] font-bold uppercase text-slate-400 group-hover:text-white",children:a.label})]},a.id))}),e.jsxs("div",{className:"glass-panel p-5 rounded-2xl border border-slate-700",children:[e.jsx("div",{className:"flex justify-between items-center mb-4",children:e.jsx("h3",{className:"text-xs font-bold text-slate-300 uppercase tracking-widest",children:"Transformation Matrix A"})}),e.jsx(P,{data:s,onChange:a=>{t(a),r(1)},editable:!0,color:"blue"})]}),e.jsxs("div",{className:"bg-slate-900/50 p-5 rounded-2xl border border-slate-800 space-y-4",children:[e.jsxs("h4",{className:"text-xs font-bold text-amber-400 uppercase tracking-widest flex items-center gap-2",children:[e.jsx(B,{size:14})," Test Vector v"]}),e.jsx("div",{className:"grid grid-cols-3 gap-2",children:["x","y","z"].map(a=>e.jsxs("div",{className:"space-y-1",children:[e.jsx("label",{className:"text-[10px] text-slate-500 font-bold uppercase text-center block",children:a}),e.jsx("input",{type:"number",value:c[a],onChange:d=>v(u=>({...u,[a]:parseFloat(d.target.value)})),className:"w-full bg-slate-950 border border-slate-700 rounded px-2 py-1 text-center text-sm font-mono text-amber-100 focus:border-amber-500 outline-none"})]},a))})]})]}),e.jsxs("div",{className:"lg:col-span-3 bg-slate-950 rounded-3xl border border-slate-800 relative overflow-hidden shadow-2xl",children:[e.jsxs(A,{camera:{position:[5,5,8],fov:45},children:[e.jsx("color",{attach:"background",args:["#020617"]}),e.jsx("ambientLight",{intensity:.4}),e.jsx("pointLight",{position:[10,10,10],intensity:1}),e.jsx("pointLight",{position:[-10,-5,-10],intensity:.5,color:"blue"}),e.jsx(W,{makeDefault:!0,enablePan:!0,minDistance:2,maxDistance:40}),e.jsx(Z,{infiniteGrid:!0,sectionSize:3,cellColor:"#1e293b",sectionColor:"#334155",fadeDistance:30,position:[0,-.01,0]}),e.jsxs("group",{position:[0,0,0],children:[e.jsx(h,{points:[[-10,0,0],[10,0,0]],color:"#ef4444",opacity:.3,transparent:!0}),e.jsx(h,{points:[[0,-10,0],[0,10,0]],color:"#10b981",opacity:.3,transparent:!0}),e.jsx(h,{points:[[0,0,-10],[0,0,10]],color:"#3b82f6",opacity:.3,transparent:!0})]}),e.jsx(H,{matrix:n}),e.jsx(p,{end:z,color:"#f472b6",label:"i"}),e.jsx(p,{end:V,color:"#a78bfa",label:"j"}),e.jsx(p,{end:C,color:"#34d399",label:"k"}),e.jsx(p,{end:g,color:"#64748b",label:"v"}),e.jsx(p,{end:j,color:"#fbbf24",label:"Av"}),e.jsx(h,{points:[g,j],color:"#fbbf24",opacity:.4,transparent:!0,lineWidth:1,segments:!0,dashed:!0})]}),e.jsx("div",{className:"absolute bottom-4 right-4 pointer-events-none text-[10px] text-slate-600 font-mono bg-black/20 p-2 rounded backdrop-blur-sm",children:"Left Click: Rotate โ€ข Scroll: Zoom"})]})]})]})};export{te as LinearTransformation3DView}; diff --git a/site/assets/MathRenderer-DoWdgGCt.js b/site/assets/MathRenderer-DoWdgGCt.js new file mode 100644 index 0000000..9dd810b --- /dev/null +++ b/site/assets/MathRenderer-DoWdgGCt.js @@ -0,0 +1,261 @@ +import{r as It,j as fa}from"./index-DJrAq1Rk.js";class u0{constructor(e,t,a){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=t,this.end=a}static range(e,t){return t?!e||!e.loc||!t.loc||e.loc.lexer!==t.loc.lexer?null:new u0(e.loc.lexer,e.loc.start,t.loc.end):e&&e.loc}}class x0{constructor(e,t){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=t}range(e,t){return new x0(t,u0.range(this,e))}}class M{constructor(e,t){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var a="KaTeX parse error: "+e,n,s,o=t&&t.loc;if(o&&o.start<=o.end){var h=o.lexer.input;n=o.start,s=o.end,n===h.length?a+=" at end of input: ":a+=" at position "+(n+1)+": ";var c=h.slice(n,s).replace(/[^]/g,"$&ฬฒ"),p;n>15?p="โ€ฆ"+h.slice(n-15,n):p=h.slice(0,n);var g;s+15":">","<":"<",'"':""","'":"'"},xa=/[&><"']/g;function wa(r){return String(r).replace(xa,e=>ya[e])}var vr=function r(e){return e.type==="ordgroup"||e.type==="color"?e.body.length===1?r(e.body[0]):e:e.type==="font"?r(e.body):e},ka=function(e){var t=vr(e);return t.type==="mathord"||t.type==="textord"||t.type==="atom"},Sa=function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e},Ma=function(e){var t=/^\s*([^\\/#]*?)(?::|�*58|�*3a)/i.exec(e);return t!=null?t[1]:"_relative"},I={contains:pa,deflt:va,escape:wa,hyphenate:ba,getBaseElem:vr,isCharacterBox:ka,protocolFromUrl:Ma},Ae={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format "},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color ",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:r=>"#"+r},macros:{type:"object",cli:"-m, --macro ",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(r,e)=>(e.push(r),e)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:r=>Math.max(0,r),cli:"--min-rule-thickness ",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:r=>Math.max(0,r),cli:"-s, --max-size ",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:r=>Math.max(0,r),cli:"-e, --max-expand ",cliProcessor:r=>r==="Infinity"?1/0:parseInt(r)},globalGroup:{type:"boolean",cli:!1}};function za(r){if(r.default)return r.default;var e=r.type,t=Array.isArray(e)?e[0]:e;if(typeof t!="string")return t.enum[0];switch(t){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}class ct{constructor(e){this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{};for(var t in Ae)if(Ae.hasOwnProperty(t)){var a=Ae[t];this[t]=e[t]!==void 0?a.processor?a.processor(e[t]):e[t]:za(a)}}reportNonstrict(e,t,a){var n=this.strict;if(typeof n=="function"&&(n=n(e,t,a)),!(!n||n==="ignore")){if(n===!0||n==="error")throw new M("LaTeX-incompatible input and strict mode is set to 'error': "+(t+" ["+e+"]"),a);n==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(t+" ["+e+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+n+"': "+t+" ["+e+"]"))}}useStrictBehavior(e,t,a){var n=this.strict;if(typeof n=="function")try{n=n(e,t,a)}catch{n="error"}return!n||n==="ignore"?!1:n===!0||n==="error"?!0:n==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(t+" ["+e+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+n+"': "+t+" ["+e+"]")),!1)}isTrusted(e){e.url&&!e.protocol&&(e.protocol=I.protocolFromUrl(e.url));var t=typeof this.trust=="function"?this.trust(e):this.trust;return!!t}}class O0{constructor(e,t,a){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=a}sup(){return b0[Aa[this.id]]}sub(){return b0[Ta[this.id]]}fracNum(){return b0[Ba[this.id]]}fracDen(){return b0[Da[this.id]]}cramp(){return b0[Ca[this.id]]}text(){return b0[Na[this.id]]}isTight(){return this.size>=2}}var dt=0,Be=1,_0=2,T0=3,le=4,d0=5,ee=6,n0=7,b0=[new O0(dt,0,!1),new O0(Be,0,!0),new O0(_0,1,!1),new O0(T0,1,!0),new O0(le,2,!1),new O0(d0,2,!0),new O0(ee,3,!1),new O0(n0,3,!0)],Aa=[le,d0,le,d0,ee,n0,ee,n0],Ta=[d0,d0,d0,d0,n0,n0,n0,n0],Ba=[_0,T0,le,d0,ee,n0,ee,n0],Da=[T0,T0,d0,d0,n0,n0,n0,n0],Ca=[Be,Be,T0,T0,d0,d0,n0,n0],Na=[dt,Be,_0,T0,_0,T0,_0,T0],R={DISPLAY:b0[dt],TEXT:b0[_0],SCRIPT:b0[le],SCRIPTSCRIPT:b0[ee]},at=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function qa(r){for(var e=0;e=n[0]&&r<=n[1])return t.name}return null}var Te=[];at.forEach(r=>r.blocks.forEach(e=>Te.push(...e)));function gr(r){for(var e=0;e=Te[e]&&r<=Te[e+1])return!0;return!1}var Q0=80,Ra=function(e,t){return"M95,"+(622+e+t)+` +c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14 +c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54 +c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10 +s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429 +c69,-144,104.5,-217.7,106.5,-221 +l`+e/2.075+" -"+e+` +c5.3,-9.3,12,-14,20,-14 +H400000v`+(40+e)+`H845.2724 +s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7 +c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z +M`+(834+e)+" "+t+"h400000v"+(40+e)+"h-400000z"},Ea=function(e,t){return"M263,"+(601+e+t)+`c0.7,0,18,39.7,52,119 +c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120 +c340,-704.7,510.7,-1060.3,512,-1067 +l`+e/2.084+" -"+e+` +c4.7,-7.3,11,-11,19,-11 +H40000v`+(40+e)+`H1012.3 +s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232 +c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1 +s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26 +c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z +M`+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"},Ia=function(e,t){return"M983 "+(10+e+t)+` +l`+e/3.13+" -"+e+` +c4,-6.7,10,-10,18,-10 H400000v`+(40+e)+` +H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7 +s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744 +c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30 +c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722 +c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5 +c53.7,-170.3,84.5,-266.8,92.5,-289.5z +M`+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"},Oa=function(e,t){return"M424,"+(2398+e+t)+` +c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514 +c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20 +s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121 +s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081 +l`+e/4.223+" -"+e+`c4,-6.7,10,-10,18,-10 H400000 +v`+(40+e)+`H1014.6 +s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185 +c-2,6,-10,9,-24,9 +c-8,0,-12,-0.7,-12,-2z M`+(1001+e)+" "+t+` +h400000v`+(40+e)+"h-400000z"},Ha=function(e,t){return"M473,"+(2713+e+t)+` +c339.3,-1799.3,509.3,-2700,510,-2702 l`+e/5.298+" -"+e+` +c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+e)+`H1017.7 +s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9 +c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200 +c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26 +s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104, +606zM`+(1001+e)+" "+t+"h400000v"+(40+e)+"H1017.7z"},Fa=function(e){var t=e/2;return"M400000 "+e+" H0 L"+t+" 0 l65 45 L145 "+(e-80)+" H400000z"},La=function(e,t,a){var n=a-54-t-e;return"M702 "+(e+t)+"H400000"+(40+e)+` +H742v`+n+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1 +h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170 +c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667 +219 661 l218 661zM702 `+t+"H400000v"+(40+e)+"H742z"},Pa=function(e,t,a){t=1e3*t;var n="";switch(e){case"sqrtMain":n=Ra(t,Q0);break;case"sqrtSize1":n=Ea(t,Q0);break;case"sqrtSize2":n=Ia(t,Q0);break;case"sqrtSize3":n=Oa(t,Q0);break;case"sqrtSize4":n=Ha(t,Q0);break;case"sqrtTall":n=La(t,Q0,a)}return n},Ga=function(e,t){switch(e){case"โŽœ":return"M291 0 H417 V"+t+" H291z M291 0 H417 V"+t+" H291z";case"โˆฃ":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145z";case"โˆฅ":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145z"+("M367 0 H410 V"+t+" H367z M367 0 H410 V"+t+" H367z");case"โŽŸ":return"M457 0 H583 V"+t+" H457z M457 0 H583 V"+t+" H457z";case"โŽข":return"M319 0 H403 V"+t+" H319z M319 0 H403 V"+t+" H319z";case"โŽฅ":return"M263 0 H347 V"+t+" H263z M263 0 H347 V"+t+" H263z";case"โŽช":return"M384 0 H504 V"+t+" H384z M384 0 H504 V"+t+" H384z";case"โ":return"M312 0 H355 V"+t+" H312z M312 0 H355 V"+t+" H312z";case"โ€–":return"M257 0 H300 V"+t+" H257z M257 0 H300 V"+t+" H257z"+("M478 0 H521 V"+t+" H478z M478 0 H521 V"+t+" H478z");default:return""}},Ot={doubleleftarrow:`M262 157 +l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3 + 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28 + 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5 +c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5 + 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87 +-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7 +-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z +m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l +-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5 + 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88 +-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68 +-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18 +-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782 +c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3 +-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120 + 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8 +-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247 +c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208 + 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3 + 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202 + l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117 +-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7 + 5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13 + 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688 + 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7 +-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80 +H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0 + 435 0h399565z`,leftgroupunder:`M400000 262 +H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219 + 435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3 +-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5 +-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7 +-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5 + 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3 +-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7 +-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z +m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333 + 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5 + 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667 +-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12 + 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7 +-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0 +v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5 +-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3 +-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21 + 71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:`M40 281 V428 H0 V94 H40 V241 H400000 v40z +M40 281 V428 H0 V94 H40 V241 H400000 v40z`,leftmapsto:`M40 281 V448H0V74H40V241H400000v40z +M40 281 V448H0V74H40V241H400000v40z`,leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23 +-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8 +c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3 + 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:`M0 50 h400000 v40H0z m0 194h40000v40H0z +M0 50 h400000 v40H0z m0 194h40000v40H0z`,midbrace:`M200428 334 +c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14 +-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7 + 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11 + 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214 +c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14 + 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3 + 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0 +-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6 +-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z +m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8 +60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8 +-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z +m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2 +c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6 +-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z +m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0 +85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8 +-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z +m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1 +c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128 +-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 + 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 + 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85 +-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5 +-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67 + 151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l +-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5 +s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1 +c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3 + 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237 +-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0 + 3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18 + 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3 +-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2 +-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 + 69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11 +-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7 + 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z +m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8 + 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5 +-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95 +-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8 + 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 + 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3 +-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z +m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3 + 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0 +-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21 + 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z +M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`,rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23 + 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32 +-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142 +-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40 + 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69 +-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3 +-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19 +-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101 + 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167 +c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3 + 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42 + 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333 +-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70 + 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7 +-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0 + 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0 + 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128 +-68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418 +-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9 + 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114 +c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751 + 181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457 +-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0 + 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697 + 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696 + -338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345 +-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409 + 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9 + 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409 + -175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5 +3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11 +10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63 +-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1 +-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59 +H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359 +c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22 +c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10 +-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10 +-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10 +-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1, +-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, +-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, +-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, +-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202 +c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5 +c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130 +s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47 +121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6 +s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11 +c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z +M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32 +-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0 +13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39 +-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5 +-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5 +-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67 +151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11 +c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17 +c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21 +c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40 +c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z +M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0 +c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, +-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6 +c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z +M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11 +c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9, +1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7, +-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z +M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0 +c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, +-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6 +c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z +M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},Va=function(e,t){switch(e){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+` v1759 h347 v-84 +H403z M403 1759 V0 H319 V1759 v`+t+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+` v1759 H0 v84 H347z +M347 1759 V0 H263 V1759 v`+t+" v1759 h84z";case"vert":return"M145 15 v585 v"+t+` v585 c2.667,10,9.667,15,21,15 +c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15 +c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+t+" v585 h43z";case"doublevert":return"M145 15 v585 v"+t+` v585 c2.667,10,9.667,15,21,15 +c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15 +c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+t+` v585 h43z +M367 15 v585 v`+t+` v585 c2.667,10,9.667,15,21,15 +c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15 +c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+t+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+t+` v1715 h263 v84 H319z +MM319 602 V0 H403 V602 v`+t+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+t+` v1799 H0 v-84 H319z +MM319 602 V0 H403 V602 v`+t+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+` v602 h84z +M403 1759 V0 H319 V1759 v`+t+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+` v602 h84z +M347 1759 V0 h-84 V1759 v`+t+" v602 h84z";case"lparen":return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1 +c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349, +-36,557 l0,`+(t+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210, +949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9 +c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5, +-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189 +l0,-`+(t+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3, +-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;case"rparen":return`M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3, +63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5 +c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(t+9)+` +c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664 +c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11 +c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17 +c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558 +l0,-`+(t+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7, +-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw new Error("Unknown stretchy delimiter.")}};class he{constructor(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return I.contains(this.classes,e)}toNode(){for(var e=document.createDocumentFragment(),t=0;tt.toText();return this.children.map(e).join("")}}var y0={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},ge={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},Ht={ร…:"A",ร:"D",รž:"o",รฅ:"a",รฐ:"d",รพ:"o",ะ:"A",ะ‘:"B",ะ’:"B",ะ“:"F",ะ”:"A",ะ•:"E",ะ–:"K",ะ—:"3",ะ˜:"N",ะ™:"N",ะš:"K",ะ›:"N",ะœ:"M",ะ:"H",ะž:"O",ะŸ:"N",ะ :"P",ะก:"C",ะข:"T",ะฃ:"y",ะค:"O",ะฅ:"X",ะฆ:"U",ะง:"h",ะจ:"W",ะฉ:"W",ะช:"B",ะซ:"X",ะฌ:"B",ะญ:"3",ะฎ:"X",ะฏ:"R",ะฐ:"a",ะฑ:"b",ะฒ:"a",ะณ:"r",ะด:"y",ะต:"e",ะถ:"m",ะท:"e",ะธ:"n",ะน:"n",ะบ:"n",ะป:"n",ะผ:"m",ะฝ:"n",ะพ:"o",ะฟ:"n",ั€:"p",ั:"c",ั‚:"o",ัƒ:"y",ั„:"b",ั…:"x",ั†:"n",ั‡:"n",ัˆ:"w",ั‰:"w",ัŠ:"a",ั‹:"m",ัŒ:"a",ั:"e",ัŽ:"m",ั:"r"};function Ua(r,e){y0[r]=e}function ft(r,e,t){if(!y0[e])throw new Error("Font metrics not found for font: "+e+".");var a=r.charCodeAt(0),n=y0[e][a];if(!n&&r[0]in Ht&&(a=Ht[r[0]].charCodeAt(0),n=y0[e][a]),!n&&t==="text"&&gr(a)&&(n=y0[e][77]),n)return{depth:n[0],height:n[1],italic:n[2],skew:n[3],width:n[4]}}var Ue={};function Xa(r){var e;if(r>=5?e=0:r>=3?e=1:e=2,!Ue[e]){var t=Ue[e]={cssEmPerMu:ge.quad[e]/18};for(var a in ge)ge.hasOwnProperty(a)&&(t[a]=ge[a][e])}return Ue[e]}var Ya=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],Ft=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],Lt=function(e,t){return t.size<2?e:Ya[e-1][t.size-1]};class A0{constructor(e){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=e.style,this.color=e.color,this.size=e.size||A0.BASESIZE,this.textSize=e.textSize||this.size,this.phantom=!!e.phantom,this.font=e.font||"",this.fontFamily=e.fontFamily||"",this.fontWeight=e.fontWeight||"",this.fontShape=e.fontShape||"",this.sizeMultiplier=Ft[this.size-1],this.maxSize=e.maxSize,this.minRuleThickness=e.minRuleThickness,this._fontMetrics=void 0}extend(e){var t={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};for(var a in e)e.hasOwnProperty(a)&&(t[a]=e[a]);return new A0(t)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:Lt(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:Ft[e-1]})}havingBaseStyle(e){e=e||this.style.text();var t=Lt(A0.BASESIZE,e);return this.size===t&&this.textSize===A0.BASESIZE&&this.style===e?this:this.extend({style:e,size:t})}havingBaseSizing(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:""})}withTextFontWeight(e){return this.extend({fontWeight:e,font:""})}withTextFontShape(e){return this.extend({fontShape:e,font:""})}sizingClasses(e){return e.size!==this.size?["sizing","reset-size"+e.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==A0.BASESIZE?["sizing","reset-size"+this.size,"size"+A0.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=Xa(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}A0.BASESIZE=6;var nt={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},$a={ex:!0,em:!0,mu:!0},br=function(e){return typeof e!="string"&&(e=e.unit),e in nt||e in $a||e==="ex"},K=function(e,t){var a;if(e.unit in nt)a=nt[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if(e.unit==="mu")a=t.fontMetrics().cssEmPerMu;else{var n;if(t.style.isTight()?n=t.havingStyle(t.style.text()):n=t,e.unit==="ex")a=n.fontMetrics().xHeight;else if(e.unit==="em")a=n.fontMetrics().quad;else throw new M("Invalid unit: '"+e.unit+"'");n!==t&&(a*=n.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*a,t.maxSize)},A=function(e){return+e.toFixed(4)+"em"},L0=function(e){return e.filter(t=>t).join(" ")},yr=function(e,t,a){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=a||{},t){t.style.isTight()&&this.classes.push("mtight");var n=t.getColor();n&&(this.style.color=n)}},xr=function(e){var t=document.createElement(e);t.className=L0(this.classes);for(var a in this.style)this.style.hasOwnProperty(a)&&(t.style[a]=this.style[a]);for(var n in this.attributes)this.attributes.hasOwnProperty(n)&&t.setAttribute(n,this.attributes[n]);for(var s=0;s",t};class me{constructor(e,t,a,n){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,yr.call(this,e,a,n),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return I.contains(this.classes,e)}toNode(){return xr.call(this,"span")}toMarkup(){return wr.call(this,"span")}}class pt{constructor(e,t,a,n){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,yr.call(this,t,n),this.children=a||[],this.setAttribute("href",e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return I.contains(this.classes,e)}toNode(){return xr.call(this,"a")}toMarkup(){return wr.call(this,"a")}}class Wa{constructor(e,t,a){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=e,this.classes=["mord"],this.style=a}hasClass(e){return I.contains(this.classes,e)}toNode(){var e=document.createElement("img");e.src=this.src,e.alt=this.alt,e.className="mord";for(var t in this.style)this.style.hasOwnProperty(t)&&(e.style[t]=this.style[t]);return e}toMarkup(){var e=""+this.alt+"0&&(t=document.createElement("span"),t.style.marginRight=A(this.italic)),this.classes.length>0&&(t=t||document.createElement("span"),t.className=L0(this.classes));for(var a in this.style)this.style.hasOwnProperty(a)&&(t=t||document.createElement("span"),t.style[a]=this.style[a]);return t?(t.appendChild(e),t):e}toMarkup(){var e=!1,t="0&&(a+="margin-right:"+this.italic+"em;");for(var n in this.style)this.style.hasOwnProperty(n)&&(a+=I.hyphenate(n)+":"+this.style[n]+";");a&&(e=!0,t+=' style="'+I.escape(a)+'"');var s=I.escape(this.text);return e?(t+=">",t+=s,t+="",t):s}}class D0{constructor(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}toNode(){var e="http://www.w3.org/2000/svg",t=document.createElementNS(e,"svg");for(var a in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,a)&&t.setAttribute(a,this.attributes[a]);for(var n=0;n":""}}class it{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e="http://www.w3.org/2000/svg",t=document.createElementNS(e,"line");for(var a in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,a)&&t.setAttribute(a,this.attributes[a]);return t}toMarkup(){var e=" but got "+String(r)+".")}var Ka={bin:1,close:1,inner:1,open:1,punct:1,rel:1},Ja={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},$={math:{},text:{}};function i(r,e,t,a,n,s){$[r][n]={font:e,group:t,replace:a},s&&a&&($[r][a]=$[r][n])}var l="math",k="text",u="main",d="ams",W="accent-token",D="bin",i0="close",te="inner",q="mathord",_="op-token",h0="open",Re="punct",f="rel",q0="spacing",v="textord";i(l,u,f,"โ‰ก","\\equiv",!0);i(l,u,f,"โ‰บ","\\prec",!0);i(l,u,f,"โ‰ป","\\succ",!0);i(l,u,f,"โˆผ","\\sim",!0);i(l,u,f,"โŠฅ","\\perp");i(l,u,f,"โชฏ","\\preceq",!0);i(l,u,f,"โชฐ","\\succeq",!0);i(l,u,f,"โ‰ƒ","\\simeq",!0);i(l,u,f,"โˆฃ","\\mid",!0);i(l,u,f,"โ‰ช","\\ll",!0);i(l,u,f,"โ‰ซ","\\gg",!0);i(l,u,f,"โ‰","\\asymp",!0);i(l,u,f,"โˆฅ","\\parallel");i(l,u,f,"โ‹ˆ","\\bowtie",!0);i(l,u,f,"โŒฃ","\\smile",!0);i(l,u,f,"โŠ‘","\\sqsubseteq",!0);i(l,u,f,"โŠ’","\\sqsupseteq",!0);i(l,u,f,"โ‰","\\doteq",!0);i(l,u,f,"โŒข","\\frown",!0);i(l,u,f,"โˆ‹","\\ni",!0);i(l,u,f,"โˆ","\\propto",!0);i(l,u,f,"โŠข","\\vdash",!0);i(l,u,f,"โŠฃ","\\dashv",!0);i(l,u,f,"โˆ‹","\\owns");i(l,u,Re,".","\\ldotp");i(l,u,Re,"โ‹…","\\cdotp");i(l,u,v,"#","\\#");i(k,u,v,"#","\\#");i(l,u,v,"&","\\&");i(k,u,v,"&","\\&");i(l,u,v,"โ„ต","\\aleph",!0);i(l,u,v,"โˆ€","\\forall",!0);i(l,u,v,"โ„","\\hbar",!0);i(l,u,v,"โˆƒ","\\exists",!0);i(l,u,v,"โˆ‡","\\nabla",!0);i(l,u,v,"โ™ญ","\\flat",!0);i(l,u,v,"โ„“","\\ell",!0);i(l,u,v,"โ™ฎ","\\natural",!0);i(l,u,v,"โ™ฃ","\\clubsuit",!0);i(l,u,v,"โ„˜","\\wp",!0);i(l,u,v,"โ™ฏ","\\sharp",!0);i(l,u,v,"โ™ข","\\diamondsuit",!0);i(l,u,v,"โ„œ","\\Re",!0);i(l,u,v,"โ™ก","\\heartsuit",!0);i(l,u,v,"โ„‘","\\Im",!0);i(l,u,v,"โ™ ","\\spadesuit",!0);i(l,u,v,"ยง","\\S",!0);i(k,u,v,"ยง","\\S");i(l,u,v,"ยถ","\\P",!0);i(k,u,v,"ยถ","\\P");i(l,u,v,"โ€ ","\\dag");i(k,u,v,"โ€ ","\\dag");i(k,u,v,"โ€ ","\\textdagger");i(l,u,v,"โ€ก","\\ddag");i(k,u,v,"โ€ก","\\ddag");i(k,u,v,"โ€ก","\\textdaggerdbl");i(l,u,i0,"โŽฑ","\\rmoustache",!0);i(l,u,h0,"โŽฐ","\\lmoustache",!0);i(l,u,i0,"โŸฏ","\\rgroup",!0);i(l,u,h0,"โŸฎ","\\lgroup",!0);i(l,u,D,"โˆ“","\\mp",!0);i(l,u,D,"โŠ–","\\ominus",!0);i(l,u,D,"โŠŽ","\\uplus",!0);i(l,u,D,"โŠ“","\\sqcap",!0);i(l,u,D,"โˆ—","\\ast");i(l,u,D,"โŠ”","\\sqcup",!0);i(l,u,D,"โ—ฏ","\\bigcirc",!0);i(l,u,D,"โˆ™","\\bullet",!0);i(l,u,D,"โ€ก","\\ddagger");i(l,u,D,"โ‰€","\\wr",!0);i(l,u,D,"โจฟ","\\amalg");i(l,u,D,"&","\\And");i(l,u,f,"โŸต","\\longleftarrow",!0);i(l,u,f,"โ‡","\\Leftarrow",!0);i(l,u,f,"โŸธ","\\Longleftarrow",!0);i(l,u,f,"โŸถ","\\longrightarrow",!0);i(l,u,f,"โ‡’","\\Rightarrow",!0);i(l,u,f,"โŸน","\\Longrightarrow",!0);i(l,u,f,"โ†”","\\leftrightarrow",!0);i(l,u,f,"โŸท","\\longleftrightarrow",!0);i(l,u,f,"โ‡”","\\Leftrightarrow",!0);i(l,u,f,"โŸบ","\\Longleftrightarrow",!0);i(l,u,f,"โ†ฆ","\\mapsto",!0);i(l,u,f,"โŸผ","\\longmapsto",!0);i(l,u,f,"โ†—","\\nearrow",!0);i(l,u,f,"โ†ฉ","\\hookleftarrow",!0);i(l,u,f,"โ†ช","\\hookrightarrow",!0);i(l,u,f,"โ†˜","\\searrow",!0);i(l,u,f,"โ†ผ","\\leftharpoonup",!0);i(l,u,f,"โ‡€","\\rightharpoonup",!0);i(l,u,f,"โ†™","\\swarrow",!0);i(l,u,f,"โ†ฝ","\\leftharpoondown",!0);i(l,u,f,"โ‡","\\rightharpoondown",!0);i(l,u,f,"โ†–","\\nwarrow",!0);i(l,u,f,"โ‡Œ","\\rightleftharpoons",!0);i(l,d,f,"โ‰ฎ","\\nless",!0);i(l,d,f,"๎€","\\@nleqslant");i(l,d,f,"๎€‘","\\@nleqq");i(l,d,f,"โช‡","\\lneq",!0);i(l,d,f,"โ‰จ","\\lneqq",!0);i(l,d,f,"๎€Œ","\\@lvertneqq");i(l,d,f,"โ‹ฆ","\\lnsim",!0);i(l,d,f,"โช‰","\\lnapprox",!0);i(l,d,f,"โŠ€","\\nprec",!0);i(l,d,f,"โ‹ ","\\npreceq",!0);i(l,d,f,"โ‹จ","\\precnsim",!0);i(l,d,f,"โชน","\\precnapprox",!0);i(l,d,f,"โ‰","\\nsim",!0);i(l,d,f,"๎€†","\\@nshortmid");i(l,d,f,"โˆค","\\nmid",!0);i(l,d,f,"โŠฌ","\\nvdash",!0);i(l,d,f,"โŠญ","\\nvDash",!0);i(l,d,f,"โ‹ช","\\ntriangleleft");i(l,d,f,"โ‹ฌ","\\ntrianglelefteq",!0);i(l,d,f,"โŠŠ","\\subsetneq",!0);i(l,d,f,"๎€š","\\@varsubsetneq");i(l,d,f,"โซ‹","\\subsetneqq",!0);i(l,d,f,"๎€—","\\@varsubsetneqq");i(l,d,f,"โ‰ฏ","\\ngtr",!0);i(l,d,f,"๎€","\\@ngeqslant");i(l,d,f,"๎€Ž","\\@ngeqq");i(l,d,f,"โชˆ","\\gneq",!0);i(l,d,f,"โ‰ฉ","\\gneqq",!0);i(l,d,f,"๎€","\\@gvertneqq");i(l,d,f,"โ‹ง","\\gnsim",!0);i(l,d,f,"โชŠ","\\gnapprox",!0);i(l,d,f,"โЁ","\\nsucc",!0);i(l,d,f,"โ‹ก","\\nsucceq",!0);i(l,d,f,"โ‹ฉ","\\succnsim",!0);i(l,d,f,"โชบ","\\succnapprox",!0);i(l,d,f,"โ‰†","\\ncong",!0);i(l,d,f,"๎€‡","\\@nshortparallel");i(l,d,f,"โˆฆ","\\nparallel",!0);i(l,d,f,"โŠฏ","\\nVDash",!0);i(l,d,f,"โ‹ซ","\\ntriangleright");i(l,d,f,"โ‹ญ","\\ntrianglerighteq",!0);i(l,d,f,"๎€˜","\\@nsupseteqq");i(l,d,f,"โŠ‹","\\supsetneq",!0);i(l,d,f,"๎€›","\\@varsupsetneq");i(l,d,f,"โซŒ","\\supsetneqq",!0);i(l,d,f,"๎€™","\\@varsupsetneqq");i(l,d,f,"โŠฎ","\\nVdash",!0);i(l,d,f,"โชต","\\precneqq",!0);i(l,d,f,"โชถ","\\succneqq",!0);i(l,d,f,"๎€–","\\@nsubseteqq");i(l,d,D,"โŠด","\\unlhd");i(l,d,D,"โŠต","\\unrhd");i(l,d,f,"โ†š","\\nleftarrow",!0);i(l,d,f,"โ†›","\\nrightarrow",!0);i(l,d,f,"โ‡","\\nLeftarrow",!0);i(l,d,f,"โ‡","\\nRightarrow",!0);i(l,d,f,"โ†ฎ","\\nleftrightarrow",!0);i(l,d,f,"โ‡Ž","\\nLeftrightarrow",!0);i(l,d,f,"โ–ณ","\\vartriangle");i(l,d,v,"โ„","\\hslash");i(l,d,v,"โ–ฝ","\\triangledown");i(l,d,v,"โ—Š","\\lozenge");i(l,d,v,"โ“ˆ","\\circledS");i(l,d,v,"ยฎ","\\circledR");i(k,d,v,"ยฎ","\\circledR");i(l,d,v,"โˆก","\\measuredangle",!0);i(l,d,v,"โˆ„","\\nexists");i(l,d,v,"โ„ง","\\mho");i(l,d,v,"โ„ฒ","\\Finv",!0);i(l,d,v,"โ…","\\Game",!0);i(l,d,v,"โ€ต","\\backprime");i(l,d,v,"โ–ฒ","\\blacktriangle");i(l,d,v,"โ–ผ","\\blacktriangledown");i(l,d,v,"โ– ","\\blacksquare");i(l,d,v,"โงซ","\\blacklozenge");i(l,d,v,"โ˜…","\\bigstar");i(l,d,v,"โˆข","\\sphericalangle",!0);i(l,d,v,"โˆ","\\complement",!0);i(l,d,v,"รฐ","\\eth",!0);i(k,u,v,"รฐ","รฐ");i(l,d,v,"โ•ฑ","\\diagup");i(l,d,v,"โ•ฒ","\\diagdown");i(l,d,v,"โ–ก","\\square");i(l,d,v,"โ–ก","\\Box");i(l,d,v,"โ—Š","\\Diamond");i(l,d,v,"ยฅ","\\yen",!0);i(k,d,v,"ยฅ","\\yen",!0);i(l,d,v,"โœ“","\\checkmark",!0);i(k,d,v,"โœ“","\\checkmark");i(l,d,v,"โ„ถ","\\beth",!0);i(l,d,v,"โ„ธ","\\daleth",!0);i(l,d,v,"โ„ท","\\gimel",!0);i(l,d,v,"ฯ","\\digamma",!0);i(l,d,v,"ฯฐ","\\varkappa");i(l,d,h0,"โ”Œ","\\@ulcorner",!0);i(l,d,i0,"โ”","\\@urcorner",!0);i(l,d,h0,"โ””","\\@llcorner",!0);i(l,d,i0,"โ”˜","\\@lrcorner",!0);i(l,d,f,"โ‰ฆ","\\leqq",!0);i(l,d,f,"โฉฝ","\\leqslant",!0);i(l,d,f,"โช•","\\eqslantless",!0);i(l,d,f,"โ‰ฒ","\\lesssim",!0);i(l,d,f,"โช…","\\lessapprox",!0);i(l,d,f,"โ‰Š","\\approxeq",!0);i(l,d,D,"โ‹–","\\lessdot");i(l,d,f,"โ‹˜","\\lll",!0);i(l,d,f,"โ‰ถ","\\lessgtr",!0);i(l,d,f,"โ‹š","\\lesseqgtr",!0);i(l,d,f,"โช‹","\\lesseqqgtr",!0);i(l,d,f,"โ‰‘","\\doteqdot");i(l,d,f,"โ‰“","\\risingdotseq",!0);i(l,d,f,"โ‰’","\\fallingdotseq",!0);i(l,d,f,"โˆฝ","\\backsim",!0);i(l,d,f,"โ‹","\\backsimeq",!0);i(l,d,f,"โซ…","\\subseteqq",!0);i(l,d,f,"โ‹","\\Subset",!0);i(l,d,f,"โŠ","\\sqsubset",!0);i(l,d,f,"โ‰ผ","\\preccurlyeq",!0);i(l,d,f,"โ‹ž","\\curlyeqprec",!0);i(l,d,f,"โ‰พ","\\precsim",!0);i(l,d,f,"โชท","\\precapprox",!0);i(l,d,f,"โŠฒ","\\vartriangleleft");i(l,d,f,"โŠด","\\trianglelefteq");i(l,d,f,"โŠจ","\\vDash",!0);i(l,d,f,"โŠช","\\Vvdash",!0);i(l,d,f,"โŒฃ","\\smallsmile");i(l,d,f,"โŒข","\\smallfrown");i(l,d,f,"โ‰","\\bumpeq",!0);i(l,d,f,"โ‰Ž","\\Bumpeq",!0);i(l,d,f,"โ‰ง","\\geqq",!0);i(l,d,f,"โฉพ","\\geqslant",!0);i(l,d,f,"โช–","\\eqslantgtr",!0);i(l,d,f,"โ‰ณ","\\gtrsim",!0);i(l,d,f,"โช†","\\gtrapprox",!0);i(l,d,D,"โ‹—","\\gtrdot");i(l,d,f,"โ‹™","\\ggg",!0);i(l,d,f,"โ‰ท","\\gtrless",!0);i(l,d,f,"โ‹›","\\gtreqless",!0);i(l,d,f,"โชŒ","\\gtreqqless",!0);i(l,d,f,"โ‰–","\\eqcirc",!0);i(l,d,f,"โ‰—","\\circeq",!0);i(l,d,f,"โ‰œ","\\triangleq",!0);i(l,d,f,"โˆผ","\\thicksim");i(l,d,f,"โ‰ˆ","\\thickapprox");i(l,d,f,"โซ†","\\supseteqq",!0);i(l,d,f,"โ‹‘","\\Supset",!0);i(l,d,f,"โА","\\sqsupset",!0);i(l,d,f,"โ‰ฝ","\\succcurlyeq",!0);i(l,d,f,"โ‹Ÿ","\\curlyeqsucc",!0);i(l,d,f,"โ‰ฟ","\\succsim",!0);i(l,d,f,"โชธ","\\succapprox",!0);i(l,d,f,"โŠณ","\\vartriangleright");i(l,d,f,"โŠต","\\trianglerighteq");i(l,d,f,"โŠฉ","\\Vdash",!0);i(l,d,f,"โˆฃ","\\shortmid");i(l,d,f,"โˆฅ","\\shortparallel");i(l,d,f,"โ‰ฌ","\\between",!0);i(l,d,f,"โ‹”","\\pitchfork",!0);i(l,d,f,"โˆ","\\varpropto");i(l,d,f,"โ—€","\\blacktriangleleft");i(l,d,f,"โˆด","\\therefore",!0);i(l,d,f,"โˆ","\\backepsilon");i(l,d,f,"โ–ถ","\\blacktriangleright");i(l,d,f,"โˆต","\\because",!0);i(l,d,f,"โ‹˜","\\llless");i(l,d,f,"โ‹™","\\gggtr");i(l,d,D,"โŠฒ","\\lhd");i(l,d,D,"โŠณ","\\rhd");i(l,d,f,"โ‰‚","\\eqsim",!0);i(l,u,f,"โ‹ˆ","\\Join");i(l,d,f,"โ‰‘","\\Doteq",!0);i(l,d,D,"โˆ”","\\dotplus",!0);i(l,d,D,"โˆ–","\\smallsetminus");i(l,d,D,"โ‹’","\\Cap",!0);i(l,d,D,"โ‹“","\\Cup",!0);i(l,d,D,"โฉž","\\doublebarwedge",!0);i(l,d,D,"โŠŸ","\\boxminus",!0);i(l,d,D,"โŠž","\\boxplus",!0);i(l,d,D,"โ‹‡","\\divideontimes",!0);i(l,d,D,"โ‹‰","\\ltimes",!0);i(l,d,D,"โ‹Š","\\rtimes",!0);i(l,d,D,"โ‹‹","\\leftthreetimes",!0);i(l,d,D,"โ‹Œ","\\rightthreetimes",!0);i(l,d,D,"โ‹","\\curlywedge",!0);i(l,d,D,"โ‹Ž","\\curlyvee",!0);i(l,d,D,"โŠ","\\circleddash",!0);i(l,d,D,"โŠ›","\\circledast",!0);i(l,d,D,"โ‹…","\\centerdot");i(l,d,D,"โŠบ","\\intercal",!0);i(l,d,D,"โ‹’","\\doublecap");i(l,d,D,"โ‹“","\\doublecup");i(l,d,D,"โŠ ","\\boxtimes",!0);i(l,d,f,"โ‡ข","\\dashrightarrow",!0);i(l,d,f,"โ‡ ","\\dashleftarrow",!0);i(l,d,f,"โ‡‡","\\leftleftarrows",!0);i(l,d,f,"โ‡†","\\leftrightarrows",!0);i(l,d,f,"โ‡š","\\Lleftarrow",!0);i(l,d,f,"โ†ž","\\twoheadleftarrow",!0);i(l,d,f,"โ†ข","\\leftarrowtail",!0);i(l,d,f,"โ†ซ","\\looparrowleft",!0);i(l,d,f,"โ‡‹","\\leftrightharpoons",!0);i(l,d,f,"โ†ถ","\\curvearrowleft",!0);i(l,d,f,"โ†บ","\\circlearrowleft",!0);i(l,d,f,"โ†ฐ","\\Lsh",!0);i(l,d,f,"โ‡ˆ","\\upuparrows",!0);i(l,d,f,"โ†ฟ","\\upharpoonleft",!0);i(l,d,f,"โ‡ƒ","\\downharpoonleft",!0);i(l,u,f,"โŠถ","\\origof",!0);i(l,u,f,"โŠท","\\imageof",!0);i(l,d,f,"โŠธ","\\multimap",!0);i(l,d,f,"โ†ญ","\\leftrightsquigarrow",!0);i(l,d,f,"โ‡‰","\\rightrightarrows",!0);i(l,d,f,"โ‡„","\\rightleftarrows",!0);i(l,d,f,"โ† ","\\twoheadrightarrow",!0);i(l,d,f,"โ†ฃ","\\rightarrowtail",!0);i(l,d,f,"โ†ฌ","\\looparrowright",!0);i(l,d,f,"โ†ท","\\curvearrowright",!0);i(l,d,f,"โ†ป","\\circlearrowright",!0);i(l,d,f,"โ†ฑ","\\Rsh",!0);i(l,d,f,"โ‡Š","\\downdownarrows",!0);i(l,d,f,"โ†พ","\\upharpoonright",!0);i(l,d,f,"โ‡‚","\\downharpoonright",!0);i(l,d,f,"โ‡","\\rightsquigarrow",!0);i(l,d,f,"โ‡","\\leadsto");i(l,d,f,"โ‡›","\\Rrightarrow",!0);i(l,d,f,"โ†พ","\\restriction");i(l,u,v,"โ€˜","`");i(l,u,v,"$","\\$");i(k,u,v,"$","\\$");i(k,u,v,"$","\\textdollar");i(l,u,v,"%","\\%");i(k,u,v,"%","\\%");i(l,u,v,"_","\\_");i(k,u,v,"_","\\_");i(k,u,v,"_","\\textunderscore");i(l,u,v,"โˆ ","\\angle",!0);i(l,u,v,"โˆž","\\infty",!0);i(l,u,v,"โ€ฒ","\\prime");i(l,u,v,"โ–ณ","\\triangle");i(l,u,v,"ฮ“","\\Gamma",!0);i(l,u,v,"ฮ”","\\Delta",!0);i(l,u,v,"ฮ˜","\\Theta",!0);i(l,u,v,"ฮ›","\\Lambda",!0);i(l,u,v,"ฮž","\\Xi",!0);i(l,u,v,"ฮ ","\\Pi",!0);i(l,u,v,"ฮฃ","\\Sigma",!0);i(l,u,v,"ฮฅ","\\Upsilon",!0);i(l,u,v,"ฮฆ","\\Phi",!0);i(l,u,v,"ฮจ","\\Psi",!0);i(l,u,v,"ฮฉ","\\Omega",!0);i(l,u,v,"A","ฮ‘");i(l,u,v,"B","ฮ’");i(l,u,v,"E","ฮ•");i(l,u,v,"Z","ฮ–");i(l,u,v,"H","ฮ—");i(l,u,v,"I","ฮ™");i(l,u,v,"K","ฮš");i(l,u,v,"M","ฮœ");i(l,u,v,"N","ฮ");i(l,u,v,"O","ฮŸ");i(l,u,v,"P","ฮก");i(l,u,v,"T","ฮค");i(l,u,v,"X","ฮง");i(l,u,v,"ยฌ","\\neg",!0);i(l,u,v,"ยฌ","\\lnot");i(l,u,v,"โŠค","\\top");i(l,u,v,"โŠฅ","\\bot");i(l,u,v,"โˆ…","\\emptyset");i(l,d,v,"โˆ…","\\varnothing");i(l,u,q,"ฮฑ","\\alpha",!0);i(l,u,q,"ฮฒ","\\beta",!0);i(l,u,q,"ฮณ","\\gamma",!0);i(l,u,q,"ฮด","\\delta",!0);i(l,u,q,"ฯต","\\epsilon",!0);i(l,u,q,"ฮถ","\\zeta",!0);i(l,u,q,"ฮท","\\eta",!0);i(l,u,q,"ฮธ","\\theta",!0);i(l,u,q,"ฮน","\\iota",!0);i(l,u,q,"ฮบ","\\kappa",!0);i(l,u,q,"ฮป","\\lambda",!0);i(l,u,q,"ฮผ","\\mu",!0);i(l,u,q,"ฮฝ","\\nu",!0);i(l,u,q,"ฮพ","\\xi",!0);i(l,u,q,"ฮฟ","\\omicron",!0);i(l,u,q,"ฯ€","\\pi",!0);i(l,u,q,"ฯ","\\rho",!0);i(l,u,q,"ฯƒ","\\sigma",!0);i(l,u,q,"ฯ„","\\tau",!0);i(l,u,q,"ฯ…","\\upsilon",!0);i(l,u,q,"ฯ•","\\phi",!0);i(l,u,q,"ฯ‡","\\chi",!0);i(l,u,q,"ฯˆ","\\psi",!0);i(l,u,q,"ฯ‰","\\omega",!0);i(l,u,q,"ฮต","\\varepsilon",!0);i(l,u,q,"ฯ‘","\\vartheta",!0);i(l,u,q,"ฯ–","\\varpi",!0);i(l,u,q,"ฯฑ","\\varrho",!0);i(l,u,q,"ฯ‚","\\varsigma",!0);i(l,u,q,"ฯ†","\\varphi",!0);i(l,u,D,"โˆ—","*",!0);i(l,u,D,"+","+");i(l,u,D,"โˆ’","-",!0);i(l,u,D,"โ‹…","\\cdot",!0);i(l,u,D,"โˆ˜","\\circ",!0);i(l,u,D,"รท","\\div",!0);i(l,u,D,"ยฑ","\\pm",!0);i(l,u,D,"ร—","\\times",!0);i(l,u,D,"โˆฉ","\\cap",!0);i(l,u,D,"โˆช","\\cup",!0);i(l,u,D,"โˆ–","\\setminus",!0);i(l,u,D,"โˆง","\\land");i(l,u,D,"โˆจ","\\lor");i(l,u,D,"โˆง","\\wedge",!0);i(l,u,D,"โˆจ","\\vee",!0);i(l,u,v,"โˆš","\\surd");i(l,u,h0,"โŸจ","\\langle",!0);i(l,u,h0,"โˆฃ","\\lvert");i(l,u,h0,"โˆฅ","\\lVert");i(l,u,i0,"?","?");i(l,u,i0,"!","!");i(l,u,i0,"โŸฉ","\\rangle",!0);i(l,u,i0,"โˆฃ","\\rvert");i(l,u,i0,"โˆฅ","\\rVert");i(l,u,f,"=","=");i(l,u,f,":",":");i(l,u,f,"โ‰ˆ","\\approx",!0);i(l,u,f,"โ‰…","\\cong",!0);i(l,u,f,"โ‰ฅ","\\ge");i(l,u,f,"โ‰ฅ","\\geq",!0);i(l,u,f,"โ†","\\gets");i(l,u,f,">","\\gt",!0);i(l,u,f,"โˆˆ","\\in",!0);i(l,u,f,"๎€ ","\\@not");i(l,u,f,"โŠ‚","\\subset",!0);i(l,u,f,"โŠƒ","\\supset",!0);i(l,u,f,"โІ","\\subseteq",!0);i(l,u,f,"โЇ","\\supseteq",!0);i(l,d,f,"โŠˆ","\\nsubseteq",!0);i(l,d,f,"โЉ","\\nsupseteq",!0);i(l,u,f,"โŠจ","\\models");i(l,u,f,"โ†","\\leftarrow",!0);i(l,u,f,"โ‰ค","\\le");i(l,u,f,"โ‰ค","\\leq",!0);i(l,u,f,"<","\\lt",!0);i(l,u,f,"โ†’","\\rightarrow",!0);i(l,u,f,"โ†’","\\to");i(l,d,f,"โ‰ฑ","\\ngeq",!0);i(l,d,f,"โ‰ฐ","\\nleq",!0);i(l,u,q0,"ย ","\\ ");i(l,u,q0,"ย ","\\space");i(l,u,q0,"ย ","\\nobreakspace");i(k,u,q0,"ย ","\\ ");i(k,u,q0,"ย "," ");i(k,u,q0,"ย ","\\space");i(k,u,q0,"ย ","\\nobreakspace");i(l,u,q0,null,"\\nobreak");i(l,u,q0,null,"\\allowbreak");i(l,u,Re,",",",");i(l,u,Re,";",";");i(l,d,D,"โŠผ","\\barwedge",!0);i(l,d,D,"โŠป","\\veebar",!0);i(l,u,D,"โŠ™","\\odot",!0);i(l,u,D,"โŠ•","\\oplus",!0);i(l,u,D,"โŠ—","\\otimes",!0);i(l,u,v,"โˆ‚","\\partial",!0);i(l,u,D,"โŠ˜","\\oslash",!0);i(l,d,D,"โŠš","\\circledcirc",!0);i(l,d,D,"โŠก","\\boxdot",!0);i(l,u,D,"โ–ณ","\\bigtriangleup");i(l,u,D,"โ–ฝ","\\bigtriangledown");i(l,u,D,"โ€ ","\\dagger");i(l,u,D,"โ‹„","\\diamond");i(l,u,D,"โ‹†","\\star");i(l,u,D,"โ—ƒ","\\triangleleft");i(l,u,D,"โ–น","\\triangleright");i(l,u,h0,"{","\\{");i(k,u,v,"{","\\{");i(k,u,v,"{","\\textbraceleft");i(l,u,i0,"}","\\}");i(k,u,v,"}","\\}");i(k,u,v,"}","\\textbraceright");i(l,u,h0,"{","\\lbrace");i(l,u,i0,"}","\\rbrace");i(l,u,h0,"[","\\lbrack",!0);i(k,u,v,"[","\\lbrack",!0);i(l,u,i0,"]","\\rbrack",!0);i(k,u,v,"]","\\rbrack",!0);i(l,u,h0,"(","\\lparen",!0);i(l,u,i0,")","\\rparen",!0);i(k,u,v,"<","\\textless",!0);i(k,u,v,">","\\textgreater",!0);i(l,u,h0,"โŒŠ","\\lfloor",!0);i(l,u,i0,"โŒ‹","\\rfloor",!0);i(l,u,h0,"โŒˆ","\\lceil",!0);i(l,u,i0,"โŒ‰","\\rceil",!0);i(l,u,v,"\\","\\backslash");i(l,u,v,"โˆฃ","|");i(l,u,v,"โˆฃ","\\vert");i(k,u,v,"|","\\textbar",!0);i(l,u,v,"โˆฅ","\\|");i(l,u,v,"โˆฅ","\\Vert");i(k,u,v,"โˆฅ","\\textbardbl");i(k,u,v,"~","\\textasciitilde");i(k,u,v,"\\","\\textbackslash");i(k,u,v,"^","\\textasciicircum");i(l,u,f,"โ†‘","\\uparrow",!0);i(l,u,f,"โ‡‘","\\Uparrow",!0);i(l,u,f,"โ†“","\\downarrow",!0);i(l,u,f,"โ‡“","\\Downarrow",!0);i(l,u,f,"โ†•","\\updownarrow",!0);i(l,u,f,"โ‡•","\\Updownarrow",!0);i(l,u,_,"โˆ","\\coprod");i(l,u,_,"โ‹","\\bigvee");i(l,u,_,"โ‹€","\\bigwedge");i(l,u,_,"โจ„","\\biguplus");i(l,u,_,"โ‹‚","\\bigcap");i(l,u,_,"โ‹ƒ","\\bigcup");i(l,u,_,"โˆซ","\\int");i(l,u,_,"โˆซ","\\intop");i(l,u,_,"โˆฌ","\\iint");i(l,u,_,"โˆญ","\\iiint");i(l,u,_,"โˆ","\\prod");i(l,u,_,"โˆ‘","\\sum");i(l,u,_,"โจ‚","\\bigotimes");i(l,u,_,"โจ","\\bigoplus");i(l,u,_,"โจ€","\\bigodot");i(l,u,_,"โˆฎ","\\oint");i(l,u,_,"โˆฏ","\\oiint");i(l,u,_,"โˆฐ","\\oiiint");i(l,u,_,"โจ†","\\bigsqcup");i(l,u,_,"โˆซ","\\smallint");i(k,u,te,"โ€ฆ","\\textellipsis");i(l,u,te,"โ€ฆ","\\mathellipsis");i(k,u,te,"โ€ฆ","\\ldots",!0);i(l,u,te,"โ€ฆ","\\ldots",!0);i(l,u,te,"โ‹ฏ","\\@cdots",!0);i(l,u,te,"โ‹ฑ","\\ddots",!0);i(l,u,v,"โ‹ฎ","\\varvdots");i(l,u,W,"หŠ","\\acute");i(l,u,W,"ห‹","\\grave");i(l,u,W,"ยจ","\\ddot");i(l,u,W,"~","\\tilde");i(l,u,W,"ห‰","\\bar");i(l,u,W,"ห˜","\\breve");i(l,u,W,"ห‡","\\check");i(l,u,W,"^","\\hat");i(l,u,W,"โƒ—","\\vec");i(l,u,W,"ห™","\\dot");i(l,u,W,"หš","\\mathring");i(l,u,q,"๎„ฑ","\\@imath");i(l,u,q,"๎ˆท","\\@jmath");i(l,u,v,"ฤฑ","ฤฑ");i(l,u,v,"ศท","ศท");i(k,u,v,"ฤฑ","\\i",!0);i(k,u,v,"ศท","\\j",!0);i(k,u,v,"รŸ","\\ss",!0);i(k,u,v,"รฆ","\\ae",!0);i(k,u,v,"ล“","\\oe",!0);i(k,u,v,"รธ","\\o",!0);i(k,u,v,"ร†","\\AE",!0);i(k,u,v,"ล’","\\OE",!0);i(k,u,v,"ร˜","\\O",!0);i(k,u,W,"หŠ","\\'");i(k,u,W,"ห‹","\\`");i(k,u,W,"ห†","\\^");i(k,u,W,"หœ","\\~");i(k,u,W,"ห‰","\\=");i(k,u,W,"ห˜","\\u");i(k,u,W,"ห™","\\.");i(k,u,W,"ยธ","\\c");i(k,u,W,"หš","\\r");i(k,u,W,"ห‡","\\v");i(k,u,W,"ยจ",'\\"');i(k,u,W,"ห","\\H");i(k,u,W,"โ—ฏ","\\textcircled");var kr={"--":!0,"---":!0,"``":!0,"''":!0};i(k,u,v,"โ€“","--",!0);i(k,u,v,"โ€“","\\textendash");i(k,u,v,"โ€”","---",!0);i(k,u,v,"โ€”","\\textemdash");i(k,u,v,"โ€˜","`",!0);i(k,u,v,"โ€˜","\\textquoteleft");i(k,u,v,"โ€™","'",!0);i(k,u,v,"โ€™","\\textquoteright");i(k,u,v,"โ€œ","``",!0);i(k,u,v,"โ€œ","\\textquotedblleft");i(k,u,v,"โ€","''",!0);i(k,u,v,"โ€","\\textquotedblright");i(l,u,v,"ยฐ","\\degree",!0);i(k,u,v,"ยฐ","\\degree");i(k,u,v,"ยฐ","\\textdegree",!0);i(l,u,v,"ยฃ","\\pounds");i(l,u,v,"ยฃ","\\mathsterling",!0);i(k,u,v,"ยฃ","\\pounds");i(k,u,v,"ยฃ","\\textsterling",!0);i(l,d,v,"โœ ","\\maltese");i(k,d,v,"โœ ","\\maltese");var Gt='0123456789/@."';for(var Xe=0;Xe0)return g0(s,p,n,t,o.concat(g));if(c){var y,w;if(c==="boldsymbol"){var x=e1(s,n,t,o,a);y=x.fontName,w=[x.fontClass]}else h?(y=zr[c].fontName,w=[c]):(y=we(c,t.fontWeight,t.fontShape),w=[c,t.fontWeight,t.fontShape]);if(Ee(s,y,n).metrics)return g0(s,y,n,t,o.concat(w));if(kr.hasOwnProperty(s)&&y.slice(0,10)==="Typewriter"){for(var z=[],T=0;T{if(L0(r.classes)!==L0(e.classes)||r.skew!==e.skew||r.maxFontSize!==e.maxFontSize)return!1;if(r.classes.length===1){var t=r.classes[0];if(t==="mbin"||t==="mord")return!1}for(var a in r.style)if(r.style.hasOwnProperty(a)&&r.style[a]!==e.style[a])return!1;for(var n in e.style)if(e.style.hasOwnProperty(n)&&r.style[n]!==e.style[n])return!1;return!0},a1=r=>{for(var e=0;et&&(t=o.height),o.depth>a&&(a=o.depth),o.maxFontSize>n&&(n=o.maxFontSize)}e.height=t,e.depth=a,e.maxFontSize=n},l0=function(e,t,a,n){var s=new me(e,t,a,n);return vt(s),s},Sr=(r,e,t,a)=>new me(r,e,t,a),n1=function(e,t,a){var n=l0([e],[],t);return n.height=Math.max(a||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),n.style.borderBottomWidth=A(n.height),n.maxFontSize=1,n},i1=function(e,t,a,n){var s=new pt(e,t,a,n);return vt(s),s},Mr=function(e){var t=new he(e);return vt(t),t},s1=function(e,t){return e instanceof he?l0([],[e],t):e},l1=function(e){if(e.positionType==="individualShift"){for(var t=e.children,a=[t[0]],n=-t[0].shift-t[0].elem.depth,s=n,o=1;o{var t=l0(["mspace"],[],e),a=K(r,e);return t.style.marginRight=A(a),t},we=function(e,t,a){var n="";switch(e){case"amsrm":n="AMS";break;case"textrm":n="Main";break;case"textsf":n="SansSerif";break;case"texttt":n="Typewriter";break;default:n=e}var s;return t==="textbf"&&a==="textit"?s="BoldItalic":t==="textbf"?s="Bold":t==="textit"?s="Italic":s="Regular",n+"-"+s},zr={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},Ar={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},h1=function(e,t){var[a,n,s]=Ar[e],o=new P0(a),h=new D0([o],{width:A(n),height:A(s),style:"width:"+A(n),viewBox:"0 0 "+1e3*n+" "+1e3*s,preserveAspectRatio:"xMinYMin"}),c=Sr(["overlay"],[h],t);return c.height=s,c.style.height=A(s),c.style.width=A(n),c},b={fontMap:zr,makeSymbol:g0,mathsym:_a,makeSpan:l0,makeSvgSpan:Sr,makeLineSpan:n1,makeAnchor:i1,makeFragment:Mr,wrapFragment:s1,makeVList:o1,makeOrd:t1,makeGlue:u1,staticSvg:h1,svgData:Ar,tryCombineChars:a1},Z={number:3,unit:"mu"},Y0={number:4,unit:"mu"},z0={number:5,unit:"mu"},m1={mord:{mop:Z,mbin:Y0,mrel:z0,minner:Z},mop:{mord:Z,mop:Z,mrel:z0,minner:Z},mbin:{mord:Y0,mop:Y0,mopen:Y0,minner:Y0},mrel:{mord:z0,mop:z0,mopen:z0,minner:z0},mopen:{},mclose:{mop:Z,mbin:Y0,mrel:z0,minner:Z},mpunct:{mord:Z,mop:Z,mrel:z0,mopen:Z,mclose:Z,mpunct:Z,minner:Z},minner:{mord:Z,mop:Z,mbin:Y0,mrel:z0,mopen:Z,mpunct:Z,minner:Z}},c1={mord:{mop:Z},mop:{mord:Z,mop:Z},mbin:{},mrel:{},mopen:{},mclose:{mop:Z},mpunct:{},minner:{mop:Z}},Tr={},Ce={},Ne={};function B(r){for(var{type:e,names:t,props:a,handler:n,htmlBuilder:s,mathmlBuilder:o}=r,h={type:e,numArgs:a.numArgs,argTypes:a.argTypes,allowedInArgument:!!a.allowedInArgument,allowedInText:!!a.allowedInText,allowedInMath:a.allowedInMath===void 0?!0:a.allowedInMath,numOptionalArgs:a.numOptionalArgs||0,infix:!!a.infix,primitive:!!a.primitive,handler:n},c=0;c{var C=T.classes[0],N=z.classes[0];C==="mbin"&&I.contains(f1,N)?T.classes[0]="mord":N==="mbin"&&I.contains(d1,C)&&(z.classes[0]="mord")},{node:y},w,x),$t(s,(z,T)=>{var C=lt(T),N=lt(z),O=C&&N?z.hasClass("mtight")?c1[C][N]:m1[C][N]:null;if(O)return b.makeGlue(O,p)},{node:y},w,x),s},$t=function r(e,t,a,n,s){n&&e.push(n);for(var o=0;ow=>{e.splice(y+1,0,w),o++})(o)}n&&e.pop()},Br=function(e){return e instanceof he||e instanceof pt||e instanceof me&&e.hasClass("enclosing")?e:null},g1=function r(e,t){var a=Br(e);if(a){var n=a.children;if(n.length){if(t==="right")return r(n[n.length-1],"right");if(t==="left")return r(n[0],"left")}}return e},lt=function(e,t){return e?(t&&(e=g1(e,t)),v1[e.classes[0]]||null):null},oe=function(e,t){var a=["nulldelimiter"].concat(e.baseSizingClasses());return C0(t.concat(a))},P=function(e,t,a){if(!e)return C0();if(Ce[e.type]){var n=Ce[e.type](e,t);if(a&&t.size!==a.size){n=C0(t.sizingClasses(a),[n],t);var s=t.sizeMultiplier/a.sizeMultiplier;n.height*=s,n.depth*=s}return n}else throw new M("Got group of unknown type: '"+e.type+"'")};function ke(r,e){var t=C0(["base"],r,e),a=C0(["strut"]);return a.style.height=A(t.height+t.depth),t.depth&&(a.style.verticalAlign=A(-t.depth)),t.children.unshift(a),t}function ot(r,e){var t=null;r.length===1&&r[0].type==="tag"&&(t=r[0].tag,r=r[0].body);var a=t0(r,e,"root"),n;a.length===2&&a[1].hasClass("tag")&&(n=a.pop());for(var s=[],o=[],h=0;h0&&(s.push(ke(o,e)),o=[]),s.push(a[h]));o.length>0&&s.push(ke(o,e));var p;t?(p=ke(t0(t,e,!0)),p.classes=["tag"],s.push(p)):n&&s.push(n);var g=C0(["katex-html"],s);if(g.setAttribute("aria-hidden","true"),p){var y=p.children[0];y.style.height=A(g.height+g.depth),g.depth&&(y.style.verticalAlign=A(-g.depth))}return g}function Dr(r){return new he(r)}class c0{constructor(e,t,a){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=t||[],this.classes=a||[]}setAttribute(e,t){this.attributes[e]=t}getAttribute(e){return this.attributes[e]}toNode(){var e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);this.classes.length>0&&(e.className=L0(this.classes));for(var a=0;a0&&(e+=' class ="'+I.escape(L0(this.classes))+'"'),e+=">";for(var a=0;a",e}toText(){return this.children.map(e=>e.toText()).join("")}}class ie{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return I.escape(this.toText())}toText(){return this.text}}class b1{constructor(e){this.width=void 0,this.character=void 0,this.width=e,e>=.05555&&e<=.05556?this.character="โ€Š":e>=.1666&&e<=.1667?this.character="โ€‰":e>=.2222&&e<=.2223?this.character="โ€…":e>=.2777&&e<=.2778?this.character="โ€…โ€Š":e>=-.05556&&e<=-.05555?this.character="โ€Šโฃ":e>=-.1667&&e<=-.1666?this.character="โ€‰โฃ":e>=-.2223&&e<=-.2222?this.character="โŸโฃ":e>=-.2778&&e<=-.2777?this.character="โ€…โฃ":this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return e.setAttribute("width",A(this.width)),e}toMarkup(){return this.character?""+this.character+"":''}toText(){return this.character?this.character:" "}}var S={MathNode:c0,TextNode:ie,SpaceNode:b1,newDocumentFragment:Dr},p0=function(e,t,a){return $[t][e]&&$[t][e].replace&&e.charCodeAt(0)!==55349&&!(kr.hasOwnProperty(e)&&a&&(a.fontFamily&&a.fontFamily.slice(4,6)==="tt"||a.font&&a.font.slice(4,6)==="tt"))&&(e=$[t][e].replace),new S.TextNode(e)},gt=function(e){return e.length===1?e[0]:new S.MathNode("mrow",e)},bt=function(e,t){if(t.fontFamily==="texttt")return"monospace";if(t.fontFamily==="textsf")return t.fontShape==="textit"&&t.fontWeight==="textbf"?"sans-serif-bold-italic":t.fontShape==="textit"?"sans-serif-italic":t.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(t.fontShape==="textit"&&t.fontWeight==="textbf")return"bold-italic";if(t.fontShape==="textit")return"italic";if(t.fontWeight==="textbf")return"bold";var a=t.font;if(!a||a==="mathnormal")return null;var n=e.mode;if(a==="mathit")return"italic";if(a==="boldsymbol")return e.type==="textord"?"bold":"bold-italic";if(a==="mathbf")return"bold";if(a==="mathbb")return"double-struck";if(a==="mathfrak")return"fraktur";if(a==="mathscr"||a==="mathcal")return"script";if(a==="mathsf")return"sans-serif";if(a==="mathtt")return"monospace";var s=e.text;if(I.contains(["\\imath","\\jmath"],s))return null;$[n][s]&&$[n][s].replace&&(s=$[n][s].replace);var o=b.fontMap[a].fontName;return ft(s,o,n)?b.fontMap[a].variant:null},o0=function(e,t,a){if(e.length===1){var n=Y(e[0],t);return a&&n instanceof c0&&n.type==="mo"&&(n.setAttribute("lspace","0em"),n.setAttribute("rspace","0em")),[n]}for(var s=[],o,h=0;h0&&(y.text=y.text.slice(0,1)+"ฬธ"+y.text.slice(1),s.pop())}}}s.push(c),o=c}return s},G0=function(e,t,a){return gt(o0(e,t,a))},Y=function(e,t){if(!e)return new S.MathNode("mrow");if(Ne[e.type]){var a=Ne[e.type](e,t);return a}else throw new M("Got group of unknown type: '"+e.type+"'")};function Wt(r,e,t,a,n){var s=o0(r,t),o;s.length===1&&s[0]instanceof c0&&I.contains(["mrow","mtable"],s[0].type)?o=s[0]:o=new S.MathNode("mrow",s);var h=new S.MathNode("annotation",[new S.TextNode(e)]);h.setAttribute("encoding","application/x-tex");var c=new S.MathNode("semantics",[o,h]),p=new S.MathNode("math",[c]);p.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),a&&p.setAttribute("display","block");var g=n?"katex":"katex-mathml";return b.makeSpan([g],[p])}var Cr=function(e){return new A0({style:e.displayMode?R.DISPLAY:R.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},Nr=function(e,t){if(t.displayMode){var a=["katex-display"];t.leqno&&a.push("leqno"),t.fleqn&&a.push("fleqn"),e=b.makeSpan(a,[e])}return e},y1=function(e,t,a){var n=Cr(a),s;if(a.output==="mathml")return Wt(e,t,n,a.displayMode,!0);if(a.output==="html"){var o=ot(e,n);s=b.makeSpan(["katex"],[o])}else{var h=Wt(e,t,n,a.displayMode,!1),c=ot(e,n);s=b.makeSpan(["katex"],[h,c])}return Nr(s,a)},x1=function(e,t,a){var n=Cr(a),s=ot(e,n),o=b.makeSpan(["katex"],[s]);return Nr(o,a)},w1={widehat:"^",widecheck:"ห‡",widetilde:"~",utilde:"~",overleftarrow:"โ†",underleftarrow:"โ†",xleftarrow:"โ†",overrightarrow:"โ†’",underrightarrow:"โ†’",xrightarrow:"โ†’",underbrace:"โŸ",overbrace:"โž",overgroup:"โ ",undergroup:"โก",overleftrightarrow:"โ†”",underleftrightarrow:"โ†”",xleftrightarrow:"โ†”",Overrightarrow:"โ‡’",xRightarrow:"โ‡’",overleftharpoon:"โ†ผ",xleftharpoonup:"โ†ผ",overrightharpoon:"โ‡€",xrightharpoonup:"โ‡€",xLeftarrow:"โ‡",xLeftrightarrow:"โ‡”",xhookleftarrow:"โ†ฉ",xhookrightarrow:"โ†ช",xmapsto:"โ†ฆ",xrightharpoondown:"โ‡",xleftharpoondown:"โ†ฝ",xrightleftharpoons:"โ‡Œ",xleftrightharpoons:"โ‡‹",xtwoheadleftarrow:"โ†ž",xtwoheadrightarrow:"โ† ",xlongequal:"=",xtofrom:"โ‡„",xrightleftarrows:"โ‡„",xrightequilibrium:"โ‡Œ",xleftequilibrium:"โ‡‹","\\cdrightarrow":"โ†’","\\cdleftarrow":"โ†","\\cdlongequal":"="},k1=function(e){var t=new S.MathNode("mo",[new S.TextNode(w1[e.replace(/^\\/,"")])]);return t.setAttribute("stretchy","true"),t},S1={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},M1=function(e){return e.type==="ordgroup"?e.body.length:1},z1=function(e,t){function a(){var h=4e5,c=e.label.slice(1);if(I.contains(["widehat","widecheck","widetilde","utilde"],c)){var p=e,g=M1(p.base),y,w,x;if(g>5)c==="widehat"||c==="widecheck"?(y=420,h=2364,x=.42,w=c+"4"):(y=312,h=2340,x=.34,w="tilde4");else{var z=[1,1,2,2,3,3][g];c==="widehat"||c==="widecheck"?(h=[0,1062,2364,2364,2364][z],y=[0,239,300,360,420][z],x=[0,.24,.3,.3,.36,.42][z],w=c+z):(h=[0,600,1033,2339,2340][z],y=[0,260,286,306,312][z],x=[0,.26,.286,.3,.306,.34][z],w="tilde"+z)}var T=new P0(w),C=new D0([T],{width:"100%",height:A(x),viewBox:"0 0 "+h+" "+y,preserveAspectRatio:"none"});return{span:b.makeSvgSpan([],[C],t),minWidth:0,height:x}}else{var N=[],O=S1[c],[H,V,L]=O,U=L/1e3,G=H.length,j,X;if(G===1){var M0=O[3];j=["hide-tail"],X=[M0]}else if(G===2)j=["halfarrow-left","halfarrow-right"],X=["xMinYMin","xMaxYMin"];else if(G===3)j=["brace-left","brace-center","brace-right"],X=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support + `+G+" children.");for(var r0=0;r00&&(n.style.minWidth=A(s)),n},A1=function(e,t,a,n,s){var o,h=e.height+e.depth+a+n;if(/fbox|color|angl/.test(t)){if(o=b.makeSpan(["stretchy",t],[],s),t==="fbox"){var c=s.color&&s.getColor();c&&(o.style.borderColor=c)}}else{var p=[];/^[bx]cancel$/.test(t)&&p.push(new it({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&p.push(new it({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var g=new D0(p,{width:"100%",height:A(h)});o=b.makeSvgSpan([],[g],s)}return o.height=h,o.style.height=A(h),o},N0={encloseSpan:A1,mathMLnode:k1,svgSpan:z1};function F(r,e){if(!r||r.type!==e)throw new Error("Expected node of type "+e+", but got "+(r?"node of type "+r.type:String(r)));return r}function yt(r){var e=Ie(r);if(!e)throw new Error("Expected node of symbol group type, but got "+(r?"node of type "+r.type:String(r)));return e}function Ie(r){return r&&(r.type==="atom"||Ja.hasOwnProperty(r.type))?r:null}var xt=(r,e)=>{var t,a,n;r&&r.type==="supsub"?(a=F(r.base,"accent"),t=a.base,r.base=t,n=Za(P(r,e)),r.base=a):(a=F(r,"accent"),t=a.base);var s=P(t,e.havingCrampedStyle()),o=a.isShifty&&I.isCharacterBox(t),h=0;if(o){var c=I.getBaseElem(t),p=P(c,e.havingCrampedStyle());h=Pt(p).skew}var g=a.label==="\\c",y=g?s.height+s.depth:Math.min(s.height,e.fontMetrics().xHeight),w;if(a.isStretchy)w=N0.svgSpan(a,e),w=b.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"elem",elem:w,wrapperClasses:["svg-align"],wrapperStyle:h>0?{width:"calc(100% - "+A(2*h)+")",marginLeft:A(2*h)}:void 0}]},e);else{var x,z;a.label==="\\vec"?(x=b.staticSvg("vec",e),z=b.svgData.vec[1]):(x=b.makeOrd({mode:a.mode,text:a.label},e,"textord"),x=Pt(x),x.italic=0,z=x.width,g&&(y+=x.depth)),w=b.makeSpan(["accent-body"],[x]);var T=a.label==="\\textcircled";T&&(w.classes.push("accent-full"),y=s.height);var C=h;T||(C-=z/2),w.style.left=A(C),a.label==="\\textcircled"&&(w.style.top=".2em"),w=b.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"kern",size:-y},{type:"elem",elem:w}]},e)}var N=b.makeSpan(["mord","accent"],[w],e);return n?(n.children[0]=N,n.height=Math.max(N.height,n.height),n.classes[0]="mord",n):N},qr=(r,e)=>{var t=r.isStretchy?N0.mathMLnode(r.label):new S.MathNode("mo",[p0(r.label,r.mode)]),a=new S.MathNode("mover",[Y(r.base,e),t]);return a.setAttribute("accent","true"),a},T1=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(r=>"\\"+r).join("|"));B({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(r,e)=>{var t=qe(e[0]),a=!T1.test(r.funcName),n=!a||r.funcName==="\\widehat"||r.funcName==="\\widetilde"||r.funcName==="\\widecheck";return{type:"accent",mode:r.parser.mode,label:r.funcName,isStretchy:a,isShifty:n,base:t}},htmlBuilder:xt,mathmlBuilder:qr});B({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(r,e)=>{var t=e[0],a=r.parser.mode;return a==="math"&&(r.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+r.funcName+" works only in text mode"),a="text"),{type:"accent",mode:a,label:r.funcName,isStretchy:!1,isShifty:!0,base:t}},htmlBuilder:xt,mathmlBuilder:qr});B({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(r,e)=>{var{parser:t,funcName:a}=r,n=e[0];return{type:"accentUnder",mode:t.mode,label:a,base:n}},htmlBuilder:(r,e)=>{var t=P(r.base,e),a=N0.svgSpan(r,e),n=r.label==="\\utilde"?.12:0,s=b.makeVList({positionType:"top",positionData:t.height,children:[{type:"elem",elem:a,wrapperClasses:["svg-align"]},{type:"kern",size:n},{type:"elem",elem:t}]},e);return b.makeSpan(["mord","accentunder"],[s],e)},mathmlBuilder:(r,e)=>{var t=N0.mathMLnode(r.label),a=new S.MathNode("munder",[Y(r.base,e),t]);return a.setAttribute("accentunder","true"),a}});var Se=r=>{var e=new S.MathNode("mpadded",r?[r]:[]);return e.setAttribute("width","+0.6em"),e.setAttribute("lspace","0.3em"),e};B({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(r,e,t){var{parser:a,funcName:n}=r;return{type:"xArrow",mode:a.mode,label:n,body:e[0],below:t[0]}},htmlBuilder(r,e){var t=e.style,a=e.havingStyle(t.sup()),n=b.wrapFragment(P(r.body,a,e),e),s=r.label.slice(0,2)==="\\x"?"x":"cd";n.classes.push(s+"-arrow-pad");var o;r.below&&(a=e.havingStyle(t.sub()),o=b.wrapFragment(P(r.below,a,e),e),o.classes.push(s+"-arrow-pad"));var h=N0.svgSpan(r,e),c=-e.fontMetrics().axisHeight+.5*h.height,p=-e.fontMetrics().axisHeight-.5*h.height-.111;(n.depth>.25||r.label==="\\xleftequilibrium")&&(p-=n.depth);var g;if(o){var y=-e.fontMetrics().axisHeight+o.height+.5*h.height+.111;g=b.makeVList({positionType:"individualShift",children:[{type:"elem",elem:n,shift:p},{type:"elem",elem:h,shift:c},{type:"elem",elem:o,shift:y}]},e)}else g=b.makeVList({positionType:"individualShift",children:[{type:"elem",elem:n,shift:p},{type:"elem",elem:h,shift:c}]},e);return g.children[0].children[0].children[1].classes.push("svg-align"),b.makeSpan(["mrel","x-arrow"],[g],e)},mathmlBuilder(r,e){var t=N0.mathMLnode(r.label);t.setAttribute("minsize",r.label.charAt(0)==="x"?"1.75em":"3.0em");var a;if(r.body){var n=Se(Y(r.body,e));if(r.below){var s=Se(Y(r.below,e));a=new S.MathNode("munderover",[t,s,n])}else a=new S.MathNode("mover",[t,n])}else if(r.below){var o=Se(Y(r.below,e));a=new S.MathNode("munder",[t,o])}else a=Se(),a=new S.MathNode("mover",[t,a]);return a}});var B1=b.makeSpan;function Rr(r,e){var t=t0(r.body,e,!0);return B1([r.mclass],t,e)}function Er(r,e){var t,a=o0(r.body,e);return r.mclass==="minner"?t=new S.MathNode("mpadded",a):r.mclass==="mord"?r.isCharacterBox?(t=a[0],t.type="mi"):t=new S.MathNode("mi",a):(r.isCharacterBox?(t=a[0],t.type="mo"):t=new S.MathNode("mo",a),r.mclass==="mbin"?(t.attributes.lspace="0.22em",t.attributes.rspace="0.22em"):r.mclass==="mpunct"?(t.attributes.lspace="0em",t.attributes.rspace="0.17em"):r.mclass==="mopen"||r.mclass==="mclose"?(t.attributes.lspace="0em",t.attributes.rspace="0em"):r.mclass==="minner"&&(t.attributes.lspace="0.0556em",t.attributes.width="+0.1111em")),t}B({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(r,e){var{parser:t,funcName:a}=r,n=e[0];return{type:"mclass",mode:t.mode,mclass:"m"+a.slice(5),body:Q(n),isCharacterBox:I.isCharacterBox(n)}},htmlBuilder:Rr,mathmlBuilder:Er});var Oe=r=>{var e=r.type==="ordgroup"&&r.body.length?r.body[0]:r;return e.type==="atom"&&(e.family==="bin"||e.family==="rel")?"m"+e.family:"mord"};B({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(r,e){var{parser:t}=r;return{type:"mclass",mode:t.mode,mclass:Oe(e[0]),body:Q(e[1]),isCharacterBox:I.isCharacterBox(e[1])}}});B({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(r,e){var{parser:t,funcName:a}=r,n=e[1],s=e[0],o;a!=="\\stackrel"?o=Oe(n):o="mrel";var h={type:"op",mode:n.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:a!=="\\stackrel",body:Q(n)},c={type:"supsub",mode:s.mode,base:h,sup:a==="\\underset"?null:s,sub:a==="\\underset"?s:null};return{type:"mclass",mode:t.mode,mclass:o,body:[c],isCharacterBox:I.isCharacterBox(c)}},htmlBuilder:Rr,mathmlBuilder:Er});B({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(r,e){var{parser:t}=r;return{type:"pmb",mode:t.mode,mclass:Oe(e[0]),body:Q(e[0])}},htmlBuilder(r,e){var t=t0(r.body,e,!0),a=b.makeSpan([r.mclass],t,e);return a.style.textShadow="0.02em 0.01em 0.04px",a},mathmlBuilder(r,e){var t=o0(r.body,e),a=new S.MathNode("mstyle",t);return a.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),a}});var D1={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},jt=()=>({type:"styling",body:[],mode:"math",style:"display"}),Zt=r=>r.type==="textord"&&r.text==="@",C1=(r,e)=>(r.type==="mathord"||r.type==="atom")&&r.text===e;function N1(r,e,t){var a=D1[r];switch(a){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return t.callFunction(a,[e[0]],[e[1]]);case"\\uparrow":case"\\downarrow":{var n=t.callFunction("\\\\cdleft",[e[0]],[]),s={type:"atom",text:a,mode:"math",family:"rel"},o=t.callFunction("\\Big",[s],[]),h=t.callFunction("\\\\cdright",[e[1]],[]),c={type:"ordgroup",mode:"math",body:[n,o,h]};return t.callFunction("\\\\cdparent",[c],[])}case"\\\\cdlongequal":return t.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var p={type:"textord",text:"\\Vert",mode:"math"};return t.callFunction("\\Big",[p],[])}default:return{type:"textord",text:" ",mode:"math"}}}function q1(r){var e=[];for(r.gullet.beginGroup(),r.gullet.macros.set("\\cr","\\\\\\relax"),r.gullet.beginGroup();;){e.push(r.parseExpression(!1,"\\\\")),r.gullet.endGroup(),r.gullet.beginGroup();var t=r.fetch().text;if(t==="&"||t==="\\\\")r.consume();else if(t==="\\end"){e[e.length-1].length===0&&e.pop();break}else throw new M("Expected \\\\ or \\cr or \\end",r.nextToken)}for(var a=[],n=[a],s=0;s-1))if("<>AV".indexOf(p)>-1)for(var y=0;y<2;y++){for(var w=!0,x=c+1;xAV=|." after @',o[c]);var z=N1(p,g,r),T={type:"styling",body:[z],mode:"math",style:"display"};a.push(T),h=jt()}s%2===0?a.push(h):a.shift(),a=[],n.push(a)}r.gullet.endGroup(),r.gullet.endGroup();var C=new Array(n[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:n,arraystretch:1,addJot:!0,rowGaps:[null],cols:C,colSeparationType:"CD",hLinesBeforeRow:new Array(n.length+1).fill([])}}B({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(r,e){var{parser:t,funcName:a}=r;return{type:"cdlabel",mode:t.mode,side:a.slice(4),label:e[0]}},htmlBuilder(r,e){var t=e.havingStyle(e.style.sup()),a=b.wrapFragment(P(r.label,t,e),e);return a.classes.push("cd-label-"+r.side),a.style.bottom=A(.8-a.depth),a.height=0,a.depth=0,a},mathmlBuilder(r,e){var t=new S.MathNode("mrow",[Y(r.label,e)]);return t=new S.MathNode("mpadded",[t]),t.setAttribute("width","0"),r.side==="left"&&t.setAttribute("lspace","-1width"),t.setAttribute("voffset","0.7em"),t=new S.MathNode("mstyle",[t]),t.setAttribute("displaystyle","false"),t.setAttribute("scriptlevel","1"),t}});B({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(r,e){var{parser:t}=r;return{type:"cdlabelparent",mode:t.mode,fragment:e[0]}},htmlBuilder(r,e){var t=b.wrapFragment(P(r.fragment,e),e);return t.classes.push("cd-vert-arrow"),t},mathmlBuilder(r,e){return new S.MathNode("mrow",[Y(r.fragment,e)])}});B({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(r,e){for(var{parser:t}=r,a=F(e[0],"ordgroup"),n=a.body,s="",o=0;o=1114111)throw new M("\\@char with invalid code point "+s);return c<=65535?p=String.fromCharCode(c):(c-=65536,p=String.fromCharCode((c>>10)+55296,(c&1023)+56320)),{type:"textord",mode:t.mode,text:p}}});var Ir=(r,e)=>{var t=t0(r.body,e.withColor(r.color),!1);return b.makeFragment(t)},Or=(r,e)=>{var t=o0(r.body,e.withColor(r.color)),a=new S.MathNode("mstyle",t);return a.setAttribute("mathcolor",r.color),a};B({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(r,e){var{parser:t}=r,a=F(e[0],"color-token").color,n=e[1];return{type:"color",mode:t.mode,color:a,body:Q(n)}},htmlBuilder:Ir,mathmlBuilder:Or});B({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(r,e){var{parser:t,breakOnTokenText:a}=r,n=F(e[0],"color-token").color;t.gullet.macros.set("\\current@color",n);var s=t.parseExpression(!0,a);return{type:"color",mode:t.mode,color:n,body:s}},htmlBuilder:Ir,mathmlBuilder:Or});B({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(r,e,t){var{parser:a}=r,n=a.gullet.future().text==="["?a.parseSizeGroup(!0):null,s=!a.settings.displayMode||!a.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:a.mode,newLine:s,size:n&&F(n,"size").value}},htmlBuilder(r,e){var t=b.makeSpan(["mspace"],[],e);return r.newLine&&(t.classes.push("newline"),r.size&&(t.style.marginTop=A(K(r.size,e)))),t},mathmlBuilder(r,e){var t=new S.MathNode("mspace");return r.newLine&&(t.setAttribute("linebreak","newline"),r.size&&t.setAttribute("height",A(K(r.size,e)))),t}});var ut={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},Hr=r=>{var e=r.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(e))throw new M("Expected a control sequence",r);return e},R1=r=>{var e=r.gullet.popToken();return e.text==="="&&(e=r.gullet.popToken(),e.text===" "&&(e=r.gullet.popToken())),e},Fr=(r,e,t,a)=>{var n=r.gullet.macros.get(t.text);n==null&&(t.noexpand=!0,n={tokens:[t],numArgs:0,unexpandable:!r.gullet.isExpandable(t.text)}),r.gullet.macros.set(e,n,a)};B({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(r){var{parser:e,funcName:t}=r;e.consumeSpaces();var a=e.fetch();if(ut[a.text])return(t==="\\global"||t==="\\\\globallong")&&(a.text=ut[a.text]),F(e.parseFunction(),"internal");throw new M("Invalid token after macro prefix",a)}});B({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(r){var{parser:e,funcName:t}=r,a=e.gullet.popToken(),n=a.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(n))throw new M("Expected a control sequence",a);for(var s=0,o,h=[[]];e.gullet.future().text!=="{";)if(a=e.gullet.popToken(),a.text==="#"){if(e.gullet.future().text==="{"){o=e.gullet.future(),h[s].push("{");break}if(a=e.gullet.popToken(),!/^[1-9]$/.test(a.text))throw new M('Invalid argument number "'+a.text+'"');if(parseInt(a.text)!==s+1)throw new M('Argument number "'+a.text+'" out of order');s++,h.push([])}else{if(a.text==="EOF")throw new M("Expected a macro definition");h[s].push(a.text)}var{tokens:c}=e.gullet.consumeArg();return o&&c.unshift(o),(t==="\\edef"||t==="\\xdef")&&(c=e.gullet.expandTokens(c),c.reverse()),e.gullet.macros.set(n,{tokens:c,numArgs:s,delimiters:h},t===ut[t]),{type:"internal",mode:e.mode}}});B({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(r){var{parser:e,funcName:t}=r,a=Hr(e.gullet.popToken());e.gullet.consumeSpaces();var n=R1(e);return Fr(e,a,n,t==="\\\\globallet"),{type:"internal",mode:e.mode}}});B({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(r){var{parser:e,funcName:t}=r,a=Hr(e.gullet.popToken()),n=e.gullet.popToken(),s=e.gullet.popToken();return Fr(e,a,s,t==="\\\\globalfuture"),e.gullet.pushToken(s),e.gullet.pushToken(n),{type:"internal",mode:e.mode}}});var ne=function(e,t,a){var n=$.math[e]&&$.math[e].replace,s=ft(n||e,t,a);if(!s)throw new Error("Unsupported symbol "+e+" and font size "+t+".");return s},wt=function(e,t,a,n){var s=a.havingBaseStyle(t),o=b.makeSpan(n.concat(s.sizingClasses(a)),[e],a),h=s.sizeMultiplier/a.sizeMultiplier;return o.height*=h,o.depth*=h,o.maxFontSize=s.sizeMultiplier,o},Lr=function(e,t,a){var n=t.havingBaseStyle(a),s=(1-t.sizeMultiplier/n.sizeMultiplier)*t.fontMetrics().axisHeight;e.classes.push("delimcenter"),e.style.top=A(s),e.height-=s,e.depth+=s},E1=function(e,t,a,n,s,o){var h=b.makeSymbol(e,"Main-Regular",s,n),c=wt(h,t,n,o);return a&&Lr(c,n,t),c},I1=function(e,t,a,n){return b.makeSymbol(e,"Size"+t+"-Regular",a,n)},Pr=function(e,t,a,n,s,o){var h=I1(e,t,s,n),c=wt(b.makeSpan(["delimsizing","size"+t],[h],n),R.TEXT,n,o);return a&&Lr(c,n,R.TEXT),c},je=function(e,t,a){var n;t==="Size1-Regular"?n="delim-size1":n="delim-size4";var s=b.makeSpan(["delimsizinginner",n],[b.makeSpan([],[b.makeSymbol(e,t,a)])]);return{type:"elem",elem:s}},Ze=function(e,t,a){var n=y0["Size4-Regular"][e.charCodeAt(0)]?y0["Size4-Regular"][e.charCodeAt(0)][4]:y0["Size1-Regular"][e.charCodeAt(0)][4],s=new P0("inner",Ga(e,Math.round(1e3*t))),o=new D0([s],{width:A(n),height:A(t),style:"width:"+A(n),viewBox:"0 0 "+1e3*n+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"}),h=b.makeSvgSpan([],[o],a);return h.height=t,h.style.height=A(t),h.style.width=A(n),{type:"elem",elem:h}},ht=.008,Me={type:"kern",size:-1*ht},O1=["|","\\lvert","\\rvert","\\vert"],H1=["\\|","\\lVert","\\rVert","\\Vert"],Gr=function(e,t,a,n,s,o){var h,c,p,g,y="",w=0;h=p=g=e,c=null;var x="Size1-Regular";e==="\\uparrow"?p=g="โ":e==="\\Uparrow"?p=g="โ€–":e==="\\downarrow"?h=p="โ":e==="\\Downarrow"?h=p="โ€–":e==="\\updownarrow"?(h="\\uparrow",p="โ",g="\\downarrow"):e==="\\Updownarrow"?(h="\\Uparrow",p="โ€–",g="\\Downarrow"):I.contains(O1,e)?(p="โˆฃ",y="vert",w=333):I.contains(H1,e)?(p="โˆฅ",y="doublevert",w=556):e==="["||e==="\\lbrack"?(h="โŽก",p="โŽข",g="โŽฃ",x="Size4-Regular",y="lbrack",w=667):e==="]"||e==="\\rbrack"?(h="โŽค",p="โŽฅ",g="โŽฆ",x="Size4-Regular",y="rbrack",w=667):e==="\\lfloor"||e==="โŒŠ"?(p=h="โŽข",g="โŽฃ",x="Size4-Regular",y="lfloor",w=667):e==="\\lceil"||e==="โŒˆ"?(h="โŽก",p=g="โŽข",x="Size4-Regular",y="lceil",w=667):e==="\\rfloor"||e==="โŒ‹"?(p=h="โŽฅ",g="โŽฆ",x="Size4-Regular",y="rfloor",w=667):e==="\\rceil"||e==="โŒ‰"?(h="โŽค",p=g="โŽฅ",x="Size4-Regular",y="rceil",w=667):e==="("||e==="\\lparen"?(h="โŽ›",p="โŽœ",g="โŽ",x="Size4-Regular",y="lparen",w=875):e===")"||e==="\\rparen"?(h="โŽž",p="โŽŸ",g="โŽ ",x="Size4-Regular",y="rparen",w=875):e==="\\{"||e==="\\lbrace"?(h="โŽง",c="โŽจ",g="โŽฉ",p="โŽช",x="Size4-Regular"):e==="\\}"||e==="\\rbrace"?(h="โŽซ",c="โŽฌ",g="โŽญ",p="โŽช",x="Size4-Regular"):e==="\\lgroup"||e==="โŸฎ"?(h="โŽง",g="โŽฉ",p="โŽช",x="Size4-Regular"):e==="\\rgroup"||e==="โŸฏ"?(h="โŽซ",g="โŽญ",p="โŽช",x="Size4-Regular"):e==="\\lmoustache"||e==="โŽฐ"?(h="โŽง",g="โŽญ",p="โŽช",x="Size4-Regular"):(e==="\\rmoustache"||e==="โŽฑ")&&(h="โŽซ",g="โŽฉ",p="โŽช",x="Size4-Regular");var z=ne(h,x,s),T=z.height+z.depth,C=ne(p,x,s),N=C.height+C.depth,O=ne(g,x,s),H=O.height+O.depth,V=0,L=1;if(c!==null){var U=ne(c,x,s);V=U.height+U.depth,L=2}var G=T+H+V,j=Math.max(0,Math.ceil((t-G)/(L*N))),X=G+j*L*N,M0=n.fontMetrics().axisHeight;a&&(M0*=n.sizeMultiplier);var r0=X/2-M0,e0=[];if(y.length>0){var U0=X-T-H,s0=Math.round(X*1e3),v0=Va(y,Math.round(U0*1e3)),R0=new P0(y,v0),W0=(w/1e3).toFixed(3)+"em",j0=(s0/1e3).toFixed(3)+"em",Le=new D0([R0],{width:W0,height:j0,viewBox:"0 0 "+w+" "+s0}),E0=b.makeSvgSpan([],[Le],n);E0.height=s0/1e3,E0.style.width=W0,E0.style.height=j0,e0.push({type:"elem",elem:E0})}else{if(e0.push(je(g,x,s)),e0.push(Me),c===null){var I0=X-T-H+2*ht;e0.push(Ze(p,I0,n))}else{var m0=(X-T-H-V)/2+2*ht;e0.push(Ze(p,m0,n)),e0.push(Me),e0.push(je(c,x,s)),e0.push(Me),e0.push(Ze(p,m0,n))}e0.push(Me),e0.push(je(h,x,s))}var ae=n.havingBaseStyle(R.TEXT),Pe=b.makeVList({positionType:"bottom",positionData:r0,children:e0},ae);return wt(b.makeSpan(["delimsizing","mult"],[Pe],ae),R.TEXT,n,o)},Ke=80,Je=.08,Qe=function(e,t,a,n,s){var o=Pa(e,n,a),h=new P0(e,o),c=new D0([h],{width:"400em",height:A(t),viewBox:"0 0 400000 "+a,preserveAspectRatio:"xMinYMin slice"});return b.makeSvgSpan(["hide-tail"],[c],s)},F1=function(e,t){var a=t.havingBaseSizing(),n=Yr("\\surd",e*a.sizeMultiplier,Xr,a),s=a.sizeMultiplier,o=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),h,c=0,p=0,g=0,y;return n.type==="small"?(g=1e3+1e3*o+Ke,e<1?s=1:e<1.4&&(s=.7),c=(1+o+Je)/s,p=(1+o)/s,h=Qe("sqrtMain",c,g,o,t),h.style.minWidth="0.853em",y=.833/s):n.type==="large"?(g=(1e3+Ke)*se[n.size],p=(se[n.size]+o)/s,c=(se[n.size]+o+Je)/s,h=Qe("sqrtSize"+n.size,c,g,o,t),h.style.minWidth="1.02em",y=1/s):(c=e+o+Je,p=e+o,g=Math.floor(1e3*e+o)+Ke,h=Qe("sqrtTall",c,g,o,t),h.style.minWidth="0.742em",y=1.056),h.height=p,h.style.height=A(c),{span:h,advanceWidth:y,ruleWidth:(t.fontMetrics().sqrtRuleThickness+o)*s}},Vr=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","โŒŠ","โŒ‹","\\lceil","\\rceil","โŒˆ","โŒ‰","\\surd"],L1=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","โŸฎ","โŸฏ","\\lmoustache","\\rmoustache","โŽฐ","โŽฑ"],Ur=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],se=[0,1.2,1.8,2.4,3],P1=function(e,t,a,n,s){if(e==="<"||e==="\\lt"||e==="โŸจ"?e="\\langle":(e===">"||e==="\\gt"||e==="โŸฉ")&&(e="\\rangle"),I.contains(Vr,e)||I.contains(Ur,e))return Pr(e,t,!1,a,n,s);if(I.contains(L1,e))return Gr(e,se[t],!1,a,n,s);throw new M("Illegal delimiter: '"+e+"'")},G1=[{type:"small",style:R.SCRIPTSCRIPT},{type:"small",style:R.SCRIPT},{type:"small",style:R.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],V1=[{type:"small",style:R.SCRIPTSCRIPT},{type:"small",style:R.SCRIPT},{type:"small",style:R.TEXT},{type:"stack"}],Xr=[{type:"small",style:R.SCRIPTSCRIPT},{type:"small",style:R.SCRIPT},{type:"small",style:R.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],U1=function(e){if(e.type==="small")return"Main-Regular";if(e.type==="large")return"Size"+e.size+"-Regular";if(e.type==="stack")return"Size4-Regular";throw new Error("Add support for delim type '"+e.type+"' here.")},Yr=function(e,t,a,n){for(var s=Math.min(2,3-n.style.size),o=s;ot)return a[o]}return a[a.length-1]},$r=function(e,t,a,n,s,o){e==="<"||e==="\\lt"||e==="โŸจ"?e="\\langle":(e===">"||e==="\\gt"||e==="โŸฉ")&&(e="\\rangle");var h;I.contains(Ur,e)?h=G1:I.contains(Vr,e)?h=Xr:h=V1;var c=Yr(e,t,h,n);return c.type==="small"?E1(e,c.style,a,n,s,o):c.type==="large"?Pr(e,c.size,a,n,s,o):Gr(e,t,a,n,s,o)},X1=function(e,t,a,n,s,o){var h=n.fontMetrics().axisHeight*n.sizeMultiplier,c=901,p=5/n.fontMetrics().ptPerEm,g=Math.max(t-h,a+h),y=Math.max(g/500*c,2*g-p);return $r(e,y,!0,n,s,o)},B0={sqrtImage:F1,sizedDelim:P1,sizeToMaxHeight:se,customSizedDelim:$r,leftRightDelim:X1},Kt={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},Y1=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","โŒŠ","โŒ‹","\\lceil","\\rceil","โŒˆ","โŒ‰","<",">","\\langle","โŸจ","\\rangle","โŸฉ","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","โŸฎ","โŸฏ","\\lmoustache","\\rmoustache","โŽฐ","โŽฑ","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];function He(r,e){var t=Ie(r);if(t&&I.contains(Y1,t.text))return t;throw t?new M("Invalid delimiter '"+t.text+"' after '"+e.funcName+"'",r):new M("Invalid delimiter type '"+r.type+"'",r)}B({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(r,e)=>{var t=He(e[0],r);return{type:"delimsizing",mode:r.parser.mode,size:Kt[r.funcName].size,mclass:Kt[r.funcName].mclass,delim:t.text}},htmlBuilder:(r,e)=>r.delim==="."?b.makeSpan([r.mclass]):B0.sizedDelim(r.delim,r.size,e,r.mode,[r.mclass]),mathmlBuilder:r=>{var e=[];r.delim!=="."&&e.push(p0(r.delim,r.mode));var t=new S.MathNode("mo",e);r.mclass==="mopen"||r.mclass==="mclose"?t.setAttribute("fence","true"):t.setAttribute("fence","false"),t.setAttribute("stretchy","true");var a=A(B0.sizeToMaxHeight[r.size]);return t.setAttribute("minsize",a),t.setAttribute("maxsize",a),t}});function Jt(r){if(!r.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}B({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(r,e)=>{var t=r.parser.gullet.macros.get("\\current@color");if(t&&typeof t!="string")throw new M("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:r.parser.mode,delim:He(e[0],r).text,color:t}}});B({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(r,e)=>{var t=He(e[0],r),a=r.parser;++a.leftrightDepth;var n=a.parseExpression(!1);--a.leftrightDepth,a.expect("\\right",!1);var s=F(a.parseFunction(),"leftright-right");return{type:"leftright",mode:a.mode,body:n,left:t.text,right:s.delim,rightColor:s.color}},htmlBuilder:(r,e)=>{Jt(r);for(var t=t0(r.body,e,!0,["mopen","mclose"]),a=0,n=0,s=!1,o=0;o{Jt(r);var t=o0(r.body,e);if(r.left!=="."){var a=new S.MathNode("mo",[p0(r.left,r.mode)]);a.setAttribute("fence","true"),t.unshift(a)}if(r.right!=="."){var n=new S.MathNode("mo",[p0(r.right,r.mode)]);n.setAttribute("fence","true"),r.rightColor&&n.setAttribute("mathcolor",r.rightColor),t.push(n)}return gt(t)}});B({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(r,e)=>{var t=He(e[0],r);if(!r.parser.leftrightDepth)throw new M("\\middle without preceding \\left",t);return{type:"middle",mode:r.parser.mode,delim:t.text}},htmlBuilder:(r,e)=>{var t;if(r.delim===".")t=oe(e,[]);else{t=B0.sizedDelim(r.delim,1,e,r.mode,[]);var a={delim:r.delim,options:e};t.isMiddle=a}return t},mathmlBuilder:(r,e)=>{var t=r.delim==="\\vert"||r.delim==="|"?p0("|","text"):p0(r.delim,r.mode),a=new S.MathNode("mo",[t]);return a.setAttribute("fence","true"),a.setAttribute("lspace","0.05em"),a.setAttribute("rspace","0.05em"),a}});var kt=(r,e)=>{var t=b.wrapFragment(P(r.body,e),e),a=r.label.slice(1),n=e.sizeMultiplier,s,o=0,h=I.isCharacterBox(r.body);if(a==="sout")s=b.makeSpan(["stretchy","sout"]),s.height=e.fontMetrics().defaultRuleThickness/n,o=-.5*e.fontMetrics().xHeight;else if(a==="phase"){var c=K({number:.6,unit:"pt"},e),p=K({number:.35,unit:"ex"},e),g=e.havingBaseSizing();n=n/g.sizeMultiplier;var y=t.height+t.depth+c+p;t.style.paddingLeft=A(y/2+c);var w=Math.floor(1e3*y*n),x=Fa(w),z=new D0([new P0("phase",x)],{width:"400em",height:A(w/1e3),viewBox:"0 0 400000 "+w,preserveAspectRatio:"xMinYMin slice"});s=b.makeSvgSpan(["hide-tail"],[z],e),s.style.height=A(y),o=t.depth+c+p}else{/cancel/.test(a)?h||t.classes.push("cancel-pad"):a==="angl"?t.classes.push("anglpad"):t.classes.push("boxpad");var T=0,C=0,N=0;/box/.test(a)?(N=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness),T=e.fontMetrics().fboxsep+(a==="colorbox"?0:N),C=T):a==="angl"?(N=Math.max(e.fontMetrics().defaultRuleThickness,e.minRuleThickness),T=4*N,C=Math.max(0,.25-t.depth)):(T=h?.2:0,C=T),s=N0.encloseSpan(t,a,T,C,e),/fbox|boxed|fcolorbox/.test(a)?(s.style.borderStyle="solid",s.style.borderWidth=A(N)):a==="angl"&&N!==.049&&(s.style.borderTopWidth=A(N),s.style.borderRightWidth=A(N)),o=t.depth+C,r.backgroundColor&&(s.style.backgroundColor=r.backgroundColor,r.borderColor&&(s.style.borderColor=r.borderColor))}var O;if(r.backgroundColor)O=b.makeVList({positionType:"individualShift",children:[{type:"elem",elem:s,shift:o},{type:"elem",elem:t,shift:0}]},e);else{var H=/cancel|phase/.test(a)?["svg-align"]:[];O=b.makeVList({positionType:"individualShift",children:[{type:"elem",elem:t,shift:0},{type:"elem",elem:s,shift:o,wrapperClasses:H}]},e)}return/cancel/.test(a)&&(O.height=t.height,O.depth=t.depth),/cancel/.test(a)&&!h?b.makeSpan(["mord","cancel-lap"],[O],e):b.makeSpan(["mord"],[O],e)},St=(r,e)=>{var t=0,a=new S.MathNode(r.label.indexOf("colorbox")>-1?"mpadded":"menclose",[Y(r.body,e)]);switch(r.label){case"\\cancel":a.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":a.setAttribute("notation","downdiagonalstrike");break;case"\\phase":a.setAttribute("notation","phasorangle");break;case"\\sout":a.setAttribute("notation","horizontalstrike");break;case"\\fbox":a.setAttribute("notation","box");break;case"\\angl":a.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(t=e.fontMetrics().fboxsep*e.fontMetrics().ptPerEm,a.setAttribute("width","+"+2*t+"pt"),a.setAttribute("height","+"+2*t+"pt"),a.setAttribute("lspace",t+"pt"),a.setAttribute("voffset",t+"pt"),r.label==="\\fcolorbox"){var n=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness);a.setAttribute("style","border: "+n+"em solid "+String(r.borderColor))}break;case"\\xcancel":a.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return r.backgroundColor&&a.setAttribute("mathbackground",r.backgroundColor),a};B({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(r,e,t){var{parser:a,funcName:n}=r,s=F(e[0],"color-token").color,o=e[1];return{type:"enclose",mode:a.mode,label:n,backgroundColor:s,body:o}},htmlBuilder:kt,mathmlBuilder:St});B({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(r,e,t){var{parser:a,funcName:n}=r,s=F(e[0],"color-token").color,o=F(e[1],"color-token").color,h=e[2];return{type:"enclose",mode:a.mode,label:n,backgroundColor:o,borderColor:s,body:h}},htmlBuilder:kt,mathmlBuilder:St});B({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(r,e){var{parser:t}=r;return{type:"enclose",mode:t.mode,label:"\\fbox",body:e[0]}}});B({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(r,e){var{parser:t,funcName:a}=r,n=e[0];return{type:"enclose",mode:t.mode,label:a,body:n}},htmlBuilder:kt,mathmlBuilder:St});B({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(r,e){var{parser:t}=r;return{type:"enclose",mode:t.mode,label:"\\angl",body:e[0]}}});var Wr={};function w0(r){for(var{type:e,names:t,props:a,handler:n,htmlBuilder:s,mathmlBuilder:o}=r,h={type:e,numArgs:a.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:n},c=0;c{var e=r.parser.settings;if(!e.displayMode)throw new M("{"+r.envName+"} can be used only in display mode.")};function Mt(r){if(r.indexOf("ed")===-1)return r.indexOf("*")===-1}function V0(r,e,t){var{hskipBeforeAndAfter:a,addJot:n,cols:s,arraystretch:o,colSeparationType:h,autoTag:c,singleRow:p,emptySingleRow:g,maxNumCols:y,leqno:w}=e;if(r.gullet.beginGroup(),p||r.gullet.macros.set("\\cr","\\\\\\relax"),!o){var x=r.gullet.expandMacroAsText("\\arraystretch");if(x==null)o=1;else if(o=parseFloat(x),!o||o<0)throw new M("Invalid \\arraystretch: "+x)}r.gullet.beginGroup();var z=[],T=[z],C=[],N=[],O=c!=null?[]:void 0;function H(){c&&r.gullet.macros.set("\\@eqnsw","1",!0)}function V(){O&&(r.gullet.macros.get("\\df@tag")?(O.push(r.subparse([new x0("\\df@tag")])),r.gullet.macros.set("\\df@tag",void 0,!0)):O.push(!!c&&r.gullet.macros.get("\\@eqnsw")==="1"))}for(H(),N.push(Qt(r));;){var L=r.parseExpression(!1,p?"\\end":"\\\\");r.gullet.endGroup(),r.gullet.beginGroup(),L={type:"ordgroup",mode:r.mode,body:L},t&&(L={type:"styling",mode:r.mode,style:t,body:[L]}),z.push(L);var U=r.fetch().text;if(U==="&"){if(y&&z.length===y){if(p||h)throw new M("Too many tab characters: &",r.nextToken);r.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}r.consume()}else if(U==="\\end"){V(),z.length===1&&L.type==="styling"&&L.body[0].body.length===0&&(T.length>1||!g)&&T.pop(),N.length0&&(H+=.25),p.push({pos:H,isDashed:pe[ve]})}for(V(o[0]),a=0;a0&&(r0+=O,Gpe))for(a=0;a=h)){var K0=void 0;(n>0||e.hskipBeforeAndAfter)&&(K0=I.deflt(m0.pregap,w),K0!==0&&(v0=b.makeSpan(["arraycolsep"],[]),v0.style.width=A(K0),s0.push(v0)));var J0=[];for(a=0;a0){for(var ca=b.makeLineSpan("hline",t,g),da=b.makeLineSpan("hdashline",t,g),Ge=[{type:"elem",elem:c,shift:0}];p.length>0;){var Rt=p.pop(),Et=Rt.pos-e0;Rt.isDashed?Ge.push({type:"elem",elem:da,shift:Et}):Ge.push({type:"elem",elem:ca,shift:Et})}c=b.makeVList({positionType:"individualShift",children:Ge},t)}if(W0.length===0)return b.makeSpan(["mord"],[c],t);var Ve=b.makeVList({positionType:"individualShift",children:W0},t);return Ve=b.makeSpan(["tag"],[Ve],t),b.makeFragment([c,Ve])},$1={c:"center ",l:"left ",r:"right "},S0=function(e,t){for(var a=[],n=new S.MathNode("mtd",[],["mtr-glue"]),s=new S.MathNode("mtd",[],["mml-eqn-num"]),o=0;o0){var z=e.cols,T="",C=!1,N=0,O=z.length;z[0].type==="separator"&&(w+="top ",N=1),z[z.length-1].type==="separator"&&(w+="bottom ",O-=1);for(var H=N;H0?"left ":"",w+=j[j.length-1].length>0?"right ":"";for(var X=1;X-1?"alignat":"align",s=e.envName==="split",o=V0(e.parser,{cols:a,addJot:!0,autoTag:s?void 0:Mt(e.envName),emptySingleRow:!0,colSeparationType:n,maxNumCols:s?2:void 0,leqno:e.parser.settings.leqno},"display"),h,c=0,p={type:"ordgroup",mode:e.mode,body:[]};if(t[0]&&t[0].type==="ordgroup"){for(var g="",y=0;y0&&x&&(C=1),a[z]={type:"align",align:T,pregap:C,postgap:0}}return o.colSeparationType=x?"align":"alignat",o};w0({type:"array",names:["array","darray"],props:{numArgs:1},handler(r,e){var t=Ie(e[0]),a=t?[e[0]]:F(e[0],"ordgroup").body,n=a.map(function(o){var h=yt(o),c=h.text;if("lcr".indexOf(c)!==-1)return{type:"align",align:c};if(c==="|")return{type:"separator",separator:"|"};if(c===":")return{type:"separator",separator:":"};throw new M("Unknown column alignment: "+c,o)}),s={cols:n,hskipBeforeAndAfter:!0,maxNumCols:n.length};return V0(r.parser,s,zt(r.envName))},htmlBuilder:k0,mathmlBuilder:S0});w0({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(r){var e={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[r.envName.replace("*","")],t="c",a={hskipBeforeAndAfter:!1,cols:[{type:"align",align:t}]};if(r.envName.charAt(r.envName.length-1)==="*"){var n=r.parser;if(n.consumeSpaces(),n.fetch().text==="["){if(n.consume(),n.consumeSpaces(),t=n.fetch().text,"lcr".indexOf(t)===-1)throw new M("Expected l or c or r",n.nextToken);n.consume(),n.consumeSpaces(),n.expect("]"),n.consume(),a.cols=[{type:"align",align:t}]}}var s=V0(r.parser,a,zt(r.envName)),o=Math.max(0,...s.body.map(h=>h.length));return s.cols=new Array(o).fill({type:"align",align:t}),e?{type:"leftright",mode:r.mode,body:[s],left:e[0],right:e[1],rightColor:void 0}:s},htmlBuilder:k0,mathmlBuilder:S0});w0({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(r){var e={arraystretch:.5},t=V0(r.parser,e,"script");return t.colSeparationType="small",t},htmlBuilder:k0,mathmlBuilder:S0});w0({type:"array",names:["subarray"],props:{numArgs:1},handler(r,e){var t=Ie(e[0]),a=t?[e[0]]:F(e[0],"ordgroup").body,n=a.map(function(o){var h=yt(o),c=h.text;if("lc".indexOf(c)!==-1)return{type:"align",align:c};throw new M("Unknown column alignment: "+c,o)});if(n.length>1)throw new M("{subarray} can contain only one column");var s={cols:n,hskipBeforeAndAfter:!1,arraystretch:.5};if(s=V0(r.parser,s,"script"),s.body.length>0&&s.body[0].length>1)throw new M("{subarray} can contain only one column");return s},htmlBuilder:k0,mathmlBuilder:S0});w0({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(r){var e={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},t=V0(r.parser,e,zt(r.envName));return{type:"leftright",mode:r.mode,body:[t],left:r.envName.indexOf("r")>-1?".":"\\{",right:r.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:k0,mathmlBuilder:S0});w0({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:Zr,htmlBuilder:k0,mathmlBuilder:S0});w0({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(r){I.contains(["gather","gather*"],r.envName)&&Fe(r);var e={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:Mt(r.envName),emptySingleRow:!0,leqno:r.parser.settings.leqno};return V0(r.parser,e,"display")},htmlBuilder:k0,mathmlBuilder:S0});w0({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:Zr,htmlBuilder:k0,mathmlBuilder:S0});w0({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(r){Fe(r);var e={autoTag:Mt(r.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:r.parser.settings.leqno};return V0(r.parser,e,"display")},htmlBuilder:k0,mathmlBuilder:S0});w0({type:"array",names:["CD"],props:{numArgs:0},handler(r){return Fe(r),q1(r.parser)},htmlBuilder:k0,mathmlBuilder:S0});m("\\nonumber","\\gdef\\@eqnsw{0}");m("\\notag","\\nonumber");B({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(r,e){throw new M(r.funcName+" valid only within array environment")}});var _t=Wr;B({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(r,e){var{parser:t,funcName:a}=r,n=e[0];if(n.type!=="ordgroup")throw new M("Invalid environment name",n);for(var s="",o=0;o{var t=r.font,a=e.withFont(t);return P(r.body,a)},Jr=(r,e)=>{var t=r.font,a=e.withFont(t);return Y(r.body,a)},er={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};B({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(r,e)=>{var{parser:t,funcName:a}=r,n=qe(e[0]),s=a;return s in er&&(s=er[s]),{type:"font",mode:t.mode,font:s.slice(1),body:n}},htmlBuilder:Kr,mathmlBuilder:Jr});B({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(r,e)=>{var{parser:t}=r,a=e[0],n=I.isCharacterBox(a);return{type:"mclass",mode:t.mode,mclass:Oe(a),body:[{type:"font",mode:t.mode,font:"boldsymbol",body:a}],isCharacterBox:n}}});B({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(r,e)=>{var{parser:t,funcName:a,breakOnTokenText:n}=r,{mode:s}=t,o=t.parseExpression(!0,n),h="math"+a.slice(1);return{type:"font",mode:s,font:h,body:{type:"ordgroup",mode:t.mode,body:o}}},htmlBuilder:Kr,mathmlBuilder:Jr});var Qr=(r,e)=>{var t=e;return r==="display"?t=t.id>=R.SCRIPT.id?t.text():R.DISPLAY:r==="text"&&t.size===R.DISPLAY.size?t=R.TEXT:r==="script"?t=R.SCRIPT:r==="scriptscript"&&(t=R.SCRIPTSCRIPT),t},At=(r,e)=>{var t=Qr(r.size,e.style),a=t.fracNum(),n=t.fracDen(),s;s=e.havingStyle(a);var o=P(r.numer,s,e);if(r.continued){var h=8.5/e.fontMetrics().ptPerEm,c=3.5/e.fontMetrics().ptPerEm;o.height=o.height0?z=3*w:z=7*w,T=e.fontMetrics().denom1):(y>0?(x=e.fontMetrics().num2,z=w):(x=e.fontMetrics().num3,z=3*w),T=e.fontMetrics().denom2);var C;if(g){var O=e.fontMetrics().axisHeight;x-o.depth-(O+.5*y){var t=new S.MathNode("mfrac",[Y(r.numer,e),Y(r.denom,e)]);if(!r.hasBarLine)t.setAttribute("linethickness","0px");else if(r.barSize){var a=K(r.barSize,e);t.setAttribute("linethickness",A(a))}var n=Qr(r.size,e.style);if(n.size!==e.style.size){t=new S.MathNode("mstyle",[t]);var s=n.size===R.DISPLAY.size?"true":"false";t.setAttribute("displaystyle",s),t.setAttribute("scriptlevel","0")}if(r.leftDelim!=null||r.rightDelim!=null){var o=[];if(r.leftDelim!=null){var h=new S.MathNode("mo",[new S.TextNode(r.leftDelim.replace("\\",""))]);h.setAttribute("fence","true"),o.push(h)}if(o.push(t),r.rightDelim!=null){var c=new S.MathNode("mo",[new S.TextNode(r.rightDelim.replace("\\",""))]);c.setAttribute("fence","true"),o.push(c)}return gt(o)}return t};B({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(r,e)=>{var{parser:t,funcName:a}=r,n=e[0],s=e[1],o,h=null,c=null,p="auto";switch(a){case"\\dfrac":case"\\frac":case"\\tfrac":o=!0;break;case"\\\\atopfrac":o=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":o=!1,h="(",c=")";break;case"\\\\bracefrac":o=!1,h="\\{",c="\\}";break;case"\\\\brackfrac":o=!1,h="[",c="]";break;default:throw new Error("Unrecognized genfrac command")}switch(a){case"\\dfrac":case"\\dbinom":p="display";break;case"\\tfrac":case"\\tbinom":p="text";break}return{type:"genfrac",mode:t.mode,continued:!1,numer:n,denom:s,hasBarLine:o,leftDelim:h,rightDelim:c,size:p,barSize:null}},htmlBuilder:At,mathmlBuilder:Tt});B({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(r,e)=>{var{parser:t,funcName:a}=r,n=e[0],s=e[1];return{type:"genfrac",mode:t.mode,continued:!0,numer:n,denom:s,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}});B({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(r){var{parser:e,funcName:t,token:a}=r,n;switch(t){case"\\over":n="\\frac";break;case"\\choose":n="\\binom";break;case"\\atop":n="\\\\atopfrac";break;case"\\brace":n="\\\\bracefrac";break;case"\\brack":n="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:e.mode,replaceWith:n,token:a}}});var tr=["display","text","script","scriptscript"],rr=function(e){var t=null;return e.length>0&&(t=e,t=t==="."?null:t),t};B({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(r,e){var{parser:t}=r,a=e[4],n=e[5],s=qe(e[0]),o=s.type==="atom"&&s.family==="open"?rr(s.text):null,h=qe(e[1]),c=h.type==="atom"&&h.family==="close"?rr(h.text):null,p=F(e[2],"size"),g,y=null;p.isBlank?g=!0:(y=p.value,g=y.number>0);var w="auto",x=e[3];if(x.type==="ordgroup"){if(x.body.length>0){var z=F(x.body[0],"textord");w=tr[Number(z.text)]}}else x=F(x,"textord"),w=tr[Number(x.text)];return{type:"genfrac",mode:t.mode,numer:a,denom:n,continued:!1,hasBarLine:g,barSize:y,leftDelim:o,rightDelim:c,size:w}},htmlBuilder:At,mathmlBuilder:Tt});B({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(r,e){var{parser:t,funcName:a,token:n}=r;return{type:"infix",mode:t.mode,replaceWith:"\\\\abovefrac",size:F(e[0],"size").value,token:n}}});B({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(r,e)=>{var{parser:t,funcName:a}=r,n=e[0],s=Sa(F(e[1],"infix").size),o=e[2],h=s.number>0;return{type:"genfrac",mode:t.mode,numer:n,denom:o,continued:!1,hasBarLine:h,barSize:s,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:At,mathmlBuilder:Tt});var _r=(r,e)=>{var t=e.style,a,n;r.type==="supsub"?(a=r.sup?P(r.sup,e.havingStyle(t.sup()),e):P(r.sub,e.havingStyle(t.sub()),e),n=F(r.base,"horizBrace")):n=F(r,"horizBrace");var s=P(n.base,e.havingBaseStyle(R.DISPLAY)),o=N0.svgSpan(n,e),h;if(n.isOver?(h=b.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"kern",size:.1},{type:"elem",elem:o}]},e),h.children[0].children[0].children[1].classes.push("svg-align")):(h=b.makeVList({positionType:"bottom",positionData:s.depth+.1+o.height,children:[{type:"elem",elem:o},{type:"kern",size:.1},{type:"elem",elem:s}]},e),h.children[0].children[0].children[0].classes.push("svg-align")),a){var c=b.makeSpan(["mord",n.isOver?"mover":"munder"],[h],e);n.isOver?h=b.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:c},{type:"kern",size:.2},{type:"elem",elem:a}]},e):h=b.makeVList({positionType:"bottom",positionData:c.depth+.2+a.height+a.depth,children:[{type:"elem",elem:a},{type:"kern",size:.2},{type:"elem",elem:c}]},e)}return b.makeSpan(["mord",n.isOver?"mover":"munder"],[h],e)},W1=(r,e)=>{var t=N0.mathMLnode(r.label);return new S.MathNode(r.isOver?"mover":"munder",[Y(r.base,e),t])};B({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(r,e){var{parser:t,funcName:a}=r;return{type:"horizBrace",mode:t.mode,label:a,isOver:/^\\over/.test(a),base:e[0]}},htmlBuilder:_r,mathmlBuilder:W1});B({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(r,e)=>{var{parser:t}=r,a=e[1],n=F(e[0],"url").url;return t.settings.isTrusted({command:"\\href",url:n})?{type:"href",mode:t.mode,href:n,body:Q(a)}:t.formatUnsupportedCmd("\\href")},htmlBuilder:(r,e)=>{var t=t0(r.body,e,!1);return b.makeAnchor(r.href,[],t,e)},mathmlBuilder:(r,e)=>{var t=G0(r.body,e);return t instanceof c0||(t=new c0("mrow",[t])),t.setAttribute("href",r.href),t}});B({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(r,e)=>{var{parser:t}=r,a=F(e[0],"url").url;if(!t.settings.isTrusted({command:"\\url",url:a}))return t.formatUnsupportedCmd("\\url");for(var n=[],s=0;s{var{parser:t,funcName:a,token:n}=r,s=F(e[0],"raw").string,o=e[1];t.settings.strict&&t.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var h,c={};switch(a){case"\\htmlClass":c.class=s,h={command:"\\htmlClass",class:s};break;case"\\htmlId":c.id=s,h={command:"\\htmlId",id:s};break;case"\\htmlStyle":c.style=s,h={command:"\\htmlStyle",style:s};break;case"\\htmlData":{for(var p=s.split(","),g=0;g{var t=t0(r.body,e,!1),a=["enclosing"];r.attributes.class&&a.push(...r.attributes.class.trim().split(/\s+/));var n=b.makeSpan(a,t,e);for(var s in r.attributes)s!=="class"&&r.attributes.hasOwnProperty(s)&&n.setAttribute(s,r.attributes[s]);return n},mathmlBuilder:(r,e)=>G0(r.body,e)});B({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(r,e)=>{var{parser:t}=r;return{type:"htmlmathml",mode:t.mode,html:Q(e[0]),mathml:Q(e[1])}},htmlBuilder:(r,e)=>{var t=t0(r.html,e,!1);return b.makeFragment(t)},mathmlBuilder:(r,e)=>G0(r.mathml,e)});var _e=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:"bp"};var t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!t)throw new M("Invalid size: '"+e+"' in \\includegraphics");var a={number:+(t[1]+t[2]),unit:t[3]};if(!br(a))throw new M("Invalid unit: '"+a.unit+"' in \\includegraphics.");return a};B({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(r,e,t)=>{var{parser:a}=r,n={number:0,unit:"em"},s={number:.9,unit:"em"},o={number:0,unit:"em"},h="";if(t[0])for(var c=F(t[0],"raw").string,p=c.split(","),g=0;g{var t=K(r.height,e),a=0;r.totalheight.number>0&&(a=K(r.totalheight,e)-t);var n=0;r.width.number>0&&(n=K(r.width,e));var s={height:A(t+a)};n>0&&(s.width=A(n)),a>0&&(s.verticalAlign=A(-a));var o=new Wa(r.src,r.alt,s);return o.height=t,o.depth=a,o},mathmlBuilder:(r,e)=>{var t=new S.MathNode("mglyph",[]);t.setAttribute("alt",r.alt);var a=K(r.height,e),n=0;if(r.totalheight.number>0&&(n=K(r.totalheight,e)-a,t.setAttribute("valign",A(-n))),t.setAttribute("height",A(a+n)),r.width.number>0){var s=K(r.width,e);t.setAttribute("width",A(s))}return t.setAttribute("src",r.src),t}});B({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(r,e){var{parser:t,funcName:a}=r,n=F(e[0],"size");if(t.settings.strict){var s=a[1]==="m",o=n.value.unit==="mu";s?(o||t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+a+" supports only mu units, "+("not "+n.value.unit+" units")),t.mode!=="math"&&t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+a+" works only in math mode")):o&&t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+a+" doesn't support mu units")}return{type:"kern",mode:t.mode,dimension:n.value}},htmlBuilder(r,e){return b.makeGlue(r.dimension,e)},mathmlBuilder(r,e){var t=K(r.dimension,e);return new S.SpaceNode(t)}});B({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(r,e)=>{var{parser:t,funcName:a}=r,n=e[0];return{type:"lap",mode:t.mode,alignment:a.slice(5),body:n}},htmlBuilder:(r,e)=>{var t;r.alignment==="clap"?(t=b.makeSpan([],[P(r.body,e)]),t=b.makeSpan(["inner"],[t],e)):t=b.makeSpan(["inner"],[P(r.body,e)]);var a=b.makeSpan(["fix"],[]),n=b.makeSpan([r.alignment],[t,a],e),s=b.makeSpan(["strut"]);return s.style.height=A(n.height+n.depth),n.depth&&(s.style.verticalAlign=A(-n.depth)),n.children.unshift(s),n=b.makeSpan(["thinbox"],[n],e),b.makeSpan(["mord","vbox"],[n],e)},mathmlBuilder:(r,e)=>{var t=new S.MathNode("mpadded",[Y(r.body,e)]);if(r.alignment!=="rlap"){var a=r.alignment==="llap"?"-1":"-0.5";t.setAttribute("lspace",a+"width")}return t.setAttribute("width","0px"),t}});B({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(r,e){var{funcName:t,parser:a}=r,n=a.mode;a.switchMode("math");var s=t==="\\("?"\\)":"$",o=a.parseExpression(!1,s);return a.expect(s),a.switchMode(n),{type:"styling",mode:a.mode,style:"text",body:o}}});B({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(r,e){throw new M("Mismatched "+r.funcName)}});var ar=(r,e)=>{switch(e.style.size){case R.DISPLAY.size:return r.display;case R.TEXT.size:return r.text;case R.SCRIPT.size:return r.script;case R.SCRIPTSCRIPT.size:return r.scriptscript;default:return r.text}};B({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(r,e)=>{var{parser:t}=r;return{type:"mathchoice",mode:t.mode,display:Q(e[0]),text:Q(e[1]),script:Q(e[2]),scriptscript:Q(e[3])}},htmlBuilder:(r,e)=>{var t=ar(r,e),a=t0(t,e,!1);return b.makeFragment(a)},mathmlBuilder:(r,e)=>{var t=ar(r,e);return G0(t,e)}});var ea=(r,e,t,a,n,s,o)=>{r=b.makeSpan([],[r]);var h=t&&I.isCharacterBox(t),c,p;if(e){var g=P(e,a.havingStyle(n.sup()),a);p={elem:g,kern:Math.max(a.fontMetrics().bigOpSpacing1,a.fontMetrics().bigOpSpacing3-g.depth)}}if(t){var y=P(t,a.havingStyle(n.sub()),a);c={elem:y,kern:Math.max(a.fontMetrics().bigOpSpacing2,a.fontMetrics().bigOpSpacing4-y.height)}}var w;if(p&&c){var x=a.fontMetrics().bigOpSpacing5+c.elem.height+c.elem.depth+c.kern+r.depth+o;w=b.makeVList({positionType:"bottom",positionData:x,children:[{type:"kern",size:a.fontMetrics().bigOpSpacing5},{type:"elem",elem:c.elem,marginLeft:A(-s)},{type:"kern",size:c.kern},{type:"elem",elem:r},{type:"kern",size:p.kern},{type:"elem",elem:p.elem,marginLeft:A(s)},{type:"kern",size:a.fontMetrics().bigOpSpacing5}]},a)}else if(c){var z=r.height-o;w=b.makeVList({positionType:"top",positionData:z,children:[{type:"kern",size:a.fontMetrics().bigOpSpacing5},{type:"elem",elem:c.elem,marginLeft:A(-s)},{type:"kern",size:c.kern},{type:"elem",elem:r}]},a)}else if(p){var T=r.depth+o;w=b.makeVList({positionType:"bottom",positionData:T,children:[{type:"elem",elem:r},{type:"kern",size:p.kern},{type:"elem",elem:p.elem,marginLeft:A(s)},{type:"kern",size:a.fontMetrics().bigOpSpacing5}]},a)}else return r;var C=[w];if(c&&s!==0&&!h){var N=b.makeSpan(["mspace"],[],a);N.style.marginRight=A(s),C.unshift(N)}return b.makeSpan(["mop","op-limits"],C,a)},ta=["\\smallint"],re=(r,e)=>{var t,a,n=!1,s;r.type==="supsub"?(t=r.sup,a=r.sub,s=F(r.base,"op"),n=!0):s=F(r,"op");var o=e.style,h=!1;o.size===R.DISPLAY.size&&s.symbol&&!I.contains(ta,s.name)&&(h=!0);var c;if(s.symbol){var p=h?"Size2-Regular":"Size1-Regular",g="";if((s.name==="\\oiint"||s.name==="\\oiiint")&&(g=s.name.slice(1),s.name=g==="oiint"?"\\iint":"\\iiint"),c=b.makeSymbol(s.name,p,"math",e,["mop","op-symbol",h?"large-op":"small-op"]),g.length>0){var y=c.italic,w=b.staticSvg(g+"Size"+(h?"2":"1"),e);c=b.makeVList({positionType:"individualShift",children:[{type:"elem",elem:c,shift:0},{type:"elem",elem:w,shift:h?.08:0}]},e),s.name="\\"+g,c.classes.unshift("mop"),c.italic=y}}else if(s.body){var x=t0(s.body,e,!0);x.length===1&&x[0]instanceof f0?(c=x[0],c.classes[0]="mop"):c=b.makeSpan(["mop"],x,e)}else{for(var z=[],T=1;T{var t;if(r.symbol)t=new c0("mo",[p0(r.name,r.mode)]),I.contains(ta,r.name)&&t.setAttribute("largeop","false");else if(r.body)t=new c0("mo",o0(r.body,e));else{t=new c0("mi",[new ie(r.name.slice(1))]);var a=new c0("mo",[p0("โก","text")]);r.parentIsSupSub?t=new c0("mrow",[t,a]):t=Dr([t,a])}return t},j1={"โˆ":"\\prod","โˆ":"\\coprod","โˆ‘":"\\sum","โ‹€":"\\bigwedge","โ‹":"\\bigvee","โ‹‚":"\\bigcap","โ‹ƒ":"\\bigcup","โจ€":"\\bigodot","โจ":"\\bigoplus","โจ‚":"\\bigotimes","โจ„":"\\biguplus","โจ†":"\\bigsqcup"};B({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","โˆ","โˆ","โˆ‘","โ‹€","โ‹","โ‹‚","โ‹ƒ","โจ€","โจ","โจ‚","โจ„","โจ†"],props:{numArgs:0},handler:(r,e)=>{var{parser:t,funcName:a}=r,n=a;return n.length===1&&(n=j1[n]),{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:re,mathmlBuilder:ce});B({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(r,e)=>{var{parser:t}=r,a=e[0];return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:Q(a)}},htmlBuilder:re,mathmlBuilder:ce});var Z1={"โˆซ":"\\int","โˆฌ":"\\iint","โˆญ":"\\iiint","โˆฎ":"\\oint","โˆฏ":"\\oiint","โˆฐ":"\\oiiint"};B({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(r){var{parser:e,funcName:t}=r;return{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:t}},htmlBuilder:re,mathmlBuilder:ce});B({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(r){var{parser:e,funcName:t}=r;return{type:"op",mode:e.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:t}},htmlBuilder:re,mathmlBuilder:ce});B({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","โˆซ","โˆฌ","โˆญ","โˆฎ","โˆฏ","โˆฐ"],props:{numArgs:0},handler(r){var{parser:e,funcName:t}=r,a=t;return a.length===1&&(a=Z1[a]),{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:a}},htmlBuilder:re,mathmlBuilder:ce});var ra=(r,e)=>{var t,a,n=!1,s;r.type==="supsub"?(t=r.sup,a=r.sub,s=F(r.base,"operatorname"),n=!0):s=F(r,"operatorname");var o;if(s.body.length>0){for(var h=s.body.map(y=>{var w=y.text;return typeof w=="string"?{type:"textord",mode:y.mode,text:w}:y}),c=t0(h,e.withFont("mathrm"),!0),p=0;p{for(var t=o0(r.body,e.withFont("mathrm")),a=!0,n=0;ng.toText()).join("");t=[new S.TextNode(h)]}var c=new S.MathNode("mi",t);c.setAttribute("mathvariant","normal");var p=new S.MathNode("mo",[p0("โก","text")]);return r.parentIsSupSub?new S.MathNode("mrow",[c,p]):S.newDocumentFragment([c,p])};B({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(r,e)=>{var{parser:t,funcName:a}=r,n=e[0];return{type:"operatorname",mode:t.mode,body:Q(n),alwaysHandleSupSub:a==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:ra,mathmlBuilder:K1});m("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");$0({type:"ordgroup",htmlBuilder(r,e){return r.semisimple?b.makeFragment(t0(r.body,e,!1)):b.makeSpan(["mord"],t0(r.body,e,!0),e)},mathmlBuilder(r,e){return G0(r.body,e,!0)}});B({type:"overline",names:["\\overline"],props:{numArgs:1},handler(r,e){var{parser:t}=r,a=e[0];return{type:"overline",mode:t.mode,body:a}},htmlBuilder(r,e){var t=P(r.body,e.havingCrampedStyle()),a=b.makeLineSpan("overline-line",e),n=e.fontMetrics().defaultRuleThickness,s=b.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:t},{type:"kern",size:3*n},{type:"elem",elem:a},{type:"kern",size:n}]},e);return b.makeSpan(["mord","overline"],[s],e)},mathmlBuilder(r,e){var t=new S.MathNode("mo",[new S.TextNode("โ€พ")]);t.setAttribute("stretchy","true");var a=new S.MathNode("mover",[Y(r.body,e),t]);return a.setAttribute("accent","true"),a}});B({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(r,e)=>{var{parser:t}=r,a=e[0];return{type:"phantom",mode:t.mode,body:Q(a)}},htmlBuilder:(r,e)=>{var t=t0(r.body,e.withPhantom(),!1);return b.makeFragment(t)},mathmlBuilder:(r,e)=>{var t=o0(r.body,e);return new S.MathNode("mphantom",t)}});B({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(r,e)=>{var{parser:t}=r,a=e[0];return{type:"hphantom",mode:t.mode,body:a}},htmlBuilder:(r,e)=>{var t=b.makeSpan([],[P(r.body,e.withPhantom())]);if(t.height=0,t.depth=0,t.children)for(var a=0;a{var t=o0(Q(r.body),e),a=new S.MathNode("mphantom",t),n=new S.MathNode("mpadded",[a]);return n.setAttribute("height","0px"),n.setAttribute("depth","0px"),n}});B({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(r,e)=>{var{parser:t}=r,a=e[0];return{type:"vphantom",mode:t.mode,body:a}},htmlBuilder:(r,e)=>{var t=b.makeSpan(["inner"],[P(r.body,e.withPhantom())]),a=b.makeSpan(["fix"],[]);return b.makeSpan(["mord","rlap"],[t,a],e)},mathmlBuilder:(r,e)=>{var t=o0(Q(r.body),e),a=new S.MathNode("mphantom",t),n=new S.MathNode("mpadded",[a]);return n.setAttribute("width","0px"),n}});B({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(r,e){var{parser:t}=r,a=F(e[0],"size").value,n=e[1];return{type:"raisebox",mode:t.mode,dy:a,body:n}},htmlBuilder(r,e){var t=P(r.body,e),a=K(r.dy,e);return b.makeVList({positionType:"shift",positionData:-a,children:[{type:"elem",elem:t}]},e)},mathmlBuilder(r,e){var t=new S.MathNode("mpadded",[Y(r.body,e)]),a=r.dy.number+r.dy.unit;return t.setAttribute("voffset",a),t}});B({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0},handler(r){var{parser:e}=r;return{type:"internal",mode:e.mode}}});B({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,argTypes:["size","size","size"]},handler(r,e,t){var{parser:a}=r,n=t[0],s=F(e[0],"size"),o=F(e[1],"size");return{type:"rule",mode:a.mode,shift:n&&F(n,"size").value,width:s.value,height:o.value}},htmlBuilder(r,e){var t=b.makeSpan(["mord","rule"],[],e),a=K(r.width,e),n=K(r.height,e),s=r.shift?K(r.shift,e):0;return t.style.borderRightWidth=A(a),t.style.borderTopWidth=A(n),t.style.bottom=A(s),t.width=a,t.height=n+s,t.depth=-s,t.maxFontSize=n*1.125*e.sizeMultiplier,t},mathmlBuilder(r,e){var t=K(r.width,e),a=K(r.height,e),n=r.shift?K(r.shift,e):0,s=e.color&&e.getColor()||"black",o=new S.MathNode("mspace");o.setAttribute("mathbackground",s),o.setAttribute("width",A(t)),o.setAttribute("height",A(a));var h=new S.MathNode("mpadded",[o]);return n>=0?h.setAttribute("height",A(n)):(h.setAttribute("height",A(n)),h.setAttribute("depth",A(-n))),h.setAttribute("voffset",A(n)),h}});function aa(r,e,t){for(var a=t0(r,e,!1),n=e.sizeMultiplier/t.sizeMultiplier,s=0;s{var t=e.havingSize(r.size);return aa(r.body,t,e)};B({type:"sizing",names:nr,props:{numArgs:0,allowedInText:!0},handler:(r,e)=>{var{breakOnTokenText:t,funcName:a,parser:n}=r,s=n.parseExpression(!1,t);return{type:"sizing",mode:n.mode,size:nr.indexOf(a)+1,body:s}},htmlBuilder:J1,mathmlBuilder:(r,e)=>{var t=e.havingSize(r.size),a=o0(r.body,t),n=new S.MathNode("mstyle",a);return n.setAttribute("mathsize",A(t.sizeMultiplier)),n}});B({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(r,e,t)=>{var{parser:a}=r,n=!1,s=!1,o=t[0]&&F(t[0],"ordgroup");if(o)for(var h="",c=0;c{var t=b.makeSpan([],[P(r.body,e)]);if(!r.smashHeight&&!r.smashDepth)return t;if(r.smashHeight&&(t.height=0,t.children))for(var a=0;a{var t=new S.MathNode("mpadded",[Y(r.body,e)]);return r.smashHeight&&t.setAttribute("height","0px"),r.smashDepth&&t.setAttribute("depth","0px"),t}});B({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(r,e,t){var{parser:a}=r,n=t[0],s=e[0];return{type:"sqrt",mode:a.mode,body:s,index:n}},htmlBuilder(r,e){var t=P(r.body,e.havingCrampedStyle());t.height===0&&(t.height=e.fontMetrics().xHeight),t=b.wrapFragment(t,e);var a=e.fontMetrics(),n=a.defaultRuleThickness,s=n;e.style.idt.height+t.depth+o&&(o=(o+y-t.height-t.depth)/2);var w=c.height-t.height-o-p;t.style.paddingLeft=A(g);var x=b.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:t,wrapperClasses:["svg-align"]},{type:"kern",size:-(t.height+w)},{type:"elem",elem:c},{type:"kern",size:p}]},e);if(r.index){var z=e.havingStyle(R.SCRIPTSCRIPT),T=P(r.index,z,e),C=.6*(x.height-x.depth),N=b.makeVList({positionType:"shift",positionData:-C,children:[{type:"elem",elem:T}]},e),O=b.makeSpan(["root"],[N]);return b.makeSpan(["mord","sqrt"],[O,x],e)}else return b.makeSpan(["mord","sqrt"],[x],e)},mathmlBuilder(r,e){var{body:t,index:a}=r;return a?new S.MathNode("mroot",[Y(t,e),Y(a,e)]):new S.MathNode("msqrt",[Y(t,e)])}});var ir={display:R.DISPLAY,text:R.TEXT,script:R.SCRIPT,scriptscript:R.SCRIPTSCRIPT};B({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(r,e){var{breakOnTokenText:t,funcName:a,parser:n}=r,s=n.parseExpression(!0,t),o=a.slice(1,a.length-5);return{type:"styling",mode:n.mode,style:o,body:s}},htmlBuilder(r,e){var t=ir[r.style],a=e.havingStyle(t).withFont("");return aa(r.body,a,e)},mathmlBuilder(r,e){var t=ir[r.style],a=e.havingStyle(t),n=o0(r.body,a),s=new S.MathNode("mstyle",n),o={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},h=o[r.style];return s.setAttribute("scriptlevel",h[0]),s.setAttribute("displaystyle",h[1]),s}});var Q1=function(e,t){var a=e.base;if(a)if(a.type==="op"){var n=a.limits&&(t.style.size===R.DISPLAY.size||a.alwaysHandleSupSub);return n?re:null}else if(a.type==="operatorname"){var s=a.alwaysHandleSupSub&&(t.style.size===R.DISPLAY.size||a.limits);return s?ra:null}else{if(a.type==="accent")return I.isCharacterBox(a.base)?xt:null;if(a.type==="horizBrace"){var o=!e.sub;return o===a.isOver?_r:null}else return null}else return null};$0({type:"supsub",htmlBuilder(r,e){var t=Q1(r,e);if(t)return t(r,e);var{base:a,sup:n,sub:s}=r,o=P(a,e),h,c,p=e.fontMetrics(),g=0,y=0,w=a&&I.isCharacterBox(a);if(n){var x=e.havingStyle(e.style.sup());h=P(n,x,e),w||(g=o.height-x.fontMetrics().supDrop*x.sizeMultiplier/e.sizeMultiplier)}if(s){var z=e.havingStyle(e.style.sub());c=P(s,z,e),w||(y=o.depth+z.fontMetrics().subDrop*z.sizeMultiplier/e.sizeMultiplier)}var T;e.style===R.DISPLAY?T=p.sup1:e.style.cramped?T=p.sup3:T=p.sup2;var C=e.sizeMultiplier,N=A(.5/p.ptPerEm/C),O=null;if(c){var H=r.base&&r.base.type==="op"&&r.base.name&&(r.base.name==="\\oiint"||r.base.name==="\\oiiint");(o instanceof f0||H)&&(O=A(-o.italic))}var V;if(h&&c){g=Math.max(g,T,h.depth+.25*p.xHeight),y=Math.max(y,p.sub2);var L=p.defaultRuleThickness,U=4*L;if(g-h.depth-(c.height-y)0&&(g+=G,y-=G)}var j=[{type:"elem",elem:c,shift:y,marginRight:N,marginLeft:O},{type:"elem",elem:h,shift:-g,marginRight:N}];V=b.makeVList({positionType:"individualShift",children:j},e)}else if(c){y=Math.max(y,p.sub1,c.height-.8*p.xHeight);var X=[{type:"elem",elem:c,marginLeft:O,marginRight:N}];V=b.makeVList({positionType:"shift",positionData:y,children:X},e)}else if(h)g=Math.max(g,T,h.depth+.25*p.xHeight),V=b.makeVList({positionType:"shift",positionData:-g,children:[{type:"elem",elem:h,marginRight:N}]},e);else throw new Error("supsub must have either sup or sub.");var M0=lt(o,"right")||"mord";return b.makeSpan([M0],[o,b.makeSpan(["msupsub"],[V])],e)},mathmlBuilder(r,e){var t=!1,a,n;r.base&&r.base.type==="horizBrace"&&(n=!!r.sup,n===r.base.isOver&&(t=!0,a=r.base.isOver)),r.base&&(r.base.type==="op"||r.base.type==="operatorname")&&(r.base.parentIsSupSub=!0);var s=[Y(r.base,e)];r.sub&&s.push(Y(r.sub,e)),r.sup&&s.push(Y(r.sup,e));var o;if(t)o=a?"mover":"munder";else if(r.sub)if(r.sup){var p=r.base;p&&p.type==="op"&&p.limits&&e.style===R.DISPLAY||p&&p.type==="operatorname"&&p.alwaysHandleSupSub&&(e.style===R.DISPLAY||p.limits)?o="munderover":o="msubsup"}else{var c=r.base;c&&c.type==="op"&&c.limits&&(e.style===R.DISPLAY||c.alwaysHandleSupSub)||c&&c.type==="operatorname"&&c.alwaysHandleSupSub&&(c.limits||e.style===R.DISPLAY)?o="munder":o="msub"}else{var h=r.base;h&&h.type==="op"&&h.limits&&(e.style===R.DISPLAY||h.alwaysHandleSupSub)||h&&h.type==="operatorname"&&h.alwaysHandleSupSub&&(h.limits||e.style===R.DISPLAY)?o="mover":o="msup"}return new S.MathNode(o,s)}});$0({type:"atom",htmlBuilder(r,e){return b.mathsym(r.text,r.mode,e,["m"+r.family])},mathmlBuilder(r,e){var t=new S.MathNode("mo",[p0(r.text,r.mode)]);if(r.family==="bin"){var a=bt(r,e);a==="bold-italic"&&t.setAttribute("mathvariant",a)}else r.family==="punct"?t.setAttribute("separator","true"):(r.family==="open"||r.family==="close")&&t.setAttribute("stretchy","false");return t}});var na={mi:"italic",mn:"normal",mtext:"normal"};$0({type:"mathord",htmlBuilder(r,e){return b.makeOrd(r,e,"mathord")},mathmlBuilder(r,e){var t=new S.MathNode("mi",[p0(r.text,r.mode,e)]),a=bt(r,e)||"italic";return a!==na[t.type]&&t.setAttribute("mathvariant",a),t}});$0({type:"textord",htmlBuilder(r,e){return b.makeOrd(r,e,"textord")},mathmlBuilder(r,e){var t=p0(r.text,r.mode,e),a=bt(r,e)||"normal",n;return r.mode==="text"?n=new S.MathNode("mtext",[t]):/[0-9]/.test(r.text)?n=new S.MathNode("mn",[t]):r.text==="\\prime"?n=new S.MathNode("mo",[t]):n=new S.MathNode("mi",[t]),a!==na[n.type]&&n.setAttribute("mathvariant",a),n}});var et={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},tt={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};$0({type:"spacing",htmlBuilder(r,e){if(tt.hasOwnProperty(r.text)){var t=tt[r.text].className||"";if(r.mode==="text"){var a=b.makeOrd(r,e,"textord");return a.classes.push(t),a}else return b.makeSpan(["mspace",t],[b.mathsym(r.text,r.mode,e)],e)}else{if(et.hasOwnProperty(r.text))return b.makeSpan(["mspace",et[r.text]],[],e);throw new M('Unknown type of space "'+r.text+'"')}},mathmlBuilder(r,e){var t;if(tt.hasOwnProperty(r.text))t=new S.MathNode("mtext",[new S.TextNode("ย ")]);else{if(et.hasOwnProperty(r.text))return new S.MathNode("mspace");throw new M('Unknown type of space "'+r.text+'"')}return t}});var sr=()=>{var r=new S.MathNode("mtd",[]);return r.setAttribute("width","50%"),r};$0({type:"tag",mathmlBuilder(r,e){var t=new S.MathNode("mtable",[new S.MathNode("mtr",[sr(),new S.MathNode("mtd",[G0(r.body,e)]),sr(),new S.MathNode("mtd",[G0(r.tag,e)])])]);return t.setAttribute("width","100%"),t}});var lr={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},or={"\\textbf":"textbf","\\textmd":"textmd"},_1={"\\textit":"textit","\\textup":"textup"},ur=(r,e)=>{var t=r.font;return t?lr[t]?e.withTextFontFamily(lr[t]):or[t]?e.withTextFontWeight(or[t]):e.withTextFontShape(_1[t]):e};B({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(r,e){var{parser:t,funcName:a}=r,n=e[0];return{type:"text",mode:t.mode,body:Q(n),font:a}},htmlBuilder(r,e){var t=ur(r,e),a=t0(r.body,t,!0);return b.makeSpan(["mord","text"],a,t)},mathmlBuilder(r,e){var t=ur(r,e);return G0(r.body,t)}});B({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(r,e){var{parser:t}=r;return{type:"underline",mode:t.mode,body:e[0]}},htmlBuilder(r,e){var t=P(r.body,e),a=b.makeLineSpan("underline-line",e),n=e.fontMetrics().defaultRuleThickness,s=b.makeVList({positionType:"top",positionData:t.height,children:[{type:"kern",size:n},{type:"elem",elem:a},{type:"kern",size:3*n},{type:"elem",elem:t}]},e);return b.makeSpan(["mord","underline"],[s],e)},mathmlBuilder(r,e){var t=new S.MathNode("mo",[new S.TextNode("โ€พ")]);t.setAttribute("stretchy","true");var a=new S.MathNode("munder",[Y(r.body,e),t]);return a.setAttribute("accentunder","true"),a}});B({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(r,e){var{parser:t}=r;return{type:"vcenter",mode:t.mode,body:e[0]}},htmlBuilder(r,e){var t=P(r.body,e),a=e.fontMetrics().axisHeight,n=.5*(t.height-a-(t.depth+a));return b.makeVList({positionType:"shift",positionData:n,children:[{type:"elem",elem:t}]},e)},mathmlBuilder(r,e){return new S.MathNode("mpadded",[Y(r.body,e)],["vcenter"])}});B({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(r,e,t){throw new M("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(r,e){for(var t=hr(r),a=[],n=e.havingStyle(e.style.text()),s=0;sr.body.replace(/ /g,r.star?"โฃ":"ย "),F0=Tr,ia=`[ \r + ]`,e4="\\\\[a-zA-Z@]+",t4="\\\\[^\uD800-\uDFFF]",r4="("+e4+")"+ia+"*",a4=`\\\\( +|[ \r ]+ +?)[ \r ]*`,mt="[ฬ€-อฏ]",n4=new RegExp(mt+"+$"),i4="("+ia+"+)|"+(a4+"|")+"([!-\\[\\]-โ€งโ€ช-ํŸฟ๏ค€-๏ฟฟ]"+(mt+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(mt+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+r4)+("|"+t4+")");class mr{constructor(e,t){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=t,this.tokenRegex=new RegExp(i4,"g"),this.catcodes={"%":14,"~":13}}setCatcode(e,t){this.catcodes[e]=t}lex(){var e=this.input,t=this.tokenRegex.lastIndex;if(t===e.length)return new x0("EOF",new u0(this,t,t));var a=this.tokenRegex.exec(e);if(a===null||a.index!==t)throw new M("Unexpected character: '"+e[t]+"'",new x0(e[t],new u0(this,t,t+1)));var n=a[6]||a[3]||(a[2]?"\\ ":" ");if(this.catcodes[n]===14){var s=e.indexOf(` +`,this.tokenRegex.lastIndex);return s===-1?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=s+1,this.lex()}return new x0(n,new u0(this,t,this.tokenRegex.lastIndex))}}class s4{constructor(e,t){e===void 0&&(e={}),t===void 0&&(t={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new M("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e=this.undefStack.pop();for(var t in e)e.hasOwnProperty(t)&&(e[t]==null?delete this.current[t]:this.current[t]=e[t])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]}set(e,t,a){if(a===void 0&&(a=!1),a){for(var n=0;n0&&(this.undefStack[this.undefStack.length-1][e]=t)}else{var s=this.undefStack[this.undefStack.length-1];s&&!s.hasOwnProperty(e)&&(s[e]=this.current[e])}t==null?delete this.current[e]:this.current[e]=t}}var l4=jr;m("\\noexpand",function(r){var e=r.popToken();return r.isExpandable(e.text)&&(e.noexpand=!0,e.treatAsRelax=!0),{tokens:[e],numArgs:0}});m("\\expandafter",function(r){var e=r.popToken();return r.expandOnce(!0),{tokens:[e],numArgs:0}});m("\\@firstoftwo",function(r){var e=r.consumeArgs(2);return{tokens:e[0],numArgs:0}});m("\\@secondoftwo",function(r){var e=r.consumeArgs(2);return{tokens:e[1],numArgs:0}});m("\\@ifnextchar",function(r){var e=r.consumeArgs(3);r.consumeSpaces();var t=r.future();return e[0].length===1&&e[0][0].text===t.text?{tokens:e[1],numArgs:0}:{tokens:e[2],numArgs:0}});m("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");m("\\TextOrMath",function(r){var e=r.consumeArgs(2);return r.mode==="text"?{tokens:e[0],numArgs:0}:{tokens:e[1],numArgs:0}});var cr={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};m("\\char",function(r){var e=r.popToken(),t,a="";if(e.text==="'")t=8,e=r.popToken();else if(e.text==='"')t=16,e=r.popToken();else if(e.text==="`")if(e=r.popToken(),e.text[0]==="\\")a=e.text.charCodeAt(1);else{if(e.text==="EOF")throw new M("\\char` missing argument");a=e.text.charCodeAt(0)}else t=10;if(t){if(a=cr[e.text],a==null||a>=t)throw new M("Invalid base-"+t+" digit "+e.text);for(var n;(n=cr[r.future().text])!=null&&n{var a=r.consumeArg().tokens;if(a.length!==1)throw new M("\\newcommand's first argument must be a macro name");var n=a[0].text,s=r.isDefined(n);if(s&&!e)throw new M("\\newcommand{"+n+"} attempting to redefine "+(n+"; use \\renewcommand"));if(!s&&!t)throw new M("\\renewcommand{"+n+"} when command "+n+" does not yet exist; use \\newcommand");var o=0;if(a=r.consumeArg().tokens,a.length===1&&a[0].text==="["){for(var h="",c=r.expandNextToken();c.text!=="]"&&c.text!=="EOF";)h+=c.text,c=r.expandNextToken();if(!h.match(/^\s*[0-9]+\s*$/))throw new M("Invalid number of arguments: "+h);o=parseInt(h),a=r.consumeArg().tokens}return r.macros.set(n,{tokens:a,numArgs:o}),""};m("\\newcommand",r=>Bt(r,!1,!0));m("\\renewcommand",r=>Bt(r,!0,!1));m("\\providecommand",r=>Bt(r,!0,!0));m("\\message",r=>{var e=r.consumeArgs(1)[0];return console.log(e.reverse().map(t=>t.text).join("")),""});m("\\errmessage",r=>{var e=r.consumeArgs(1)[0];return console.error(e.reverse().map(t=>t.text).join("")),""});m("\\show",r=>{var e=r.popToken(),t=e.text;return console.log(e,r.macros.get(t),F0[t],$.math[t],$.text[t]),""});m("\\bgroup","{");m("\\egroup","}");m("~","\\nobreakspace");m("\\lq","`");m("\\rq","'");m("\\aa","\\r a");m("\\AA","\\r A");m("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`ยฉ}");m("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");m("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`ยฎ}");m("โ„ฌ","\\mathscr{B}");m("โ„ฐ","\\mathscr{E}");m("โ„ฑ","\\mathscr{F}");m("โ„‹","\\mathscr{H}");m("โ„","\\mathscr{I}");m("โ„’","\\mathscr{L}");m("โ„ณ","\\mathscr{M}");m("โ„›","\\mathscr{R}");m("โ„ญ","\\mathfrak{C}");m("โ„Œ","\\mathfrak{H}");m("โ„จ","\\mathfrak{Z}");m("\\Bbbk","\\Bbb{k}");m("ยท","\\cdotp");m("\\llap","\\mathllap{\\textrm{#1}}");m("\\rlap","\\mathrlap{\\textrm{#1}}");m("\\clap","\\mathclap{\\textrm{#1}}");m("\\mathstrut","\\vphantom{(}");m("\\underbar","\\underline{\\text{#1}}");m("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}');m("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`โ‰ }}");m("\\ne","\\neq");m("โ‰ ","\\neq");m("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`โˆ‰}}");m("โˆ‰","\\notin");m("โ‰˜","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`โ‰˜}}");m("โ‰™","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`โ‰˜}}");m("โ‰š","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`โ‰š}}");m("โ‰›","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`โ‰›}}");m("โ‰","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`โ‰}}");m("โ‰ž","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`โ‰ž}}");m("โ‰Ÿ","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`โ‰Ÿ}}");m("โŸ‚","\\perp");m("โ€ผ","\\mathclose{!\\mkern-0.8mu!}");m("โˆŒ","\\notni");m("โŒœ","\\ulcorner");m("โŒ","\\urcorner");m("โŒž","\\llcorner");m("โŒŸ","\\lrcorner");m("ยฉ","\\copyright");m("ยฎ","\\textregistered");m("๏ธ","\\textregistered");m("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');m("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');m("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');m("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');m("\\vdots","\\mathord{\\varvdots\\rule{0pt}{15pt}}");m("โ‹ฎ","\\vdots");m("\\varGamma","\\mathit{\\Gamma}");m("\\varDelta","\\mathit{\\Delta}");m("\\varTheta","\\mathit{\\Theta}");m("\\varLambda","\\mathit{\\Lambda}");m("\\varXi","\\mathit{\\Xi}");m("\\varPi","\\mathit{\\Pi}");m("\\varSigma","\\mathit{\\Sigma}");m("\\varUpsilon","\\mathit{\\Upsilon}");m("\\varPhi","\\mathit{\\Phi}");m("\\varPsi","\\mathit{\\Psi}");m("\\varOmega","\\mathit{\\Omega}");m("\\substack","\\begin{subarray}{c}#1\\end{subarray}");m("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");m("\\boxed","\\fbox{$\\displaystyle{#1}$}");m("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");m("\\implies","\\DOTSB\\;\\Longrightarrow\\;");m("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");var dr={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"};m("\\dots",function(r){var e="\\dotso",t=r.expandAfterFuture().text;return t in dr?e=dr[t]:(t.slice(0,4)==="\\not"||t in $.math&&I.contains(["bin","rel"],$.math[t].group))&&(e="\\dotsb"),e});var Dt={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};m("\\dotso",function(r){var e=r.future().text;return e in Dt?"\\ldots\\,":"\\ldots"});m("\\dotsc",function(r){var e=r.future().text;return e in Dt&&e!==","?"\\ldots\\,":"\\ldots"});m("\\cdots",function(r){var e=r.future().text;return e in Dt?"\\@cdots\\,":"\\@cdots"});m("\\dotsb","\\cdots");m("\\dotsm","\\cdots");m("\\dotsi","\\!\\cdots");m("\\dotsx","\\ldots\\,");m("\\DOTSI","\\relax");m("\\DOTSB","\\relax");m("\\DOTSX","\\relax");m("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");m("\\,","\\tmspace+{3mu}{.1667em}");m("\\thinspace","\\,");m("\\>","\\mskip{4mu}");m("\\:","\\tmspace+{4mu}{.2222em}");m("\\medspace","\\:");m("\\;","\\tmspace+{5mu}{.2777em}");m("\\thickspace","\\;");m("\\!","\\tmspace-{3mu}{.1667em}");m("\\negthinspace","\\!");m("\\negmedspace","\\tmspace-{4mu}{.2222em}");m("\\negthickspace","\\tmspace-{5mu}{.277em}");m("\\enspace","\\kern.5em ");m("\\enskip","\\hskip.5em\\relax");m("\\quad","\\hskip1em\\relax");m("\\qquad","\\hskip2em\\relax");m("\\tag","\\@ifstar\\tag@literal\\tag@paren");m("\\tag@paren","\\tag@literal{({#1})}");m("\\tag@literal",r=>{if(r.macros.get("\\df@tag"))throw new M("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});m("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");m("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");m("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");m("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");m("\\newline","\\\\\\relax");m("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var sa=A(y0["Main-Regular"][84][1]-.7*y0["Main-Regular"][65][1]);m("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+sa+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");m("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+sa+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");m("\\hspace","\\@ifstar\\@hspacer\\@hspace");m("\\@hspace","\\hskip #1\\relax");m("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");m("\\ordinarycolon",":");m("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");m("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');m("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');m("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');m("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');m("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');m("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');m("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');m("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');m("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');m("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');m("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');m("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');m("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');m("โˆท","\\dblcolon");m("โˆน","\\eqcolon");m("โ‰”","\\coloneqq");m("โ‰•","\\eqqcolon");m("โฉด","\\Coloneqq");m("\\ratio","\\vcentcolon");m("\\coloncolon","\\dblcolon");m("\\colonequals","\\coloneqq");m("\\coloncolonequals","\\Coloneqq");m("\\equalscolon","\\eqqcolon");m("\\equalscoloncolon","\\Eqqcolon");m("\\colonminus","\\coloneq");m("\\coloncolonminus","\\Coloneq");m("\\minuscolon","\\eqcolon");m("\\minuscoloncolon","\\Eqcolon");m("\\coloncolonapprox","\\Colonapprox");m("\\coloncolonsim","\\Colonsim");m("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");m("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");m("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");m("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");m("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`โˆŒ}}");m("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");m("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");m("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");m("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");m("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");m("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");m("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");m("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");m("\\gvertneqq","\\html@mathml{\\@gvertneqq}{โ‰ฉ}");m("\\lvertneqq","\\html@mathml{\\@lvertneqq}{โ‰จ}");m("\\ngeqq","\\html@mathml{\\@ngeqq}{โ‰ฑ}");m("\\ngeqslant","\\html@mathml{\\@ngeqslant}{โ‰ฑ}");m("\\nleqq","\\html@mathml{\\@nleqq}{โ‰ฐ}");m("\\nleqslant","\\html@mathml{\\@nleqslant}{โ‰ฐ}");m("\\nshortmid","\\html@mathml{\\@nshortmid}{โˆค}");m("\\nshortparallel","\\html@mathml{\\@nshortparallel}{โˆฆ}");m("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{โŠˆ}");m("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{โЉ}");m("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{โŠŠ}");m("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{โซ‹}");m("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{โŠ‹}");m("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{โซŒ}");m("\\imath","\\html@mathml{\\@imath}{ฤฑ}");m("\\jmath","\\html@mathml{\\@jmath}{ศท}");m("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`โŸฆ}}");m("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`โŸง}}");m("โŸฆ","\\llbracket");m("โŸง","\\rrbracket");m("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`โฆƒ}}");m("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`โฆ„}}");m("โฆƒ","\\lBrace");m("โฆ„","\\rBrace");m("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`โฆต}}");m("โฆต","\\minuso");m("\\darr","\\downarrow");m("\\dArr","\\Downarrow");m("\\Darr","\\Downarrow");m("\\lang","\\langle");m("\\rang","\\rangle");m("\\uarr","\\uparrow");m("\\uArr","\\Uparrow");m("\\Uarr","\\Uparrow");m("\\N","\\mathbb{N}");m("\\R","\\mathbb{R}");m("\\Z","\\mathbb{Z}");m("\\alef","\\aleph");m("\\alefsym","\\aleph");m("\\Alpha","\\mathrm{A}");m("\\Beta","\\mathrm{B}");m("\\bull","\\bullet");m("\\Chi","\\mathrm{X}");m("\\clubs","\\clubsuit");m("\\cnums","\\mathbb{C}");m("\\Complex","\\mathbb{C}");m("\\Dagger","\\ddagger");m("\\diamonds","\\diamondsuit");m("\\empty","\\emptyset");m("\\Epsilon","\\mathrm{E}");m("\\Eta","\\mathrm{H}");m("\\exist","\\exists");m("\\harr","\\leftrightarrow");m("\\hArr","\\Leftrightarrow");m("\\Harr","\\Leftrightarrow");m("\\hearts","\\heartsuit");m("\\image","\\Im");m("\\infin","\\infty");m("\\Iota","\\mathrm{I}");m("\\isin","\\in");m("\\Kappa","\\mathrm{K}");m("\\larr","\\leftarrow");m("\\lArr","\\Leftarrow");m("\\Larr","\\Leftarrow");m("\\lrarr","\\leftrightarrow");m("\\lrArr","\\Leftrightarrow");m("\\Lrarr","\\Leftrightarrow");m("\\Mu","\\mathrm{M}");m("\\natnums","\\mathbb{N}");m("\\Nu","\\mathrm{N}");m("\\Omicron","\\mathrm{O}");m("\\plusmn","\\pm");m("\\rarr","\\rightarrow");m("\\rArr","\\Rightarrow");m("\\Rarr","\\Rightarrow");m("\\real","\\Re");m("\\reals","\\mathbb{R}");m("\\Reals","\\mathbb{R}");m("\\Rho","\\mathrm{P}");m("\\sdot","\\cdot");m("\\sect","\\S");m("\\spades","\\spadesuit");m("\\sub","\\subset");m("\\sube","\\subseteq");m("\\supe","\\supseteq");m("\\Tau","\\mathrm{T}");m("\\thetasym","\\vartheta");m("\\weierp","\\wp");m("\\Zeta","\\mathrm{Z}");m("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");m("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");m("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");m("\\bra","\\mathinner{\\langle{#1}|}");m("\\ket","\\mathinner{|{#1}\\rangle}");m("\\braket","\\mathinner{\\langle{#1}\\rangle}");m("\\Bra","\\left\\langle#1\\right|");m("\\Ket","\\left|#1\\right\\rangle");var la=r=>e=>{var t=e.consumeArg().tokens,a=e.consumeArg().tokens,n=e.consumeArg().tokens,s=e.consumeArg().tokens,o=e.macros.get("|"),h=e.macros.get("\\|");e.macros.beginGroup();var c=y=>w=>{r&&(w.macros.set("|",o),n.length&&w.macros.set("\\|",h));var x=y;if(!y&&n.length){var z=w.future();z.text==="|"&&(w.popToken(),x=!0)}return{tokens:x?n:a,numArgs:0}};e.macros.set("|",c(!1)),n.length&&e.macros.set("\\|",c(!0));var p=e.consumeArg().tokens,g=e.expandTokens([...s,...p,...t]);return e.macros.endGroup(),{tokens:g.reverse(),numArgs:0}};m("\\bra@ket",la(!1));m("\\bra@set",la(!0));m("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");m("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");m("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");m("\\angln","{\\angl n}");m("\\blue","\\textcolor{##6495ed}{#1}");m("\\orange","\\textcolor{##ffa500}{#1}");m("\\pink","\\textcolor{##ff00af}{#1}");m("\\red","\\textcolor{##df0030}{#1}");m("\\green","\\textcolor{##28ae7b}{#1}");m("\\gray","\\textcolor{gray}{#1}");m("\\purple","\\textcolor{##9d38bd}{#1}");m("\\blueA","\\textcolor{##ccfaff}{#1}");m("\\blueB","\\textcolor{##80f6ff}{#1}");m("\\blueC","\\textcolor{##63d9ea}{#1}");m("\\blueD","\\textcolor{##11accd}{#1}");m("\\blueE","\\textcolor{##0c7f99}{#1}");m("\\tealA","\\textcolor{##94fff5}{#1}");m("\\tealB","\\textcolor{##26edd5}{#1}");m("\\tealC","\\textcolor{##01d1c1}{#1}");m("\\tealD","\\textcolor{##01a995}{#1}");m("\\tealE","\\textcolor{##208170}{#1}");m("\\greenA","\\textcolor{##b6ffb0}{#1}");m("\\greenB","\\textcolor{##8af281}{#1}");m("\\greenC","\\textcolor{##74cf70}{#1}");m("\\greenD","\\textcolor{##1fab54}{#1}");m("\\greenE","\\textcolor{##0d923f}{#1}");m("\\goldA","\\textcolor{##ffd0a9}{#1}");m("\\goldB","\\textcolor{##ffbb71}{#1}");m("\\goldC","\\textcolor{##ff9c39}{#1}");m("\\goldD","\\textcolor{##e07d10}{#1}");m("\\goldE","\\textcolor{##a75a05}{#1}");m("\\redA","\\textcolor{##fca9a9}{#1}");m("\\redB","\\textcolor{##ff8482}{#1}");m("\\redC","\\textcolor{##f9685d}{#1}");m("\\redD","\\textcolor{##e84d39}{#1}");m("\\redE","\\textcolor{##bc2612}{#1}");m("\\maroonA","\\textcolor{##ffbde0}{#1}");m("\\maroonB","\\textcolor{##ff92c6}{#1}");m("\\maroonC","\\textcolor{##ed5fa6}{#1}");m("\\maroonD","\\textcolor{##ca337c}{#1}");m("\\maroonE","\\textcolor{##9e034e}{#1}");m("\\purpleA","\\textcolor{##ddd7ff}{#1}");m("\\purpleB","\\textcolor{##c6b9fc}{#1}");m("\\purpleC","\\textcolor{##aa87ff}{#1}");m("\\purpleD","\\textcolor{##7854ab}{#1}");m("\\purpleE","\\textcolor{##543b78}{#1}");m("\\mintA","\\textcolor{##f5f9e8}{#1}");m("\\mintB","\\textcolor{##edf2df}{#1}");m("\\mintC","\\textcolor{##e0e5cc}{#1}");m("\\grayA","\\textcolor{##f6f7f7}{#1}");m("\\grayB","\\textcolor{##f0f1f2}{#1}");m("\\grayC","\\textcolor{##e3e5e6}{#1}");m("\\grayD","\\textcolor{##d6d8da}{#1}");m("\\grayE","\\textcolor{##babec2}{#1}");m("\\grayF","\\textcolor{##888d93}{#1}");m("\\grayG","\\textcolor{##626569}{#1}");m("\\grayH","\\textcolor{##3b3e40}{#1}");m("\\grayI","\\textcolor{##21242c}{#1}");m("\\kaBlue","\\textcolor{##314453}{#1}");m("\\kaGreen","\\textcolor{##71B307}{#1}");var oa={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class o4{constructor(e,t,a){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new s4(l4,t.macros),this.mode=a,this.stack=[]}feed(e){this.lexer=new mr(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){var t,a,n;if(e){if(this.consumeSpaces(),this.future().text!=="[")return null;t=this.popToken(),{tokens:n,end:a}=this.consumeArg(["]"])}else({tokens:n,start:t,end:a}=this.consumeArg());return this.pushToken(new x0("EOF",a.loc)),this.pushTokens(n),t.range(a,"")}consumeSpaces(){for(;;){var e=this.future();if(e.text===" ")this.stack.pop();else break}}consumeArg(e){var t=[],a=e&&e.length>0;a||this.consumeSpaces();var n=this.future(),s,o=0,h=0;do{if(s=this.popToken(),t.push(s),s.text==="{")++o;else if(s.text==="}"){if(--o,o===-1)throw new M("Extra }",s)}else if(s.text==="EOF")throw new M("Unexpected end of input in a macro argument, expected '"+(e&&a?e[h]:"}")+"'",s);if(e&&a)if((o===0||o===1&&e[h]==="{")&&s.text===e[h]){if(++h,h===e.length){t.splice(-h,h);break}}else h=0}while(o!==0||a);return n.text==="{"&&t[t.length-1].text==="}"&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:n,end:s}}consumeArgs(e,t){if(t){if(t.length!==e+1)throw new M("The length of delimiters doesn't match the number of args!");for(var a=t[0],n=0;nthis.settings.maxExpand)throw new M("Too many expansions: infinite loop or need to increase maxExpand setting");var s=n.tokens,o=this.consumeArgs(n.numArgs,n.delimiters);if(n.numArgs){s=s.slice();for(var h=s.length-1;h>=0;--h){var c=s[h];if(c.text==="#"){if(h===0)throw new M("Incomplete placeholder at end of macro body",c);if(c=s[--h],c.text==="#")s.splice(h+1,1);else if(/^[1-9]$/.test(c.text))s.splice(h,2,...o[+c.text-1]);else throw new M("Not a valid argument number",c)}}}return this.pushTokens(s),s.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var e=this.stack.pop();return e.treatAsRelax&&(e.text="\\relax"),e}throw new Error}expandMacro(e){return this.macros.has(e)?this.expandTokens([new x0(e)]):void 0}expandTokens(e){var t=[],a=this.stack.length;for(this.pushTokens(e);this.stack.length>a;)if(this.expandOnce(!0)===!1){var n=this.stack.pop();n.treatAsRelax&&(n.noexpand=!1,n.treatAsRelax=!1),t.push(n)}return t}expandMacroAsText(e){var t=this.expandMacro(e);return t&&t.map(a=>a.text).join("")}_getExpansion(e){var t=this.macros.get(e);if(t==null)return t;if(e.length===1){var a=this.lexer.catcodes[e];if(a!=null&&a!==13)return}var n=typeof t=="function"?t(this):t;if(typeof n=="string"){var s=0;if(n.indexOf("#")!==-1)for(var o=n.replace(/##/g,"");o.indexOf("#"+(s+1))!==-1;)++s;for(var h=new mr(n,this.settings),c=[],p=h.lex();p.text!=="EOF";)c.push(p),p=h.lex();c.reverse();var g={tokens:c,numArgs:s};return g}return n}isDefined(e){return this.macros.has(e)||F0.hasOwnProperty(e)||$.math.hasOwnProperty(e)||$.text.hasOwnProperty(e)||oa.hasOwnProperty(e)}isExpandable(e){var t=this.macros.get(e);return t!=null?typeof t=="string"||typeof t=="function"||!t.unexpandable:F0.hasOwnProperty(e)&&!F0[e].primitive}}var fr=/^[โ‚Šโ‚‹โ‚Œโ‚โ‚Žโ‚€โ‚โ‚‚โ‚ƒโ‚„โ‚…โ‚†โ‚‡โ‚ˆโ‚‰โ‚โ‚‘โ‚•แตขโฑผโ‚–โ‚—โ‚˜โ‚™โ‚’โ‚šแตฃโ‚›โ‚œแตคแตฅโ‚“แตฆแตงแตจแตฉแตช]/,ze=Object.freeze({"โ‚Š":"+","โ‚‹":"-","โ‚Œ":"=","โ‚":"(","โ‚Ž":")","โ‚€":"0","โ‚":"1","โ‚‚":"2","โ‚ƒ":"3","โ‚„":"4","โ‚…":"5","โ‚†":"6","โ‚‡":"7","โ‚ˆ":"8","โ‚‰":"9","โ‚":"a","โ‚‘":"e","โ‚•":"h","แตข":"i","โฑผ":"j","โ‚–":"k","โ‚—":"l","โ‚˜":"m","โ‚™":"n","โ‚’":"o","โ‚š":"p","แตฃ":"r","โ‚›":"s","โ‚œ":"t","แตค":"u","แตฅ":"v","โ‚“":"x","แตฆ":"ฮฒ","แตง":"ฮณ","แตจ":"ฯ","แตฉ":"ฯ•","แตช":"ฯ‡","โบ":"+","โป":"-","โผ":"=","โฝ":"(","โพ":")","โฐ":"0","ยน":"1","ยฒ":"2","ยณ":"3","โด":"4","โต":"5","โถ":"6","โท":"7","โธ":"8","โน":"9","แดฌ":"A","แดฎ":"B","แดฐ":"D","แดฑ":"E","แดณ":"G","แดด":"H","แดต":"I","แดถ":"J","แดท":"K","แดธ":"L","แดน":"M","แดบ":"N","แดผ":"O","แดพ":"P","แดฟ":"R","แต€":"T","แต":"U","โฑฝ":"V","แต‚":"W","แตƒ":"a","แต‡":"b","แถœ":"c","แตˆ":"d","แต‰":"e","แถ ":"f","แต":"g",สฐ:"h","โฑ":"i",สฒ:"j","แต":"k",หก:"l","แต":"m",โฟ:"n","แต’":"o","แต–":"p",สณ:"r",หข:"s","แต—":"t","แต˜":"u","แต›":"v",สท:"w",หฃ:"x",สธ:"y","แถป":"z","แต":"ฮฒ","แตž":"ฮณ","แตŸ":"ฮด","แต ":"ฯ•","แตก":"ฯ‡","แถฟ":"ฮธ"}),rt={"ฬ":{text:"\\'",math:"\\acute"},"ฬ€":{text:"\\`",math:"\\grave"},"ฬˆ":{text:'\\"',math:"\\ddot"},"ฬƒ":{text:"\\~",math:"\\tilde"},"ฬ„":{text:"\\=",math:"\\bar"},"ฬ†":{text:"\\u",math:"\\breve"},"ฬŒ":{text:"\\v",math:"\\check"},"ฬ‚":{text:"\\^",math:"\\hat"},"ฬ‡":{text:"\\.",math:"\\dot"},"ฬŠ":{text:"\\r",math:"\\mathring"},"ฬ‹":{text:"\\H"},"ฬง":{text:"\\c"}},pr={รก:"aฬ",ร :"aฬ€",รค:"aฬˆ",วŸ:"aฬˆฬ„",รฃ:"aฬƒ",ฤ:"aฬ„",ฤƒ:"aฬ†",แบฏ:"aฬ†ฬ",แบฑ:"aฬ†ฬ€",แบต:"aฬ†ฬƒ",วŽ:"aฬŒ",รข:"aฬ‚",แบฅ:"aฬ‚ฬ",แบง:"aฬ‚ฬ€",แบซ:"aฬ‚ฬƒ",ศง:"aฬ‡",วก:"aฬ‡ฬ„",รฅ:"aฬŠ",วป:"aฬŠฬ",แธƒ:"bฬ‡",ฤ‡:"cฬ",แธ‰:"cฬงฬ",ฤ:"cฬŒ",ฤ‰:"cฬ‚",ฤ‹:"cฬ‡",รง:"cฬง",ฤ:"dฬŒ",แธ‹:"dฬ‡",แธ‘:"dฬง",รฉ:"eฬ",รจ:"eฬ€",รซ:"eฬˆ",แบฝ:"eฬƒ",ฤ“:"eฬ„",แธ—:"eฬ„ฬ",แธ•:"eฬ„ฬ€",ฤ•:"eฬ†",แธ:"eฬงฬ†",ฤ›:"eฬŒ",รช:"eฬ‚",แบฟ:"eฬ‚ฬ",แป:"eฬ‚ฬ€",แป…:"eฬ‚ฬƒ",ฤ—:"eฬ‡",ศฉ:"eฬง",แธŸ:"fฬ‡",วต:"gฬ",แธก:"gฬ„",ฤŸ:"gฬ†",วง:"gฬŒ",ฤ:"gฬ‚",ฤก:"gฬ‡",ฤฃ:"gฬง",แธง:"hฬˆ",ศŸ:"hฬŒ",ฤฅ:"hฬ‚",แธฃ:"hฬ‡",แธฉ:"hฬง",รญ:"iฬ",รฌ:"iฬ€",รฏ:"iฬˆ",แธฏ:"iฬˆฬ",ฤฉ:"iฬƒ",ฤซ:"iฬ„",ฤญ:"iฬ†",ว:"iฬŒ",รฎ:"iฬ‚",วฐ:"jฬŒ",ฤต:"jฬ‚",แธฑ:"kฬ",วฉ:"kฬŒ",ฤท:"kฬง",ฤบ:"lฬ",ฤพ:"lฬŒ",ฤผ:"lฬง",แธฟ:"mฬ",แน:"mฬ‡",ล„:"nฬ",วน:"nฬ€",รฑ:"nฬƒ",ลˆ:"nฬŒ",แน…:"nฬ‡",ล†:"nฬง",รณ:"oฬ",รฒ:"oฬ€",รถ:"oฬˆ",ศซ:"oฬˆฬ„",รต:"oฬƒ",แน:"oฬƒฬ",แน:"oฬƒฬˆ",ศญ:"oฬƒฬ„",ล:"oฬ„",แน“:"oฬ„ฬ",แน‘:"oฬ„ฬ€",ล:"oฬ†",ว’:"oฬŒ",รด:"oฬ‚",แป‘:"oฬ‚ฬ",แป“:"oฬ‚ฬ€",แป—:"oฬ‚ฬƒ",ศฏ:"oฬ‡",ศฑ:"oฬ‡ฬ„",ล‘:"oฬ‹",แน•:"pฬ",แน—:"pฬ‡",ล•:"rฬ",ล™:"rฬŒ",แน™:"rฬ‡",ล—:"rฬง",ล›:"sฬ",แนฅ:"sฬฬ‡",ลก:"sฬŒ",แนง:"sฬŒฬ‡",ล:"sฬ‚",แนก:"sฬ‡",ลŸ:"sฬง",แบ—:"tฬˆ",ลฅ:"tฬŒ",แนซ:"tฬ‡",ลฃ:"tฬง",รบ:"uฬ",รน:"uฬ€",รผ:"uฬˆ",ว˜:"uฬˆฬ",วœ:"uฬˆฬ€",ว–:"uฬˆฬ„",วš:"uฬˆฬŒ",ลฉ:"uฬƒ",แนน:"uฬƒฬ",ลซ:"uฬ„",แนป:"uฬ„ฬˆ",ลญ:"uฬ†",ว”:"uฬŒ",รป:"uฬ‚",ลฏ:"uฬŠ",ลฑ:"uฬ‹",แนฝ:"vฬƒ",แบƒ:"wฬ",แบ:"wฬ€",แบ…:"wฬˆ",ลต:"wฬ‚",แบ‡:"wฬ‡",แบ˜:"wฬŠ",แบ:"xฬˆ",แบ‹:"xฬ‡",รฝ:"yฬ",แปณ:"yฬ€",รฟ:"yฬˆ",แปน:"yฬƒ",ศณ:"yฬ„",ลท:"yฬ‚",แบ:"yฬ‡",แบ™:"yฬŠ",ลบ:"zฬ",ลพ:"zฬŒ",แบ‘:"zฬ‚",ลผ:"zฬ‡",ร:"Aฬ",ร€:"Aฬ€",ร„:"Aฬˆ",วž:"Aฬˆฬ„",รƒ:"Aฬƒ",ฤ€:"Aฬ„",ฤ‚:"Aฬ†",แบฎ:"Aฬ†ฬ",แบฐ:"Aฬ†ฬ€",แบด:"Aฬ†ฬƒ",ว:"AฬŒ",ร‚:"Aฬ‚",แบค:"Aฬ‚ฬ",แบฆ:"Aฬ‚ฬ€",แบช:"Aฬ‚ฬƒ",ศฆ:"Aฬ‡",ว :"Aฬ‡ฬ„",ร…:"AฬŠ",วบ:"AฬŠฬ",แธ‚:"Bฬ‡",ฤ†:"Cฬ",แธˆ:"Cฬงฬ",ฤŒ:"CฬŒ",ฤˆ:"Cฬ‚",ฤŠ:"Cฬ‡",ร‡:"Cฬง",ฤŽ:"DฬŒ",แธŠ:"Dฬ‡",แธ:"Dฬง",ร‰:"Eฬ",รˆ:"Eฬ€",ร‹:"Eฬˆ",แบผ:"Eฬƒ",ฤ’:"Eฬ„",แธ–:"Eฬ„ฬ",แธ”:"Eฬ„ฬ€",ฤ”:"Eฬ†",แธœ:"Eฬงฬ†",ฤš:"EฬŒ",รŠ:"Eฬ‚",แบพ:"Eฬ‚ฬ",แป€:"Eฬ‚ฬ€",แป„:"Eฬ‚ฬƒ",ฤ–:"Eฬ‡",ศจ:"Eฬง",แธž:"Fฬ‡",วด:"Gฬ",แธ :"Gฬ„",ฤž:"Gฬ†",วฆ:"GฬŒ",ฤœ:"Gฬ‚",ฤ :"Gฬ‡",ฤข:"Gฬง",แธฆ:"Hฬˆ",ศž:"HฬŒ",ฤค:"Hฬ‚",แธข:"Hฬ‡",แธจ:"Hฬง",ร:"Iฬ",รŒ:"Iฬ€",ร:"Iฬˆ",แธฎ:"Iฬˆฬ",ฤจ:"Iฬƒ",ฤช:"Iฬ„",ฤฌ:"Iฬ†",ว:"IฬŒ",รŽ:"Iฬ‚",ฤฐ:"Iฬ‡",ฤด:"Jฬ‚",แธฐ:"Kฬ",วจ:"KฬŒ",ฤถ:"Kฬง",ฤน:"Lฬ",ฤฝ:"LฬŒ",ฤป:"Lฬง",แธพ:"Mฬ",แน€:"Mฬ‡",ลƒ:"Nฬ",วธ:"Nฬ€",ร‘:"Nฬƒ",ล‡:"NฬŒ",แน„:"Nฬ‡",ล…:"Nฬง",ร“:"Oฬ",ร’:"Oฬ€",ร–:"Oฬˆ",ศช:"Oฬˆฬ„",ร•:"Oฬƒ",แนŒ:"Oฬƒฬ",แนŽ:"Oฬƒฬˆ",ศฌ:"Oฬƒฬ„",ลŒ:"Oฬ„",แน’:"Oฬ„ฬ",แน:"Oฬ„ฬ€",ลŽ:"Oฬ†",ว‘:"OฬŒ",ร”:"Oฬ‚",แป:"Oฬ‚ฬ",แป’:"Oฬ‚ฬ€",แป–:"Oฬ‚ฬƒ",ศฎ:"Oฬ‡",ศฐ:"Oฬ‡ฬ„",ล:"Oฬ‹",แน”:"Pฬ",แน–:"Pฬ‡",ล”:"Rฬ",ล˜:"RฬŒ",แน˜:"Rฬ‡",ล–:"Rฬง",ลš:"Sฬ",แนค:"Sฬฬ‡",ล :"SฬŒ",แนฆ:"SฬŒฬ‡",ลœ:"Sฬ‚",แน :"Sฬ‡",ลž:"Sฬง",ลค:"TฬŒ",แนช:"Tฬ‡",ลข:"Tฬง",รš:"Uฬ",ร™:"Uฬ€",รœ:"Uฬˆ",ว—:"Uฬˆฬ",ว›:"Uฬˆฬ€",ว•:"Uฬˆฬ„",ว™:"UฬˆฬŒ",ลจ:"Uฬƒ",แนธ:"Uฬƒฬ",ลช:"Uฬ„",แนบ:"Uฬ„ฬˆ",ลฌ:"Uฬ†",ว“:"UฬŒ",ร›:"Uฬ‚",ลฎ:"UฬŠ",ลฐ:"Uฬ‹",แนผ:"Vฬƒ",แบ‚:"Wฬ",แบ€:"Wฬ€",แบ„:"Wฬˆ",ลด:"Wฬ‚",แบ†:"Wฬ‡",แบŒ:"Xฬˆ",แบŠ:"Xฬ‡",ร:"Yฬ",แปฒ:"Yฬ€",ลธ:"Yฬˆ",แปธ:"Yฬƒ",ศฒ:"Yฬ„",ลถ:"Yฬ‚",แบŽ:"Yฬ‡",ลน:"Zฬ",ลฝ:"ZฬŒ",แบ:"Zฬ‚",ลป:"Zฬ‡",ฮฌ:"ฮฑฬ",แฝฐ:"ฮฑฬ€",แพฑ:"ฮฑฬ„",แพฐ:"ฮฑฬ†",ฮญ:"ฮตฬ",แฝฒ:"ฮตฬ€",ฮฎ:"ฮทฬ",แฝด:"ฮทฬ€",ฮฏ:"ฮนฬ",แฝถ:"ฮนฬ€",ฯŠ:"ฮนฬˆ",ฮ:"ฮนฬˆฬ",แฟ’:"ฮนฬˆฬ€",แฟ‘:"ฮนฬ„",แฟ:"ฮนฬ†",ฯŒ:"ฮฟฬ",แฝธ:"ฮฟฬ€",ฯ:"ฯ…ฬ",แฝบ:"ฯ…ฬ€",ฯ‹:"ฯ…ฬˆ",ฮฐ:"ฯ…ฬˆฬ",แฟข:"ฯ…ฬˆฬ€",แฟก:"ฯ…ฬ„",แฟ :"ฯ…ฬ†",ฯŽ:"ฯ‰ฬ",แฝผ:"ฯ‰ฬ€",ฮŽ:"ฮฅฬ",แฟช:"ฮฅฬ€",ฮซ:"ฮฅฬˆ",แฟฉ:"ฮฅฬ„",แฟจ:"ฮฅฬ†",ฮ:"ฮฉฬ",แฟบ:"ฮฉฬ€"};class ue{constructor(e,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new o4(e,t,this.mode),this.settings=t,this.leftrightDepth=0}expect(e,t){if(t===void 0&&(t=!0),this.fetch().text!==e)throw new M("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var t=this.nextToken;this.consume(),this.gullet.pushToken(new x0("}")),this.gullet.pushTokens(e);var a=this.parseExpression(!1);return this.expect("}"),this.nextToken=t,a}parseExpression(e,t){for(var a=[];;){this.mode==="math"&&this.consumeSpaces();var n=this.fetch();if(ue.endOfExpression.indexOf(n.text)!==-1||t&&n.text===t||e&&F0[n.text]&&F0[n.text].infix)break;var s=this.parseAtom(t);if(s){if(s.type==="internal")continue}else break;a.push(s)}return this.mode==="text"&&this.formLigatures(a),this.handleInfixNodes(a)}handleInfixNodes(e){for(var t=-1,a,n=0;n=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+t[0]+'" used in math mode',e);var h=$[this.mode][t].group,c=u0.range(e),p;if(Ka.hasOwnProperty(h)){var g=h;p={type:"atom",mode:this.mode,family:g,loc:c,text:t}}else p={type:h,mode:this.mode,loc:c,text:t};o=p}else if(t.charCodeAt(0)>=128)this.settings.strict&&(gr(t.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+t[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+t[0]+'"'+(" ("+t.charCodeAt(0)+")"),e)),o={type:"textord",mode:"text",loc:u0.range(e),text:t};else return null;if(this.consume(),s)for(var y=0;y{const n=It.useRef(null);return It.useEffect(()=>{if(n.current)try{const s=c4.renderToString(r,{throwOnError:!1,displayMode:!e,output:"html",trust:!0,strict:!1});n.current.innerHTML=s}catch(s){console.error("KaTeX render error:",s),n.current.textContent=r}},[r,e]),fa.jsx("div",{ref:n,className:`math-renderer ${e?"inline-block":"block my-2"} ${t}`,style:{color:a}})};export{f4 as M}; diff --git a/site/assets/MatrixInput-BvG_poIz.js b/site/assets/MatrixInput-BvG_poIz.js new file mode 100644 index 0000000..9632193 --- /dev/null +++ b/site/assets/MatrixInput-BvG_poIz.js @@ -0,0 +1,12 @@ +import{r as c,E as D,J as K,K as $,j as o,m as h,A as S}from"./index-DJrAq1Rk.js";const T=e=>!e.isLayoutDirty&&e.willUpdate(!1);function C(){const e=new Set,s=new WeakMap,r=()=>e.forEach(T);return{add:t=>{e.add(t),s.set(t,t.addEventListener("willUpdate",r))},remove:t=>{e.delete(t);const i=s.get(t);i&&(i(),s.delete(t)),r()},dirty:r}}const V=c.createContext(null);function W(){const e=c.useRef(!1);return D(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function z(){const e=W(),[s,r]=c.useState(0),t=c.useCallback(()=>{e.current&&r(s+1)},[s]);return[c.useCallback(()=>K.postRender(t),[t]),s]}const R=e=>e===!0,I=e=>R(e===!0)||e==="id",O=({children:e,id:s,inherit:r=!0})=>{const t=c.useContext($),i=c.useContext(V),[k,v]=z(),f=c.useRef(null),d=t.id||i;f.current===null&&(I(r)&&d&&(s=s?d+"-"+s:d),f.current={id:s,group:R(r)&&t.group||C()});const l=c.useMemo(()=>({...f.current,forceRender:k}),[v]);return o.jsx($.Provider,{value:l,children:e})},B=({data:e,label:s,editable:r=!1,onChange:t,highlightRow:i,highlightCol:k,color:v="blue"})=>{var j;const f=e.length,d=((j=e[0])==null?void 0:j.length)||0,[l,m]=c.useState(null),N=(n,a)=>{m({key:`${n}-${a}`,val:e[n][a].toString()})},M=()=>{if(!l||!t){m(null);return}const[n,a]=l.key.split("-").map(Number),p=l.val;let u=e[n][a];const y=parseFloat(p);if(isNaN(y)?p===""&&(u=0):u=y,u!==e[n][a]){const x=e.map(w=>[...w]);x[n][a]=u,t(x)}m(null)},E=()=>{M()},F=n=>{n.key==="Enter"&&n.currentTarget.blur()},G=(n,a,p)=>{m({key:`${n}-${a}`,val:p})},_={blue:{text:"text-blue-200",focus:"focus:border-blue-400 focus:shadow-[0_0_15px_rgba(59,130,246,0.3)]",bracket:"#60a5fa"},green:{text:"text-emerald-200",focus:"focus:border-emerald-400 focus:shadow-[0_0_15px_rgba(16,185,129,0.3)]",bracket:"#34d399"},purple:{text:"text-purple-200",focus:"focus:border-purple-400 focus:shadow-[0_0_15px_rgba(168,85,247,0.3)]",bracket:"#c084fc"},orange:{text:"text-accent-cyan",focus:"focus:border-accent-cyan focus:shadow-[0_0_15px_rgba(34,211,238,0.3)]",bracket:"#22d3ee"},pink:{text:"text-pink-200",focus:"focus:border-pink-400 focus:shadow-[0_0_15px_rgba(236,72,153,0.3)]",bracket:"#f472b6"},red:{text:"text-fuchsia-200",focus:"focus:border-fuchsia-400 focus:shadow-[0_0_15px_rgba(217,70,239,0.3)]",bracket:"#e879f9"},cyan:{text:"text-accent-cyan",focus:"focus:border-accent-cyan focus:shadow-[0_0_15px_rgba(34,211,238,0.3)]",bracket:"#22d3ee"}},b=_[v]||_.blue,L=2,g=8;return o.jsxs("div",{className:"flex flex-col items-center gap-3 relative group/matrix z-10",children:[s&&o.jsx(h.h3,{layout:!0,className:"text-[10px] font-bold text-slate-400 tracking-[0.2em] uppercase mb-1",children:s}),o.jsx(O,{children:o.jsxs(h.div,{layout:!0,className:"relative px-3 py-1 flex items-stretch",children:[o.jsx("svg",{className:"absolute left-0 top-0 h-full w-4 overflow-visible",preserveAspectRatio:"none",children:o.jsx(h.path,{d:`M ${g} 0 L 2 0 L 2 100% L ${g} 100%`,fill:"none",stroke:b.bracket,strokeWidth:L,strokeLinecap:"round",initial:{pathLength:0},animate:{pathLength:1},transition:{duration:.6,ease:"easeInOut"}})}),o.jsx("div",{className:"grid gap-2 mx-1",style:{gridTemplateColumns:`repeat(${d}, minmax(min-content, 1fr))`},children:o.jsx(S,{children:e.map((n,a)=>n.map((p,u)=>{const y=a===i||u===k,x=`${a}-${u}`,w=l&&l.key===x?l.val:p;return o.jsx(h.div,{layout:!0,initial:{opacity:0,scale:.5},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.5},transition:{type:"spring",stiffness:400,damping:25},children:o.jsx("input",{type:"text",inputMode:"decimal",value:w,readOnly:!r,onFocus:()=>r&&N(a,u),onBlur:E,onKeyDown:F,onChange:A=>G(a,u,A.target.value),className:` + w-10 h-10 sm:w-12 sm:h-12 md:w-14 md:h-14 + text-center text-sm sm:text-base md:text-lg + font-mono rounded-lg outline-none transition-all duration-300 + border border-white/5 + bg-slate-900/40 backdrop-blur-md + hover:bg-white/10 hover:border-white/10 + ${b.text} + ${r?"cursor-text":"cursor-default"} + ${r?b.focus:""} + ${y?"!bg-accent-cyan/20 !border-accent-cyan/50 !text-white scale-110 shadow-[0_0_15px_rgba(0,246,255,0.2)] z-10":""} + `})},x)}))})}),o.jsx("svg",{className:"absolute right-0 top-0 h-full w-4 overflow-visible",preserveAspectRatio:"none",children:o.jsx(h.path,{d:`M ${4-g} 0 L 2 0 L 2 100% L ${4-g} 100%`,fill:"none",stroke:b.bracket,strokeWidth:L,strokeLinecap:"round",initial:{pathLength:0},animate:{pathLength:1},transition:{duration:.6,ease:"easeInOut"}})})]})}),o.jsxs("div",{className:"text-[9px] text-slate-600 font-mono opacity-0 group-hover/matrix:opacity-100 transition-opacity",children:[f," ร— ",d]})]})};export{B as M}; diff --git a/site/assets/NewtonView-D8Lq1Xw6.js b/site/assets/NewtonView-D8Lq1Xw6.js new file mode 100644 index 0000000..1cba250 --- /dev/null +++ b/site/assets/NewtonView-D8Lq1Xw6.js @@ -0,0 +1 @@ +import{r as N,j as e,P as k,m as S,T as $}from"./index-DJrAq1Rk.js";import{W}from"./WolframHelper-C3f14kAl.js";import"./chevron-right-KbXem8Tn.js";const L=()=>{const[b,u]=N.useState(1.5),[i,m]=N.useState(0),y=s=>s*s*s-s-1,v=s=>3*s*s-1,x=(()=>{const s=[];let a=b;for(let n=0;n<6;n++){const d=y(a),o=v(a),h=o!==0?a-d/o:a;if(s.push({i:n,x:a,y:d,slope:o,nextX:h}),o===0)break;a=h}return s})(),t=x[Math.min(i,x.length-1)],p=600,j=400,c=[0,2.5],f=[-2,8],r=s=>(s-c[0])/(c[1]-c[0])*p,l=s=>j-(s-f[0])/(f[1]-f[0])*j,w=()=>{let s="";for(let n=c[0];n<=c[1];n+=.05){const d=y(n),o=r(n),h=l(d);n===c[0]?s+=`M ${o} ${h}`:s+=` L ${o} ${h}`}return s},g=(()=>{const s=t.x,a=t.y,n=t.nextX;return{x1:r(s),y1:l(a),x2:r(n),y2:l(0)}})();return e.jsxs("div",{className:"space-y-8 pb-20",children:[e.jsxs("header",{className:"border-b border-white/10 pb-6",children:[e.jsx("h2",{className:"text-4xl font-bold text-white mb-2",children:"Newton-Raphson Visualizer"}),e.jsxs("p",{className:"text-slate-400 max-w-2xl",children:['See how the algorithm "surfs" down the tangent lines to find where the curve crosses zero.',e.jsx("br",{}),"Formula: ",e.jsx("span",{className:"font-mono text-cyan-400",children:"xโ‚™โ‚Šโ‚ = xโ‚™ - f(xโ‚™)/f'(xโ‚™)"})]})]}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-8",children:[e.jsxs("div",{className:"lg:col-span-5 space-y-6",children:[e.jsxs("div",{className:"glass-panel p-6 rounded-2xl border border-slate-700",children:[e.jsx("label",{className:"text-slate-300 text-xs font-bold uppercase tracking-widest mb-4 block",children:"1. Set Initial Guess (xโ‚€)"}),e.jsxs("div",{className:"flex gap-4 items-center mb-6",children:[e.jsx("input",{type:"range",min:"0.5",max:"2.4",step:"0.1",value:b,onChange:s=>{u(parseFloat(s.target.value)),m(0)},className:"flex-1 h-2 bg-slate-600 rounded-lg appearance-none accent-pink-500 cursor-pointer"}),e.jsx("span",{className:"text-xl font-mono text-pink-400 font-bold w-12 text-right",children:b})]}),e.jsx("p",{className:"text-xs text-slate-500 mb-6",children:"Changing the start point affects the path to the root."}),e.jsx("label",{className:"text-slate-300 text-xs font-bold uppercase tracking-widest mb-4 block",children:"2. Step Through Iterations"}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("button",{onClick:()=>m(Math.max(0,i-1)),disabled:i===0,className:"px-4 py-2 bg-slate-800 rounded-lg text-white disabled:opacity-50 hover:bg-slate-700 transition-colors",children:"Prev"}),e.jsxs("div",{className:"flex-1 bg-slate-900 rounded-lg flex items-center justify-center font-mono text-cyan-400 border border-slate-800",children:["Iteration ",t.i]}),e.jsxs("button",{onClick:()=>m(Math.min(x.length-1,i+1)),disabled:i===x.length-1,className:"px-4 py-2 bg-cyan-600 rounded-lg text-white font-bold disabled:opacity-50 hover:bg-cyan-500 transition-colors flex items-center gap-2",children:["Next ",e.jsx(k,{size:14,fill:"currentColor"})]})]})]}),e.jsx("div",{className:"overflow-hidden rounded-xl border border-slate-700 bg-slate-900/50",children:e.jsxs("table",{className:"w-full text-left",children:[e.jsx("thead",{className:"bg-slate-950 text-[10px] uppercase text-slate-500 font-mono tracking-wider",children:e.jsxs("tr",{children:[e.jsx("th",{className:"p-3",children:"n"}),e.jsx("th",{className:"p-3",children:"xโ‚™"}),e.jsx("th",{className:"p-3",children:"f(xโ‚™)"}),e.jsx("th",{className:"p-3 text-cyan-400",children:"xโ‚™โ‚Šโ‚"})]})}),e.jsx("tbody",{className:"divide-y divide-slate-800",children:x.map((s,a)=>e.jsxs("tr",{onClick:()=>m(a),className:`text-xs font-mono cursor-pointer transition-colors ${i===a?"bg-cyan-500/10 text-cyan-300":"text-slate-400 hover:bg-white/5"}`,children:[e.jsx("td",{className:"p-3",children:s.i}),e.jsx("td",{className:"p-3",children:s.x.toFixed(4)}),e.jsx("td",{className:"p-3",children:s.y.toFixed(4)}),e.jsx("td",{className:"p-3 font-bold",children:s.nextX.toFixed(4)})]},a))})]})})]}),e.jsxs("div",{className:"lg:col-span-7",children:[e.jsx("div",{className:"glass-panel p-1 rounded-3xl border-slate-700 relative overflow-hidden shadow-2xl",children:e.jsxs("div",{className:"bg-slate-900 rounded-[20px] relative h-[450px] overflow-hidden",children:[e.jsxs("svg",{viewBox:`0 0 ${p} ${j}`,className:"w-full h-full",children:[e.jsx("line",{x1:"0",y1:l(0),x2:p,y2:l(0),stroke:"#475569",strokeWidth:"2"}),e.jsx("text",{x:p-20,y:l(0)-10,fill:"#64748b",fontSize:"12",fontWeight:"bold",children:"x"}),e.jsx("path",{d:w(),fill:"none",stroke:"#64748b",strokeWidth:"3",strokeOpacity:"0.5"}),e.jsx("circle",{cx:r(t.x),cy:l(t.y),r:"6",fill:"#ec4899"}),e.jsxs("text",{x:r(t.x)+10,y:l(t.y),fill:"#ec4899",fontSize:"12",fontWeight:"bold",children:["(x",t.i,", y",t.i,")"]}),e.jsx("line",{x1:r(t.x),y1:l(0),x2:r(t.x),y2:l(t.y),stroke:"#ec4899",strokeWidth:"1",strokeDasharray:"4 4",opacity:"0.5"}),e.jsx(S.line,{initial:{pathLength:0},animate:{pathLength:1},transition:{duration:.8,ease:"easeInOut"},x1:g.x1,y1:g.y1,x2:g.x2,y2:g.y2,stroke:"#22d3ee",strokeWidth:"2"}),e.jsx("circle",{cx:r(t.nextX),cy:l(0),r:"4",fill:"#22d3ee"}),e.jsxs("text",{x:r(t.nextX)-10,y:l(0)+20,fill:"#22d3ee",fontSize:"12",fontWeight:"bold",children:["x",t.i+1]})]}),e.jsxs("div",{className:"absolute top-4 right-4 bg-slate-950/80 p-4 rounded-xl border border-slate-800 text-xs backdrop-blur-md",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx("div",{className:"w-3 h-1 bg-slate-500"}),e.jsx("span",{className:"text-slate-400",children:"Curve: $x^3 - x - 1$"})]}),e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx("div",{className:"w-3 h-1 bg-cyan-400"}),e.jsx("span",{className:"text-cyan-400",children:"Tangent Line"})]}),e.jsxs("div",{className:"mt-2 pt-2 border-t border-white/10 text-slate-300",children:["Slope $f'(x)$ = ",t.slope.toFixed(3)]})]})]})}),e.jsxs("div",{className:"mt-4 p-4 bg-emerald-900/10 border border-emerald-500/20 rounded-xl flex items-start gap-3",children:[e.jsx($,{size:20,className:"text-emerald-400 mt-1 shrink-0"}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-emerald-400 font-bold text-sm",children:"Educational Insight"}),e.jsxs("p",{className:"text-xs text-emerald-100/70 mt-1 leading-relaxed",children:["Notice how the tangent line at ",e.jsxs("span",{className:"font-mono",children:["x",t.i]})," acts as a linear approximation of the curve. By following this straight line down to zero, we get ",e.jsxs("span",{className:"font-mono",children:["x",t.i+1]}),", which is (usually) closer to the true root than where we started."]})]})]})]})]}),e.jsx(W,{context:"analysis"})]})};export{L as NewtonView}; diff --git a/site/assets/OperationsView-B2CRBmuD.js b/site/assets/OperationsView-B2CRBmuD.js new file mode 100644 index 0000000..19d127c --- /dev/null +++ b/site/assets/OperationsView-B2CRBmuD.js @@ -0,0 +1,24 @@ +import{c as h,u as p,O as t,r as g,j as e,X as v,G as D,A as w,m as j,b as k}from"./index-DJrAq1Rk.js";import{M as f}from"./MatrixInput-BvG_poIz.js";import{c as n,m as U,a as P,s as B,b as I}from"./matrixMath-CNHWal2D.js";import{W}from"./WolframHelper-C3f14kAl.js";import"./chevron-right-KbXem8Tn.js";/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const O=[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]],M=h("hash",O);/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Y=[["path",{d:"M5 12h14",key:"1ays0h"}]],A=h("minus",Y);/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const $=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],L=h("plus",$);/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const q=[["path",{d:"M10 8h4",key:"1sr2af"}],["path",{d:"M12 21v-9",key:"17s77i"}],["path",{d:"M12 8V3",key:"13r4qs"}],["path",{d:"M17 16h4",key:"h1uq16"}],["path",{d:"M19 12V3",key:"o1uvq1"}],["path",{d:"M19 21v-5",key:"qua636"}],["path",{d:"M3 14h4",key:"bcjad9"}],["path",{d:"M5 10V3",key:"cb8scm"}],["path",{d:"M5 21v-7",key:"1w1uti"}]],E=h("sliders-vertical",q),Q=()=>{const[s,S]=p("ops_type",t.ADD),[l,y]=p("ops_matA",n(2,2,1)),[r,m]=p("ops_matB",n(2,2,2)),[u]=p("ops_scalar",2),[i,x]=g.useState(null),[c,C]=g.useState(!1);g.useEffect(()=>{switch(s){case t.ADD:x(I(l,r));break;case t.SUBTRACT:x(B(l,r));break;case t.MULTIPLY:x(P(l,r));break;case t.SCALAR:x(U(l,u));break}},[l,r,s,u]);const N=(a,o)=>{y(n(a,o,1)),s!==t.MULTIPLY?m(n(a,o,2)):m(n(o,a,2))},R=()=>{if(!i)return null;if(s===t.MULTIPLY){const a=l[0],o=r.map(d=>d[0]),T=a.map((d,b)=>`(${d} ยท ${o[b]})`).join(" + "),_=a.reduce((d,b,z)=>d+b*o[z],0);return e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"text-sm font-bold text-purple-300",children:"Dot Product Logic (Row ยท Column)"}),e.jsxs("div",{className:"font-mono text-xs text-slate-300",children:["c",e.jsx("sub",{className:"opacity-50",children:"1,1"})," = (Row 1 of A) ยท (Col 1 of B)"]}),e.jsxs("div",{className:"p-3 bg-slate-950 rounded border border-purple-500/20 font-mono text-xs text-cyan-400",children:[T," = ",_]}),e.jsx("div",{className:"text-[10px] text-slate-500",children:"Each element c_ij is the sum of products of the i-th row of A and j-th column of B."})]})}return s===t.ADD?e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"text-sm font-bold text-cyan-300",children:"Element-wise Addition"}),e.jsxs("div",{className:"font-mono text-xs text-slate-300",children:["c",e.jsx("sub",{className:"opacity-50",children:"i,j"})," = a",e.jsx("sub",{className:"opacity-50",children:"i,j"})," + b",e.jsx("sub",{className:"opacity-50",children:"i,j"})]}),e.jsxs("div",{className:"p-3 bg-slate-950 rounded border border-cyan-500/20 font-mono text-xs text-cyan-400",children:[l[0][0]," + ",r[0][0]," = ",i[0][0]," ",e.jsx("span",{className:"text-slate-600 ml-2",children:"(example for pos 1,1)"})]})]}):null};return e.jsxs("div",{className:"space-y-8 pb-20",children:[e.jsxs("header",{className:"flex flex-col md:flex-row justify-between items-start md:items-end border-b border-white/10 pb-6 gap-6",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-4xl font-black text-white mb-2 tracking-tight",children:"Matrix Arithmetic"}),e.jsx("p",{className:"text-slate-400 max-w-2xl font-light text-base",children:"Real-time computation engine with deep logic inspection."})]}),e.jsx("div",{className:"bg-slate-900/80 p-1.5 rounded-xl border border-white/10 flex gap-1 shadow-2xl backdrop-blur-md",children:[{type:t.ADD,icon:L,label:"Add"},{type:t.SUBTRACT,icon:A,label:"Sub"},{type:t.MULTIPLY,icon:v,label:"Mult"},{type:t.SCALAR,icon:M,label:"Scale"}].map(a=>e.jsxs("button",{onClick:()=>S(a.type),className:` + px-4 py-2 rounded-lg text-xs font-bold uppercase tracking-wider flex items-center gap-2 transition-all + ${s===a.type?"bg-cyan-600 text-white shadow-lg shadow-cyan-900/50 scale-105":"text-slate-400 hover:text-white hover:bg-white/5"} + `,children:[e.jsx(a.icon,{size:14,strokeWidth:3}),e.jsx("span",{className:"hidden md:inline",children:a.label})]},a.type))})]}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-8 items-start",children:[e.jsxs("div",{className:"lg:col-span-3 space-y-6",children:[e.jsxs("div",{className:"glass-panel p-6 rounded-3xl",children:[e.jsxs("h3",{className:"text-sm font-bold text-slate-300 uppercase tracking-widest mb-6 flex items-center gap-2",children:[e.jsx(E,{size:16,className:"text-purple-400"})," Quick Size"]}),e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsxs("button",{onClick:()=>N(2,2),className:"w-full py-3 bg-slate-800/50 border border-slate-700 rounded-xl text-slate-300 hover:bg-slate-800 hover:border-slate-500 transition-all text-xs font-bold uppercase tracking-widest flex justify-between px-4 group",children:[e.jsx("span",{children:"Square"}),e.jsx("span",{className:"text-cyan-400 font-mono group-hover:text-cyan-300",children:"2 ร— 2"})]}),e.jsxs("button",{onClick:()=>N(3,3),className:"w-full py-3 bg-slate-800/50 border border-slate-700 rounded-xl text-slate-300 hover:bg-slate-800 hover:border-slate-500 transition-all text-xs font-bold uppercase tracking-widest flex justify-between px-4 group",children:[e.jsx("span",{children:"Square"}),e.jsx("span",{className:"text-purple-400 font-mono group-hover:text-purple-300",children:"3 ร— 3"})]})]})]}),e.jsxs("button",{onClick:()=>C(!c),className:`w-full p-4 rounded-2xl border transition-all flex items-center gap-3 ${c?"bg-indigo-600/20 border-indigo-500 text-indigo-300":"bg-slate-900/50 border-slate-700 text-slate-400"}`,children:[e.jsx(D,{size:20}),e.jsxs("div",{className:"text-left",children:[e.jsx("div",{className:"text-xs font-bold uppercase tracking-wider",children:"Learning Mode"}),e.jsx("div",{className:"text-[10px] opacity-70",children:"Show step-by-step logic"})]})]}),e.jsx(w,{children:c&&i&&e.jsx(j.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"glass-panel p-5 rounded-2xl border-l-2 border-l-purple-500 overflow-hidden",children:R()})})]}),e.jsx("div",{className:"lg:col-span-9",children:e.jsxs("div",{className:"glass-panel p-8 rounded-3xl min-h-[500px] flex flex-col items-center justify-center relative overflow-hidden bg-slate-900/40",children:[e.jsx("div",{className:"absolute inset-0 bg-[url('https://grainy-gradients.vercel.app/noise.svg')] opacity-5"}),e.jsx("div",{className:"absolute top-1/2 left-4 right-4 h-1 bg-slate-800 -translate-y-1/2 hidden xl:block rounded-full"}),e.jsxs("div",{className:"relative z-10 flex flex-col xl:flex-row items-center gap-8 md:gap-12 w-full justify-center",children:[e.jsxs("div",{className:"relative group",children:[e.jsx("div",{className:"absolute -top-10 left-1/2 -translate-x-1/2 text-[10px] font-bold uppercase tracking-widest text-slate-500 bg-slate-900 px-2 py-1 rounded border border-slate-800",children:"Operand A"}),e.jsx(f,{data:l,onChange:y,editable:!0,color:"blue"}),c&&s===t.MULTIPLY&&e.jsx("div",{className:"absolute -bottom-8 left-0 right-0 text-center text-[9px] text-blue-400 font-bold uppercase tracking-wider",children:"Use Rows"})]}),e.jsx("div",{className:"relative z-10",children:e.jsxs(j.div,{initial:{scale:.5,rotate:-180,opacity:0},animate:{scale:1,rotate:0,opacity:1},className:"w-14 h-14 rounded-2xl bg-slate-900 border border-slate-700 flex items-center justify-center text-white shadow-2xl shadow-black/50",children:[s===t.ADD&&e.jsx(L,{size:24,className:"text-cyan-400",strokeWidth:3}),s===t.SUBTRACT&&e.jsx(A,{size:24,className:"text-pink-400",strokeWidth:3}),s===t.MULTIPLY&&e.jsx(v,{size:24,className:"text-purple-400",strokeWidth:3}),s===t.SCALAR&&e.jsx(M,{size:24,className:"text-emerald-400",strokeWidth:3})]},s)}),s!==t.SCALAR?e.jsxs("div",{className:"relative group",children:[e.jsx("div",{className:"absolute -top-10 left-1/2 -translate-x-1/2 text-[10px] font-bold uppercase tracking-widest text-slate-500 bg-slate-900 px-2 py-1 rounded border border-slate-800",children:"Operand B"}),e.jsx(f,{data:r,onChange:m,editable:!0,color:"purple"}),c&&s===t.MULTIPLY&&e.jsx("div",{className:"absolute -bottom-8 left-0 right-0 text-center text-[9px] text-purple-400 font-bold uppercase tracking-wider",children:"Use Columns"})]}):e.jsxs("div",{className:"flex flex-col items-center justify-center w-32 h-32 rounded-2xl border-2 border-dashed border-slate-700 bg-slate-900/50",children:[e.jsx("span",{className:"text-4xl font-mono font-bold text-emerald-400",children:u}),e.jsx("span",{className:"text-[10px] text-emerald-500/50 uppercase tracking-widest mt-2 font-bold",children:"Scalar"})]}),e.jsx(k,{className:"text-slate-600 hidden xl:block",size:32,strokeWidth:1.5}),e.jsx("div",{className:"xl:hidden text-slate-600 rotate-90",children:e.jsx(k,{size:24})}),e.jsx(w,{mode:"wait",children:e.jsxs(j.div,{initial:{scale:.9,opacity:0,x:20},animate:{scale:1,opacity:1,x:0},exit:{scale:.9,opacity:0},className:"relative",children:[e.jsx("div",{className:"absolute -top-10 left-1/2 -translate-x-1/2 text-[10px] font-bold uppercase tracking-widest text-emerald-500 bg-emerald-900/20 border border-emerald-500/30 px-3 py-1 rounded shadow-lg shadow-emerald-900/20",children:"Result"}),i?e.jsx(f,{data:i,color:"green"}):e.jsx("div",{className:"w-40 h-40 flex items-center justify-center border-2 border-dashed border-red-500/30 rounded-2xl bg-red-500/5 text-red-400 text-xs font-bold uppercase tracking-wider text-center p-4",children:"Dimension Mismatch"})]},JSON.stringify(i))})]})]})})]}),e.jsx(W,{context:"matrix_ops"})]})};export{Q as OperationsView}; diff --git a/site/assets/OrbitControls-C12Qjv1w.js b/site/assets/OrbitControls-C12Qjv1w.js new file mode 100644 index 0000000..35f311e --- /dev/null +++ b/site/assets/OrbitControls-C12Qjv1w.js @@ -0,0 +1 @@ +import{_ as Ve}from"./extends-CF3RwP-h.js";import{r as H}from"./index-DJrAq1Rk.js";import{V as O,S as we,Q as Ae,d as se,c as T,e as re,f as U,T as F,R as We,g as Be,h as Y,u as qe}from"./react-three-fiber.esm-DbvaK_kO.js";var Ge=Object.defineProperty,Qe=(m,i,u)=>i in m?Ge(m,i,{enumerable:!0,configurable:!0,writable:!0,value:u}):m[i]=u,$e=(m,i,u)=>(Qe(m,i+"",u),u);class Je{constructor(){$e(this,"_listeners")}addEventListener(i,u){this._listeners===void 0&&(this._listeners={});const e=this._listeners;e[i]===void 0&&(e[i]=[]),e[i].indexOf(u)===-1&&e[i].push(u)}hasEventListener(i,u){if(this._listeners===void 0)return!1;const e=this._listeners;return e[i]!==void 0&&e[i].indexOf(u)!==-1}removeEventListener(i,u){if(this._listeners===void 0)return;const y=this._listeners[i];if(y!==void 0){const g=y.indexOf(u);g!==-1&&y.splice(g,1)}}dispatchEvent(i){if(this._listeners===void 0)return;const e=this._listeners[i.type];if(e!==void 0){i.target=this;const y=e.slice(0);for(let g=0,N=y.length;gi in m?et(m,i,{enumerable:!0,configurable:!0,writable:!0,value:u}):m[i]=u,o=(m,i,u)=>(tt(m,typeof i!="symbol"?i+"":i,u),u);const $=new We,je=new Be,nt=Math.cos(70*(Math.PI/180)),Le=(m,i)=>(m%i+i)%i;let ot=class extends Je{constructor(i,u){super(),o(this,"object"),o(this,"domElement"),o(this,"enabled",!0),o(this,"target",new O),o(this,"minDistance",0),o(this,"maxDistance",1/0),o(this,"minZoom",0),o(this,"maxZoom",1/0),o(this,"minPolarAngle",0),o(this,"maxPolarAngle",Math.PI),o(this,"minAzimuthAngle",-1/0),o(this,"maxAzimuthAngle",1/0),o(this,"enableDamping",!1),o(this,"dampingFactor",.05),o(this,"enableZoom",!0),o(this,"zoomSpeed",1),o(this,"enableRotate",!0),o(this,"rotateSpeed",1),o(this,"enablePan",!0),o(this,"panSpeed",1),o(this,"screenSpacePanning",!0),o(this,"keyPanSpeed",7),o(this,"zoomToCursor",!1),o(this,"autoRotate",!1),o(this,"autoRotateSpeed",2),o(this,"reverseOrbit",!1),o(this,"reverseHorizontalOrbit",!1),o(this,"reverseVerticalOrbit",!1),o(this,"keys",{LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"}),o(this,"mouseButtons",{LEFT:U.ROTATE,MIDDLE:U.DOLLY,RIGHT:U.PAN}),o(this,"touches",{ONE:F.ROTATE,TWO:F.DOLLY_PAN}),o(this,"target0"),o(this,"position0"),o(this,"zoom0"),o(this,"_domElementKeyEvents",null),o(this,"getPolarAngle"),o(this,"getAzimuthalAngle"),o(this,"setPolarAngle"),o(this,"setAzimuthalAngle"),o(this,"getDistance"),o(this,"getZoomScale"),o(this,"listenToKeyEvents"),o(this,"stopListenToKeyEvents"),o(this,"saveState"),o(this,"reset"),o(this,"update"),o(this,"connect"),o(this,"dispose"),o(this,"dollyIn"),o(this,"dollyOut"),o(this,"getScale"),o(this,"setScale"),this.object=i,this.domElement=u,this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this.getPolarAngle=()=>d.phi,this.getAzimuthalAngle=()=>d.theta,this.setPolarAngle=t=>{let n=Le(t,2*Math.PI),a=d.phi;a<0&&(a+=2*Math.PI),n<0&&(n+=2*Math.PI);let r=Math.abs(n-a);2*Math.PI-r{let n=Le(t,2*Math.PI),a=d.theta;a<0&&(a+=2*Math.PI),n<0&&(n+=2*Math.PI);let r=Math.abs(n-a);2*Math.PI-re.object.position.distanceTo(e.target),this.listenToKeyEvents=t=>{t.addEventListener("keydown",ae),this._domElementKeyEvents=t},this.stopListenToKeyEvents=()=>{this._domElementKeyEvents.removeEventListener("keydown",ae),this._domElementKeyEvents=null},this.saveState=()=>{e.target0.copy(e.target),e.position0.copy(e.object.position),e.zoom0=e.object.zoom},this.reset=()=>{e.target.copy(e.target0),e.object.position.copy(e.position0),e.object.zoom=e.zoom0,e.object.updateProjectionMatrix(),e.dispatchEvent(y),e.update(),c=s.NONE},this.update=(()=>{const t=new O,n=new O(0,1,0),a=new Ae().setFromUnitVectors(i.up,n),r=a.clone().invert(),f=new O,x=new Ae,C=2*Math.PI;return function(){const ve=e.object.position;a.setFromUnitVectors(i.up,n),r.copy(a).invert(),t.copy(ve).sub(e.target),t.applyQuaternion(a),d.setFromVector3(t),e.autoRotate&&c===s.NONE&&J(De()),e.enableDamping?(d.theta+=b.theta*e.dampingFactor,d.phi+=b.phi*e.dampingFactor):(d.theta+=b.theta,d.phi+=b.phi);let S=e.minAzimuthAngle,I=e.maxAzimuthAngle;isFinite(S)&&isFinite(I)&&(S<-Math.PI?S+=C:S>Math.PI&&(S-=C),I<-Math.PI?I+=C:I>Math.PI&&(I-=C),S<=I?d.theta=Math.max(S,Math.min(I,d.theta)):d.theta=d.theta>(S+I)/2?Math.max(S,d.theta):Math.min(I,d.theta)),d.phi=Math.max(e.minPolarAngle,Math.min(e.maxPolarAngle,d.phi)),d.makeSafe(),e.enableDamping===!0?e.target.addScaledVector(R,e.dampingFactor):e.target.add(R),e.zoomToCursor&&v||e.object.isOrthographicCamera?d.radius=ne(d.radius):d.radius=ne(d.radius*E),t.setFromSpherical(d),t.applyQuaternion(r),ve.copy(e.target).add(t),e.object.matrixAutoUpdate||e.object.updateMatrix(),e.object.lookAt(e.target),e.enableDamping===!0?(b.theta*=1-e.dampingFactor,b.phi*=1-e.dampingFactor,R.multiplyScalar(1-e.dampingFactor)):(b.set(0,0,0),R.set(0,0,0));let K=!1;if(e.zoomToCursor&&v){let V=null;if(e.object instanceof re&&e.object.isPerspectiveCamera){const W=t.length();V=ne(W*E);const Q=W-V;e.object.position.addScaledVector(Z,Q),e.object.updateMatrixWorld()}else if(e.object.isOrthographicCamera){const W=new O(P.x,P.y,0);W.unproject(e.object),e.object.zoom=Math.max(e.minZoom,Math.min(e.maxZoom,e.object.zoom/E)),e.object.updateProjectionMatrix(),K=!0;const Q=new O(P.x,P.y,0);Q.unproject(e.object),e.object.position.sub(Q).add(W),e.object.updateMatrixWorld(),V=t.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),e.zoomToCursor=!1;V!==null&&(e.screenSpacePanning?e.target.set(0,0,-1).transformDirection(e.object.matrix).multiplyScalar(V).add(e.object.position):($.origin.copy(e.object.position),$.direction.set(0,0,-1).transformDirection(e.object.matrix),Math.abs(e.object.up.dot($.direction))B||8*(1-x.dot(e.object.quaternion))>B?(e.dispatchEvent(y),f.copy(e.object.position),x.copy(e.object.quaternion),K=!1,!0):!1}})(),this.connect=t=>{e.domElement=t,e.domElement.style.touchAction="none",e.domElement.addEventListener("contextmenu",Te),e.domElement.addEventListener("pointerdown",Pe),e.domElement.addEventListener("pointercancel",X),e.domElement.addEventListener("wheel",Oe)},this.dispose=()=>{var t,n,a,r,f,x;e.domElement&&(e.domElement.style.touchAction="auto"),(t=e.domElement)==null||t.removeEventListener("contextmenu",Te),(n=e.domElement)==null||n.removeEventListener("pointerdown",Pe),(a=e.domElement)==null||a.removeEventListener("pointercancel",X),(r=e.domElement)==null||r.removeEventListener("wheel",Oe),(f=e.domElement)==null||f.ownerDocument.removeEventListener("pointermove",oe),(x=e.domElement)==null||x.ownerDocument.removeEventListener("pointerup",X),e._domElementKeyEvents!==null&&e._domElementKeyEvents.removeEventListener("keydown",ae)};const e=this,y={type:"change"},g={type:"start"},N={type:"end"},s={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6};let c=s.NONE;const B=1e-6,d=new we,b=new we;let E=1;const R=new O,w=new T,A=new T,j=new T,L=new T,D=new T,_=new T,M=new T,p=new T,h=new T,Z=new O,P=new T;let v=!1;const l=[],q={};function De(){return 2*Math.PI/60/60*e.autoRotateSpeed}function z(){return Math.pow(.95,e.zoomSpeed)}function J(t){e.reverseOrbit||e.reverseHorizontalOrbit?b.theta+=t:b.theta-=t}function le(t){e.reverseOrbit||e.reverseVerticalOrbit?b.phi+=t:b.phi-=t}const ce=(()=>{const t=new O;return function(a,r){t.setFromMatrixColumn(r,0),t.multiplyScalar(-a),R.add(t)}})(),ue=(()=>{const t=new O;return function(a,r){e.screenSpacePanning===!0?t.setFromMatrixColumn(r,1):(t.setFromMatrixColumn(r,0),t.crossVectors(e.object.up,t)),t.multiplyScalar(a),R.add(t)}})(),k=(()=>{const t=new O;return function(a,r){const f=e.domElement;if(f&&e.object instanceof re&&e.object.isPerspectiveCamera){const x=e.object.position;t.copy(x).sub(e.target);let C=t.length();C*=Math.tan(e.object.fov/2*Math.PI/180),ce(2*a*C/f.clientHeight,e.object.matrix),ue(2*r*C/f.clientHeight,e.object.matrix)}else f&&e.object instanceof se&&e.object.isOrthographicCamera?(ce(a*(e.object.right-e.object.left)/e.object.zoom/f.clientWidth,e.object.matrix),ue(r*(e.object.top-e.object.bottom)/e.object.zoom/f.clientHeight,e.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),e.enablePan=!1)}})();function ee(t){e.object instanceof re&&e.object.isPerspectiveCamera||e.object instanceof se&&e.object.isOrthographicCamera?E=t:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),e.enableZoom=!1)}function G(t){ee(E/t)}function te(t){ee(E*t)}function he(t){if(!e.zoomToCursor||!e.domElement)return;v=!0;const n=e.domElement.getBoundingClientRect(),a=t.clientX-n.left,r=t.clientY-n.top,f=n.width,x=n.height;P.x=a/f*2-1,P.y=-(r/x)*2+1,Z.set(P.x,P.y,1).unproject(e.object).sub(e.object.position).normalize()}function ne(t){return Math.max(e.minDistance,Math.min(e.maxDistance,t))}function de(t){w.set(t.clientX,t.clientY)}function _e(t){he(t),M.set(t.clientX,t.clientY)}function pe(t){L.set(t.clientX,t.clientY)}function xe(t){A.set(t.clientX,t.clientY),j.subVectors(A,w).multiplyScalar(e.rotateSpeed);const n=e.domElement;n&&(J(2*Math.PI*j.x/n.clientHeight),le(2*Math.PI*j.y/n.clientHeight)),w.copy(A),e.update()}function Se(t){p.set(t.clientX,t.clientY),h.subVectors(p,M),h.y>0?G(z()):h.y<0&&te(z()),M.copy(p),e.update()}function Ie(t){D.set(t.clientX,t.clientY),_.subVectors(D,L).multiplyScalar(e.panSpeed),k(_.x,_.y),L.copy(D),e.update()}function Ne(t){he(t),t.deltaY<0?te(z()):t.deltaY>0&&G(z()),e.update()}function Re(t){let n=!1;switch(t.code){case e.keys.UP:k(0,e.keyPanSpeed),n=!0;break;case e.keys.BOTTOM:k(0,-e.keyPanSpeed),n=!0;break;case e.keys.LEFT:k(e.keyPanSpeed,0),n=!0;break;case e.keys.RIGHT:k(-e.keyPanSpeed,0),n=!0;break}n&&(t.preventDefault(),e.update())}function me(){if(l.length==1)w.set(l[0].pageX,l[0].pageY);else{const t=.5*(l[0].pageX+l[1].pageX),n=.5*(l[0].pageY+l[1].pageY);w.set(t,n)}}function fe(){if(l.length==1)L.set(l[0].pageX,l[0].pageY);else{const t=.5*(l[0].pageX+l[1].pageX),n=.5*(l[0].pageY+l[1].pageY);L.set(t,n)}}function be(){const t=l[0].pageX-l[1].pageX,n=l[0].pageY-l[1].pageY,a=Math.sqrt(t*t+n*n);M.set(0,a)}function Ce(){e.enableZoom&&be(),e.enablePan&&fe()}function Ye(){e.enableZoom&&be(),e.enableRotate&&me()}function ge(t){if(l.length==1)A.set(t.pageX,t.pageY);else{const a=ie(t),r=.5*(t.pageX+a.x),f=.5*(t.pageY+a.y);A.set(r,f)}j.subVectors(A,w).multiplyScalar(e.rotateSpeed);const n=e.domElement;n&&(J(2*Math.PI*j.x/n.clientHeight),le(2*Math.PI*j.y/n.clientHeight)),w.copy(A)}function Ee(t){if(l.length==1)D.set(t.pageX,t.pageY);else{const n=ie(t),a=.5*(t.pageX+n.x),r=.5*(t.pageY+n.y);D.set(a,r)}_.subVectors(D,L).multiplyScalar(e.panSpeed),k(_.x,_.y),L.copy(D)}function ye(t){const n=ie(t),a=t.pageX-n.x,r=t.pageY-n.y,f=Math.sqrt(a*a+r*r);p.set(0,f),h.set(0,Math.pow(p.y/M.y,e.zoomSpeed)),G(h.y),M.copy(p)}function ze(t){e.enableZoom&&ye(t),e.enablePan&&Ee(t)}function ke(t){e.enableZoom&&ye(t),e.enableRotate&&ge(t)}function Pe(t){var n,a;e.enabled!==!1&&(l.length===0&&((n=e.domElement)==null||n.ownerDocument.addEventListener("pointermove",oe),(a=e.domElement)==null||a.ownerDocument.addEventListener("pointerup",X)),Xe(t),t.pointerType==="touch"?Fe(t):He(t))}function oe(t){e.enabled!==!1&&(t.pointerType==="touch"?Ze(t):Ue(t))}function X(t){var n,a,r;Ke(t),l.length===0&&((n=e.domElement)==null||n.releasePointerCapture(t.pointerId),(a=e.domElement)==null||a.ownerDocument.removeEventListener("pointermove",oe),(r=e.domElement)==null||r.ownerDocument.removeEventListener("pointerup",X)),e.dispatchEvent(N),c=s.NONE}function He(t){let n;switch(t.button){case 0:n=e.mouseButtons.LEFT;break;case 1:n=e.mouseButtons.MIDDLE;break;case 2:n=e.mouseButtons.RIGHT;break;default:n=-1}switch(n){case U.DOLLY:if(e.enableZoom===!1)return;_e(t),c=s.DOLLY;break;case U.ROTATE:if(t.ctrlKey||t.metaKey||t.shiftKey){if(e.enablePan===!1)return;pe(t),c=s.PAN}else{if(e.enableRotate===!1)return;de(t),c=s.ROTATE}break;case U.PAN:if(t.ctrlKey||t.metaKey||t.shiftKey){if(e.enableRotate===!1)return;de(t),c=s.ROTATE}else{if(e.enablePan===!1)return;pe(t),c=s.PAN}break;default:c=s.NONE}c!==s.NONE&&e.dispatchEvent(g)}function Ue(t){if(e.enabled!==!1)switch(c){case s.ROTATE:if(e.enableRotate===!1)return;xe(t);break;case s.DOLLY:if(e.enableZoom===!1)return;Se(t);break;case s.PAN:if(e.enablePan===!1)return;Ie(t);break}}function Oe(t){e.enabled===!1||e.enableZoom===!1||c!==s.NONE&&c!==s.ROTATE||(t.preventDefault(),e.dispatchEvent(g),Ne(t),e.dispatchEvent(N))}function ae(t){e.enabled===!1||e.enablePan===!1||Re(t)}function Fe(t){switch(Me(t),l.length){case 1:switch(e.touches.ONE){case F.ROTATE:if(e.enableRotate===!1)return;me(),c=s.TOUCH_ROTATE;break;case F.PAN:if(e.enablePan===!1)return;fe(),c=s.TOUCH_PAN;break;default:c=s.NONE}break;case 2:switch(e.touches.TWO){case F.DOLLY_PAN:if(e.enableZoom===!1&&e.enablePan===!1)return;Ce(),c=s.TOUCH_DOLLY_PAN;break;case F.DOLLY_ROTATE:if(e.enableZoom===!1&&e.enableRotate===!1)return;Ye(),c=s.TOUCH_DOLLY_ROTATE;break;default:c=s.NONE}break;default:c=s.NONE}c!==s.NONE&&e.dispatchEvent(g)}function Ze(t){switch(Me(t),c){case s.TOUCH_ROTATE:if(e.enableRotate===!1)return;ge(t),e.update();break;case s.TOUCH_PAN:if(e.enablePan===!1)return;Ee(t),e.update();break;case s.TOUCH_DOLLY_PAN:if(e.enableZoom===!1&&e.enablePan===!1)return;ze(t),e.update();break;case s.TOUCH_DOLLY_ROTATE:if(e.enableZoom===!1&&e.enableRotate===!1)return;ke(t),e.update();break;default:c=s.NONE}}function Te(t){e.enabled!==!1&&t.preventDefault()}function Xe(t){l.push(t)}function Ke(t){delete q[t.pointerId];for(let n=0;n{te(t),e.update()},this.dollyOut=(t=z())=>{G(t),e.update()},this.getScale=()=>E,this.setScale=t=>{ee(t),e.update()},this.getZoomScale=()=>z(),u!==void 0&&this.connect(u),this.update()}};const ct=H.forwardRef(({makeDefault:m,camera:i,regress:u,domElement:e,enableDamping:y=!0,keyEvents:g=!1,onChange:N,onStart:s,onEnd:c,...B},d)=>{const b=Y(h=>h.invalidate),E=Y(h=>h.camera),R=Y(h=>h.gl),w=Y(h=>h.events),A=Y(h=>h.setEvents),j=Y(h=>h.set),L=Y(h=>h.get),D=Y(h=>h.performance),_=i||E,M=e||w.connected||R.domElement,p=H.useMemo(()=>new ot(_),[_]);return qe(()=>{p.enabled&&p.update()},-1),H.useEffect(()=>(g&&p.connect(g===!0?M:g),p.connect(M),()=>void p.dispose()),[g,M,u,p,b]),H.useEffect(()=>{const h=v=>{b(),u&&D.regress(),N&&N(v)},Z=v=>{s&&s(v)},P=v=>{c&&c(v)};return p.addEventListener("change",h),p.addEventListener("start",Z),p.addEventListener("end",P),()=>{p.removeEventListener("start",Z),p.removeEventListener("end",P),p.removeEventListener("change",h)}},[N,s,c,p,b,A]),H.useEffect(()=>{if(m){const h=L().controls;return j({controls:p}),()=>j({controls:h})}},[m,p]),H.createElement("primitive",Ve({ref:d,object:p,enableDamping:y},B))});export{ct as O}; diff --git a/site/assets/PopulationModelsView-BB4Pshcn.js b/site/assets/PopulationModelsView-BB4Pshcn.js new file mode 100644 index 0000000..8c4486f --- /dev/null +++ b/site/assets/PopulationModelsView-BB4Pshcn.js @@ -0,0 +1 @@ +import{r as p,j as e,m as f,x as S,b as z}from"./index-DJrAq1Rk.js";import{M as x}from"./MathRenderer-DoWdgGCt.js";import{T as C}from"./triangle-alert-7X0SgA5l.js";const F=()=>{const[t,b]=p.useState("verhulst"),[n,v]=p.useState(10),[d,N]=p.useState(.5),[a,w]=p.useState(100),i=600,l=400,o=15,g=s=>n*Math.exp(d*s),j=t==="malthus"?g:s=>a/(1+(a-n)/n*Math.exp(-d*s)),y=t==="malthus"?g(o/2):a*1.2,k=s=>s/o*i,h=s=>l-s/y*l,M=s=>{let r="";for(let c=0;c<=o;c+=.1){const $=s(c),m=k(c),u=h($);if(u<0){r!==""&&(r+=` L ${m} 0`);break}c===0?r+=`M ${m} ${u}`:r+=` L ${m} ${u}`}return r};return e.jsxs("div",{className:"space-y-8 pb-20",children:[e.jsxs("header",{className:"border-b border-white/10 pb-6 flex flex-col md:flex-row justify-between items-end gap-4",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-4xl font-bold text-white mb-2",children:"Population Dynamics"}),e.jsxs("p",{className:"text-slate-400 max-w-2xl",children:["Modeling biological growth. Unlimited resources lead to ",e.jsx("span",{className:"text-pink-400",children:"Malthusian"})," explosion. Real-world limits create ",e.jsx("span",{className:"text-emerald-400",children:"Verhulst (Logistic)"})," equilibrium."]})]}),e.jsxs("div",{className:"bg-slate-900 p-1 rounded-xl border border-slate-800 flex gap-1",children:[e.jsx("button",{onClick:()=>b("malthus"),className:`px-4 py-2 text-xs font-bold uppercase rounded-lg transition-all ${t==="malthus"?"bg-pink-600 text-white":"text-slate-500 hover:text-white hover:bg-white/5"}`,children:"Malthus (Exp)"}),e.jsx("button",{onClick:()=>b("verhulst"),className:`px-4 py-2 text-xs font-bold uppercase rounded-lg transition-all ${t==="verhulst"?"bg-emerald-600 text-white":"text-slate-500 hover:text-white hover:bg-white/5"}`,children:"Verhulst (Logistic)"})]})]}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-8",children:[e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"bg-slate-800/50 p-6 rounded-2xl border border-slate-700 backdrop-blur-md",children:[e.jsx("h3",{className:"text-xs font-bold text-slate-500 uppercase tracking-widest mb-6",children:"Environment Params"}),e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex justify-between text-sm text-slate-300 mb-2",children:[e.jsx("span",{children:"Initial Population (Nโ‚€)"}),e.jsx("span",{className:"font-mono text-cyan-400",children:n})]}),e.jsx("input",{type:"range",min:"1",max:"50",step:"1",value:n,onChange:s=>v(parseFloat(s.target.value)),className:"w-full h-2 bg-slate-700 rounded-lg appearance-none cursor-pointer accent-cyan-500"})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex justify-between text-sm text-slate-300 mb-2",children:[e.jsx("span",{children:"Growth Rate (r)"}),e.jsx("span",{className:"font-mono text-purple-400",children:d.toFixed(2)})]}),e.jsx("input",{type:"range",min:"0.1",max:"2.0",step:"0.1",value:d,onChange:s=>N(parseFloat(s.target.value)),className:"w-full h-2 bg-slate-700 rounded-lg appearance-none cursor-pointer accent-purple-500"})]}),t==="verhulst"&&e.jsxs(f.div,{initial:{opacity:0},animate:{opacity:1},children:[e.jsxs("div",{className:"flex justify-between text-sm text-slate-300 mb-2",children:[e.jsx("span",{children:"Carrying Capacity (K)"}),e.jsx("span",{className:"font-mono text-emerald-400",children:a})]}),e.jsx("input",{type:"range",min:"50",max:"200",step:"10",value:a,onChange:s=>w(parseFloat(s.target.value)),className:"w-full h-2 bg-slate-700 rounded-lg appearance-none cursor-pointer accent-emerald-500"})]})]})]}),e.jsxs("div",{className:"bg-slate-900 p-6 rounded-2xl border border-slate-800",children:[e.jsxs("h3",{className:"text-xs font-bold text-slate-500 uppercase tracking-widest mb-4 flex items-center gap-2",children:[e.jsx(S,{size:16})," Differential Equation"]}),t==="malthus"?e.jsxs("div",{className:"space-y-4",children:[e.jsx(x,{expression:"\\frac{dN}{dt} = rN",className:"text-xl text-pink-400 text-center"}),e.jsxs("p",{className:"text-xs text-slate-400 text-center leading-relaxed",children:["Growth is proportional only to current size.",e.jsx("br",{}),"Result: ",e.jsx(x,{expression:"N(t) = N_0 e^{rt}",inline:!0})]}),e.jsxs("div",{className:"flex items-center gap-2 text-pink-400 bg-pink-900/10 p-2 rounded border border-pink-900/30 text-xs",children:[e.jsx(C,{size:14})," Unbounded growth (Unrealistic long-term)"]})]}):e.jsxs("div",{className:"space-y-4",children:[e.jsx(x,{expression:"\\frac{dN}{dt} = rN(1 - \\frac{N}{K})",className:"text-xl text-emerald-400 text-center"}),e.jsxs("p",{className:"text-xs text-slate-400 text-center leading-relaxed",children:["Growth slows as ",e.jsx(x,{expression:"N",inline:!0})," approaches capacity ",e.jsx(x,{expression:"K",inline:!0}),".",e.jsx("br",{}),"Result: Sigmoid Curve."]}),e.jsxs("div",{className:"flex items-center gap-2 text-emerald-400 bg-emerald-900/10 p-2 rounded border border-emerald-900/30 text-xs",children:[e.jsx(z,{size:14})," Stabilizes at K (Sustainable)"]})]})]})]}),e.jsxs("div",{className:"lg:col-span-2 bg-slate-900 rounded-3xl border border-slate-700 relative overflow-hidden shadow-2xl flex flex-col h-[500px]",children:[e.jsx("div",{className:"absolute inset-0 bg-[url('https://grainy-gradients.vercel.app/noise.svg')] opacity-5 pointer-events-none"}),e.jsxs("div",{className:"absolute top-4 right-4 z-10 flex flex-col gap-2 text-xs font-mono",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:`w-4 h-0.5 ${t==="malthus"?"bg-pink-400":"bg-emerald-400"}`}),e.jsx("span",{className:"text-slate-400",children:"Population N(t)"})]}),t==="verhulst"&&e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-4 h-0.5 bg-slate-500 border-t border-dashed border-slate-300"}),e.jsx("span",{className:"text-slate-500",children:"Capacity K"})]})]}),e.jsxs("svg",{viewBox:`0 0 ${i} ${l}`,className:"w-full h-full",children:[e.jsx("line",{x1:0,y1:l,x2:i,y2:l,stroke:"#475569",strokeWidth:"2"}),e.jsx("line",{x1:0,y1:0,x2:0,y2:l,stroke:"#475569",strokeWidth:"2"}),t==="verhulst"&&e.jsx("line",{x1:0,y1:h(a),x2:i,y2:h(a),stroke:"#64748b",strokeWidth:"1",strokeDasharray:"5 5"}),e.jsx(f.path,{d:M(j),fill:"none",stroke:t==="malthus"?"#ec4899":"#10b981",strokeWidth:"3",initial:{pathLength:0},animate:{pathLength:1},transition:{duration:1}}),e.jsx("text",{x:10,y:l-10,fill:"#64748b",fontSize:"10",children:"t=0"}),e.jsxs("text",{x:i-30,y:l-10,fill:"#64748b",fontSize:"10",children:["t=",o]}),t==="verhulst"&&e.jsxs("text",{x:10,y:h(a)-5,fill:"#64748b",fontSize:"10",children:["K=",a]})]}),e.jsxs("div",{className:"absolute bottom-4 left-4 p-3 bg-black/60 rounded-xl backdrop-blur-sm border border-white/10 pointer-events-none",children:[e.jsx("div",{className:"text-[10px] text-slate-400 uppercase font-bold mb-2",children:"Bio-Sim Preview"}),e.jsx("div",{className:"w-32 h-32 relative bg-slate-900/50 rounded-lg overflow-hidden",children:Array.from({length:Math.min(Math.floor(j(o/2)),100)}).map((s,r)=>e.jsx("div",{className:`absolute w-1 h-1 rounded-full ${t==="malthus"?"bg-pink-500":"bg-emerald-500"}`,style:{left:`${Math.random()*100}%`,top:`${Math.random()*100}%`,opacity:.6}},r))})]})]})]})]})};export{F as PopulationModelsView}; diff --git a/site/assets/RadioactiveDecayView-D39iBORv.js b/site/assets/RadioactiveDecayView-D39iBORv.js new file mode 100644 index 0000000..18e0e87 --- /dev/null +++ b/site/assets/RadioactiveDecayView-D39iBORv.js @@ -0,0 +1 @@ +import{r as j,j as e,y as v,k as y,m as w}from"./index-DJrAq1Rk.js";import{M as f}from"./MathRenderer-DoWdgGCt.js";const L=()=>{const[t,u]=j.useState(100),[i,g]=j.useState(.5),d=600,l=400,m=10,b=s=>t*Math.exp(-i*s),c=Math.log(2)/i,n=s=>s/m*d,r=s=>l-s/t*(l*.8)-20,N=()=>{let s="";for(let a=0;a<=m;a+=.1){const o=b(a),h=n(a),x=r(o);a===0?s+=`M ${h} ${x}`:s+=` L ${h} ${x}`}return s};return e.jsxs("div",{className:"space-y-8 pb-20",children:[e.jsxs("header",{className:"border-b border-white/10 pb-6",children:[e.jsx("h2",{className:"text-4xl font-bold text-white mb-2",children:"Radioactive Decay"}),e.jsx("p",{className:"text-slate-400 max-w-3xl",children:"The probability of decay per time unit is constant. This leads to an exponential decrease in the number of active nuclei."})]}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-8",children:[e.jsxs("div",{className:"lg:col-span-4 space-y-6",children:[e.jsxs("div",{className:"bg-slate-800/50 p-6 rounded-2xl border border-slate-700 backdrop-blur-md",children:[e.jsxs("h3",{className:"text-xs font-bold text-slate-500 uppercase tracking-widest mb-6 flex items-center gap-2",children:[e.jsx(v,{size:16})," Isotope Properties"]}),e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex justify-between text-sm text-slate-300 mb-2",children:[e.jsx("span",{children:"Initial Nuclei (Nโ‚€)"}),e.jsx("span",{className:"font-mono text-cyan-400",children:t})]}),e.jsx("input",{type:"range",min:"10",max:"200",step:"10",value:t,onChange:s=>u(parseFloat(s.target.value)),className:"w-full h-2 bg-slate-700 rounded-lg appearance-none cursor-pointer accent-cyan-500"})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex justify-between text-sm text-slate-300 mb-2",children:[e.jsx("span",{children:"Decay Constant (ฮป)"}),e.jsx("span",{className:"font-mono text-purple-400",children:i.toFixed(2)})]}),e.jsx("input",{type:"range",min:"0.1",max:"2.0",step:"0.1",value:i,onChange:s=>g(parseFloat(s.target.value)),className:"w-full h-2 bg-slate-700 rounded-lg appearance-none cursor-pointer accent-purple-500"})]})]})]}),e.jsxs("div",{className:"bg-slate-900 p-6 rounded-2xl border border-slate-800 text-center",children:[e.jsx("div",{className:"text-xs text-slate-500 font-bold uppercase mb-2",children:"Equation"}),e.jsx(f,{expression:"\\frac{dN}{dt} = -\\lambda N",className:"text-xl text-white mb-2"}),e.jsx(f,{expression:"N(t) = N_0 e^{-\\lambda t}",className:"text-lg text-slate-400"})]}),e.jsxs("div",{className:"bg-amber-500/10 p-6 rounded-2xl border border-amber-500/20 text-center",children:[e.jsxs("div",{className:"text-xs text-amber-500 font-bold uppercase mb-2 flex items-center justify-center gap-2",children:[e.jsx(y,{size:14})," Half-Life (T 1/2)"]}),e.jsxs("div",{className:"text-3xl font-mono text-white font-bold",children:[c.toFixed(2),"s"]}),e.jsxs("p",{className:"text-[10px] text-amber-200/60 mt-2",children:["Time to reach ",t/2," nuclei"]})]})]}),e.jsxs("div",{className:"lg:col-span-8 bg-slate-900 rounded-3xl border border-slate-700 relative overflow-hidden shadow-2xl flex flex-col min-h-[400px]",children:[e.jsx("div",{className:"absolute inset-0 bg-[url('https://grainy-gradients.vercel.app/noise.svg')] opacity-5 pointer-events-none"}),e.jsx("div",{className:"absolute top-4 right-4 z-10 flex flex-col gap-2 text-xs font-mono",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-4 h-0.5 bg-amber-400"}),e.jsx("span",{className:"text-slate-400",children:"Nuclei Count"})]})}),e.jsxs("svg",{viewBox:`0 0 ${d} ${l}`,className:"w-full h-full",children:[e.jsx("line",{x1:0,y1:l,x2:d,y2:l,stroke:"#475569",strokeWidth:"2"}),e.jsx("line",{x1:0,y1:0,x2:0,y2:l,stroke:"#475569",strokeWidth:"2"}),e.jsx("line",{x1:n(c),y1:r(0),x2:n(c),y2:r(t),stroke:"#64748b",strokeWidth:"1",strokeDasharray:"5 5"}),e.jsx("text",{x:n(c)+5,y:r(t/2),fill:"#94a3b8",fontSize:"10",children:"Nโ‚€/2"}),e.jsx(w.path,{d:N(),fill:"none",stroke:"#fbbf24",strokeWidth:"3",initial:{pathLength:0},animate:{pathLength:1},transition:{duration:1}}),e.jsx("g",{children:Array.from({length:50}).map((s,p)=>{const a=p*(m/50),o=b(a),x=(t-o)/t;return e.jsx("circle",{cx:n(a),cy:r(o),r:2,fill:Math.random()>x?"#fbbf24":"#334155"},p)})})]})]})]})]})};export{L as RadioactiveDecayView}; diff --git a/site/assets/Sequences3DView-f2aGHw3l.js b/site/assets/Sequences3DView-f2aGHw3l.js new file mode 100644 index 0000000..cb8979b --- /dev/null +++ b/site/assets/Sequences3DView-f2aGHw3l.js @@ -0,0 +1 @@ +import{r as s,j as e,D as z,d as P,P as q}from"./index-DJrAq1Rk.js";import{u as _,V as y,O as G,Q as D,C as E}from"./react-three-fiber.esm-DbvaK_kO.js";import{L as k}from"./Line-DRGYPd7c.js";import{S as L}from"./settings-2-BYyATKYL.js";import{O}from"./OrbitControls-C12Qjv1w.js";import{F as U}from"./Float-DkPwlzaD.js";import{S as V}from"./Stars-m_MGQ0wC.js";import"./extends-CF3RwP-h.js";import"./constants-Br-Ti-Jl.js";const t=new G,Q=({radius:i,climb:h,frequency:p,showBonds:f,animate:j})=>{const g=s.useRef(null),c=s.useRef(null),u=s.useRef(null),l=s.useRef(null),x=s.useRef(null),a=s.useRef(null);_((r,n)=>{j&&g.current&&(g.current.rotation.y+=n*.2)});const{strandA:v,strandB:M,connections:b}=s.useMemo(()=>{const r=[],n=[],o=[],S=-40*h/2;for(let d=0;d<40;d++){const m=d*p,w=S+d*h,C=Math.cos(m)*i,B=Math.sin(m)*i,R=new y(C,w,B);r.push(R);const F=Math.cos(m+Math.PI)*i,I=Math.sin(m+Math.PI)*i,A=new y(F,w,I);n.push(A),o.push({start:R,end:A,id:d})}return{strandA:r,strandB:n,connections:o}},[i,h,p]);return s.useLayoutEffect(()=>{if(c.current&&(v.forEach((r,n)=>{t.position.copy(r),t.rotation.set(0,0,0),t.scale.set(1,1,1),t.updateMatrix(),c.current.setMatrixAt(n,t.matrix)}),c.current.instanceMatrix.needsUpdate=!0),u.current&&(M.forEach((r,n)=>{t.position.copy(r),t.rotation.set(0,0,0),t.scale.set(1,1,1),t.updateMatrix(),u.current.setMatrixAt(n,t.matrix)}),u.current.instanceMatrix.needsUpdate=!0),f&&l.current){let r=0,n=0;b.forEach((o,N)=>{const S=new y().addVectors(o.start,o.end).multiplyScalar(.5),d=o.start.distanceTo(o.end),m=new y().subVectors(o.end,o.start).normalize(),w=new D().setFromUnitVectors(new y(0,1,0),m);t.position.copy(S),t.quaternion.copy(w),t.scale.set(1,d,1),t.updateMatrix(),l.current.setMatrixAt(N,t.matrix),t.scale.set(1,d*.4*.2,1),t.updateMatrix(),N%2===0?x.current&&(x.current.setMatrixAt(r,t.matrix),r++):a.current&&(a.current.setMatrixAt(n,t.matrix),n++)}),l.current.instanceMatrix.needsUpdate=!0,x.current&&(x.current.instanceMatrix.needsUpdate=!0),a.current&&(a.current.instanceMatrix.needsUpdate=!0)}},[v,M,b,f]),e.jsxs("group",{ref:g,children:[e.jsx(k,{points:v,color:"#22d3ee",lineWidth:3,transparent:!0,opacity:.6}),e.jsxs("instancedMesh",{ref:c,args:[void 0,void 0,v.length],children:[e.jsx("sphereGeometry",{args:[.15,16,16]}),e.jsx("meshStandardMaterial",{color:"#22d3ee",emissive:"#22d3ee",emissiveIntensity:.5})]}),e.jsx(k,{points:M,color:"#a855f7",lineWidth:3,transparent:!0,opacity:.6}),e.jsxs("instancedMesh",{ref:u,args:[void 0,void 0,M.length],children:[e.jsx("sphereGeometry",{args:[.15,16,16]}),e.jsx("meshStandardMaterial",{color:"#a855f7",emissive:"#a855f7",emissiveIntensity:.5})]}),f&&e.jsxs(e.Fragment,{children:[e.jsxs("instancedMesh",{ref:l,args:[void 0,void 0,b.length],children:[e.jsx("cylinderGeometry",{args:[.03,.03,1,8]}),e.jsx("meshStandardMaterial",{color:"white",transparent:!0,opacity:.2})]}),e.jsxs("instancedMesh",{ref:x,args:[void 0,void 0,Math.ceil(b.length/2)],children:[e.jsx("cylinderGeometry",{args:[.06,.06,1,8]}),e.jsx("meshStandardMaterial",{color:"#22d3ee",emissive:"#22d3ee",emissiveIntensity:.8,transparent:!0,opacity:.6})]}),e.jsxs("instancedMesh",{ref:a,args:[void 0,void 0,Math.floor(b.length/2)],children:[e.jsx("cylinderGeometry",{args:[.06,.06,1,8]}),e.jsx("meshStandardMaterial",{color:"#a855f7",emissive:"#a855f7",emissiveIntensity:.8,transparent:!0,opacity:.6})]})]})]})},ee=()=>{const[i,h]=s.useState(2),[p,f]=s.useState(.4),[j,g]=s.useState(.6),[c,u]=s.useState(!0),[l,x]=s.useState(!0);return e.jsxs("div",{className:"space-y-6 h-[calc(100vh-140px)] flex flex-col pb-6",children:[e.jsx("header",{className:"flex flex-col md:flex-row justify-between items-end border-b border-white/10 pb-4 shrink-0 gap-4",children:e.jsxs("div",{children:[e.jsxs("h2",{className:"text-3xl font-bold text-white mb-2 flex items-center gap-3",children:[e.jsx(z,{className:"text-cyan-400"})," Bio-Sequences"]}),e.jsxs("p",{className:"text-slate-400 text-sm max-w-2xl",children:["Modeling biological structures using interleaved mathematical sequences.",e.jsx("span",{className:"font-mono text-cyan-400",children:" a_n"})," and ",e.jsx("span",{className:"font-mono text-purple-400",children:" b_n"})," form the double helix backbone."]})]})}),e.jsxs("div",{className:"flex-1 bg-slate-950 rounded-3xl border border-slate-800 relative overflow-hidden shadow-2xl flex flex-col md:flex-row",children:[e.jsxs("div",{className:"absolute top-4 left-4 z-10 w-72 bg-slate-900/80 backdrop-blur-xl p-5 rounded-2xl border border-slate-700/50 flex flex-col gap-6 shadow-2xl",children:[e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-bold text-slate-500 uppercase tracking-widest flex items-center gap-2 mb-4",children:[e.jsx(L,{size:14})," Helix Parameters"]}),e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex justify-between text-[10px] text-slate-400 mb-1 font-bold uppercase",children:[e.jsx("span",{children:"Radius (Amplitude)"}),e.jsxs("span",{className:"text-cyan-400",children:[i,"u"]})]}),e.jsx("input",{type:"range",min:"1",max:"4",step:"0.1",value:i,onChange:a=>h(parseFloat(a.target.value)),className:"w-full h-1.5 bg-slate-700 rounded-lg appearance-none cursor-pointer accent-cyan-500"})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex justify-between text-[10px] text-slate-400 mb-1 font-bold uppercase",children:[e.jsx("span",{children:"Base Pair Spacing (Climb)"}),e.jsxs("span",{className:"text-purple-400",children:[p,"u"]})]}),e.jsx("input",{type:"range",min:"0.2",max:"1",step:"0.05",value:p,onChange:a=>f(parseFloat(a.target.value)),className:"w-full h-1.5 bg-slate-700 rounded-lg appearance-none cursor-pointer accent-purple-500"})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex justify-between text-[10px] text-slate-400 mb-1 font-bold uppercase",children:[e.jsx("span",{children:"Twist Rate (Frequency)"}),e.jsxs("span",{className:"text-pink-400",children:[j," rad"]})]}),e.jsx("input",{type:"range",min:"0.2",max:"1.5",step:"0.1",value:j,onChange:a=>g(parseFloat(a.target.value)),className:"w-full h-1.5 bg-slate-700 rounded-lg appearance-none cursor-pointer accent-pink-500"})]})]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[e.jsxs("button",{onClick:()=>u(!c),className:`py-2 rounded-lg text-[10px] font-bold border transition-all flex items-center justify-center gap-2 uppercase tracking-wide ${c?"bg-cyan-500/20 text-cyan-300 border-cyan-500/50":"bg-transparent text-slate-400 border-slate-600"}`,children:[e.jsx(P,{size:14})," Base Pairs"]}),e.jsxs("button",{onClick:()=>x(!l),className:`py-2 rounded-lg text-[10px] font-bold border transition-all flex items-center justify-center gap-2 uppercase tracking-wide ${l?"bg-purple-500/20 text-purple-300 border-purple-500/50":"bg-transparent text-slate-400 border-slate-600"}`,children:[e.jsx(q,{size:14})," Rotation"]})]})]}),e.jsxs("div",{className:"w-full h-full",children:[e.jsx("div",{className:"absolute inset-0 bg-[radial-gradient(circle_at_50%_50%,_rgba(168,85,247,0.1),_transparent_70%)] pointer-events-none z-0"}),e.jsxs(E,{camera:{position:[10,0,10],fov:35},children:[e.jsx("color",{attach:"background",args:["#020617"]}),e.jsx("fog",{attach:"fog",args:["#020617",10,40]}),e.jsx("ambientLight",{intensity:.2}),e.jsx("pointLight",{position:[10,10,10],intensity:1,color:"#22d3ee"}),e.jsx("pointLight",{position:[-10,-10,-10],intensity:1,color:"#a855f7"}),e.jsx(O,{makeDefault:!0,enableZoom:!0,enablePan:!0}),e.jsx(U,{speed:2,rotationIntensity:.2,floatIntensity:.5,children:e.jsx(Q,{radius:i,climb:p,frequency:j,showBonds:c,animate:l})}),e.jsx(V,{radius:100,depth:50,count:2e3,factor:4,saturation:0,fade:!0,speed:1})]}),e.jsxs("div",{className:"absolute bottom-6 right-6 pointer-events-none text-right",children:[e.jsx("h3",{className:"text-2xl font-black text-white/10 uppercase tracking-tighter",children:"Sequence Model"}),e.jsxs("div",{className:"text-[10px] text-cyan-500/50 font-mono",children:["x = r ยท cos(nฮธ)",e.jsx("br",{}),"z = r ยท sin(nฮธ)"]})]})]})]})]})};export{ee as Sequences3DView}; diff --git a/site/assets/SequencesView-D362I2Es.js b/site/assets/SequencesView-D362I2Es.js new file mode 100644 index 0000000..8d77ac2 --- /dev/null +++ b/site/assets/SequencesView-D362I2Es.js @@ -0,0 +1,3 @@ +import{r as w,j as e,m,b as k,A as _,d as S}from"./index-DJrAq1Rk.js";import{M as N}from"./MathRenderer-DoWdgGCt.js";import{W as F}from"./WolframHelper-C3f14kAl.js";import{L as I}from"./lightbulb-CK5FIpYu.js";import"./chevron-right-KbXem8Tn.js";const x=[{id:"arithmetic",name:"Arithmetic Sequence",formula:"a_n = a_1 + (n-1)d",desc:"A sequence with a constant difference between consecutive terms. It represents linear growth or decay.",analogy:"Like walking up a staircase. Each step rises by the exact same height (d), regardless of how high you are.",breakdown:[{term:"a_1",meaning:"Starting Position",color:"text-cyan-400"},{term:"(n-1)",meaning:"Number of steps taken",color:"text-purple-400"},{term:"d",meaning:"Step Size (Common Difference)",color:"text-emerald-400"}],type:"EXPLICIT",params:[{key:"a1",label:"Start (aโ‚)",min:-10,max:10,step:1,default:0},{key:"d",label:"Difference (d)",min:-5,max:5,step:.5,default:1}],generate:(a,r)=>r.a1+(a-1)*r.d},{id:"geometric",name:"Geometric Sequence",formula:"a_n = a_1 \\cdot r^{n-1}",desc:"A sequence where each term is multiplied by a constant ratio. Represents exponential growth or decay.",analogy:"Like a colony of bacteria doubling every hour, or a bouncing ball reaching half its previous height.",breakdown:[{term:"a_1",meaning:"Initial Amount",color:"text-cyan-400"},{term:"r",meaning:"Growth Multiplier (Ratio)",color:"text-pink-400"},{term:"n-1",meaning:"Time steps elapsed",color:"text-slate-400"}],type:"EXPLICIT",params:[{key:"a1",label:"Start (aโ‚)",min:1,max:10,step:1,default:2},{key:"r",label:"Ratio (r)",min:-2,max:2,step:.1,default:.8}],generate:(a,r)=>r.a1*Math.pow(r.r,a-1)},{id:"fibonacci",name:"Fibonacci (Recursive)",formula:"F_n = F_{n-1} + F_{n-2}",desc:"Each term is the sum of the two preceding ones. Famous for appearing in nature (sunflowers, shells).",analogy:"Like adding the last two generations of rabbits to determine the current population size.",breakdown:[{term:"F_{n-1}",meaning:"Previous Term",color:"text-cyan-400"},{term:"F_{n-2}",meaning:"Term before previous",color:"text-purple-400"}],type:"RECURSIVE",params:[{key:"f0",label:"First (Fโ‚€)",min:0,max:5,step:1,default:0},{key:"f1",label:"Second (Fโ‚)",min:1,max:5,step:1,default:1}],generate:(a,r)=>{if(a===1)return r.f0;if(a===2)return r.f1;let n=r.f0,l=r.f1;for(let o=3;o<=a;o++){let p=n+l;n=l,l=p}return l}},{id:"alternating",name:"Harmonic Alternating",formula:"a_n = \\frac{(-1)^{n+1}}{n}",desc:"A sequence that oscillates between positive and negative values while shrinking towards zero.",analogy:"Like a pendulum swinging back and forth, but with friction causing each swing to be shorter than the last.",breakdown:[{term:"(-1)^{n+1}",meaning:"Sign Flipper",color:"text-yellow-400"},{term:"1/n",meaning:"Damping Factor",color:"text-emerald-400"}],type:"EXPLICIT",params:[],generate:(a,r)=>Math.pow(-1,a+1)/a}],z=()=>{const[a,r]=w.useState("arithmetic"),n=x.find(t=>t.id===a)||x[0],[l,o]=w.useState(()=>{const t={};return x.forEach(s=>s.params.forEach(i=>t[`${s.id}_${i.key}`]=i.default)),t}),p=(t,s)=>{o(i=>({...i,[`${a}_${t}`]:s}))},g=t=>l[`${a}_${t}`]??0,c=20,d=Array.from({length:c},(t,s)=>{const i=s+1,v={};return n.params.forEach(j=>v[j.key]=g(j.key)),{n:i,val:n.generate(i,v)}}),u=Math.max(...d.map(t=>t.val),.1),h=Math.min(...d.map(t=>t.val),0),f=u-h||1,y=f*.1,b=t=>300-(t-(h-y))/(f+2*y)*300;return e.jsxs("div",{className:"space-y-8 pb-20",children:[e.jsxs("header",{className:"border-b border-white/10 pb-6",children:[e.jsx("h2",{className:"text-4xl font-bold text-white mb-2 tracking-tight",children:"Sequence Archetypes"}),e.jsx("p",{className:"text-slate-400 max-w-3xl font-light",children:"Explore the behavior of discrete mathematical patterns. Configure parameters to observe convergence, divergence, and oscillation."})]}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-8 items-start",children:[e.jsx("div",{className:"lg:col-span-4 space-y-4",children:x.map(t=>e.jsxs("button",{onClick:()=>r(t.id),className:`w-full text-left p-4 rounded-xl border transition-all duration-300 group relative overflow-hidden + ${a===t.id?"bg-slate-800 border-cyan-500/50 shadow-lg shadow-cyan-900/20":"bg-slate-900/40 border-slate-700 hover:bg-slate-800 hover:border-slate-600"} + `,children:[a===t.id&&e.jsx(m.div,{layoutId:"activeSeqGlow",className:"absolute inset-0 bg-cyan-500/5"}),e.jsxs("div",{className:"relative z-10 flex justify-between items-center",children:[e.jsxs("div",{children:[e.jsx("span",{className:`text-[10px] font-bold uppercase tracking-widest mb-1 block ${a===t.id?"text-cyan-400":"text-slate-500"}`,children:t.type}),e.jsx("h3",{className:`font-bold text-base ${a===t.id?"text-white":"text-slate-300"}`,children:t.name})]}),a===t.id&&e.jsx(k,{size:18,className:"text-cyan-400"})]})]},t.id))}),e.jsx("div",{className:"lg:col-span-8",children:e.jsx(_,{mode:"wait",children:e.jsxs(m.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},transition:{duration:.3},className:"glass-panel p-8 rounded-[32px] border-l-4 border-l-cyan-500 relative overflow-hidden",children:[e.jsx("div",{className:"absolute inset-0 bg-[url('https://grainy-gradients.vercel.app/noise.svg')] opacity-5 pointer-events-none"}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-8 mb-8 relative z-10",children:[e.jsxs("div",{className:"bg-slate-950/80 p-6 rounded-2xl border border-white/5 shadow-inner",children:[e.jsx("div",{className:"text-[10px] font-bold text-slate-500 uppercase tracking-widest mb-4",children:"General Formula"}),e.jsx(N,{expression:n.formula,className:"text-2xl text-white mb-6 text-center"}),e.jsx("div",{className:"space-y-3",children:n.breakdown.map((t,s)=>e.jsxs("div",{className:"flex items-center gap-3 bg-slate-900/50 p-2 rounded border border-slate-800/50",children:[e.jsx("div",{className:`font-mono font-bold text-xs ${t.color} min-w-[40px] text-center`,children:e.jsx(N,{expression:t.term,inline:!0})}),e.jsx("p",{className:"text-xs text-slate-400",children:t.meaning})]},s))})]}),e.jsxs("div",{className:"flex flex-col",children:[e.jsxs("div",{className:"bg-amber-500/5 p-5 rounded-xl border border-amber-500/20 mb-4",children:[e.jsxs("h4",{className:"text-xs font-bold text-amber-400 uppercase tracking-widest mb-2 flex items-center gap-2",children:[e.jsx(I,{size:14})," Intuition"]}),e.jsxs("p",{className:"text-sm text-amber-100/80 italic leading-relaxed",children:['"',n.analogy,'"']})]}),e.jsx("p",{className:"text-sm text-slate-400 leading-relaxed font-light",children:n.desc})]})]}),e.jsxs("div",{className:"bg-slate-900/40 rounded-2xl border border-white/5 p-6 relative",children:[e.jsxs("div",{className:"flex flex-col md:flex-row justify-between items-start md:items-center mb-6 gap-4",children:[e.jsxs("h4",{className:"text-xs font-bold text-cyan-400 uppercase tracking-widest flex items-center gap-2",children:[e.jsx(S,{size:16})," Interactive Lab"]}),n.params.length>0&&e.jsx("div",{className:"flex flex-wrap gap-4 bg-slate-950/50 p-2 rounded-xl border border-white/5",children:n.params.map(t=>e.jsxs("div",{className:"flex items-center gap-3 px-2",children:[e.jsx("label",{className:"text-[10px] font-bold text-slate-400 uppercase",children:t.label}),e.jsx("input",{type:"number",step:t.step,value:g(t.key),onChange:s=>p(t.key,parseFloat(s.target.value)),className:"w-16 bg-slate-900 border border-slate-700 rounded px-2 py-1 text-xs text-white text-center focus:border-cyan-500 outline-none"})]},t.key))})]}),e.jsxs("div",{className:"relative h-[300px] w-full border-l border-b border-slate-700 ml-2",children:[e.jsx("div",{className:"absolute inset-0 flex items-end justify-between px-2"}),h<0&&u>0&&e.jsx("div",{className:"absolute w-full h-px bg-slate-600 border-t border-dashed border-slate-500 opacity-50",style:{top:b(0)}}),e.jsxs("svg",{className:"absolute inset-0 w-full h-full overflow-visible",children:[e.jsx("defs",{children:e.jsxs("linearGradient",{id:"seqGradient",x1:"0",y1:"0",x2:"1",y2:"0",children:[e.jsx("stop",{offset:"0%",stopColor:"#22d3ee",stopOpacity:"0.4"}),e.jsx("stop",{offset:"100%",stopColor:"#a855f7",stopOpacity:"0.8"})]})}),e.jsx(m.polyline,{points:d.map((t,s)=>`${s/(c-1)*100}%,${b(t.val)}`).join(" "),fill:"none",stroke:"url(#seqGradient)",strokeWidth:"2",strokeDasharray:"4 4",initial:{pathLength:0},animate:{pathLength:1},transition:{duration:1}}),d.map((t,s)=>{const i=s/(c-1)*100;return e.jsx(m.circle,{initial:{scale:0},animate:{scale:1,cx:`${i}%`,cy:b(t.val)},transition:{delay:s*.05,type:"spring"},r:4,className:"fill-cyan-400 stroke-slate-900 stroke-2 hover:r-6 hover:fill-white cursor-pointer",children:e.jsxs("title",{children:["n=",t.n,", a_n=",t.val.toFixed(2)]})},s)})]})]}),e.jsxs("div",{className:"flex justify-between mt-2 px-2 text-[10px] font-mono text-slate-500",children:[e.jsx("span",{children:"n=1"}),e.jsxs("span",{children:["n=",c]})]})]})]},a)})})]}),e.jsx(F,{context:"sequences"})]})};export{z as SequencesView}; diff --git a/site/assets/SeriesView-js2OwgAV.js b/site/assets/SeriesView-js2OwgAV.js new file mode 100644 index 0000000..7cd970e --- /dev/null +++ b/site/assets/SeriesView-js2OwgAV.js @@ -0,0 +1,13 @@ +import{c as b,r as o,j as e,m as x,b as j,A as w}from"./index-DJrAq1Rk.js";import{M as h}from"./MathRenderer-DoWdgGCt.js";import{C as N}from"./circle-check-7SRCYW7Y.js";import{T as k}from"./triangle-alert-7X0SgA5l.js";import{L as C}from"./lightbulb-CK5FIpYu.js";/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const S=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],M=b("chart-column",S);/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const A=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}],["path",{d:"M14 4h7",key:"3xa0d5"}],["path",{d:"M14 9h7",key:"1icrd9"}],["path",{d:"M14 15h7",key:"1mj8o2"}],["path",{d:"M14 20h7",key:"11slyb"}]],I=b("layout-list",A),p=[{id:"geometric",name:"Geometric Series",formula:"\\sum_{n=0}^{\\infty} a \\cdot r^n",desc:"A series where each term is found by multiplying the previous term by a fixed, non-zero number called the common ratio.",analogy:"Like a bouncing ball that rebounds to a fraction of its previous height. Even though it bounces infinitely many times, the total distance traveled is finite.",breakdown:[{term:"a",meaning:"First Term (Starting Value)",color:"text-cyan-400"},{term:"r",meaning:"Common Ratio (Multiplier)",color:"text-purple-400"},{term:"\\sum",meaning:"Summation of infinite terms",color:"text-slate-400"}],convergenceCondition:"|r| < 1",interactive:!0},{id:"harmonic",name:"Harmonic Series",formula:"\\sum_{n=1}^{\\infty} \\frac{1}{n}",desc:"The sum of reciprocals of integers. It is the classic example of a series whose terms go to zero, yet the sum still grows to infinity.",analogy:"Imagine stacking blocks that get slightly smaller. You can actually stack them infinitely high, even if the blocks become microscopic.",breakdown:[{term:"1",meaning:"Constant Numerator",color:"text-emerald-400"},{term:"n",meaning:"Index (Denom increases linearly)",color:"text-pink-400"}],convergenceCondition:"Diverges (Always)",interactive:!0},{id:"pseries",name:"p-Series Test",formula:"\\sum_{n=1}^{\\infty} \\frac{1}{n^p}",desc:'A generalization of the harmonic series. The exponent "p" determines the "speed" at which terms shrink.',analogy:"The 'Speed Limit' of convergence. If p > 1, the terms shrink fast enough to create a finite sum. If p โ‰ค 1, they are too slow.",breakdown:[{term:"n",meaning:"Base Index",color:"text-cyan-400"},{term:"p",meaning:"Power Parameter",color:"text-orange-400"}],convergenceCondition:"p > 1",interactive:!1},{id:"alternating",name:"Alternating Series",formula:"\\sum_{n=1}^{\\infty} (-1)^{n+1} b_n",desc:"A series where terms switch signs (+, -, +, -). These are much more likely to converge due to cancellation.",analogy:"Taking 2 steps forward, 1 step back, 0.5 forward, 0.25 back... You eventually settle on a specific spot.",breakdown:[{term:"(-1)^{n+1}",meaning:"Sign Flipper (+1, -1...)",color:"text-yellow-400"},{term:"b_n",meaning:"Positive magnitude part",color:"text-slate-300"}],convergenceCondition:"\\lim b_n = 0 \\text{ and } b_{n+1} \\le b_n",interactive:!0}],F=()=>{const[s,u]=o.useState("geometric"),[c,_]=o.useState(15),[g,f]=o.useState(1),[d,v]=o.useState(.5),i=p.find(t=>t.id===s)||p[0],l=(()=>{const t=[];let n=0;for(let a=1;a<=c;a++){let r=0;s==="geometric"?r=g*Math.pow(d,a-1):s==="harmonic"?r=1/a:s==="alternating"&&(r=Math.pow(-1,a+1)/a),n+=r,t.push({n:a,term:r,sum:n})}return t})(),y=Math.max(...l.map(t=>Math.abs(t.sum)),.1)*1.2,m=s==="geometric"&&Math.abs(d)<1||s==="alternating"||s==="pseries";return e.jsxs("div",{className:"space-y-8 pb-20",children:[e.jsxs("header",{className:"border-b border-white/10 pb-6",children:[e.jsx("h2",{className:"text-4xl font-bold text-white mb-2 tracking-tight",children:"Infinite Series Codex"}),e.jsx("p",{className:"text-slate-400 max-w-3xl font-light",children:"Understanding the summation of infinite sequences. Analyze convergence tests, formulas, and behaviors."})]}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-8 items-start",children:[e.jsx("div",{className:"lg:col-span-4 space-y-4",children:p.map(t=>e.jsxs("button",{onClick:()=>u(t.id),className:`w-full text-left p-4 rounded-xl border transition-all duration-300 group relative overflow-hidden + ${s===t.id?"bg-slate-800 border-cyan-500/50 shadow-lg shadow-cyan-900/20":"bg-slate-900/40 border-slate-700 hover:bg-slate-800 hover:border-slate-600"} + `,children:[s===t.id&&e.jsx(x.div,{layoutId:"activeSeriesGlow",className:"absolute inset-0 bg-cyan-500/5"}),e.jsxs("div",{className:"relative z-10 flex justify-between items-center",children:[e.jsxs("div",{children:[e.jsx("span",{className:`text-[10px] font-bold uppercase tracking-widest mb-1 block ${s===t.id?"text-cyan-400":"text-slate-500"}`,children:"Series Type"}),e.jsx("h3",{className:`font-bold text-base ${s===t.id?"text-white":"text-slate-300"}`,children:t.name})]}),s===t.id&&e.jsx(j,{size:18,className:"text-cyan-400"})]})]},t.id))}),e.jsx("div",{className:"lg:col-span-8",children:e.jsx(w,{mode:"wait",children:e.jsxs(x.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},transition:{duration:.3},className:"glass-panel p-8 rounded-[32px] border-l-4 border-l-cyan-500 relative overflow-hidden",children:[e.jsx("div",{className:"absolute inset-0 bg-[url('https://grainy-gradients.vercel.app/noise.svg')] opacity-5 pointer-events-none"}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-8 mb-8",children:[e.jsxs("div",{className:"bg-slate-950/80 p-6 rounded-2xl border border-white/5 flex flex-col items-center justify-center min-h-[160px] relative group",children:[e.jsx("div",{className:"absolute top-3 left-3 text-[10px] font-bold uppercase tracking-widest text-slate-500",children:"Standard Form"}),e.jsx(h,{expression:i.formula,className:"text-2xl md:text-3xl text-white"}),e.jsxs("div",{className:`mt-4 px-3 py-1 rounded-full text-[10px] font-bold uppercase tracking-widest border flex items-center gap-2 ${m?"bg-emerald-500/10 border-emerald-500/30 text-emerald-400":"bg-pink-500/10 border-pink-500/30 text-pink-400"}`,children:[m?e.jsx(N,{size:12}):e.jsx(k,{size:12}),m?"Converges":"Diverges"," Condition: ",e.jsx(h,{expression:i.convergenceCondition,inline:!0,className:"ml-1"})]})]}),e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-bold text-slate-400 uppercase tracking-widest mb-4 flex items-center gap-2",children:[e.jsx(I,{size:14,className:"text-purple-400"})," Anatomy"]}),e.jsx("div",{className:"space-y-3",children:i.breakdown.map((t,n)=>e.jsxs("div",{className:"bg-slate-900/50 p-2.5 rounded-lg border border-slate-800 flex items-center gap-3",children:[e.jsx("div",{className:`font-mono font-bold text-sm ${t.color} min-w-[30px] text-center`,children:e.jsx(h,{expression:t.term,inline:!0})}),e.jsx("p",{className:"text-xs text-slate-400 leading-snug",children:t.meaning})]},n))})]})]}),e.jsx("div",{className:"mb-8",children:e.jsxs("div",{className:"bg-amber-500/5 p-5 rounded-xl border border-amber-500/20",children:[e.jsxs("h4",{className:"text-xs font-bold text-amber-400 uppercase tracking-widest mb-2 flex items-center gap-2",children:[e.jsx(C,{size:14})," Intuition"]}),e.jsxs("p",{className:"text-sm text-amber-100/80 leading-relaxed italic",children:['"',i.analogy,'"']}),e.jsx("p",{className:"text-xs text-slate-400 mt-2 font-light",children:i.desc})]})}),i.interactive?e.jsxs("div",{className:"bg-slate-900/40 rounded-2xl border border-white/5 p-6",children:[e.jsxs("div",{className:"flex justify-between items-center mb-6",children:[e.jsxs("h4",{className:"text-xs font-bold text-cyan-400 uppercase tracking-widest flex items-center gap-2",children:[e.jsx(M,{size:16})," Interactive Lab"]}),s==="geometric"&&e.jsxs("div",{className:"flex gap-4",children:[e.jsxs("label",{className:"text-xs text-slate-400 flex items-center gap-2",children:["r = ",e.jsx("input",{type:"number",step:"0.1",value:d,onChange:t=>v(parseFloat(t.target.value)),className:"w-16 bg-slate-950 border border-slate-700 rounded px-2 py-1 text-white"})]}),e.jsxs("label",{className:"text-xs text-slate-400 flex items-center gap-2",children:["a = ",e.jsx("input",{type:"number",step:"1",value:g,onChange:t=>f(parseFloat(t.target.value)),className:"w-12 bg-slate-950 border border-slate-700 rounded px-2 py-1 text-white"})]})]})]}),e.jsxs("div",{className:"h-40 w-full relative border-l border-b border-slate-700 ml-2",children:[e.jsx("div",{className:"absolute w-full h-px bg-slate-700",style:{top:"50%"}}),e.jsx("div",{className:"absolute inset-0 flex items-center",children:l.map((t,n)=>{const a=t.sum/y*50;return e.jsxs("div",{className:"flex-1 h-full flex flex-col justify-center items-center group relative",children:[e.jsx(x.div,{initial:{height:0},animate:{height:`${Math.abs(a)}%`},className:`w-1/2 min-w-[2px] rounded-sm transition-all ${t.sum>=0?"bg-cyan-500 mb-[50%]":"bg-pink-500 mt-[50%]"}`,style:{transformOrigin:t.sum>=0?"bottom":"top"}}),e.jsx("div",{className:`w-2 h-2 rounded-full absolute bg-white shadow-lg ${t.sum>=0?"mb-[50%]":"mt-[50%]"}`,style:{bottom:t.sum>=0?`calc(50% + ${Math.abs(a)}% - 4px)`:"auto",top:t.sum<0?`calc(50% + ${Math.abs(a)}% - 4px)`:"auto"}})]},n)})})]}),e.jsxs("div",{className:"flex justify-between mt-2 text-[10px] text-slate-500 font-mono",children:[e.jsx("span",{children:"n=1"}),e.jsxs("span",{children:["n=",c]})]}),e.jsxs("div",{className:"mt-2 text-center text-xs font-mono text-cyan-300",children:["Current Partial Sum S_",c," = ",l[l.length-1].sum.toFixed(5)]})]}):e.jsx("div",{className:"p-8 text-center border border-dashed border-slate-700 rounded-xl text-slate-500 text-sm",children:"Interactive lab not available for this general test type."})]},s)})})]})]})};export{F as SeriesView}; diff --git a/site/assets/Stars-m_MGQ0wC.js b/site/assets/Stars-m_MGQ0wC.js new file mode 100644 index 0000000..5c401c1 --- /dev/null +++ b/site/assets/Stars-m_MGQ0wC.js @@ -0,0 +1,24 @@ +import{r as e}from"./index-DJrAq1Rk.js";import{a as y,u as A,A as w,V as x,S as C,b as E}from"./react-three-fiber.esm-DbvaK_kO.js";import{v as z}from"./constants-Br-Ti-Jl.js";class P extends E{constructor(){super({uniforms:{time:{value:0},fade:{value:1}},vertexShader:` + uniform float time; + attribute float size; + varying vec3 vColor; + void main() { + vColor = color; + vec4 mvPosition = modelViewMatrix * vec4(position, 0.5); + gl_PointSize = size * (30.0 / -mvPosition.z) * (3.0 + sin(time + 100.0)); + gl_Position = projectionMatrix * mvPosition; + }`,fragmentShader:` + uniform sampler2D pointTexture; + uniform float fade; + varying vec3 vColor; + void main() { + float opacity = 1.0; + if (fade == 1.0) { + float d = distance(gl_PointCoord, vec2(0.5, 0.5)); + opacity = 1.0 / (1.0 + exp(16.0 * (d - 0.25))); + } + gl_FragColor = vec4(vColor, opacity); + + #include + #include <${z>=154?"colorspace_fragment":"encodings_fragment"}> + }`})}}const _=t=>new x().setFromSpherical(new C(t,Math.acos(1-Math.random()*2),Math.random()*2*Math.PI)),R=e.forwardRef(({radius:t=100,depth:i=50,count:r=5e3,saturation:l=0,factor:c=4,fade:u=!1,speed:d=1},p)=>{const n=e.useRef(null),[v,g,h]=e.useMemo(()=>{const a=[],m=[],S=Array.from({length:r},()=>(.5+.5*Math.random())*c),o=new y;let f=t+i;const M=i/r;for(let s=0;sn.current&&(n.current.uniforms.time.value=a.clock.getElapsedTime()*d));const[b]=e.useState(()=>new P);return e.createElement("points",{ref:p},e.createElement("bufferGeometry",null,e.createElement("bufferAttribute",{attach:"attributes-position",args:[v,3]}),e.createElement("bufferAttribute",{attach:"attributes-color",args:[g,3]}),e.createElement("bufferAttribute",{attach:"attributes-size",args:[h,1]})),e.createElement("primitive",{ref:n,object:b,attach:"material",blending:w,"uniforms-fade-value":u,depthWrite:!1,transparent:!0,vertexColors:!0}))});export{R as S}; diff --git a/site/assets/Surface3DView-DR4ocFB5.js b/site/assets/Surface3DView-DR4ocFB5.js new file mode 100644 index 0000000..5f2e3e4 --- /dev/null +++ b/site/assets/Surface3DView-DR4ocFB5.js @@ -0,0 +1 @@ +import{j as e,B as h,r as m}from"./index-DJrAq1Rk.js";import{C as p,P as f,D as c}from"./react-three-fiber.esm-DbvaK_kO.js";import{O as u}from"./OrbitControls-C12Qjv1w.js";import{G as d}from"./Grid-BzfIX0gF.js";import"./extends-CF3RwP-h.js";import"./constants-Br-Ti-Jl.js";const j=({mode:t})=>{const r=m.useMemo(()=>{const s=new f(10,10,64,64),x=s.attributes.position.count;for(let i=0;i{const r=t==="function"?"Multivariable Surface":t==="limit"?"3D Limit (Sinc)":"Tangent Plane",s=t==="function"?"text-cyan-400":t==="limit"?"text-pink-400":"text-amber-400";return e.jsxs("div",{className:"space-y-6 h-[calc(100vh-140px)] flex flex-col pb-6",children:[e.jsx("header",{className:"flex justify-between items-end border-b border-white/10 pb-4 shrink-0",children:e.jsxs("div",{children:[e.jsxs("h2",{className:"text-3xl font-bold text-white mb-2 flex items-center gap-3",children:[e.jsx(h,{className:s})," ",r]}),e.jsx("p",{className:"text-slate-400 text-sm max-w-2xl",children:t==="limit"?"Visualizing lim(x,yโ†’0) of sin(r)/r. Note the peak at the origin.":t==="derivative"?"The tangent plane represents the local linear approximation of the surface.":"Exploring z = f(x,y) in 3D space."})]})}),e.jsx("div",{className:"flex-1 bg-slate-950 rounded-3xl border border-slate-800 relative overflow-hidden shadow-2xl",children:e.jsxs(p,{camera:{position:[8,6,8],fov:45},children:[e.jsx("color",{attach:"background",args:["#020617"]}),e.jsx("ambientLight",{intensity:.5}),e.jsx("pointLight",{position:[10,10,10],intensity:1}),e.jsx(u,{makeDefault:!0}),e.jsx(d,{infiniteGrid:!0,sectionSize:3,cellColor:"#1e293b",sectionColor:"#334155",fadeDistance:30,position:[0,-2,0]}),e.jsx(j,{mode:t})]})})]})};export{N as Surface3DView}; diff --git a/site/assets/SystemsView-0Pnb8mJU.js b/site/assets/SystemsView-0Pnb8mJU.js new file mode 100644 index 0000000..c51786c --- /dev/null +++ b/site/assets/SystemsView-0Pnb8mJU.js @@ -0,0 +1,8 @@ +import{c as I,r as c,C as W,j as e,m as N,A as V,a as z,L as D}from"./index-DJrAq1Rk.js";import{M as y}from"./MatrixInput-BvG_poIz.js";import{g as p,r as w,f as x,c as A}from"./matrixMath-CNHWal2D.js";import{W as U}from"./WolframHelper-C3f14kAl.js";import{M as S}from"./MathRenderer-DoWdgGCt.js";import{S as $}from"./scan-BEuCCSbY.js";import"./chevron-right-KbXem8Tn.js";/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const q=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],B=I("database",q),b=[{id:"system",title:"System Matrix Form",icon:B,desc:"Any system of linear equations can be expressed as a single matrix equation AX = B. This encapsulates the entire problem into a compact geometric form.",math:"A \\cdot \\mathbf{x} = \\mathbf{b}",anatomy:[{term:"A",meaning:"Coefficient Matrix (nxn)",color:"text-blue-400"},{term:"\\mathbf{x}",meaning:"Vector of Variables",color:"text-purple-400"},{term:"\\mathbf{b}",meaning:"Constant Vector",color:"text-orange-400"}]},{id:"determinant",title:"The Determinant (W)",icon:$,desc:"The 'Main Determinant' W determines if the system has a unique solution. Geometrically, it measures how the matrix A scales volume.",math:"W = \\det(A) \\neq 0",anatomy:[{term:"W",meaning:"Main Determinant",color:"text-emerald-400"},{term:"\\neq 0",meaning:"Condition for Uniqueness",color:"text-red-400"}]},{id:"cramer",title:"Cramer's Formula",icon:W,desc:"A direct method to solve for each variable individually by replacing columns in the main matrix with the constant vector B.",math:"x_i = \\frac{W_i}{W} = \\frac{\\det(A_i)}{\\det(A)}",anatomy:[{term:"x_i",meaning:"i-th Variable (x, y, z...)",color:"text-white"},{term:"W_i",meaning:"Det after replacing col i with b",color:"text-cyan-400"},{term:"W",meaning:"Original Determinant",color:"text-slate-400"}]}],Q=()=>{const[s,C]=c.useState(b[0]),[i,M]=c.useState(3),[n,f]=c.useState([[1,-2,1],[0,2,-8],[-4,5,9]]),[m,u]=c.useState([[0],[8],[-9]]),g=t=>{M(t),f(A(t,t,1)),u(A(t,1,1))},{detA:o,cramerResults:k,solutionStatus:h}=c.useMemo(()=>{const t=p(n),l=m.map(a=>a[0]),j=[];let v="UNIQUE";if(t!==null)if(Math.abs(t)<1e-5){let a=!0;for(let r=0;r1e-4&&(a=!1)}v=a?"INFINITE":"INCONSISTENT"}else for(let a=0;ag(2),className:`px-4 py-2 text-xs font-bold uppercase rounded-lg transition-all ${i===2?"bg-cyan-600 text-white":"text-slate-500 hover:text-white hover:bg-white/5"}`,children:"2 Vars"}),e.jsx("button",{onClick:()=>g(3),className:`px-4 py-2 text-xs font-bold uppercase rounded-lg transition-all ${i===3?"bg-cyan-600 text-white":"text-slate-500 hover:text-white hover:bg-white/5"}`,children:"3 Vars"})]})]}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-8 items-start",children:[e.jsx("div",{className:"lg:col-span-4 space-y-4",children:b.map(t=>e.jsxs("button",{onClick:()=>C(t),className:`w-full text-left p-4 rounded-xl border transition-all duration-300 group relative overflow-hidden + ${s.id===t.id?"bg-slate-800 border-cyan-500/50 shadow-lg shadow-cyan-900/20":"bg-slate-900/40 border-slate-700 hover:bg-slate-800 hover:border-slate-600"} + `,children:[s.id===t.id&&e.jsx(N.div,{layoutId:"activeConceptGlow",className:"absolute inset-0 bg-cyan-500/5"}),e.jsxs("div",{className:"relative z-10 flex items-center gap-4",children:[e.jsx("div",{className:`p-2 rounded-lg ${s.id===t.id?"bg-cyan-500 text-white":"bg-slate-800 text-slate-500"}`,children:e.jsx(t.icon,{size:20})}),e.jsxs("div",{children:[e.jsxs("span",{className:`text-[10px] font-bold uppercase tracking-widest mb-0.5 block ${s.id===t.id?"text-cyan-400":"text-slate-500"}`,children:["Concept 0",b.indexOf(t)+1]}),e.jsx("h3",{className:`font-bold text-sm ${s.id===t.id?"text-white":"text-slate-300"}`,children:t.title})]})]})]},t.id))}),e.jsx("div",{className:"lg:col-span-8",children:e.jsx(V,{mode:"wait",children:e.jsxs(N.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},transition:{duration:.3},className:"glass-panel p-8 rounded-[32px] border-l-4 border-l-cyan-500 relative overflow-hidden",children:[e.jsx("div",{className:"absolute inset-0 bg-[url('https://grainy-gradients.vercel.app/noise.svg')] opacity-5 pointer-events-none"}),e.jsxs("div",{className:"flex flex-col md:flex-row gap-8 mb-8",children:[e.jsxs("div",{className:"flex-1",children:[e.jsx("h3",{className:"text-xl font-bold text-white mb-2",children:s.title}),e.jsx("p",{className:"text-slate-400 text-sm leading-relaxed",children:s.desc})]}),e.jsx("div",{className:"bg-slate-950/80 p-4 rounded-xl border border-white/5 min-w-[200px] flex flex-col items-center justify-center",children:e.jsx(S,{expression:s.math,className:"text-xl text-cyan-200"})})]}),e.jsxs("div",{className:"mb-8 bg-slate-900/50 p-5 rounded-2xl border border-slate-800",children:[e.jsxs("h4",{className:"text-xs font-bold text-slate-500 uppercase tracking-widest mb-3 flex items-center gap-2",children:[e.jsx(z,{size:14})," Formula Anatomy"]}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:s.anatomy.map((t,l)=>e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:`font-mono font-bold text-sm ${t.color}`,children:e.jsx(S,{expression:t.term,inline:!0})}),e.jsx("p",{className:"text-xs text-slate-400 leading-snug border-l border-slate-700 pl-2",children:t.meaning})]},l))})]}),e.jsxs("div",{className:"bg-slate-900/40 rounded-2xl border border-white/5 p-6",children:[e.jsxs("div",{className:"flex justify-between items-center mb-6",children:[e.jsxs("h4",{className:"text-xs font-bold text-cyan-400 uppercase tracking-widest flex items-center gap-2",children:[e.jsx(D,{size:16})," Interactive System Lab"]}),e.jsxs("div",{className:`px-2 py-1 rounded text-[10px] font-bold uppercase border ${h==="UNIQUE"?"border-emerald-500/30 text-emerald-400 bg-emerald-500/10":"border-pink-500/30 text-pink-400 bg-pink-500/10"}`,children:["Status: ",h]})]}),e.jsxs("div",{className:"flex flex-col xl:flex-row gap-8 items-start",children:[e.jsxs("div",{className:"flex items-center gap-4 overflow-x-auto pb-2",children:[e.jsxs("div",{className:"space-y-1 text-center",children:[e.jsx("div",{className:"text-[9px] text-slate-500 font-bold uppercase",children:"A"}),e.jsx(y,{data:n,onChange:f,editable:!0,color:"blue"})]}),e.jsx("div",{className:"text-2xl text-slate-600 font-light",children:"ร—"}),e.jsxs("div",{className:"space-y-1 text-center",children:[e.jsx("div",{className:"text-[9px] text-slate-500 font-bold uppercase",children:"X"}),e.jsx("div",{className:"flex flex-col gap-2 p-2 border border-slate-700 rounded-lg bg-slate-900/50",children:["x","y","z"].slice(0,i).map(t=>e.jsx("div",{className:"w-8 py-1 text-center text-slate-400 italic font-serif",children:t},t))})]}),e.jsx("div",{className:"text-2xl text-slate-600 font-light",children:"="}),e.jsxs("div",{className:"space-y-1 text-center",children:[e.jsx("div",{className:"text-[9px] text-slate-500 font-bold uppercase",children:"B"}),e.jsx(y,{data:m,onChange:u,editable:!0,color:"orange"})]})]}),e.jsxs("div",{className:"flex-1 w-full bg-slate-950 p-4 rounded-xl border border-slate-800",children:[s.id==="system"&&e.jsx("div",{className:"text-center text-slate-400 text-sm py-4",children:"Input the coefficients (A) and constants (B) to define your system."}),s.id==="determinant"&&e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"text-xs text-slate-500 uppercase mb-2",children:"Main Determinant (W)"}),e.jsx("div",{className:`text-4xl font-mono font-bold ${o===0?"text-pink-500":"text-emerald-400"}`,children:o!==null?x(o):"-"}),e.jsx("div",{className:"mt-2 text-xs text-slate-500",children:o===0?"System is Singular (No unique solution)":"System is Non-Singular (Unique solution exists)"})]}),s.id==="cramer"&&h==="UNIQUE"&&e.jsx("div",{className:"space-y-3",children:k.map((t,l)=>e.jsxs("div",{className:"flex justify-between items-center bg-slate-900 p-2 rounded border border-slate-800",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"font-serif italic text-white font-bold",children:t.var}),e.jsx("span",{className:"text-slate-500 text-xs",children:"="}),e.jsxs("span",{className:"font-mono text-cyan-400 text-xs",children:["W_",t.var,"/W"]})]}),e.jsxs("div",{className:"font-mono text-sm text-white",children:[x(t.det||0)," / ",x(o||0)," = ",e.jsx("span",{className:"font-bold text-cyan-400",children:x(t.val)})]})]},l))})]})]})]})]},s.id)})})]}),e.jsx(U,{context:"systems"})]})};export{Q as SystemsView}; diff --git a/site/assets/TaylorSeriesView-DJiKKTCO.js b/site/assets/TaylorSeriesView-DJiKKTCO.js new file mode 100644 index 0000000..c6693a0 --- /dev/null +++ b/site/assets/TaylorSeriesView-DJiKKTCO.js @@ -0,0 +1 @@ +import{r as g,j as e,W as y,m as w}from"./index-DJrAq1Rk.js";const M=()=>{const[d,p]=g.useState(1),[c,j]=g.useState("cos"),i=600,o=400,r=8,v=s=>(s+r)/(2*r)*i,N=s=>o/2-s/r*o,x=s=>s<=1?1:s*x(s-1),h={cos:{label:"cos(x)",eval:s=>Math.cos(s),taylor:(s,l)=>{let n=0;for(let t=0;t<=l;t++){const a=Math.pow(-1,t)*Math.pow(s,2*t)/x(2*t);n+=a}return n},color:"#f472b6"},exp:{label:"eหฃ",eval:s=>Math.exp(s),taylor:(s,l)=>{let n=0;for(let t=0;t<=l;t++){const a=Math.pow(s,t)/x(t);n+=a}return n},color:"#22d3ee"},sin:{label:"sin(x)",eval:s=>Math.sin(s),taylor:(s,l)=>{let n=0;for(let t=0;t<=l;t++){const a=Math.pow(-1,t)*Math.pow(s,2*t+1)/x(2*t+1);n+=a}return n},color:"#a78bfa"}},m=h[c],f=s=>{let l="";for(let t=-r;t<=r;t+=.1){let a;s?a=m.taylor(t,d):a=m.eval(t),a>r/2&&(a=r/2),a<-r/2&&(a=-r/2);const b=v(t),u=N(a);t===-r?l+=`M ${b} ${u}`:l+=` L ${b} ${u}`}return l};return e.jsxs("div",{className:"space-y-8 pb-20",children:[e.jsxs("header",{className:"border-b border-slate-800 pb-6",children:[e.jsx("h2",{className:"text-4xl font-bold text-white mb-2",children:"Taylor Series Expansion"}),e.jsxs("p",{className:"text-slate-400",children:["Approximating functions using polynomials centered at ",e.jsx("span",{className:"font-mono text-cyan-400",children:"a=0"})," (Maclaurin Series)."]})]}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-8",children:[e.jsxs("div",{className:"lg:col-span-4 space-y-6",children:[e.jsxs("div",{className:"bg-slate-800/50 p-6 rounded-2xl border border-slate-700 backdrop-blur-md",children:[e.jsx("h3",{className:"text-xs font-bold text-slate-500 uppercase tracking-widest mb-4",children:"Function"}),e.jsx("div",{className:"flex gap-2 mb-6",children:Object.entries(h).map(([s,l])=>e.jsx("button",{onClick:()=>{p(1),j(s)},className:`flex-1 py-2 rounded font-mono font-bold transition-colors ${c===s?"bg-slate-200 text-slate-900":"bg-slate-700 text-slate-400 hover:bg-slate-600"}`,children:l.label},s))}),e.jsx("h3",{className:"text-xs font-bold text-slate-500 uppercase tracking-widest mb-2",children:"Approximation Degree (n)"}),e.jsxs("div",{className:"flex items-center gap-4 mb-2",children:[e.jsx("input",{type:"range",min:"0",max:"10",step:"1",value:d,onChange:s=>p(parseInt(s.target.value)),className:"flex-1 h-2 bg-slate-700 rounded-lg appearance-none cursor-pointer accent-cyan-500"}),e.jsx("span",{className:"text-2xl font-mono font-bold text-cyan-400 w-8 text-center",children:d})]}),e.jsx("p",{className:"text-xs text-slate-500",children:"Higher degrees hug the curve tighter further from the center."})]}),e.jsxs("div",{className:"bg-slate-900 p-6 rounded-2xl border border-slate-800 font-mono text-sm leading-loose",children:[e.jsx("div",{className:"text-slate-500 mb-2",children:"Polynomial Pโ‚™(x):"}),e.jsxs("div",{className:"break-words text-cyan-200/80",children:[c==="exp"&&"1 + x + xยฒ/2! + xยณ/3! + ...",c==="cos"&&"1 - xยฒ/2! + xโด/4! - ...",c==="sin"&&"x - xยณ/3! + xโต/5! - ..."]})]})]}),e.jsxs("div",{className:"lg:col-span-8 bg-slate-900 rounded-2xl border border-slate-700 relative overflow-hidden shadow-2xl flex flex-col",children:[e.jsxs("div",{className:"p-4 border-b border-slate-800 flex justify-between items-center z-10 bg-slate-900/90",children:[e.jsxs("h3",{className:"font-bold text-slate-300 flex items-center gap-2",children:[e.jsx(y,{size:18,className:"text-purple-400"})," Approximation Visualizer"]}),e.jsxs("div",{className:"flex gap-4 text-xs font-mono",children:[e.jsxs("span",{className:"text-slate-500 flex items-center gap-1",children:[e.jsx("div",{className:"w-3 h-1 bg-slate-500"})," Exact f(x)"]}),e.jsxs("span",{className:"text-cyan-400 flex items-center gap-1",children:[e.jsx("div",{className:"w-3 h-1 bg-cyan-400"})," Approx Pโ‚™(x)"]})]})]}),e.jsx("div",{className:"relative flex-1 w-full h-full",children:e.jsxs("svg",{viewBox:`0 0 ${i} ${o}`,className:"w-full h-full",children:[e.jsx("line",{x1:i/2,y1:0,x2:i/2,y2:o,stroke:"#475569",strokeWidth:"1"}),e.jsx("line",{x1:0,y1:o/2,x2:i,y2:o/2,stroke:"#475569",strokeWidth:"1"}),e.jsx("path",{d:f(!1),fill:"none",stroke:"#64748b",strokeWidth:"4",opacity:"0.4"}),e.jsx(w.path,{d:f(!0),fill:"none",stroke:m.color,strokeWidth:"3",initial:!1,transition:{type:"spring",bounce:0,duration:.5}})]})})]})]})]})};export{M as TaylorSeriesView}; diff --git a/site/assets/Text-BaglAl3o.js b/site/assets/Text-BaglAl3o.js new file mode 100644 index 0000000..900e3c6 --- /dev/null +++ b/site/assets/Text-BaglAl3o.js @@ -0,0 +1,217 @@ +import{_ as Sn}from"./extends-CF3RwP-h.js";import{r as qe}from"./index-DJrAq1Rk.js";import{t as Tn,v as wn,w as kn,U as Fn,x as Cn,n as pt,y as Dn,a as Nr,V as gt,q as An,c as Ir,I as En,l as Mn,B as nn,z as Gn,E as Rn,G as Wt,H as On,o as zt,D as Ln,P as mt,h as Bn}from"./react-three-fiber.esm-DbvaK_kO.js";const Pn=u=>typeof u=="object"&&typeof u.then=="function",Rr=[];function In(u,t,d=(c,r)=>c===r){if(u===t)return!0;if(!u||!t)return!1;const c=u.length;if(t.length!==c)return!1;for(let r=0;r0&&(e.timeout&&clearTimeout(e.timeout),e.timeout=setTimeout(e.remove,c.lifespan)),e.response;if(!d)throw e.promise}const r={keys:t,equal:c.equal,remove:()=>{const e=Rr.indexOf(r);e!==-1&&Rr.splice(e,1)},promise:(Pn(u)?u:u(...t)).then(e=>{r.response=e,c.lifespan&&c.lifespan>0&&(r.timeout=setTimeout(r.remove,c.lifespan))}).catch(e=>r.error=e)};if(Rr.push(r),!d)throw r.promise}const Wn=(u,t,d)=>Nn(u,t,!1,d);function zn(){var u=Object.create(null);function t(r,e){var a=r.id,i=r.name,n=r.dependencies;n===void 0&&(n=[]);var o=r.init;o===void 0&&(o=function(){});var s=r.getTransferables;if(s===void 0&&(s=null),!u[a])try{n=n.map(function(l){return l&&l.isWorkerModule&&(t(l,function(h){if(h instanceof Error)throw h}),l=u[l.id].value),l}),o=c("<"+i+">.init",o),s&&(s=c("<"+i+">.getTransferables",s));var f=null;typeof o=="function"?f=o.apply(void 0,n):console.error("worker module init function failed to rehydrate"),u[a]={id:a,value:f,getTransferables:s},e(f)}catch(l){l&&l.noLog||console.error(l),e(l)}}function d(r,e){var a,i=r.id,n=r.args;(!u[i]||typeof u[i].value!="function")&&e(new Error("Worker module "+i+": not found or its 'init' did not return a function"));try{var o=(a=u[i]).value.apply(a,n);o&&typeof o.then=="function"?o.then(s,function(f){return e(f instanceof Error?f:new Error(""+f))}):s(o)}catch(f){e(f)}function s(f){try{var l=u[i].getTransferables&&u[i].getTransferables(f);(!l||!Array.isArray(l)||!l.length)&&(l=void 0),e(f,l)}catch(h){console.error(h),e(h)}}}function c(r,e){var a=void 0;self.troikaDefine=function(n){return a=n};var i=URL.createObjectURL(new Blob(["/** "+r.replace(/\*/g,"")+` **/ + +troikaDefine( +`+e+` +)`],{type:"application/javascript"}));try{importScripts(i)}catch(n){console.error(n)}return URL.revokeObjectURL(i),delete self.troikaDefine,a}self.addEventListener("message",function(r){var e=r.data,a=e.messageId,i=e.action,n=e.data;try{i==="registerModule"&&t(n,function(o){o instanceof Error?postMessage({messageId:a,success:!1,error:o.message}):postMessage({messageId:a,success:!0,result:{isCallable:typeof o=="function"}})}),i==="callModule"&&d(n,function(o,s){o instanceof Error?postMessage({messageId:a,success:!1,error:o.message}):postMessage({messageId:a,success:!0,result:o},s||void 0)})}catch(o){postMessage({messageId:a,success:!1,error:o.stack})}})}function jn(u){var t=function(){for(var d=[],c=arguments.length;c--;)d[c]=arguments[c];return t._getInitResult().then(function(r){if(typeof r=="function")return r.apply(void 0,d);throw new Error("Worker module function was called but `init` did not return a callable function")})};return t._getInitResult=function(){var d=u.dependencies,c=u.init;d=Array.isArray(d)?d.map(function(e){return e&&(e=e.onMainThread||e,e._getInitResult&&(e=e._getInitResult())),e}):[];var r=Promise.all(d).then(function(e){return c.apply(null,e)});return t._getInitResult=function(){return r},r},t}var an=function(){var u=!1;if(typeof window<"u"&&typeof window.document<"u")try{var t=new Worker(URL.createObjectURL(new Blob([""],{type:"application/javascript"})));t.terminate(),u=!0}catch(d){console.log("Troika createWorkerModule: web workers not allowed; falling back to main thread execution. Cause: ["+d.message+"]")}return an=function(){return u},u},Vn=0,Xn=0,ft=!1,br=Object.create(null),Ur=Object.create(null),ct=Object.create(null);function ir(u){if((!u||typeof u.init!="function")&&!ft)throw new Error("requires `options.init` function");var t=u.dependencies,d=u.init,c=u.getTransferables,r=u.workerId,e=jn(u);r==null&&(r="#default");var a="workerModule"+ ++Vn,i=u.name||a,n=null;t=t&&t.map(function(s){return typeof s=="function"&&!s.workerModuleData&&(ft=!0,s=ir({workerId:r,name:"<"+i+"> function dependency: "+s.name,init:`function(){return ( +`+Br(s)+` +)}`}),ft=!1),s&&s.workerModuleData&&(s=s.workerModuleData),s});function o(){for(var s=[],f=arguments.length;f--;)s[f]=arguments[f];if(!an())return e.apply(void 0,s);if(!n){n=jt(r,"registerModule",o.workerModuleData);var l=function(){n=null,Ur[r].delete(l)};(Ur[r]||(Ur[r]=new Set)).add(l)}return n.then(function(h){var p=h.isCallable;if(p)return jt(r,"callModule",{id:a,args:s});throw new Error("Worker module function was called but `init` did not return a callable function")})}return o.workerModuleData={isWorkerModule:!0,id:a,name:i,dependencies:t,init:Br(d),getTransferables:c&&Br(c)},o.onMainThread=e,o}function Hn(u){Ur[u]&&Ur[u].forEach(function(t){t()}),br[u]&&(br[u].terminate(),delete br[u])}function Br(u){var t=u.toString();return!/^function/.test(t)&&/^\w+\s*\(/.test(t)&&(t="function "+t),t}function Yn(u){var t=br[u];if(!t){var d=Br(zn);t=br[u]=new Worker(URL.createObjectURL(new Blob(["/** Worker Module Bootstrap: "+u.replace(/\*/g,"")+` **/ + +;(`+d+")()"],{type:"application/javascript"}))),t.onmessage=function(c){var r=c.data,e=r.messageId,a=ct[e];if(!a)throw new Error("WorkerModule response with empty or unknown messageId");delete ct[e],a(r)}}return t}function jt(u,t,d){return new Promise(function(c,r){var e=++Xn;ct[e]=function(a){a.success?c(a.result):r(new Error("Error in worker "+t+" call: "+a.error))},Yn(u).postMessage({messageId:e,action:t,data:d})})}function on(){var u=(function(t){function d(B,G,v,b,T,D,_,N){var E=1-_;N.x=E*E*B+2*E*_*v+_*_*T,N.y=E*E*G+2*E*_*b+_*_*D}function c(B,G,v,b,T,D,_,N,E,P){var H=1-E;P.x=H*H*H*B+3*H*H*E*v+3*H*E*E*T+E*E*E*_,P.y=H*H*H*G+3*H*H*E*b+3*H*E*E*D+E*E*E*N}function r(B,G){for(var v=/([MLQCZ])([^MLQCZ]*)/g,b,T,D,_,N;b=v.exec(B);){var E=b[2].replace(/^\s*|\s*$/g,"").split(/[,\s]+/).map(function(P){return parseFloat(P)});switch(b[1]){case"M":_=T=E[0],N=D=E[1];break;case"L":(E[0]!==_||E[1]!==N)&&G("L",_,N,_=E[0],N=E[1]);break;case"Q":{G("Q",_,N,_=E[2],N=E[3],E[0],E[1]);break}case"C":{G("C",_,N,_=E[4],N=E[5],E[0],E[1],E[2],E[3]);break}case"Z":(_!==T||N!==D)&&G("L",_,N,T,D);break}}}function e(B,G,v){v===void 0&&(v=16);var b={x:0,y:0};r(B,function(T,D,_,N,E,P,H,$,V){switch(T){case"L":G(D,_,N,E);break;case"Q":{for(var W=D,pe=_,ue=1;ue0;)ne[oe]=arguments[oe+2];var le=q[be]||(q[be]=v.getUniformLocation(L,be));v["uniform"+Y].apply(v,[le].concat(ne))},setAttribute:function(Y,be,ne,oe,le){var de=re[Y];de||(de=re[Y]={buf:v.createBuffer(),loc:v.getAttribLocation(L,Y),data:null}),v.bindBuffer(v.ARRAY_BUFFER,de.buf),v.vertexAttribPointer(de.loc,be,v.FLOAT,!1,0,0),v.enableVertexAttribArray(de.loc),T?v.vertexAttribDivisor(de.loc,oe):H("ANGLE_instanced_arrays").vertexAttribDivisorANGLE(de.loc,oe),le!==de.data&&(v.bufferData(v.ARRAY_BUFFER,le,ne),de.data=le)}})}}}_[Q].transaction(j)},W=function(Q,ee){E++;try{v.activeTexture(v.TEXTURE0+E);var se=N[Q];se||(se=N[Q]=v.createTexture(),v.bindTexture(v.TEXTURE_2D,se),v.texParameteri(v.TEXTURE_2D,v.TEXTURE_MIN_FILTER,v.NEAREST),v.texParameteri(v.TEXTURE_2D,v.TEXTURE_MAG_FILTER,v.NEAREST)),v.bindTexture(v.TEXTURE_2D,se),ee(se,E)}finally{E--}},pe=function(Q,ee,se){var j=v.createFramebuffer();P.push(j),v.bindFramebuffer(v.FRAMEBUFFER,j),v.activeTexture(v.TEXTURE0+ee),v.bindTexture(v.TEXTURE_2D,Q),v.framebufferTexture2D(v.FRAMEBUFFER,v.COLOR_ATTACHMENT0,v.TEXTURE_2D,Q,0);try{se(j)}finally{v.deleteFramebuffer(j),v.bindFramebuffer(v.FRAMEBUFFER,P[--P.length-1]||null)}},ue=function(){D={},_={},N={},E=-1,P.length=0};var T=typeof WebGL2RenderingContext<"u"&&v instanceof WebGL2RenderingContext,D={},_={},N={},E=-1,P=[];v.canvas.addEventListener("webglcontextlost",function(Q){ue(),Q.preventDefault()},!1),n.set(v,b={gl:v,isWebGL2:T,getExtension:H,withProgram:V,withTexture:W,withTextureFramebuffer:pe,handleContextLoss:ue})}G(b)}function f(B,G,v,b,T,D,_,N){_===void 0&&(_=15),N===void 0&&(N=null),s(B,function(E){var P=E.gl,H=E.withProgram,$=E.withTexture;$("copy",function(V,W){P.texImage2D(P.TEXTURE_2D,0,P.RGBA,T,D,0,P.RGBA,P.UNSIGNED_BYTE,G),H("copy",a,i,function(pe){var ue=pe.setUniform,Q=pe.setAttribute;Q("aUV",2,P.STATIC_DRAW,0,new Float32Array([0,0,2,0,0,2])),ue("1i","image",W),P.bindFramebuffer(P.FRAMEBUFFER,N||null),P.disable(P.BLEND),P.colorMask(_&8,_&4,_&2,_&1),P.viewport(v,b,T,D),P.scissor(v,b,T,D),P.drawArrays(P.TRIANGLES,0,3)})})})}function l(B,G,v){var b=B.width,T=B.height;s(B,function(D){var _=D.gl,N=new Uint8Array(b*T*4);_.readPixels(0,0,b,T,_.RGBA,_.UNSIGNED_BYTE,N),B.width=G,B.height=v,f(_,N,0,0,b,T)})}var h=Object.freeze({__proto__:null,withWebGLContext:s,renderImageData:f,resizeWebGLCanvasWithoutClearing:l});function p(B,G,v,b,T,D){D===void 0&&(D=1);var _=new Uint8Array(B*G),N=b[2]-b[0],E=b[3]-b[1],P=[];e(v,function(Q,ee,se,j){P.push({x1:Q,y1:ee,x2:se,y2:j,minX:Math.min(Q,se),minY:Math.min(ee,j),maxX:Math.max(Q,se),maxY:Math.max(ee,j)})}),P.sort(function(Q,ee){return Q.maxX-ee.maxX});for(var H=0;Hq.minX&&ee-jq.minY){var L=O(Q,ee,q.x1,q.y1,q.x2,q.y2);Lee!=re.y2>ee&&Q<(re.x2-re.x1)*(ee-re.y1)/(re.y2-re.y1)+re.x1;q&&(se+=re.y1p.y!=seg.w>p.y)&&(p.x<(seg.z-seg.x)*(p.y-seg.y)/(seg.w-seg.y)+seg.x);bool crossingUp=crossing&&vLineSegment.y1,1e>2,u>2,2wt>1,1>1,1ge>1,1wp>1,1j>1,f>1,hm>1,1>1,u>1,u6>1,1>1,+5,28>1,w>1,1>1,+3,b8>1,1>1,+3,1>3,-1>-1,3>1,1>1,+2,1s>1,1>1,x>1,th>1,1>1,+2,db>1,1>1,+3,3>1,1>1,+2,14qm>1,1>1,+1,4q>1,1e>2,u>2,2>1,+1",canonical:"6f1>-6dx,6dy>-6dx,6ec>-6ed,6ee>-6ed,6ww>2jj,-2ji>2jj,14r4>-1e7l,1e7m>-1e7l,1e7m>-1e5c,1e5d>-1e5b,1e5c>-14qx,14qy>-14qx,14vn>-1ecg,1ech>-1ecg,1edu>-1ecg,1eci>-1ecg,1eda>-1ecg,1eci>-1ecg,1eci>-168q,168r>-168q,168s>-14ye,14yf>-14ye"};function g(j,re){var q=36,L=0,he=new Map,K=re&&new Map,ae;return j.split(",").forEach(function Y(be){if(be.indexOf("+")!==-1)for(var ne=+be;ne--;)Y(ae);else{ae=be;var oe=be.split(">"),le=oe[0],de=oe[1];le=String.fromCodePoint(L+=parseInt(le,q)),de=String.fromCodePoint(L+=parseInt(de,q)),he.set(le,de),re&&K.set(de,le)}}),{map:he,reverseMap:K}}var m,O,S;function F(){if(!m){var j=g(p.pairs,!0),re=j.map,q=j.reverseMap;m=re,O=q,S=g(p.canonical,!1).map}}function U(j){return F(),m.get(j)||null}function w(j){return F(),O.get(j)||null}function R(j){return F(),S.get(j)||null}var x=c.L,C=c.R,I=c.EN,M=c.ES,J=c.ET,y=c.AN,A=c.CS,k=c.B,X=c.S,z=c.ON,Z=c.BN,te=c.NSM,B=c.AL,G=c.LRO,v=c.RLO,b=c.LRE,T=c.RLE,D=c.PDF,_=c.LRI,N=c.RLI,E=c.FSI,P=c.PDI;function H(j,re){for(var q=125,L=new Uint32Array(j.length),he=0;he0)Ce--;else if(Oe>0){for(Te=0;!me[me.length-1]._isolate;)me.pop();var ye=me[me.length-1]._isolInitIndex;ye!=null&&(be.set(ye,Se),be.set(Se,ye)),me.pop(),Oe--}fe=me[me.length-1],Y[Se]=fe._level,fe._override&&ae(Se,fe._override)}else ce&D?(Ce===0&&(Te>0?Te--:!fe._isolate&&me.length>1&&(me.pop(),fe=me[me.length-1])),Y[Se]=fe._level):ce&k&&(Y[Se]=oe.level);else Y[Se]=fe._level,fe._override&&ce!==Z&&ae(Se,fe._override)}for(var De=[],we=null,ve=oe.start;ve<=oe.end;ve++){var ke=L[ve];if(!(ke&n)){var Ge=Y[ve],Me=ke&e,Ae=ke===P;we&&Ge===we._level?(we._end=ve,we._endsWithIsolInit=Me):De.push(we={_start:ve,_end:ve,_level:Ge,_startsWithPDI:Ae,_endsWithIsolInit:Me})}}for(var Ie=[],He=0;He=0;_r--)if(!(L[_r]&n)){Ut=Y[_r];break}var jr=Re[Re.length-1],yn=Y[jr],_t=oe.level;if(!(L[jr]&e)){for(var xr=jr+1;xr<=oe.end;xr++)if(!(L[xr]&n)){_t=Y[xr];break}}Ie.push({_seqIndices:Re,_sosType:Math.max(Ut,mn)%2?C:x,_eosType:Math.max(_t,yn)%2?C:x})}}for(var Vr=0;Vr=0;Tr--)if(!(L[ie[Tr]]&n)){Hr=L[ie[Tr]];break}ae(xt,Hr&(e|P)?z:Hr)}}if(K.get(I))for(var wr=0;wr=-1;kr--){var Tt=kr===-1?sr:L[ie[kr]];if(Tt&a){Tt===B&&ae(St,y);break}}}if(K.get(B))for(var Yr=0;Yr=0&&(tr=L[ie[Qr]],!!(tr&n));Qr--);for(var Zr=fr+1;Zr=0&&L[ie[Fr]]&(J|n);Fr--)ae(ie[Fr],I);for(ze++;ze=0&&L[ie[Cr]]&n;Cr--)ae(ie[Cr],z);for(var Dr=lr+1;Dr=0;hr--){var et=nr[hr].char;if(et===At||et===w(R(cr))||U(R(et))===cr){Ar.push([nr[hr].seqIndex,ar]),nr.length=hr;break}}}Ar.sort(function(Le,We){return Le[0]-We[0]})}for(var rt=0;rt=0;at--){var Ot=ie[at];if(L[Ot]&Dt){var Lt=L[Ot]&ur?C:x;Lt!==rr?Ne=Lt:Ne=rr;break}}}if(Ne){if(L[ie[Er]]=L[ie[tt]]=Ne,Ne!==rr){for(var dr=Er+1;dr=0;pr--)if(L[ie[pr]]&n)Bt=pr;else{it=L[ie[pr]]&ur?C:x;break}for(var Pt=bn,gr=Je+1;gr=0&&l(j[Gr])&o;Gr--)Y[Gr]=oe.level}}return{levels:Y,paragraphs:ne};function It(Le,We){for(var Be=Le;Be=Y&&l(j[oe])&o;oe--)ne[oe]=ae.level;for(var le=ae.level,de=1/0,xe=0;xele&&(le=Fe),Fe=de;ge--)for(var me=0;me=ge){for(var fe=me;me+1=ge;)me++;me>fe&&K.push([fe+Y,me+Y])}}}),K}function ee(j,re,q,L){var he=se(j,re,q,L),K=[].concat(j);return he.forEach(function(ae,Y){K[Y]=(re.levels[ae]&1?pe(j[ae]):null)||j[ae]}),K.join("")}function se(j,re,q,L){for(var he=Q(j,re,q,L),K=[],ae=0;ae/gm;function d(c,r){let e=Cn[r];return e?ht(e):c}return u.replace(t,d)}const Ee=[];for(let u=0;u<256;u++)Ee[u]=(u<16?"0":"")+u.toString(16);function Kn(){const u=Math.random()*4294967295|0,t=Math.random()*4294967295|0,d=Math.random()*4294967295|0,c=Math.random()*4294967295|0;return(Ee[u&255]+Ee[u>>8&255]+Ee[u>>16&255]+Ee[u>>24&255]+"-"+Ee[t&255]+Ee[t>>8&255]+"-"+Ee[t>>16&15|64]+Ee[t>>24&255]+"-"+Ee[d&63|128]+Ee[d>>8&255]+"-"+Ee[d>>16&255]+Ee[d>>24&255]+Ee[c&255]+Ee[c>>8&255]+Ee[c>>16&255]+Ee[c>>24&255]).toUpperCase()}const $e=Object.assign||function(){let u=arguments[0];for(let t=1,d=arguments.length;tu.type,set:o=>{u.type=o}},isDerivedFrom:{writable:!0,configurable:!0,value:function(o){const s=this.baseMaterial;return o===s||s.isDerivedMaterial&&s.isDerivedFrom(o)||!1}},customProgramCacheKey:{writable:!0,configurable:!0,value:function(){return u.customProgramCacheKey()+"|"+d}},onBeforeCompile:{get(){return e},set(o){this[r]=o}},copy:{writable:!0,configurable:!0,value:function(o){return u.copy.call(this,o),!u.isShaderMaterial&&!u.isDerivedMaterial&&($e(this.extensions,o.extensions),$e(this.defines,o.defines),$e(this.uniforms,Fn.clone(o.uniforms))),this}},clone:{writable:!0,configurable:!0,value:function(){const o=new u.constructor;return i(o).copy(this)}},getDepthMaterial:{writable:!0,configurable:!0,value:function(){let o=this._depthMaterial;return o||(o=this._depthMaterial=dt(u.isDerivedMaterial?u.getDepthMaterial():new wn({depthPacking:kn}),t),o.defines.IS_DEPTH_MATERIAL="",o.uniforms=this.uniforms),o}},getDistanceMaterial:{writable:!0,configurable:!0,value:function(){let o=this._distanceMaterial;return o||(o=this._distanceMaterial=dt(u.isDerivedMaterial?u.getDistanceMaterial():new Tn,t),o.defines.IS_DISTANCE_MATERIAL="",o.uniforms=this.uniforms),o}},dispose:{writable:!0,configurable:!0,value(){const{_depthMaterial:o,_distanceMaterial:s}=this;o&&o.dispose(),s&&s.dispose(),u.dispose.call(this)}}};return c[d]=a,new a}function qn(u,{vertexShader:t,fragmentShader:d},c,r){let{vertexDefs:e,vertexMainIntro:a,vertexMainOutro:i,vertexTransform:n,fragmentDefs:o,fragmentMainIntro:s,fragmentMainOutro:f,fragmentColorTransform:l,customRewriter:h,timeUniform:p}=c;if(e=e||"",a=a||"",i=i||"",o=o||"",s=s||"",f=f||"",(n||h)&&(t=ht(t)),(l||h)&&(d=d.replace(/^[ \t]*#include <((?:tonemapping|encodings|colorspace|fog|premultiplied_alpha|dithering)_fragment)>/gm,` +//!BEGIN_POST_CHUNK $1 +$& +//!END_POST_CHUNK +`),d=ht(d)),h){let g=h({vertexShader:t,fragmentShader:d});t=g.vertexShader,d=g.fragmentShader}if(l){let g=[];d=d.replace(/^\/\/!BEGIN_POST_CHUNK[^]+?^\/\/!END_POST_CHUNK/gm,m=>(g.push(m),"")),f=`${l} +${g.join(` +`)} +${f}`}if(p){const g=` +uniform float ${p}; +`;e=g+e,o=g+o}return n&&(t=`vec3 troika_position_${r}; +vec3 troika_normal_${r}; +vec2 troika_uv_${r}; +${t} +`,e=`${e} +void troikaVertexTransform${r}(inout vec3 position, inout vec3 normal, inout vec2 uv) { + ${n} +} +`,a=` +troika_position_${r} = vec3(position); +troika_normal_${r} = vec3(normal); +troika_uv_${r} = vec2(uv); +troikaVertexTransform${r}(troika_position_${r}, troika_normal_${r}, troika_uv_${r}); +${a} +`,t=t.replace(/\b(position|normal|uv)\b/g,(g,m,O,S)=>/\battribute\s+vec[23]\s+$/.test(S.substr(0,O))?m:`troika_${m}_${r}`),u.map&&u.map.channel>0||(t=t.replace(/\bMAP_UV\b/g,`troika_uv_${r}`))),t=Ht(t,r,e,a,i),d=Ht(d,r,o,s,f),{vertexShader:t,fragmentShader:d}}function Ht(u,t,d,c,r){return(c||r||d)&&(u=u.replace(sn,` +${d} +void troikaOrigMain${t}() {`),u+=` +void main() { + ${c} + troikaOrigMain${t}(); + ${r} +}`),u}function $n(u,t){return u==="uniforms"?void 0:typeof t=="function"?t.toString():t}let ea=0;const Yt=new Map;function ra(u){const t=JSON.stringify(u,$n);let d=Yt.get(t);return d==null&&Yt.set(t,d=++ea),d}/*! +Custom build of Typr.ts (https://github.com/fredli74/Typr.ts) for use in Troika text rendering. +Original MIT license applies: https://github.com/fredli74/Typr.ts/blob/master/LICENSE +*/function ta(){return typeof window>"u"&&(self.window=self),(function(u){var t={parse:function(r){var e=t._bin,a=new Uint8Array(r);if(e.readASCII(a,0,4)=="ttcf"){var i=4;e.readUshort(a,i),i+=2,e.readUshort(a,i),i+=2;var n=e.readUint(a,i);i+=4;for(var o=[],s=0;s>>a&1)!=0&&e++;return e},t._lctf.readClassDef=function(r,e){var a=t._bin,i=[],n=a.readUshort(r,e);if(e+=2,n==1){var o=a.readUshort(r,e);e+=2;var s=a.readUshort(r,e);e+=2;for(var f=0;f0&&(n.featureParams=i+o);var s=a.readUshort(r,e);e+=2,n.tab=[];for(var f=0;f0&&(n.default=t._lctf.readLangSysTable(r,i+o));var s=a.readUshort(r,e);e+=2;for(var f=0;f255?-1:t.CFF.glyphByUnicode(r,t.CFF.tableSE[e])},t.CFF.readEncoding=function(r,e,a){t._bin;var i=[".notdef"],n=r[e];if(e++,n!=0)throw"error: unknown encoding format: "+n;var o=r[e];e++;for(var s=0;s>4,S=15&m;if(O!=15&&g.push(O),S!=15&&g.push(S),S==15)break}for(var F="",U=[0,1,2,3,4,5,6,7,8,9,".","e","e-","reserved","-","endOfNumber"],w=0;w=o.xMax||o.yMin>=o.yMax)return null;if(o.noc>0){o.endPts=[];for(var s=0;s=1&&s.fmt<=2){l=n.readUshort(r,a),a+=2;var h=n.readUshort(r,a);a+=2;var p=t._lctf.numOfOnes(l),g=t._lctf.numOfOnes(h);if(s.fmt==1){s.pairsets=[];var m=n.readUshort(r,a);a+=2;for(var O=0;O=1&&s.fmt<=2){if(s.fmt==1)s.delta=n.readShort(r,a),a+=2;else if(s.fmt==2){var l=n.readUshort(r,a);a+=2,s.newg=n.readUshorts(r,a,l),a+=2*s.newg.length}}else if(e==2&&s.fmt==1){l=n.readUshort(r,a),a+=2,s.seqs=[];for(var h=0;h>>8;if((p&=15)!=0)throw"unknown kern table format: "+p;e=t.kern.readFormat0(r,e,f)}return f},t.kern.parseV1=function(r,e,a,i){var n=t._bin;n.readFixed(r,e),e+=4;var o=n.readUint(r,e);e+=4;for(var s={glyph1:[],rval:[]},f=0;f>>8;if((h&=15)!=0)throw"unknown kern table format: "+h;e=t.kern.readFormat0(r,e,s)}return s},t.kern.readFormat0=function(r,e,a){var i=t._bin,n=-1,o=i.readUshort(r,e);e+=2,i.readUshort(r,e),e+=2,i.readUshort(r,e),e+=2,i.readUshort(r,e),e+=2;for(var s=0;s=n.map.length?0:n.map[e];if(n.format==4){for(var o=-1,s=0;se?0:65535&(n.idRangeOffset[o]!=0?n.glyphIdArray[e-n.startCount[o]+(n.idRangeOffset[o]>>1)-(n.idRangeOffset.length-o)]:e+n.idDelta[o])}if(n.format==12){if(e>n.groups[n.groups.length-1][1])return 0;for(s=0;s-1?t.U._simpleGlyph(i,a):t.U._compoGlyph(i,e,a))},t.U._simpleGlyph=function(r,e){for(var a=0;an)){for(var m=!0,O=0,S=0;Sn)){for(m=!0,S=0;S>1,o.length=0,f=!0;else if(y=="o3"||y=="o23")o.length%2!=0&&!f&&(l=o.shift()+i.nominalWidthX),s+=o.length>>1,o.length=0,f=!0;else if(y=="o4")o.length>1&&!f&&(l=o.shift()+i.nominalWidthX,f=!0),h&&t.U.P.closePath(n),m+=o.pop(),t.U.P.moveTo(n,g,m),h=!0;else if(y=="o5")for(;o.length>0;)g+=o.shift(),m+=o.shift(),t.U.P.lineTo(n,g,m);else if(y=="o6"||y=="o7")for(var A=o.length,k=y=="o6",X=0;XMath.abs(C-m)?g=x+o.shift():m=C+o.shift(),t.U.P.curveTo(n,O,S,F,U,I,M),t.U.P.curveTo(n,w,R,x,C,g,m));else if(y=="o14"){if(o.length>0&&!f&&(l=o.shift()+a.nominalWidthX,f=!0),o.length==4){var te=o.shift(),B=o.shift(),G=o.shift(),v=o.shift(),b=t.CFF.glyphBySE(a,G),T=t.CFF.glyphBySE(a,v);t.U._drawCFF(a.CharStrings[b],e,a,i,n),e.x=te,e.y=B,t.U._drawCFF(a.CharStrings[T],e,a,i,n)}h&&(t.U.P.closePath(n),h=!1)}else if(y=="o19"||y=="o20")o.length%2!=0&&!f&&(l=o.shift()+i.nominalWidthX),s+=o.length>>1,o.length=0,f=!0,p+=s+7>>3;else if(y=="o21")o.length>2&&!f&&(l=o.shift()+i.nominalWidthX,f=!0),m+=o.pop(),g+=o.pop(),h&&t.U.P.closePath(n),t.U.P.moveTo(n,g,m),h=!0;else if(y=="o22")o.length>1&&!f&&(l=o.shift()+i.nominalWidthX,f=!0),g+=o.pop(),h&&t.U.P.closePath(n),t.U.P.moveTo(n,g,m),h=!0;else if(y=="o25"){for(;o.length>6;)g+=o.shift(),m+=o.shift(),t.U.P.lineTo(n,g,m);O=g+o.shift(),S=m+o.shift(),F=O+o.shift(),U=S+o.shift(),g=F+o.shift(),m=U+o.shift(),t.U.P.curveTo(n,O,S,F,U,g,m)}else if(y=="o26")for(o.length%2&&(g+=o.shift());o.length>0;)O=g,S=m+o.shift(),g=F=O+o.shift(),m=(U=S+o.shift())+o.shift(),t.U.P.curveTo(n,O,S,F,U,g,m);else if(y=="o27")for(o.length%2&&(m+=o.shift());o.length>0;)S=m,F=(O=g+o.shift())+o.shift(),U=S+o.shift(),g=F+o.shift(),m=U,t.U.P.curveTo(n,O,S,F,U,g,m);else if(y=="o10"||y=="o29"){var D=y=="o10"?i:a;if(o.length==0)console.debug("error: empty stack");else{var _=o.pop(),N=D.Subrs[_+D.Bias];e.x=g,e.y=m,e.nStems=s,e.haveWidth=f,e.width=l,e.open=h,t.U._drawCFF(N,e,a,i,n),g=e.x,m=e.y,s=e.nStems,f=e.haveWidth,l=e.width,h=e.open}}else if(y=="o30"||y=="o31"){var E=o.length,P=(Z=0,y=="o31");for(Z+=E-(A=-3&E);Z>>1|(21845&h)<<1;p=(61680&(p=(52428&p)>>>2|(13107&p)<<2))>>>4|(3855&p)<<4,l[h]=((65280&p)>>>8|(255&p)<<8)>>>1}var g=function(y,A,k){for(var X=y.length,z=0,Z=new d(A);z>>G]=v}return te},m=new t(288);for(h=0;h<144;++h)m[h]=8;for(h=144;h<256;++h)m[h]=9;for(h=256;h<280;++h)m[h]=7;for(h=280;h<288;++h)m[h]=8;var O=new t(32);for(h=0;h<32;++h)O[h]=5;var S=g(m,9),F=g(O,5),U=function(y){for(var A=y[0],k=1;kA&&(A=y[k]);return A},w=function(y,A,k){var X=A/8|0;return(y[X]|y[X+1]<<8)>>(7&A)&k},R=function(y,A){var k=A/8|0;return(y[k]|y[k+1]<<8|y[k+2]<<16)>>(7&A)},x=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],C=function(y,A,k){var X=new Error(A||x[y]);if(X.code=y,Error.captureStackTrace&&Error.captureStackTrace(X,C),!k)throw X;return X},I=function(y,A,k){var X=y.length;if(!X||k&&!k.l&&X<5)return A||new t(0);var z=!A||k,Z=!k||k.i;k||(k={}),A||(A=new t(3*X));var te,B=function(fe){var Ce=A.length;if(fe>Ce){var Te=new t(Math.max(2*Ce,fe));Te.set(A),A=Te}},G=k.f||0,v=k.p||0,b=k.b||0,T=k.l,D=k.d,_=k.m,N=k.n,E=8*X;do{if(!T){k.f=G=w(y,v,1);var P=w(y,v+1,3);if(v+=3,!P){var H=y[(q=((te=v)/8|0)+(7&te&&1)+4)-4]|y[q-3]<<8,$=q+H;if($>X){Z&&C(0);break}z&&B(b+H),A.set(y.subarray(q,$),b),k.b=b+=H,k.p=v=8*$;continue}if(P==1)T=S,D=F,_=9,N=5;else if(P==2){var V=w(y,v,31)+257,W=w(y,v+10,15)+4,pe=V+w(y,v+5,31)+1;v+=14;for(var ue=new t(pe),Q=new t(19),ee=0;ee>>4)<16)ue[ee++]=q;else{var he=0,K=0;for(q==16?(K=3+w(y,v,3),v+=2,he=ue[ee-1]):q==17?(K=3+w(y,v,7),v+=3):q==18&&(K=11+w(y,v,127),v+=7);K--;)ue[ee++]=he}}var ae=ue.subarray(0,V),Y=ue.subarray(V);_=U(ae),N=U(Y),T=g(ae,_),D=g(Y,N)}else C(1);if(v>E){Z&&C(0);break}}z&&B(b+131072);for(var be=(1<<_)-1,ne=(1<>>4;if((v+=15&he)>E){Z&&C(0);break}if(he||C(2),le<256)A[b++]=le;else{if(le==256){oe=v,T=null;break}var de=le-254;if(le>264){var xe=r[ee=le-257];de=w(y,v,(1<>>4;if(Fe||C(3),v+=15&Fe,Y=f[ge],ge>3&&(xe=e[ge],Y+=R(y,v)&(1<E){Z&&C(0);break}z&&B(b+131072);for(var me=b+de;bfe.length)&&(Te=fe.length);var Oe=new(fe instanceof d?d:fe instanceof c?c:t)(Te-Ce);return Oe.set(fe.subarray(Ce,Te)),Oe})(A,0,b)},M=new t(0),J=typeof TextDecoder<"u"&&new TextDecoder;try{J.decode(M,{stream:!0})}catch{}return u.convert_streams=function(y){var A=new DataView(y),k=0;function X(){var V=A.getUint16(k);return k+=2,V}function z(){var V=A.getUint32(k);return k+=4,V}function Z(V){H.setUint16($,V),$+=2}function te(V){H.setUint32($,V),$+=4}for(var B={signature:z(),flavor:z(),length:z(),numTables:X(),reserved:X(),totalSfntSize:z(),majorVersion:X(),minorVersion:X(),metaOffset:z(),metaLength:z(),metaOrigLength:z(),privOffset:z(),privLength:z()},G=0;Math.pow(2,G)<=B.numTables;)G++;G--;for(var v=16*Math.pow(2,G),b=16*B.numTables-v,T=12,D=[],_=0;_{let[y,A]=J.split("+");y=parseInt(y,36),A=A?parseInt(A,36):0,s.set(M+=y,C[I]);for(let k=A;k--;)s.set(++M,C[I])})}}return s.get(x)||o}const l=1,h=2,p=3,g=4,m=[null,"isol","init","fina","medi"];function O(x){const C=new Uint8Array(x.length);let I=o,M=l,J=-1;for(let y=0;y65535&&y++)}return C}function S(x,C){const I=[];for(let J=0;J65535&&J++,I.push(u.U.codeToGlyph(x,y))}const M=x.GSUB;if(M){const{lookupList:J,featureList:y}=M;let A;const k=/^(rlig|liga|mset|isol|init|fina|medi|half|pres|blws|ccmp)$/,X=[];y.forEach(z=>{if(k.test(z.tag))for(let Z=0;Z=0;X--)if(C[X]!==-1&&(!k||k(C[X])))return X;return-1}function y(k){return U(x,k)===1}function A(k,X){for(let z=0;z<3;z++)I[X*3+z]+=k[z]||0}}function U(x,C){const I=x.GDEF&&x.GDEF.glyphClassDef;return I?u.U._getGlyphClass(C,I):0}function w(...x){for(let C=0;C0},forEachGlyph(k,X,z,Z){let te=0;const B=1/A.unitsPerEm*X,G=S(x,k);let v=0;const b=F(x,G);return G.forEach((T,D)=>{if(T!==-1){let _=C[T];if(!_){const{cmds:N,crds:E}=u.U.glyphToPath(x,T);let P="",H=0;for(let ue=0,Q=N.length;ue1?",":"")+E[H++]}let $,V,W,pe;if(E.length){$=V=1/0,W=pe=-1/0;for(let ue=0,Q=E.length;ueW&&(W=ee),se>pe&&(pe=se)}}else $=W=V=pe=0;_=C[T]={index:T,advanceWidth:x.hmtx.aWidth[T],xMin:$,yMin:V,xMax:W,yMax:pe,path:P}}Z.call(null,_,te+b[D*3]*B,b[D*3+1]*B,v),te+=b[D*3+2]*B,z&&(te+=z*X)}v+=k.codePointAt(v)>65535?2:1}),te}};return A}return function(C){const I=new Uint8Array(C,0,4),M=u._bin.readASCII(I,0,4);if(M==="wOFF")C=t(C);else if(M==="wOF2")throw new Error("woff2 fonts not supported");return R(u.parse(C)[0])}}const oa=ir({name:"Typr Font Parser",dependencies:[ta,na,aa],init(u,t,d){const c=u(),r=t();return d(c,r)}});/*! +Custom bundle of @unicode-font-resolver/client v1.0.2 (https://github.com/lojjic/unicode-font-resolver) +for use in Troika text rendering. +Original MIT license applies +*/function ia(){return(function(u){var t=function(){this.buckets=new Map};t.prototype.add=function(F){var U=F>>5;this.buckets.set(U,(this.buckets.get(U)||0)|1<<(31&F))},t.prototype.has=function(F){var U=this.buckets.get(F>>5);return U!==void 0&&(U&1<<(31&F))!=0},t.prototype.serialize=function(){var F=[];return this.buckets.forEach((function(U,w){F.push((+w).toString(36)+":"+U.toString(36))})),F.join(",")},t.prototype.deserialize=function(F){var U=this;this.buckets.clear(),F.split(",").forEach((function(w){var R=w.split(":");U.buckets.set(parseInt(R[0],36),parseInt(R[1],36))}))};var d=Math.pow(2,8),c=d-1,r=~c;function e(F){var U=(function(R){return R&r})(F).toString(16),w=(function(R){return(R&r)+d-1})(F).toString(16);return"codepoint-index/plane"+(F>>16)+"/"+U+"-"+w+".json"}function a(F,U){var w=F&c,R=U.codePointAt(w/6|0);return((R=(R||48)-48)&1<65535&&(v++,G=v)},G=0;G65535&&(T++,b=T)},b=0;b65535&&(T++,y[T]=y[T-1])}return{fontUrls:Array.from(J.keys()),chars:y}}))},Object.defineProperty(u,"__esModule",{value:!0}),u})({})}function sa(u,t){const d=Object.create(null),c=Object.create(null);function r(a,i){const n=o=>{console.error(`Failure loading font ${a}`,o)};try{const o=new XMLHttpRequest;o.open("get",a,!0),o.responseType="arraybuffer",o.onload=function(){if(o.status>=400)n(new Error(o.statusText));else if(o.status>0)try{const s=u(o.response);s.src=a,i(s)}catch(s){n(s)}},o.onerror=n,o.send()}catch(o){n(o)}}function e(a,i){let n=d[a];n?i(n):c[a]?c[a].push(i):(c[a]=[i],r(a,o=>{o.src=a,d[a]=o,c[a].forEach(s=>s(o)),delete c[a]}))}return function(a,i,{lang:n,fonts:o=[],style:s="normal",weight:f="normal",unicodeFontsURL:l}={}){const h=new Uint8Array(a.length),p=[];a.length||S();const g=new Map,m=[];if(s!=="italic"&&(s="normal"),typeof f!="number"&&(f=f==="bold"?700:400),o&&!Array.isArray(o)&&(o=[o]),o=o.slice().filter(U=>!U.lang||U.lang.test(n)).reverse(),o.length){let x=0;(function C(I=0){for(let M=I,J=a.length;M0&&/\s/.test(a[M]))h[M]=h[M-1],x===2&&(m[m.length-1][1]=M);else for(let A=h[M],k=o.length;A<=k;A++)if(A===k){const X=x===2?m[m.length-1]:m[m.length]=[M,M];X[1]=M,x=2}else{h[M]=A;const{src:X,unicodeRange:z}=o[A];if(!z||F(y,z)){const Z=d[X];if(!Z){e(X,()=>{C(M)});return}if(Z.supportsCodePoint(y)){let te=g.get(Z);typeof te!="number"&&(te=p.length,p.push(Z),g.set(Z,te)),h[M]=te,x=1;break}}}y>65535&&M+1a.substring(w[0],w[1]+1)).join(` +`);t.getFontsForString(U,{lang:n||void 0,style:s,weight:f,dataUrl:l}).then(({fontUrls:w,chars:R})=>{const x=p.length;let C=0;m.forEach(M=>{for(let J=0,y=M[1]-M[0];J<=y;J++)h[M[0]+J]=R[C++]+x;C++});let I=0;w.forEach((M,J)=>{e(M,y=>{p[J+x]=y,++I===w.length&&S()})})})}else S()}function S(){i({chars:h,fonts:p})}function F(U,w){for(let R=0;R{let I,M;const J=[];for(let y=0;y-1&&(console.info("Typesetter: got text with \\r chars; normalizing to \\n"),p=p.replace(/\r\n/g,` +`).replace(/\r/g,` +`)),S=+S,w=+w,x=+x,R=R||"normal",M=+M,a({text:p,lang:m,style:U,weight:F,fonts:typeof g=="string"?[{src:g}]:g,unicodeFontsURL:z,preResolvedFonts:Z},D=>{T.fontLoad=f()-b;const _=isFinite(x);let N=null,E=null,P=null,H=null,$=null,V=null,W=null,pe=null,ue=0,Q=0,ee=J!=="nowrap";const se=new Map,j=f();let re=M,q=0,L=new l;const he=[L];D.forEach(ne=>{const{fontObj:oe}=ne,{ascender:le,descender:de,unitsPerEm:xe,lineGap:Fe,capHeight:ge,xHeight:me}=oe;let fe=se.get(oe);if(!fe){const ce=S/xe,Ue=R==="normal"?(le-de+Fe)*ce:R*S,Xe=(Ue-(le-de)*ce)/2,_e=Math.min(Ue,(le-de)*ce),ye=(le+de)/2*ce+_e/2;fe={index:se.size,src:oe.src,fontObj:oe,fontSizeMult:ce,unitsPerEm:xe,ascender:le*ce,descender:de*ce,capHeight:ge*ce,xHeight:me*ce,lineHeight:Ue,baseline:-Xe-le*ce,caretTop:ye,caretBottom:ye-_e},se.set(oe,fe)}const{fontSizeMult:Ce}=fe,Te=p.slice(ne.start,ne.end+1);let Oe,Se;oe.forEachGlyph(Te,S,w,(ce,Ue,Xe,_e)=>{Ue+=q,_e+=ne.start,Oe=Ue,Se=ce;const ye=p.charAt(_e),De=ce.advanceWidth*Ce,we=L.count;let ve;if("isEmpty"in ce||(ce.isWhitespace=!!ye&&new RegExp(r).test(ye),ce.canBreakAfter=!!ye&&e.test(ye),ce.isEmpty=ce.xMin===ce.xMax||ce.yMin===ce.yMax||c.test(ye)),!ce.isWhitespace&&!ce.isEmpty&&Q++,ee&&_&&!ce.isWhitespace&&Ue+De+re>x&&we){if(L.glyphAt(we-1).glyphObj.canBreakAfter)ve=new l,re=-Ue;else for(let Ge=we;Ge--;)if(Ge===0&&y==="break-word"){ve=new l,re=-Ue;break}else if(L.glyphAt(Ge).glyphObj.canBreakAfter){ve=L.splitAt(Ge+1);const Me=ve.glyphAt(0).x;re-=Me;for(let Ae=ve.count;Ae--;)ve.glyphAt(Ae).x-=Me;break}ve&&(L.isSoftWrapped=!0,L=ve,he.push(L),ue=x)}let ke=L.glyphAt(L.count);ke.glyphObj=ce,ke.x=Ue+re,ke.y=Xe,ke.width=De,ke.charIndex=_e,ke.fontData=fe,ye===` +`&&(L=new l,he.push(L),re=-(Ue+De+w*S)+M)}),q=Oe+Se.advanceWidth*Ce+w*S});let K=0;he.forEach(ne=>{let oe=!0;for(let le=ne.count;le--;){const de=ne.glyphAt(le);oe&&!de.glyphObj.isWhitespace&&(ne.width=de.x+de.width,ne.width>ue&&(ue=ne.width),oe=!1);let{lineHeight:xe,capHeight:Fe,xHeight:ge,baseline:me}=de.fontData;xe>ne.lineHeight&&(ne.lineHeight=xe);const fe=me-ne.baseline;fe<0&&(ne.baseline+=fe,ne.cap+=fe,ne.ex+=fe),ne.cap=Math.max(ne.cap,ne.baseline+Fe),ne.ex=Math.max(ne.ex,ne.baseline+ge)}ne.baseline-=K,ne.cap-=K,ne.ex-=K,K+=ne.lineHeight});let ae=0,Y=0;if(A&&(typeof A=="number"?ae=-A:typeof A=="string"&&(ae=-ue*(A==="left"?0:A==="center"?.5:A==="right"?1:o(A)))),k&&(typeof k=="number"?Y=-k:typeof k=="string"&&(Y=k==="top"?0:k==="top-baseline"?-he[0].baseline:k==="top-cap"?-he[0].cap:k==="top-ex"?-he[0].ex:k==="middle"?K/2:k==="bottom"?K:k==="bottom-baseline"?-he[he.length-1].baseline:o(k)*K)),!X){const ne=t.getEmbeddingLevels(p,C);N=new Uint16Array(Q),E=new Uint8Array(Q),P=new Float32Array(Q*2),H={},W=[1/0,1/0,-1/0,-1/0],pe=[],te&&(V=new Float32Array(p.length*4)),G&&($=new Uint8Array(Q*3));let oe=0,le=-1,de=-1,xe,Fe;if(he.forEach((ge,me)=>{let{count:fe,width:Ce}=ge;if(fe>0){let Te=0;for(let _e=fe;_e--&&ge.glyphAt(_e).glyphObj.isWhitespace;)Te++;let Oe=0,Se=0;if(I==="center")Oe=(ue-Ce)/2;else if(I==="right")Oe=ue-Ce;else if(I==="justify"&&ge.isSoftWrapped){let _e=0;for(let ye=fe-Te;ye--;)ge.glyphAt(ye).glyphObj.isWhitespace&&_e++;Se=(ue-Ce)/_e}if(Se||Oe){let _e=0;for(let ye=0;ye=ye){let Ge=ke,Me=ke;for(;MeDe)break;MeUe=_e;for(let _e=0;_e1&&s(V,le,Ae),le=ve}if(G){const{charIndex:ve}=ye;for(;ve>de;)de++,G.hasOwnProperty(de)&&(Fe=G[de])}if(!Ue.isWhitespace&&!Ue.isEmpty){const ve=oe++,{fontSizeMult:ke,src:Ge,index:Me}=ye.fontData,Ae=H[Ge]||(H[Ge]={});Ae[De]||(Ae[De]={path:Ue.path,pathBounds:[Ue.xMin,Ue.yMin,Ue.xMax,Ue.yMax]});const Ie=ye.x+ae,He=ye.y+ge.baseline+Y;P[ve*2]=Ie,P[ve*2+1]=He;const je=Ie+Ue.xMin*ke,Ye=He+Ue.yMin*ke,Qe=Ie+Ue.xMax*ke,Ve=He+Ue.yMax*ke;jeW[2]&&(W[2]=Qe),Ve>W[3]&&(W[3]=Ve),ve%B===0&&(xe={start:ve,end:ve,rect:[1/0,1/0,-1/0,-1/0]},pe.push(xe)),xe.end++;const Re=xe.rect;if(jeRe[2]&&(Re[2]=Qe),Ve>Re[3]&&(Re[3]=Ve),N[ve]=De,E[ve]=Me,G){const Ze=ve*3;$[Ze]=Fe>>16&255,$[Ze+1]=Fe>>8&255,$[Ze+2]=Fe&255}}}}}),V){const ge=p.length-le;ge>1&&s(V,le,ge)}}const be=[];se.forEach(({index:ne,src:oe,unitsPerEm:le,ascender:de,descender:xe,lineHeight:Fe,capHeight:ge,xHeight:me})=>{be[ne]={src:oe,unitsPerEm:le,ascender:de,descender:xe,lineHeight:Fe,capHeight:ge,xHeight:me}}),T.typesetting=f()-j,v({glyphIds:N,glyphFontIndices:E,glyphPositions:P,glyphData:H,fontData:be,caretPositions:V,glyphColors:$,chunkedBounds:pe,fontSize:S,topBaseline:Y+he[0].baseline,blockBounds:[ae,Y-K,ae+ue,Y],visibleBounds:W,timings:T})})}function n(p,g){i({...p,metricsOnly:!0},m=>{const[O,S,F,U]=m.blockBounds;g({width:F-O,height:U-S})})}function o(p){let g=p.match(/^([\d.]+)%$/),m=g?parseFloat(g[1]):NaN;return isNaN(m)?0:m/100}function s(p,g,m){const O=p[g*4],S=p[g*4+1],F=p[g*4+2],U=p[g*4+3],w=(S-O)/m;for(let R=0;R(Object.defineProperty(p,g,{get(){return this.data[this.index*h.length+m]},set(S){this.data[this.index*h.length+m]=S}}),p),{data:null,index:0}),{typeset:i,measure:n}}const er=()=>(self.performance||Date).now(),Wr=on();let Jt;function ua(u,t,d,c,r,e,a,i,n,o,s=!0){return s?ha(u,t,d,c,r,e,a,i,n,o).then(null,f=>(Jt||(console.warn("WebGL SDF generation failed, falling back to JS",f),Jt=!0),Qt(u,t,d,c,r,e,a,i,n,o))):Qt(u,t,d,c,r,e,a,i,n,o)}const Pr=[],ca=5;let vt=0;function fn(){const u=er();for(;Pr.length&&er()-unew Promise((t,d)=>{Pr.push(()=>{const c=er();try{Wr.webgl.generateIntoCanvas(...u),t({timing:er()-c})}catch(r){d(r)}}),vt||(vt=setTimeout(fn,0))}),da=4,va=2e3,Kt={};let pa=0;function Qt(u,t,d,c,r,e,a,i,n,o){const s="TroikaTextSDFGenerator_JS_"+pa++%da;let f=Kt[s];return f||(f=Kt[s]={workerModule:ir({name:s,workerId:s,dependencies:[on,er],init(l,h){const p=l().javascript.generate;return function(...g){const m=h();return{textureData:p(...g),timing:h()-m}}},getTransferables(l){return[l.textureData.buffer]}}),requests:0,idleTimer:null}),f.requests++,clearTimeout(f.idleTimer),f.workerModule(u,t,d,c,r,e).then(({textureData:l,timing:h})=>{const p=er(),g=new Uint8Array(l.length*4);for(let m=0;m{Hn(s)},va)),{timing:h}})}function ga(u){u._warm||(Wr.webgl.isSupported(u),u._warm=!0)}const ma=Wr.webglUtils.resizeWebGLCanvasWithoutClearing,yr={unicodeFontsURL:null,sdfGlyphSize:64,sdfMargin:1/16,sdfExponent:9,textureWidth:2048},ya=new Nr;function or(){return(self.performance||Date).now()}const Zt=Object.create(null);function ln(u,t){u=_a({},u);const d=or(),c=[];if(u.font&&c.push({label:"user",src:xa(u.font)}),u.font=c,u.text=""+u.text,u.sdfGlyphSize=u.sdfGlyphSize||yr.sdfGlyphSize,u.unicodeFontsURL=u.unicodeFontsURL||yr.unicodeFontsURL,u.colorRanges!=null){let l={};for(let h in u.colorRanges)if(u.colorRanges.hasOwnProperty(h)){let p=u.colorRanges[h];typeof p!="number"&&(p=ya.set(p).getHex()),l[h]=p}u.colorRanges=l}Object.freeze(u);const{textureWidth:r,sdfExponent:e}=yr,{sdfGlyphSize:a}=u,i=r/a*4;let n=Zt[a];if(!n){const l=document.createElement("canvas");l.width=r,l.height=a*256/i,n=Zt[a]={glyphCount:0,sdfGlyphSize:a,sdfCanvas:l,sdfTexture:new Rn(l,void 0,void 0,void 0,Wt,Wt),contextLost:!1,glyphsByFont:new Map},n.sdfTexture.generateMipmaps=!1,ba(n)}const{sdfTexture:o,sdfCanvas:s}=n;hn(u).then(l=>{const{glyphIds:h,glyphFontIndices:p,fontData:g,glyphPositions:m,fontSize:O,timings:S}=l,F=[],U=new Float32Array(h.length*4);let w=0,R=0;const x=or(),C=g.map(A=>{let k=n.glyphsByFont.get(A.src);return k||n.glyphsByFont.set(A.src,k=new Map),k});h.forEach((A,k)=>{const X=p[k],{src:z,unitsPerEm:Z}=g[X];let te=C[X].get(A);if(!te){const{path:T,pathBounds:D}=l.glyphData[z][A],_=Math.max(D[2]-D[0],D[3]-D[1])/a*(yr.sdfMargin*a+.5),N=n.glyphCount++,E=[D[0]-_,D[1]-_,D[2]+_,D[3]+_];C[X].set(A,te={path:T,atlasIndex:N,sdfViewBox:E}),F.push(te)}const{sdfViewBox:B}=te,G=m[R++],v=m[R++],b=O/Z;U[w++]=G+B[0]*b,U[w++]=v+B[1]*b,U[w++]=G+B[2]*b,U[w++]=v+B[3]*b,h[k]=te.atlasIndex}),S.quads=(S.quads||0)+(or()-x);const I=or();S.sdf={};const M=s.height,J=Math.ceil(n.glyphCount/i),y=Math.pow(2,Math.ceil(Math.log2(J*a)));y>M&&(console.info(`Increasing SDF texture size ${M}->${y}`),ma(s,r,y),o.dispose()),Promise.all(F.map(A=>un(A,n,u.gpuAccelerateSDF).then(({timing:k})=>{S.sdf[A.atlasIndex]=k}))).then(()=>{F.length&&!n.contextLost&&(cn(n),o.needsUpdate=!0),S.sdfTotal=or()-I,S.total=or()-d,t(Object.freeze({parameters:u,sdfTexture:o,sdfGlyphSize:a,sdfExponent:e,glyphBounds:U,glyphAtlasIndices:h,glyphColors:l.glyphColors,caretPositions:l.caretPositions,chunkedBounds:l.chunkedBounds,ascender:l.ascender,descender:l.descender,lineHeight:l.lineHeight,capHeight:l.capHeight,xHeight:l.xHeight,topBaseline:l.topBaseline,blockBounds:l.blockBounds,visibleBounds:l.visibleBounds,timings:l.timings}))})}),Promise.resolve().then(()=>{n.contextLost||ga(s)})}function un({path:u,atlasIndex:t,sdfViewBox:d},{sdfGlyphSize:c,sdfCanvas:r,contextLost:e},a){if(e)return Promise.resolve({timing:-1});const{textureWidth:i,sdfExponent:n}=yr,o=Math.max(d[2]-d[0],d[3]-d[1]),s=Math.floor(t/4),f=s%(i/c)*c,l=Math.floor(s/(i/c))*c,h=t%4;return ua(c,c,u,d,o,n,r,f,l,h,a)}function ba(u){const t=u.sdfCanvas;t.addEventListener("webglcontextlost",d=>{console.log("Context Lost",d),d.preventDefault(),u.contextLost=!0}),t.addEventListener("webglcontextrestored",d=>{console.log("Context Restored",d),u.contextLost=!1;const c=[];u.glyphsByFont.forEach(r=>{r.forEach(e=>{c.push(un(e,u,!0))})}),Promise.all(c).then(()=>{cn(u),u.sdfTexture.needsUpdate=!0})})}function Ua({font:u,characters:t,sdfGlyphSize:d},c){let r=Array.isArray(t)?t.join(` +`):""+t;ln({font:u,sdfGlyphSize:d,text:r},c)}function _a(u,t){for(let d in t)t.hasOwnProperty(d)&&(u[d]=t[d]);return u}let Or;function xa(u){return Or||(Or=typeof document>"u"?{}:document.createElement("a")),Or.href=u,Or.href}function cn(u){if(typeof createImageBitmap!="function"){console.info("Safari<15: applying SDF canvas workaround");const{sdfCanvas:t,sdfTexture:d}=u,{width:c,height:r}=t,e=u.sdfCanvas.getContext("webgl");let a=d.image.data;(!a||a.length!==c*r*4)&&(a=new Uint8Array(c*r*4),d.image={width:c,height:r,data:a},d.flipY=!1,d.isDataTexture=!0),e.readPixels(0,0,c,r,e.RGBA,e.UNSIGNED_BYTE,a)}}const Sa=ir({name:"Typesetter",dependencies:[la,fa,Jn],init(u,t,d){return u(t,d())}}),hn=ir({name:"Typesetter",dependencies:[Sa],init(u){return function(t){return new Promise(d=>{u.typeset(t,d)})}},getTransferables(u){const t=[];for(let d in u)u[d]&&u[d].buffer&&t.push(u[d].buffer);return t}});hn.onMainThread;const qt={};function Ta(u){let t=qt[u];return t||(t=qt[u]=new mt(1,1,u,u).translate(.5,.5,0)),t}const wa="aTroikaGlyphBounds",$t="aTroikaGlyphIndex",ka="aTroikaGlyphColor";class Fa extends En{constructor(){super(),this.detail=1,this.curveRadius=0,this.groups=[{start:0,count:1/0,materialIndex:0},{start:0,count:1/0,materialIndex:1}],this.boundingSphere=new Mn,this.boundingBox=new nn}computeBoundingSphere(){}computeBoundingBox(){}set detail(t){if(t!==this._detail){this._detail=t,(typeof t!="number"||t<1)&&(t=1);let d=Ta(t);["position","normal","uv"].forEach(c=>{this.attributes[c]=d.attributes[c].clone()}),this.setIndex(d.getIndex().clone())}}get detail(){return this._detail}set curveRadius(t){t!==this._curveRadius&&(this._curveRadius=t,this._updateBounds())}get curveRadius(){return this._curveRadius}updateGlyphs(t,d,c,r,e){this.updateAttributeData(wa,t,4),this.updateAttributeData($t,d,1),this.updateAttributeData(ka,e,3),this._blockBounds=c,this._chunkedBounds=r,this.instanceCount=d.length,this._updateBounds()}_updateBounds(){const t=this._blockBounds;if(t){const{curveRadius:d,boundingBox:c}=this;if(d){const{PI:r,floor:e,min:a,max:i,sin:n,cos:o}=Math,s=r/2,f=r*2,l=Math.abs(d),h=t[0]/l,p=t[2]/l,g=e((h+s)/f)!==e((p+s)/f)?-l:a(n(h)*l,n(p)*l),m=e((h-s)/f)!==e((p-s)/f)?l:i(n(h)*l,n(p)*l),O=e((h+r)/f)!==e((p+r)/f)?l*2:i(l-o(h)*l,l-o(p)*l);c.min.set(g,t[1],d<0?-O:0),c.max.set(m,t[3],d<0?0:O)}else c.min.set(t[0],t[1],0),c.max.set(t[2],t[3],0);c.getBoundingSphere(this.boundingSphere)}}applyClipRect(t){let d=this.getAttribute($t).count,c=this._chunkedBounds;if(c)for(let r=c.length;r--;){d=c[r].end;let e=c[r].rect;if(e[1]t.y&&e[0]t.x)break}this.instanceCount=d}updateAttributeData(t,d,c){const r=this.getAttribute(t);d?r&&r.array.length===d.length?(r.array.set(d),r.needsUpdate=!0):(this.setAttribute(t,new Gn(d,c)),delete this._maxInstanceCount,this.dispose()):r&&this.deleteAttribute(t)}}const Ca=` +uniform vec2 uTroikaSDFTextureSize; +uniform float uTroikaSDFGlyphSize; +uniform vec4 uTroikaTotalBounds; +uniform vec4 uTroikaClipRect; +uniform mat3 uTroikaOrient; +uniform bool uTroikaUseGlyphColors; +uniform float uTroikaEdgeOffset; +uniform float uTroikaBlurRadius; +uniform vec2 uTroikaPositionOffset; +uniform float uTroikaCurveRadius; +attribute vec4 aTroikaGlyphBounds; +attribute float aTroikaGlyphIndex; +attribute vec3 aTroikaGlyphColor; +varying vec2 vTroikaGlyphUV; +varying vec4 vTroikaTextureUVBounds; +varying float vTroikaTextureChannel; +varying vec3 vTroikaGlyphColor; +varying vec2 vTroikaGlyphDimensions; +`,Da=` +vec4 bounds = aTroikaGlyphBounds; +bounds.xz += uTroikaPositionOffset.x; +bounds.yw -= uTroikaPositionOffset.y; + +vec4 outlineBounds = vec4( + bounds.xy - uTroikaEdgeOffset - uTroikaBlurRadius, + bounds.zw + uTroikaEdgeOffset + uTroikaBlurRadius +); +vec4 clippedBounds = vec4( + clamp(outlineBounds.xy, uTroikaClipRect.xy, uTroikaClipRect.zw), + clamp(outlineBounds.zw, uTroikaClipRect.xy, uTroikaClipRect.zw) +); + +vec2 clippedXY = (mix(clippedBounds.xy, clippedBounds.zw, position.xy) - bounds.xy) / (bounds.zw - bounds.xy); + +position.xy = mix(bounds.xy, bounds.zw, clippedXY); + +uv = (position.xy - uTroikaTotalBounds.xy) / (uTroikaTotalBounds.zw - uTroikaTotalBounds.xy); + +float rad = uTroikaCurveRadius; +if (rad != 0.0) { + float angle = position.x / rad; + position.xz = vec2(sin(angle) * rad, rad - cos(angle) * rad); + normal.xz = vec2(sin(angle), cos(angle)); +} + +position = uTroikaOrient * position; +normal = uTroikaOrient * normal; + +vTroikaGlyphUV = clippedXY.xy; +vTroikaGlyphDimensions = vec2(bounds[2] - bounds[0], bounds[3] - bounds[1]); + + +float txCols = uTroikaSDFTextureSize.x / uTroikaSDFGlyphSize; +vec2 txUvPerSquare = uTroikaSDFGlyphSize / uTroikaSDFTextureSize; +vec2 txStartUV = txUvPerSquare * vec2( + mod(floor(aTroikaGlyphIndex / 4.0), txCols), + floor(floor(aTroikaGlyphIndex / 4.0) / txCols) +); +vTroikaTextureUVBounds = vec4(txStartUV, vec2(txStartUV) + txUvPerSquare); +vTroikaTextureChannel = mod(aTroikaGlyphIndex, 4.0); +`,Aa=` +uniform sampler2D uTroikaSDFTexture; +uniform vec2 uTroikaSDFTextureSize; +uniform float uTroikaSDFGlyphSize; +uniform float uTroikaSDFExponent; +uniform float uTroikaEdgeOffset; +uniform float uTroikaFillOpacity; +uniform float uTroikaBlurRadius; +uniform vec3 uTroikaStrokeColor; +uniform float uTroikaStrokeWidth; +uniform float uTroikaStrokeOpacity; +uniform bool uTroikaSDFDebug; +varying vec2 vTroikaGlyphUV; +varying vec4 vTroikaTextureUVBounds; +varying float vTroikaTextureChannel; +varying vec2 vTroikaGlyphDimensions; + +float troikaSdfValueToSignedDistance(float alpha) { + // Inverse of exponential encoding in webgl-sdf-generator + + float maxDimension = max(vTroikaGlyphDimensions.x, vTroikaGlyphDimensions.y); + float absDist = (1.0 - pow(2.0 * (alpha > 0.5 ? 1.0 - alpha : alpha), 1.0 / uTroikaSDFExponent)) * maxDimension; + float signedDist = absDist * (alpha > 0.5 ? -1.0 : 1.0); + return signedDist; +} + +float troikaGlyphUvToSdfValue(vec2 glyphUV) { + vec2 textureUV = mix(vTroikaTextureUVBounds.xy, vTroikaTextureUVBounds.zw, glyphUV); + vec4 rgba = texture2D(uTroikaSDFTexture, textureUV); + float ch = floor(vTroikaTextureChannel + 0.5); //NOTE: can't use round() in WebGL1 + return ch == 0.0 ? rgba.r : ch == 1.0 ? rgba.g : ch == 2.0 ? rgba.b : rgba.a; +} + +float troikaGlyphUvToDistance(vec2 uv) { + return troikaSdfValueToSignedDistance(troikaGlyphUvToSdfValue(uv)); +} + +float troikaGetAADist() { + + #if defined(GL_OES_standard_derivatives) || __VERSION__ >= 300 + return length(fwidth(vTroikaGlyphUV * vTroikaGlyphDimensions)) * 0.5; + #else + return vTroikaGlyphDimensions.x / 64.0; + #endif +} + +float troikaGetFragDistValue() { + vec2 clampedGlyphUV = clamp(vTroikaGlyphUV, 0.5 / uTroikaSDFGlyphSize, 1.0 - 0.5 / uTroikaSDFGlyphSize); + float distance = troikaGlyphUvToDistance(clampedGlyphUV); + + // Extrapolate distance when outside bounds: + distance += clampedGlyphUV == vTroikaGlyphUV ? 0.0 : + length((vTroikaGlyphUV - clampedGlyphUV) * vTroikaGlyphDimensions); + + + + return distance; +} + +float troikaGetEdgeAlpha(float distance, float distanceOffset, float aaDist) { + #if defined(IS_DEPTH_MATERIAL) || defined(IS_DISTANCE_MATERIAL) + float alpha = step(-distanceOffset, -distance); + #else + + float alpha = smoothstep( + distanceOffset + aaDist, + distanceOffset - aaDist, + distance + ); + #endif + + return alpha; +} +`,Ea=` +float aaDist = troikaGetAADist(); +float fragDistance = troikaGetFragDistValue(); +float edgeAlpha = uTroikaSDFDebug ? + troikaGlyphUvToSdfValue(vTroikaGlyphUV) : + troikaGetEdgeAlpha(fragDistance, uTroikaEdgeOffset, max(aaDist, uTroikaBlurRadius)); + +#if !defined(IS_DEPTH_MATERIAL) && !defined(IS_DISTANCE_MATERIAL) +vec4 fillRGBA = gl_FragColor; +fillRGBA.a *= uTroikaFillOpacity; +vec4 strokeRGBA = uTroikaStrokeWidth == 0.0 ? fillRGBA : vec4(uTroikaStrokeColor, uTroikaStrokeOpacity); +if (fillRGBA.a == 0.0) fillRGBA.rgb = strokeRGBA.rgb; +gl_FragColor = mix(fillRGBA, strokeRGBA, smoothstep( + -uTroikaStrokeWidth - aaDist, + -uTroikaStrokeWidth + aaDist, + fragDistance +)); +gl_FragColor.a *= edgeAlpha; +#endif + +if (edgeAlpha == 0.0) { + discard; +} +`;function Ma(u){const t=dt(u,{chained:!0,extensions:{derivatives:!0},uniforms:{uTroikaSDFTexture:{value:null},uTroikaSDFTextureSize:{value:new Ir},uTroikaSDFGlyphSize:{value:0},uTroikaSDFExponent:{value:0},uTroikaTotalBounds:{value:new zt(0,0,0,0)},uTroikaClipRect:{value:new zt(0,0,0,0)},uTroikaEdgeOffset:{value:0},uTroikaFillOpacity:{value:1},uTroikaPositionOffset:{value:new Ir},uTroikaCurveRadius:{value:0},uTroikaBlurRadius:{value:0},uTroikaStrokeWidth:{value:0},uTroikaStrokeColor:{value:new Nr},uTroikaStrokeOpacity:{value:1},uTroikaOrient:{value:new On},uTroikaUseGlyphColors:{value:!0},uTroikaSDFDebug:{value:!1}},vertexDefs:Ca,vertexTransform:Da,fragmentDefs:Aa,fragmentColorTransform:Ea,customRewriter({vertexShader:d,fragmentShader:c}){let r=/\buniform\s+vec3\s+diffuse\b/;return r.test(c)&&(c=c.replace(r,"varying vec3 vTroikaGlyphColor").replace(/\bdiffuse\b/g,"vTroikaGlyphColor"),r.test(d)||(d=d.replace(sn,`uniform vec3 diffuse; +$& +vTroikaGlyphColor = uTroikaUseGlyphColors ? aTroikaGlyphColor / 255.0 : diffuse; +`))),{vertexShader:d,fragmentShader:c}}});return t.transparent=!0,t.forceSinglePass=!0,Object.defineProperties(t,{isTroikaTextMaterial:{value:!0},shadowSide:{get(){return this.side},set(){}}}),t}const yt=new Dn({color:16777215,side:Ln,transparent:!0}),en=8421504,rn=new An,Lr=new gt,lt=new gt,mr=[],Ga=new gt,ut="+x+y";function tn(u){return Array.isArray(u)?u[0]:u}let dn=()=>{const u=new pt(new mt(1,1),yt);return dn=()=>u,u},vn=()=>{const u=new pt(new mt(1,1,32,1),yt);return vn=()=>u,u};const Ra={type:"syncstart"},Oa={type:"synccomplete"},pn=["font","fontSize","fontStyle","fontWeight","lang","letterSpacing","lineHeight","maxWidth","overflowWrap","text","direction","textAlign","textIndent","whiteSpace","anchorX","anchorY","colorRanges","sdfGlyphSize"],La=pn.concat("material","color","depthOffset","clipRect","curveRadius","orientation","glyphGeometryDetail");let gn=class extends pt{constructor(){const t=new Fa;super(t,null),this.text="",this.anchorX=0,this.anchorY=0,this.curveRadius=0,this.direction="auto",this.font=null,this.unicodeFontsURL=null,this.fontSize=.1,this.fontWeight="normal",this.fontStyle="normal",this.lang=null,this.letterSpacing=0,this.lineHeight="normal",this.maxWidth=1/0,this.overflowWrap="normal",this.textAlign="left",this.textIndent=0,this.whiteSpace="normal",this.material=null,this.color=null,this.colorRanges=null,this.outlineWidth=0,this.outlineColor=0,this.outlineOpacity=1,this.outlineBlur=0,this.outlineOffsetX=0,this.outlineOffsetY=0,this.strokeWidth=0,this.strokeColor=en,this.strokeOpacity=1,this.fillOpacity=1,this.depthOffset=0,this.clipRect=null,this.orientation=ut,this.glyphGeometryDetail=1,this.sdfGlyphSize=null,this.gpuAccelerateSDF=!0,this.debugSDF=!1}sync(t){this._needsSync&&(this._needsSync=!1,this._isSyncing?(this._queuedSyncs||(this._queuedSyncs=[])).push(t):(this._isSyncing=!0,this.dispatchEvent(Ra),ln({text:this.text,font:this.font,lang:this.lang,fontSize:this.fontSize||.1,fontWeight:this.fontWeight||"normal",fontStyle:this.fontStyle||"normal",letterSpacing:this.letterSpacing||0,lineHeight:this.lineHeight||"normal",maxWidth:this.maxWidth,direction:this.direction||"auto",textAlign:this.textAlign,textIndent:this.textIndent,whiteSpace:this.whiteSpace,overflowWrap:this.overflowWrap,anchorX:this.anchorX,anchorY:this.anchorY,colorRanges:this.colorRanges,includeCaretPositions:!0,sdfGlyphSize:this.sdfGlyphSize,gpuAccelerateSDF:this.gpuAccelerateSDF,unicodeFontsURL:this.unicodeFontsURL},d=>{this._isSyncing=!1,this._textRenderInfo=d,this.geometry.updateGlyphs(d.glyphBounds,d.glyphAtlasIndices,d.blockBounds,d.chunkedBounds,d.glyphColors);const c=this._queuedSyncs;c&&(this._queuedSyncs=null,this._needsSync=!0,this.sync(()=>{c.forEach(r=>r&&r())})),this.dispatchEvent(Oa),t&&t()})))}onBeforeRender(t,d,c,r,e,a){this.sync(),e.isTroikaTextMaterial&&this._prepareForRender(e)}dispose(){this.geometry.dispose()}get textRenderInfo(){return this._textRenderInfo||null}createDerivedMaterial(t){return Ma(t)}get material(){let t=this._derivedMaterial;const d=this._baseMaterial||this._defaultMaterial||(this._defaultMaterial=yt.clone());if((!t||!t.isDerivedFrom(d))&&(t=this._derivedMaterial=this.createDerivedMaterial(d),d.addEventListener("dispose",function c(){d.removeEventListener("dispose",c),t.dispose()})),this.hasOutline()){let c=t._outlineMtl;return c||(c=t._outlineMtl=Object.create(t,{id:{value:t.id+.1}}),c.isTextOutlineMaterial=!0,c.depthWrite=!1,c.map=null,t.addEventListener("dispose",function r(){t.removeEventListener("dispose",r),c.dispose()})),[c,t]}else return t}set material(t){t&&t.isTroikaTextMaterial?(this._derivedMaterial=t,this._baseMaterial=t.baseMaterial):this._baseMaterial=t}hasOutline(){return!!(this.outlineWidth||this.outlineBlur||this.outlineOffsetX||this.outlineOffsetY)}get glyphGeometryDetail(){return this.geometry.detail}set glyphGeometryDetail(t){this.geometry.detail=t}get curveRadius(){return this.geometry.curveRadius}set curveRadius(t){this.geometry.curveRadius=t}get customDepthMaterial(){return tn(this.material).getDepthMaterial()}set customDepthMaterial(t){}get customDistanceMaterial(){return tn(this.material).getDistanceMaterial()}set customDistanceMaterial(t){}_prepareForRender(t){const d=t.isTextOutlineMaterial,c=t.uniforms,r=this.textRenderInfo;if(r){const{sdfTexture:i,blockBounds:n}=r;c.uTroikaSDFTexture.value=i,c.uTroikaSDFTextureSize.value.set(i.image.width,i.image.height),c.uTroikaSDFGlyphSize.value=r.sdfGlyphSize,c.uTroikaSDFExponent.value=r.sdfExponent,c.uTroikaTotalBounds.value.fromArray(n),c.uTroikaUseGlyphColors.value=!d&&!!r.glyphColors;let o=0,s=0,f=0,l,h,p,g=0,m=0;if(d){let{outlineWidth:S,outlineOffsetX:F,outlineOffsetY:U,outlineBlur:w,outlineOpacity:R}=this;o=this._parsePercent(S)||0,s=Math.max(0,this._parsePercent(w)||0),l=R,g=this._parsePercent(F)||0,m=this._parsePercent(U)||0}else f=Math.max(0,this._parsePercent(this.strokeWidth)||0),f&&(p=this.strokeColor,c.uTroikaStrokeColor.value.set(p??en),h=this.strokeOpacity,h==null&&(h=1)),l=this.fillOpacity;c.uTroikaEdgeOffset.value=o,c.uTroikaPositionOffset.value.set(g,m),c.uTroikaBlurRadius.value=s,c.uTroikaStrokeWidth.value=f,c.uTroikaStrokeOpacity.value=h,c.uTroikaFillOpacity.value=l??1,c.uTroikaCurveRadius.value=this.curveRadius||0;let O=this.clipRect;if(O&&Array.isArray(O)&&O.length===4)c.uTroikaClipRect.value.fromArray(O);else{const S=(this.fontSize||.1)*100;c.uTroikaClipRect.value.set(n[0]-S,n[1]-S,n[2]+S,n[3]+S)}this.geometry.applyClipRect(c.uTroikaClipRect.value)}c.uTroikaSDFDebug.value=!!this.debugSDF,t.polygonOffset=!!this.depthOffset,t.polygonOffsetFactor=t.polygonOffsetUnits=this.depthOffset||0;const e=d?this.outlineColor||0:this.color;if(e==null)delete t.color;else{const i=t.hasOwnProperty("color")?t.color:t.color=new Nr;(e!==i._input||typeof e=="object")&&i.set(i._input=e)}let a=this.orientation||ut;if(a!==t._orientation){let i=c.uTroikaOrient.value;a=a.replace(/[^-+xyz]/g,"");let n=a!==ut&&a.match(/^([-+])([xyz])([-+])([xyz])$/);if(n){let[,o,s,f,l]=n;Lr.set(0,0,0)[s]=o==="-"?1:-1,lt.set(0,0,0)[l]=f==="-"?-1:1,rn.lookAt(Ga,Lr.cross(lt),lt),i.setFromMatrix4(rn)}else i.identity();t._orientation=a}}_parsePercent(t){if(typeof t=="string"){let d=t.match(/^(-?[\d.]+)%$/),c=d?parseFloat(d[1]):NaN;t=(isNaN(c)?0:c/100)*this.fontSize}return t}localPositionToTextCoords(t,d=new Ir){d.copy(t);const c=this.curveRadius;return c&&(d.x=Math.atan2(t.x,Math.abs(c)-Math.abs(t.z))*Math.abs(c)),d}worldPositionToTextCoords(t,d=new Ir){return Lr.copy(t),this.localPositionToTextCoords(this.worldToLocal(Lr),d)}raycast(t,d){const{textRenderInfo:c,curveRadius:r}=this;if(c){const e=c.blockBounds,a=r?vn():dn(),i=a.geometry,{position:n,uv:o}=i.attributes;for(let s=0;s{this[c]=t[c]}),this}clone(){return new this.constructor().copy(this)}};pn.forEach(u=>{const t="_private_"+u;Object.defineProperty(gn.prototype,u,{get(){return this[t]},set(d){d!==this[t]&&(this[t]=d,this._needsSync=!0)}})});new nn;new Nr;const Wa=qe.forwardRef(({sdfGlyphSize:u=64,anchorX:t="center",anchorY:d="middle",font:c,fontSize:r=1,children:e,characters:a,onSync:i,...n},o)=>{const s=Bn(({invalidate:p})=>p),[f]=qe.useState(()=>new gn),[l,h]=qe.useMemo(()=>{const p=[];let g="";return qe.Children.forEach(e,m=>{typeof m=="string"||typeof m=="number"?g+=m:p.push(m)}),[p,g]},[e]);return Wn(()=>new Promise(p=>Ua({font:c,characters:a},p)),["troika-text",c,a]),qe.useLayoutEffect(()=>void f.sync(()=>{s(),i&&i(f)})),qe.useEffect(()=>()=>f.dispose(),[f]),qe.createElement("primitive",Sn({object:f,ref:o,font:c,text:h,anchorX:t,anchorY:d,fontSize:r,sdfGlyphSize:u},n),l)});export{Wa as T}; diff --git a/site/assets/TransformationsView-CcLdqflF.js b/site/assets/TransformationsView-CcLdqflF.js new file mode 100644 index 0000000..c5103bd --- /dev/null +++ b/site/assets/TransformationsView-CcLdqflF.js @@ -0,0 +1,16 @@ +import{c as h,r as p,j as e,m as C}from"./index-DJrAq1Rk.js";import{M as $}from"./maximize-BW0NideE.js";/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const S=[["path",{d:"M8 3 4 7l4 4",key:"9rb6wj"}],["path",{d:"M4 7h16",key:"6tx8e3"}],["path",{d:"m16 21 4-4-4-4",key:"siv7j2"}],["path",{d:"M20 17H4",key:"h6l3hr"}]],_=h("arrow-left-right",S);/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const A=[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]],D=h("arrow-up-down",A);/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const V=[["path",{d:"M8 3v3a2 2 0 0 1-2 2H3",key:"hohbtr"}],["path",{d:"M21 8h-3a2 2 0 0 1-2-2V3",key:"5jw1f3"}],["path",{d:"M3 16h3a2 2 0 0 1 2 2v3",key:"198tvr"}],["path",{d:"M16 21v-3a2 2 0 0 1 2-2h3",key:"ph8mxp"}]],B=h("minimize",V),q=()=>{const[r,m]=p.useState(1),[i,f]=p.useState(1),[c,u]=p.useState(0),[o,j]=p.useState(0),[b,M]=p.useState("quadratic"),g={quadratic:{label:"xยฒ",fn:s=>s*s,latex:"x^2"},sine:{label:"sin(x)",fn:s=>Math.sin(s),latex:"\\sin(x)"},abs:{label:"|x|",fn:s=>Math.abs(s),latex:"|x|"},exp:{label:"eหฃ",fn:s=>Math.exp(s),latex:"e^x"}},y=g[b],x=600,l=400,t=10,F=s=>(s+t)/(2*t)*x,z=s=>l-(s+t)/(2*t)*l,v=s=>{let d="";for(let n=-t;n<=t;n+=.1){let a;s?a=r*y.fn(i*(n-c))+o:a=y.fn(n),a>t*2&&(a=t*2),a<-t*2&&(a=-t*2);const w=F(n),k=z(a);n===-t?d+=`M ${w} ${k}`:d+=` L ${w} ${k}`}return d},N=()=>{m(1),f(1),u(0),j(0)};return e.jsxs("div",{className:"space-y-8 pb-20",children:[e.jsxs("header",{className:"border-b border-slate-800 pb-6",children:[e.jsx("h2",{className:"text-4xl font-bold text-white mb-2",children:"Function Transformations"}),e.jsxs("p",{className:"text-slate-400",children:["Interactive manipulation of ",e.jsx("span",{className:"font-mono text-cyan-400",children:"g(x) = Aยทf(B(x - C)) + D"})]})]}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-8",children:[e.jsxs("div",{className:"bg-slate-800/50 p-6 rounded-2xl border border-slate-700 backdrop-blur-md space-y-8",children:[e.jsx("div",{className:"flex gap-2 p-1 bg-slate-900 rounded-lg",children:Object.entries(g).map(([s,d])=>e.jsx("button",{onClick:()=>{M(s),N()},className:`flex-1 py-2 text-xs font-bold uppercase rounded transition-colors ${b===s?"bg-cyan-600 text-white":"text-slate-500 hover:text-slate-300"}`,children:d.label},s))}),e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex justify-between mb-2",children:[e.jsxs("label",{className:"text-sm text-slate-300 flex items-center gap-2",children:[e.jsx(D,{size:14})," Vertical Shift (D)"]}),e.jsx("span",{className:"font-mono text-cyan-400",children:o.toFixed(1)})]}),e.jsx("input",{type:"range",min:"-5",max:"5",step:"0.5",value:o,onChange:s=>j(parseFloat(s.target.value)),className:"w-full h-1 bg-slate-700 rounded-lg appearance-none accent-cyan-500"})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex justify-between mb-2",children:[e.jsxs("label",{className:"text-sm text-slate-300 flex items-center gap-2",children:[e.jsx(_,{size:14})," Horizontal Shift (C)"]}),e.jsx("span",{className:"font-mono text-cyan-400",children:c.toFixed(1)})]}),e.jsx("input",{type:"range",min:"-5",max:"5",step:"0.5",value:c,onChange:s=>u(parseFloat(s.target.value)),className:"w-full h-1 bg-slate-700 rounded-lg appearance-none accent-cyan-500"})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex justify-between mb-2",children:[e.jsxs("label",{className:"text-sm text-slate-300 flex items-center gap-2",children:[e.jsx($,{size:14})," Vertical Stretch (A)"]}),e.jsx("span",{className:"font-mono text-purple-400",children:r.toFixed(1)})]}),e.jsx("input",{type:"range",min:"-3",max:"3",step:"0.1",value:r,onChange:s=>m(parseFloat(s.target.value)),className:"w-full h-1 bg-slate-700 rounded-lg appearance-none accent-purple-500"})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex justify-between mb-2",children:[e.jsxs("label",{className:"text-sm text-slate-300 flex items-center gap-2",children:[e.jsx(B,{size:14})," Horizontal Compression (B)"]}),e.jsx("span",{className:"font-mono text-purple-400",children:i.toFixed(1)})]}),e.jsx("input",{type:"range",min:"0.1",max:"3",step:"0.1",value:i,onChange:s=>f(parseFloat(s.target.value)),className:"w-full h-1 bg-slate-700 rounded-lg appearance-none accent-purple-500"})]})]}),e.jsx("button",{onClick:N,className:"w-full py-2 rounded-lg border border-slate-600 text-slate-400 text-sm hover:bg-slate-800 hover:text-white transition-colors",children:"Reset Parameters"})]}),e.jsxs("div",{className:"lg:col-span-2 bg-slate-900 rounded-2xl border border-slate-700 relative overflow-hidden shadow-2xl flex flex-col",children:[e.jsx("div",{className:"absolute inset-0 bg-[url('https://grainy-gradients.vercel.app/noise.svg')] opacity-5"}),e.jsx("div",{className:"p-4 border-b border-slate-800 flex justify-between items-center z-10 bg-slate-900/90",children:e.jsxs("div",{className:"font-mono text-lg text-white",children:["g(x) = ",e.jsx("span",{className:"text-purple-400",children:r!==1&&r}),"f(",e.jsx("span",{className:"text-purple-400",children:i!==1&&i}),"(x ",c<0?"+":"-"," ",e.jsx("span",{className:"text-cyan-400",children:Math.abs(c)}),") ) ",o>=0?"+":"-"," ",e.jsx("span",{className:"text-cyan-400",children:Math.abs(o)})]})}),e.jsx("div",{className:"relative flex-1 w-full h-full",children:e.jsxs("svg",{viewBox:`0 0 ${x} ${l}`,className:"w-full h-full",children:[e.jsx("line",{x1:x/2,y1:0,x2:x/2,y2:l,stroke:"#475569",strokeWidth:"2"}),e.jsx("line",{x1:0,y1:l/2,x2:x,y2:l/2,stroke:"#475569",strokeWidth:"2"}),e.jsx("path",{d:v(!1),fill:"none",stroke:"#475569",strokeWidth:"2",strokeDasharray:"4 4",opacity:"0.5"}),e.jsx(C.path,{d:v(!0),fill:"none",stroke:"#22d3ee",strokeWidth:"3",initial:!1,transition:{type:"spring",stiffness:300,damping:30}})]})})]})]})]})};export{q as TransformationsView}; diff --git a/site/assets/VectorOperations3DView-EaRYXIXa.js b/site/assets/VectorOperations3DView-EaRYXIXa.js new file mode 100644 index 0000000..3e28244 --- /dev/null +++ b/site/assets/VectorOperations3DView-EaRYXIXa.js @@ -0,0 +1,6 @@ +import{c as y,r as d,j as e,q as f}from"./index-DJrAq1Rk.js";import{V as x,C as k,J as z,K as C,D as S}from"./react-three-fiber.esm-DbvaK_kO.js";import{O as V}from"./OrbitControls-C12Qjv1w.js";import{G as A}from"./Grid-BzfIX0gF.js";import{T as D}from"./Text-BaglAl3o.js";import"./extends-CF3RwP-h.js";import"./constants-Br-Ti-Jl.js";/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const P=[["path",{d:"M5 3v16h16",key:"1mqmf9"}],["path",{d:"m5 19 6-6",key:"jh6hbb"}],["path",{d:"m2 6 3-3 3 3",key:"tkyvxa"}],["path",{d:"m18 16 3 3-3 3",key:"1d4glt"}]],F=y("move-3d",P),i=({start:s=new x(0,0,0),end:t,color:r,label:o,scale:l=1})=>{const h=new x().subVectors(t,s).normalize(),p=s.distanceTo(t);return p<.01?null:e.jsxs("group",{children:[e.jsx("arrowHelper",{args:[h,s,p,r,.4*l,.2*l]}),o&&e.jsx(D,{position:[t.x,t.y+.3,t.z],fontSize:.4,color:r,fontWeight:"bold",outlineWidth:.03,outlineColor:"#000",anchorY:"bottom",children:o})]})},M=({v1:s,v2:t})=>{const r=d.useMemo(()=>{const o=new z,l=new Float32Array([0,0,0,s.x,s.y,s.z,t.x,t.y,t.z,s.x,s.y,s.z,s.x+t.x,s.y+t.y,s.z+t.z,t.x,t.y,t.z]);return o.setAttribute("position",new C(l,3)),o.computeVertexNormals(),o},[s,t]);return e.jsx("mesh",{geometry:r,children:e.jsx("meshBasicMaterial",{color:"white",transparent:!0,opacity:.1,side:S})})},q=()=>{const[s,t]=d.useState({x:3,y:0,z:0}),[r,o]=d.useState({x:0,y:3,z:2}),[l,h]=d.useState(!0),[p,w]=d.useState(!0),[j,N]=d.useState(!0),c=new x(s.x,s.y,s.z),n=new x(r.x,r.y,r.z),m=new x().addVectors(c,n),g=new x().crossVectors(c,n),v=c.dot(n);return e.jsxs("div",{className:"space-y-6 h-[calc(100vh-140px)] flex flex-col pb-6",children:[e.jsxs("header",{className:"flex flex-col md:flex-row justify-between items-end border-b border-white/10 pb-4 shrink-0 gap-4",children:[e.jsxs("div",{children:[e.jsxs("h2",{className:"text-3xl font-bold text-white mb-2 flex items-center gap-3",children:[e.jsx(F,{className:"text-cyan-400"})," Vector Operations 3D"]}),e.jsxs("p",{className:"text-slate-400 text-sm max-w-2xl",children:["Interactive laboratory for visualizing ",e.jsx("span",{className:"text-cyan-400",children:"Addition"}),", ",e.jsx("span",{className:"text-purple-400",children:"Dot Product"}),", and ",e.jsx("span",{className:"text-amber-400",children:"Cross Product"})," in 3D space."]})]}),e.jsxs("div",{className:"bg-slate-900/50 p-2 rounded-lg border border-slate-800 flex gap-4 text-xs font-mono",children:[e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"text-slate-500 uppercase tracking-widest",children:"Dot Product"}),e.jsx("div",{className:"text-white font-bold text-lg",children:v.toFixed(1)})]}),e.jsx("div",{className:"w-px bg-white/10"}),e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"text-slate-500 uppercase tracking-widest",children:"Cross Mag"}),e.jsx("div",{className:"text-amber-400 font-bold text-lg",children:g.length().toFixed(1)})]})]})]}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 flex-1 min-h-0",children:[e.jsxs("div",{className:"lg:col-span-1 flex flex-col gap-6 overflow-y-auto pr-2 custom-scrollbar",children:[e.jsxs("div",{className:"bg-slate-900/50 p-5 rounded-2xl border border-slate-800",children:[e.jsxs("h3",{className:"text-xs font-bold text-cyan-400 uppercase tracking-widest mb-4 flex items-center gap-2",children:[e.jsx(f,{size:16})," Vector u"]}),e.jsx("div",{className:"space-y-4",children:["x","y","z"].map(a=>e.jsxs("div",{children:[e.jsxs("div",{className:"flex justify-between text-[10px] text-slate-400 mb-1 font-bold uppercase",children:[e.jsxs("span",{children:[a,"-axis"]}),e.jsx("span",{className:"text-white",children:s[a]})]}),e.jsx("input",{type:"range",min:"-5",max:"5",step:"0.5",value:s[a],onChange:u=>t(b=>({...b,[a]:parseFloat(u.target.value)})),className:"w-full h-1.5 bg-slate-700 rounded-lg appearance-none cursor-pointer accent-cyan-500"})]},`u-${a}`))})]}),e.jsxs("div",{className:"bg-slate-900/50 p-5 rounded-2xl border border-slate-800",children:[e.jsxs("h3",{className:"text-xs font-bold text-purple-400 uppercase tracking-widest mb-4 flex items-center gap-2",children:[e.jsx(f,{size:16})," Vector v"]}),e.jsx("div",{className:"space-y-4",children:["x","y","z"].map(a=>e.jsxs("div",{children:[e.jsxs("div",{className:"flex justify-between text-[10px] text-slate-400 mb-1 font-bold uppercase",children:[e.jsxs("span",{children:[a,"-axis"]}),e.jsx("span",{className:"text-white",children:r[a]})]}),e.jsx("input",{type:"range",min:"-5",max:"5",step:"0.5",value:r[a],onChange:u=>o(b=>({...b,[a]:parseFloat(u.target.value)})),className:"w-full h-1.5 bg-slate-700 rounded-lg appearance-none cursor-pointer accent-purple-500"})]},`v-${a}`))})]}),e.jsxs("div",{className:"bg-slate-900/50 p-5 rounded-2xl border border-slate-800 space-y-2",children:[e.jsxs("label",{className:"flex items-center justify-between cursor-pointer group",children:[e.jsx("span",{className:"text-xs font-bold text-slate-400 group-hover:text-white transition-colors",children:"Show Addition (u+v)"}),e.jsx("input",{type:"checkbox",checked:l,onChange:a=>h(a.target.checked),className:"accent-emerald-500"})]}),e.jsxs("label",{className:"flex items-center justify-between cursor-pointer group",children:[e.jsx("span",{className:"text-xs font-bold text-slate-400 group-hover:text-white transition-colors",children:"Show Cross Product"}),e.jsx("input",{type:"checkbox",checked:p,onChange:a=>w(a.target.checked),className:"accent-amber-500"})]}),e.jsxs("label",{className:"flex items-center justify-between cursor-pointer group",children:[e.jsx("span",{className:"text-xs font-bold text-slate-400 group-hover:text-white transition-colors",children:"Show Span Plane"}),e.jsx("input",{type:"checkbox",checked:j,onChange:a=>N(a.target.checked),className:"accent-white"})]})]}),e.jsxs("div",{className:"p-4 bg-black/20 rounded-xl border border-white/5 text-[10px] text-slate-500 space-y-2 font-mono",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-2 h-2 rounded-full bg-cyan-400"})," Vector u"]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-2 h-2 rounded-full bg-purple-400"})," Vector v"]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-2 h-2 rounded-full bg-emerald-400"})," Sum (u+v)"]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-2 h-2 rounded-full bg-amber-400"})," Cross (uร—v)"]})]})]}),e.jsxs("div",{className:"lg:col-span-3 bg-slate-950 rounded-3xl border border-slate-800 relative overflow-hidden shadow-2xl",children:[e.jsxs(k,{camera:{position:[8,8,8],fov:45},children:[e.jsx("color",{attach:"background",args:["#020617"]}),e.jsx("ambientLight",{intensity:.5}),e.jsx("pointLight",{position:[10,10,10],intensity:1}),e.jsx("pointLight",{position:[-10,-10,-10],intensity:.5,color:"blue"}),e.jsx(V,{makeDefault:!0}),e.jsx(A,{infiniteGrid:!0,sectionSize:1,cellColor:"#1e293b",sectionColor:"#334155",fadeDistance:30}),e.jsx("axesHelper",{args:[5]}),e.jsx(i,{end:c,color:"#22d3ee",label:"u"}),e.jsx(i,{end:n,color:"#a855f7",label:"v"}),l&&e.jsxs(e.Fragment,{children:[e.jsx(i,{start:c,end:m,color:"#a855f7",scale:.5}),e.jsx(i,{start:n,end:m,color:"#22d3ee",scale:.5}),e.jsx(i,{end:m,color:"#10b981",label:"u+v"})]}),p&&e.jsx(i,{end:g,color:"#fbbf24",label:"uร—v"}),j&&e.jsx(M,{v1:c,v2:n})]}),e.jsx("div",{className:"absolute bottom-4 right-4 pointer-events-none text-[10px] text-slate-600 font-mono bg-black/20 p-2 rounded backdrop-blur-sm",children:"Drag to Rotate โ€ข Scroll to Zoom"})]})]})]})};export{q as VectorOperations3DView}; diff --git a/site/assets/WolframHelper-C3f14kAl.js b/site/assets/WolframHelper-C3f14kAl.js new file mode 100644 index 0000000..98e1da1 --- /dev/null +++ b/site/assets/WolframHelper-C3f14kAl.js @@ -0,0 +1,11 @@ +import{c as o,r as d,j as e,C as r}from"./index-DJrAq1Rk.js";import{C as c}from"./chevron-right-KbXem8Tn.js";/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const m=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],p=o("external-link",m);/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const f=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],y=o("terminal",f),b=({context:l})=>{const[s,x]=d.useState(""),a={matrix_basics:{title:"Matrix Definitions",syntax:"Use curly braces {{...}} for rows.",examples:["{{1, 2, 3}, {4, 5, 6}}","identity matrix of size 4","diagonal matrix {1, 2, 3}"]},matrix_ops:{title:"Matrix Operations (PDF Pg 11)",syntax:"Use + for add, * for mult, ^ for power.",examples:["{{1,0},{3,5}} + {{1,3},{7,5}}","{{1,0,2},{3,5,1}} * {{1,3},{7,5},{0,2}}","{{1,0},{3,5}}^3","transpose {{1, 0, 2}, {3, 5, 1}}"]},determinant:{title:"Determinant Calculation",syntax:"Use det(...) or determinant(...)",examples:["det {{1, 0}, {3, 5}}","determinant {{5, 3, -1}, {2, 0, 4}, {-3, 6, 2}}","trace {{4, 1}, {2, 3}}"]},inverse:{title:"Inverse Matrix",syntax:"Use inverse(...) or inv(...)",examples:["inverse {{1, 0}, {3, 5}}","inv {{2, 7, 3}, {3, 9, 4}, {1, 5, 3}}","{{1, 2}, {3, 4}}^-1"]},systems:{title:"System Solver",syntax:"List equations separated by comma",examples:["solve x - 4y + 5z = 2, 2y - z = 1, 4x + 2y + z = 0","{{1, -4, 5}, {0, 2, -1}, {4, 2, 1}} . {x, y, z} = {2, 1, 0}"]},sequences:{title:"Sequence Analysis (PDF Pg 9)",syntax:"Use limit... or discreteplot...",examples:["limit (4*n^2+5*n-7)^0.5 - 2*n as n->infinity","limit (1 + 1/n)^n as n->infinity","discreteplot (4*n^2+5*n-7)^0.5 - 2*n, {n, 1, 50}","Sum[1/n^2, {n, 1, infinity}]"]},functions:{title:"Function Analysis",syntax:"plot ... or domain of ...",examples:["plot (x-1)/(x^2-4)","domain of 2*sqrt(1-x^2)","range of x^2 - 1","asymptotes of (x-1)/(x^2-4)"]},limits:{title:"Limits & Continuity",syntax:"limit f(x) as x->c",examples:["limit (27-x^3)/(x-3) as x->3","limit x/ln(x) as x->0+","limit (1+1/x)^x as x->infinity"]},derivatives:{title:"Differentiation",syntax:"derivative of ... or d/dx ...",examples:["derivative of (x^2-3)e^x","d/dx x^2 * ln(x)","second derivative of sin(x)"]},analysis:{title:"Extrema & Monotonicity",syntax:"extrema of ... or maximize ...",examples:["extrema of x^3 + 3x^2 - 9x - 2","inflection points of x^3 + 3x^2 - 9x - 2","stationary points of (x^2-3)e^x"]},gaussian:{title:"Row Reduction",syntax:"row reduce ... or rref ...",examples:["row reduce {{2, 1, -1}, {-3, -1, 2}, {-2, 1, 2}}","rref {{2, 1, -1, 8}, {-3, -1, 2, -11}}"]},eigen:{title:"Eigenvalues",syntax:"eigenvalues ...",examples:["eigenvalues {{4, 1}, {2, 3}}","eigenvectors {{4, 1}, {2, 3}}","characteristic polynomial {{4, 1}, {2, 3}}"]}}[l],n=t=>{const i=encodeURIComponent(t);window.open(`https://www.wolframalpha.com/input?i=${i}`,"_blank")};return e.jsx("div",{className:"mt-12 border-t border-orange-500/30 pt-8",children:e.jsxs("div",{className:"bg-slate-900/80 rounded-2xl border border-orange-500/20 overflow-hidden",children:[e.jsxs("div",{className:"bg-gradient-to-r from-orange-600/20 to-slate-900 p-4 flex items-center justify-between border-b border-orange-500/20",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"p-2 bg-orange-500/20 rounded-lg text-orange-500",children:e.jsx(r,{size:20})}),e.jsxs("div",{children:[e.jsxs("h3",{className:"text-white font-bold flex items-center gap-2",children:["WolframAlpha Integration",e.jsx("span",{className:"px-2 py-0.5 rounded-full bg-orange-500 text-slate-900 text-[10px] font-bold uppercase tracking-wider",children:"Pro Tools"})]}),e.jsx("p",{className:"text-xs text-orange-300/70",children:"Computation Engine & Syntax Helper"})]})]}),e.jsx(p,{size:18,className:"text-orange-500/50"})]}),e.jsxs("div",{className:"p-6 grid grid-cols-1 lg:grid-cols-2 gap-8",children:[e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute left-3 top-3 text-slate-500",children:e.jsx(y,{size:18})}),e.jsx("input",{type:"text",value:s,onChange:t=>x(t.target.value),placeholder:"Enter mathematical query...",className:"w-full bg-slate-950 border border-slate-700 rounded-xl py-3 pl-10 pr-4 text-white focus:border-orange-500 outline-none font-mono text-sm",onKeyDown:t=>t.key==="Enter"&&n(s)})]}),e.jsxs("button",{onClick:()=>n(s),disabled:!s,className:"w-full py-3 bg-orange-600 hover:bg-orange-500 disabled:opacity-50 disabled:hover:bg-orange-600 text-white font-bold rounded-xl transition-colors flex items-center justify-center gap-2",children:[e.jsx(r,{size:16})," Compute on WolframAlpha"]}),e.jsx("p",{className:"text-[10px] text-slate-500 text-center",children:"Opens in a new tab. Requires internet connection."})]}),e.jsxs("div",{className:"bg-slate-950/50 rounded-xl border border-slate-800 p-4",children:[e.jsx("h4",{className:"text-xs font-bold text-orange-400 uppercase tracking-widest mb-1",children:a.title}),e.jsx("p",{className:"text-xs text-slate-400 mb-4 font-mono",children:a.syntax}),e.jsx("div",{className:"space-y-2",children:a.examples.map((t,i)=>e.jsxs("button",{onClick:()=>n(t),className:"w-full text-left group flex items-center justify-between p-2 rounded-lg hover:bg-slate-800 transition-colors border border-transparent hover:border-slate-700",children:[e.jsx("code",{className:"text-xs text-slate-300 font-mono truncate",children:t}),e.jsx("div",{className:"flex items-center gap-2 opacity-0 group-hover:opacity-100 transition-opacity",children:e.jsx(c,{size:14,className:"text-orange-500"})})]},i))})]})]})]})})};export{b as W}; diff --git a/site/assets/chevron-right-KbXem8Tn.js b/site/assets/chevron-right-KbXem8Tn.js new file mode 100644 index 0000000..799331f --- /dev/null +++ b/site/assets/chevron-right-KbXem8Tn.js @@ -0,0 +1,6 @@ +import{c as o}from"./index-DJrAq1Rk.js";/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const t=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],e=o("chevron-right",t);export{e as C}; diff --git a/site/assets/circle-check-7SRCYW7Y.js b/site/assets/circle-check-7SRCYW7Y.js new file mode 100644 index 0000000..48504a6 --- /dev/null +++ b/site/assets/circle-check-7SRCYW7Y.js @@ -0,0 +1,6 @@ +import{c}from"./index-DJrAq1Rk.js";/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const e=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],r=c("circle-check",e);export{r as C}; diff --git a/site/assets/constants-Br-Ti-Jl.js b/site/assets/constants-Br-Ti-Jl.js new file mode 100644 index 0000000..7a0a504 --- /dev/null +++ b/site/assets/constants-Br-Ti-Jl.js @@ -0,0 +1 @@ +import{i as e}from"./react-three-fiber.esm-DbvaK_kO.js";const o=()=>parseInt(e.replace(/\D+/g,"")),s=o();export{s as v}; diff --git a/site/assets/examStorage-DURyP8UF.js b/site/assets/examStorage-DURyP8UF.js new file mode 100644 index 0000000..9d17b58 --- /dev/null +++ b/site/assets/examStorage-DURyP8UF.js @@ -0,0 +1,11 @@ +import{c as r,e as x,M as e,n as s,d as y,I as m,o as $,p as c,L as l}from"./index-DJrAq1Rk.js";/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const d=[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]],u=r("brain",d);/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const p=[["path",{d:"M10 14.66v1.626a2 2 0 0 1-.976 1.696A5 5 0 0 0 7 21.978",key:"1n3hpd"}],["path",{d:"M14 14.66v1.626a2 2 0 0 0 .976 1.696A5 5 0 0 1 17 21.978",key:"rfe1zi"}],["path",{d:"M18 9h1.5a1 1 0 0 0 0-5H18",key:"7xy6bh"}],["path",{d:"M4 22h16",key:"57wxv0"}],["path",{d:"M6 9a6 6 0 0 0 12 0V3a1 1 0 0 0-1-1H7a1 1 0 0 0-1 1z",key:"1mhfuq"}],["path",{d:"M6 9H4.5a1 1 0 0 1 0-5H6",key:"tex48p"}]],h=r("trophy",p),A=[{id:e.MATRIX,label:"Matrix",icon:x,color:"text-blue-400",border:"border-blue-500/30",bg:"bg-blue-500/10"},{id:e.SEQUENCES,label:"Sequences",icon:s,color:"text-purple-400",border:"border-purple-500/30",bg:"bg-purple-500/10"},{id:e.FUNCTIONS,label:"Functions",icon:y,color:"text-pink-400",border:"border-pink-500/30",bg:"bg-pink-500/10"},{id:e.LIMITS,label:"Limits",icon:m,color:"text-orange-400",border:"border-orange-500/30",bg:"bg-orange-500/10"},{id:e.DERIVATIVES,label:"Derivatives",icon:$,color:"text-cyan-400",border:"border-cyan-500/30",bg:"bg-cyan-500/10"},{id:e.INTEGRALS,label:"Integrals",icon:c,color:"text-emerald-400",border:"border-emerald-500/30",bg:"bg-emerald-500/10"},{id:e.DIFF_EQ,label:"Differential Eq",icon:l,color:"text-rose-400",border:"border-rose-500/30",bg:"bg-rose-500/10"}],g={[e.MATRIX]:[{id:1,text:"What is a matrix?",options:[{key:"A",text:"Any sequence of numbers"},{key:"B",text:"A rectangular array of numbers arranged in rows and columns"},{key:"C",text:"A graph of a function"}],correct:"B",explanation:"A matrix is formally defined as a rectangular array of numbers, symbols, or expressions, arranged in rows and columns.",memoryKey:"Rectangular Array"},{id:2,text:"The dimension of matrix $A_{n \\times m}$ means:",options:[{key:"A",text:"$n$ columns and $m$ rows"},{key:"B",text:"$n$ rows and $m$ columns"},{key:"C",text:"$m$ rows and $n$ columns"}],correct:"B",explanation:"Matrix dimensions are always stated as Rows $\\times$ Columns ($RC$).",memoryKey:"Rows ร— Columns"},{id:3,text:"A square matrix is a matrix in which:",options:[{key:"A",text:"$n \\neq m$"},{key:"B",text:"all elements are zeros"},{key:"C",text:"$n = m$"}],correct:"C",explanation:"A square matrix has the same number of rows and columns.",memoryKey:"n = m"},{id:4,text:"The identity matrix is:",options:[{key:"A",text:"A matrix with ones on the main diagonal and zeros elsewhere"},{key:"B",text:"A matrix with all elements equal to $1$"},{key:"C",text:"The zero matrix"}],correct:"A",explanation:"The identity matrix ($I$) acts like the number $1$ in matrix multiplication. It has $1$s on the diagonal and $0$s everywhere else.",memoryKey:"Diagonal Ones"},{id:5,text:"The zero matrix is:",options:[{key:"A",text:"A matrix whose determinant is zero"},{key:"B",text:"A matrix with all zeros"},{key:"C",text:"A diagonal matrix"}],correct:"B",explanation:"A zero matrix is a matrix where every single entry is zero.",memoryKey:"All Zeros"},{id:6,text:"A diagonal matrix is:",options:[{key:"A",text:"Non-zero elements only on the main diagonal"},{key:"B",text:"Ones on the diagonal"},{key:"C",text:"Zeros in the columns"}],correct:"A",explanation:"In a diagonal matrix, entries outside the main diagonal are all zero.",memoryKey:"Only Diagonal"},{id:7,text:"To add two matrices, they must have:",options:[{key:"A",text:"The same number of rows"},{key:"B",text:"The same number of columns"},{key:"C",text:"Identical dimensions"}],correct:"C",explanation:"Matrix addition is element-wise, so both matrices must have exactly the same number of rows and columns.",memoryKey:"Exact Size Match"},{id:8,text:"The transposition of a matrix means:",options:[{key:"A",text:"Reversing the order of columns"},{key:"B",text:"Swapping rows and columns"},{key:"C",text:"Squaring the matrix"}],correct:"B",explanation:"Transposition flips a matrix over its diagonal, switching the row and column indices of each element.",memoryKey:"Swap Rows/Cols"},{id:9,text:"The symbol $A^T$ denotes:",options:[{key:"A",text:"The inverse matrix"},{key:"B",text:"The transposed matrix"},{key:"C",text:"A square matrix"}],correct:"B",explanation:"The superscript $T$ stands for Transpose.",memoryKey:"T for Transpose"},{id:10,text:"The product $A_{n \\times m} \\cdot B_{p \\times q}$ exists when:",options:[{key:"A",text:"$n = q$"},{key:"B",text:"$m = p$"},{key:"C",text:"$n = p$"}],correct:"B",explanation:"For matrix multiplication to be defined, the number of columns in the first matrix must equal the number of rows in the second matrix.",memoryKey:"Inner Dimensions Match"},{id:11,text:"The result of multiplying $A_{n \\times m} \\cdot B_{m \\times p}$ has dimensions:",options:[{key:"A",text:"$n \\times m$"},{key:"B",text:"$m \\times p$"},{key:"C",text:"$n \\times p$"}],correct:"C",explanation:"The resulting matrix takes the number of rows from the first matrix and the number of columns from the second matrix.",memoryKey:"Outer Dimensions"},{id:12,text:"The transposition rule of a matrix product is:",options:[{key:"A",text:"$(AB)^T = A^T B^T$"},{key:"B",text:"$(AB)^T = B^T A^T$"},{key:"C",text:"$(AB)^T = AB$"}],correct:"B",explanation:"The transpose of a product is the product of the transposes in reverse order.",memoryKey:"Reverse Order"},{id:13,text:"The distributive law of multiplication over addition is:",options:[{key:"A",text:"$A(B + C) = AB + AC$"},{key:"B",text:"$A + (B + C) = AB + AC$"},{key:"C",text:"$A(B + C) = A + B + C$"}],correct:"A",explanation:"Matrix multiplication distributes over matrix addition.",memoryKey:"Distributive Property"},{id:14,text:"A symmetric matrix satisfies:",options:[{key:"A",text:"$A = -A^T$"},{key:"B",text:"$A = A^T$"},{key:"C",text:"$A^T = 0$"}],correct:"B",explanation:"A symmetric matrix is equal to its own transpose (mirrored across the main diagonal).",memoryKey:"A = A^T"},{id:15,text:"In the matrix product, which law does not hold:",options:[{key:"A",text:"Commutativity ($AB \\neq BA$)"},{key:"B",text:"Associativity"},{key:"C",text:"Distributivity"}],correct:"A",explanation:"In general, $AB \\neq BA$. Matrix multiplication is not commutative.",memoryKey:"Not Commutative"},{id:16,text:"The determinant of a square matrix $A$ is denoted as:",options:[{key:"A",text:"$\\det(A)$ or $|A|$"},{key:"B",text:"$\\text{rank}(A)$"},{key:"C",text:"$A^{-1}$"}],correct:"A",explanation:"The determinant is denoted by $\\det(A)$ or vertical bars $|A|$.",memoryKey:"|A|"},{id:17,text:"A matrix is singular when:",options:[{key:"A",text:"$\\det(A) \\neq 0$"},{key:"B",text:"$\\det(A) = 0$"},{key:"C",text:"$A^{-1}$ exists"}],correct:"B",explanation:"A singular matrix has a determinant of zero and is not invertible.",memoryKey:"Det = 0"},{id:18,text:"For a 2ร—2 matrix $|A| = \\begin{vmatrix} a & b \\\\ c & d \\end{vmatrix}$, the determinant equals:",options:[{key:"A",text:"$a+b+c+d$"},{key:"B",text:"$ad - bc$"},{key:"C",text:"$ab - cd$"}],correct:"B",explanation:"The determinant of a 2x2 matrix is the product of the main diagonal minus the product of the antidiagonal.",memoryKey:"ad - bc"},{id:19,text:"The Sarrus rule applies to:",options:[{key:"A",text:"2ร—2 matrix"},{key:"B",text:"3ร—3 matrix"},{key:"C",text:"Any matrix"}],correct:"B",explanation:"Sarrus' rule is a shortcut method specifically for calculating the determinant of a 3x3 matrix.",memoryKey:"3x3 Only"},{id:20,text:"The Laplace expansion is used for:",options:[{key:"A",text:"Raising a matrix to a power"},{key:"B",text:"Expanding a determinant by a row or column"},{key:"C",text:"Transposing a matrix"}],correct:"B",explanation:"Laplace expansion allows calculation of determinants of any size by expanding along a row or column.",memoryKey:"Determinant Expansion"},{id:21,text:"Swapping two rows of a matrix:",options:[{key:"A",text:"Determinant doesnโ€™t change sign"},{key:"B",text:"Determinant changes sign"},{key:"C",text:"Determinant becomes $0$"}],correct:"B",explanation:"Swapping any two rows (or columns) of a matrix negates the value of the determinant.",memoryKey:"Sign Flip"},{id:22,text:"If a matrix has two identical rows, then:",options:[{key:"A",text:"$\\det(A) = 1$"},{key:"B",text:"$\\det(A) = 0$"},{key:"C",text:"$\\det(A) = -1$"}],correct:"B",explanation:"If two rows are identical, the matrix is linearly dependent, so the determinant is zero.",memoryKey:"Identical = Zero"},{id:23,text:"Adding a linear combination of other rows to one row:",options:[{key:"A",text:"Determinant doesnโ€™t change"},{key:"B",text:"Determinant doubles"},{key:"C",text:"Determinant changes sign"}],correct:"A",explanation:"This row operation preserves the volume/determinant of the matrix.",memoryKey:"Preserves Det"},{id:24,text:"For the inverse matrix, the following holds:",options:[{key:"A",text:"$A^{-1} A = I$"},{key:"B",text:"$A^{-1} A = 0$"},{key:"C",text:"$A^{-1} A = A$"}],correct:"A",explanation:"Multiplying a matrix by its inverse results in the identity matrix.",memoryKey:"Result is Identity"},{id:25,text:"The inverse matrix exists only when:",options:[{key:"A",text:"$\\det(A) \\neq 0$"},{key:"B",text:"$\\det(A) = 0$"},{key:"C",text:"$A$ is rectangular"}],correct:"A",explanation:"A matrix is invertible (non-singular) if and only if its determinant is non-zero.",memoryKey:"Non-Zero Det"},{id:26,text:"The property $\\det(A^T)$ equals:",options:[{key:"A",text:"$-\\det(A)$"},{key:"B",text:"$\\det(A)$"},{key:"C",text:"$(\\det(A))^2$"}],correct:"B",explanation:"The determinant of a matrix is the same as the determinant of its transpose.",memoryKey:"Transpose Same Det"},{id:27,text:"For a diagonal matrix $D = \\text{diag}(a, b, c)$, $\\det D$ equals:",options:[{key:"A",text:"$a+b+c$"},{key:"B",text:"$abc$"},{key:"C",text:"$a^2+b^2+c^2$"}],correct:"B",explanation:"The determinant of a diagonal (or triangular) matrix is simply the product of the diagonal elements.",memoryKey:"Product of Diagonal"},{id:28,text:"The product of determinants satisfies:",options:[{key:"A",text:"$\\det(AB) = \\det(A) + \\det(B)$"},{key:"B",text:"$\\det(AB) = \\det(A) \\cdot \\det(B)$"},{key:"C",text:"$\\det(AB) = 0$"}],correct:"B",explanation:"The determinant of a product is the product of the determinants.",memoryKey:"Product Rule"},{id:29,text:"If all elements of a row are multiplied by $k$, then:",options:[{key:"A",text:"$\\det(A)$ is multiplied by $k$"},{key:"B",text:"$\\det(A)$ is divided by $k$"},{key:"C",text:"$\\det(A)$ doesnโ€™t change"}],correct:"A",explanation:"Scaling a single row by $k$ scales the entire determinant by $k$.",memoryKey:"Row Scaling"},{id:30,text:"The Gaussโ€“Jordan method is used to:",options:[{key:"A",text:"Finding determinant"},{key:"B",text:"Finding the inverse matrix"},{key:"C",text:"Transposing a matrix"}],correct:"B",explanation:"Gauss-Jordan elimination is a method to find the inverse of a matrix or solve systems of linear equations.",memoryKey:"Inverse Finding"},{id:31,text:"The matrix form of a system of equations is:",options:[{key:"A",text:"$A + X = B$"},{key:"B",text:"$A \\cdot X = B$"},{key:"C",text:"$X = A + B$"}],correct:"B",explanation:"Coefficient Matrix ($A$) times Variable Vector ($X$) equals Constant Vector ($B$).",memoryKey:"AX = B"},{id:32,text:"The coefficient matrix of a system is denoted by:",options:[{key:"A",text:"$B$"},{key:"B",text:"$X$"},{key:"C",text:"$A$"}],correct:"C",explanation:"$A$ is the coefficient matrix, $X$ is the variable matrix, $B$ is the constant matrix.",memoryKey:"Matrix A"},{id:33,text:"A Cramerโ€™s system has a unique solution when:",options:[{key:"A",text:"$\\det(A) = 0$"},{key:"B",text:"$\\det(A) \\neq 0$"},{key:"C",text:"$A$ is rectangular"}],correct:"B",explanation:"Cramer's rule requires dividing by the main determinant $W$ ($\\det A$), so it must be non-zero.",memoryKey:"Non-Zero Main Det"},{id:34,text:"In Cramerโ€™s rule, $x_i = W_i / W$, where $W$ is:",options:[{key:"A",text:"Determinant of inverse matrix"},{key:"B",text:"Determinant of coefficient matrix"},{key:"C",text:"Determinant of augmented matrix"}],correct:"B",explanation:"$W$ is the main determinant calculated from the coefficient matrix $A$.",memoryKey:"Coeff Det"},{id:35,text:"If $W=0$ and all $W_i=0$, the system:",options:[{key:"A",text:"Has no solutions"},{key:"B",text:"Has one solution"},{key:"C",text:"Has infinitely many solutions"}],correct:"C",explanation:"This is the indefinite case, usually implying dependent equations and infinite solutions.",memoryKey:"Infinite Solutions"},{id:36,text:"If $W=0$ and at least one $W_i \\neq 0$, the system:",options:[{key:"A",text:"Inconsistent"},{key:"B",text:"Has one solution"},{key:"C",text:"Has many solutions"}],correct:"A",explanation:"This is a contradiction ($0 \\cdot x = \\text{non-zero}$), meaning the system has no solution (inconsistent).",memoryKey:"No Solution"}],[e.SEQUENCES]:[{id:101,text:"A number sequence is:",options:[{key:"A",text:"a real function of two variables"},{key:"B",text:"an assignment of one real number to each natural number"},{key:"C",text:"an arbitrary set of numbers"}],correct:"B",explanation:"Formally, a sequence is a function whose domain is the set of natural numbers $\\mathbb{N}$.",memoryKey:"Function on N"},{id:102,text:"The general term of a sequence represents:",options:[{key:"A",text:"the first term of the sequence"},{key:"B",text:"a formula describing all terms of the sequence"},{key:"C",text:"the sum of all terms"}],correct:"B",explanation:"The general term (usually denoted $a_n$) allows calculation of any term based on its position $n$.",memoryKey:"Formula for an"},{id:103,text:"A sequence that has a finite limit is called:",options:[{key:"A",text:"divergent"},{key:"B",text:"convergent"},{key:"C",text:"monotonic"}],correct:"B",explanation:"Convergence means the terms approach a specific, finite numeric value as $n$ goes to infinity.",memoryKey:"Finite Limit"},{id:104,text:"The sequence $a_n = 1/n$ is:",options:[{key:"A",text:"increasing"},{key:"B",text:"decreasing"},{key:"C",text:"constant"}],correct:"B",explanation:"As $n$ increases ($1, 2, 3...$), the value $1/n$ decreases ($1, 0.5, 0.33...$).",memoryKey:"1/n Decreases"},{id:105,text:"The sequence $a_n = \\sqrt{n}$ is:",options:[{key:"A",text:"convergent"},{key:"B",text:"divergent to infinity"},{key:"C",text:"divergent to zero"}],correct:"B",explanation:"As $n$ grows larger, the square root of $n$ also grows without bound.",memoryKey:"Unbounded Growth"},{id:106,text:"The sequence $a_n = 3$ is:",options:[{key:"A",text:"constant"},{key:"B",text:"increasing"},{key:"C",text:"decreasing"}],correct:"A",explanation:"Every term is the same ($3, 3, 3...$), so it is a constant sequence.",memoryKey:"Always 3"},{id:107,text:"The sequence $a_n = (-1)^n$ is:",options:[{key:"A",text:"convergent"},{key:"B",text:"divergent"},{key:"C",text:"increasing"}],correct:"B",explanation:"The sequence oscillates between $-1$ and $1$ forever, never settling on a single limit.",memoryKey:"Oscillating"},{id:108,text:"An arithmetic sequence satisfies the condition:",options:[{key:"A",text:"$a_{n+1} = a_n + r$"},{key:"B",text:"$a_{n+1} = a_n \\cdot q$"},{key:"C",text:"$a_{n+1} = a_n^2 + r$"}],correct:"A",explanation:"Arithmetic sequences grow by adding a constant difference ($r$) to each term.",memoryKey:"Add r"},{id:109,text:"A geometric sequence satisfies the condition:",options:[{key:"A",text:"$a_{n+1} = a_n + q$"},{key:"B",text:"$a_{n+1} = a_n \\cdot q$"},{key:"C",text:"$a_{n+1} = a_n / q$"}],correct:"B",explanation:"Geometric sequences grow by multiplying each term by a constant ratio ($q$).",memoryKey:"Multiply q"},{id:110,text:"The Fibonacci sequence is defined by:",options:[{key:"A",text:"$a_{n+1} = a_n + 1$"},{key:"B",text:"$a_{n+2} = a_{n+1} + a_n$"},{key:"C",text:"$a_{n+2} = a_{n+1} - a_n$"}],correct:"B",explanation:"Each term is the sum of the two preceding terms.",memoryKey:"Sum Previous Two"},{id:111,text:"An increasing sequence is one where:",options:[{key:"A",text:"$a_{n+1} > a_n$"},{key:"B",text:"$a_{n+1} = a_n$"},{key:"C",text:"$a_{n+1} < a_n$"}],correct:"A",explanation:"Each subsequent term is strictly greater than the one before it.",memoryKey:"Next > Previous"},{id:112,text:"A decreasing sequence is one where:",options:[{key:"A",text:"$a_{n+1} > a_n$"},{key:"B",text:"$a_{n+1} < a_n$"},{key:"C",text:"$a_{n+1} = a_n$"}],correct:"B",explanation:"Each subsequent term is strictly less than the one before it.",memoryKey:"Next < Previous"},{id:113,text:"The number $e$ (Euler's number) is the limit of the sequence:",options:[{key:"A",text:"$(1+1/n)^n$"},{key:"B",text:"$1/n$"},{key:"C",text:"$\\sqrt{n}$"}],correct:"A",explanation:"This is the classic definition of $e \\approx 2.718...$, arising from compound interest.",memoryKey:"(1 + 1/n)^n"},{id:114,text:"The sequence $a_n = q^n$ converges to zero when:",options:[{key:"A",text:"$|q| > 1$"},{key:"B",text:"$-1 < q < 1$"},{key:"C",text:"$q = 1$"}],correct:"B",explanation:"If the absolute value of the ratio is less than $1$, powers of $q$ shrink towards zero.",memoryKey:"|q| < 1"},{id:115,text:"The theorem of three sequences states that:",options:[{key:"A",text:"if $a_n \\le b_n \\le c_n$ and $\\lim a_n = \\lim c_n = g$, then $\\lim b_n = g$"},{key:"B",text:"if $a_n = b_n + c_n$, then $\\lim a_n = \\lim b_n \\cdot \\lim c_n$"},{key:"C",text:"if $a_n > b_n$, then $\\lim a_n > \\lim b_n$"}],correct:"A",explanation:"If a sequence is squeezed between two others converging to the same limit, it must also converge to that limit.",memoryKey:"Sandwich Theorem"}],[e.FUNCTIONS]:[{id:201,text:"The function $x^3$ has:",options:[{key:"A",text:"Two extrema"},{key:"B",text:"A horizontal asymptote"},{key:"C",text:"No extrema"}],correct:"C",explanation:"$f'(x) = 3x^2$ which is always $\\ge 0$. The function is strictly increasing, so no peaks/valleys.",memoryKey:"Monotonic Cubic"},{id:202,text:"The domain of $\\ln(x)$ is:",options:[{key:"A",text:"$(-\\infty, \\infty)$"},{key:"B",text:"$(0, \\infty)$"},{key:"C",text:"$(1, \\infty)$"}],correct:"B",explanation:"Logarithms are only defined for positive numbers.",memoryKey:"Positive Inputs Only"},{id:203,text:"In studying the behavior of a function, the first step is:",options:[{key:"A",text:"Integration"},{key:"B",text:"The domain"},{key:"C",text:"The derivative"}],correct:"B",explanation:"You must first determine where the function exists before analyzing it.",memoryKey:"Domain First"},{id:204,text:"The extrema of $3x^2 - 9x - 2$ occur at:",options:[{key:"A",text:"$-1$"},{key:"B",text:"$0$"},{key:"C",text:"$3/2$"}],correct:"C",explanation:"Vertex of parabola $x = -b/2a = -(-9)/(2 \\cdot 3) = 9/6 = 3/2$.",memoryKey:"-b/2a"},{id:205,text:"Where is $\\ln(x)$ defined?",options:[{key:"A",text:"All real numbers"},{key:"B",text:"$(0, \\infty)$"},{key:"C",text:"$[0, \\infty)$"}],correct:"B",explanation:"Duplicate concept check: Logarithm domain is strictly positive real numbers.",memoryKey:"x > 0"},{id:206,text:"The range (values of the function) of $e^x$ is:",options:[{key:"A",text:"$(-\\infty, 0)$"},{key:"B",text:"$(-\\infty, \\infty)$"},{key:"C",text:"$(0, \\infty)$"}],correct:"C",explanation:"Exponential functions with positive bases are always positive.",memoryKey:"Always Positive"},{id:207,text:"The function $1/x$ is undefined for:",options:[{key:"A",text:"$x = 1$"},{key:"B",text:"$x < 0$"},{key:"C",text:"$x = 0$"}],correct:"C",explanation:"Division by zero is undefined.",memoryKey:"Div by Zero"},{id:208,text:"The range of $1/x^2$ is:",options:[{key:"A",text:"All real numbers"},{key:"B",text:"Negative numbers"},{key:"C",text:"$(0, \\infty)$"}],correct:"C",explanation:"Squares are positive, and 1 divided by a positive is positive. It never reaches 0.",memoryKey:"Positive Range"},{id:209,text:"The parabola $y = x^2$ has:",options:[{key:"A",text:"Two maxima"},{key:"B",text:"A horizontal asymptote"},{key:"C",text:"A minimum at $x = 0$"}],correct:"C",explanation:"Basic standard parabola opens upwards with vertex at origin.",memoryKey:"Vertex Min"},{id:210,text:"The domain of $1/(x^2 - 4)$ is:",options:[{key:"A",text:"All real numbers"},{key:"B",text:"Only positive numbers"},{key:"C",text:"All numbers except $-2$ and $2$"}],correct:"C",explanation:"Denominator $x^2-4$ cannot be zero. $x \\neq \\pm 2$.",memoryKey:"Exclude Roots"},{id:211,text:"The function $e^x$ is:",options:[{key:"A",text:"A parabola"},{key:"B",text:"Decreasing"},{key:"C",text:"Increasing on its entire domain"}],correct:"C",explanation:"Derivative $e^x$ is always positive, so function is always increasing.",memoryKey:"Exp Growth"},{id:212,text:"The function $\\ln x$:",options:[{key:"A",text:"Has a horizontal asymptote $y = 0$"},{key:"B",text:"Is a parabola"},{key:"C",text:"Has a vertical asymptote $x = 0$"}],correct:"C",explanation:"As $x$ approaches $0$ from the right, $\\ln(x)$ goes to $-\\infty$.",memoryKey:"Vert Asym at 0"},{id:213,text:"The parabola $y = -x^2 + 4$ has the range:",options:[{key:"A",text:"$(4, \\infty)$"},{key:"B",text:"All real numbers"},{key:"C",text:"$(-\\infty, 4]$"}],correct:"C",explanation:"It opens downward with vertex at $y=4$, so all values are $\\le 4$.",memoryKey:"Max Value 4"}],[e.LIMITS]:[{id:301,text:"A vertical asymptote means:",options:[{key:"A",text:"The limit equals $0$"},{key:"B",text:"The limit exists"},{key:"C",text:"The limit tends to $\\infty$ or $-\\infty$"}],correct:"C",explanation:"Function grows without bound near the vertical line.",memoryKey:"Unbounded Growth"},{id:302,text:"$\\lim_{x \\to \\infty} \\frac{1}{e^x+1}$ equals:",options:[{key:"A",text:"$1$"},{key:"B",text:"$\\infty$"},{key:"C",text:"$0$"}],correct:"C",explanation:"$e^\\infty$ is very large. $1/\\text{large}$ approaches $0$.",memoryKey:"1/Big = 0"},{id:303,text:"L'Hospital's rule applies to:",options:[{key:"A",text:"All expressions"},{key:"B",text:"Determined expressions"},{key:"C",text:"$0/0$ and $\\infty/\\infty$ forms"}],correct:"C",explanation:"It is a technique specifically for indeterminate forms.",memoryKey:"Indeterminate Forms"},{id:304,text:"A horizontal asymptote exists when:",options:[{key:"A",text:"$f'=0$"},{key:"B",text:"The limit at infinity is finite"},{key:"C",text:"The function is differentiable"}],correct:"B",explanation:"If $\\lim_{x \\to \\infty} f(x) = L$, then $y=L$ is the horizontal asymptote.",memoryKey:"Limit at Infinity"},{id:305,text:"An asymptote at $x=1$ means:",options:[{key:"A",text:"The limit exists"},{key:"B",text:"The function is continuous"},{key:"C",text:"$|f(x)| \\to \\infty$"}],correct:"C",explanation:"Vertical asymptote definition.",memoryKey:"Explodes at x"},{id:306,text:"$\\lim_{x \\to -\\infty} \\frac{x-1}{x^2-4}$ equals:",options:[{key:"A",text:"$1$"},{key:"B",text:"$-1$"},{key:"C",text:"$0$"}],correct:"C",explanation:"Degree of denominator (2) is greater than numerator (1), so limit is $0$.",memoryKey:"Bottom Heavy"},{id:307,text:"The indeterminate form $[1^\\infty]$ is:",options:[{key:"A",text:"Determined"},{key:"B",text:"$0$"},{key:"C",text:"Indeterminate"}],correct:"C",explanation:"It requires special techniques (usually $e^{\\ln}$) to solve.",memoryKey:"Needs Work"},{id:308,text:"For $\\frac{1}{e^x+1}$, the asymptote as $x \\to -\\infty$ is:",options:[{key:"A",text:"$y=0$"},{key:"B",text:"$y=x$"},{key:"C",text:"$y=1$"}],correct:"C",explanation:"$e^{-\\infty}$ is $0$. So $1/(0+1) = 1$.",memoryKey:"e^-inf -> 0"},{id:309,text:"The horizontal asymptote of $\\frac{x-1}{x^2-4}$ is:",options:[{key:"A",text:"$y=1$"},{key:"B",text:"$y=x$"},{key:"C",text:"$y=0$"}],correct:"C",explanation:"Same logic as the limit at infinity question. $y=0$.",memoryKey:"y=0"},{id:310,text:"A function is continuous at a point when:",options:[{key:"A",text:"It has no asymptotes"},{key:"B",text:"It is differentiable"},{key:"C",text:"The limit equals the function value"}],correct:"C",explanation:"Formal definition: $\\lim_{x \\to c} f(x) = f(c)$.",memoryKey:"No Holes/Jumps"},{id:311,text:"A vertical asymptote means that:",options:[{key:"A",text:"The graph has a minimum or maximum"},{key:"B",text:"The function is bounded"},{key:"C",text:"The function grows unbounded near the point"}],correct:"C",explanation:"Rephrasing of vertical asymptote concept.",memoryKey:"Infinite Growth"},{id:312,text:"L'Hospital's rule is used when the limit has the form:",options:[{key:"A",text:"Any form"},{key:"B",text:"A real number"},{key:"C",text:"$0/0$ or $\\infty/\\infty$"}],correct:"C",explanation:"Standard application condition.",memoryKey:"0/0"},{id:313,text:"A horizontal asymptote exists when:",options:[{key:"A",text:"The derivative changes sign"},{key:"B",text:"There is a square in the denominator"},{key:"C",text:"The limit at $\\pm \\infty$ is finite"}],correct:"C",explanation:"Behavior at the far left or right ends of the graph.",memoryKey:"Finite End Behavior"}],[e.DERIVATIVES]:[{id:401,text:"The derivative of a constant function equals:",options:[{key:"A",text:"A positive constant"},{key:"B",text:"The same constant"},{key:"C",text:"$0$"}],correct:"C",explanation:"Constants do not change, so their rate of change is zero.",memoryKey:"Const -> 0"},{id:402,text:"The derivative of $x^a$ (for $a \\in \\mathbb{R}$) equals:",options:[{key:"A",text:"$x^{a+1}$"},{key:"B",text:"$ax^{a+1}$"},{key:"C",text:"$ax^{a-1}$"}],correct:"C",explanation:"Power Rule.",memoryKey:"nx^{n-1}"},{id:403,text:"The derivative of $e^x$ equals:",options:[{key:"A",text:"$xe^{x-1}$"},{key:"B",text:"$1$"},{key:"C",text:"$e^x$"}],correct:"C",explanation:"$e^x$ is the unique function that is its own derivative.",memoryKey:"Itself"},{id:404,text:"The difference quotient tends to:",options:[{key:"A",text:"The integral"},{key:"B",text:"The value of the function"},{key:"C",text:"The derivative at the point"}],correct:"C",explanation:"Limit of the difference quotient is the definition of the derivative.",memoryKey:"Def of Deriv"},{id:405,text:"A necessary condition for a local extremum is:",options:[{key:"A",text:"$f(x)=0$"},{key:"B",text:"The function is increasing"},{key:"C",text:"$f'(x)=0$"}],correct:"C",explanation:"Fermat's Theorem: tangent must be horizontal at peak/valley.",memoryKey:"Slope Zero"},{id:406,text:"If $f'(x) > 0$, the function is:",options:[{key:"A",text:"Constant"},{key:"B",text:"Decreasing"},{key:"C",text:"Increasing"}],correct:"C",explanation:"Positive rate of change implies growth.",memoryKey:"Pos Slope = Up"},{id:407,text:"If the derivative changes sign from $+$ to $-$, we have a:",options:[{key:"A",text:"Minimum"},{key:"B",text:"Increase"},{key:"C",text:"Maximum"}],correct:"C",explanation:"First Derivative Test: Going up then down means a peak.",memoryKey:"Peak Pattern"},{id:408,text:"The derivative of a multiplication is:",options:[{key:"A",text:"$f'g' + fg$"},{key:"B",text:"$f'g' - fg'$"},{key:"C",text:"$f'g + fg'$"}],correct:"C",explanation:"Product Rule: $(fg)' = f'g + fg'$.",memoryKey:"Product Rule"},{id:409,text:"The derivative of a quotient is:",options:[{key:"A",text:"$(f'g - fg')/g^2$"},{key:"B",text:"$f'g'/g$"},{key:"C",text:"$f'g + g'f$"}],correct:"A",explanation:"Quotient Rule: Low d-High minus High d-Low over Low Low.",memoryKey:"Quotient Rule"},{id:410,text:"The derivative of the composition $f(g(x))$ is:",options:[{key:"A",text:"$f(x)g(x)$"},{key:"B",text:"$f'g + fg'$"},{key:"C",text:"$f'(g(x))g'(x)$"}],correct:"C",explanation:"Chain Rule.",memoryKey:"Chain Rule"},{id:411,text:"$(\\ln x)' =$",options:[{key:"A",text:"$x \\ln x$"},{key:"B",text:"$1$"},{key:"C",text:"$1/x$"}],correct:"C",explanation:"Standard derivative of natural log.",memoryKey:"1/x"},{id:412,text:"The multiplication rule contains:",options:[{key:"A",text:"Multiplication of derivatives"},{key:"B",text:"Quotient rule"},{key:"C",text:"The sum of two components"}],correct:"C",explanation:"Referring to the Product Rule structure: $uv' + vu'$ (sum of two parts).",memoryKey:"Sum of Parts"},{id:413,text:"$(x^{-1})' =$",options:[{key:"A",text:"$-1/x^2$"},{key:"B",text:"$1/x^2$"},{key:"C",text:"$x$"}],correct:"A",explanation:"Power rule: $-1 \\cdot x^{-2} = -1/x^2$.",memoryKey:"-1/xยฒ"},{id:414,text:"If $f'(x) < 0$, the function is:",options:[{key:"A",text:"Increasing"},{key:"B",text:"Constant"},{key:"C",text:"Decreasing"}],correct:"C",explanation:"Negative slope implies decline.",memoryKey:"Neg Slope = Down"},{id:415,text:"$(\\sqrt{x})' =$",options:[{key:"A",text:"$x^{1/2}$"},{key:"B",text:"$1/x$"},{key:"C",text:"$1/(2\\sqrt{x})$"}],correct:"C",explanation:"Power rule on $x^{1/2} \\to (1/2)x^{-1/2}$.",memoryKey:"1/2root"},{id:416,text:"If $f'=0$ on an interval, the function is:",options:[{key:"A",text:"Decreasing"},{key:"B",text:"Increasing"},{key:"C",text:"Constant"}],correct:"C",explanation:"Zero rate of change everywhere means no change.",memoryKey:"Flatline"},{id:417,text:"The derivative of $x^{5/2}$ is:",options:[{key:"A",text:"$5x^{3/2}$"},{key:"B",text:"$(5/2)x^{3/2}$"},{key:"C",text:"$(2/5)x^{3/2}$"}],correct:"B",explanation:"Power rule.",memoryKey:"Power Rule"},{id:418,text:"The growth of a function is determined by:",options:[{key:"A",text:"Integration"},{key:"B",text:"The second derivative"},{key:"C",text:"The sign of the derivative"}],correct:"C",explanation:"First derivative indicates increasing/decreasing intervals.",memoryKey:"Sign of f'"},{id:419,text:"Extrema occur where:",options:[{key:"A",text:"$f'>0$"},{key:"B",text:"The function is increasing"},{key:"C",text:"$f'=0$"}],correct:"C",explanation:"Critical points.",memoryKey:"f'=0"},{id:420,text:"The derivative describes:",options:[{key:"A",text:"The area under the graph"},{key:"B",text:"The limit of a function"},{key:"C",text:"The rate of change"}],correct:"C",explanation:"Physical interpretation of derivative.",memoryKey:"Rate of Change"},{id:421,text:"A positive derivative means:",options:[{key:"A",text:"The function is constant"},{key:"B",text:"The function reaches a maximum"},{key:"C",text:"The function is increasing"}],correct:"C",explanation:"Slope is up.",memoryKey:"Going Up"},{id:422,text:"A function is increasing when:",options:[{key:"A",text:"Its derivative is constant"},{key:"B",text:"Its values are bounded"},{key:"C",text:"Larger inputs correspond to larger outputs"}],correct:"C",explanation:"Algebraic definition of increasing function.",memoryKey:"x1 f1 ln"},{id:611,text:"The constant of integration:",options:[{key:"A",text:"is always positive"},{key:"B",text:"can be any real number"},{key:"C",text:"depends on the function"}],correct:"B",explanation:"It shifts the function vertically.",memoryKey:"Any Real"},{id:612,text:"If two functions have the same derivative on an interval, they:",options:[{key:"A",text:"are identical"},{key:"B",text:"differ by a constant"},{key:"C",text:"have the same zero"}],correct:"B",explanation:"Geometric interpretation of the constant $C$.",memoryKey:"Vertical Shift"},{id:613,text:"$\\int(f(x)+g(x))dx$ equals:",options:[{key:"A",text:"$\\int f(x)dx \\cdot \\int g(x)dx$"},{key:"B",text:"$\\int f(x)dx + \\int g(x)dx$"},{key:"C",text:"$\\int f(x)g(x)dx$"}],correct:"B",explanation:"Linearity of integration.",memoryKey:"Sum Rule"},{id:614,text:"$\\int kf(x)dx$ equals:",options:[{key:"A",text:"$k \\int f(x)dx$"},{key:"B",text:"$\\int f(kx)dx$"},{key:"C",text:"$\\int f(x)dk$"}],correct:"A",explanation:"Constant multiple rule.",memoryKey:"Pull out k"},{id:615,text:"$\\int(x-2)dx$ equals:",options:[{key:"A",text:"$-x-1+C$"},{key:"B",text:"$x^2/2 - 2x + C$"},{key:"C",text:"$x^2/2 - 2 + C$"}],correct:"B",explanation:"Power rule term by term.",memoryKey:"Term by Term"},{id:616,text:"$\\int x dx$ equals:",options:[{key:"A",text:"$2x+C$"},{key:"B",text:"$x^2/2 + C$"},{key:"C",text:"$x^{1/2} + C$"}],correct:"B",explanation:"Power rule $n=1$.",memoryKey:"x^2/2"},{id:617,text:"Integration by substitution consists of:",options:[{key:"A",text:"decomposing sum"},{key:"B",text:"replacing variable"},{key:"C",text:"differentiating"}],correct:"B",explanation:"$u$-substitution technique.",memoryKey:"u-sub"},{id:618,text:"In substitution, the auxiliary variable:",options:[{key:"A",text:"must be linear"},{key:"B",text:"simplifies the integral"},{key:"C",text:"replaces constant"}],correct:"B",explanation:"Goal is to transform into a known form.",memoryKey:"Simplifies"},{id:619,text:"$\\int 1/(x-3)dx$ gives:",options:[{key:"A",text:"$\\ln|x-3|$"},{key:"B",text:"$\\ln|x-3|+C$"},{key:"C",text:"$-\\ln|x-3|+C$"}],correct:"B",explanation:"Log rule with linear inner function.",memoryKey:"ln(linear)"},{id:620,text:"Integration by parts is based on:",options:[{key:"A",text:"$(uv)'=u'v'$"},{key:"B",text:"$d(uv)=udv+vdu$"},{key:"C",text:"$(u+v)'=u'v$"}],correct:"B",explanation:"Derived from product rule.",memoryKey:"Product Rule Reverse"},{id:621,text:"In integration by parts, choose $u$ as:",options:[{key:"A",text:"easy to integrate"},{key:"B",text:"easy to differentiate"},{key:"C",text:"arbitrarily"}],correct:"B",explanation:"LIATE rule helps select $u$ to simplify derivative.",memoryKey:"LIATE"},{id:622,text:"In integration by parts, choose $dv$ as:",options:[{key:"A",text:"easy to integrate"},{key:"B",text:"easy to differentiate"},{key:"C",text:"arbitrarily"}],correct:"A",explanation:"You must be able to find $v$ from $dv$.",memoryKey:"Easy Integral"},{id:623,text:"An indefinite integral describes:",options:[{key:"A",text:"area"},{key:"B",text:"family of antiderivatives"},{key:"C",text:"number"}],correct:"B",explanation:"Set of all possible primitives.",memoryKey:"Family"},{id:624,text:"Integration is inverse to:",options:[{key:"A",text:"differentiation"},{key:"B",text:"limits"},{key:"C",text:"algebra"}],correct:"A",explanation:"Fundamental Theorem of Calculus.",memoryKey:"Inverse Deriv"},{id:625,text:"$\\int dx$ equals:",options:[{key:"A",text:"$1$"},{key:"B",text:"$x+C$"},{key:"C",text:"$\\ln x$"}],correct:"B",explanation:"Integral of $1$ is $x$.",memoryKey:"x+C"},{id:626,text:"If $F'(x)=0$, then:",options:[{key:"A",text:"$F(x)=x$"},{key:"B",text:"$F(x)=C$"},{key:"C",text:"$F(x)=0$"}],correct:"B",explanation:"Only constants have zero derivative.",memoryKey:"Constant Slope 0"},{id:627,text:"$\\int x^0 dx$ equals:",options:[{key:"A",text:"$0$"},{key:"B",text:"$\\ln x$"},{key:"C",text:"$x+C$"}],correct:"C",explanation:"$x^0 = 1$.",memoryKey:"Int 1"},{id:628,text:"$\\int(x^2-2x)dx$ equals:",options:[{key:"A",text:"$x^3/3 - x^2 + C$"},{key:"B",text:"$2x - 2 + C$"},{key:"C",text:"$x^2/2 - 2x + C$"}],correct:"A",explanation:"Power rule applied to polynomial.",memoryKey:"Poly Rule"},{id:629,text:"The integral of a negative function:",options:[{key:"A",text:"is always positive"},{key:"B",text:"is negative (definite)"},{key:"C",text:"positive"}],correct:"B",explanation:"Area below x-axis is signed negative.",memoryKey:"Negative Area"},{id:630,text:"Integral of a polynomial is:",options:[{key:"A",text:"polynomial of higher degree"},{key:"B",text:"logarithm"},{key:"C",text:"exponential"}],correct:"A",explanation:"Degree increases by 1.",memoryKey:"Degree +1"},{id:631,text:"Integration by parts is used when:",options:[{key:"A",text:"product of functions"},{key:"B",text:"rational function"},{key:"C",text:"even function"}],correct:"A",explanation:"Reverse product rule.",memoryKey:"Product"},{id:632,text:"Indefinite integral does not contain:",options:[{key:"A",text:"limits of integration"},{key:"B",text:"constants"},{key:"C",text:"functions"}],correct:"A",explanation:"It has no bounds $[a,b]$.",memoryKey:"No Limits"},{id:633,text:"Constant of integration results from:",options:[{key:"A",text:"differentiation"},{key:"B",text:"non-uniqueness"},{key:"C",text:"error"}],correct:"B",explanation:"Many functions share the same derivative.",memoryKey:"Non-Unique"},{id:634,text:"Indefinite integral is used for:",options:[{key:"A",text:"determining limits"},{key:"B",text:"solving diff equations"},{key:"C",text:"monotonicity"}],correct:"B",explanation:"Finding the function $y$ from $y'$.",memoryKey:"Solve DE"},{id:635,text:"A definite integral is:",options:[{key:"A",text:"always positive"},{key:"B",text:"dependent on $C$"},{key:"C",text:"a number (dependent on limits)"}],correct:"C",explanation:"It evaluates to a scalar value.",memoryKey:"Scalar Value"},{id:636,text:"If $F'(x)=f(x)$, then $\\int_a^b f(x)dx$ equals:",options:[{key:"A",text:"$F(a)-F(b)$"},{key:"B",text:"$F(b)-F(a)$"},{key:"C",text:"$C$"}],correct:"B",explanation:"Fundamental Theorem of Calculus.",memoryKey:"F(b)-F(a)"},{id:637,text:"Area under positive function:",options:[{key:"A",text:"definite integral"},{key:"B",text:"indefinite integral"},{key:"C",text:"no interpretation"}],correct:"A",explanation:"Geometric application.",memoryKey:"Area"},{id:638,text:"If $f(x) \\le 0$, the area is:",options:[{key:"A",text:"integral"},{key:"B",text:"-integral"},{key:"C",text:"undefined"}],correct:"B",explanation:"Area must be positive, integral is negative.",memoryKey:"-Integral"},{id:639,text:"Definite integral does not depend on:",options:[{key:"A",text:"function"},{key:"B",text:"limits"},{key:"C",text:"constant of integration"}],correct:"C",explanation:"$C$s cancel out in subtraction.",memoryKey:"No C"},{id:640,text:"Additivity property:",options:[{key:"A",text:"function"},{key:"B",text:"interval of integration"},{key:"C",text:"constant"}],correct:"B",explanation:"Integral $a$ to $c$ = $a$ to $b$ + $b$ to $c$.",memoryKey:"Split Interval"},{id:641,text:"$\\int_a^a f(x)dx$ equals:",options:[{key:"A",text:"$1$"},{key:"B",text:"$f(a)$"},{key:"C",text:"$0$"}],correct:"C",explanation:"Zero width interval.",memoryKey:"Zero Width"},{id:642,text:"Integral of sum:",options:[{key:"A",text:"sum of integrals"},{key:"B",text:"product"},{key:"C",text:"difference"}],correct:"A",explanation:"Linearity.",memoryKey:"Sum is Sum"},{id:643,text:"Constant factor in definite integral:",options:[{key:"A",text:"stays inside"},{key:"B",text:"factored out"},{key:"C",text:"disappears"}],correct:"B",explanation:"Linearity.",memoryKey:"Factor Out"},{id:644,text:"Improper integral occurs when:",options:[{key:"A",text:"continuous"},{key:"B",text:"unbounded interval/function"},{key:"C",text:"limits equal"}],correct:"B",explanation:"Infinity in bounds or asymptote.",memoryKey:"Unbounded"},{id:645,text:"$\\int_a^\\infty$ defined as:",options:[{key:"A",text:"infinite sum"},{key:"B",text:"limit of definite integrals"},{key:"C",text:"indefinite"}],correct:"B",explanation:"$\\lim_{b\\to\\infty}$ of integral $a$ to $b$.",memoryKey:"Limit Def"},{id:646,text:"If limit doesn't exist:",options:[{key:"A",text:"zero"},{key:"B",text:"convergent"},{key:"C",text:"divergent"}],correct:"C",explanation:"No finite value.",memoryKey:"Divergent"},{id:647,text:"$\\int_{-\\infty}^0 e^x dx$ is:",options:[{key:"A",text:"divergent"},{key:"B",text:"$0$"},{key:"C",text:"convergent ($1$)"}],correct:"C",explanation:"$e^0 - e^{-\\infty} = 1 - 0 = 1$.",memoryKey:"Convergent 1"},{id:648,text:"Integral over $(-\\infty, \\infty)$ is sum of:",options:[{key:"A",text:"two improper integrals"},{key:"B",text:"one definite"},{key:"C",text:"indefinite"}],correct:"A",explanation:"Split at arbitrary point (usually $0$).",memoryKey:"Split Inf"},{id:649,text:"Improper integral may be:",options:[{key:"A",text:"only positive"},{key:"B",text:"only negative"},{key:"C",text:"convergent or divergent"}],correct:"C",explanation:"Result type.",memoryKey:"Conv/Div"},{id:650,text:"Integral of PDF over $(-\\infty, \\infty)$:",options:[{key:"A",text:"$0$"},{key:"B",text:"$1$"},{key:"C",text:"undefined"}],correct:"B",explanation:"Total probability is $1$.",memoryKey:"Prob = 1"},{id:651,text:"Normal distribution PDF:",options:[{key:"A",text:"polynomial"},{key:"B",text:"contains exponential"},{key:"C",text:"linear"}],correct:"B",explanation:"Gaussian bell curve form.",memoryKey:"Exp Form"},{id:652,text:"Parameter $\\mu$ denotes:",options:[{key:"A",text:"variance"},{key:"B",text:"mean"},{key:"C",text:"std dev"}],correct:"B",explanation:"Center of distribution.",memoryKey:"Mean"},{id:653,text:"Parameter $\\sigma$ denotes:",options:[{key:"A",text:"mean"},{key:"B",text:"variance"},{key:"C",text:"standard deviation"}],correct:"C",explanation:"Spread of distribution.",memoryKey:"Std Dev"},{id:654,text:"CDF is defined as:",options:[{key:"A",text:"derivative of density"},{key:"B",text:"integral of density"},{key:"C",text:"limit"}],correct:"B",explanation:"Cumulative area.",memoryKey:"Integral PDF"},{id:655,text:"Area under density function:",options:[{key:"A",text:"Greater than $1$"},{key:"B",text:"equals $1$"},{key:"C",text:"negative"}],correct:"B",explanation:"Total probability.",memoryKey:"Area 1"},{id:656,text:"Definite integral used for:",options:[{key:"A",text:"antiderivatives"},{key:"B",text:"areas/numerical values"},{key:"C",text:"algebra"}],correct:"B",explanation:"Geometric application.",memoryKey:"Numerical"},{id:657,text:"If $f(x)$ non-negative:",options:[{key:"A",text:"integral negative"},{key:"B",text:"integral non-negative"},{key:"C",text:"zero"}],correct:"B",explanation:"Positive height = positive area.",memoryKey:"Non-neg"},{id:658,text:"$\\int_0^1 1/\\sqrt{x} dx$ is:",options:[{key:"A",text:"divergent"},{key:"B",text:"convergent"},{key:"C",text:"$0$"}],correct:"B",explanation:"Equals $2$.",memoryKey:"Conv 2"},{id:659,text:"If improper integral convergent:",options:[{key:"A",text:"limit exists"},{key:"B",text:"function continuous"},{key:"C",text:"interval closed"}],correct:"A",explanation:"Definition of convergence.",memoryKey:"Limit Exists"},{id:660,text:"Geometric interpretation:",options:[{key:"A",text:"length"},{key:"B",text:"area under graph"},{key:"C",text:"volume"}],correct:"B",explanation:"Standard definition.",memoryKey:"Area"},{id:661,text:"Orientation of interval:",options:[{key:"A",text:"no effect"},{key:"B",text:"only continuous"},{key:"C",text:"swapping limits changes sign"}],correct:"C",explanation:"Integral $a$ to $b$ = - Integral $b$ to $a$.",memoryKey:"Sign Flip"},{id:685,text:"Notation for indefinite integral:",options:[{key:"A",text:"$\\int f(x)dx$"},{key:"B",text:"$\\lim f(x)$"},{key:"C",text:"$f'(x)$"}],correct:"A",explanation:"Integral symbol.",memoryKey:"Notation"},{id:686,text:"Integral property:",options:[{key:"A",text:"$\\int(f+g) = \\int f + \\int g$"},{key:"B",text:"$\\int(f+g) = \\int f \\cdot \\int g$"},{key:"C",text:"$\\int kf = \\int f$"}],correct:"A",explanation:"Linearity.",memoryKey:"Sum Prop"},{id:687,text:"Substitution method:",options:[{key:"A",text:"replace variable"},{key:"B",text:"differentiate"},{key:"C",text:"limit"}],correct:"A",explanation:"Change of variables.",memoryKey:"Replace Var"},{id:688,text:"Substitution for $\\int 1/(2x-3) dx$:",options:[{key:"A",text:"$t=2x-3$"},{key:"B",text:"$t=x^2$"},{key:"C",text:"$t=\\ln x$"}],correct:"A",explanation:"Inner linear function.",memoryKey:"Linear Sub"},{id:689,text:"Integration by parts formula:",options:[{key:"A",text:"$\\int udv = uv - \\int vdu$"},{key:"B",text:"$\\int udv = du-v$"},{key:"C",text:"$\\int udv=u+v$"}],correct:"A",explanation:"Correct formula.",memoryKey:"uv-int vdu"},{id:690,text:"Definite integral is:",options:[{key:"A",text:"difference of antiderivatives"},{key:"B",text:"indefinite"},{key:"C",text:"derivative"}],correct:"A",explanation:"FTC Part 2.",memoryKey:"Diff Anti"},{id:691,text:"True statement:",options:[{key:"A",text:"DE contains derivatives"},{key:"B",text:"DE no independent"},{key:"C",text:"DE linear"}],correct:"A",explanation:"Definition of Differential Equation.",memoryKey:"Contains Deriv"},{id:692,text:"Compute $\\int x^2 dx$:",options:[{key:"A",text:"$x^3/3 + C$"},{key:"B",text:"$2x + C$"},{key:"C",text:"$x^2 + C$"}],correct:"A",explanation:"Power rule.",memoryKey:"Power"},{id:693,text:"Compute $\\int \\sqrt{x} dx$:",options:[{key:"A",text:"$\\frac{2}{3} x^{3/2} + C$"},{key:"B",text:"$2\\sqrt{x} + C$"},{key:"C",text:"$x^{1/2} + C$"}],correct:"A",explanation:"$x^{1/2} \\to x^{3/2} / (3/2)$.",memoryKey:"2/3 x^3/2"},{id:694,text:"Compute $\\int 1/x^2 dx$:",options:[{key:"A",text:"$-1/x + C$"},{key:"B",text:"$\\ln x + C$"},{key:"C",text:"$x^{-1} + C$"}],correct:"A",explanation:"$x^{-2} \\to x^{-1} / -1$.",memoryKey:"-1/x"},{id:695,text:"Compute $\\int 3x^2 dx$:",options:[{key:"A",text:"$x^3 + C$"},{key:"B",text:"$3x^3 + C$"},{key:"C",text:"$x^2 + C$"}],correct:"A",explanation:"$3 \\cdot x^3/3$.",memoryKey:"x^3"},{id:696,text:"Compute $\\int 5 dx$:",options:[{key:"A",text:"$5x + C$"},{key:"B",text:"$x + C$"},{key:"C",text:"$0$"}],correct:"A",explanation:"Constant rule.",memoryKey:"5x"},{id:697,text:"$\\int_0^1 x dx$:",options:[{key:"A",text:"$1/2$"},{key:"B",text:"$1$"},{key:"C",text:"$0$"}],correct:"A",explanation:"$1/2 - 0$.",memoryKey:"1/2"},{id:698,text:"$\\int_0^1 1 dx$:",options:[{key:"A",text:"$1$"},{key:"B",text:"$2$"},{key:"C",text:"$3$"}],correct:"A",explanation:"$1 - 0$.",memoryKey:"1"},{id:699,text:"$\\int k f(x) dx$:",options:[{key:"A",text:"$k \\int f(x)dx$"},{key:"B",text:"$\\int f(x)dx + k$"},{key:"C",text:"$\\int f(kx)dx$"}],correct:"A",explanation:"Constant multiple.",memoryKey:"Const Mult"}],[e.DIFF_EQ]:[{id:801,text:"A first-order differential equation is:",options:[{key:"A",text:"algebraic"},{key:"B",text:"equation containing first derivative"},{key:"C",text:"quadratic"}],correct:"B",explanation:"Order 1 means max derivative is $y'$.",memoryKey:"1st Deriv"},{id:802,text:"The general solution of a DE is:",options:[{key:"A",text:"a number"},{key:"B",text:"a family of functions (parameter)"},{key:"C",text:"no constants"}],correct:"B",explanation:"Contains arbitrary constants ($C$).",memoryKey:"Family"},{id:803,text:"A particular solution is obtained:",options:[{key:"A",text:"by differentiation"},{key:"B",text:"by applying initial conditions"},{key:"C",text:"definite int"}],correct:"B",explanation:"Fixing $C$ to a specific value.",memoryKey:"Init Cond"},{id:804,text:"The equation $y'=2y$ is:",options:[{key:"A",text:"linear"},{key:"B",text:"separable"},{key:"C",text:"second-order"}],correct:"B",explanation:"Separable ($dy/y = 2dx$). (Also linear, but separable is primary method logic here)",memoryKey:"Separable"},{id:805,text:"Method of separation of variables:",options:[{key:"A",text:"changing variable"},{key:"B",text:"separating $y$ and $x$"},{key:"C",text:"parts"}],correct:"B",explanation:"Moving terms to opposite sides.",memoryKey:"Separate"},{id:806,text:"Equation $dN/dt = -\\lambda N$ describes:",options:[{key:"A",text:"pop growth"},{key:"B",text:"radioactive decay"},{key:"C",text:"logistic"}],correct:"B",explanation:"Negative rate proportional to amount.",memoryKey:"Decay"},{id:807,text:"Constant $\\lambda$ in decay denotes:",options:[{key:"A",text:"decay probability per time"},{key:"B",text:"half-life"},{key:"C",text:"initial"}],correct:"A",explanation:"Rate constant.",memoryKey:"Prob/Time"},{id:808,text:"Malthus model describes:",options:[{key:"A",text:"limited growth"},{key:"B",text:"exponential growth"},{key:"C",text:"decline"}],correct:"B",explanation:"Unbounded geometric growth.",memoryKey:"Exp Growth"},{id:809,text:"Equation $dN/dt = (r-s)N$ describes:",options:[{key:"A",text:"growth without mortality"},{key:"B",text:"growth including mortality"},{key:"C",text:"logistic"}],correct:"B",explanation:"Net rate = birth - death.",memoryKey:"Net Rate"},{id:810,text:"Verhulst model accounts for:",options:[{key:"A",text:"reproduction only"},{key:"B",text:"limited resources"},{key:"C",text:"mortality only"}],correct:"B",explanation:"Carrying capacity (Logistic).",memoryKey:"Limited"},{id:811,text:"Newton's law of cooling describes:",options:[{key:"A",text:"temp increase"},{key:"B",text:"temp difference"},{key:"C",text:"const"}],correct:"B",explanation:"Rate proportional to difference.",memoryKey:"Temp Diff"},{id:812,text:"DEs are used for:",options:[{key:"A",text:"geometry"},{key:"B",text:"modeling dynamic phenomena"},{key:"C",text:"algebra"}],correct:"B",explanation:"Change over time.",memoryKey:"Dynamic"},{id:813,text:"Gompertz model describes:",options:[{key:"A",text:"linear"},{key:"B",text:"epidemic/tumor (decreasing rate)"},{key:"C",text:"decay"}],correct:"B",explanation:"Sigmoidal but asymmetric.",memoryKey:"Tumor"},{id:814,text:"Ordinary differential equation:",options:[{key:"A",text:"many indep vars"},{key:"B",text:"one independent variable"},{key:"C",text:"no deriv"}],correct:"B",explanation:"vs Partial DE.",memoryKey:"One Indep"},{id:815,text:"DE without initial conditions has:",options:[{key:"A",text:"one solution"},{key:"B",text:"many solutions"},{key:"C",text:"no solution"}],correct:"B",explanation:"Infinitely many (General Solution).",memoryKey:"Many"},{id:816,text:"Initial conditions used to:",options:[{key:"A",text:"check continuity"},{key:"B",text:"determine constant"},{key:"C",text:"diff"}],correct:"B",explanation:"Find $C$.",memoryKey:"Find C"},{id:817,text:"A particular solution is:",options:[{key:"A",text:"family"},{key:"B",text:"single function"},{key:"C",text:"limit"}],correct:"B",explanation:"Unique curve.",memoryKey:"Single Func"},{id:818,text:"$y'=f(x)$ is solved by:",options:[{key:"A",text:"differentiation"},{key:"B",text:"indefinite integration"},{key:"C",text:"definite"}],correct:"B",explanation:"Direct integration.",memoryKey:"Integrate"},{id:819,text:"Separable equation form:",options:[{key:"A",text:"$y'=f(x,y)$"},{key:"B",text:"$g(y)dy=f(x)dx$"},{key:"C",text:"linear"}],correct:"B",explanation:"Variables separated.",memoryKey:"Split"},{id:820,text:"Differential equations describe:",options:[{key:"A",text:"motion only"},{key:"B",text:"changes"},{key:"C",text:"linear functions"}],correct:"B",explanation:"Rates of change.",memoryKey:"Change"},{id:821,text:"First-order DE contains:",options:[{key:"A",text:"only $y$"},{key:"B",text:"only $x$"},{key:"C",text:"derivative $y'$"}],correct:"C",explanation:"Must have $y'$.",memoryKey:"y'"},{id:822,text:"Applications include:",options:[{key:"A",text:"math only"},{key:"B",text:"physics, biology, medicine"},{key:"C",text:"stats"}],correct:"B",explanation:"Broad utility.",memoryKey:"Science"},{id:823,text:"Two functions with same derivative:",options:[{key:"A",text:"differ by constant"},{key:"B",text:"identical"},{key:"C",text:"diff sign"}],correct:"A",explanation:"Parallel curves.",memoryKey:"Constant Diff"},{id:824,text:"General solution of $y'=ky$:",options:[{key:"A",text:"$y=Ce^{kx}$"},{key:"B",text:"$y=kx+C$"},{key:"C",text:"polynomial"}],correct:"A",explanation:"Exponential growth/decay.",memoryKey:"Ce^kx"},{id:825,text:"If $y'=-\\lambda y$, solution describes:",options:[{key:"A",text:"exp decay"},{key:"B",text:"linear"},{key:"C",text:"oscillation"}],correct:"A",explanation:"Negative exponent.",memoryKey:"Decay"},{id:826,text:"Law of radioactive decay:",options:[{key:"A",text:"$dN/dt = -\\lambda N$"},{key:"B",text:"linear"},{key:"C",text:"positive"}],correct:"A",explanation:"Differential form.",memoryKey:"Eq"},{id:827,text:"Condition $N(T_{1/2}) = N_0/2$:",options:[{key:"A",text:"half-life"},{key:"B",text:"total time"},{key:"C",text:"initial"}],correct:"A",explanation:"Definition of half-life.",memoryKey:"Half-Life"},{id:828,text:"Solutions of $y'=ay$:",options:[{key:"A",text:"exponential"},{key:"B",text:"polynomial"},{key:"C",text:"trig"}],correct:"A",explanation:"$y = Ce^{ax}$.",memoryKey:"Exp"},{id:829,text:"DE always contains:",options:[{key:"A",text:"derivative"},{key:"B",text:"integral"},{key:"C",text:"graph"}],correct:"A",explanation:"By definition.",memoryKey:"Deriv"},{id:830,text:"Parameter $C$ denotes:",options:[{key:"A",text:"constant of integration"},{key:"B",text:"variable"},{key:"C",text:"derivative"}],correct:"A",explanation:"Arbitrary constant.",memoryKey:"Const"},{id:831,text:"Set of general solutions forms:",options:[{key:"A",text:"family of curves"},{key:"B",text:"line"},{key:"C",text:"point"}],correct:"A",explanation:"Infinite curves.",memoryKey:"Family"}]},a="math_biotech_exam_perf_v1",k=()=>{try{if(typeof window>"u")return{};const t=window.localStorage.getItem(a);return t?JSON.parse(t):{}}catch{return{}}},C=(t,n)=>{try{const i=k(),o=i[t]||{correct:0,incorrect:0,lastAttempt:0};n?o.correct++:o.incorrect++,o.lastAttempt=Date.now(),i[t]=o,window.localStorage.setItem(a,JSON.stringify(i))}catch(i){console.warn("Failed to save exam result",i)}},v=t=>{if(!t)return"UNSEEN";const n=t.correct+t.incorrect;return n===0?"UNSEEN":t.correct>=3&&t.correct/n>=.8?"MASTERED":"LEARNING"},B=()=>{window.localStorage.removeItem(a)};export{u as B,h as T,v as a,A as e,k as g,g as q,B as r,C as s}; diff --git a/site/assets/extends-CF3RwP-h.js b/site/assets/extends-CF3RwP-h.js new file mode 100644 index 0000000..5975f53 --- /dev/null +++ b/site/assets/extends-CF3RwP-h.js @@ -0,0 +1 @@ +function e(){return e=Object.assign?Object.assign.bind():function(t){for(var n=1;n1&&arguments[1]!==void 0?arguments[1]:"any";const J=U?l(U).index:t.length,ne=[];for(let ce=0;ce{const ne=i.get(J);return!ne.isAny&&ne.test(R)});return U.length?U:["any"]}function m(R){return R&&typeof R=="function"&&"_typedFunctionData"in R}function v(R,U,J){if(!m(R))throw new TypeError(Vo);const ne=J&&J.exact,ve=Array.isArray(U)?U.join(","):U,ce=b(ve),he=w(ce);if(!ne||he in R.signatures){const Me=R._typedFunctionData.signatureMap.get(he);if(Me)return Me}const be=ce.length;let Ae;if(ne){Ae=[];let Me;for(Me in R.signatures)Ae.push(R._typedFunctionData.signatureMap.get(Me))}else Ae=R._typedFunctionData.signatures;for(let Me=0;Me!Z.has(ie.name)))continue}Fe.push(lr)}}if(Ae=Fe,Ae.length===0)break}let ge;for(ge of Ae)if(ge.params.length<=be)return ge;throw new TypeError("Signature not found (signature: "+(R.name||"unnamed")+"("+w(ce,", ")+"))")}function d(R,U,J){return v(R,U,J).implementation}function p(R,U){const J=l(U);if(J.test(R))return R;const ne=J.conversionsTo;if(ne.length===0)throw new Error("There are no conversions to "+U+" defined.");for(let ve=0;ve1&&arguments[1]!==void 0?arguments[1]:",";return R.map(J=>J.name).join(U)}function g(R){const U=R.indexOf("...")===0,ne=(U?R.length>3?R.slice(3):"any":R).split("|").map(be=>l(be.trim()));let ve=!1,ce=U?"...":"";return{types:ne.map(function(be){return ve=be.isAny||ve,ce+=be.name+"|",{name:be.name,typeIndex:be.index,test:be.test,isAny:be.isAny,conversion:null,conversionIndex:-1}}),name:ce.slice(0,-1),hasAny:ve,hasConversion:!1,restParam:U}}function N(R){const U=R.types.map(he=>he.name),J=B(U);let ne=R.hasAny,ve=R.name;const ce=J.map(function(he){const be=l(he.from);return ne=be.isAny||ne,ve+="|"+he.from,{name:he.from,typeIndex:be.index,test:be.test,isAny:be.isAny,conversion:he,conversionIndex:he.index}});return{types:R.types.concat(ce),name:ve,hasAny:ne,hasConversion:ce.length>0,restParam:R.restParam}}function h(R){return R.typeSet||(R.typeSet=new Set,R.types.forEach(U=>R.typeSet.add(U.name))),R.typeSet}function b(R){const U=[];if(typeof R!="string")throw new TypeError("Signatures must be strings");const J=R.trim();if(J==="")return U;const ne=J.split(",");for(let ve=0;ve=ve+1}}else return R.length===0?function(ce){return ce.length===0}:R.length===1?(J=y(R[0]),function(ce){return J(ce[0])&&ce.length===1}):R.length===2?(J=y(R[0]),ne=y(R[1]),function(ce){return J(ce[0])&&ne(ce[1])&&ce.length===2}):(U=R.map(y),function(ce){for(let he=0;he{const ve=D(ne.params,U);let ce;for(ce of ve)J.add(ce)}),J.has("any")?["any"]:Array.from(J)}function F(R,U,J){let ne,ve;const ce=R||"unnamed";let he=J,be;for(be=0;be{const lr=S(Fe.params,be),M=y(lr);(be0){const Fe=f(U[be]);return ne=new TypeError("Unexpected type of argument in function "+ce+" (expected: "+ve.join(" or ")+", actual: "+Fe.join(" | ")+", index: "+be+")"),ne.data={category:"wrongType",fn:ce,index:be,actual:Fe,expected:ve},ne}}else he=He}const Ae=he.map(function(He){return x(He.params)?1/0:He.params.length});if(U.lengthge)return ne=new TypeError("Too many arguments in function "+ce+" (expected: "+ge+", actual: "+U.length+")"),ne.data={category:"tooManyArgs",fn:ce,index:U.length,expectedLength:ge},ne;const Me=[];for(let He=0;He0)return .001;const ne=I(R),ve=I(U);if(R.hasConversion){if(!U.hasConversion)return(1+ne)*1e-6}else if(U.hasConversion)return-(1+ve)*1e-6;const ce=ne-ve;return ce<0?-1e-7:ce>0?1e-7:0}function T(R,U){const J=R.params,ne=U.params,ve=ee(J),ce=ee(ne),he=x(J),be=x(ne);if(he&&ve.hasAny){if(!be||!ce.hasAny)return 1e7}else if(be&&ce.hasAny)return-1e7;let Ae=0,ge=0,Me;for(Me of J)Me.hasAny&&++Ae,Me.hasConversion&&++ge;let He=0,Fe=0;for(Me of ne)Me.hasAny&&++He,Me.hasConversion&&++Fe;if(Ae!==He)return(Ae-He)*1e6;if(he&&ve.hasConversion){if(!be||!ce.hasConversion)return 1e5}else if(be&&ce.hasConversion)return-1e5;if(ge!==Fe)return(ge-Fe)*1e4;if(he){if(!be)return 1e3}else if(be)return-1e3;const lr=(J.length-ne.length)*(he?-100:100);if(lr!==0)return lr;const M=[];let Z=0;for(let Ie=0;Iece.hasConversion)){const ce=x(R),he=R.map(O);ne=he.map(be=>be.name).join(";"),J=function(){const Ae=[],ge=ce?arguments.length-1:arguments.length;for(let Me=0;Me"+ge.conversion.to+",",ce.push(l(ge.conversion.from).test),he.push(ge.conversion.convert))}),be?be=be.slice(0,-1):be="pass";let Ae=ge=>ge;switch(he.length){case 0:break;case 1:U=ce[0],ne=he[0],Ae=function(Me){return U(Me)?ne(Me):Me};break;case 2:U=ce[0],J=ce[1],ne=he[0],ve=he[1],Ae=function(Me){return U(Me)?ne(Me):J(Me)?ve(Me):Me};break;default:Ae=function(Me){for(let He=0;HeAe.name).join("|"),hasAny:be.some(Ae=>Ae.isAny),hasConversion:!1,restParam:!0}),he.push(ce)}else he=ce.types.map(function(be){return{types:[be],name:be.name,hasAny:be.isAny,hasConversion:be.conversion,restParam:!1}});return pe(he,function(be){return U(J,ne+1,ve.concat([be]))})}else return[ve]}return U(R,0,[])}function K(R,U){const J=Math.max(R.length,U.length);for(let be=0;be=ne:he?ne>=ve:ne===ve}function V(R){return R.map(U=>te(U)?P(U.referToSelf.callback):H(U)?Ee(U.referTo.references,U.referTo.callback):U)}function z(R,U,J){const ne=[];let ve;for(ve of R){let ce=J[ve];if(typeof ce!="number")throw new TypeError('No definition for referenced signature "'+ve+'"');if(ce=U[ce],typeof ce!="function")return!1;ne.push(ce)}return ne}function Q(R,U,J){const ne=V(R),ve=new Array(ne.length).fill(!1);let ce=!0;for(;ce;){ce=!1;let he=!0;for(let be=0;be{const ne=R[J];if(U.test(ne.toString()))throw new SyntaxError("Using `this` to self-reference a function is deprecated since typed-function@3. Use typed.referTo and typed.referToSelf instead.")})}function j(R,U){if(o.createCount++,Object.keys(U).length===0)throw new SyntaxError("No signatures provided");o.warnAgainstDeprecatedThis&&le(U);const J=[],ne=[],ve={},ce=[];let he;for(he in U){if(!Object.prototype.hasOwnProperty.call(U,he))continue;const tr=b(he);if(!tr)continue;J.forEach(function(Un){if(K(Un,tr))throw new TypeError('Conflicting signatures "'+w(Un)+'" and "'+w(tr)+'".')}),J.push(tr);const Ur=ne.length;ne.push(U[he]);const rd=tr.map(N);let sa;for(sa of Y(rd)){const Un=w(sa);ce.push({params:sa,name:Un,fn:Ur}),sa.every(td=>!td.hasConversion)&&(ve[Un]=Ur)}}ce.sort(T);const be=Q(ne,ve,Pn);let Ae;for(Ae in ve)Object.prototype.hasOwnProperty.call(ve,Ae)&&(ve[Ae]=be[ve[Ae]]);const ge=[],Me=new Map;for(Ae of ce)Me.has(Ae.name)||(Ae.fn=be[Ae.fn],ge.push(Ae),Me.set(Ae.name,Ae));const He=ge[0]&&ge[0].params.length<=2&&!x(ge[0].params),Fe=ge[1]&&ge[1].params.length<=2&&!x(ge[1].params),lr=ge[2]&&ge[2].params.length<=2&&!x(ge[2].params),M=ge[3]&&ge[3].params.length<=2&&!x(ge[3].params),Z=ge[4]&&ge[4].params.length<=2&&!x(ge[4].params),ie=ge[5]&&ge[5].params.length<=2&&!x(ge[5].params),xe=He&&Fe&&lr&&M&&Z&&ie;for(let tr=0;trtr.test),jp=ge.map(tr=>tr.implementation),ed=function(){for(let Ur=Jp;Urw(b(J))),U=ee(arguments);if(typeof U!="function")throw new TypeError("Callback function expected as last argument");return Ee(R,U)}function Ee(R,U){return{referTo:{references:R,callback:U}}}function P(R){if(typeof R!="function")throw new TypeError("Callback function expected as first argument");return{referToSelf:{callback:R}}}function H(R){return R&&typeof R.referTo=="object"&&Array.isArray(R.referTo.references)&&typeof R.referTo.callback=="function"}function te(R){return R&&typeof R.referToSelf=="object"&&typeof R.referToSelf.callback=="function"}function k(R,U){if(!R)return U;if(U&&U!==R){const J=new Error("Function names do not match (expected: "+R+", actual: "+U+")");throw J.data={actual:U,expected:R},J}return R}function X(R){let U;for(const J in R)Object.prototype.hasOwnProperty.call(R,J)&&(m(R[J])||typeof R[J].signature=="string")&&(U=k(U,R[J].name));return U}function W(R,U){let J;for(J in U)if(Object.prototype.hasOwnProperty.call(U,J)){if(J in R&&U[J]!==R[J]){const ne=new Error('Signature "'+J+'" is defined twice');throw ne.data={signature:J,sourceFunction:U[J],destFunction:R[J]},ne}R[J]=U[J]}}const me=o;o=function(R){const U=typeof R=="string",J=U?1:0;let ne=U?R:"";const ve={};for(let ce=J;ce1&&arguments[1]!==void 0?arguments[1]:{override:!1};fe(R);const J=l(R.to),ne=J.conversionsTo.find(ve=>ve.from===R.from);if(ne)if(U&&U.override)o.removeConversion({from:ne.from,to:R.to,convert:ne.convert});else throw new Error('There is already a conversion from "'+R.from+'" to "'+J.name+'"');J.conversionsTo.push({from:R.from,to:J.name,convert:R.convert,index:n++})},o.addConversions=function(R,U){R.forEach(J=>o.addConversion(J,U))},o.removeConversion=function(R){fe(R);const U=l(R.to),J=se(U.conversionsTo,ve=>ve.from===R.from);if(!J)throw new Error("Attempt to remove nonexistent conversion from "+R.from+" to "+R.to);if(J.convert!==R.convert)throw new Error("Conversion to remove does not match existing conversion");const ne=U.conversionsTo.indexOf(J);U.conversionsTo.splice(ne,1)},o.resolve=function(R,U){if(!m(R))throw new TypeError(Vo);const J=R._typedFunctionData.signatures;for(let ne=0;ne0?1:e<0?-1:0},wd=Math.log2||function(r){return Math.log(r)/Math.LN2},Nd=Math.log10||function(r){return Math.log(r)/Math.LN10},Dd=Math.log1p||function(e){return Math.log(e+1)},Ad=Math.cbrt||function(r){if(r===0)return r;var a=r<0,i;return a&&(r=-r),isFinite(r)?(i=Math.exp(Math.log(r)/3),i=(r/(i*i)+2*i)/3):i=r,a?-i:i},Ed=Math.expm1||function(r){return r>=2e-4||r<=-2e-4?Math.exp(r)-1:r+r*r/2+r*r*r/6};function Fi(e,r,a){var i={2:"0b",8:"0o",16:"0x"},t=i[r],n="";if(a){if(a<1)throw new Error("size must be in greater than 0");if(!Ce(a))throw new Error("size must be an integer");if(e>2**(a-1)-1||e<-(2**(a-1)))throw new Error("Value must be in range [-2^".concat(a-1,", 2^").concat(a-1,"-1]"));if(!Ce(e))throw new Error("Value must be an integer");e<0&&(e=e+2**a),n="i".concat(a)}var o="";return e<0&&(e=-e,o="-"),"".concat(o).concat(t).concat(e.toString(r)).concat(n)}function Vt(e,r){if(typeof r=="function")return r(e);if(e===1/0)return"Infinity";if(e===-1/0)return"-Infinity";if(isNaN(e))return"NaN";var{notation:a,precision:i,wordSize:t}=Of(r);switch(a){case"fixed":return _f(e,i);case"exponential":return $f(e,i);case"engineering":return Sd(e,i);case"bin":return Fi(e,2,t);case"oct":return Fi(e,8,t);case"hex":return Fi(e,16,t);case"auto":return Cd(e,i,r).replace(/((\.\d*?)(0+))($|e)/,function(){var n=arguments[2],o=arguments[4];return n!=="."?n+o:o});default:throw new Error('Unknown notation "'+a+'". Choose "auto", "exponential", "fixed", "bin", "oct", or "hex.')}}function Of(e){var r="auto",a,i;if(e!==void 0)if(Ue(e))a=e;else if(Le(e))a=e.toNumber();else if(oi(e))e.precision!==void 0&&(a=Zo(e.precision,()=>{throw new Error('Option "precision" must be a number or BigNumber')})),e.wordSize!==void 0&&(i=Zo(e.wordSize,()=>{throw new Error('Option "wordSize" must be a number or BigNumber')})),e.notation&&(r=e.notation);else throw new Error("Unsupported type of options, number, BigNumber, or object expected");return{notation:r,precision:a,wordSize:i}}function Kn(e){var r=String(e).toLowerCase().match(/^(-?)(\d+\.?\d*)(e([+-]?\d+))?$/);if(!r)throw new SyntaxError("Invalid number "+e);var a=r[1],i=r[2],t=parseFloat(r[4]||"0"),n=i.indexOf(".");t+=n!==-1?n-1:i.length-1;var o=i.replace(".","").replace(/^0*/,function(l){return t-=l.length,""}).replace(/0*$/,"").split("").map(function(l){return parseInt(l)});return o.length===0&&(o.push(0),t++),{sign:a,coefficients:o,exponent:t}}function Sd(e,r){if(isNaN(e)||!isFinite(e))return String(e);var a=Kn(e),i=ui(a,r),t=i.exponent,n=i.coefficients,o=t%3===0?t:t<0?t-3-t%3:t-t%3;if(Ue(r))for(;r>n.length||t-o+1>n.length;)n.push(0);else for(var l=Math.abs(t-o)-(n.length-1),u=0;u0;)c++,s--;var f=n.slice(c).join(""),m=Ue(r)&&f.length||f.match(/[1-9]/)?"."+f:"",v=n.slice(0,c).join("")+m+"e"+(t>=0?"+":"")+o.toString();return i.sign+v}function _f(e,r){if(isNaN(e)||!isFinite(e))return String(e);var a=Kn(e),i=typeof r=="number"?ui(a,a.exponent+1+r):a,t=i.coefficients,n=i.exponent+1,o=n+(r||0);return t.length0?"."+t.join(""):"")+"e"+(n>=0?"+":"")+n}function Cd(e,r,a){if(isNaN(e)||!isFinite(e))return String(e);var i=Xo(a==null?void 0:a.lowerExp,-3),t=Xo(a==null?void 0:a.upperExp,5),n=Kn(e),o=r?ui(n,r):n;if(o.exponent=t)return $f(e,r);var l=o.coefficients,u=o.exponent;l.length0?u:0;return sr){var t=i.splice(r,i.length-r);if(t[0]>=5){var n=r-1;for(i[n]++;i[n]===10;)i.pop(),n===0&&(i.unshift(0),a.exponent++,n++),n--,i[n]++}}return a}function vn(e){for(var r=[],a=0;a0?!0:r<0?!1:1/r===1/0;return a^i?-e:e}function Zo(e,r){if(Ue(e))return e;if(Le(e))return e.toNumber();r()}function Xo(e,r){return Ue(e)?e:Le(e)?e.toNumber():r}function Bi(e,r,a){var i=e.constructor,t=new i(2),n="";if(a){if(a<1)throw new Error("size must be in greater than 0");if(!Ce(a))throw new Error("size must be an integer");if(e.greaterThan(t.pow(a-1).sub(1))||e.lessThan(t.pow(a-1).mul(-1)))throw new Error("Value must be in range [-2^".concat(a-1,", 2^").concat(a-1,"-1]"));if(!e.isInteger())throw new Error("Value must be an integer");e.lessThan(0)&&(e=e.add(t.pow(a))),n="i".concat(a)}switch(r){case 2:return"".concat(e.toBinary()).concat(n);case 8:return"".concat(e.toOctal()).concat(n);case 16:return"".concat(e.toHexadecimal()).concat(n);default:throw new Error("Base ".concat(r," not supported "))}}function Rd(e,r){if(typeof r=="function")return r(e);if(!e.isFinite())return e.isNaN()?"NaN":e.gt(0)?"Infinity":"-Infinity";var{notation:a,precision:i,wordSize:t}=Of(r);switch(a){case"fixed":return Pd(e,i);case"exponential":return Yo(e,i);case"engineering":return zd(e,i);case"bin":return Bi(e,2,t);case"oct":return Bi(e,8,t);case"hex":return Bi(e,16,t);case"auto":{var n=Wo(r==null?void 0:r.lowerExp,-3),o=Wo(r==null?void 0:r.upperExp,5);if(e.isZero())return"0";var l,u=e.toSignificantDigits(i),s=u.e;return s>=n&&s=0?"+":"")+i.toString()}function Yo(e,r){return r!==void 0?e.toExponential(r-1):e.toExponential()}function Pd(e,r){return e.toFixed(r)}function Wo(e,r){return Ue(e)?e:Le(e)?e.toNumber():r}function Ud(e,r){var a=e.length-r.length,i=e.length;return e.substring(a,i)===r}function Ge(e,r){var a=Ld(e,r);return r&&typeof r=="object"&&"truncate"in r&&a.length>r.truncate?a.substring(0,r.truncate-3)+"...":a}function Ld(e,r){if(typeof e=="number")return Vt(e,r);if(Le(e))return Rd(e,r);if(kd(e))return!r||r.fraction!=="decimal"?e.s*e.n+"/"+e.d:e.toString();if(Array.isArray(e))return If(e,r);if(Cr(e))return fn(e);if(typeof e=="function")return e.syntax?String(e.syntax):"function";if(e&&typeof e=="object"){if(typeof e.format=="function")return e.format(r);if(e&&e.toString(r)!=={}.toString())return e.toString(r);var a=Object.keys(e).map(i=>fn(i)+": "+Ge(e[i],r));return"{"+a.join(", ")+"}"}return String(e)}function fn(e){for(var r=String(e),a="",i=0;i/g,">"),r}function If(e,r){if(Array.isArray(e)){for(var a="[",i=e.length,t=0;tr?1:-1}function Ve(e,r,a){if(!(this instanceof Ve))throw new SyntaxError("Constructor must be called with the new operator");this.actual=e,this.expected=r,this.relation=a,this.message="Dimension mismatch ("+(Array.isArray(e)?"["+e.join(", ")+"]":e)+" "+(this.relation||"!=")+" "+(Array.isArray(r)?"["+r.join(", ")+"]":r)+")",this.stack=new Error().stack}Ve.prototype=new RangeError;Ve.prototype.constructor=RangeError;Ve.prototype.name="DimensionError";Ve.prototype.isDimensionError=!0;function it(e,r,a){if(!(this instanceof it))throw new SyntaxError("Constructor must be called with the new operator");this.index=e,arguments.length<3?(this.min=0,this.max=r):(this.min=r,this.max=a),this.min!==void 0&&this.index=this.max?this.message="Index out of range ("+this.index+" > "+(this.max-1)+")":this.message="Index out of range ("+this.index+")",this.stack=new Error().stack}it.prototype=new RangeError;it.prototype.constructor=RangeError;it.prototype.name="IndexError";it.prototype.isIndexError=!0;function Pe(e){for(var r=[];Array.isArray(e);)r.push(e.length),e=e[0];return r}function qf(e,r,a){var i,t=e.length;if(t!==r[a])throw new Ve(t,r[a]);if(a")}function Qo(e,r){var a=r.length===0;if(a){if(Array.isArray(e))throw new Ve(e.length,0)}else qf(e,r,0)}function qa(e,r){var a=e.isMatrix?e._size:Pe(e),i=r._sourceSize;i.forEach((t,n)=>{if(t!==null&&t!==a[n])throw new Ve(t,a[n])})}function nr(e,r){if(e!==void 0){if(!Ue(e)||!Ce(e))throw new TypeError("Index must be an integer (value: "+e+")");if(e<0||typeof r=="number"&&e>=r)throw new it(e,r)}}function hn(e){for(var r=0;r=0,u=r%a===0;if(l)if(u)i[n]=-r/a;else throw new Error("Could not replace wildcard, since "+r+" is no multiple of "+-a);return i}function Rf(e){return e.reduce((r,a)=>r*a,1)}function Hd(e,r){for(var a=e,i,t=r.length-1;t>0;t--){var n=r[t];i=[];for(var o=a.length/n,l=0;lr.test(a))}function Ko(e,r){return Array.prototype.join.call(e,r)}function yn(e){if(!Array.isArray(e))throw new TypeError("Array input expected");if(e.length===0)return e;var r=[],a=0;r[0]={value:e[0],identifier:0};for(var i=1;i1)return e.slice(1).reduce(function(a,i){return kf(a,i,r,0)},e[0]);throw new Error("Wrong number of arguments in function concat")}function Gd(){for(var e=arguments.length,r=new Array(e),a=0;am.length),t=Math.max(...i),n=new Array(t).fill(null),o=0;on[c]&&(n[c]=l[s])}for(var f=0;f1||e[t]>r[n])throw new Error("shape missmatch: missmatch is found in arg with shape (".concat(e,") not possible to broadcast dimension ").concat(i," with size ").concat(e[t]," to size ").concat(r[n]))}}function jo(e,r){var a=Pe(e);if(Xt(a,r))return e;Ua(a,r);var i=Gd(a,r),t=i.length,n=[...Array(t-a.length).fill(1),...a],o=Zd(e);a.length!Yd(n)).every(n=>a[n]!==void 0);if(!i){var t=r.filter(n=>a[n]===void 0);throw new Error('Cannot create function "'.concat(e,'", ')+"some dependencies are missing: ".concat(t.map(n=>'"'.concat(n,'"')).join(", "),"."))}}function Yd(e){return e&&e[0]==="?"}function Wd(e){return e&&e[0]==="?"?e.slice(1):e}function Or(e,r){if(Vf(e)&&Gf(e,r))return e[r];throw typeof e[r]=="function"&&uo(e,r)?new Error('Cannot access method "'+r+'" as a property'):new Error('No access to property "'+r+'"')}function bn(e,r,a){if(Vf(e)&&Gf(e,r))return e[r]=a,a;throw new Error('No access to property "'+r+'"')}function Jd(e,r){return r in e}function Gf(e,r){return!e||typeof e!="object"?!1:Se(Kd,r)?!0:!(r in Object.prototype||r in Function.prototype)}function Qd(e,r){if(!uo(e,r))throw new Error('No access to method "'+r+'"');return e[r]}function uo(e,r){return e==null||typeof e[r]!="function"||Se(e,r)&&Object.getPrototypeOf&&r in Object.getPrototypeOf(e)?!1:Se(jd,r)?!0:!(r in Object.prototype||r in Function.prototype)}function Vf(e){return typeof e=="object"&&e&&e.constructor===Object}var Kd={length:!0,name:!0},jd={toString:!0,valueOf:!0,toLocaleString:!0};class li{constructor(r){this.wrappedObject=r,this[Symbol.iterator]=this.entries}keys(){return Object.keys(this.wrappedObject).values()}get(r){return Or(this.wrappedObject,r)}set(r,a){return bn(this.wrappedObject,r,a),this}has(r){return Jd(this.wrappedObject,r)}entries(){return Xf(this.keys(),r=>[r,this.get(r)])}forEach(r){for(var a of this.keys())r(this.get(a),a,this)}delete(r){delete this.wrappedObject[r]}clear(){for(var r of this.keys())this.delete(r)}get size(){return Object.keys(this.wrappedObject).length}}class Zf{constructor(r,a,i){this.a=r,this.b=a,this.bKeys=i,this[Symbol.iterator]=this.entries}get(r){return this.bKeys.has(r)?this.b.get(r):this.a.get(r)}set(r,a){return this.bKeys.has(r)?this.b.set(r,a):this.a.set(r,a),this}has(r){return this.b.has(r)||this.a.has(r)}keys(){return new Set([...this.a.keys(),...this.b.keys()])[Symbol.iterator]()}entries(){return Xf(this.keys(),r=>[r,this.get(r)])}forEach(r){for(var a of this.keys())r(this.get(a),a,this)}delete(r){return this.bKeys.has(r)?this.b.delete(r):this.a.delete(r)}clear(){this.a.clear(),this.b.clear()}get size(){return[...this.keys()].length}}function Xf(e,r){return{next:()=>{var a=e.next();return a.done?a:{value:r(a.value),done:!1}}}}function Zn(){return new Map}function pn(e){if(!e)return Zn();if(Yf(e))return e;if(oi(e))return new li(e);throw new Error("createMap can create maps from objects or Maps")}function eh(e){if(e instanceof li)return e.wrappedObject;var r={};for(var a of e.keys()){var i=e.get(a);bn(r,a,i)}return r}function Yf(e){return e?e instanceof Map||e instanceof li||typeof e.set=="function"&&typeof e.get=="function"&&typeof e.keys=="function"&&typeof e.has=="function":!1}var Wf=function(){return Wf=ln.create,ln},rh=["?BigNumber","?Complex","?DenseMatrix","?Fraction"],th=q("typed",rh,function(r){var{BigNumber:a,Complex:i,DenseMatrix:t,Fraction:n}=r,o=Wf();return o.clear(),o.addTypes([{name:"number",test:Ue},{name:"Complex",test:wt},{name:"BigNumber",test:Le},{name:"Fraction",test:Jn},{name:"Unit",test:Wr},{name:"identifier",test:l=>Cr&&/^(?:[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE3F\uDE40\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC30-\uDC6D\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDCD0-\uDCEB\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF])(?:[0-9A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE3F\uDE40\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC30-\uDC6D\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDCD0-\uDCEB\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF])*$/.test(l)},{name:"string",test:Cr},{name:"Chain",test:Ff},{name:"Array",test:je},{name:"Matrix",test:Te},{name:"DenseMatrix",test:Ia},{name:"SparseMatrix",test:Gt},{name:"Range",test:io},{name:"Index",test:ii},{name:"boolean",test:ad},{name:"ResultSet",test:id},{name:"Help",test:Mf},{name:"function",test:od},{name:"Date",test:sd},{name:"RegExp",test:ud},{name:"null",test:cd},{name:"undefined",test:ld},{name:"AccessorNode",test:Zt},{name:"ArrayNode",test:Yr},{name:"AssignmentNode",test:fd},{name:"BlockNode",test:md},{name:"ConditionalNode",test:vd},{name:"ConstantNode",test:We},{name:"FunctionNode",test:Ot},{name:"FunctionAssignmentNode",test:Qn},{name:"IndexNode",test:An},{name:"Node",test:rr},{name:"ObjectNode",test:si},{name:"OperatorNode",test:vr},{name:"ParenthesisNode",test:Dt},{name:"RangeNode",test:pd},{name:"RelationalNode",test:dd},{name:"SymbolNode",test:yr},{name:"Map",test:Yf},{name:"Object",test:oi}]),o.addConversions([{from:"number",to:"BigNumber",convert:function(u){if(a||Ti(u),Md(u)>15)throw new TypeError("Cannot implicitly convert a number with >15 significant digits to BigNumber (value: "+u+"). Use function bignumber(x) to convert to BigNumber.");return new a(u)}},{from:"number",to:"Complex",convert:function(u){return i||ua(u),new i(u,0)}},{from:"BigNumber",to:"Complex",convert:function(u){return i||ua(u),new i(u.toNumber(),0)}},{from:"Fraction",to:"BigNumber",convert:function(u){throw new TypeError("Cannot implicitly convert a Fraction to BigNumber or vice versa. Use function bignumber(x) to convert to BigNumber or fraction(x) to convert to Fraction.")}},{from:"Fraction",to:"Complex",convert:function(u){return i||ua(u),new i(u.valueOf(),0)}},{from:"number",to:"Fraction",convert:function(u){n||Oi(u);var s=new n(u);if(s.valueOf()!==u)throw new TypeError("Cannot implicitly convert a number to a Fraction when there will be a loss of precision (value: "+u+"). Use function fraction(x) to convert to Fraction.");return s}},{from:"string",to:"number",convert:function(u){var s=Number(u);if(isNaN(s))throw new Error('Cannot convert "'+u+'" to a number');return s}},{from:"string",to:"BigNumber",convert:function(u){a||Ti(u);try{return new a(u)}catch{throw new Error('Cannot convert "'+u+'" to BigNumber')}}},{from:"string",to:"Fraction",convert:function(u){n||Oi(u);try{return new n(u)}catch{throw new Error('Cannot convert "'+u+'" to Fraction')}}},{from:"string",to:"Complex",convert:function(u){i||ua(u);try{return new i(u)}catch{throw new Error('Cannot convert "'+u+'" to Complex')}}},{from:"boolean",to:"number",convert:function(u){return+u}},{from:"boolean",to:"BigNumber",convert:function(u){return a||Ti(u),new a(+u)}},{from:"boolean",to:"Fraction",convert:function(u){return n||Oi(u),new n(+u)}},{from:"boolean",to:"string",convert:function(u){return String(u)}},{from:"Array",to:"Matrix",convert:function(u){return t||nh(),new t(u)}},{from:"Matrix",to:"Array",convert:function(u){return u.valueOf()}}]),o.onMismatch=(l,u,s)=>{var c=o.createError(l,u,s);if(["wrongType","mismatch"].includes(c.data.category)&&u.length===1&&Qr(u[0])&&s.some(m=>!m.params.includes(","))){var f=new TypeError("Function '".concat(l,"' doesn't apply to matrices. To call it ")+"elementwise on a matrix 'M', try 'map(M, ".concat(l,")'."));throw f.data=c.data,f}throw c},o.onMismatch=(l,u,s)=>{var c=o.createError(l,u,s);if(["wrongType","mismatch"].includes(c.data.category)&&u.length===1&&Qr(u[0])&&s.some(m=>!m.params.includes(","))){var f=new TypeError("Function '".concat(l,"' doesn't apply to matrices. To call it ")+"elementwise on a matrix 'M', try 'map(M, ".concat(l,")'."));throw f.data=c.data,f}throw c},o});function Ti(e){throw new Error("Cannot convert value ".concat(e," into a BigNumber: no class 'BigNumber' provided"))}function ua(e){throw new Error("Cannot convert value ".concat(e," into a Complex number: no class 'Complex' provided"))}function nh(){throw new Error("Cannot convert array into a Matrix: no class 'DenseMatrix' provided")}function Oi(e){throw new Error("Cannot convert value ".concat(e," into a Fraction, no class 'Fraction' provided."))}var ah="ResultSet",ih=[],oh=q(ah,ih,()=>{function e(r){if(!(this instanceof e))throw new SyntaxError("Constructor must be called with the new operator");this.entries=r||[]}return e.prototype.type="ResultSet",e.prototype.isResultSet=!0,e.prototype.valueOf=function(){return this.entries},e.prototype.toString=function(){return"["+this.entries.join(", ")+"]"},e.prototype.toJSON=function(){return{mathjs:"ResultSet",entries:this.entries}},e.fromJSON=function(r){return new e(r.entries)},e},{isClass:!0});/*! + * decimal.js v10.6.0 + * An arbitrary-precision Decimal type for JavaScript. + * https://github.com/MikeMcl/decimal.js + * Copyright (c) 2025 Michael Mclaughlin + * MIT Licence + */var mn=9e15,It=1e9,Xi="0123456789abcdef",La="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",ka="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",Yi={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-mn,maxE:mn,crypto:!1},Jf,bt,Re=!0,fi="[DecimalError] ",_t=fi+"Invalid argument: ",Qf=fi+"Precision limit exceeded",Kf=fi+"crypto unavailable",jf="[object Decimal]",Fr=Math.floor,pr=Math.pow,sh=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,uh=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,ch=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,em=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,nt=1e7,Oe=7,lh=9007199254740991,fh=La.length-1,Wi=ka.length-1,ye={toStringTag:jf};ye.absoluteValue=ye.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),Be(e)};ye.ceil=function(){return Be(new this.constructor(this),this.e+1,2)};ye.clampedTo=ye.clamp=function(e,r){var a,i=this,t=i.constructor;if(e=new t(e),r=new t(r),!e.s||!r.s)return new t(NaN);if(e.gt(r))throw Error(_t+r);return a=i.cmp(e),a<0?e:i.cmp(r)>0?r:new t(i)};ye.comparedTo=ye.cmp=function(e){var r,a,i,t,n=this,o=n.d,l=(e=new n.constructor(e)).d,u=n.s,s=e.s;if(!o||!l)return!u||!s?NaN:u!==s?u:o===l?0:!o^u<0?1:-1;if(!o[0]||!l[0])return o[0]?u:l[0]?-s:0;if(u!==s)return u;if(n.e!==e.e)return n.e>e.e^u<0?1:-1;for(i=o.length,t=l.length,r=0,a=il[r]^u<0?1:-1;return i===t?0:i>t^u<0?1:-1};ye.cosine=ye.cos=function(){var e,r,a=this,i=a.constructor;return a.d?a.d[0]?(e=i.precision,r=i.rounding,i.precision=e+Math.max(a.e,a.sd())+Oe,i.rounding=1,a=mh(i,im(i,a)),i.precision=e,i.rounding=r,Be(bt==2||bt==3?a.neg():a,e,r,!0)):new i(1):new i(NaN)};ye.cubeRoot=ye.cbrt=function(){var e,r,a,i,t,n,o,l,u,s,c=this,f=c.constructor;if(!c.isFinite()||c.isZero())return new f(c);for(Re=!1,n=c.s*pr(c.s*c,1/3),!n||Math.abs(n)==1/0?(a=wr(c.d),e=c.e,(n=(e-a.length+1)%3)&&(a+=n==1||n==-2?"0":"00"),n=pr(a,1/3),e=Fr((e+1)/3)-(e%3==(e<0?-1:2)),n==1/0?a="5e"+e:(a=n.toExponential(),a=a.slice(0,a.indexOf("e")+1)+e),i=new f(a),i.s=c.s):i=new f(n.toString()),o=(e=f.precision)+3;;)if(l=i,u=l.times(l).times(l),s=u.plus(c),i=ur(s.plus(c).times(l),s.plus(u),o+2,1),wr(l.d).slice(0,o)===(a=wr(i.d)).slice(0,o))if(a=a.slice(o-3,o+1),a=="9999"||!t&&a=="4999"){if(!t&&(Be(l,e+1,0),l.times(l).times(l).eq(c))){i=l;break}o+=4,t=1}else{(!+a||!+a.slice(1)&&a.charAt(0)=="5")&&(Be(i,e+1,1),r=!i.times(i).times(i).eq(c));break}return Re=!0,Be(i,e,f.rounding,r)};ye.decimalPlaces=ye.dp=function(){var e,r=this.d,a=NaN;if(r){if(e=r.length-1,a=(e-Fr(this.e/Oe))*Oe,e=r[e],e)for(;e%10==0;e/=10)a--;a<0&&(a=0)}return a};ye.dividedBy=ye.div=function(e){return ur(this,new this.constructor(e))};ye.dividedToIntegerBy=ye.divToInt=function(e){var r=this,a=r.constructor;return Be(ur(r,new a(e),0,1,1),a.precision,a.rounding)};ye.equals=ye.eq=function(e){return this.cmp(e)===0};ye.floor=function(){return Be(new this.constructor(this),this.e+1,3)};ye.greaterThan=ye.gt=function(e){return this.cmp(e)>0};ye.greaterThanOrEqualTo=ye.gte=function(e){var r=this.cmp(e);return r==1||r===0};ye.hyperbolicCosine=ye.cosh=function(){var e,r,a,i,t,n=this,o=n.constructor,l=new o(1);if(!n.isFinite())return new o(n.s?1/0:NaN);if(n.isZero())return l;a=o.precision,i=o.rounding,o.precision=a+Math.max(n.e,n.sd())+4,o.rounding=1,t=n.d.length,t<32?(e=Math.ceil(t/3),r=(1/vi(4,e)).toString()):(e=16,r="2.3283064365386962890625e-10"),n=xn(o,1,n.times(r),new o(1),!0);for(var u,s=e,c=new o(8);s--;)u=n.times(n),n=l.minus(u.times(c.minus(u.times(c))));return Be(n,o.precision=a,o.rounding=i,!0)};ye.hyperbolicSine=ye.sinh=function(){var e,r,a,i,t=this,n=t.constructor;if(!t.isFinite()||t.isZero())return new n(t);if(r=n.precision,a=n.rounding,n.precision=r+Math.max(t.e,t.sd())+4,n.rounding=1,i=t.d.length,i<3)t=xn(n,2,t,t,!0);else{e=1.4*Math.sqrt(i),e=e>16?16:e|0,t=t.times(1/vi(5,e)),t=xn(n,2,t,t,!0);for(var o,l=new n(5),u=new n(16),s=new n(20);e--;)o=t.times(t),t=t.times(l.plus(o.times(u.times(o).plus(s))))}return n.precision=r,n.rounding=a,Be(t,r,a,!0)};ye.hyperbolicTangent=ye.tanh=function(){var e,r,a=this,i=a.constructor;return a.isFinite()?a.isZero()?new i(a):(e=i.precision,r=i.rounding,i.precision=e+7,i.rounding=1,ur(a.sinh(),a.cosh(),i.precision=e,i.rounding=r)):new i(a.s)};ye.inverseCosine=ye.acos=function(){var e=this,r=e.constructor,a=e.abs().cmp(1),i=r.precision,t=r.rounding;return a!==-1?a===0?e.isNeg()?ft(r,i,t):new r(0):new r(NaN):e.isZero()?ft(r,i+4,t).times(.5):(r.precision=i+6,r.rounding=1,e=new r(1).minus(e).div(e.plus(1)).sqrt().atan(),r.precision=i,r.rounding=t,e.times(2))};ye.inverseHyperbolicCosine=ye.acosh=function(){var e,r,a=this,i=a.constructor;return a.lte(1)?new i(a.eq(1)?0:NaN):a.isFinite()?(e=i.precision,r=i.rounding,i.precision=e+Math.max(Math.abs(a.e),a.sd())+4,i.rounding=1,Re=!1,a=a.times(a).minus(1).sqrt().plus(a),Re=!0,i.precision=e,i.rounding=r,a.ln()):new i(a)};ye.inverseHyperbolicSine=ye.asinh=function(){var e,r,a=this,i=a.constructor;return!a.isFinite()||a.isZero()?new i(a):(e=i.precision,r=i.rounding,i.precision=e+2*Math.max(Math.abs(a.e),a.sd())+6,i.rounding=1,Re=!1,a=a.times(a).plus(1).sqrt().plus(a),Re=!0,i.precision=e,i.rounding=r,a.ln())};ye.inverseHyperbolicTangent=ye.atanh=function(){var e,r,a,i,t=this,n=t.constructor;return t.isFinite()?t.e>=0?new n(t.abs().eq(1)?t.s/0:t.isZero()?t:NaN):(e=n.precision,r=n.rounding,i=t.sd(),Math.max(i,e)<2*-t.e-1?Be(new n(t),e,r,!0):(n.precision=a=i-t.e,t=ur(t.plus(1),new n(1).minus(t),a+e,1),n.precision=e+4,n.rounding=1,t=t.ln(),n.precision=e,n.rounding=r,t.times(.5))):new n(NaN)};ye.inverseSine=ye.asin=function(){var e,r,a,i,t=this,n=t.constructor;return t.isZero()?new n(t):(r=t.abs().cmp(1),a=n.precision,i=n.rounding,r!==-1?r===0?(e=ft(n,a+4,i).times(.5),e.s=t.s,e):new n(NaN):(n.precision=a+6,n.rounding=1,t=t.div(new n(1).minus(t.times(t)).sqrt().plus(1)).atan(),n.precision=a,n.rounding=i,t.times(2)))};ye.inverseTangent=ye.atan=function(){var e,r,a,i,t,n,o,l,u,s=this,c=s.constructor,f=c.precision,m=c.rounding;if(s.isFinite()){if(s.isZero())return new c(s);if(s.abs().eq(1)&&f+4<=Wi)return o=ft(c,f+4,m).times(.25),o.s=s.s,o}else{if(!s.s)return new c(NaN);if(f+4<=Wi)return o=ft(c,f+4,m).times(.5),o.s=s.s,o}for(c.precision=l=f+10,c.rounding=1,a=Math.min(28,l/Oe+2|0),e=a;e;--e)s=s.div(s.times(s).plus(1).sqrt().plus(1));for(Re=!1,r=Math.ceil(l/Oe),i=1,u=s.times(s),o=new c(s),t=s;e!==-1;)if(t=t.times(u),n=o.minus(t.div(i+=2)),t=t.times(u),o=n.plus(t.div(i+=2)),o.d[r]!==void 0)for(e=r;o.d[e]===n.d[e]&&e--;);return a&&(o=o.times(2<this.d.length-2};ye.isNaN=function(){return!this.s};ye.isNegative=ye.isNeg=function(){return this.s<0};ye.isPositive=ye.isPos=function(){return this.s>0};ye.isZero=function(){return!!this.d&&this.d[0]===0};ye.lessThan=ye.lt=function(e){return this.cmp(e)<0};ye.lessThanOrEqualTo=ye.lte=function(e){return this.cmp(e)<1};ye.logarithm=ye.log=function(e){var r,a,i,t,n,o,l,u,s=this,c=s.constructor,f=c.precision,m=c.rounding,v=5;if(e==null)e=new c(10),r=!0;else{if(e=new c(e),a=e.d,e.s<0||!a||!a[0]||e.eq(1))return new c(NaN);r=e.eq(10)}if(a=s.d,s.s<0||!a||!a[0]||s.eq(1))return new c(a&&!a[0]?-1/0:s.s!=1?NaN:a?0:1/0);if(r)if(a.length>1)n=!0;else{for(t=a[0];t%10===0;)t/=10;n=t!==1}if(Re=!1,l=f+v,o=Tt(s,l),i=r?Ha(c,l+10):Tt(e,l),u=ur(o,i,l,1),Xn(u.d,t=f,m))do if(l+=10,o=Tt(s,l),i=r?Ha(c,l+10):Tt(e,l),u=ur(o,i,l,1),!n){+wr(u.d).slice(t+1,t+15)+1==1e14&&(u=Be(u,f+1,0));break}while(Xn(u.d,t+=10,m));return Re=!0,Be(u,f,m)};ye.minus=ye.sub=function(e){var r,a,i,t,n,o,l,u,s,c,f,m,v=this,d=v.constructor;if(e=new d(e),!v.d||!e.d)return!v.s||!e.s?e=new d(NaN):v.d?e.s=-e.s:e=new d(e.d||v.s!==e.s?v:NaN),e;if(v.s!=e.s)return e.s=-e.s,v.plus(e);if(s=v.d,m=e.d,l=d.precision,u=d.rounding,!s[0]||!m[0]){if(m[0])e.s=-e.s;else if(s[0])e=new d(v);else return new d(u===3?-0:0);return Re?Be(e,l,u):e}if(a=Fr(e.e/Oe),c=Fr(v.e/Oe),s=s.slice(),n=c-a,n){for(f=n<0,f?(r=s,n=-n,o=m.length):(r=m,a=c,o=s.length),i=Math.max(Math.ceil(l/Oe),o)+2,n>i&&(n=i,r.length=1),r.reverse(),i=n;i--;)r.push(0);r.reverse()}else{for(i=s.length,o=m.length,f=i0;--i)s[o++]=0;for(i=m.length;i>n;){if(s[--i]o?n+1:o+1,t>o&&(t=o,a.length=1),a.reverse();t--;)a.push(0);a.reverse()}for(o=s.length,t=c.length,o-t<0&&(t=o,a=c,c=s,s=a),r=0;t;)r=(s[--t]=s[t]+c[t]+r)/nt|0,s[t]%=nt;for(r&&(s.unshift(r),++i),o=s.length;s[--o]==0;)s.pop();return e.d=s,e.e=mi(s,i),Re?Be(e,l,u):e};ye.precision=ye.sd=function(e){var r,a=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(_t+e);return a.d?(r=rm(a.d),e&&a.e+1>r&&(r=a.e+1)):r=NaN,r};ye.round=function(){var e=this,r=e.constructor;return Be(new r(e),e.e+1,r.rounding)};ye.sine=ye.sin=function(){var e,r,a=this,i=a.constructor;return a.isFinite()?a.isZero()?new i(a):(e=i.precision,r=i.rounding,i.precision=e+Math.max(a.e,a.sd())+Oe,i.rounding=1,a=ph(i,im(i,a)),i.precision=e,i.rounding=r,Be(bt>2?a.neg():a,e,r,!0)):new i(NaN)};ye.squareRoot=ye.sqrt=function(){var e,r,a,i,t,n,o=this,l=o.d,u=o.e,s=o.s,c=o.constructor;if(s!==1||!l||!l[0])return new c(!s||s<0&&(!l||l[0])?NaN:l?o:1/0);for(Re=!1,s=Math.sqrt(+o),s==0||s==1/0?(r=wr(l),(r.length+u)%2==0&&(r+="0"),s=Math.sqrt(r),u=Fr((u+1)/2)-(u<0||u%2),s==1/0?r="5e"+u:(r=s.toExponential(),r=r.slice(0,r.indexOf("e")+1)+u),i=new c(r)):i=new c(s.toString()),a=(u=c.precision)+3;;)if(n=i,i=n.plus(ur(o,n,a+2,1)).times(.5),wr(n.d).slice(0,a)===(r=wr(i.d)).slice(0,a))if(r=r.slice(a-3,a+1),r=="9999"||!t&&r=="4999"){if(!t&&(Be(n,u+1,0),n.times(n).eq(o))){i=n;break}a+=4,t=1}else{(!+r||!+r.slice(1)&&r.charAt(0)=="5")&&(Be(i,u+1,1),e=!i.times(i).eq(o));break}return Re=!0,Be(i,u,c.rounding,e)};ye.tangent=ye.tan=function(){var e,r,a=this,i=a.constructor;return a.isFinite()?a.isZero()?new i(a):(e=i.precision,r=i.rounding,i.precision=e+10,i.rounding=1,a=a.sin(),a.s=1,a=ur(a,new i(1).minus(a.times(a)).sqrt(),e+10,0),i.precision=e,i.rounding=r,Be(bt==2||bt==4?a.neg():a,e,r,!0)):new i(NaN)};ye.times=ye.mul=function(e){var r,a,i,t,n,o,l,u,s,c=this,f=c.constructor,m=c.d,v=(e=new f(e)).d;if(e.s*=c.s,!m||!m[0]||!v||!v[0])return new f(!e.s||m&&!m[0]&&!v||v&&!v[0]&&!m?NaN:!m||!v?e.s/0:e.s*0);for(a=Fr(c.e/Oe)+Fr(e.e/Oe),u=m.length,s=v.length,u=0;){for(r=0,t=u+i;t>i;)l=n[t]+v[i]*m[t-i-1]+r,n[t--]=l%nt|0,r=l/nt|0;n[t]=(n[t]+r)%nt|0}for(;!n[--o];)n.pop();return r?++a:n.shift(),e.d=n,e.e=mi(n,a),Re?Be(e,f.precision,f.rounding):e};ye.toBinary=function(e,r){return co(this,2,e,r)};ye.toDecimalPlaces=ye.toDP=function(e,r){var a=this,i=a.constructor;return a=new i(a),e===void 0?a:(kr(e,0,It),r===void 0?r=i.rounding:kr(r,0,8),Be(a,e+a.e+1,r))};ye.toExponential=function(e,r){var a,i=this,t=i.constructor;return e===void 0?a=mt(i,!0):(kr(e,0,It),r===void 0?r=t.rounding:kr(r,0,8),i=Be(new t(i),e+1,r),a=mt(i,!0,e+1)),i.isNeg()&&!i.isZero()?"-"+a:a};ye.toFixed=function(e,r){var a,i,t=this,n=t.constructor;return e===void 0?a=mt(t):(kr(e,0,It),r===void 0?r=n.rounding:kr(r,0,8),i=Be(new n(t),e+t.e+1,r),a=mt(i,!1,e+i.e+1)),t.isNeg()&&!t.isZero()?"-"+a:a};ye.toFraction=function(e){var r,a,i,t,n,o,l,u,s,c,f,m,v=this,d=v.d,p=v.constructor;if(!d)return new p(v);if(s=a=new p(1),i=u=new p(0),r=new p(i),n=r.e=rm(d)-v.e-1,o=n%Oe,r.d[0]=pr(10,o<0?Oe+o:o),e==null)e=n>0?r:s;else{if(l=new p(e),!l.isInt()||l.lt(s))throw Error(_t+l);e=l.gt(r)?n>0?r:s:l}for(Re=!1,l=new p(wr(d)),c=p.precision,p.precision=n=d.length*Oe*2;f=ur(l,r,0,1,1),t=a.plus(f.times(i)),t.cmp(e)!=1;)a=i,i=t,t=s,s=u.plus(f.times(t)),u=t,t=r,r=l.minus(f.times(t)),l=t;return t=ur(e.minus(a),i,0,1,1),u=u.plus(t.times(s)),a=a.plus(t.times(i)),u.s=s.s=v.s,m=ur(s,i,n,1).minus(v).abs().cmp(ur(u,a,n,1).minus(v).abs())<1?[s,i]:[u,a],p.precision=c,Re=!0,m};ye.toHexadecimal=ye.toHex=function(e,r){return co(this,16,e,r)};ye.toNearest=function(e,r){var a=this,i=a.constructor;if(a=new i(a),e==null){if(!a.d)return a;e=new i(1),r=i.rounding}else{if(e=new i(e),r===void 0?r=i.rounding:kr(r,0,8),!a.d)return e.s?a:e;if(!e.d)return e.s&&(e.s=a.s),e}return e.d[0]?(Re=!1,a=ur(a,e,0,r,1).times(e),Re=!0,Be(a)):(e.s=a.s,a=e),a};ye.toNumber=function(){return+this};ye.toOctal=function(e,r){return co(this,8,e,r)};ye.toPower=ye.pow=function(e){var r,a,i,t,n,o,l=this,u=l.constructor,s=+(e=new u(e));if(!l.d||!e.d||!l.d[0]||!e.d[0])return new u(pr(+l,s));if(l=new u(l),l.eq(1))return l;if(i=u.precision,n=u.rounding,e.eq(1))return Be(l,i,n);if(r=Fr(e.e/Oe),r>=e.d.length-1&&(a=s<0?-s:s)<=lh)return t=tm(u,l,a,i),e.s<0?new u(1).div(t):Be(t,i,n);if(o=l.s,o<0){if(ru.maxE+1||r0?o/0:0):(Re=!1,u.rounding=l.s=1,a=Math.min(12,(r+"").length),t=Ji(e.times(Tt(l,i+a)),i),t.d&&(t=Be(t,i+5,1),Xn(t.d,i,n)&&(r=i+10,t=Be(Ji(e.times(Tt(l,r+a)),r),r+5,1),+wr(t.d).slice(i+1,i+15)+1==1e14&&(t=Be(t,i+1,0)))),t.s=o,Re=!0,u.rounding=n,Be(t,i,n))};ye.toPrecision=function(e,r){var a,i=this,t=i.constructor;return e===void 0?a=mt(i,i.e<=t.toExpNeg||i.e>=t.toExpPos):(kr(e,1,It),r===void 0?r=t.rounding:kr(r,0,8),i=Be(new t(i),e,r),a=mt(i,e<=i.e||i.e<=t.toExpNeg,e)),i.isNeg()&&!i.isZero()?"-"+a:a};ye.toSignificantDigits=ye.toSD=function(e,r){var a=this,i=a.constructor;return e===void 0?(e=i.precision,r=i.rounding):(kr(e,1,It),r===void 0?r=i.rounding:kr(r,0,8)),Be(new i(a),e,r)};ye.toString=function(){var e=this,r=e.constructor,a=mt(e,e.e<=r.toExpNeg||e.e>=r.toExpPos);return e.isNeg()&&!e.isZero()?"-"+a:a};ye.truncated=ye.trunc=function(){return Be(new this.constructor(this),this.e+1,1)};ye.valueOf=ye.toJSON=function(){var e=this,r=e.constructor,a=mt(e,e.e<=r.toExpNeg||e.e>=r.toExpPos);return e.isNeg()?"-"+a:a};function wr(e){var r,a,i,t=e.length-1,n="",o=e[0];if(t>0){for(n+=o,r=1;ra)throw Error(_t+e)}function Xn(e,r,a,i){var t,n,o,l;for(n=e[0];n>=10;n/=10)--r;return--r<0?(r+=Oe,t=0):(t=Math.ceil((r+1)/Oe),r%=Oe),n=pr(10,Oe-r),l=e[t]%n|0,i==null?r<3?(r==0?l=l/100|0:r==1&&(l=l/10|0),o=a<4&&l==99999||a>3&&l==49999||l==5e4||l==0):o=(a<4&&l+1==n||a>3&&l+1==n/2)&&(e[t+1]/n/100|0)==pr(10,r-2)-1||(l==n/2||l==0)&&(e[t+1]/n/100|0)==0:r<4?(r==0?l=l/1e3|0:r==1?l=l/100|0:r==2&&(l=l/10|0),o=(i||a<4)&&l==9999||!i&&a>3&&l==4999):o=((i||a<4)&&l+1==n||!i&&a>3&&l+1==n/2)&&(e[t+1]/n/1e3|0)==pr(10,r-3)-1,o}function Sa(e,r,a){for(var i,t=[0],n,o=0,l=e.length;oa-1&&(t[i+1]===void 0&&(t[i+1]=0),t[i+1]+=t[i]/a|0,t[i]%=a)}return t.reverse()}function mh(e,r){var a,i,t;if(r.isZero())return r;i=r.d.length,i<32?(a=Math.ceil(i/3),t=(1/vi(4,a)).toString()):(a=16,t="2.3283064365386962890625e-10"),e.precision+=a,r=xn(e,1,r.times(t),new e(1));for(var n=a;n--;){var o=r.times(r);r=o.times(o).minus(o).times(8).plus(1)}return e.precision-=a,r}var ur=(function(){function e(i,t,n){var o,l=0,u=i.length;for(i=i.slice();u--;)o=i[u]*t+l,i[u]=o%n|0,l=o/n|0;return l&&i.unshift(l),i}function r(i,t,n,o){var l,u;if(n!=o)u=n>o?1:-1;else for(l=u=0;lt[l]?1:-1;break}return u}function a(i,t,n,o){for(var l=0;n--;)i[n]-=l,l=i[n]1;)i.shift()}return function(i,t,n,o,l,u){var s,c,f,m,v,d,p,w,g,N,h,b,x,y,A,S,D,E,C,F,_=i.constructor,I=i.s==t.s?1:-1,$=i.d,T=t.d;if(!$||!$[0]||!T||!T[0])return new _(!i.s||!t.s||($?T&&$[0]==T[0]:!T)?NaN:$&&$[0]==0||!T?I*0:I/0);for(u?(v=1,c=i.e-t.e):(u=nt,v=Oe,c=Fr(i.e/v)-Fr(t.e/v)),C=T.length,D=$.length,g=new _(I),N=g.d=[],f=0;T[f]==($[f]||0);f++);if(T[f]>($[f]||0)&&c--,n==null?(y=n=_.precision,o=_.rounding):l?y=n+(i.e-t.e)+1:y=n,y<0)N.push(1),d=!0;else{if(y=y/v+2|0,f=0,C==1){for(m=0,T=T[0],y++;(f1&&(T=e(T,m,u),$=e($,m,u),C=T.length,D=$.length),S=C,h=$.slice(0,C),b=h.length;b=u/2&&++E;do m=0,s=r(T,h,C,b),s<0?(x=h[0],C!=b&&(x=x*u+(h[1]||0)),m=x/E|0,m>1?(m>=u&&(m=u-1),p=e(T,m,u),w=p.length,b=h.length,s=r(p,h,w,b),s==1&&(m--,a(p,C=10;m/=10)f++;g.e=f+c*v-1,Be(g,l?n+g.e+1:n,o,d)}return g}})();function Be(e,r,a,i){var t,n,o,l,u,s,c,f,m,v=e.constructor;e:if(r!=null){if(f=e.d,!f)return e;for(t=1,l=f[0];l>=10;l/=10)t++;if(n=r-t,n<0)n+=Oe,o=r,c=f[m=0],u=c/pr(10,t-o-1)%10|0;else if(m=Math.ceil((n+1)/Oe),l=f.length,m>=l)if(i){for(;l++<=m;)f.push(0);c=u=0,t=1,n%=Oe,o=n-Oe+1}else break e;else{for(c=l=f[m],t=1;l>=10;l/=10)t++;n%=Oe,o=n-Oe+t,u=o<0?0:c/pr(10,t-o-1)%10|0}if(i=i||r<0||f[m+1]!==void 0||(o<0?c:c%pr(10,t-o-1)),s=a<4?(u||i)&&(a==0||a==(e.s<0?3:2)):u>5||u==5&&(a==4||i||a==6&&(n>0?o>0?c/pr(10,t-o):0:f[m-1])%10&1||a==(e.s<0?8:7)),r<1||!f[0])return f.length=0,s?(r-=e.e+1,f[0]=pr(10,(Oe-r%Oe)%Oe),e.e=-r||0):f[0]=e.e=0,e;if(n==0?(f.length=m,l=1,m--):(f.length=m+1,l=pr(10,Oe-n),f[m]=o>0?(c/pr(10,t-o)%pr(10,o)|0)*l:0),s)for(;;)if(m==0){for(n=1,o=f[0];o>=10;o/=10)n++;for(o=f[0]+=l,l=1;o>=10;o/=10)l++;n!=l&&(e.e++,f[0]==nt&&(f[0]=1));break}else{if(f[m]+=l,f[m]!=nt)break;f[m--]=0,l=1}for(n=f.length;f[--n]===0;)f.pop()}return Re&&(e.e>v.maxE?(e.d=null,e.e=NaN):e.e0?n=n.charAt(0)+"."+n.slice(1)+Mt(i):o>1&&(n=n.charAt(0)+"."+n.slice(1)),n=n+(e.e<0?"e":"e+")+e.e):t<0?(n="0."+Mt(-t-1)+n,a&&(i=a-o)>0&&(n+=Mt(i))):t>=o?(n+=Mt(t+1-o),a&&(i=a-t-1)>0&&(n=n+"."+Mt(i))):((i=t+1)0&&(t+1===o&&(n+="."),n+=Mt(i))),n}function mi(e,r){var a=e[0];for(r*=Oe;a>=10;a/=10)r++;return r}function Ha(e,r,a){if(r>fh)throw Re=!0,a&&(e.precision=a),Error(Qf);return Be(new e(La),r,1,!0)}function ft(e,r,a){if(r>Wi)throw Error(Qf);return Be(new e(ka),r,a,!0)}function rm(e){var r=e.length-1,a=r*Oe+1;if(r=e[r],r){for(;r%10==0;r/=10)a--;for(r=e[0];r>=10;r/=10)a++}return a}function Mt(e){for(var r="";e--;)r+="0";return r}function tm(e,r,a,i){var t,n=new e(1),o=Math.ceil(i/Oe+4);for(Re=!1;;){if(a%2&&(n=n.times(r),rs(n.d,o)&&(t=!0)),a=Fr(a/2),a===0){a=n.d.length-1,t&&n.d[a]===0&&++n.d[a];break}r=r.times(r),rs(r.d,o)}return Re=!0,n}function es(e){return e.d[e.d.length-1]&1}function nm(e,r,a){for(var i,t,n=new e(r[0]),o=0;++o17)return new m(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(r==null?(Re=!1,u=d):u=r,l=new m(.03125);e.e>-2;)e=e.times(l),f+=5;for(i=Math.log(pr(2,f))/Math.LN10*2+5|0,u+=i,a=n=o=new m(1),m.precision=u;;){if(n=Be(n.times(e),u,1),a=a.times(++c),l=o.plus(ur(n,a,u,1)),wr(l.d).slice(0,u)===wr(o.d).slice(0,u)){for(t=f;t--;)o=Be(o.times(o),u,1);if(r==null)if(s<3&&Xn(o.d,u-i,v,s))m.precision=u+=10,a=n=l=new m(1),c=0,s++;else return Be(o,m.precision=d,v,Re=!0);else return m.precision=d,o}o=l}}function Tt(e,r){var a,i,t,n,o,l,u,s,c,f,m,v=1,d=10,p=e,w=p.d,g=p.constructor,N=g.rounding,h=g.precision;if(p.s<0||!w||!w[0]||!p.e&&w[0]==1&&w.length==1)return new g(w&&!w[0]?-1/0:p.s!=1?NaN:w?0:p);if(r==null?(Re=!1,c=h):c=r,g.precision=c+=d,a=wr(w),i=a.charAt(0),Math.abs(n=p.e)<15e14){for(;i<7&&i!=1||i==1&&a.charAt(1)>3;)p=p.times(e),a=wr(p.d),i=a.charAt(0),v++;n=p.e,i>1?(p=new g("0."+a),n++):p=new g(i+"."+a.slice(1))}else return s=Ha(g,c+2,h).times(n+""),p=Tt(new g(i+"."+a.slice(1)),c-d).plus(s),g.precision=h,r==null?Be(p,h,N,Re=!0):p;for(f=p,u=o=p=ur(p.minus(1),p.plus(1),c,1),m=Be(p.times(p),c,1),t=3;;){if(o=Be(o.times(m),c,1),s=u.plus(ur(o,new g(t),c,1)),wr(s.d).slice(0,c)===wr(u.d).slice(0,c))if(u=u.times(2),n!==0&&(u=u.plus(Ha(g,c+2,h).times(n+""))),u=ur(u,new g(v),c,1),r==null)if(Xn(u.d,c-d,N,l))g.precision=c+=d,s=o=p=ur(f.minus(1),f.plus(1),c,1),m=Be(p.times(p),c,1),t=l=1;else return Be(u,g.precision=h,N,Re=!0);else return g.precision=h,u;u=s,t+=2}}function am(e){return String(e.s*e.s/0)}function Ca(e,r){var a,i,t;for((a=r.indexOf("."))>-1&&(r=r.replace(".","")),(i=r.search(/e/i))>0?(a<0&&(a=i),a+=+r.slice(i+1),r=r.substring(0,i)):a<0&&(a=r.length),i=0;r.charCodeAt(i)===48;i++);for(t=r.length;r.charCodeAt(t-1)===48;--t);if(r=r.slice(i,t),r){if(t-=i,e.e=a=a-i-1,e.d=[],i=(a+1)%Oe,a<0&&(i+=Oe),ie.constructor.maxE?(e.d=null,e.e=NaN):e.e-1){if(r=r.replace(/(\d)_(?=\d)/g,"$1"),em.test(r))return Ca(e,r)}else if(r==="Infinity"||r==="NaN")return+r||(e.s=NaN),e.e=NaN,e.d=null,e;if(uh.test(r))a=16,r=r.toLowerCase();else if(sh.test(r))a=2;else if(ch.test(r))a=8;else throw Error(_t+r);for(n=r.search(/p/i),n>0?(u=+r.slice(n+1),r=r.substring(2,n)):r=r.slice(2),n=r.indexOf("."),o=n>=0,i=e.constructor,o&&(r=r.replace(".",""),l=r.length,n=l-n,t=tm(i,new i(a),n,n*2)),s=Sa(r,a,nt),c=s.length-1,n=c;s[n]===0;--n)s.pop();return n<0?new i(e.s*0):(e.e=mi(s,c),e.d=s,Re=!1,o&&(e=ur(e,t,l*4)),u&&(e=e.times(Math.abs(u)<54?pr(2,u):$t.pow(2,u))),Re=!0,e)}function ph(e,r){var a,i=r.d.length;if(i<3)return r.isZero()?r:xn(e,2,r,r);a=1.4*Math.sqrt(i),a=a>16?16:a|0,r=r.times(1/vi(5,a)),r=xn(e,2,r,r);for(var t,n=new e(5),o=new e(16),l=new e(20);a--;)t=r.times(r),r=r.times(n.plus(t.times(o.times(t).minus(l))));return r}function xn(e,r,a,i,t){var n,o,l,u,s=e.precision,c=Math.ceil(s/Oe);for(Re=!1,u=a.times(a),l=new e(i);;){if(o=ur(l.times(u),new e(r++*r++),s,1),l=t?i.plus(o):i.minus(o),i=ur(o.times(u),new e(r++*r++),s,1),o=l.plus(i),o.d[c]!==void 0){for(n=c;o.d[n]===l.d[n]&&n--;);if(n==-1)break}n=l,l=i,i=o,o=n}return Re=!0,o.d.length=c+1,o}function vi(e,r){for(var a=e;--r;)a*=e;return a}function im(e,r){var a,i=r.s<0,t=ft(e,e.precision,1),n=t.times(.5);if(r=r.abs(),r.lte(n))return bt=i?4:1,r;if(a=r.divToInt(t),a.isZero())bt=i?3:2;else{if(r=r.minus(a.times(t)),r.lte(n))return bt=es(a)?i?2:3:i?4:1,r;bt=es(a)?i?1:4:i?3:2}return r.minus(t).abs()}function co(e,r,a,i){var t,n,o,l,u,s,c,f,m,v=e.constructor,d=a!==void 0;if(d?(kr(a,1,It),i===void 0?i=v.rounding:kr(i,0,8)):(a=v.precision,i=v.rounding),!e.isFinite())c=am(e);else{for(c=mt(e),o=c.indexOf("."),d?(t=2,r==16?a=a*4-3:r==8&&(a=a*3-2)):t=r,o>=0&&(c=c.replace(".",""),m=new v(1),m.e=c.length-o,m.d=Sa(mt(m),10,t),m.e=m.d.length),f=Sa(c,10,t),n=u=f.length;f[--u]==0;)f.pop();if(!f[0])c=d?"0p+0":"0";else{if(o<0?n--:(e=new v(e),e.d=f,e.e=n,e=ur(e,m,a,i,0,t),f=e.d,n=e.e,s=Jf),o=f[a],l=t/2,s=s||f[a+1]!==void 0,s=i<4?(o!==void 0||s)&&(i===0||i===(e.s<0?3:2)):o>l||o===l&&(i===4||s||i===6&&f[a-1]&1||i===(e.s<0?8:7)),f.length=a,s)for(;++f[--a]>t-1;)f[a]=0,a||(++n,f.unshift(1));for(u=f.length;!f[u-1];--u);for(o=0,c="";o1)if(r==16||r==8){for(o=r==16?4:3,--u;u%o;u++)c+="0";for(f=Sa(c,t,r),u=f.length;!f[u-1];--u);for(o=1,c="1.";ou)for(n-=u;n--;)c+="0";else nr)return e.length=r,!0}function dh(e){return new this(e).abs()}function hh(e){return new this(e).acos()}function gh(e){return new this(e).acosh()}function yh(e,r){return new this(e).plus(r)}function bh(e){return new this(e).asin()}function xh(e){return new this(e).asinh()}function wh(e){return new this(e).atan()}function Nh(e){return new this(e).atanh()}function Dh(e,r){e=new this(e),r=new this(r);var a,i=this.precision,t=this.rounding,n=i+4;return!e.s||!r.s?a=new this(NaN):!e.d&&!r.d?(a=ft(this,n,1).times(r.s>0?.25:.75),a.s=e.s):!r.d||e.isZero()?(a=r.s<0?ft(this,i,t):new this(0),a.s=e.s):!e.d||r.isZero()?(a=ft(this,n,1).times(.5),a.s=e.s):r.s<0?(this.precision=n,this.rounding=1,a=this.atan(ur(e,r,n,1)),r=ft(this,n,1),this.precision=i,this.rounding=t,a=e.s<0?a.minus(r):a.plus(r)):a=this.atan(ur(e,r,n,1)),a}function Ah(e){return new this(e).cbrt()}function Eh(e){return Be(e=new this(e),e.e+1,2)}function Sh(e,r,a){return new this(e).clamp(r,a)}function Ch(e){if(!e||typeof e!="object")throw Error(fi+"Object expected");var r,a,i,t=e.defaults===!0,n=["precision",1,It,"rounding",0,8,"toExpNeg",-mn,0,"toExpPos",0,mn,"maxE",0,mn,"minE",-mn,0,"modulo",0,9];for(r=0;r=n[r+1]&&i<=n[r+2])this[a]=i;else throw Error(_t+a+": "+i);if(a="crypto",t&&(this[a]=Yi[a]),(i=e[a])!==void 0)if(i===!0||i===!1||i===0||i===1)if(i)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[a]=!0;else throw Error(Kf);else this[a]=!1;else throw Error(_t+a+": "+i);return this}function Mh(e){return new this(e).cos()}function Fh(e){return new this(e).cosh()}function om(e){var r,a,i;function t(n){var o,l,u,s=this;if(!(s instanceof t))return new t(n);if(s.constructor=t,ts(n)){s.s=n.s,Re?!n.d||n.e>t.maxE?(s.e=NaN,s.d=null):n.e=10;l/=10)o++;Re?o>t.maxE?(s.e=NaN,s.d=null):o=429e7?r[n]=crypto.getRandomValues(new Uint32Array(1))[0]:l[n++]=t%1e7;else if(crypto.randomBytes){for(r=crypto.randomBytes(i*=4);n=214e7?crypto.randomBytes(4).copy(r,n):(l.push(t%1e7),n+=4);n=i/4}else throw Error(Kf);else for(;n=10;t/=10)i++;i{var{on:r,config:a}=e,i=$t.clone({precision:a.precision,modulo:$t.EUCLID});return i.prototype=Object.create(i.prototype),i.prototype.type="BigNumber",i.prototype.isBigNumber=!0,i.prototype.toJSON=function(){return{mathjs:"BigNumber",value:this.toString()}},i.fromJSON=function(t){return new i(t.value)},r&&r("config",function(t,n){t.precision!==n.precision&&i.config({precision:t.precision})}),i},{isClass:!0});const Sr=Math.cosh||function(e){return Math.abs(e)<1e-9?1-e:(Math.exp(e)+Math.exp(-e))*.5},Xr=Math.sinh||function(e){return Math.abs(e)<1e-9?e:(Math.exp(e)-Math.exp(-e))*.5},n0=e=>{const r=Math.sin(.5*e);return-2*r*r},_i=function(e,r){return e=Math.abs(e),r=Math.abs(r),e0&&on();break;case"number":a.im=0,a.re=e;break;default:on()}return isNaN(a.re)||isNaN(a.im),a};function ue(e,r){if(!(this instanceof ue))return new ue(e,r);const a=Ht(e,r);this.re=a.re,this.im=a.im}ue.prototype={re:0,im:0,sign:function(){const e=_i(this.re,this.im);return new ue(this.re/e,this.im/e)},add:function(e,r){const a=Ht(e,r),i=this.isInfinite(),t=!(isFinite(a.re)&&isFinite(a.im));return i||t?i&&t?ue.NAN:ue.INFINITY:new ue(this.re+a.re,this.im+a.im)},sub:function(e,r){const a=Ht(e,r),i=this.isInfinite(),t=!(isFinite(a.re)&&isFinite(a.im));return i||t?i&&t?ue.NAN:ue.INFINITY:new ue(this.re-a.re,this.im-a.im)},mul:function(e,r){const a=Ht(e,r),i=this.isInfinite(),t=!(isFinite(a.re)&&isFinite(a.im)),n=this.re===0&&this.im===0,o=a.re===0&&a.im===0;return i&&o||t&&n?ue.NAN:i||t?ue.INFINITY:a.im===0&&this.im===0?new ue(this.re*a.re,0):new ue(this.re*a.re-this.im*a.im,this.re*a.im+this.im*a.re)},div:function(e,r){const a=Ht(e,r),i=this.isInfinite(),t=!(isFinite(a.re)&&isFinite(a.im)),n=this.re===0&&this.im===0,o=a.re===0&&a.im===0;if(n&&o||i&&t)return ue.NAN;if(o||i)return ue.INFINITY;if(n||t)return ue.ZERO;if(a.im===0)return new ue(this.re/a.re,this.im/a.re);if(Math.abs(a.re)0)return new ue(Math.pow(this.re,a.re),0);if(this.re===0)switch((a.re%4+4)%4){case 0:return new ue(Math.pow(this.im,a.re),0);case 1:return new ue(0,Math.pow(this.im,a.re));case 2:return new ue(-Math.pow(this.im,a.re),0);case 3:return new ue(0,-Math.pow(this.im,a.re))}}if(i&&a.re>0)return ue.ZERO;const n=Math.atan2(this.im,this.re),o=$i(this.re,this.im);let l=Math.exp(a.re*o-a.im*n),u=a.im*o+a.re*n;return new ue(l*Math.cos(u),l*Math.sin(u))},sqrt:function(){const e=this.re,r=this.im;if(r===0)return e>=0?new ue(Math.sqrt(e),0):new ue(0,Math.sqrt(-e));const a=_i(e,r);let i=Math.sqrt(.5*(a+Math.abs(e))),t=Math.abs(r)/(2*i);return e>=0?new ue(i,r<0?-t:t):new ue(t,r<0?-i:i)},exp:function(){const e=Math.exp(this.re);return this.im===0?new ue(e,0):new ue(e*Math.cos(this.im),e*Math.sin(this.im))},expm1:function(){const e=this.re,r=this.im;return new ue(Math.expm1(e)*Math.cos(r)+n0(r),Math.exp(e)*Math.sin(r))},log:function(){const e=this.re,r=this.im;return r===0&&e>0?new ue(Math.log(e),0):new ue($i(e,r),Math.atan2(r,e))},abs:function(){return _i(this.re,this.im)},arg:function(){return Math.atan2(this.im,this.re)},sin:function(){const e=this.re,r=this.im;return new ue(Math.sin(e)*Sr(r),Math.cos(e)*Xr(r))},cos:function(){const e=this.re,r=this.im;return new ue(Math.cos(e)*Sr(r),-Math.sin(e)*Xr(r))},tan:function(){const e=2*this.re,r=2*this.im,a=Math.cos(e)+Sr(r);return new ue(Math.sin(e)/a,Xr(r)/a)},cot:function(){const e=2*this.re,r=2*this.im,a=Math.cos(e)-Sr(r);return new ue(-Math.sin(e)/a,Xr(r)/a)},sec:function(){const e=this.re,r=this.im,a=.5*Sr(2*r)+.5*Math.cos(2*e);return new ue(Math.cos(e)*Sr(r)/a,Math.sin(e)*Xr(r)/a)},csc:function(){const e=this.re,r=this.im,a=.5*Sr(2*r)-.5*Math.cos(2*e);return new ue(Math.sin(e)*Sr(r)/a,-Math.cos(e)*Xr(r)/a)},asin:function(){const e=this.re,r=this.im,a=new ue(r*r-e*e+1,-2*e*r).sqrt(),i=new ue(a.re-r,a.im+e).log();return new ue(i.im,-i.re)},acos:function(){const e=this.re,r=this.im,a=new ue(r*r-e*e+1,-2*e*r).sqrt(),i=new ue(a.re-r,a.im+e).log();return new ue(Math.PI/2-i.im,i.re)},atan:function(){const e=this.re,r=this.im;if(e===0){if(r===1)return new ue(0,1/0);if(r===-1)return new ue(0,-1/0)}const a=e*e+(1-r)*(1-r),i=new ue((1-r*r-e*e)/a,-2*e/a).log();return new ue(-.5*i.im,.5*i.re)},acot:function(){const e=this.re,r=this.im;if(r===0)return new ue(Math.atan2(1,e),0);const a=e*e+r*r;return a!==0?new ue(e/a,-r/a).atan():new ue(e!==0?e/0:0,r!==0?-r/0:0).atan()},asec:function(){const e=this.re,r=this.im;if(e===0&&r===0)return new ue(0,1/0);const a=e*e+r*r;return a!==0?new ue(e/a,-r/a).acos():new ue(e!==0?e/0:0,r!==0?-r/0:0).acos()},acsc:function(){const e=this.re,r=this.im;if(e===0&&r===0)return new ue(Math.PI/2,1/0);const a=e*e+r*r;return a!==0?new ue(e/a,-r/a).asin():new ue(e!==0?e/0:0,r!==0?-r/0:0).asin()},sinh:function(){const e=this.re,r=this.im;return new ue(Xr(e)*Math.cos(r),Sr(e)*Math.sin(r))},cosh:function(){const e=this.re,r=this.im;return new ue(Sr(e)*Math.cos(r),Xr(e)*Math.sin(r))},tanh:function(){const e=2*this.re,r=2*this.im,a=Sr(e)+Math.cos(r);return new ue(Xr(e)/a,Math.sin(r)/a)},coth:function(){const e=2*this.re,r=2*this.im,a=Sr(e)-Math.cos(r);return new ue(Xr(e)/a,-Math.sin(r)/a)},csch:function(){const e=this.re,r=this.im,a=Math.cos(2*r)-Sr(2*e);return new ue(-2*Xr(e)*Math.cos(r)/a,2*Sr(e)*Math.sin(r)/a)},sech:function(){const e=this.re,r=this.im,a=Math.cos(2*r)+Sr(2*e);return new ue(2*Sr(e)*Math.cos(r)/a,-2*Xr(e)*Math.sin(r)/a)},asinh:function(){const e=this.re,r=this.im;if(r===0){if(e===0)return new ue(0,0);const n=Math.abs(e),o=Math.log(n+Math.sqrt(n*n+1));return new ue(e<0?-o:o,0)}const a=e*e-r*r+1,i=2*e*r,t=new ue(a,i).sqrt();return new ue(e+t.re,r+t.im).log()},acosh:function(){const e=this.re,r=this.im;if(r===0){if(e>1)return new ue(Math.log(e+Math.sqrt(e-1)*Math.sqrt(e+1)),0);if(e<-1){const t=Math.sqrt(e*e-1);return new ue(Math.log(-e+t),Math.PI)}return new ue(0,Math.acos(e))}const a=new ue(e-1,r).sqrt(),i=new ue(e+1,r).sqrt();return new ue(e+a.re*i.re-a.im*i.im,r+a.re*i.im+a.im*i.re).log()},atanh:function(){const e=this.re,r=this.im;if(r===0){if(e===0)return new ue(0,0);if(e===1)return new ue(1/0,0);if(e===-1)return new ue(-1/0,0);if(-11){const u=(e+1)/(e-1);return new ue(.5*Math.log(u),-Math.PI/2)}const l=(1+e)/(1-e);return new ue(.5*Math.log(-l),Math.PI/2)}const a=1-e,i=1+e,t=a*a+r*r;if(t===0)return new ue(e!==-1?e/0:0,r!==0?r/0:0);const n=(i*a-r*r)/t,o=(r*a+i*r)/t;return new ue($i(n,o)/2,Math.atan2(o,n)/2)},acoth:function(){const e=this.re,r=this.im;if(e===0&&r===0)return new ue(0,Math.PI/2);const a=e*e+r*r;return a!==0?new ue(e/a,-r/a).atanh():new ue(e!==0?e/0:0,r!==0?-r/0:0).atanh()},acsch:function(){const e=this.re,r=this.im;if(r===0){if(e===0)return new ue(1/0,0);const i=1/e;return new ue(Math.log(i+Math.sqrt(i*i+1)),0)}const a=e*e+r*r;return a!==0?new ue(e/a,-r/a).asinh():new ue(e!==0?e/0:0,r!==0?-r/0:0).asinh()},asech:function(){const e=this.re,r=this.im;if(this.isZero())return ue.INFINITY;const a=e*e+r*r;return a!==0?new ue(e/a,-r/a).acosh():new ue(e!==0?e/0:0,r!==0?-r/0:0).acosh()},inverse:function(){if(this.isZero())return ue.INFINITY;if(this.isInfinite())return ue.ZERO;const e=this.re,r=this.im,a=e*e+r*r;return new ue(e/a,-r/a)},conjugate:function(){return new ue(this.re,-this.im)},neg:function(){return new ue(-this.re,-this.im)},ceil:function(e){return e=Math.pow(10,e||0),new ue(Math.ceil(this.re*e)/e,Math.ceil(this.im*e)/e)},floor:function(e){return e=Math.pow(10,e||0),new ue(Math.floor(this.re*e)/e,Math.floor(this.im*e)/e)},round:function(e){return e=Math.pow(10,e||0),new ue(Math.round(this.re*e)/e,Math.round(this.im*e)/e)},equals:function(e,r){const a=Ht(e,r);return Math.abs(a.re-this.re)<=ue.EPSILON&&Math.abs(a.im-this.im)<=ue.EPSILON},clone:function(){return new ue(this.re,this.im)},toString:function(){let e=this.re,r=this.im,a="";return this.isNaN()?"NaN":this.isInfinite()?"Infinity":(Math.abs(e)(Object.defineProperty(ue,"name",{value:"Complex"}),ue.prototype.constructor=ue,ue.prototype.type="Complex",ue.prototype.isComplex=!0,ue.prototype.toJSON=function(){return{mathjs:"Complex",re:this.re,im:this.im}},ue.prototype.toPolar=function(){return{r:this.abs(),phi:this.arg()}},ue.prototype.format=function(e){var r="",a=this.im,i=this.re,t=Vt(this.re,e),n=Vt(this.im,e),o=Ue(e)?e:e?e.precision:null;if(o!==null){var l=Math.pow(10,-o);Math.abs(i/a)r.re?1:e.rer.im?1:e.im1&&(N[h]=(N[h]||0)+1):N[g]=(N[g]||0)+1,N}var u=function(g,N){var h=0,b=1,x=1,y=0,A=0,S=0,D=1,E=1,C=0,F=1,_=1,I=1,$=1e7,T;if(g!=null)if(N!==void 0){if(h=g,b=N,x=h*b,h%1!==0||b%1!==0)throw w()}else switch(typeof g){case"object":{if("d"in g&&"n"in g)h=g.n,b=g.d,"s"in g&&(h*=g.s);else if(0 in g)h=g[0],1 in g&&(b=g[1]);else throw p();x=h*b;break}case"number":{if(g<0&&(x=g,g=-g),g%1===0)h=g;else if(g>0){for(g>=1&&(E=Math.pow(10,Math.floor(1+Math.log(g)/Math.LN10)),g/=E);F<=$&&I<=$;)if(T=(C+_)/(F+I),g===T){F+I<=$?(h=C+_,b=F+I):I>F?(h=_,b=I):(h=C,b=F);break}else g>T?(C+=_,F+=I):(_+=C,I+=F),F>$?(h=_,b=I):(h=C,b=F);h*=E}else(isNaN(g)||isNaN(N))&&(b=h=NaN);break}case"string":{if(F=g.match(/\d+|./g),F===null)throw p();if(F[C]==="-"?(x=-1,C++):F[C]==="+"&&C++,F.length===C+1?A=n(F[C++],x):F[C+1]==="."||F[C]==="."?(F[C]!=="."&&(y=n(F[C++],x)),C++,(C+1===F.length||F[C+1]==="("&&F[C+3]===")"||F[C+1]==="'"&&F[C+3]==="'")&&(A=n(F[C],x),D=Math.pow(10,F[C].length),C++),(F[C]==="("&&F[C+2]===")"||F[C]==="'"&&F[C+2]==="'")&&(S=n(F[C+1],x),E=Math.pow(10,F[C+1].length)-1,C+=3)):F[C+1]==="/"||F[C+1]===":"?(A=n(F[C],x),D=n(F[C+2],1),C+=3):F[C+3]==="/"&&F[C+1]===" "&&(y=n(F[C],x),A=n(F[C+2],x),D=n(F[C+4],1),C+=5),F.length<=C){b=D*E,x=h=S+b*y+E*A;break}}default:throw p()}if(b===0)throw d();t.s=x<0?-1:1,t.n=Math.abs(h),t.d=Math.abs(b)};function s(g,N,h){for(var b=1;N>0;g=g*g%h,N>>=1)N&1&&(b=b*g%h);return b}function c(g,N){for(;N%2===0;N/=2);for(;N%5===0;N/=5);if(N===1)return 0;for(var h=10%N,b=1;h!==1;b++)if(h=h*10%N,b>i)return 0;return b}function f(g,N,h){for(var b=1,x=s(10,h,N),y=0;y<300;y++){if(b===x)return y;b=b*10%N,x=x*10%N}return 0}function m(g,N){if(!g)return N;if(!N)return g;for(;;){if(g%=N,!g)return N;if(N%=g,!N)return g}}function v(g,N){if(u(g,N),this instanceof v)g=m(t.d,t.n),this.s=t.s,this.n=t.n/g,this.d=t.d/g;else return o(t.s*t.n,t.d)}var d=function(){return new Error("Division by Zero")},p=function(){return new Error("Invalid argument")},w=function(){return new Error("Parameters must be integer")};v.prototype={s:1,n:0,d:1,abs:function(){return o(this.n,this.d)},neg:function(){return o(-this.s*this.n,this.d)},add:function(g,N){return u(g,N),o(this.s*this.n*t.d+t.s*this.d*t.n,this.d*t.d)},sub:function(g,N){return u(g,N),o(this.s*this.n*t.d-t.s*this.d*t.n,this.d*t.d)},mul:function(g,N){return u(g,N),o(this.s*t.s*this.n*t.n,this.d*t.d)},div:function(g,N){return u(g,N),o(this.s*t.s*this.n*t.d,this.d*t.n)},clone:function(){return o(this.s*this.n,this.d)},mod:function(g,N){if(isNaN(this.n)||isNaN(this.d))return new v(NaN);if(g===void 0)return o(this.s*this.n%this.d,1);if(u(g,N),t.n===0&&this.d===0)throw d();return o(this.s*(t.d*this.n)%(t.n*this.d),t.d*this.d)},gcd:function(g,N){return u(g,N),o(m(t.n,this.n)*m(t.d,this.d),t.d*this.d)},lcm:function(g,N){return u(g,N),t.n===0&&this.n===0?o(0,1):o(t.n*this.n,m(t.n,this.n)*m(t.d,this.d))},ceil:function(g){return g=Math.pow(10,g||0),isNaN(this.n)||isNaN(this.d)?new v(NaN):o(Math.ceil(g*this.s*this.n/this.d),g)},floor:function(g){return g=Math.pow(10,g||0),isNaN(this.n)||isNaN(this.d)?new v(NaN):o(Math.floor(g*this.s*this.n/this.d),g)},round:function(g){return g=Math.pow(10,g||0),isNaN(this.n)||isNaN(this.d)?new v(NaN):o(Math.round(g*this.s*this.n/this.d),g)},inverse:function(){return o(this.s*this.d,this.n)},pow:function(g,N){if(u(g,N),t.d===1)return t.s<0?o(Math.pow(this.s*this.d,t.n),Math.pow(this.n,t.n)):o(Math.pow(this.s*this.n,t.n),Math.pow(this.d,t.n));if(this.s<0)return null;var h=l(this.n),b=l(this.d),x=1,y=1;for(var A in h)if(A!=="1"){if(A==="0"){x=0;break}if(h[A]*=t.n,h[A]%t.d===0)h[A]/=t.d;else return null;x*=Math.pow(A,h[A])}for(var A in b)if(A!=="1"){if(b[A]*=t.n,b[A]%t.d===0)b[A]/=t.d;else return null;y*=Math.pow(A,b[A])}return t.s<0?o(y,x):o(x,y)},equals:function(g,N){return u(g,N),this.s*this.n*t.d===t.s*t.n*this.d},compare:function(g,N){u(g,N);var h=this.s*this.n*t.d-t.s*t.n*this.d;return(0=0;y--)x=x.inverse().add(h[y]);if(Math.abs(x.sub(N).valueOf())0&&(h+=N,h+=" ",b%=x),h+=b,h+="/",h+=x),h},toLatex:function(g){var N,h="",b=this.n,x=this.d;return this.s<0&&(h+="-"),x===1?h+=b:(g&&(N=Math.floor(b/x))>0&&(h+=N,b%=x),h+="\\frac{",h+=b,h+="}{",h+=x,h+="}"),h},toContinued:function(){var g,N=this.n,h=this.d,b=[];if(isNaN(N)||isNaN(h))return b;do b.push(Math.floor(N/h)),g=N%h,N=h,h=g;while(N!==1);return b},toString:function(g){var N=this.n,h=this.d;if(isNaN(N)||isNaN(h))return"NaN";g=g||15;var b=c(N,h),x=f(N,h,b),y=this.s<0?"-":"";if(y+=N/h|0,N%=h,N*=10,N&&(y+="."),b){for(var A=x;A--;)y+=N/h|0,N%=h,N*=10;y+="(";for(var A=b;A--;)y+=N/h|0,N%=h,N*=10;y+=")"}else for(var A=g;N&&A--;)y+=N/h|0,N%=h,N*=10;return y}},Object.defineProperty(v,"__esModule",{value:!0}),v.default=v,v.Fraction=v,e.exports=v})()})(Ii)),Ii.exports}var c0=u0();const gt=ai(c0);var l0="Fraction",f0=[],m0=q(l0,f0,()=>(Object.defineProperty(gt,"name",{value:"Fraction"}),gt.prototype.constructor=gt,gt.prototype.type="Fraction",gt.prototype.isFraction=!0,gt.prototype.toJSON=function(){return{mathjs:"Fraction",n:this.s*this.n,d:this.d}},gt.fromJSON=function(e){return new gt(e)},gt),{isClass:!0}),v0="Range",p0=[],d0=q(v0,p0,()=>{function e(r,a,i){if(!(this instanceof e))throw new SyntaxError("Constructor must be called with the new operator");var t=r!=null,n=a!=null,o=i!=null;if(t){if(Le(r))r=r.toNumber();else if(typeof r!="number")throw new TypeError("Parameter start must be a number")}if(n){if(Le(a))a=a.toNumber();else if(typeof a!="number")throw new TypeError("Parameter end must be a number")}if(o){if(Le(i))i=i.toNumber();else if(typeof i!="number")throw new TypeError("Parameter step must be a number")}this.start=t?parseFloat(r):0,this.end=n?parseFloat(a):0,this.step=o?parseFloat(i):1}return e.prototype.type="Range",e.prototype.isRange=!0,e.parse=function(r){if(typeof r!="string")return null;var a=r.split(":"),i=a.map(function(n){return parseFloat(n)}),t=i.some(function(n){return isNaN(n)});if(t)return null;switch(i.length){case 2:return new e(i[0],i[1]);case 3:return new e(i[0],i[2],i[1]);default:return null}},e.prototype.clone=function(){return new e(this.start,this.end,this.step)},e.prototype.size=function(){var r=0,a=this.start,i=this.step,t=this.end,n=t-a;return Bt(i)===Bt(n)?r=Math.ceil(n/i):n===0&&(r=0),isNaN(r)&&(r=0),[r]},e.prototype.min=function(){var r=this.size()[0];if(r>0)return this.step>0?this.start:this.start+(r-1)*this.step},e.prototype.max=function(){var r=this.size()[0];if(r>0)return this.step>0?this.start+(r-1)*this.step:this.start},e.prototype.forEach=function(r){var a=this.start,i=this.step,t=this.end,n=0;if(i>0)for(;at;)r(a,[n],this),a+=i,n++},e.prototype.map=function(r){var a=[];return this.forEach(function(i,t,n){a[t[0]]=r(i,t,n)}),a},e.prototype.toArray=function(){var r=[];return this.forEach(function(a,i){r[i[0]]=a}),r},e.prototype.valueOf=function(){return this.toArray()},e.prototype.format=function(r){var a=Vt(this.start,r);return this.step!==1&&(a+=":"+Vt(this.step,r)),a+=":"+Vt(this.end,r),a},e.prototype.toString=function(){return this.format()},e.prototype.toJSON=function(){return{mathjs:"Range",start:this.start,end:this.end,step:this.step}},e.fromJSON=function(r){return new e(r.start,r.end,r.step)},e},{isClass:!0}),h0="Matrix",g0=[],y0=q(h0,g0,()=>{function e(){if(!(this instanceof e))throw new SyntaxError("Constructor must be called with the new operator")}return e.prototype.type="Matrix",e.prototype.isMatrix=!0,e.prototype.storage=function(){throw new Error("Cannot invoke storage on a Matrix interface")},e.prototype.datatype=function(){throw new Error("Cannot invoke datatype on a Matrix interface")},e.prototype.create=function(r,a){throw new Error("Cannot invoke create on a Matrix interface")},e.prototype.subset=function(r,a,i){throw new Error("Cannot invoke subset on a Matrix interface")},e.prototype.get=function(r){throw new Error("Cannot invoke get on a Matrix interface")},e.prototype.set=function(r,a,i){throw new Error("Cannot invoke set on a Matrix interface")},e.prototype.resize=function(r,a){throw new Error("Cannot invoke resize on a Matrix interface")},e.prototype.reshape=function(r,a){throw new Error("Cannot invoke reshape on a Matrix interface")},e.prototype.clone=function(){throw new Error("Cannot invoke clone on a Matrix interface")},e.prototype.size=function(){throw new Error("Cannot invoke size on a Matrix interface")},e.prototype.map=function(r,a){throw new Error("Cannot invoke map on a Matrix interface")},e.prototype.forEach=function(r){throw new Error("Cannot invoke forEach on a Matrix interface")},e.prototype[Symbol.iterator]=function(){throw new Error("Cannot iterate a Matrix interface")},e.prototype.toArray=function(){throw new Error("Cannot invoke toArray on a Matrix interface")},e.prototype.valueOf=function(){throw new Error("Cannot invoke valueOf on a Matrix interface")},e.prototype.format=function(r){throw new Error("Cannot invoke format on a Matrix interface")},e.prototype.toString=function(){throw new Error("Cannot invoke toString on a Matrix interface")},e},{isClass:!0});function b0(e){var r=0,a=1,i=Object.create(null),t=Object.create(null),n=0,o=function(u){var s=t[u];if(s&&(delete i[s],delete t[u],--r,a===s)){if(!r){n=0,a=1;return}for(;!Object.prototype.hasOwnProperty.call(i,++a););}};return e=Math.abs(e),{hit:function(u){var s=t[u],c=++n;if(i[c]=u,t[u]=c,!s)return++r,r<=e?void 0:(u=i[a],o(u),u);if(delete i[s],a===s)for(;!Object.prototype.hasOwnProperty.call(i,++a););},delete:o,clear:function(){r=n=0,a=1,i=Object.create(null),t=Object.create(null)}}}function jn(e){var{hasher:r,limit:a}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return a=a??Number.POSITIVE_INFINITY,r=r??JSON.stringify,function i(){typeof i.cache!="object"&&(i.cache={values:new Map,lru:b0(a||Number.POSITIVE_INFINITY)});for(var t=[],n=0;n{var{Matrix:r}=e;function a(c,f){if(!(this instanceof a))throw new SyntaxError("Constructor must be called with the new operator");if(f&&!Cr(f))throw new Error("Invalid datatype: "+f);if(Te(c))c.type==="DenseMatrix"?(this._data=qe(c._data),this._size=qe(c._size),this._datatype=f||c._datatype):(this._data=c.toArray(),this._size=c.size(),this._datatype=f||c._datatype);else if(c&&je(c.data)&&je(c.size))this._data=c.data,this._size=c.size,Qo(this._data,this._size),this._datatype=f||c.datatype;else if(je(c))this._data=s(c),this._size=Pe(this._data),Qo(this._data,this._size),this._datatype=f;else{if(c)throw new TypeError("Unsupported type of data ("+ir(c)+")");this._data=[],this._size=[0],this._datatype=f}}a.prototype=new r,a.prototype.createDenseMatrix=function(c,f){return new a(c,f)},Object.defineProperty(a,"name",{value:"DenseMatrix"}),a.prototype.constructor=a,a.prototype.type="DenseMatrix",a.prototype.isDenseMatrix=!0,a.prototype.getDataType=function(){return Vn(this._data,ir)},a.prototype.storage=function(){return"dense"},a.prototype.datatype=function(){return this._datatype},a.prototype.create=function(c,f){return new a(c,f)},a.prototype.subset=function(c,f,m){switch(arguments.length){case 1:return i(this,c);case 2:case 3:return n(this,c,f,m);default:throw new SyntaxError("Wrong number of arguments")}},a.prototype.get=function(c){if(!je(c))throw new TypeError("Array expected");if(c.length!==this._size.length)throw new Ve(c.length,this._size.length);for(var f=0;f");var h=f.max().map(function(y){return y+1});u(c,h,v);var b=d.length,x=0;o(c._data,f,m,b,x)}return c}function o(c,f,m,v,d){var p=d===v-1,w=f.dimension(d);p?w.forEach(function(g,N){nr(g),c[g]=m[N[0]]}):w.forEach(function(g,N){nr(g),o(c[g],f,m[N[0]],v,d+1)})}a.prototype.resize=function(c,f,m){if(!Qr(c))throw new TypeError("Array or Matrix expected");var v=c.valueOf().map(p=>Array.isArray(p)&&p.length===1?p[0]:p),d=m?this.clone():this;return l(d,v,f)};function l(c,f,m){if(f.length===0){for(var v=c._data;je(v);)v=v[0];return v}return c._size=f.slice(0),c._data=gn(c._data,c._size,m),c}a.prototype.reshape=function(c,f){var m=f?this.clone():this;m._data=oo(m._data,c);var v=m._size.reduce((d,p)=>d*p);return m._size=so(c,v),m};function u(c,f,m){for(var v=c._size.slice(0),d=!1;v.lengthv[p]&&(v[p]=f[p],d=!0);d&&l(c,v,m)}a.prototype.clone=function(){var c=new a({data:qe(this._data),size:qe(this._size),datatype:this._datatype});return c},a.prototype.size=function(){return this._size.slice(0)},a.prototype.map=function(c){var f=this,m=sm(c),v=function w(g,N){return je(g)?g.map(function(h,b){return w(h,N.concat(b))}):m===1?c(g):m===2?c(g,N):c(g,N,f)},d=v(this._data,[]),p=this._datatype!==void 0?Vn(d,ir):void 0;return new a(d,p)},a.prototype.forEach=function(c){var f=this,m=function v(d,p){je(d)?d.forEach(function(w,g){v(w,p.concat(g))}):c(d,p,f)};m(this._data,[])},a.prototype[Symbol.iterator]=function*(){var c=function*f(m,v){if(je(m))for(var d=0;d[h[g]]);f.push(new a(N,c._datatype))},p=0;p0?c:0,m=c<0?-c:0,v=this._size[0],d=this._size[1],p=Math.min(v-m,d-f),w=[],g=0;g0?m:0,p=m<0?-m:0,w=c[0],g=c[1],N=Math.min(w-p,g-d),h;if(je(f)){if(f.length!==N)throw new Error("Invalid value array length");h=function(S){return f[S]}}else if(Te(f)){var b=f.size();if(b.length!==1||b[0]!==N)throw new Error("Invalid matrix length");h=function(S){return f.get([S])}}else h=function(){return f};v||(v=Le(h(0))?h(0).mul(0):0);var x=[];if(c.length>0){x=gn(x,c,v);for(var y=0;y{var{typed:r}=e;return r(as,{any:qe})});function um(e){var r=e.length,a=e[0].length,i,t,n=[];for(t=0;t=i.length)throw new it(r,i.length);return Te(e)?e.create(Ga(e.valueOf(),r,a)):Ga(e,r,a)}function Ga(e,r,a){var i,t,n,o;if(r<=0)if(Array.isArray(e[0])){for(o=um(e),t=[],i=0;i{var{typed:r}=e;return r(os,{number:Ce,BigNumber:function(i){return i.isInt()},Fraction:function(i){return i.d===1&&isFinite(i.n)},"Array | Matrix":r.referToSelf(a=>i=>Ze(i,a))})}),ot="number",Sn="number, number";function cm(e){return Math.abs(e)}cm.signature=ot;function lm(e,r){return e+r}lm.signature=Sn;function fm(e,r){return e-r}fm.signature=Sn;function mm(e,r){return e*r}mm.signature=Sn;function vm(e){return-e}vm.signature=ot;function pm(e){return e}pm.signature=ot;function Hn(e){return Ad(e)}Hn.signature=ot;function dm(e){return e*e*e}dm.signature=ot;function hm(e){return Math.exp(e)}hm.signature=ot;function gm(e){return Ed(e)}gm.signature=ot;function ym(e,r){if(!Ce(e)||!Ce(r))throw new Error("Parameters in function lcm must be integer numbers");if(e===0||r===0)return 0;for(var a,i=e*r;r!==0;)a=r,r=e%a,e=a;return Math.abs(i/e)}ym.signature=Sn;function C0(e,r){return Math.log(e)}function bm(e){return Nd(e)}bm.signature=ot;function xm(e){return wd(e)}xm.signature=ot;function ss(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2,a=r<0;if(a&&(r=-r),r===0)throw new Error("Root must be non-zero");if(e<0&&Math.abs(r)%2!==1)throw new Error("Root must be odd when a is negative.");if(e===0)return a?1/0:0;if(!isFinite(e))return a?0:e;var i=Math.pow(Math.abs(e),1/r);return i=e<0?-i:i,a?1/i:i}function Qi(e){return Bt(e)}Qi.signature=ot;function wm(e){return e*e}wm.signature=ot;function Nm(e,r){var a,i,t,n=0,o=1,l=1,u=0;if(!Ce(e)||!Ce(r))throw new Error("Parameters in function xgcd must be integer numbers");for(;r;)i=Math.floor(e/r),t=e-i*r,a=n,n=o-i*n,o=a,a=l,l=u-i*l,u=a,e=r,r=t;var s;return e<0?s=[-e,-o,-u]:s=[e,e?o:0,u],s}Nm.signature=Sn;function Dm(e,r){return e*e<1&&r===1/0||e*e>1&&r===-1/0?0:Math.pow(e,r)}Dm.signature=Sn;function Ln(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;if(!Ce(r)||r<0||r>15)throw new Error("Number of decimals in function round must be an integer from 0 to 15 inclusive");return parseFloat(_f(e,r))}var M0="number",Cn="number, number";function Am(e,r){if(!Ce(e)||!Ce(r))throw new Error("Integers expected in function bitAnd");return e&r}Am.signature=Cn;function Em(e){if(!Ce(e))throw new Error("Integer expected in function bitNot");return~e}Em.signature=M0;function Sm(e,r){if(!Ce(e)||!Ce(r))throw new Error("Integers expected in function bitOr");return e|r}Sm.signature=Cn;function Cm(e,r){if(!Ce(e)||!Ce(r))throw new Error("Integers expected in function bitXor");return e^r}Cm.signature=Cn;function Mm(e,r){if(!Ce(e)||!Ce(r))throw new Error("Integers expected in function leftShift");return e<>r}Fm.signature=Cn;function Bm(e,r){if(!Ce(e)||!Ce(r))throw new Error("Integers expected in function rightLogShift");return e>>>r}Bm.signature=Cn;function xt(e,r){if(r>1;return xt(e,a)*xt(a+1,r)}function Tm(e,r){if(!Ce(e)||e<0)throw new TypeError("Positive integer value expected in function combinations");if(!Ce(r)||r<0)throw new TypeError("Positive integer value expected in function combinations");if(r>e)throw new TypeError("k must be less than or equal to n");for(var a=e-r,i=1,t=r171?1/0:xt(1,e-1);if(e<.5)return Math.PI/(Math.sin(Math.PI*e)*Va(1-e));if(e>=171.35)return 1/0;if(e>85){var a=e*e,i=a*e,t=i*e,n=t*e;return Math.sqrt(2*Math.PI/e)*Math.pow(e/Math.E,e)*(1+1/(12*e)+1/(288*a)-139/(51840*i)-571/(2488320*t)+163879/(209018880*n)+5246819/(75246796800*n*e))}--e,r=dn[0];for(var o=1;o=1;i--)a+=us[i]/(e+i);return Rm+(e+.5)*Math.log(r)-r+Math.log(a)}Za.signature="number";var Br="number";function zm(e){return Bd(e)}zm.signature=Br;function Pm(e){return Math.atan(1/e)}Pm.signature=Br;function Um(e){return isFinite(e)?(Math.log((e+1)/e)+Math.log(e/(e-1)))/2:0}Um.signature=Br;function Lm(e){return Math.asin(1/e)}Lm.signature=Br;function km(e){var r=1/e;return Math.log(r+Math.sqrt(r*r+1))}km.signature=Br;function Hm(e){return Math.acos(1/e)}Hm.signature=Br;function Gm(e){var r=1/e,a=Math.sqrt(r*r-1);return Math.log(a+r)}Gm.signature=Br;function Vm(e){return Td(e)}Vm.signature=Br;function Zm(e){return Od(e)}Zm.signature=Br;function Xm(e){return 1/Math.tan(e)}Xm.signature=Br;function Ym(e){var r=Math.exp(2*e);return(r+1)/(r-1)}Ym.signature=Br;function Wm(e){return 1/Math.sin(e)}Wm.signature=Br;function Jm(e){return e===0?Number.POSITIVE_INFINITY:Math.abs(2/(Math.exp(e)-Math.exp(-e)))*Bt(e)}Jm.signature=Br;function Qm(e){return 1/Math.cos(e)}Qm.signature=Br;function Km(e){return 2/(Math.exp(e)+Math.exp(-e))}Km.signature=Br;function jm(e){return $d(e)}jm.signature=Br;var di="number";function ev(e){return e<0}ev.signature=di;function rv(e){return e>0}rv.signature=di;function tv(e){return e===0}tv.signature=di;function nv(e){return Number.isNaN(e)}nv.signature=di;var cs="isNegative",q0=["typed"],R0=q(cs,q0,e=>{var{typed:r}=e;return r(cs,{number:ev,BigNumber:function(i){return i.isNeg()&&!i.isZero()&&!i.isNaN()},Fraction:function(i){return i.s<0},Unit:r.referToSelf(a=>i=>r.find(a,i.valueType())(i.value)),"Array | Matrix":r.referToSelf(a=>i=>Ze(i,a))})}),ls="isNumeric",z0=["typed"],P0=q(ls,z0,e=>{var{typed:r}=e;return r(ls,{"number | BigNumber | Fraction | boolean":()=>!0,"Complex | Unit | string | null | undefined | Node":()=>!1,"Array | Matrix":r.referToSelf(a=>i=>Ze(i,a))})}),fs="hasNumericValue",U0=["typed","isNumeric"],L0=q(fs,U0,e=>{var{typed:r,isNumeric:a}=e;return r(fs,{boolean:()=>!0,string:function(t){return t.trim().length>0&&!isNaN(Number(t))},any:function(t){return a(t)}})}),ms="isPositive",k0=["typed"],H0=q(ms,k0,e=>{var{typed:r}=e;return r(ms,{number:rv,BigNumber:function(i){return!i.isNeg()&&!i.isZero()&&!i.isNaN()},Fraction:function(i){return i.s>0&&i.n>0},Unit:r.referToSelf(a=>i=>r.find(a,i.valueType())(i.value)),"Array | Matrix":r.referToSelf(a=>i=>Ze(i,a))})}),vs="isZero",G0=["typed"],V0=q(vs,G0,e=>{var{typed:r}=e;return r(vs,{number:tv,BigNumber:function(i){return i.isZero()},Complex:function(i){return i.re===0&&i.im===0},Fraction:function(i){return i.d===1&&i.n===0},Unit:r.referToSelf(a=>i=>r.find(a,i.valueType())(i.value)),"Array | Matrix":r.referToSelf(a=>i=>Ze(i,a))})}),ps="isNaN",Z0=["typed"],X0=q(ps,Z0,e=>{var{typed:r}=e;return r(ps,{number:nv,BigNumber:function(i){return i.isNaN()},Fraction:function(i){return!1},Complex:function(i){return i.isNaN()},Unit:function(i){return Number.isNaN(i.value)},"Array | Matrix":function(i){return Ze(i,Number.isNaN)}})}),ds="typeOf",Y0=["typed"],W0=q(ds,Y0,e=>{var{typed:r}=e;return r(ds,{any:ir})});function Kr(e,r,a){if(a==null)return e.eq(r);if(e.eq(r))return!0;if(e.isNaN()||r.isNaN())return!1;if(e.isFinite()&&r.isFinite()){var i=e.minus(r).abs();if(i.isZero())return!0;var t=e.constructor.max(e.abs(),r.abs());return i.lte(t.times(a))}return!1}function J0(e,r,a){return Ir(e.re,r.re,a)&&Ir(e.im,r.im,a)}var Mn=q("compareUnits",["typed"],e=>{var{typed:r}=e;return{"Unit, Unit":r.referToSelf(a=>(i,t)=>{if(!i.equalBase(t))throw new Error("Cannot compare units with different base");return r.find(a,[i.valueType(),t.valueType()])(i.value,t.value)})}}),Xa="equalScalar",Q0=["typed","config"],K0=q(Xa,Q0,e=>{var{typed:r,config:a}=e,i=Mn({typed:r});return r(Xa,{"boolean, boolean":function(n,o){return n===o},"number, number":function(n,o){return Ir(n,o,a.epsilon)},"BigNumber, BigNumber":function(n,o){return n.eq(o)||Kr(n,o,a.epsilon)},"Fraction, Fraction":function(n,o){return n.equals(o)},"Complex, Complex":function(n,o){return J0(n,o,a.epsilon)}},i)});q(Xa,["typed","config"],e=>{var{typed:r,config:a}=e;return r(Xa,{"number, number":function(t,n){return Ir(t,n,a.epsilon)}})});var j0="SparseMatrix",eg=["typed","equalScalar","Matrix"],rg=q(j0,eg,e=>{var{typed:r,equalScalar:a,Matrix:i}=e;function t(p,w){if(!(this instanceof t))throw new SyntaxError("Constructor must be called with the new operator");if(w&&!Cr(w))throw new Error("Invalid datatype: "+w);if(Te(p))n(this,p,w);else if(p&&je(p.index)&&je(p.ptr)&&je(p.size))this._values=p.values,this._index=p.index,this._ptr=p.ptr,this._size=p.size,this._datatype=w||p.datatype;else if(je(p))o(this,p,w);else{if(p)throw new TypeError("Unsupported type of data ("+ir(p)+")");this._values=[],this._index=[],this._ptr=[0],this._size=[0,0],this._datatype=w}}function n(p,w,g){w.type==="SparseMatrix"?(p._values=w._values?qe(w._values):void 0,p._index=qe(w._index),p._ptr=qe(w._ptr),p._size=qe(w._size),p._datatype=g||w._datatype):o(p,w.valueOf(),g||w._datatype)}function o(p,w,g){p._values=[],p._index=[],p._ptr=[],p._datatype=g;var N=w.length,h=0,b=a,x=0;if(Cr(g)&&(b=r.find(a,[g,g])||a,x=r.convert(0,g)),N>0){var y=0;do{p._ptr.push(p._index.length);for(var A=0;A");if(h.length===1){var S=w.dimension(0);S.forEach(function(C,F){nr(C),p.set([C,0],g[F[0]],N)})}else{var D=w.dimension(0),E=w.dimension(1);D.forEach(function(C,F){nr(C),E.forEach(function(_,I){nr(_),p.set([C,_],g[F[0]][I[0]],N)})})}}return p}t.prototype.get=function(p){if(!je(p))throw new TypeError("Array expected");if(p.length!==this._size.length)throw new Ve(p.length,this._size.length);if(!this._values)throw new Error("Cannot invoke get on a Pattern only matrix");var w=p[0],g=p[1];nr(w,this._size[0]),nr(g,this._size[1]);var N=s(w,this._ptr[g],this._ptr[g+1],this._index);return Nb-1||h>x-1)&&(m(this,Math.max(N+1,b),Math.max(h+1,x),g),b=this._size[0],x=this._size[1]),nr(N,b),nr(h,x);var S=s(N,this._ptr[h],this._ptr[h+1],this._index);return SArray.isArray(b)&&b.length===1?b[0]:b);if(N.length!==2)throw new Error("Only two dimensions matrix are supported");N.forEach(function(b){if(!Ue(b)||!Ce(b)||b<0)throw new TypeError("Invalid size, must contain positive integers (size: "+Ge(N)+")")});var h=g?this.clone():this;return m(h,N[0],N[1],w)};function m(p,w,g,N){var h=N||0,b=a,x=0;Cr(p._datatype)&&(b=r.find(a,[p._datatype,p._datatype])||a,x=r.convert(0,p._datatype),h=r.convert(h,p._datatype));var y=!b(h,x),A=p._size[0],S=p._size[1],D,E,C;if(g>S){for(E=S;EA){if(y){var F=0;for(E=0;Ew-1&&(p._values.splice(C,1),p._index.splice(C,1),I++)}p._ptr[E]=p._values.length}return p._size[0]=w,p._size[1]=g,p}t.prototype.reshape=function(p,w){if(!je(p))throw new TypeError("Array expected");if(p.length!==2)throw new Error("Sparse matrices can only be reshaped in two dimensions");p.forEach(function(O){if(!Ue(O)||!Ce(O)||O<=-2||O===0)throw new TypeError("Invalid size, must contain positive integers or -1 (size: "+Ge(p)+")")});var g=this._size[0]*this._size[1];p=so(p,g);var N=p[0]*p[1];if(g!==N)throw new Error("Reshaping sparse matrix will result in the wrong number of elements");var h=w?this.clone():this;if(this._size[0]===p[0]&&this._size[1]===p[1])return h;for(var b=[],x=0;x=w&&T<=g&&C(p._values[$],T-w,F-N)}else{for(var B={},L=_;L "+(this._values?Ge(this._values[A],p):"X")}return h},t.prototype.toString=function(){return Ge(this.toArray())},t.prototype.toJSON=function(){return{mathjs:"SparseMatrix",values:this._values,index:this._index,ptr:this._ptr,size:this._size,datatype:this._datatype}},t.prototype.diagonal=function(p){if(p){if(Le(p)&&(p=p.toNumber()),!Ue(p)||!Ce(p))throw new TypeError("The parameter k must be an integer number")}else p=0;var w=p>0?p:0,g=p<0?-p:0,N=this._size[0],h=this._size[1],b=Math.min(N-g,h-w),x=[],y=[],A=[];A[0]=0;for(var S=w;S0?g:0,A=g<0?-g:0,S=p[0],D=p[1],E=Math.min(S-A,D-y),C;if(je(w)){if(w.length!==E)throw new Error("Invalid value array length");C=function(Y){return w[Y]}}else if(Te(w)){var F=w.size();if(F.length!==1||F[0]!==E)throw new Error("Invalid matrix length");C=function(Y){return w.get([Y])}}else C=function(){return w};for(var _=[],I=[],$=[],T=0;T=0&&B=A||h[D]!==w)){var C=N?N[S]:void 0;h.splice(D,0,w),N&&N.splice(D,0,C),h.splice(D<=S?S+1:S,1),N&&N.splice(D<=S?S+1:S,1);continue}if(D=A||h[S]!==p)){var F=N?N[D]:void 0;h.splice(S,0,p),N&&N.splice(S,0,F),h.splice(S<=D?D+1:D,1),N&&N.splice(S<=D?D+1:D,1)}}},t},{isClass:!0}),tg="number",ng=["typed"];function ag(e){var r=e.match(/(0[box])([0-9a-fA-F]*)\.([0-9a-fA-F]*)/);if(r){var a={"0b":2,"0o":8,"0x":16}[r[1]],i=r[2],t=r[3];return{input:e,radix:a,integerPart:i,fractionalPart:t}}else return null}function ig(e){for(var r=parseInt(e.integerPart,e.radix),a=0,i=0;i{var{typed:r}=e,a=r("number",{"":function(){return 0},number:function(t){return t},string:function(t){if(t==="NaN")return NaN;var n=ag(t);if(n)return ig(n);var o=0,l=t.match(/(0[box][0-9a-fA-F]*)i([0-9]*)/);l&&(o=Number(l[2]),t=l[1]);var u=Number(t);if(isNaN(u))throw new SyntaxError('String "'+t+'" is not a valid number');if(l){if(u>2**o-1)throw new SyntaxError('String "'.concat(t,'" is out of range'));u>=2**(o-1)&&(u=u-2**o)}return u},BigNumber:function(t){return t.toNumber()},Fraction:function(t){return t.valueOf()},Unit:r.referToSelf(i=>t=>{var n=t.clone();return n.value=i(t.value),n}),null:function(t){return 0},"Unit, string | Unit":function(t,n){return t.toNumber(n)},"Array | Matrix":r.referToSelf(i=>t=>Ze(t,i))});return a.fromJSON=function(i){return parseFloat(i.value)},a}),hs="string",sg=["typed"],ug=q(hs,sg,e=>{var{typed:r}=e;return r(hs,{"":function(){return""},number:Vt,null:function(i){return"null"},boolean:function(i){return i+""},string:function(i){return i},"Array | Matrix":r.referToSelf(a=>i=>Ze(i,a)),any:function(i){return String(i)}})}),gs="boolean",cg=["typed"],lg=q(gs,cg,e=>{var{typed:r}=e;return r(gs,{"":function(){return!1},boolean:function(i){return i},number:function(i){return!!i},null:function(i){return!1},BigNumber:function(i){return!i.isZero()},string:function(i){var t=i.toLowerCase();if(t==="true")return!0;if(t==="false")return!1;var n=Number(i);if(i!==""&&!isNaN(n))return!!n;throw new Error('Cannot convert "'+i+'" to a boolean')},"Array | Matrix":r.referToSelf(a=>i=>Ze(i,a))})}),fg="bignumber",mg=["typed","BigNumber"],vg=q(fg,mg,e=>{var{typed:r,BigNumber:a}=e;return r("bignumber",{"":function(){return new a(0)},number:function(t){return new a(t+"")},string:function(t){var n=t.match(/(0[box][0-9a-fA-F]*)i([0-9]*)/);if(n){var o=n[2],l=a(n[1]),u=new a(2).pow(Number(o));if(l.gt(u.sub(1)))throw new SyntaxError('String "'.concat(t,'" is out of range'));var s=new a(2).pow(Number(o)-1);return l.gte(s)?l.sub(u):l}return new a(t)},BigNumber:function(t){return t},Unit:r.referToSelf(i=>t=>{var n=t.clone();return n.value=i(t.value),n}),Fraction:function(t){return new a(t.n).div(t.d).times(t.s)},null:function(t){return new a(0)},"Array | Matrix":r.referToSelf(i=>t=>Ze(t,i))})}),pg="complex",dg=["typed","Complex"],hg=q(pg,dg,e=>{var{typed:r,Complex:a}=e;return r("complex",{"":function(){return a.ZERO},number:function(t){return new a(t,0)},"number, number":function(t,n){return new a(t,n)},"BigNumber, BigNumber":function(t,n){return new a(t.toNumber(),n.toNumber())},Fraction:function(t){return new a(t.valueOf(),0)},Complex:function(t){return t.clone()},string:function(t){return a(t)},null:function(t){return a(0)},Object:function(t){if("re"in t&&"im"in t)return new a(t.re,t.im);if("r"in t&&"phi"in t||"abs"in t&&"arg"in t)return new a(t);throw new Error("Expected object with properties (re and im) or (r and phi) or (abs and arg)")},"Array | Matrix":r.referToSelf(i=>t=>Ze(t,i))})}),gg="fraction",yg=["typed","Fraction"],bg=q(gg,yg,e=>{var{typed:r,Fraction:a}=e;return r("fraction",{number:function(t){if(!isFinite(t)||isNaN(t))throw new Error(t+" cannot be represented as a fraction");return new a(t)},string:function(t){return new a(t)},"number, number":function(t,n){return new a(t,n)},null:function(t){return new a(0)},BigNumber:function(t){return new a(t.toString())},Fraction:function(t){return t},Unit:r.referToSelf(i=>t=>{var n=t.clone();return n.value=i(t.value),n}),Object:function(t){return new a(t)},"Array | Matrix":r.referToSelf(i=>t=>Ze(t,i))})}),ys="matrix",xg=["typed","Matrix","DenseMatrix","SparseMatrix"],wg=q(ys,xg,e=>{var{typed:r,Matrix:a,DenseMatrix:i,SparseMatrix:t}=e;return r(ys,{"":function(){return n([])},string:function(l){return n([],l)},"string, string":function(l,u){return n([],l,u)},Array:function(l){return n(l)},Matrix:function(l){return n(l,l.storage())},"Array | Matrix, string":n,"Array | Matrix, string, string":n});function n(o,l,u){if(l==="dense"||l==="default"||l===void 0)return new i(o,u);if(l==="sparse")return new t(o,u);throw new TypeError("Unknown matrix type "+JSON.stringify(l)+".")}}),bs="matrixFromFunction",Ng=["typed","matrix","isZero"],Dg=q(bs,Ng,e=>{var{typed:r,matrix:a,isZero:i}=e;return r(bs,{"Array | Matrix, function, string, string":function(o,l,u,s){return t(o,l,u,s)},"Array | Matrix, function, string":function(o,l,u){return t(o,l,u)},"Matrix, function":function(o,l){return t(o,l,"dense")},"Array, function":function(o,l){return t(o,l,"dense").toArray()},"Array | Matrix, string, function":function(o,l,u){return t(o,u,l)},"Array | Matrix, string, string, function":function(o,l,u,s){return t(o,s,l,u)}});function t(n,o,l,u){var s;return u!==void 0?s=a(l,u):s=a(l),s.resize(n),s.forEach(function(c,f){var m=o(f);i(m)||s.set(f,m)}),s}}),xs="matrixFromRows",Ag=["typed","matrix","flatten","size"],Eg=q(xs,Ag,e=>{var{typed:r,matrix:a,flatten:i,size:t}=e;return r(xs,{"...Array":function(u){return n(u)},"...Matrix":function(u){return a(n(u.map(s=>s.toArray())))}});function n(l){if(l.length===0)throw new TypeError("At least one row is needed to construct a matrix.");var u=o(l[0]),s=[];for(var c of l){var f=o(c);if(f!==u)throw new TypeError("The vectors had different length: "+(u|0)+" โ‰  "+(f|0));s.push(i(c))}return s}function o(l){var u=t(l);if(u.length===1)return u[0];if(u.length===2){if(u[0]===1)return u[1];if(u[1]===1)return u[0];throw new TypeError("At least one of the arguments is not a vector.")}else throw new TypeError("Only one- or two-dimensional vectors are supported.")}}),ws="matrixFromColumns",Sg=["typed","matrix","flatten","size"],Cg=q(ws,Sg,e=>{var{typed:r,matrix:a,flatten:i,size:t}=e;return r(ws,{"...Array":function(u){return n(u)},"...Matrix":function(u){return a(n(u.map(s=>s.toArray())))}});function n(l){if(l.length===0)throw new TypeError("At least one column is needed to construct a matrix.");for(var u=o(l[0]),s=[],c=0;c{var{typed:r}=e;return r(Ns,{"Unit, Array":function(i,t){return i.splitUnit(t)}})}),Ds="unaryMinus",Bg=["typed"],Tg=q(Ds,Bg,e=>{var{typed:r}=e;return r(Ds,{number:vm,"Complex | BigNumber | Fraction":a=>a.neg(),Unit:r.referToSelf(a=>i=>{var t=i.clone();return t.value=r.find(a,t.valueType())(i.value),t}),"Array | Matrix":r.referToSelf(a=>i=>Ze(i,a))})}),As="unaryPlus",Og=["typed","config","BigNumber"],_g=q(As,Og,e=>{var{typed:r,config:a,BigNumber:i}=e;return r(As,{number:pm,Complex:function(n){return n},BigNumber:function(n){return n},Fraction:function(n){return n},Unit:function(n){return n.clone()},"Array | Matrix":r.referToSelf(t=>n=>Ze(n,t)),"boolean | string":function(n){return a.number==="BigNumber"?new i(+n):+n}})}),Es="abs",$g=["typed"],Ig=q(Es,$g,e=>{var{typed:r}=e;return r(Es,{number:cm,"Complex | BigNumber | Fraction | Unit":a=>a.abs(),"Array | Matrix":r.referToSelf(a=>i=>Ze(i,a))})}),Ss="apply",qg=["typed","isInteger"],fo=q(Ss,qg,e=>{var{typed:r,isInteger:a}=e;return r(Ss,{"Array | Matrix, number | BigNumber, function":function(t,n,o){if(!a(n))throw new TypeError("Integer number expected for dimension");var l=Array.isArray(t)?Pe(t):t.size();if(n<0||n>=l.length)throw new it(n,l.length);return Te(t)?t.create(Ya(t.valueOf(),n,o)):Ya(t,n,o)}})});function Ya(e,r,a){var i,t,n;if(r<=0)if(Array.isArray(e[0])){for(n=Rg(e),t=[],i=0;i{var{typed:r}=e;return r(Cs,{"number, number":lm,"Complex, Complex":function(i,t){return i.add(t)},"BigNumber, BigNumber":function(i,t){return i.plus(t)},"Fraction, Fraction":function(i,t){return i.add(t)},"Unit, Unit":r.referToSelf(a=>(i,t)=>{if(i.value===null||i.value===void 0)throw new Error("Parameter x contains a unit with undefined value");if(t.value===null||t.value===void 0)throw new Error("Parameter y contains a unit with undefined value");if(!i.equalBase(t))throw new Error("Units do not match");var n=i.clone();return n.value=r.find(a,[n.valueType(),t.valueType()])(n.value,t.value),n.fixPrefix=!1,n})})}),Ms="subtractScalar",Ug=["typed"],Lg=q(Ms,Ug,e=>{var{typed:r}=e;return r(Ms,{"number, number":fm,"Complex, Complex":function(i,t){return i.sub(t)},"BigNumber, BigNumber":function(i,t){return i.minus(t)},"Fraction, Fraction":function(i,t){return i.sub(t)},"Unit, Unit":r.referToSelf(a=>(i,t)=>{if(i.value===null||i.value===void 0)throw new Error("Parameter x contains a unit with undefined value");if(t.value===null||t.value===void 0)throw new Error("Parameter y contains a unit with undefined value");if(!i.equalBase(t))throw new Error("Units do not match");var n=i.clone();return n.value=r.find(a,[n.valueType(),t.valueType()])(n.value,t.value),n.fixPrefix=!1,n})})}),Fs="cbrt",kg=["config","typed","isNegative","unaryMinus","matrix","Complex","BigNumber","Fraction"],Hg=q(Fs,kg,e=>{var{config:r,typed:a,isNegative:i,unaryMinus:t,matrix:n,Complex:o,BigNumber:l,Fraction:u}=e;return a(Fs,{number:Hn,Complex:s,"Complex, boolean":s,BigNumber:function(m){return m.cbrt()},Unit:c});function s(f,m){var v=f.arg()/3,d=f.abs(),p=new o(Hn(d),0).mul(new o(0,v).exp());if(m){var w=[p,new o(Hn(d),0).mul(new o(0,v+Math.PI*2/3).exp()),new o(Hn(d),0).mul(new o(0,v-Math.PI*2/3).exp())];return r.matrix==="Array"?w:n(w)}else return p}function c(f){if(f.value&&wt(f.value)){var m=f.clone();return m.value=1,m=m.pow(1/3),m.value=s(f.value),m}else{var v=i(f.value);v&&(f.value=t(f.value));var d;Le(f.value)?d=new l(1).div(3):Jn(f.value)?d=new u(1,3):d=1/3;var p=f.pow(d);return v&&(p.value=t(p.value)),p}}}),Gg="matAlgo11xS0s",Vg=["typed","equalScalar"],Dr=q(Gg,Vg,e=>{var{typed:r,equalScalar:a}=e;return function(t,n,o,l){var u=t._values,s=t._index,c=t._ptr,f=t._size,m=t._datatype;if(!u)throw new Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");var v=f[0],d=f[1],p,w=a,g=0,N=o;typeof m=="string"&&(p=m,w=r.find(a,[p,p]),g=r.convert(0,p),n=r.convert(n,p),N=r.find(o,[p,p]));for(var h=[],b=[],x=[],y=0;y{var{typed:r,DenseMatrix:a}=e;return function(t,n,o,l){var u=t._values,s=t._index,c=t._ptr,f=t._size,m=t._datatype;if(!u)throw new Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");var v=f[0],d=f[1],p,w=o;typeof m=="string"&&(p=m,n=r.convert(n,p),w=r.find(o,[p,p]));for(var g=[],N=[],h=[],b=0;b{var{typed:r}=e;return function(t,n,o,l){var u=t._data,s=t._size,c=t._datatype,f,m=o;typeof c=="string"&&(f=c,n=r.convert(n,f),m=r.find(o,[f,f]));var v=s.length>0?a(m,0,s,s[0],u,n,l):[];return t.createDenseMatrix({data:v,size:qe(s),datatype:f})};function a(i,t,n,o,l,u,s){var c=[];if(t===n.length-1)for(var f=0;f{var{typed:r,config:a,round:i}=e;return r(Ki,{number:function(n){return Ir(n,i(n),a.epsilon)?i(n):Math.ceil(n)},"number, number":function(n,o){if(Ir(n,i(n,o),a.epsilon))return i(n,o);var[l,u]="".concat(n,"e").split("e"),s=Math.ceil(Number("".concat(l,"e").concat(Number(u)+o)));return[l,u]="".concat(s,"e").split("e"),Number("".concat(l,"e").concat(Number(u)-o))}})}),Kg=q(Ki,Jg,e=>{var{typed:r,config:a,round:i,matrix:t,equalScalar:n,zeros:o,DenseMatrix:l}=e,u=Dr({typed:r,equalScalar:n}),s=hr({typed:r,DenseMatrix:l}),c=st({typed:r}),f=Qg({typed:r,config:a,round:i});return r("ceil",{number:f.signatures.number,"number,number":f.signatures["number,number"],Complex:function(v){return v.ceil()},"Complex, number":function(v,d){return v.ceil(d)},"Complex, BigNumber":function(v,d){return v.ceil(d.toNumber())},BigNumber:function(v){return Kr(v,i(v),a.epsilon)?i(v):v.ceil()},"BigNumber, BigNumber":function(v,d){return Kr(v,i(v,d),a.epsilon)?i(v,d):v.toDecimalPlaces(d.toNumber(),$t.ROUND_CEIL)},Fraction:function(v){return v.ceil()},"Fraction, number":function(v,d){return v.ceil(d)},"Fraction, BigNumber":function(v,d){return v.ceil(d.toNumber())},"Array | Matrix":r.referToSelf(m=>v=>Ze(v,m)),"Array, number | BigNumber":r.referToSelf(m=>(v,d)=>Ze(v,p=>m(p,d))),"SparseMatrix, number | BigNumber":r.referToSelf(m=>(v,d)=>u(v,d,m,!1)),"DenseMatrix, number | BigNumber":r.referToSelf(m=>(v,d)=>c(v,d,m,!1)),"number | Complex | Fraction | BigNumber, Array":r.referToSelf(m=>(v,d)=>c(t(d),v,m,!0).valueOf()),"number | Complex | Fraction | BigNumber, Matrix":r.referToSelf(m=>(v,d)=>n(v,0)?o(d.size(),d.storage()):d.storage()==="dense"?c(d,v,m,!0):s(d,v,m,!0))})}),Bs="cube",jg=["typed"],e1=q(Bs,jg,e=>{var{typed:r}=e;return r(Bs,{number:dm,Complex:function(i){return i.mul(i).mul(i)},BigNumber:function(i){return i.times(i).times(i)},Fraction:function(i){return i.pow(3)},Unit:function(i){return i.pow(3)}})}),Ts="exp",r1=["typed"],t1=q(Ts,r1,e=>{var{typed:r}=e;return r(Ts,{number:hm,Complex:function(i){return i.exp()},BigNumber:function(i){return i.exp()}})}),Os="expm1",n1=["typed","Complex"],a1=q(Os,n1,e=>{var{typed:r,Complex:a}=e;return r(Os,{number:gm,Complex:function(t){var n=Math.exp(t.re);return new a(n*Math.cos(t.im)-1,n*Math.sin(t.im))},BigNumber:function(t){return t.exp().minus(1)}})}),ji="fix",i1=["typed","Complex","matrix","ceil","floor","equalScalar","zeros","DenseMatrix"],o1=q(ji,["typed","ceil","floor"],e=>{var{typed:r,ceil:a,floor:i}=e;return r(ji,{number:function(n){return n>0?i(n):a(n)},"number, number":function(n,o){return n>0?i(n,o):a(n,o)}})}),s1=q(ji,i1,e=>{var{typed:r,Complex:a,matrix:i,ceil:t,floor:n,equalScalar:o,zeros:l,DenseMatrix:u}=e,s=hr({typed:r,DenseMatrix:u}),c=st({typed:r}),f=o1({typed:r,ceil:t,floor:n});return r("fix",{number:f.signatures.number,"number, number | BigNumber":f.signatures["number,number"],Complex:function(v){return new a(v.re>0?Math.floor(v.re):Math.ceil(v.re),v.im>0?Math.floor(v.im):Math.ceil(v.im))},"Complex, number":function(v,d){return new a(v.re>0?n(v.re,d):t(v.re,d),v.im>0?n(v.im,d):t(v.im,d))},"Complex, BigNumber":function(v,d){var p=d.toNumber();return new a(v.re>0?n(v.re,p):t(v.re,p),v.im>0?n(v.im,p):t(v.im,p))},BigNumber:function(v){return v.isNegative()?t(v):n(v)},"BigNumber, number | BigNumber":function(v,d){return v.isNegative()?t(v,d):n(v,d)},Fraction:function(v){return v.s<0?v.ceil():v.floor()},"Fraction, number | BigNumber":function(v,d){return v.s<0?t(v,d):n(v,d)},"Array | Matrix":r.referToSelf(m=>v=>Ze(v,m)),"Array | Matrix, number | BigNumber":r.referToSelf(m=>(v,d)=>Ze(v,p=>m(p,d))),"number | Complex | Fraction | BigNumber, Array":r.referToSelf(m=>(v,d)=>c(i(d),v,m,!0).valueOf()),"number | Complex | Fraction | BigNumber, Matrix":r.referToSelf(m=>(v,d)=>o(v,0)?l(d.size(),d.storage()):d.storage()==="dense"?c(d,v,m,!0):s(d,v,m,!0))})}),eo="floor",u1=["typed","config","round","matrix","equalScalar","zeros","DenseMatrix"],c1=q(eo,["typed","config","round"],e=>{var{typed:r,config:a,round:i}=e;return r(eo,{number:function(n){return Ir(n,i(n),a.epsilon)?i(n):Math.floor(n)},"number, number":function(n,o){if(Ir(n,i(n,o),a.epsilon))return i(n,o);var[l,u]="".concat(n,"e").split("e"),s=Math.floor(Number("".concat(l,"e").concat(Number(u)+o)));return[l,u]="".concat(s,"e").split("e"),Number("".concat(l,"e").concat(Number(u)-o))}})}),av=q(eo,u1,e=>{var{typed:r,config:a,round:i,matrix:t,equalScalar:n,zeros:o,DenseMatrix:l}=e,u=Dr({typed:r,equalScalar:n}),s=hr({typed:r,DenseMatrix:l}),c=st({typed:r}),f=c1({typed:r,config:a,round:i});return r("floor",{number:f.signatures.number,"number,number":f.signatures["number,number"],Complex:function(v){return v.floor()},"Complex, number":function(v,d){return v.floor(d)},"Complex, BigNumber":function(v,d){return v.floor(d.toNumber())},BigNumber:function(v){return Kr(v,i(v),a.epsilon)?i(v):v.floor()},"BigNumber, BigNumber":function(v,d){return Kr(v,i(v,d),a.epsilon)?i(v,d):v.toDecimalPlaces(d.toNumber(),$t.ROUND_FLOOR)},Fraction:function(v){return v.floor()},"Fraction, number":function(v,d){return v.floor(d)},"Fraction, BigNumber":function(v,d){return v.floor(d.toNumber())},"Array | Matrix":r.referToSelf(m=>v=>Ze(v,m)),"Array, number | BigNumber":r.referToSelf(m=>(v,d)=>Ze(v,p=>m(p,d))),"SparseMatrix, number | BigNumber":r.referToSelf(m=>(v,d)=>u(v,d,m,!1)),"DenseMatrix, number | BigNumber":r.referToSelf(m=>(v,d)=>c(v,d,m,!1)),"number | Complex | Fraction | BigNumber, Array":r.referToSelf(m=>(v,d)=>c(t(d),v,m,!0).valueOf()),"number | Complex | Fraction | BigNumber, Matrix":r.referToSelf(m=>(v,d)=>n(v,0)?o(d.size(),d.storage()):d.storage()==="dense"?c(d,v,m,!0):s(d,v,m,!0))})}),l1="matAlgo02xDS0",f1=["typed","equalScalar"],ut=q(l1,f1,e=>{var{typed:r,equalScalar:a}=e;return function(t,n,o,l){var u=t._data,s=t._size,c=t._datatype||t.getDataType(),f=n._values,m=n._index,v=n._ptr,d=n._size,p=n._datatype||n._data===void 0?n._datatype:n.getDataType();if(s.length!==d.length)throw new Ve(s.length,d.length);if(s[0]!==d[0]||s[1]!==d[1])throw new RangeError("Dimension mismatch. Matrix A ("+s+") must match Matrix B ("+d+")");if(!f)throw new Error("Cannot perform operation on Dense Matrix and Pattern Sparse Matrix");var w=s[0],g=s[1],N,h=a,b=0,x=o;typeof c=="string"&&c===p&&c!=="mixed"&&(N=c,h=r.find(a,[N,N]),b=r.convert(0,N),x=r.find(o,[N,N]));for(var y=[],A=[],S=[],D=0;D{var{typed:r}=e;return function(i,t,n,o){var l=i._data,u=i._size,s=i._datatype||i.getDataType(),c=t._values,f=t._index,m=t._ptr,v=t._size,d=t._datatype||t._data===void 0?t._datatype:t.getDataType();if(u.length!==v.length)throw new Ve(u.length,v.length);if(u[0]!==v[0]||u[1]!==v[1])throw new RangeError("Dimension mismatch. Matrix A ("+u+") must match Matrix B ("+v+")");if(!c)throw new Error("Cannot perform operation on Dense Matrix and Pattern Sparse Matrix");var p=u[0],w=u[1],g,N=0,h=n;typeof s=="string"&&s===d&&s!=="mixed"&&(g=s,N=r.convert(0,g),h=r.find(n,[g,g]));for(var b=[],x=0;x{var{typed:r,equalScalar:a}=e;return function(t,n,o){var l=t._values,u=t._index,s=t._ptr,c=t._size,f=t._datatype||t._data===void 0?t._datatype:t.getDataType(),m=n._values,v=n._index,d=n._ptr,p=n._size,w=n._datatype||n._data===void 0?n._datatype:n.getDataType();if(c.length!==p.length)throw new Ve(c.length,p.length);if(c[0]!==p[0]||c[1]!==p[1])throw new RangeError("Dimension mismatch. Matrix A ("+c+") must match Matrix B ("+p+")");var g=c[0],N=c[1],h,b=a,x=0,y=o;typeof f=="string"&&f===w&&f!=="mixed"&&(h=f,b=r.find(a,[h,h]),x=r.convert(0,h),y=r.find(o,[h,h]));var A=l&&m?[]:void 0,S=[],D=[],E=A?[]:void 0,C=A?[]:void 0,F=[],_=[],I,$,T,B;for($=0;${var{typed:r}=e;return function(t,n,o){var l=t._data,u=t._size,s=t._datatype,c=n._data,f=n._size,m=n._datatype,v=[];if(u.length!==f.length)throw new Ve(u.length,f.length);for(var d=0;d0?a(w,0,v,v[0],l,c):[];return t.createDenseMatrix({data:g,size:v,datatype:p})};function a(i,t,n,o,l,u){var s=[];if(t===n.length-1)for(var c=0;c{var{concat:r}=e;return function(t,n){var o=Math.max(t._size.length,n._size.length);if(t._size.length===n._size.length&&t._size.every((d,p)=>d===n._size[p]))return[t,n];for(var l=a(t._size,o,0),u=a(n._size,o,0),s=[],c=0;c{var{typed:r,matrix:a,concat:i}=e,t=y1({typed:r}),n=st({typed:r}),o=w1({concat:i});return function(u){var s=u.elop,c=u.SD||u.DS,f;s?(f={"DenseMatrix, DenseMatrix":(p,w)=>t(...o(p,w),s),"Array, Array":(p,w)=>t(...o(a(p),a(w)),s).valueOf(),"Array, DenseMatrix":(p,w)=>t(...o(a(p),w),s),"DenseMatrix, Array":(p,w)=>t(...o(p,a(w)),s)},u.SS&&(f["SparseMatrix, SparseMatrix"]=(p,w)=>u.SS(...o(p,w),s,!1)),u.DS&&(f["DenseMatrix, SparseMatrix"]=(p,w)=>u.DS(...o(p,w),s,!1),f["Array, SparseMatrix"]=(p,w)=>u.DS(...o(a(p),w),s,!1)),c&&(f["SparseMatrix, DenseMatrix"]=(p,w)=>c(...o(w,p),s,!0),f["SparseMatrix, Array"]=(p,w)=>c(...o(a(w),p),s,!0))):(f={"DenseMatrix, DenseMatrix":r.referToSelf(p=>(w,g)=>t(...o(w,g),p)),"Array, Array":r.referToSelf(p=>(w,g)=>t(...o(a(w),a(g)),p).valueOf()),"Array, DenseMatrix":r.referToSelf(p=>(w,g)=>t(...o(a(w),g),p)),"DenseMatrix, Array":r.referToSelf(p=>(w,g)=>t(...o(w,a(g)),p))},u.SS&&(f["SparseMatrix, SparseMatrix"]=r.referToSelf(p=>(w,g)=>u.SS(...o(w,g),p,!1))),u.DS&&(f["DenseMatrix, SparseMatrix"]=r.referToSelf(p=>(w,g)=>u.DS(...o(w,g),p,!1)),f["Array, SparseMatrix"]=r.referToSelf(p=>(w,g)=>u.DS(...o(a(w),g),p,!1))),c&&(f["SparseMatrix, DenseMatrix"]=r.referToSelf(p=>(w,g)=>c(...o(g,w),p,!0)),f["SparseMatrix, Array"]=r.referToSelf(p=>(w,g)=>c(...o(a(g),w),p,!0))));var m=u.scalar||"any",v=u.Ds||u.Ss;v&&(s?(f["DenseMatrix,"+m]=(p,w)=>n(p,w,s,!1),f[m+", DenseMatrix"]=(p,w)=>n(w,p,s,!0),f["Array,"+m]=(p,w)=>n(a(p),w,s,!1).valueOf(),f[m+", Array"]=(p,w)=>n(a(w),p,s,!0).valueOf()):(f["DenseMatrix,"+m]=r.referToSelf(p=>(w,g)=>n(w,g,p,!1)),f[m+", DenseMatrix"]=r.referToSelf(p=>(w,g)=>n(g,w,p,!0)),f["Array,"+m]=r.referToSelf(p=>(w,g)=>n(a(w),g,p,!1).valueOf()),f[m+", Array"]=r.referToSelf(p=>(w,g)=>n(a(g),w,p,!0).valueOf())));var d=u.sS!==void 0?u.sS:u.Ss;return s?(u.Ss&&(f["SparseMatrix,"+m]=(p,w)=>u.Ss(p,w,s,!1)),d&&(f[m+", SparseMatrix"]=(p,w)=>d(w,p,s,!0))):(u.Ss&&(f["SparseMatrix,"+m]=r.referToSelf(p=>(w,g)=>u.Ss(w,g,p,!1))),d&&(f[m+", SparseMatrix"]=r.referToSelf(p=>(w,g)=>d(g,w,p,!0)))),s&&s.signatures&&Bf(f,s.signatures),f}}),_s="mod",A1=["typed","config","round","matrix","equalScalar","zeros","DenseMatrix","concat"],iv=q(_s,A1,e=>{var{typed:r,config:a,round:i,matrix:t,equalScalar:n,zeros:o,DenseMatrix:l,concat:u}=e,s=av({typed:r,config:a,round:i,matrix:t,equalScalar:n,zeros:o,DenseMatrix:l}),c=ut({typed:r,equalScalar:n}),f=Rr({typed:r}),m=hi({typed:r,equalScalar:n}),v=Dr({typed:r,equalScalar:n}),d=hr({typed:r,DenseMatrix:l}),p=sr({typed:r,matrix:t,concat:u});return r(_s,{"number, number":w,"BigNumber, BigNumber":function(N,h){return h.isZero()?N:N.sub(h.mul(s(N.div(h))))},"Fraction, Fraction":function(N,h){return h.equals(0)?N:N.sub(h.mul(s(N.div(h))))}},p({SS:m,DS:f,SD:c,Ss:v,sS:d}));function w(g,N){return N===0?g:g-N*s(g/N)}}),E1="matAlgo01xDSid",S1=["typed"],qt=q(E1,S1,e=>{var{typed:r}=e;return function(i,t,n,o){var l=i._data,u=i._size,s=i._datatype||i.getDataType(),c=t._values,f=t._index,m=t._ptr,v=t._size,d=t._datatype||t._data===void 0?t._datatype:t.getDataType();if(u.length!==v.length)throw new Ve(u.length,v.length);if(u[0]!==v[0]||u[1]!==v[1])throw new RangeError("Dimension mismatch. Matrix A ("+u+") must match Matrix B ("+v+")");if(!c)throw new Error("Cannot perform operation on Dense Matrix and Pattern Sparse Matrix");var p=u[0],w=u[1],g=typeof s=="string"&&s!=="mixed"&&s===d?s:void 0,N=g?r.find(n,[g,g]):n,h,b,x=[];for(h=0;h{var{typed:r,equalScalar:a}=e;return function(t,n,o){var l=t._values,u=t._index,s=t._ptr,c=t._size,f=t._datatype||t._data===void 0?t._datatype:t.getDataType(),m=n._values,v=n._index,d=n._ptr,p=n._size,w=n._datatype||n._data===void 0?n._datatype:n.getDataType();if(c.length!==p.length)throw new Ve(c.length,p.length);if(c[0]!==p[0]||c[1]!==p[1])throw new RangeError("Dimension mismatch. Matrix A ("+c+") must match Matrix B ("+p+")");var g=c[0],N=c[1],h,b=a,x=0,y=o;typeof f=="string"&&f===w&&f!=="mixed"&&(h=f,b=r.find(a,[h,h]),x=r.convert(0,h),y=r.find(o,[h,h]));var A=l&&m?[]:void 0,S=[],D=[],E=l&&m?[]:void 0,C=l&&m?[]:void 0,F=[],_=[],I,$,T,B,L;for($=0;${var{typed:r,DenseMatrix:a}=e;return function(t,n,o,l){var u=t._values,s=t._index,c=t._ptr,f=t._size,m=t._datatype;if(!u)throw new Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");var v=f[0],d=f[1],p,w=o;typeof m=="string"&&(p=m,n=r.convert(n,p),w=r.find(o,[p,p]));for(var g=[],N=[],h=[],b=0;bArray.isArray(r))}var _1=q($s,T1,e=>{var{typed:r,matrix:a,config:i,round:t,equalScalar:n,zeros:o,BigNumber:l,DenseMatrix:u,concat:s}=e,c=iv({typed:r,config:i,round:t,matrix:a,equalScalar:n,zeros:o,DenseMatrix:u,concat:s}),f=qt({typed:r}),m=mo({typed:r,equalScalar:n}),v=Yt({typed:r,DenseMatrix:u}),d=sr({typed:r,matrix:a,concat:s});return r($s,{"number, number":p,"BigNumber, BigNumber":w,"Fraction, Fraction":(g,N)=>g.gcd(N)},d({SS:m,DS:f,Ss:v}),{[O1]:r.referToSelf(g=>(N,h,b)=>{for(var x=g(N,h),y=0;yN=>{if(N.length===1&&Array.isArray(N[0])&&Is(N[0]))return g(...N[0]);if(Is(N))return g(...N);throw new Wt("gcd() supports only 1d matrices!")}),Matrix:r.referToSelf(g=>N=>g(N.toArray()))});function p(g,N){if(!Ce(g)||!Ce(N))throw new Error("Parameters in function gcd must be integer numbers");for(var h;N!==0;)h=c(g,N),g=N,N=h;return g<0?-g:g}function w(g,N){if(!g.isInt()||!N.isInt())throw new Error("Parameters in function gcd must be integer numbers");for(var h=new l(0);!N.isZero();){var b=c(g,N);g=N,N=b}return g.lt(h)?g.neg():g}}),$1="matAlgo06xS0S0",I1=["typed","equalScalar"],gi=q($1,I1,e=>{var{typed:r,equalScalar:a}=e;return function(t,n,o){var l=t._values,u=t._size,s=t._datatype||t._data===void 0?t._datatype:t.getDataType(),c=n._values,f=n._size,m=n._datatype||n._data===void 0?n._datatype:n.getDataType();if(u.length!==f.length)throw new Ve(u.length,f.length);if(u[0]!==f[0]||u[1]!==f[1])throw new RangeError("Dimension mismatch. Matrix A ("+u+") must match Matrix B ("+f+")");var v=u[0],d=u[1],p,w=a,g=0,N=o;typeof s=="string"&&s===m&&s!=="mixed"&&(p=s,w=r.find(a,[p,p]),g=r.convert(0,p),N=r.find(o,[p,p]));for(var h=l&&c?[]:void 0,b=[],x=[],y=h?[]:void 0,A=[],S=[],D=0;D{var{typed:r,matrix:a,equalScalar:i,concat:t}=e,n=ut({typed:r,equalScalar:i}),o=gi({typed:r,equalScalar:i}),l=Dr({typed:r,equalScalar:i}),u=sr({typed:r,matrix:a,concat:t}),s="number | BigNumber | Fraction | Matrix | Array",c={};return c["".concat(s,", ").concat(s,", ...").concat(s)]=r.referToSelf(m=>(v,d,p)=>{for(var w=m(v,d),g=0;gm.lcm(v)},u({SS:o,DS:n,Ss:l}),c);function f(m,v){if(!m.isInt()||!v.isInt())throw new Error("Parameters in function lcm must be integer numbers");if(m.isZero())return m;if(v.isZero())return v;for(var d=m.times(v);!v.isZero();){var p=v;v=m.mod(p),m=p}return d.div(m).abs()}}),Rs="log10",z1=["typed","config","Complex"],P1=q(Rs,z1,e=>{var{typed:r,config:a,Complex:i}=e;return r(Rs,{number:function(n){return n>=0||a.predictable?bm(n):new i(n,0).log().div(Math.LN10)},Complex:function(n){return new i(n).log().div(Math.LN10)},BigNumber:function(n){return!n.isNegative()||a.predictable?n.log():new i(n.toNumber(),0).log().div(Math.LN10)},"Array | Matrix":r.referToSelf(t=>n=>Ze(n,t))})}),zs="log2",U1=["typed","config","Complex"],L1=q(zs,U1,e=>{var{typed:r,config:a,Complex:i}=e;return r(zs,{number:function(o){return o>=0||a.predictable?xm(o):t(new i(o,0))},Complex:t,BigNumber:function(o){return!o.isNegative()||a.predictable?o.log(2):t(new i(o.toNumber(),0))},"Array | Matrix":r.referToSelf(n=>o=>Ze(o,n))});function t(n){var o=Math.sqrt(n.re*n.re+n.im*n.im);return new i(Math.log2?Math.log2(o):Math.log(o)/Math.LN2,Math.atan2(n.im,n.re)/Math.LN2)}}),k1="multiplyScalar",H1=["typed"],G1=q(k1,H1,e=>{var{typed:r}=e;return r("multiplyScalar",{"number, number":mm,"Complex, Complex":function(i,t){return i.mul(t)},"BigNumber, BigNumber":function(i,t){return i.times(t)},"Fraction, Fraction":function(i,t){return i.mul(t)},"number | Fraction | BigNumber | Complex, Unit":(a,i)=>i.multiply(a),"Unit, number | Fraction | BigNumber | Complex | Unit":(a,i)=>a.multiply(i)})}),Ps="multiply",V1=["typed","matrix","addScalar","multiplyScalar","equalScalar","dot"],Z1=q(Ps,V1,e=>{var{typed:r,matrix:a,addScalar:i,multiplyScalar:t,equalScalar:n,dot:o}=e,l=Dr({typed:r,equalScalar:n}),u=st({typed:r});function s(x,y){switch(x.length){case 1:switch(y.length){case 1:if(x[0]!==y[0])throw new RangeError("Dimension mismatch in multiplication. Vectors must have the same length");break;case 2:if(x[0]!==y[0])throw new RangeError("Dimension mismatch in multiplication. Vector length ("+x[0]+") must match Matrix rows ("+y[0]+")");break;default:throw new Error("Can only multiply a 1 or 2 dimensional matrix (Matrix B has "+y.length+" dimensions)")}break;case 2:switch(y.length){case 1:if(x[1]!==y[0])throw new RangeError("Dimension mismatch in multiplication. Matrix columns ("+x[1]+") must match Vector length ("+y[0]+")");break;case 2:if(x[1]!==y[0])throw new RangeError("Dimension mismatch in multiplication. Matrix A columns ("+x[1]+") must match Matrix B rows ("+y[0]+")");break;default:throw new Error("Can only multiply a 1 or 2 dimensional matrix (Matrix B has "+y.length+" dimensions)")}break;default:throw new Error("Can only multiply a 1 or 2 dimensional matrix (Matrix A has "+x.length+" dimensions)")}}function c(x,y,A){if(A===0)throw new Error("Cannot multiply two empty vectors");return o(x,y)}function f(x,y){if(y.storage()!=="dense")throw new Error("Support for SparseMatrix not implemented");return m(x,y)}function m(x,y){var A=x._data,S=x._size,D=x._datatype||x.getDataType(),E=y._data,C=y._size,F=y._datatype||y.getDataType(),_=S[0],I=C[1],$,T=i,B=t;D&&F&&D===F&&typeof D=="string"&&D!=="mixed"&&($=D,T=r.find(i,[$,$]),B=r.find(t,[$,$]));for(var L=[],O=0;Ore)for(var ee=0,ae=0;ae<$;ae++){for(var se=ae+1,pe=void 0,Ne=re;Ne(y,A)=>{s(Pe(y),Pe(A));var S=x(a(y),a(A));return Te(S)?S.valueOf():S}),"Matrix, Matrix":function(y,A){var S=y.size(),D=A.size();return s(S,D),S.length===1?D.length===1?c(y,A,S[0]):f(y,A):D.length===1?v(y,A):d(y,A)},"Matrix, Array":r.referTo("Matrix,Matrix",x=>(y,A)=>x(y,a(A))),"Array, Matrix":r.referToSelf(x=>(y,A)=>x(a(y,A.storage()),A)),"SparseMatrix, any":function(y,A){return l(y,A,t,!1)},"DenseMatrix, any":function(y,A){return u(y,A,t,!1)},"any, SparseMatrix":function(y,A){return l(A,y,t,!0)},"any, DenseMatrix":function(y,A){return u(A,y,t,!0)},"Array, any":function(y,A){return u(a(y),A,t,!1).valueOf()},"any, Array":function(y,A){return u(a(A),y,t,!0).valueOf()},"any, any":t,"any, any, ...any":r.referToSelf(x=>(y,A,S)=>{for(var D=x(y,A),E=0;E{var{typed:r,matrix:a,equalScalar:i,BigNumber:t,concat:n}=e,o=qt({typed:r}),l=ut({typed:r,equalScalar:i}),u=gi({typed:r,equalScalar:i}),s=Dr({typed:r,equalScalar:i}),c=sr({typed:r,matrix:a,concat:n});function f(){throw new Error("Complex number not supported in function nthRoot. Use nthRoots instead.")}return r(Us,{number:ss,"number, number":ss,BigNumber:v=>m(v,new t(2)),"BigNumber, BigNumber":m,Complex:f,"Complex, number":f,Array:r.referTo("DenseMatrix,number",v=>d=>v(a(d),2).valueOf()),DenseMatrix:r.referTo("DenseMatrix,number",v=>d=>v(d,2)),SparseMatrix:r.referTo("SparseMatrix,number",v=>d=>v(d,2)),"SparseMatrix, SparseMatrix":r.referToSelf(v=>(d,p)=>{if(p.density()===1)return u(d,p,v);throw new Error("Root must be non-zero")}),"DenseMatrix, SparseMatrix":r.referToSelf(v=>(d,p)=>{if(p.density()===1)return o(d,p,v,!1);throw new Error("Root must be non-zero")}),"Array, SparseMatrix":r.referTo("DenseMatrix,SparseMatrix",v=>(d,p)=>v(a(d),p)),"number | BigNumber, SparseMatrix":r.referToSelf(v=>(d,p)=>{if(p.density()===1)return s(p,d,v,!0);throw new Error("Root must be non-zero")})},c({scalar:"number | BigNumber",SD:l,Ss:s,sS:!1}));function m(v,d){var p=t.precision,w=t.clone({precision:p+2}),g=new t(0),N=new w(1),h=d.isNegative();if(h&&(d=d.neg()),d.isZero())throw new Error("Root must be non-zero");if(v.isNegative()&&!d.abs().mod(2).equals(1))throw new Error("Root must be odd when a is negative.");if(v.isZero())return h?new w(1/0):0;if(!v.isFinite())return h?g:v;var b=v.abs().pow(N.div(d));return b=v.isNeg()?b.neg():b,new t((h?N.div(b):b).toPrecision(p))}}),Ls="sign",W1=["typed","BigNumber","Fraction","complex"],J1=q(Ls,W1,e=>{var{typed:r,BigNumber:a,complex:i,Fraction:t}=e;return r(Ls,{number:Qi,Complex:function(o){return o.im===0?i(Qi(o.re)):o.sign()},BigNumber:function(o){return new a(o.cmp(0))},Fraction:function(o){return new t(o.s,1)},"Array | Matrix":r.referToSelf(n=>o=>Ze(o,n)),Unit:r.referToSelf(n=>o=>{if(!o._isDerived()&&o.units[0].unit.offset!==0)throw new TypeError("sign is ambiguous for units with offset");return r.find(n,o.valueType())(o.value)})})}),Q1="sqrt",K1=["config","typed","Complex"],j1=q(Q1,K1,e=>{var{config:r,typed:a,Complex:i}=e;return a("sqrt",{number:t,Complex:function(o){return o.sqrt()},BigNumber:function(o){return!o.isNegative()||r.predictable?o.sqrt():t(o.toNumber())},Unit:function(o){return o.pow(.5)}});function t(n){return isNaN(n)?NaN:n>=0||r.predictable?Math.sqrt(n):new i(n,0).sqrt()}}),ks="square",ey=["typed"],ry=q(ks,ey,e=>{var{typed:r}=e;return r(ks,{number:wm,Complex:function(i){return i.mul(i)},BigNumber:function(i){return i.times(i)},Fraction:function(i){return i.mul(i)},Unit:function(i){return i.pow(2)}})}),Hs="subtract",ty=["typed","matrix","equalScalar","subtractScalar","unaryMinus","DenseMatrix","concat"],ny=q(Hs,ty,e=>{var{typed:r,matrix:a,equalScalar:i,subtractScalar:t,unaryMinus:n,DenseMatrix:o,concat:l}=e,u=qt({typed:r}),s=Rr({typed:r}),c=hi({typed:r,equalScalar:i}),f=Yt({typed:r,DenseMatrix:o}),m=hr({typed:r,DenseMatrix:o}),v=sr({typed:r,matrix:a,concat:l});return r(Hs,{"any, any":t},v({elop:t,SS:c,DS:u,SD:s,Ss:m,sS:f}))}),Gs="xgcd",ay=["typed","config","matrix","BigNumber"],iy=q(Gs,ay,e=>{var{typed:r,config:a,matrix:i,BigNumber:t}=e;return r(Gs,{"number, number":function(l,u){var s=Nm(l,u);return a.matrix==="Array"?s:i(s)},"BigNumber, BigNumber":n});function n(o,l){var u,s,c,f=new t(0),m=new t(1),v=f,d=m,p=m,w=f;if(!o.isInt()||!l.isInt())throw new Error("Parameters in function xgcd must be integer numbers");for(;!l.isZero();)s=o.div(l).floor(),c=o.mod(l),u=v,v=d.minus(s.times(v)),d=u,u=p,p=w.minus(s.times(p)),w=u,o=l,l=c;var g;return o.lt(f)?g=[o.neg(),d.neg(),w.neg()]:g=[o,o.isZero()?0:d,w],a.matrix==="Array"?g:i(g)}}),Vs="invmod",oy=["typed","config","BigNumber","xgcd","equal","smaller","mod","add","isInteger"],sy=q(Vs,oy,e=>{var{typed:r,config:a,BigNumber:i,xgcd:t,equal:n,smaller:o,mod:l,add:u,isInteger:s}=e;return r(Vs,{"number, number":c,"BigNumber, BigNumber":c});function c(f,m){if(!s(f)||!s(m))throw new Error("Parameters in function invmod must be integer numbers");if(f=l(f,m),n(m,0))throw new Error("Divisor must be non zero");var v=t(f,m);v=v.valueOf();var[d,p]=v;return n(d,i(1))?(p=l(p,m),o(p,i(0))&&(p=u(p,m)),p):NaN}}),uy="matAlgo09xS0Sf",cy=["typed","equalScalar"],ov=q(uy,cy,e=>{var{typed:r,equalScalar:a}=e;return function(t,n,o){var l=t._values,u=t._index,s=t._ptr,c=t._size,f=t._datatype||t._data===void 0?t._datatype:t.getDataType(),m=n._values,v=n._index,d=n._ptr,p=n._size,w=n._datatype||n._data===void 0?n._datatype:n.getDataType();if(c.length!==p.length)throw new Ve(c.length,p.length);if(c[0]!==p[0]||c[1]!==p[1])throw new RangeError("Dimension mismatch. Matrix A ("+c+") must match Matrix B ("+p+")");var g=c[0],N=c[1],h,b=a,x=0,y=o;typeof f=="string"&&f===w&&f!=="mixed"&&(h=f,b=r.find(a,[h,h]),x=r.convert(0,h),y=r.find(o,[h,h]));var A=l&&m?[]:void 0,S=[],D=[],E=A?[]:void 0,C=[],F,_,I,$,T;for(_=0;_{var{typed:r,matrix:a,equalScalar:i,multiplyScalar:t,concat:n}=e,o=ut({typed:r,equalScalar:i}),l=ov({typed:r,equalScalar:i}),u=Dr({typed:r,equalScalar:i}),s=sr({typed:r,matrix:a,concat:n});return r(Zs,s({elop:t,SS:l,DS:o,Ss:u}))});function my(e,r){if(e.isFinite()&&!e.isInteger()||r.isFinite()&&!r.isInteger())throw new Error("Integers expected in function bitAnd");var a=e.constructor;if(e.isNaN()||r.isNaN())return new a(NaN);if(e.isZero()||r.eq(-1)||e.eq(r))return e;if(r.isZero()||e.eq(-1))return r;if(!e.isFinite()||!r.isFinite()){if(!e.isFinite()&&!r.isFinite())return e.isNegative()===r.isNegative()?e:new a(0);if(!e.isFinite())return r.isNegative()?e:e.isNegative()?new a(0):r;if(!r.isFinite())return e.isNegative()?r:r.isNegative()?new a(0):e}return vo(e,r,function(i,t){return i&t})}function Yn(e){if(e.isFinite()&&!e.isInteger())throw new Error("Integer expected in function bitNot");var r=e.constructor,a=r.precision;r.config({precision:1e9});var i=e.plus(new r(1));return i.s=-i.s||null,r.config({precision:a}),i}function vy(e,r){if(e.isFinite()&&!e.isInteger()||r.isFinite()&&!r.isInteger())throw new Error("Integers expected in function bitOr");var a=e.constructor;if(e.isNaN()||r.isNaN())return new a(NaN);var i=new a(-1);return e.isZero()||r.eq(i)||e.eq(r)?r:r.isZero()||e.eq(i)?e:!e.isFinite()||!r.isFinite()?!e.isFinite()&&!e.isNegative()&&r.isNegative()||e.isNegative()&&!r.isNegative()&&!r.isFinite()?i:e.isNegative()&&r.isNegative()?e.isFinite()?e:r:e.isFinite()?r:e:vo(e,r,function(t,n){return t|n})}function vo(e,r,a){var i=e.constructor,t,n,o=+(e.s<0),l=+(r.s<0);if(o){t=ca(Yn(e));for(var u=0;u0;)a(c[--v],f[--d])===p&&(w=w.plus(g)),g=g.times(N);for(;d>0;)a(m,f[--d])===p&&(w=w.plus(g)),g=g.times(N);return i.config({precision:h}),p===0&&(w.s=-w.s),w}function ca(e){for(var r=e.d,a=r[0]+"",i=1;i0)if(++l>s)for(l-=s;l--;)u+="0";else l1&&((c[v+1]===null||c[v+1]===void 0)&&(c[v+1]=0),c[v+1]+=c[v]>>1,c[v]&=1)}return c.reverse()}function py(e,r){if(e.isFinite()&&!e.isInteger()||r.isFinite()&&!r.isInteger())throw new Error("Integers expected in function bitXor");var a=e.constructor;if(e.isNaN()||r.isNaN())return new a(NaN);if(e.isZero())return r;if(r.isZero())return e;if(e.eq(r))return new a(0);var i=new a(-1);return e.eq(i)?Yn(r):r.eq(i)?Yn(e):!e.isFinite()||!r.isFinite()?!e.isFinite()&&!r.isFinite()?i:new a(e.isNegative()===r.isNegative()?1/0:-1/0):vo(e,r,function(t,n){return t^n})}function dy(e,r){if(e.isFinite()&&!e.isInteger()||r.isFinite()&&!r.isInteger())throw new Error("Integers expected in function leftShift");var a=e.constructor;return e.isNaN()||r.isNaN()||r.isNegative()&&!r.isZero()?new a(NaN):e.isZero()||r.isZero()?e:!e.isFinite()&&!r.isFinite()?new a(NaN):r.lt(55)?e.times(Math.pow(2,r.toNumber())+""):e.times(new a(2).pow(r))}function hy(e,r){if(e.isFinite()&&!e.isInteger()||r.isFinite()&&!r.isInteger())throw new Error("Integers expected in function rightArithShift");var a=e.constructor;return e.isNaN()||r.isNaN()||r.isNegative()&&!r.isZero()?new a(NaN):e.isZero()||r.isZero()?e:r.isFinite()?r.lt(55)?e.div(Math.pow(2,r.toNumber())+"").floor():e.div(new a(2).pow(r)).floor():e.isNegative()?new a(-1):e.isFinite()?new a(0):new a(NaN)}var Xs="bitAnd",gy=["typed","matrix","equalScalar","concat"],sv=q(Xs,gy,e=>{var{typed:r,matrix:a,equalScalar:i,concat:t}=e,n=ut({typed:r,equalScalar:i}),o=gi({typed:r,equalScalar:i}),l=Dr({typed:r,equalScalar:i}),u=sr({typed:r,matrix:a,concat:t});return r(Xs,{"number, number":Am,"BigNumber, BigNumber":my},u({SS:o,DS:n,Ss:l}))}),Ys="bitNot",yy=["typed"],by=q(Ys,yy,e=>{var{typed:r}=e;return r(Ys,{number:Em,BigNumber:Yn,"Array | Matrix":r.referToSelf(a=>i=>Ze(i,a))})}),Ws="bitOr",xy=["typed","matrix","equalScalar","DenseMatrix","concat"],uv=q(Ws,xy,e=>{var{typed:r,matrix:a,equalScalar:i,DenseMatrix:t,concat:n}=e,o=qt({typed:r}),l=mo({typed:r,equalScalar:i}),u=Yt({typed:r,DenseMatrix:t}),s=sr({typed:r,matrix:a,concat:n});return r(Ws,{"number, number":Sm,"BigNumber, BigNumber":vy},s({SS:l,DS:o,Ss:u}))}),wy="matAlgo07xSSf",Ny=["typed","DenseMatrix"],vt=q(wy,Ny,e=>{var{typed:r,DenseMatrix:a}=e;return function(n,o,l){var u=n._size,s=n._datatype||n._data===void 0?n._datatype:n.getDataType(),c=o._size,f=o._datatype||o._data===void 0?o._datatype:o.getDataType();if(u.length!==c.length)throw new Ve(u.length,c.length);if(u[0]!==c[0]||u[1]!==c[1])throw new RangeError("Dimension mismatch. Matrix A ("+u+") must match Matrix B ("+c+")");var m=u[0],v=u[1],d,p=0,w=l;typeof s=="string"&&s===f&&s!=="mixed"&&(d=s,p=r.convert(0,d),w=r.find(l,[d,d]));var g,N,h=[];for(g=0;g{var{typed:r,matrix:a,DenseMatrix:i,concat:t}=e,n=Rr({typed:r}),o=vt({typed:r,DenseMatrix:i}),l=hr({typed:r,DenseMatrix:i}),u=sr({typed:r,matrix:a,concat:t});return r(Js,{"number, number":Cm,"BigNumber, BigNumber":py},u({SS:o,DS:n,Ss:l}))}),Qs="arg",Ey=["typed"],Sy=q(Qs,Ey,e=>{var{typed:r}=e;return r(Qs,{number:function(i){return Math.atan2(0,i)},BigNumber:function(i){return i.constructor.atan2(0,i)},Complex:function(i){return i.arg()},"Array | Matrix":r.referToSelf(a=>i=>Ze(i,a))})}),Ks="conj",Cy=["typed"],My=q(Ks,Cy,e=>{var{typed:r}=e;return r(Ks,{"number | BigNumber | Fraction":a=>a,Complex:a=>a.conjugate(),"Array | Matrix":r.referToSelf(a=>i=>Ze(i,a))})}),js="im",Fy=["typed"],By=q(js,Fy,e=>{var{typed:r}=e;return r(js,{number:()=>0,"BigNumber | Fraction":a=>a.mul(0),Complex:a=>a.im,"Array | Matrix":r.referToSelf(a=>i=>Ze(i,a))})}),eu="re",Ty=["typed"],Oy=q(eu,Ty,e=>{var{typed:r}=e;return r(eu,{"number | BigNumber | Fraction":a=>a,Complex:a=>a.re,"Array | Matrix":r.referToSelf(a=>i=>Ze(i,a))})}),ru="not",_y=["typed"],$y=q(ru,_y,e=>{var{typed:r}=e;return r(ru,{"null | undefined":()=>!0,number:Om,Complex:function(i){return i.re===0&&i.im===0},BigNumber:function(i){return i.isZero()||i.isNaN()},Unit:r.referToSelf(a=>i=>r.find(a,i.valueType())(i.value)),"Array | Matrix":r.referToSelf(a=>i=>Ze(i,a))})}),tu="or",Iy=["typed","matrix","equalScalar","DenseMatrix","concat"],cv=q(tu,Iy,e=>{var{typed:r,matrix:a,equalScalar:i,DenseMatrix:t,concat:n}=e,o=Rr({typed:r}),l=hi({typed:r,equalScalar:i}),u=hr({typed:r,DenseMatrix:t}),s=sr({typed:r,matrix:a,concat:n});return r(tu,{"number, number":_m,"Complex, Complex":function(f,m){return f.re!==0||f.im!==0||m.re!==0||m.im!==0},"BigNumber, BigNumber":function(f,m){return!f.isZero()&&!f.isNaN()||!m.isZero()&&!m.isNaN()},"Unit, Unit":r.referToSelf(c=>(f,m)=>c(f.value||0,m.value||0))},s({SS:l,DS:o,Ss:u}))}),nu="xor",qy=["typed","matrix","DenseMatrix","concat"],Ry=q(nu,qy,e=>{var{typed:r,matrix:a,DenseMatrix:i,concat:t}=e,n=Rr({typed:r}),o=vt({typed:r,DenseMatrix:i}),l=hr({typed:r,DenseMatrix:i}),u=sr({typed:r,matrix:a,concat:t});return r(nu,{"number, number":$m,"Complex, Complex":function(c,f){return(c.re!==0||c.im!==0)!=(f.re!==0||f.im!==0)},"BigNumber, BigNumber":function(c,f){return(!c.isZero()&&!c.isNaN())!=(!f.isZero()&&!f.isNaN())},"Unit, Unit":r.referToSelf(s=>(c,f)=>s(c.value||0,f.value||0))},u({SS:o,DS:n,Ss:l}))}),au="concat",zy=["typed","matrix","isInteger"],lv=q(au,zy,e=>{var{typed:r,matrix:a,isInteger:i}=e;return r(au,{"...Array | Matrix | number | BigNumber":function(n){var o,l=n.length,u=-1,s,c=!1,f=[];for(o=0;o0&&u>s)throw new it(u,s+1)}else{var v=qe(m).valueOf(),d=Pe(v);if(f[o]=v,s=u,u=d.length-1,o>0&&u!==s)throw new Ve(s+1,u+1)}}if(f.length===0)throw new SyntaxError("At least one matrix expected");for(var p=f.shift();f.length;)p=Hf(p,f.shift(),u);return c?a(p):p},"...string":function(n){return n.join("")}})}),iu="column",Py=["typed","Index","matrix","range"],fv=q(iu,Py,e=>{var{typed:r,Index:a,matrix:i,range:t}=e;return r(iu,{"Matrix, number":n,"Array, number":function(l,u){return n(i(qe(l)),u).valueOf()}});function n(o,l){if(o.size().length!==2)throw new Error("Only two dimensional matrix is supported");nr(l,o.size()[1]);var u=t(0,o.size()[0]),s=new a(u,l),c=o.subset(s);return Te(c)?c:i([[c]])}}),ou="count",Uy=["typed","size","prod"],Ly=q(ou,Uy,e=>{var{typed:r,size:a,prod:i}=e;return r(ou,{string:function(n){return n.length},"Matrix | Array":function(n){return i(a(n))}})}),su="cross",ky=["typed","matrix","subtract","multiply"],Hy=q(su,ky,e=>{var{typed:r,matrix:a,subtract:i,multiply:t}=e;return r(su,{"Matrix, Matrix":function(l,u){return a(n(l.toArray(),u.toArray()))},"Matrix, Array":function(l,u){return a(n(l.toArray(),u))},"Array, Matrix":function(l,u){return a(n(l,u.toArray()))},"Array, Array":n});function n(o,l){var u=Math.max(Pe(o).length,Pe(l).length);o=Ra(o),l=Ra(l);var s=Pe(o),c=Pe(l);if(s.length!==1||c.length!==1||s[0]!==3||c[0]!==3)throw new RangeError("Vectors with length 3 expected (Size A = ["+s.join(", ")+"], B = ["+c.join(", ")+"])");var f=[i(t(o[1],l[2]),t(o[2],l[1])),i(t(o[2],l[0]),t(o[0],l[2])),i(t(o[0],l[1]),t(o[1],l[0]))];return u>1?[f]:f}}),uu="diag",Gy=["typed","matrix","DenseMatrix","SparseMatrix"],Vy=q(uu,Gy,e=>{var{typed:r,matrix:a,DenseMatrix:i,SparseMatrix:t}=e;return r(uu,{Array:function(s){return n(s,0,Pe(s),null)},"Array, number":function(s,c){return n(s,c,Pe(s),null)},"Array, BigNumber":function(s,c){return n(s,c.toNumber(),Pe(s),null)},"Array, string":function(s,c){return n(s,0,Pe(s),c)},"Array, number, string":function(s,c,f){return n(s,c,Pe(s),f)},"Array, BigNumber, string":function(s,c,f){return n(s,c.toNumber(),Pe(s),f)},Matrix:function(s){return n(s,0,s.size(),s.storage())},"Matrix, number":function(s,c){return n(s,c,s.size(),s.storage())},"Matrix, BigNumber":function(s,c){return n(s,c.toNumber(),s.size(),s.storage())},"Matrix, string":function(s,c){return n(s,0,s.size(),c)},"Matrix, number, string":function(s,c,f){return n(s,c,s.size(),f)},"Matrix, BigNumber, string":function(s,c,f){return n(s,c.toNumber(),s.size(),f)}});function n(u,s,c,f){if(!Ce(s))throw new TypeError("Second parameter in function diag must be an integer");var m=s>0?s:0,v=s<0?-s:0;switch(c.length){case 1:return o(u,s,f,c[0],v,m);case 2:return l(u,s,f,c,v,m)}throw new RangeError("Matrix for function diag must be 2 dimensional")}function o(u,s,c,f,m,v){var d=[f+m,f+v];if(c&&c!=="sparse"&&c!=="dense")throw new TypeError("Unknown matrix type ".concat(c,'"'));var p=c==="sparse"?t.diagonal(d,u,s):i.diagonal(d,u,s);return c!==null?p:p.valueOf()}function l(u,s,c,f,m,v){if(Te(u)){var d=u.diagonal(s);return c!==null?c!==d.storage()?a(d,c):d:d.valueOf()}for(var p=Math.min(f[0]-m,f[1]-v),w=[],g=0;g=2&&p.push("index: ".concat(ir(a))),v.length>=3&&p.push("array: ".concat(ir(i))),new TypeError("Function ".concat(t," cannot apply callback arguments ")+"".concat(e.name,"(").concat(p.join(", "),") at index ").concat(JSON.stringify(a)))}else throw new TypeError("Function ".concat(t," cannot apply callback arguments ")+"to function ".concat(e.name,": ").concat(w.message))}}}var Zy="filter",Xy=["typed"],Yy=q(Zy,Xy,e=>{var{typed:r}=e;return r("filter",{"Array, function":cu,"Matrix, function":function(i,t){return i.create(cu(i.toArray(),t))},"Array, RegExp":za,"Matrix, RegExp":function(i,t){return i.create(za(i.toArray(),t))}})});function cu(e,r){return Lf(e,function(a,i,t){return Fn(r,a,[i],t,"filter")})}var lu="flatten",Wy=["typed","matrix"],Jy=q(lu,Wy,e=>{var{typed:r,matrix:a}=e;return r(lu,{Array:function(t){return Ke(t)},Matrix:function(t){var n=Ke(t.toArray());return a(n)}})}),fu="forEach",Qy=["typed"],Ky=q(fu,Qy,e=>{var{typed:r}=e;return r(fu,{"Array, function":jy,"Matrix, function":function(i,t){i.forEach(t)}})});function jy(e,r){var a=function i(t,n){if(Array.isArray(t))ci(t,function(o,l){i(o,n.concat(l))});else return Fn(r,t,n,e,"forEach")};a(e,[])}var mu="getMatrixDataType",eb=["typed"],rb=q(mu,eb,e=>{var{typed:r}=e;return r(mu,{Array:function(i){return Vn(i,ir)},Matrix:function(i){return i.getDataType()}})}),vu="identity",tb=["typed","config","matrix","BigNumber","DenseMatrix","SparseMatrix"],nb=q(vu,tb,e=>{var{typed:r,config:a,matrix:i,BigNumber:t,DenseMatrix:n,SparseMatrix:o}=e;return r(vu,{"":function(){return a.matrix==="Matrix"?i([]):[]},string:function(c){return i(c)},"number | BigNumber":function(c){return u(c,c,a.matrix==="Matrix"?"dense":void 0)},"number | BigNumber, string":function(c,f){return u(c,c,f)},"number | BigNumber, number | BigNumber":function(c,f){return u(c,f,a.matrix==="Matrix"?"dense":void 0)},"number | BigNumber, number | BigNumber, string":function(c,f,m){return u(c,f,m)},Array:function(c){return l(c)},"Array, string":function(c,f){return l(c,f)},Matrix:function(c){return l(c.valueOf(),c.storage())},"Matrix, string":function(c,f){return l(c.valueOf(),f)}});function l(s,c){switch(s.length){case 0:return c?i(c):[];case 1:return u(s[0],s[0],c);case 2:return u(s[0],s[1],c);default:throw new Error("Vector containing two values expected")}}function u(s,c,f){var m=Le(s)||Le(c)?t:null;if(Le(s)&&(s=s.toNumber()),Le(c)&&(c=c.toNumber()),!Ce(s)||s<1)throw new Error("Parameters in function identity must be positive integers");if(!Ce(c)||c<1)throw new Error("Parameters in function identity must be positive integers");var v=m?new t(1):1,d=m?new m(0):0,p=[s,c];if(f){if(f==="sparse")return o.diagonal(p,v,0,d);if(f==="dense")return n.diagonal(p,v,0,d);throw new TypeError('Unknown matrix type "'.concat(f,'"'))}for(var w=gn([],p,d),g=s{var{typed:r,matrix:a,multiplyScalar:i}=e;return r(pu,{"Matrix, Matrix":function(o,l){return a(t(o.toArray(),l.toArray()))},"Matrix, Array":function(o,l){return a(t(o.toArray(),l))},"Array, Matrix":function(o,l){return a(t(o,l.toArray()))},"Array, Array":t});function t(n,o){if(Pe(n).length===1&&(n=[n]),Pe(o).length===1&&(o=[o]),Pe(n).length>2||Pe(o).length>2)throw new RangeError("Vectors with dimensions greater then 2 are not supported expected (Size x = "+JSON.stringify(n.length)+", y = "+JSON.stringify(o.length)+")");var l=[],u=[];return n.map(function(s){return o.map(function(c){return u=[],l.push(u),s.map(function(f){return c.map(function(m){return u.push(i(f,m))})})})})&&l}}),du="map",ob=["typed"],sb=q(du,ob,e=>{var{typed:r}=e;return r(du,{"Array, function":ub,"Matrix, function":function(i,t){return i.map(t)}})});function ub(e,r){var a=function i(t,n){return Array.isArray(t)?t.map(function(o,l){return i(o,n.concat(l))}):Fn(r,t,n,e,"map")};return a(e,[])}var hu="diff",cb=["typed","matrix","subtract","number"],mv=q(hu,cb,e=>{var{typed:r,matrix:a,subtract:i,number:t}=e;return r(hu,{"Array | Matrix":function(c){return Te(c)?a(o(c.toArray())):o(c)},"Array | Matrix, number":function(c,f){if(!Ce(f))throw new RangeError("Dimension must be a whole number");return Te(c)?a(n(c.toArray(),f)):n(c,f)},"Array, BigNumber":r.referTo("Array,number",s=>(c,f)=>s(c,t(f))),"Matrix, BigNumber":r.referTo("Matrix,number",s=>(c,f)=>s(c,t(f)))});function n(s,c){if(Te(s)&&(s=s.toArray()),!Array.isArray(s))throw RangeError("Array/Matrix does not have that many dimensions");if(c>0){var f=[];return s.forEach(m=>{f.push(n(m,c-1))}),f}else{if(c===0)return o(s);throw RangeError("Cannot have negative dimension")}}function o(s){for(var c=[],f=s.length,m=1;m{var{typed:r,config:a,matrix:i,BigNumber:t}=e;return r("ones",{"":function(){return a.matrix==="Array"?n([]):n([],"default")},"...number | BigNumber | string":function(s){var c=s[s.length-1];if(typeof c=="string"){var f=s.pop();return n(s,f)}else return a.matrix==="Array"?n(s):n(s,"default")},Array:n,Matrix:function(s){var c=s.storage();return n(s.valueOf(),c)},"Array | Matrix, string":function(s,c){return n(s.valueOf(),c)}});function n(u,s){var c=o(u),f=c?new t(1):1;if(l(u),s){var m=i(s);return u.length>0?m.resize(u,f):m}else{var v=[];return u.length>0?gn(v,u,f):v}}function o(u){var s=!1;return u.forEach(function(c,f,m){Le(c)&&(s=!0,m[f]=c.toNumber())}),s}function l(u){u.forEach(function(s){if(typeof s!="number"||!Ce(s)||s<0)throw new Error("Parameters in function ones must be positive integers")})}});function po(){throw new Error('No "bignumber" implementation available')}function vv(){throw new Error('No "fraction" implementation available')}function pv(){throw new Error('No "matrix" implementation available')}var gu="range",vb=["typed","config","?matrix","?bignumber","smaller","smallerEq","larger","largerEq","add","isPositive"],dv=q(gu,vb,e=>{var{typed:r,config:a,matrix:i,bignumber:t,smaller:n,smallerEq:o,larger:l,largerEq:u,add:s,isPositive:c}=e;return r(gu,{string:m,"string, boolean":m,"number, number":function(w,g){return f(v(w,g,1,!1))},"number, number, number":function(w,g,N){return f(v(w,g,N,!1))},"number, number, boolean":function(w,g,N){return f(v(w,g,1,N))},"number, number, number, boolean":function(w,g,N,h){return f(v(w,g,N,h))},"BigNumber, BigNumber":function(w,g){var N=w.constructor;return f(v(w,g,new N(1),!1))},"BigNumber, BigNumber, BigNumber":function(w,g,N){return f(v(w,g,N,!1))},"BigNumber, BigNumber, boolean":function(w,g,N){var h=w.constructor;return f(v(w,g,new h(1),N))},"BigNumber, BigNumber, BigNumber, boolean":function(w,g,N,h){return f(v(w,g,N,h))},"Unit, Unit, Unit":function(w,g,N){return f(v(w,g,N,!1))},"Unit, Unit, Unit, boolean":function(w,g,N,h){return f(v(w,g,N,h))}});function f(p){return a.matrix==="Matrix"?i?i(p):pv():p}function m(p,w){var g=d(p);if(!g)throw new SyntaxError('String "'+p+'" is no valid range');return a.number==="BigNumber"?(t===void 0&&po(),f(v(t(g.start),t(g.end),t(g.step)))):f(v(g.start,g.end,g.step,w))}function v(p,w,g,N){for(var h=[],b=c(g)?N?o:n:N?u:l,x=p;b(x,w);)h.push(x),x=s(x,g);return h}function d(p){var w=p.split(":"),g=w.map(function(h){return Number(h)}),N=g.some(function(h){return isNaN(h)});if(N)return null;switch(g.length){case 2:return{start:g[0],end:g[1],step:1};case 3:return{start:g[0],end:g[2],step:g[1]};default:return null}}}),yu="reshape",pb=["typed","isInteger","matrix"],db=q(yu,pb,e=>{var{typed:r,isInteger:a}=e;return r(yu,{"Matrix, Array":function(t,n){return t.reshape(n,!0)},"Array, Array":function(t,n){return n.forEach(function(o){if(!a(o))throw new TypeError("Invalid size for dimension: "+o)}),oo(t,n)}})}),hb="resize",gb=["config","matrix"],yb=q(hb,gb,e=>{var{config:r,matrix:a}=e;return function(n,o,l){if(arguments.length!==2&&arguments.length!==3)throw new Wt("resize",arguments.length,2,3);if(Te(o)&&(o=o.valueOf()),Le(o[0])&&(o=o.map(function(c){return Le(c)?c.toNumber():c})),Te(n))return n.resize(o,l,!0);if(typeof n=="string")return i(n,o,l);var u=Array.isArray(n)?!1:r.matrix!=="Array";if(o.length===0){for(;Array.isArray(n);)n=n[0];return qe(n)}else{Array.isArray(n)||(n=[n]),n=qe(n);var s=gn(n,o,l);return u?a(s):s}};function i(t,n,o){if(o!==void 0){if(typeof o!="string"||o.length!==1)throw new TypeError("Single character expected as defaultValue")}else o=" ";if(n.length!==1)throw new Ve(n.length,1);var l=n[0];if(typeof l!="number"||!Ce(l))throw new TypeError("Invalid size, must contain positive integers (size: "+Ge(n)+")");if(t.length>l)return t.substring(0,l);if(t.length{var{typed:r,multiply:a,rotationMatrix:i}=e;return r(bu,{"Array , number | BigNumber | Complex | Unit":function(o,l){t(o,2);var u=a(i(l),o);return u.toArray()},"Matrix , number | BigNumber | Complex | Unit":function(o,l){return t(o,2),a(i(l),o)},"Array, number | BigNumber | Complex | Unit, Array | Matrix":function(o,l,u){t(o,3);var s=a(i(l,u),o);return s},"Matrix, number | BigNumber | Complex | Unit, Array | Matrix":function(o,l,u){return t(o,3),a(i(l,u),o)}});function t(n,o){var l=Array.isArray(n)?Pe(n):n.size();if(l.length>2)throw new RangeError("Vector must be of dimensions 1x".concat(o));if(l.length===2&&l[1]!==1)throw new RangeError("Vector must be of dimensions 1x".concat(o));if(l[0]!==o)throw new RangeError("Vector must be of dimensions 1x".concat(o))}}),xu="rotationMatrix",wb=["typed","config","multiplyScalar","addScalar","unaryMinus","norm","matrix","BigNumber","DenseMatrix","SparseMatrix","cos","sin"],Nb=q(xu,wb,e=>{var{typed:r,config:a,multiplyScalar:i,addScalar:t,unaryMinus:n,norm:o,BigNumber:l,matrix:u,DenseMatrix:s,SparseMatrix:c,cos:f,sin:m}=e;return r(xu,{"":function(){return a.matrix==="Matrix"?u([]):[]},string:function(h){return u(h)},"number | BigNumber | Complex | Unit":function(h){return v(h,a.matrix==="Matrix"?"dense":void 0)},"number | BigNumber | Complex | Unit, string":function(h,b){return v(h,b)},"number | BigNumber | Complex | Unit, Array":function(h,b){var x=u(b);return d(x),g(h,x,void 0)},"number | BigNumber | Complex | Unit, Matrix":function(h,b){d(b);var x=b.storage()||(a.matrix==="Matrix"?"dense":void 0);return g(h,b,x)},"number | BigNumber | Complex | Unit, Array, string":function(h,b,x){var y=u(b);return d(y),g(h,y,x)},"number | BigNumber | Complex | Unit, Matrix, string":function(h,b,x){return d(b),g(h,b,x)}});function v(N,h){var b=Le(N),x=b?new l(-1):-1,y=f(N),A=m(N),S=[[y,i(x,A)],[A,y]];return w(S,h)}function d(N){var h=N.size();if(h.length<1||h[0]!==3)throw new RangeError("Vector must be of dimensions 1x3")}function p(N){return N.reduce((h,b)=>i(h,b))}function w(N,h){if(h){if(h==="sparse")return new c(N);if(h==="dense")return new s(N);throw new TypeError('Unknown matrix type "'.concat(h,'"'))}return N}function g(N,h,b){var x=o(h);if(x===0)throw new RangeError("Rotation around zero vector");var y=Le(N)?l:null,A=y?new y(1):1,S=y?new y(-1):-1,D=y?new y(h.get([0])/x):h.get([0])/x,E=y?new y(h.get([1])/x):h.get([1])/x,C=y?new y(h.get([2])/x):h.get([2])/x,F=f(N),_=t(A,n(F)),I=m(N),$=t(F,p([D,D,_])),T=t(p([D,E,_]),p([S,C,I])),B=t(p([D,C,_]),p([E,I])),L=t(p([D,E,_]),p([C,I])),O=t(F,p([E,E,_])),Y=t(p([E,C,_]),p([S,D,I])),K=t(p([D,C,_]),p([S,E,I])),V=t(p([E,C,_]),p([D,I])),z=t(F,p([C,C,_])),Q=[[$,T,B],[L,O,Y],[K,V,z]];return w(Q,b)}}),wu="row",Db=["typed","Index","matrix","range"],hv=q(wu,Db,e=>{var{typed:r,Index:a,matrix:i,range:t}=e;return r(wu,{"Matrix, number":n,"Array, number":function(l,u){return n(i(qe(l)),u).valueOf()}});function n(o,l){if(o.size().length!==2)throw new Error("Only two dimensional matrix is supported");nr(l,o.size()[0]);var u=t(0,o.size()[1]),s=new a(l,u),c=o.subset(s);return Te(c)?c:i([[c]])}}),Nu="size",Ab=["typed","config","?matrix"],Eb=q(Nu,Ab,e=>{var{typed:r,config:a,matrix:i}=e;return r(Nu,{Matrix:function(n){return n.create(n.size())},Array:Pe,string:function(n){return a.matrix==="Array"?[n.length]:i([n.length])},"number | Complex | BigNumber | Unit | boolean | null":function(n){return a.matrix==="Array"?[]:i?i([]):pv()}})}),Du="squeeze",Sb=["typed","matrix"],Cb=q(Du,Sb,e=>{var{typed:r,matrix:a}=e;return r(Du,{Array:function(t){return Ra(qe(t))},Matrix:function(t){var n=Ra(t.toArray());return Array.isArray(n)?a(n):n},any:function(t){return qe(t)}})}),Au="subset",Mb=["typed","matrix","zeros","add"],gv=q(Au,Mb,e=>{var{typed:r,matrix:a,zeros:i,add:t}=e;return r(Au,{"Matrix, Index":function(l,u){return hn(u)?a():(qa(l,u),l.subset(u))},"Array, Index":r.referTo("Matrix, Index",function(o){return function(l,u){var s=o(a(l),u);return u.isScalar()?s:s.valueOf()}}),"Object, Index":Bb,"string, Index":Fb,"Matrix, Index, any, any":function(l,u,s,c){return hn(u)?l:(qa(l,u),l.clone().subset(u,n(s,u),c))},"Array, Index, any, any":r.referTo("Matrix, Index, any, any",function(o){return function(l,u,s,c){var f=o(a(l),u,s,c);return f.isMatrix?f.valueOf():f}}),"Array, Index, any":r.referTo("Matrix, Index, any, any",function(o){return function(l,u,s){return o(a(l),u,s,void 0).valueOf()}}),"Matrix, Index, any":r.referTo("Matrix, Index, any, any",function(o){return function(l,u,s){return o(l,u,s,void 0)}}),"string, Index, string":Eu,"string, Index, string, string":Eu,"Object, Index, any":Tb});function n(o,l){if(typeof o=="string")throw new Error("can't boradcast a string");if(l._isScalar)return o;var u=l.size();if(u.every(s=>s>0))try{return t(o,i(u))}catch{return o}else return o}});function Fb(e,r){if(!ii(r))throw new TypeError("Index expected");if(hn(r))return"";if(qa(Array.from(e),r),r.size().length!==1)throw new Ve(r.size().length,1);var a=e.length;nr(r.min()[0],a),nr(r.max()[0],a);var i=r.dimension(0),t="";return i.forEach(function(n){t+=e.charAt(n)}),t}function Eu(e,r,a,i){if(!r||r.isIndex!==!0)throw new TypeError("Index expected");if(hn(r))return e;if(qa(Array.from(e),r),r.size().length!==1)throw new Ve(r.size().length,1);if(i!==void 0){if(typeof i!="string"||i.length!==1)throw new TypeError("Single character expected as defaultValue")}else i=" ";var t=r.dimension(0),n=t.size()[0];if(n!==a.length)throw new Ve(t.size()[0],a.length);var o=e.length;nr(r.min()[0]),nr(r.max()[0]);for(var l=[],u=0;uo)for(var s=o-1,c=l.length;s{var{typed:r,matrix:a}=e;return r(Su,{Array:o=>i(a(o)).valueOf(),Matrix:i,any:qe});function i(o){var l=o.size(),u;switch(l.length){case 1:u=o.clone();break;case 2:{var s=l[0],c=l[1];if(c===0)throw new RangeError("Cannot transpose a 2D matrix with no columns (size: "+Ge(l)+")");switch(o.storage()){case"dense":u=t(o,s,c);break;case"sparse":u=n(o,s,c);break}}break;default:throw new RangeError("Matrix must be a vector or two dimensional (size: "+Ge(l)+")")}return u}function t(o,l,u){for(var s=o._data,c=[],f,m=0;m{var{typed:r,transpose:a,conj:i}=e;return r(Cu,{any:function(n){return i(a(n))}})}),Mu="zeros",qb=["typed","config","matrix","BigNumber"],Rb=q(Mu,qb,e=>{var{typed:r,config:a,matrix:i,BigNumber:t}=e;return r(Mu,{"":function(){return a.matrix==="Array"?n([]):n([],"default")},"...number | BigNumber | string":function(s){var c=s[s.length-1];if(typeof c=="string"){var f=s.pop();return n(s,f)}else return a.matrix==="Array"?n(s):n(s,"default")},Array:n,Matrix:function(s){var c=s.storage();return n(s.valueOf(),c)},"Array | Matrix, string":function(s,c){return n(s.valueOf(),c)}});function n(u,s){var c=o(u),f=c?new t(0):0;if(l(u),s){var m=i(s);return u.length>0?m.resize(u,f):m}else{var v=[];return u.length>0?gn(v,u,f):v}}function o(u){var s=!1;return u.forEach(function(c,f,m){Le(c)&&(s=!0,m[f]=c.toNumber())}),s}function l(u){u.forEach(function(s){if(typeof s!="number"||!Ce(s)||s<0)throw new Error("Parameters in function zeros must be positive integers")})}}),Fu="fft",zb=["typed","matrix","addScalar","multiplyScalar","divideScalar","exp","tau","i","dotDivide","conj","pow","ceil","log2"],Pb=q(Fu,zb,e=>{var{typed:r,matrix:a,addScalar:i,multiplyScalar:t,divideScalar:n,exp:o,tau:l,i:u,dotDivide:s,conj:c,pow:f,ceil:m,log2:v}=e;return r(Fu,{Array:d,Matrix:function(h){return h.create(d(h.toArray()))}});function d(N){var h=Pe(N);return h.length===1?g(N,h[0]):p(N.map(b=>d(b,h.slice(1))),0)}function p(N,h){var b=Pe(N);if(h!==0)return new Array(b[0]).fill(0).map((y,A)=>p(N[A],h-1));if(b.length===1)return g(N);function x(y){var A=Pe(y);return new Array(A[1]).fill(0).map((S,D)=>new Array(A[0]).fill(0).map((E,C)=>y[C][D]))}return x(p(x(N),1))}function w(N){for(var h=N.length,b=o(n(t(-1,t(u,l)),h)),x=[],y=1-h;yt(N[B],x[h-1+B])),...new Array(A-h).fill(0)],D=[...new Array(h+h-1).fill(0).map((T,B)=>n(1,x[B])),...new Array(A-(h+h-1)).fill(0)],E=g(S),C=g(D),F=new Array(A).fill(0).map((T,B)=>t(E[B],C[B])),_=s(c(d(c(F))),A),I=[],$=h-1;$D%2===0)),...g(N.filter((S,D)=>D%2===1))],x=0;x{var{typed:r,fft:a,dotDivide:i,conj:t}=e;return r(Bu,{"Array | Matrix":function(o){var l=Te(o)?o.size():Pe(o);return i(t(a(t(o))),l.reduce((u,s)=>u*s,1))}})});function Wn(e){"@babel/helpers - typeof";return Wn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Wn(e)}function kb(e,r){if(Wn(e)!="object"||!e)return e;var a=e[Symbol.toPrimitive];if(a!==void 0){var i=a.call(e,r);if(Wn(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function Hb(e){var r=kb(e,"string");return Wn(r)=="symbol"?r:r+""}function dr(e,r,a){return(r=Hb(r))in e?Object.defineProperty(e,r,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[r]=a,e}function Tu(e,r){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),a.push.apply(a,i)}return a}function Gb(e){for(var r=1;r{var{typed:r,add:a,subtract:i,multiply:t,divide:n,max:o,map:l,abs:u,isPositive:s,isNegative:c,larger:f,smaller:m,matrix:v,bignumber:d,unaryMinus:p}=e;function w(S){return function(D,E,C,F){var _=!(E.length===2&&(E.every(y)||E.every(Wr)));if(_)throw new Error('"tspan" must be an Array of two numeric values or two units [tStart, tEnd]');var I=E[0],$=E[1],T=f($,I),B=F.firstStep;if(B!==void 0&&!s(B))throw new Error('"firstStep" must be positive');var L=F.maxStep;if(L!==void 0&&!s(L))throw new Error('"maxStep" must be positive');var O=F.minStep;if(O&&c(O))throw new Error('"minStep" must be positive or zero');var Y=[I,$,B,O,L].filter(R=>R!==void 0);if(!(Y.every(y)||Y.every(Wr)))throw new Error('Inconsistent type of "t" dependant variables');for(var K=1,V=F.tol?F.tol:1e-4,z=F.minDelta?F.minDelta:.2,Q=F.maxDelta?F.maxDelta:5,le=F.maxIter?F.maxIter:1e4,j=[I,$,...C,L,O].some(Le),[re,oe,ee,ae]=j?[d(S.a),d(S.c),d(S.b),d(S.bp)]:[S.a,S.c,S.b,S.bp],se=B?T?B:p(B):n(i($,I),K),pe=[I],Ne=[C],Ee=i(ee,ae),P=0,H=0,te=b(T),k=x(T);te(pe[P],$);){var X=[];se=k(pe[P],$,se),X.push(D(pe[P],Ne[P]));for(var W=1;WWr(R)?R.value:R)));me1/4&&(pe.push(a(pe[P],se)),Ne.push(a(Ne[P],t(se,ee,X))),P++);var fe=.84*(V/me)**(1/5);if(m(fe,z)?fe=z:f(fe,Q)&&(fe=Q),fe=j?d(fe):fe,se=t(se,fe),L&&f(u(se),L)?se=T?L:p(L):O&&m(u(se),O)&&(se=T?O:p(O)),H++,H>le)throw new Error("Maximum number of iterations reached, try changing options")}return{t:pe,y:Ne}}}function g(S,D,E,C){var F=[[],[.5],[0,.75],[.2222222222222222,.3333333333333333,.4444444444444444]],_=[null,1/2,3/4,1],I=[2/9,1/3,4/9,0],$=[7/24,1/4,1/3,1/8],T={a:F,c:_,b:I,bp:$};return w(T)(S,D,E,C)}function N(S,D,E,C){var F=[[],[.2],[.075,.225],[.9777777777777777,-3.7333333333333334,3.5555555555555554],[2.9525986892242035,-11.595793324188385,9.822892851699436,-.2908093278463649],[2.8462752525252526,-10.757575757575758,8.906422717743473,.2784090909090909,-.2735313036020583],[.09114583333333333,0,.44923629829290207,.6510416666666666,-.322376179245283,.13095238095238096]],_=[null,1/5,3/10,4/5,8/9,1,1],I=[35/384,0,500/1113,125/192,-2187/6784,11/84,0],$=[5179/57600,0,7571/16695,393/640,-92097/339200,187/2100,1/40],T={a:F,c:_,b:I,bp:$};return w(T)(S,D,E,C)}function h(S,D,E,C){var F=C.method?C.method:"RK45",_={RK23:g,RK45:N};if(F.toUpperCase()in _){var I=Gb({},C);return delete I.method,_[F.toUpperCase()](S,D,E,I)}else{var $=Object.keys(_).map(B=>'"'.concat(B,'"')),T="".concat($.slice(0,-1).join(", ")," and ").concat($.slice(-1));throw new Error('Unavailable method "'.concat(F,'". Available methods are ').concat(T))}}function b(S){return S?m:f}function x(S){var D=S?f:m;return function(E,C,F){var _=a(E,F);return D(_,C)?i(C,E):F}}function y(S){return Le(S)||Ue(S)}function A(S,D,E,C){var F=h(S,D.toArray(),E.toArray(),C);return{t:v(F.t),y:v(F.y)}}return r("solveODE",{"function, Array, Array, Object":h,"function, Matrix, Matrix, Object":A,"function, Array, Array":(S,D,E)=>h(S,D,E,{}),"function, Matrix, Matrix":(S,D,E)=>A(S,D,E,{}),"function, Array, number | BigNumber | Unit":(S,D,E)=>{var C=h(S,D,[E],{});return{t:C.t,y:C.y.map(F=>F[0])}},"function, Matrix, number | BigNumber | Unit":(S,D,E)=>{var C=h(S,D.toArray(),[E],{});return{t:v(C.t),y:v(C.y.map(F=>F[0]))}},"function, Array, number | BigNumber | Unit, Object":(S,D,E,C)=>{var F=h(S,D,[E],C);return{t:F.t,y:F.y.map(_=>_[0])}},"function, Matrix, number | BigNumber | Unit, Object":(S,D,E,C)=>{var F=h(S,D.toArray(),[E],C);return{t:v(F.t),y:v(F.y.map(_=>_[0]))}}})}),Yb="erf",Wb=["typed"],Jb=q(Yb,Wb,e=>{var{typed:r}=e;return r("name",{number:function(o){var l=Math.abs(o);return l>=jb?Bt(o):l<=Qb?Bt(o)*a(l):l<=4?Bt(o)*(1-i(l)):Bt(o)*(1-t(l))},"Array | Matrix":r.referToSelf(n=>o=>Ze(o,n))});function a(n){var o=n*n,l=yt[0][4]*o,u=o,s;for(s=0;s<3;s+=1)l=(l+yt[0][s])*o,u=(u+sn[0][s])*o;return n*(l+yt[0][3])/(u+sn[0][3])}function i(n){var o=yt[1][8]*n,l=n,u;for(u=0;u<7;u+=1)o=(o+yt[1][u])*n,l=(l+sn[1][u])*n;var s=(o+yt[1][7])/(l+sn[1][7]),c=parseInt(n*16)/16,f=(n-c)*(n+c);return Math.exp(-c*c)*Math.exp(-f)*s}function t(n){var o=1/(n*n),l=yt[2][5]*o,u=o,s;for(s=0;s<4;s+=1)l=(l+yt[2][s])*o,u=(u+sn[2][s])*o;var c=o*(l+yt[2][4])/(u+sn[2][4]);c=(Kb-c)/n,o=parseInt(n*16)/16;var f=(n-o)*(n+o);return Math.exp(-o*o)*Math.exp(-f)*c}}),Qb=.46875,Kb=.5641895835477563,yt=[[3.1611237438705655,113.86415415105016,377.485237685302,3209.3775891384694,.18577770618460315],[.5641884969886701,8.883149794388377,66.11919063714163,298.6351381974001,881.952221241769,1712.0476126340707,2051.0783778260716,1230.3393547979972,21531153547440383e-24],[.30532663496123236,.36034489994980445,.12578172611122926,.016083785148742275,.0006587491615298378,.016315387137302097]],sn=[[23.601290952344122,244.02463793444417,1282.6165260773723,2844.236833439171],[15.744926110709835,117.6939508913125,537.1811018620099,1621.3895745666903,3290.7992357334597,4362.619090143247,3439.3676741437216,1230.3393548037495],[2.568520192289822,1.8729528499234604,.5279051029514285,.06051834131244132,.0023352049762686918]],jb=Math.pow(2,53),Ou="zeta",ex=["typed","config","multiply","pow","divide","factorial","equal","smallerEq","isNegative","gamma","sin","subtract","add","?Complex","?BigNumber","pi"],rx=q(Ou,ex,e=>{var{typed:r,config:a,multiply:i,pow:t,divide:n,factorial:o,equal:l,smallerEq:u,isNegative:s,gamma:c,sin:f,subtract:m,add:v,Complex:d,BigNumber:p,pi:w}=e;return r(Ou,{number:y=>g(y,A=>A,()=>20),BigNumber:y=>g(y,A=>new p(A),()=>Math.abs(Math.log10(a.epsilon))),Complex:N});function g(y,A,S){return l(y,0)?A(-.5):l(y,1)?A(NaN):isFinite(y)?h(y,A,S,D=>D):s(y)?A(NaN):A(1)}function N(y){return y.re===0&&y.im===0?new d(-.5):y.re===1?new d(NaN,NaN):y.re===1/0&&y.im===0?new d(1):y.im===1/0||y.re===-1/0?new d(NaN,NaN):h(y,A=>A,A=>Math.round(1.3*15+.9*Math.abs(A.im)),A=>A.re)}function h(y,A,S,D){var E=S(y);if(D(y)>-(E-1)/2)return x(y,A(E),A);var C=i(t(2,y),t(A(w),m(y,1)));return C=i(C,f(i(n(A(w),2),y))),C=i(C,c(m(1,y))),i(C,h(m(1,y),A,S,D))}function b(y,A){for(var S=y,D=y;u(D,A);D=v(D,1)){var E=n(i(o(v(A,m(D,1))),t(4,D)),i(o(m(A,D)),o(i(2,D))));S=v(S,E)}return i(A,S)}function x(y,A,S){for(var D=n(1,i(b(S(0),A),m(1,t(2,m(1,y))))),E=S(0),C=S(1);u(C,A);C=v(C,1))E=v(E,n(i((-1)**(C-1),b(C,A)),t(C,y)));return i(D,E)}}),_u="mode",tx=["typed","isNaN","isNumeric"],nx=q(_u,tx,e=>{var{typed:r,isNaN:a,isNumeric:i}=e;return r(_u,{"Array | Matrix":t,"...":function(o){return t(o)}});function t(n){n=Ke(n.valueOf());var o=n.length;if(o===0)throw new Error("Cannot calculate mode of an empty array");for(var l={},u=[],s=0,c=0;cs&&(s=l[f],u=[f])}return u}});function qr(e,r,a){var i;return String(e).indexOf("Unexpected type")!==-1?(i=arguments.length>2?" (type: "+ir(a)+", value: "+JSON.stringify(a)+")":" (type: "+e.data.actual+")",new TypeError("Cannot calculate "+r+", unexpected type of argument"+i)):String(e).indexOf("complex numbers")!==-1?(i=arguments.length>2?" (type: "+ir(a)+", value: "+JSON.stringify(a)+")":"",new TypeError("Cannot calculate "+r+", no ordering relation is defined for complex numbers"+i)):e}var $u="prod",ax=["typed","config","multiplyScalar","numeric"],ix=q($u,ax,e=>{var{typed:r,config:a,multiplyScalar:i,numeric:t}=e;return r($u,{"Array | Matrix":n,"Array | Matrix, number | BigNumber":function(l,u){throw new Error("prod(A, dim) is not yet supported")},"...":function(l){return n(l)}});function n(o){var l;if(At(o,function(u){try{l=l===void 0?u:i(l,u)}catch(s){throw qr(s,"prod",u)}}),typeof l=="string"&&(l=t(l,a.number)),l===void 0)throw new Error("Cannot calculate prod of an empty array");return l}}),Iu="format",ox=["typed"],sx=q(Iu,ox,e=>{var{typed:r}=e;return r(Iu,{any:Ge,"any, Object | function | number | BigNumber":Ge})}),qu="bin",ux=["typed","format"],cx=q(qu,ux,e=>{var{typed:r,format:a}=e;return r(qu,{"number | BigNumber":function(t){return a(t,{notation:"bin"})},"number | BigNumber, number | BigNumber":function(t,n){return a(t,{notation:"bin",wordSize:n})}})}),Ru="oct",lx=["typed","format"],fx=q(Ru,lx,e=>{var{typed:r,format:a}=e;return r(Ru,{"number | BigNumber":function(t){return a(t,{notation:"oct"})},"number | BigNumber, number | BigNumber":function(t,n){return a(t,{notation:"oct",wordSize:n})}})}),zu="hex",mx=["typed","format"],vx=q(zu,mx,e=>{var{typed:r,format:a}=e;return r(zu,{"number | BigNumber":function(t){return a(t,{notation:"hex"})},"number | BigNumber, number | BigNumber":function(t,n){return a(t,{notation:"hex",wordSize:n})}})}),yv=/\$([\w.]+)/g,Pu="print",px=["typed"],bv=q(Pu,px,e=>{var{typed:r}=e;return r(Pu,{"string, Object | Array":Uu,"string, Object | Array, number | Object":Uu})});function Uu(e,r,a){return e.replace(yv,function(i,t){var n=t.split("."),o=r[n.shift()];for(o!==void 0&&o.isMatrix&&(o=o.toArray());n.length&&o!==void 0;){var l=n.shift();o=l?o[l]:o+"."}return o!==void 0?Cr(o)?o:Ge(o,a):i})}var Lu="to",dx=["typed","matrix","concat"],hx=q(Lu,dx,e=>{var{typed:r,matrix:a,concat:i}=e,t=sr({typed:r,matrix:a,concat:i});return r(Lu,{"Unit, Unit | string":(n,o)=>n.to(o)},t({Ds:!0}))}),ku="isPrime",gx=["typed"],yx=q(ku,gx,e=>{var{typed:r}=e;return r(ku,{number:function(i){if(i*0!==0)return!1;if(i<=3)return i>1;if(i%2===0||i%3===0)return!1;for(var t=5;t*t<=i;t+=6)if(i%t===0||i%(t+2)===0)return!1;return!0},BigNumber:function(i){if(i.toNumber()*0!==0)return!1;if(i.lte(3))return i.gt(1);if(i.mod(2).eq(0)||i.mod(3).eq(0))return!1;if(i.lt(Math.pow(2,32))){for(var t=i.toNumber(),n=5;n*n<=t;n+=6)if(t%n===0||t%(n+2)===0)return!1;return!0}function o(N,h,b){for(var x=1;!h.eq(0);)h.mod(2).eq(0)?(h=h.div(2),N=N.mul(N).mod(b)):(h=h.sub(1),x=N.mul(x).mod(b));return x}var l=i.constructor.clone({precision:i.toFixed(0).length*2});i=new l(i);for(var u=0,s=i.sub(1);s.mod(2).eq(0);)s=s.div(2),u+=1;var c=null;if(i.lt("3317044064679887385961981"))c=[2,3,5,7,11,13,17,19,23,29,31,37,41].filter(N=>Ni=>Ze(i,a))})}),bx="numeric",xx=["number","?bignumber","?fraction"],wx=q(bx,xx,e=>{var{number:r,bignumber:a,fraction:i}=e,t={string:!0,number:!0,BigNumber:!0,Fraction:!0},n={number:o=>r(o),BigNumber:a?o=>a(o):po,Fraction:i?o=>i(o):vv};return function(l){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"number",s=arguments.length>2?arguments[2]:void 0;if(s!==void 0)throw new SyntaxError("numeric() takes one or two arguments");var c=ir(l);if(!(c in t))throw new TypeError("Cannot convert "+l+' of type "'+c+'"; valid input types are '+Object.keys(t).join(", "));if(!(u in n))throw new TypeError("Cannot convert "+l+' to type "'+u+'"; valid output types are '+Object.keys(n).join(", "));return u===c?l:n[u](l)}}),Hu="divideScalar",Nx=["typed","numeric"],Dx=q(Hu,Nx,e=>{var{typed:r,numeric:a}=e;return r(Hu,{"number, number":function(t,n){return t/n},"Complex, Complex":function(t,n){return t.div(n)},"BigNumber, BigNumber":function(t,n){return t.div(n)},"Fraction, Fraction":function(t,n){return t.div(n)},"Unit, number | Complex | Fraction | BigNumber | Unit":(i,t)=>i.divide(t),"number | Fraction | Complex | BigNumber, Unit":(i,t)=>t.divideInto(i)})}),Gu="pow",Ax=["typed","config","identity","multiply","matrix","inv","fraction","number","Complex"],Ex=q(Gu,Ax,e=>{var{typed:r,config:a,identity:i,multiply:t,matrix:n,inv:o,number:l,fraction:u,Complex:s}=e;return r(Gu,{"number, number":c,"Complex, Complex":function(d,p){return d.pow(p)},"BigNumber, BigNumber":function(d,p){return p.isInteger()||d>=0||a.predictable?d.pow(p):new s(d.toNumber(),0).pow(p.toNumber(),0)},"Fraction, Fraction":function(d,p){var w=d.pow(p);if(w!=null)return w;if(a.predictable)throw new Error("Result of pow is non-rational and cannot be expressed as a fraction");return c(d.valueOf(),p.valueOf())},"Array, number":f,"Array, BigNumber":function(d,p){return f(d,p.toNumber())},"Matrix, number":m,"Matrix, BigNumber":function(d,p){return m(d,p.toNumber())},"Unit, number | BigNumber":function(d,p){return d.pow(p)}});function c(v,d){if(a.predictable&&!Ce(d)&&v<0)try{var p=u(d),w=l(p);if((d===w||Math.abs((d-w)/d)<1e-14)&&p.d%2===1)return(p.n%2===0?1:-1)*Math.pow(-v,d)}catch{}return a.predictable&&(v<-1&&d===1/0||v>-1&&v<0&&d===-1/0)?NaN:Ce(d)||v>=0||a.predictable?Dm(v,d):v*v<1&&d===1/0||v*v>1&&d===-1/0?0:new s(v,0).pow(d,0)}function f(v,d){if(!Ce(d))throw new TypeError("For A^b, b must be an integer (value is "+d+")");var p=Pe(v);if(p.length!==2)throw new Error("For A^b, A must be 2 dimensional (A has "+p.length+" dimensions)");if(p[0]!==p[1])throw new Error("For A^b, A must be square (size is "+p[0]+"x"+p[1]+")");if(d<0)try{return f(o(v),-d)}catch(N){throw N.message==="Cannot calculate inverse, determinant is zero"?new TypeError("For A^b, when A is not invertible, b must be a positive integer (value is "+d+")"):N}for(var w=i(p[0]).valueOf(),g=v;d>=1;)(d&1)===1&&(w=t(g,w)),d>>=1,g=t(g,g);return w}function m(v,d){return n(f(v.valueOf(),d))}}),un="Number of decimals in function round must be an integer",Vu="round",Sx=["typed","config","matrix","equalScalar","zeros","BigNumber","DenseMatrix"],Cx=q(Vu,Sx,e=>{var{typed:r,config:a,matrix:i,equalScalar:t,zeros:n,BigNumber:o,DenseMatrix:l}=e,u=Dr({typed:r,equalScalar:t}),s=hr({typed:r,DenseMatrix:l}),c=st({typed:r});function f(m){return Math.abs(Kn(m).exponent)}return r(Vu,{number:function(v){var d=Ln(v,f(a.epsilon)),p=Ir(v,d,a.epsilon)?d:v;return Ln(p)},"number, number":function(v,d){var p=f(a.epsilon);if(d>=p)return Ln(v,d);var w=Ln(v,p),g=Ir(v,w,a.epsilon)?w:v;return Ln(g,d)},"number, BigNumber":function(v,d){if(!d.isInteger())throw new TypeError(un);return new o(v).toDecimalPlaces(d.toNumber())},Complex:function(v){return v.round()},"Complex, number":function(v,d){if(d%1)throw new TypeError(un);return v.round(d)},"Complex, BigNumber":function(v,d){if(!d.isInteger())throw new TypeError(un);var p=d.toNumber();return v.round(p)},BigNumber:function(v){var d=new o(v).toDecimalPlaces(f(a.epsilon)),p=Kr(v,d,a.epsilon)?d:v;return p.toDecimalPlaces(0)},"BigNumber, BigNumber":function(v,d){if(!d.isInteger())throw new TypeError(un);var p=f(a.epsilon);if(d>=p)return v.toDecimalPlaces(d.toNumber());var w=v.toDecimalPlaces(p),g=Kr(v,w,a.epsilon)?w:v;return g.toDecimalPlaces(d.toNumber())},Fraction:function(v){return v.round()},"Fraction, number":function(v,d){if(d%1)throw new TypeError(un);return v.round(d)},"Fraction, BigNumber":function(v,d){if(!d.isInteger())throw new TypeError(un);return v.round(d.toNumber())},"Unit, number, Unit":r.referToSelf(m=>function(v,d,p){var w=v.toNumeric(p);return p.multiply(m(w,d))}),"Unit, BigNumber, Unit":r.referToSelf(m=>(v,d,p)=>m(v,d.toNumber(),p)),"Unit, Unit":r.referToSelf(m=>(v,d)=>m(v,0,d)),"Array | Matrix, number, Unit":r.referToSelf(m=>(v,d,p)=>Ze(v,w=>m(w,d,p))),"Array | Matrix, BigNumber, Unit":r.referToSelf(m=>(v,d,p)=>m(v,d.toNumber(),p)),"Array | Matrix, Unit":r.referToSelf(m=>(v,d)=>m(v,0,d)),"Array | Matrix":r.referToSelf(m=>v=>Ze(v,m)),"SparseMatrix, number | BigNumber":r.referToSelf(m=>(v,d)=>u(v,d,m,!1)),"DenseMatrix, number | BigNumber":r.referToSelf(m=>(v,d)=>c(v,d,m,!1)),"Array, number | BigNumber":r.referToSelf(m=>(v,d)=>c(i(v),d,m,!1).valueOf()),"number | Complex | BigNumber | Fraction, SparseMatrix":r.referToSelf(m=>(v,d)=>t(v,0)?n(d.size(),d.storage()):s(d,v,m,!0)),"number | Complex | BigNumber | Fraction, DenseMatrix":r.referToSelf(m=>(v,d)=>t(v,0)?n(d.size(),d.storage()):c(d,v,m,!0)),"number | Complex | BigNumber | Fraction, Array":r.referToSelf(m=>(v,d)=>c(i(d),v,m,!0).valueOf())})}),Zu="log",Mx=["config","typed","divideScalar","Complex"],Fx=q(Zu,Mx,e=>{var{typed:r,config:a,divideScalar:i,Complex:t}=e;return r(Zu,{number:function(o){return o>=0||a.predictable?C0(o):new t(o,0).log()},Complex:function(o){return o.log()},BigNumber:function(o){return!o.isNegative()||a.predictable?o.ln():new t(o.toNumber(),0).log()},"any, any":r.referToSelf(n=>(o,l)=>i(n(o),n(l)))})}),Xu="log1p",Bx=["typed","config","divideScalar","log","Complex"],Tx=q(Xu,Bx,e=>{var{typed:r,config:a,divideScalar:i,log:t,Complex:n}=e;return r(Xu,{number:function(u){return u>=-1||a.predictable?Dd(u):o(new n(u,0))},Complex:o,BigNumber:function(u){var s=u.plus(1);return!s.isNegative()||a.predictable?s.ln():o(new n(u.toNumber(),0))},"Array | Matrix":r.referToSelf(l=>u=>Ze(u,l)),"any, any":r.referToSelf(l=>(u,s)=>i(l(u),t(s)))});function o(l){var u=l.re+1;return new n(Math.log(Math.sqrt(u*u+l.im*l.im)),Math.atan2(l.im,u))}}),Yu="nthRoots",Ox=["config","typed","divideScalar","Complex"],_x=q(Yu,Ox,e=>{var{typed:r,config:a,divideScalar:i,Complex:t}=e,n=[function(u){return new t(u,0)},function(u){return new t(0,u)},function(u){return new t(-u,0)},function(u){return new t(0,-u)}];function o(l,u){if(u<0)throw new Error("Root must be greater than zero");if(u===0)throw new Error("Root must be non-zero");if(u%1!==0)throw new Error("Root must be an integer");if(l===0||l.abs()===0)return[new t(0,0)];var s=typeof l=="number",c;(s||l.re===0||l.im===0)&&(s?c=2*+(l<0):l.im===0?c=2*+(l.re<0):c=2*+(l.im<0)+1);for(var f=l.arg(),m=l.abs(),v=[],d=Math.pow(m,1/u),p=0;p{var{typed:r,equalScalar:a,matrix:i,pow:t,DenseMatrix:n,concat:o}=e,l=Rr({typed:r}),u=vt({typed:r,DenseMatrix:n}),s=Dr({typed:r,equalScalar:a}),c=hr({typed:r,DenseMatrix:n}),f=sr({typed:r,matrix:i,concat:o}),m={};for(var v in t.signatures)Object.prototype.hasOwnProperty.call(t.signatures,v)&&!v.includes("Matrix")&&!v.includes("Array")&&(m[v]=t.signatures[v]);var d=r(m);return r(Wu,f({elop:d,SS:u,DS:l,Ss:s,sS:c}))}),Ju="dotDivide",qx=["typed","matrix","equalScalar","divideScalar","DenseMatrix","concat"],Rx=q(Ju,qx,e=>{var{typed:r,matrix:a,equalScalar:i,divideScalar:t,DenseMatrix:n,concat:o}=e,l=ut({typed:r,equalScalar:i}),u=Rr({typed:r}),s=vt({typed:r,DenseMatrix:n}),c=Dr({typed:r,equalScalar:i}),f=hr({typed:r,DenseMatrix:n}),m=sr({typed:r,matrix:a,concat:o});return r(Ju,m({elop:t,SS:s,DS:u,SD:l,Ss:c,sS:f}))});function ea(e){var{DenseMatrix:r}=e;return function(i,t,n){var o=i.size();if(o.length!==2)throw new RangeError("Matrix must be two dimensional (size: "+Ge(o)+")");var l=o[0],u=o[1];if(l!==u)throw new RangeError("Matrix must be square (size: "+Ge(o)+")");var s=[];if(Te(t)){var c=t.size(),f=t._data;if(c.length===1){if(c[0]!==l)throw new RangeError("Dimension mismatch. Matrix columns must match vector length.");for(var m=0;m{var{typed:r,matrix:a,divideScalar:i,multiplyScalar:t,subtractScalar:n,equalScalar:o,DenseMatrix:l}=e,u=ea({DenseMatrix:l});return r(Qu,{"SparseMatrix, Array | Matrix":function(m,v){return c(m,v)},"DenseMatrix, Array | Matrix":function(m,v){return s(m,v)},"Array, Array | Matrix":function(m,v){var d=a(m),p=s(d,v);return p.valueOf()}});function s(f,m){m=u(f,m,!0);for(var v=m._data,d=f._size[0],p=f._size[1],w=[],g=f._data,N=0;Nb&&(A.push(w[C]),S.push(F))}if(o(y,0))throw new Error("Linear system cannot be solved since matrix is singular");for(var _=i(x,y),I=0,$=S.length;I<$;I++){var T=S[I];v[T]=[n(v[T][0]||0,t(_,A[I]))]}h[b]=[_]}}return new l({data:h,size:[d,1]})}}),Ku="usolve",Ux=["typed","matrix","divideScalar","multiplyScalar","subtractScalar","equalScalar","DenseMatrix"],Lx=q(Ku,Ux,e=>{var{typed:r,matrix:a,divideScalar:i,multiplyScalar:t,subtractScalar:n,equalScalar:o,DenseMatrix:l}=e,u=ea({DenseMatrix:l});return r(Ku,{"SparseMatrix, Array | Matrix":function(m,v){return c(m,v)},"DenseMatrix, Array | Matrix":function(m,v){return s(m,v)},"Array, Array | Matrix":function(m,v){var d=a(m),p=s(d,v);return p.valueOf()}});function s(f,m){m=u(f,m,!0);for(var v=m._data,d=f._size[0],p=f._size[1],w=[],g=f._data,N=p-1;N>=0;N--){var h=v[N][0]||0,b=void 0;if(o(h,0))b=0;else{var x=g[N][N];if(o(x,0))throw new Error("Linear system cannot be solved since matrix is singular");b=i(h,x);for(var y=N-1;y>=0;y--)v[y]=[n(v[y][0]||0,t(b,g[y][N]))]}w[N]=[b]}return new l({data:w,size:[d,1]})}function c(f,m){m=u(f,m,!0);for(var v=m._data,d=f._size[0],p=f._size[1],w=f._values,g=f._index,N=f._ptr,h=[],b=p-1;b>=0;b--){var x=v[b][0]||0;if(o(x,0))h[b]=[0];else{for(var y=0,A=[],S=[],D=N[b],E=N[b+1],C=E-1;C>=D;C--){var F=g[C];F===b?y=w[C]:F{var{typed:r,matrix:a,divideScalar:i,multiplyScalar:t,subtractScalar:n,equalScalar:o,DenseMatrix:l}=e,u=ea({DenseMatrix:l});return r(ju,{"SparseMatrix, Array | Matrix":function(m,v){return c(m,v)},"DenseMatrix, Array | Matrix":function(m,v){return s(m,v)},"Array, Array | Matrix":function(m,v){var d=a(m),p=s(d,v);return p.map(w=>w.valueOf())}});function s(f,m){for(var v=[u(f,m,!0)._data.map(S=>S[0])],d=f._data,p=f._size[0],w=f._size[1],g=0;gnew l({data:S.map(D=>[D]),size:[p,1]}))}function c(f,m){for(var v=[u(f,m,!0)._data.map(K=>K[0])],d=f._size[0],p=f._size[1],w=f._values,g=f._index,N=f._ptr,h=0;hh&&(A.push(w[F]),S.push(_))}if(o(C,0))if(o(y[h],0)){if(x===0){var B=[...y];B[h]=1;for(var L=0,O=S.length;Lnew l({data:K.map(V=>[V]),size:[d,1]}))}}),ec="usolveAll",Gx=["typed","matrix","divideScalar","multiplyScalar","subtractScalar","equalScalar","DenseMatrix"],Vx=q(ec,Gx,e=>{var{typed:r,matrix:a,divideScalar:i,multiplyScalar:t,subtractScalar:n,equalScalar:o,DenseMatrix:l}=e,u=ea({DenseMatrix:l});return r(ec,{"SparseMatrix, Array | Matrix":function(m,v){return c(m,v)},"DenseMatrix, Array | Matrix":function(m,v){return s(m,v)},"Array, Array | Matrix":function(m,v){var d=a(m),p=s(d,v);return p.map(w=>w.valueOf())}});function s(f,m){for(var v=[u(f,m,!0)._data.map(S=>S[0])],d=f._data,p=f._size[0],w=f._size[1],g=w-1;g>=0;g--)for(var N=v.length,h=0;h=0;A--)y[A]=n(y[A],d[A][g]);v.push(y)}}else{if(h===0)return[];v.splice(h,1),h-=1,N-=1}else{b[g]=i(b[g],d[g][g]);for(var x=g-1;x>=0;x--)b[x]=n(b[x],t(b[g],d[x][g]))}}return v.map(S=>new l({data:S.map(D=>[D]),size:[p,1]}))}function c(f,m){for(var v=[u(f,m,!0)._data.map(K=>K[0])],d=f._size[0],p=f._size[1],w=f._values,g=f._index,N=f._ptr,h=p-1;h>=0;h--)for(var b=v.length,x=0;x=D;F--){var _=g[F];_===h?C=w[F]:_new l({data:K.map(V=>[V]),size:[d,1]}))}}),Zx="matAlgo08xS0Sid",Xx=["typed","equalScalar"],ho=q(Zx,Xx,e=>{var{typed:r,equalScalar:a}=e;return function(t,n,o){var l=t._values,u=t._index,s=t._ptr,c=t._size,f=t._datatype||t._data===void 0?t._datatype:t.getDataType(),m=n._values,v=n._index,d=n._ptr,p=n._size,w=n._datatype||n._data===void 0?n._datatype:n.getDataType();if(c.length!==p.length)throw new Ve(c.length,p.length);if(c[0]!==p[0]||c[1]!==p[1])throw new RangeError("Dimension mismatch. Matrix A ("+c+") must match Matrix B ("+p+")");if(!l||!m)throw new Error("Cannot perform operation on Pattern Sparse Matrices");var g=c[0],N=c[1],h,b=a,x=0,y=o;typeof f=="string"&&f===w&&f!=="mixed"&&(h=f,b=r.find(a,[h,h]),x=r.convert(0,h),y=r.find(o,[h,h]));for(var A=[],S=[],D=[],E=[],C=[],F,_,I,$,T=0;T{var{typed:r,matrix:a}=e;return{"Array, number":r.referTo("DenseMatrix, number",i=>(t,n)=>i(a(t),n).valueOf()),"Array, BigNumber":r.referTo("DenseMatrix, BigNumber",i=>(t,n)=>i(a(t),n).valueOf()),"number, Array":r.referTo("number, DenseMatrix",i=>(t,n)=>i(t,a(n)).valueOf()),"BigNumber, Array":r.referTo("BigNumber, DenseMatrix",i=>(t,n)=>i(t,a(n)).valueOf())}}),rc="leftShift",Yx=["typed","matrix","equalScalar","zeros","DenseMatrix","concat"],Wx=q(rc,Yx,e=>{var{typed:r,matrix:a,equalScalar:i,zeros:t,DenseMatrix:n,concat:o}=e,l=qt({typed:r}),u=ut({typed:r,equalScalar:i}),s=ho({typed:r,equalScalar:i}),c=Yt({typed:r,DenseMatrix:n}),f=Dr({typed:r,equalScalar:i}),m=st({typed:r}),v=sr({typed:r,matrix:a,concat:o}),d=go({typed:r,matrix:a});return r(rc,{"number, number":Mm,"BigNumber, BigNumber":dy,"SparseMatrix, number | BigNumber":r.referToSelf(p=>(w,g)=>i(g,0)?w.clone():f(w,g,p,!1)),"DenseMatrix, number | BigNumber":r.referToSelf(p=>(w,g)=>i(g,0)?w.clone():m(w,g,p,!1)),"number | BigNumber, SparseMatrix":r.referToSelf(p=>(w,g)=>i(w,0)?t(g.size(),g.storage()):c(g,w,p,!0)),"number | BigNumber, DenseMatrix":r.referToSelf(p=>(w,g)=>i(w,0)?t(g.size(),g.storage()):m(g,w,p,!0))},d,v({SS:s,DS:l,SD:u}))}),tc="rightArithShift",Jx=["typed","matrix","equalScalar","zeros","DenseMatrix","concat"],Qx=q(tc,Jx,e=>{var{typed:r,matrix:a,equalScalar:i,zeros:t,DenseMatrix:n,concat:o}=e,l=qt({typed:r}),u=ut({typed:r,equalScalar:i}),s=ho({typed:r,equalScalar:i}),c=Yt({typed:r,DenseMatrix:n}),f=Dr({typed:r,equalScalar:i}),m=st({typed:r}),v=sr({typed:r,matrix:a,concat:o}),d=go({typed:r,matrix:a});return r(tc,{"number, number":Fm,"BigNumber, BigNumber":hy,"SparseMatrix, number | BigNumber":r.referToSelf(p=>(w,g)=>i(g,0)?w.clone():f(w,g,p,!1)),"DenseMatrix, number | BigNumber":r.referToSelf(p=>(w,g)=>i(g,0)?w.clone():m(w,g,p,!1)),"number | BigNumber, SparseMatrix":r.referToSelf(p=>(w,g)=>i(w,0)?t(g.size(),g.storage()):c(g,w,p,!0)),"number | BigNumber, DenseMatrix":r.referToSelf(p=>(w,g)=>i(w,0)?t(g.size(),g.storage()):m(g,w,p,!0))},d,v({SS:s,DS:l,SD:u}))}),nc="rightLogShift",Kx=["typed","matrix","equalScalar","zeros","DenseMatrix","concat"],jx=q(nc,Kx,e=>{var{typed:r,matrix:a,equalScalar:i,zeros:t,DenseMatrix:n,concat:o}=e,l=qt({typed:r}),u=ut({typed:r,equalScalar:i}),s=ho({typed:r,equalScalar:i}),c=Yt({typed:r,DenseMatrix:n}),f=Dr({typed:r,equalScalar:i}),m=st({typed:r}),v=sr({typed:r,matrix:a,concat:o}),d=go({typed:r,matrix:a});return r(nc,{"number, number":Bm,"SparseMatrix, number | BigNumber":r.referToSelf(p=>(w,g)=>i(g,0)?w.clone():f(w,g,p,!1)),"DenseMatrix, number | BigNumber":r.referToSelf(p=>(w,g)=>i(g,0)?w.clone():m(w,g,p,!1)),"number | BigNumber, SparseMatrix":r.referToSelf(p=>(w,g)=>i(w,0)?t(g.size(),g.storage()):c(g,w,p,!0)),"number | BigNumber, DenseMatrix":r.referToSelf(p=>(w,g)=>i(w,0)?t(g.size(),g.storage()):m(g,w,p,!0))},d,v({SS:s,DS:l,SD:u}))}),ac="and",ew=["typed","matrix","equalScalar","zeros","not","concat"],xv=q(ac,ew,e=>{var{typed:r,matrix:a,equalScalar:i,zeros:t,not:n,concat:o}=e,l=ut({typed:r,equalScalar:i}),u=gi({typed:r,equalScalar:i}),s=Dr({typed:r,equalScalar:i}),c=st({typed:r}),f=sr({typed:r,matrix:a,concat:o});return r(ac,{"number, number":Im,"Complex, Complex":function(v,d){return(v.re!==0||v.im!==0)&&(d.re!==0||d.im!==0)},"BigNumber, BigNumber":function(v,d){return!v.isZero()&&!d.isZero()&&!v.isNaN()&&!d.isNaN()},"Unit, Unit":r.referToSelf(m=>(v,d)=>m(v.value||0,d.value||0)),"SparseMatrix, any":r.referToSelf(m=>(v,d)=>n(d)?t(v.size(),v.storage()):s(v,d,m,!1)),"DenseMatrix, any":r.referToSelf(m=>(v,d)=>n(d)?t(v.size(),v.storage()):c(v,d,m,!1)),"any, SparseMatrix":r.referToSelf(m=>(v,d)=>n(v)?t(v.size(),v.storage()):s(d,v,m,!0)),"any, DenseMatrix":r.referToSelf(m=>(v,d)=>n(v)?t(v.size(),v.storage()):c(d,v,m,!0)),"Array, any":r.referToSelf(m=>(v,d)=>m(a(v),d).valueOf()),"any, Array":r.referToSelf(m=>(v,d)=>m(v,a(d)).valueOf())},f({SS:u,DS:l}))}),Wa="compare",rw=["typed","config","matrix","equalScalar","BigNumber","Fraction","DenseMatrix","concat"],tw=q(Wa,rw,e=>{var{typed:r,config:a,equalScalar:i,matrix:t,BigNumber:n,Fraction:o,DenseMatrix:l,concat:u}=e,s=Rr({typed:r}),c=hi({typed:r,equalScalar:i}),f=hr({typed:r,DenseMatrix:l}),m=sr({typed:r,matrix:t,concat:u}),v=Mn({typed:r});return r(Wa,nw({typed:r,config:a}),{"boolean, boolean":function(p,w){return p===w?0:p>w?1:-1},"BigNumber, BigNumber":function(p,w){return Kr(p,w,a.epsilon)?new n(0):new n(p.cmp(w))},"Fraction, Fraction":function(p,w){return new o(p.compare(w))},"Complex, Complex":function(){throw new TypeError("No ordering relation is defined for complex numbers")}},v,m({SS:c,DS:s,Ss:f}))}),nw=q(Wa,["typed","config"],e=>{var{typed:r,config:a}=e;return r(Wa,{"number, number":function(t,n){return Ir(t,n,a.epsilon)?0:t>n?1:-1}})}),Ri,ic;function aw(){return ic||(ic=1,Ri=function e(r,a){var i=/(^([+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?)?$|^0x[0-9a-f]+$|\d+)/gi,t=/(^[ ]*|[ ]*$)/g,n=/(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[\/\-]\d{1,4}[\/\-]\d{1,4}|^\w+, \w+ \d+, \d{4})/,o=/^0x[0-9a-f]+$/i,l=/^0/,u=function(h){return e.insensitive&&(""+h).toLowerCase()||""+h},s=u(r).replace(t,"")||"",c=u(a).replace(t,"")||"",f=s.replace(i,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),m=c.replace(i,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),v=parseInt(s.match(o),16)||f.length!==1&&s.match(n)&&Date.parse(s),d=parseInt(c.match(o),16)||v&&c.match(n)&&Date.parse(c)||null,p,w;if(d){if(vd)return 1}for(var g=0,N=Math.max(f.length,m.length);gw)return 1}return 0}),Ri}var iw=aw();const cn=ai(iw);var oc="compareNatural",ow=["typed","compare"],sw=q(oc,ow,e=>{var{typed:r,compare:a}=e,i=a.signatures["boolean,boolean"];return r(oc,{"any, any":t});function t(u,s){var c=ir(u),f=ir(s),m;if((c==="number"||c==="BigNumber"||c==="Fraction")&&(f==="number"||f==="BigNumber"||f==="Fraction"))return m=a(u,s),m.toString()!=="0"?m>0?1:-1:cn(c,f);var v=["Array","DenseMatrix","SparseMatrix"];if(v.includes(c)||v.includes(f))return m=n(t,u,s),m!==0?m:cn(c,f);if(c!==f)return cn(c,f);if(c==="Complex")return uw(u,s);if(c==="Unit")return u.equalBase(s)?t(u.value,s.value):o(t,u.formatUnits(),s.formatUnits());if(c==="boolean")return i(u,s);if(c==="string")return cn(u,s);if(c==="Object")return l(t,u,s);if(c==="null"||c==="undefined")return 0;throw new TypeError('Unsupported type of value "'+c+'"')}function n(u,s,c){return Gt(s)&&Gt(c)?o(u,s.toJSON().values,c.toJSON().values):Gt(s)?n(u,s.toArray(),c):Gt(c)?n(u,s,c.toArray()):Ia(s)?n(u,s.toJSON().data,c):Ia(c)?n(u,s,c.toJSON().data):Array.isArray(s)?Array.isArray(c)?o(u,s,c):n(u,s,[c]):n(u,[s],c)}function o(u,s,c){for(var f=0,m=Math.min(s.length,c.length);fc.length?1:s.lengthr.re?1:e.rer.im?1:e.im{var{typed:r,matrix:a,concat:i}=e,t=sr({typed:r,matrix:a,concat:i});return r(sc,Vi,t({elop:Vi,Ds:!0}))}),Ja="equal",fw=["typed","matrix","equalScalar","DenseMatrix","concat"],mw=q(Ja,fw,e=>{var{typed:r,matrix:a,equalScalar:i,DenseMatrix:t,concat:n}=e,o=Rr({typed:r}),l=vt({typed:r,DenseMatrix:t}),u=hr({typed:r,DenseMatrix:t}),s=sr({typed:r,matrix:a,concat:n});return r(Ja,vw({typed:r,equalScalar:i}),s({elop:i,SS:l,DS:o,Ss:u}))}),vw=q(Ja,["typed","equalScalar"],e=>{var{typed:r,equalScalar:a}=e;return r(Ja,{"any, any":function(t,n){return t===null?n===null:n===null?t===null:t===void 0?n===void 0:n===void 0?t===void 0:a(t,n)}})}),uc="equalText",pw=["typed","compareText","isZero"],dw=q(uc,pw,e=>{var{typed:r,compareText:a,isZero:i}=e;return r(uc,{"any, any":function(n,o){return i(a(n,o))}})}),Qa="smaller",hw=["typed","config","matrix","DenseMatrix","concat"],gw=q(Qa,hw,e=>{var{typed:r,config:a,matrix:i,DenseMatrix:t,concat:n}=e,o=Rr({typed:r}),l=vt({typed:r,DenseMatrix:t}),u=hr({typed:r,DenseMatrix:t}),s=sr({typed:r,matrix:i,concat:n}),c=Mn({typed:r});return r(Qa,yw({typed:r,config:a}),{"boolean, boolean":(f,m)=>ff.compare(m)===-1,"Complex, Complex":function(m,v){throw new TypeError("No ordering relation is defined for complex numbers")}},c,s({SS:l,DS:o,Ss:u}))}),yw=q(Qa,["typed","config"],e=>{var{typed:r,config:a}=e;return r(Qa,{"number, number":function(t,n){return t{var{typed:r,config:a,matrix:i,DenseMatrix:t,concat:n}=e,o=Rr({typed:r}),l=vt({typed:r,DenseMatrix:t}),u=hr({typed:r,DenseMatrix:t}),s=sr({typed:r,matrix:i,concat:n}),c=Mn({typed:r});return r(Ka,ww({typed:r,config:a}),{"boolean, boolean":(f,m)=>f<=m,"BigNumber, BigNumber":function(m,v){return m.lte(v)||Kr(m,v,a.epsilon)},"Fraction, Fraction":(f,m)=>f.compare(m)!==1,"Complex, Complex":function(){throw new TypeError("No ordering relation is defined for complex numbers")}},c,s({SS:l,DS:o,Ss:u}))}),ww=q(Ka,["typed","config"],e=>{var{typed:r,config:a}=e;return r(Ka,{"number, number":function(t,n){return t<=n||Ir(t,n,a.epsilon)}})}),ja="larger",Nw=["typed","config","matrix","DenseMatrix","concat"],Dw=q(ja,Nw,e=>{var{typed:r,config:a,matrix:i,DenseMatrix:t,concat:n}=e,o=Rr({typed:r}),l=vt({typed:r,DenseMatrix:t}),u=hr({typed:r,DenseMatrix:t}),s=sr({typed:r,matrix:i,concat:n}),c=Mn({typed:r});return r(ja,Aw({typed:r,config:a}),{"boolean, boolean":(f,m)=>f>m,"BigNumber, BigNumber":function(m,v){return m.gt(v)&&!Kr(m,v,a.epsilon)},"Fraction, Fraction":(f,m)=>f.compare(m)===1,"Complex, Complex":function(){throw new TypeError("No ordering relation is defined for complex numbers")}},c,s({SS:l,DS:o,Ss:u}))}),Aw=q(ja,["typed","config"],e=>{var{typed:r,config:a}=e;return r(ja,{"number, number":function(t,n){return t>n&&!Ir(t,n,a.epsilon)}})}),ei="largerEq",Ew=["typed","config","matrix","DenseMatrix","concat"],Sw=q(ei,Ew,e=>{var{typed:r,config:a,matrix:i,DenseMatrix:t,concat:n}=e,o=Rr({typed:r}),l=vt({typed:r,DenseMatrix:t}),u=hr({typed:r,DenseMatrix:t}),s=sr({typed:r,matrix:i,concat:n}),c=Mn({typed:r});return r(ei,Cw({typed:r,config:a}),{"boolean, boolean":(f,m)=>f>=m,"BigNumber, BigNumber":function(m,v){return m.gte(v)||Kr(m,v,a.epsilon)},"Fraction, Fraction":(f,m)=>f.compare(m)!==-1,"Complex, Complex":function(){throw new TypeError("No ordering relation is defined for complex numbers")}},c,s({SS:l,DS:o,Ss:u}))}),Cw=q(ei,["typed","config"],e=>{var{typed:r,config:a}=e;return r(ei,{"number, number":function(t,n){return t>=n||Ir(t,n,a.epsilon)}})}),cc="deepEqual",Mw=["typed","equal"],Fw=q(cc,Mw,e=>{var{typed:r,equal:a}=e;return r(cc,{"any, any":function(n,o){return i(n.valueOf(),o.valueOf())}});function i(t,n){if(Array.isArray(t))if(Array.isArray(n)){var o=t.length;if(o!==n.length)return!1;for(var l=0;l{var{typed:r,config:a,equalScalar:i,matrix:t,DenseMatrix:n,concat:o}=e,l=Rr({typed:r}),u=vt({typed:r,DenseMatrix:n}),s=hr({typed:r,DenseMatrix:n}),c=sr({typed:r,matrix:t,concat:o});return r(ri,Ow({typed:r,equalScalar:i}),c({elop:f,SS:u,DS:l,Ss:s}));function f(m,v){return!i(m,v)}}),Ow=q(ri,["typed","equalScalar"],e=>{var{typed:r,equalScalar:a}=e;return r(ri,{"any, any":function(t,n){return t===null?n!==null:n===null?t!==null:t===void 0?n!==void 0:n===void 0?t!==void 0:!a(t,n)}})}),lc="partitionSelect",_w=["typed","isNumeric","isNaN","compare"],$w=q(lc,_w,e=>{var{typed:r,isNumeric:a,isNaN:i,compare:t}=e,n=t,o=(s,c)=>-t(s,c);return r(lc,{"Array | Matrix, number":function(c,f){return l(c,f,n)},"Array | Matrix, number, string":function(c,f,m){if(m==="asc")return l(c,f,n);if(m==="desc")return l(c,f,o);throw new Error('Compare string must be "asc" or "desc"')},"Array | Matrix, number, function":l});function l(s,c,f){if(!Ce(c)||c<0)throw new Error("k must be a non-negative integer");if(Te(s)){var m=s.size();if(m.length>1)throw new Error("Only one dimensional matrices supported");return u(s.valueOf(),c,f)}if(Array.isArray(s))return u(s,c,f)}function u(s,c,f){if(c>=s.length)throw new Error("k out of bounds");for(var m=0;m=0){var N=s[w];s[w]=s[p],s[p]=N,--w}else++p;f(s[p],g)>0&&--p,c<=p?d=p:v=p+1}return s[c]}}),fc="sort",Iw=["typed","matrix","compare","compareNatural"],qw=q(fc,Iw,e=>{var{typed:r,matrix:a,compare:i,compareNatural:t}=e,n=i,o=(c,f)=>-i(c,f);return r(fc,{Array:function(f){return u(f),f.sort(n)},Matrix:function(f){return s(f),a(f.toArray().sort(n),f.storage())},"Array, function":function(f,m){return u(f),f.sort(m)},"Matrix, function":function(f,m){return s(f),a(f.toArray().sort(m),f.storage())},"Array, string":function(f,m){return u(f),f.sort(l(m))},"Matrix, string":function(f,m){return s(f),a(f.toArray().sort(l(m)),f.storage())}});function l(c){if(c==="asc")return n;if(c==="desc")return o;if(c==="natural")return t;throw new Error('String "asc", "desc", or "natural" expected')}function u(c){if(Pe(c).length!==1)throw new Error("One dimensional array expected")}function s(c){if(c.size().length!==1)throw new Error("One dimensional matrix expected")}}),mc="max",Rw=["typed","config","numeric","larger"],wv=q(mc,Rw,e=>{var{typed:r,config:a,numeric:i,larger:t}=e;return r(mc,{"Array | Matrix":o,"Array | Matrix, number | BigNumber":function(u,s){return pi(u,s.valueOf(),n)},"...":function(u){if(En(u))throw new TypeError("Scalar values expected in function max");return o(u)}});function n(l,u){try{return t(l,u)?l:u}catch(s){throw qr(s,"max",u)}}function o(l){var u;if(At(l,function(s){try{isNaN(s)&&typeof s=="number"?u=NaN:(u===void 0||t(s,u))&&(u=s)}catch(c){throw qr(c,"max",s)}}),u===void 0)throw new Error("Cannot calculate max of an empty array");return typeof u=="string"&&(u=i(u,a.number)),u}}),vc="min",zw=["typed","config","numeric","smaller"],Nv=q(vc,zw,e=>{var{typed:r,config:a,numeric:i,smaller:t}=e;return r(vc,{"Array | Matrix":o,"Array | Matrix, number | BigNumber":function(u,s){return pi(u,s.valueOf(),n)},"...":function(u){if(En(u))throw new TypeError("Scalar values expected in function min");return o(u)}});function n(l,u){try{return t(l,u)?l:u}catch(s){throw qr(s,"min",u)}}function o(l){var u;if(At(l,function(s){try{isNaN(s)&&typeof s=="number"?u=NaN:(u===void 0||t(s,u))&&(u=s)}catch(c){throw qr(c,"min",s)}}),u===void 0)throw new Error("Cannot calculate min of an empty array");return typeof u=="string"&&(u=i(u,a.number)),u}}),Pw="ImmutableDenseMatrix",Uw=["smaller","DenseMatrix"],Lw=q(Pw,Uw,e=>{var{smaller:r,DenseMatrix:a}=e;function i(t,n){if(!(this instanceof i))throw new SyntaxError("Constructor must be called with the new operator");if(n&&!Cr(n))throw new Error("Invalid datatype: "+n);if(Te(t)||je(t)){var o=new a(t,n);this._data=o._data,this._size=o._size,this._datatype=o._datatype,this._min=null,this._max=null}else if(t&&je(t.data)&&je(t.size))this._data=t.data,this._size=t.size,this._datatype=t.datatype,this._min=typeof t.min<"u"?t.min:null,this._max=typeof t.max<"u"?t.max:null;else{if(t)throw new TypeError("Unsupported type of data ("+ir(t)+")");this._data=[],this._size=[0],this._datatype=n,this._min=null,this._max=null}}return i.prototype=new a,i.prototype.type="ImmutableDenseMatrix",i.prototype.isImmutableDenseMatrix=!0,i.prototype.subset=function(t){switch(arguments.length){case 1:{var n=a.prototype.subset.call(this,t);return Te(n)?new i({data:n._data,size:n._size,datatype:n._datatype}):n}case 2:case 3:throw new Error("Cannot invoke set subset on an Immutable Matrix instance");default:throw new SyntaxError("Wrong number of arguments")}},i.prototype.set=function(){throw new Error("Cannot invoke set on an Immutable Matrix instance")},i.prototype.resize=function(){throw new Error("Cannot invoke resize on an Immutable Matrix instance")},i.prototype.reshape=function(){throw new Error("Cannot invoke reshape on an Immutable Matrix instance")},i.prototype.clone=function(){return new i({data:qe(this._data),size:qe(this._size),datatype:this._datatype})},i.prototype.toJSON=function(){return{mathjs:"ImmutableDenseMatrix",data:this._data,size:this._size,datatype:this._datatype}},i.fromJSON=function(t){return new i(t)},i.prototype.swapRows=function(){throw new Error("Cannot invoke swapRows on an Immutable Matrix instance")},i.prototype.min=function(){if(this._min===null){var t=null;this.forEach(function(n){(t===null||r(n,t))&&(t=n)}),this._min=t!==null?t:void 0}return this._min},i.prototype.max=function(){if(this._max===null){var t=null;this.forEach(function(n){(t===null||r(t,n))&&(t=n)}),this._max=t!==null?t:void 0}return this._max},i},{isClass:!0}),kw="Index",Hw=["ImmutableDenseMatrix","getMatrixDataType"],Gw=q(kw,Hw,e=>{var{ImmutableDenseMatrix:r,getMatrixDataType:a}=e;function i(n){if(!(this instanceof i))throw new SyntaxError("Constructor must be called with the new operator");this._dimensions=[],this._sourceSize=[],this._isScalar=!0;for(var o=0,l=arguments.length;o{a&&r.push(i)}),r}var Vw="FibonacciHeap",Zw=["smaller","larger"],Xw=q(Vw,Zw,e=>{var{smaller:r,larger:a}=e,i=1/Math.log((1+Math.sqrt(5))/2);function t(){if(!(this instanceof t))throw new SyntaxError("Constructor must be called with the new operator");this._minimum=null,this._size=0}t.prototype.type="FibonacciHeap",t.prototype.isFibonacciHeap=!0,t.prototype.insert=function(c,f){var m={key:c,value:f,degree:0};if(this._minimum){var v=this._minimum;m.left=v,m.right=v.right,v.right=m,m.right.left=m,r(c,v.key)&&(this._minimum=m)}else m.left=m,m.right=m,this._minimum=m;return this._size++,m},t.prototype.size=function(){return this._size},t.prototype.clear=function(){this._minimum=null,this._size=0},t.prototype.isEmpty=function(){return this._size===0},t.prototype.extractMinimum=function(){var c=this._minimum;if(c===null)return c;for(var f=this._minimum,m=c.degree,v=c.child;m>0;){var d=v.right;v.left.right=v.right,v.right.left=v.left,v.left=f,v.right=f.right,f.right=v,v.right.left=v,v.parent=null,v=d,m--}return c.left.right=c.right,c.right.left=c.left,c===c.right?f=null:(f=c.right,f=s(f,this._size)),this._size--,this._minimum=f,c},t.prototype.remove=function(c){this._minimum=n(this._minimum,c,-1),this.extractMinimum()};function n(c,f,m){f.key=m;var v=f.parent;return v&&r(f.key,v.key)&&(o(c,f,v),l(c,v)),r(f.key,c.key)&&(c=f),c}function o(c,f,m){f.left.right=f.right,f.right.left=f.left,m.degree--,m.child===f&&(m.child=f.right),m.degree===0&&(m.child=null),f.left=c,f.right=c.right,c.right=f,f.right.left=f,f.parent=null,f.mark=!1}function l(c,f){var m=f.parent;m&&(f.mark?(o(c,f,m),l(m)):f.mark=!0)}var u=function(f,m){f.left.right=f.right,f.right.left=f.left,f.parent=m,m.child?(f.left=m.child,f.right=m.child.right,m.child.right=f,f.right.left=f):(m.child=f,f.right=f,f.left=f),m.degree++,f.mark=!1};function s(c,f){var m=Math.floor(Math.log(f)*i)+1,v=new Array(m),d=0,p=c;if(p)for(d++,p=p.right;p!==c;)d++,p=p.right;for(var w;d>0;){for(var g=p.degree,N=p.right;w=v[g],!!w;){if(a(p.key,w.key)){var h=w;w=p,p=h}u(w,p),v[g]=null,g++}v[g]=p,p=N,d--}c=null;for(var b=0;b{var{addScalar:r,equalScalar:a,FibonacciHeap:i}=e;function t(){if(!(this instanceof t))throw new SyntaxError("Constructor must be called with the new operator");this._values=[],this._heap=new i}return t.prototype.type="Spa",t.prototype.isSpa=!0,t.prototype.set=function(n,o){if(this._values[n])this._values[n].value=o;else{var l=this._heap.insert(n,o);this._values[n]=l}},t.prototype.get=function(n){var o=this._values[n];return o?o.value:0},t.prototype.accumulate=function(n,o){var l=this._values[n];l?l.value=r(l.value,o):(l=this._heap.insert(n,o),this._values[n]=l)},t.prototype.forEach=function(n,o,l){var u=this._heap,s=this._values,c=[],f=u.extractMinimum();for(f&&c.push(f);f&&f.key<=o;)f.key>=n&&(a(f.value,0)||l(f.key,f.value,this)),f=u.extractMinimum(),f&&c.push(f);for(var m=0;m{var{on:r,config:a,addScalar:i,subtractScalar:t,multiplyScalar:n,divideScalar:o,pow:l,abs:u,fix:s,round:c,equal:f,isNumeric:m,format:v,number:d,Complex:p,BigNumber:w,Fraction:g}=e,N=d;function h(P,H){if(!(this instanceof h))throw new Error("Constructor must be called with the new operator");if(!(P==null||m(P)||wt(P)))throw new TypeError("First parameter in Unit constructor must be number, BigNumber, Fraction, Complex, or undefined");if(this.fixPrefix=!1,this.skipAutomaticSimplification=!0,H===void 0)this.units=[],this.dimensions=L.map(k=>0);else if(typeof H=="string"){var te=h.parse(H);this.units=te.units,this.dimensions=te.dimensions}else if(Wr(H)&&H.value===null)this.fixPrefix=H.fixPrefix,this.skipAutomaticSimplification=H.skipAutomaticSimplification,this.dimensions=H.dimensions.slice(0),this.units=H.units.map(k=>xr({},k));else throw new TypeError("Second parameter in Unit constructor must be a string or valueless Unit");this.value=this._normalize(P)}Object.defineProperty(h,"name",{value:"Unit"}),h.prototype.constructor=h,h.prototype.type="Unit",h.prototype.isUnit=!0;var b,x,y;function A(){for(;y===" "||y===" ";)E()}function S(P){return P>="0"&&P<="9"||P==="."}function D(P){return P>="0"&&P<="9"}function E(){x++,y=b.charAt(x)}function C(P){x=P,y=b.charAt(x)}function F(){var P="",H=x;if(y==="+"?E():y==="-"&&(P+=y,E()),!S(y))return C(H),null;if(y==="."){if(P+=y,E(),!D(y))return C(H),null}else{for(;D(y);)P+=y,E();y==="."&&(P+=y,E())}for(;D(y);)P+=y,E();if(y==="E"||y==="e"){var te="",k=x;if(te+=y,E(),(y==="+"||y==="-")&&(te+=y,E()),!D(y))return C(k),P;for(P=P+te;D(y);)P+=y,E()}return P}function _(){for(var P="";D(y)||h.isValidAlpha(y);)P+=y,E();var H=P.charAt(0);return h.isValidAlpha(H)?P:null}function I(P){return y===P?(E(),P):null}h.parse=function(P,H){if(H=H||{},b=P,x=-1,y="",typeof b!="string")throw new TypeError("Invalid argument in Unit.parse, string expected");var te=new h;te.units=[];var k=1,X=!1;E(),A();var W=F(),me=null;if(W){if(a.number==="BigNumber")me=new w(W);else if(a.number==="Fraction")try{me=new g(W)}catch{me=parseFloat(W)}else me=parseFloat(W);A(),I("*")?(k=1,X=!0):I("/")&&(k=-1,X=!0)}for(var fe=[],R=1;;){for(A();y==="(";)fe.push(k),R*=k,k=1,E(),A();var U=void 0;if(y){var J=y;if(U=_(),U===null)throw new SyntaxError('Unexpected "'+J+'" in "'+b+'" at index '+x.toString())}else break;var ne=$(U);if(ne===null)throw new SyntaxError('Unit "'+U+'" not found.');var ve=k*R;if(A(),I("^")){A();var ce=F();if(ce===null)throw new SyntaxError('In "'+P+'", "^" must be followed by a floating-point number');ve*=ce}te.units.push({unit:ne.unit,prefix:ne.prefix,power:ve});for(var he=0;he1||Math.abs(this.units[0].power-1)>1e-15},h.prototype._normalize=function(P){if(P==null||this.units.length===0)return P;for(var H=P,te=h._getNumberConverter(ir(P)),k=0;k{if(Se(z,P)){var H=z[P],te=H.prefixes[""];return{unit:H,prefix:te}}for(var k in z)if(Se(z,k)&&Ud(P,k)){var X=z[k],W=P.length-k.length,me=P.substring(0,W),fe=Se(X.prefixes,me)?X.prefixes[me]:void 0;if(fe!==void 0)return{unit:X,prefix:fe}}return null},{hasher:P=>P[0],limit:100});h.isValuelessUnit=function(P){return $(P)!==null},h.prototype.hasBase=function(P){if(typeof P=="string"&&(P=O[P]),!P)return!1;for(var H=0;H1e-12)return!1;return!0},h.prototype.equalBase=function(P){for(var H=0;H1e-12)return!1;return!0},h.prototype.equals=function(P){return this.equalBase(P)&&f(this.value,P.value)},h.prototype.multiply=function(P){for(var H=this.clone(),te=Wr(P)?P:new h(P),k=0;k1e-12&&(Se(re,fe)?H.push({unit:re[fe].unit,prefix:re[fe].prefix,power:P.dimensions[me]||0}):W=!0)}H.length1e-12)if(Se(j.si,k))H.push({unit:j.si[k].unit,prefix:j.si[k].prefix,power:P.dimensions[te]||0});else throw new Error("Cannot express custom unit "+k+" in SI units")}return P.units=H,P.fixPrefix=!0,P.skipAutomaticSimplification=!0,this.value!==null?(P.value=null,this.to(P)):P},h.prototype.formatUnits=function(){for(var P="",H="",te=0,k=0,X=0;X0?(te++,P+=" "+this.units[X].prefix.name+this.units[X].unit.name,Math.abs(this.units[X].power-1)>1e-15&&(P+="^"+this.units[X].power)):this.units[X].power<0&&k++;if(k>0)for(var W=0;W0?(H+=" "+this.units[W].prefix.name+this.units[W].unit.name,Math.abs(this.units[W].power+1)>1e-15&&(H+="^"+-this.units[W].power)):(H+=" "+this.units[W].prefix.name+this.units[W].unit.name,H+="^"+this.units[W].power));P=P.substr(1),H=H.substr(1),te>1&&k>0&&(P="("+P+")"),k>1&&te>0&&(H="("+H+")");var me=P;return te>0&&k>0&&(me+=" / "),me+=H,me},h.prototype.format=function(P){var H=this.skipAutomaticSimplification||this.value===null?this.clone():this.simplify(),te=!1;typeof H.value<"u"&&H.value!==null&&wt(H.value)&&(te=Math.abs(H.value.re)<1e-14);for(var k in H.units)Se(H.units,k)&&H.units[k].unit&&(H.units[k].unit.name==="VA"&&te?H.units[k].unit=z.VAR:H.units[k].unit.name==="VAR"&&!te&&(H.units[k].unit=z.VA));H.units.length===1&&!H.fixPrefix&&Math.abs(H.units[0].power-Math.round(H.units[0].power))<1e-14&&(H.units[0].prefix=H._bestPrefix());var X=H._denormalize(H.value),W=H.value!==null?v(X,P||{}):"",me=H.formatUnits();return H.value&&wt(H.value)&&(W="("+W+")"),me.length>0&&W.length>0&&(W+=" "),W+=me,W},h.prototype._bestPrefix=function(){if(this.units.length!==1)throw new Error("Can only compute the best prefix for single units with integer powers, like kg, s^2, N^-1, and so forth!");if(Math.abs(this.units[0].power-Math.round(this.units[0].power))>=1e-14)throw new Error("Can only compute the best prefix for single units with integer powers, like kg, s^2, N^-1, and so forth!");var P=this.value!==null?u(this.value):0,H=u(this.units[0].unit.value),te=this.units[0].prefix;if(P===0)return te;var k=this.units[0].power,X=Math.log(P/Math.pow(te.value*H,k))/Math.LN10-1.2;if(X>-2.200001&&X<1.800001)return te;X=Math.abs(X);var W=this.units[0].unit.prefixes;for(var me in W)if(Se(W,me)){var fe=W[me];if(fe.scientific){var R=Math.abs(Math.log(P/Math.pow(fe.value*H,k))/Math.LN10-1.2);(R0)},z={meter:{name:"meter",base:O.LENGTH,prefixes:B.LONG,value:1,offset:0},inch:{name:"inch",base:O.LENGTH,prefixes:B.NONE,value:.0254,offset:0},foot:{name:"foot",base:O.LENGTH,prefixes:B.NONE,value:.3048,offset:0},yard:{name:"yard",base:O.LENGTH,prefixes:B.NONE,value:.9144,offset:0},mile:{name:"mile",base:O.LENGTH,prefixes:B.NONE,value:1609.344,offset:0},link:{name:"link",base:O.LENGTH,prefixes:B.NONE,value:.201168,offset:0},rod:{name:"rod",base:O.LENGTH,prefixes:B.NONE,value:5.0292,offset:0},chain:{name:"chain",base:O.LENGTH,prefixes:B.NONE,value:20.1168,offset:0},angstrom:{name:"angstrom",base:O.LENGTH,prefixes:B.NONE,value:1e-10,offset:0},m:{name:"m",base:O.LENGTH,prefixes:B.SHORT,value:1,offset:0},in:{name:"in",base:O.LENGTH,prefixes:B.NONE,value:.0254,offset:0},ft:{name:"ft",base:O.LENGTH,prefixes:B.NONE,value:.3048,offset:0},yd:{name:"yd",base:O.LENGTH,prefixes:B.NONE,value:.9144,offset:0},mi:{name:"mi",base:O.LENGTH,prefixes:B.NONE,value:1609.344,offset:0},li:{name:"li",base:O.LENGTH,prefixes:B.NONE,value:.201168,offset:0},rd:{name:"rd",base:O.LENGTH,prefixes:B.NONE,value:5.02921,offset:0},ch:{name:"ch",base:O.LENGTH,prefixes:B.NONE,value:20.1168,offset:0},mil:{name:"mil",base:O.LENGTH,prefixes:B.NONE,value:254e-7,offset:0},m2:{name:"m2",base:O.SURFACE,prefixes:B.SQUARED,value:1,offset:0},sqin:{name:"sqin",base:O.SURFACE,prefixes:B.NONE,value:64516e-8,offset:0},sqft:{name:"sqft",base:O.SURFACE,prefixes:B.NONE,value:.09290304,offset:0},sqyd:{name:"sqyd",base:O.SURFACE,prefixes:B.NONE,value:.83612736,offset:0},sqmi:{name:"sqmi",base:O.SURFACE,prefixes:B.NONE,value:2589988110336e-6,offset:0},sqrd:{name:"sqrd",base:O.SURFACE,prefixes:B.NONE,value:25.29295,offset:0},sqch:{name:"sqch",base:O.SURFACE,prefixes:B.NONE,value:404.6873,offset:0},sqmil:{name:"sqmil",base:O.SURFACE,prefixes:B.NONE,value:64516e-14,offset:0},acre:{name:"acre",base:O.SURFACE,prefixes:B.NONE,value:4046.86,offset:0},hectare:{name:"hectare",base:O.SURFACE,prefixes:B.NONE,value:1e4,offset:0},m3:{name:"m3",base:O.VOLUME,prefixes:B.CUBIC,value:1,offset:0},L:{name:"L",base:O.VOLUME,prefixes:B.SHORT,value:.001,offset:0},l:{name:"l",base:O.VOLUME,prefixes:B.SHORT,value:.001,offset:0},litre:{name:"litre",base:O.VOLUME,prefixes:B.LONG,value:.001,offset:0},cuin:{name:"cuin",base:O.VOLUME,prefixes:B.NONE,value:16387064e-12,offset:0},cuft:{name:"cuft",base:O.VOLUME,prefixes:B.NONE,value:.028316846592,offset:0},cuyd:{name:"cuyd",base:O.VOLUME,prefixes:B.NONE,value:.764554857984,offset:0},teaspoon:{name:"teaspoon",base:O.VOLUME,prefixes:B.NONE,value:5e-6,offset:0},tablespoon:{name:"tablespoon",base:O.VOLUME,prefixes:B.NONE,value:15e-6,offset:0},drop:{name:"drop",base:O.VOLUME,prefixes:B.NONE,value:5e-8,offset:0},gtt:{name:"gtt",base:O.VOLUME,prefixes:B.NONE,value:5e-8,offset:0},minim:{name:"minim",base:O.VOLUME,prefixes:B.NONE,value:6161152e-14,offset:0},fluiddram:{name:"fluiddram",base:O.VOLUME,prefixes:B.NONE,value:36966911e-13,offset:0},fluidounce:{name:"fluidounce",base:O.VOLUME,prefixes:B.NONE,value:2957353e-11,offset:0},gill:{name:"gill",base:O.VOLUME,prefixes:B.NONE,value:.0001182941,offset:0},cc:{name:"cc",base:O.VOLUME,prefixes:B.NONE,value:1e-6,offset:0},cup:{name:"cup",base:O.VOLUME,prefixes:B.NONE,value:.0002365882,offset:0},pint:{name:"pint",base:O.VOLUME,prefixes:B.NONE,value:.0004731765,offset:0},quart:{name:"quart",base:O.VOLUME,prefixes:B.NONE,value:.0009463529,offset:0},gallon:{name:"gallon",base:O.VOLUME,prefixes:B.NONE,value:.003785412,offset:0},beerbarrel:{name:"beerbarrel",base:O.VOLUME,prefixes:B.NONE,value:.1173478,offset:0},oilbarrel:{name:"oilbarrel",base:O.VOLUME,prefixes:B.NONE,value:.1589873,offset:0},hogshead:{name:"hogshead",base:O.VOLUME,prefixes:B.NONE,value:.238481,offset:0},fldr:{name:"fldr",base:O.VOLUME,prefixes:B.NONE,value:36966911e-13,offset:0},floz:{name:"floz",base:O.VOLUME,prefixes:B.NONE,value:2957353e-11,offset:0},gi:{name:"gi",base:O.VOLUME,prefixes:B.NONE,value:.0001182941,offset:0},cp:{name:"cp",base:O.VOLUME,prefixes:B.NONE,value:.0002365882,offset:0},pt:{name:"pt",base:O.VOLUME,prefixes:B.NONE,value:.0004731765,offset:0},qt:{name:"qt",base:O.VOLUME,prefixes:B.NONE,value:.0009463529,offset:0},gal:{name:"gal",base:O.VOLUME,prefixes:B.NONE,value:.003785412,offset:0},bbl:{name:"bbl",base:O.VOLUME,prefixes:B.NONE,value:.1173478,offset:0},obl:{name:"obl",base:O.VOLUME,prefixes:B.NONE,value:.1589873,offset:0},g:{name:"g",base:O.MASS,prefixes:B.SHORT,value:.001,offset:0},gram:{name:"gram",base:O.MASS,prefixes:B.LONG,value:.001,offset:0},ton:{name:"ton",base:O.MASS,prefixes:B.SHORT,value:907.18474,offset:0},t:{name:"t",base:O.MASS,prefixes:B.SHORT,value:1e3,offset:0},tonne:{name:"tonne",base:O.MASS,prefixes:B.LONG,value:1e3,offset:0},grain:{name:"grain",base:O.MASS,prefixes:B.NONE,value:6479891e-11,offset:0},dram:{name:"dram",base:O.MASS,prefixes:B.NONE,value:.0017718451953125,offset:0},ounce:{name:"ounce",base:O.MASS,prefixes:B.NONE,value:.028349523125,offset:0},poundmass:{name:"poundmass",base:O.MASS,prefixes:B.NONE,value:.45359237,offset:0},hundredweight:{name:"hundredweight",base:O.MASS,prefixes:B.NONE,value:45.359237,offset:0},stick:{name:"stick",base:O.MASS,prefixes:B.NONE,value:.115,offset:0},stone:{name:"stone",base:O.MASS,prefixes:B.NONE,value:6.35029318,offset:0},gr:{name:"gr",base:O.MASS,prefixes:B.NONE,value:6479891e-11,offset:0},dr:{name:"dr",base:O.MASS,prefixes:B.NONE,value:.0017718451953125,offset:0},oz:{name:"oz",base:O.MASS,prefixes:B.NONE,value:.028349523125,offset:0},lbm:{name:"lbm",base:O.MASS,prefixes:B.NONE,value:.45359237,offset:0},cwt:{name:"cwt",base:O.MASS,prefixes:B.NONE,value:45.359237,offset:0},s:{name:"s",base:O.TIME,prefixes:B.SHORT,value:1,offset:0},min:{name:"min",base:O.TIME,prefixes:B.NONE,value:60,offset:0},h:{name:"h",base:O.TIME,prefixes:B.NONE,value:3600,offset:0},second:{name:"second",base:O.TIME,prefixes:B.LONG,value:1,offset:0},sec:{name:"sec",base:O.TIME,prefixes:B.LONG,value:1,offset:0},minute:{name:"minute",base:O.TIME,prefixes:B.NONE,value:60,offset:0},hour:{name:"hour",base:O.TIME,prefixes:B.NONE,value:3600,offset:0},day:{name:"day",base:O.TIME,prefixes:B.NONE,value:86400,offset:0},week:{name:"week",base:O.TIME,prefixes:B.NONE,value:7*86400,offset:0},month:{name:"month",base:O.TIME,prefixes:B.NONE,value:2629800,offset:0},year:{name:"year",base:O.TIME,prefixes:B.NONE,value:31557600,offset:0},decade:{name:"decade",base:O.TIME,prefixes:B.NONE,value:315576e3,offset:0},century:{name:"century",base:O.TIME,prefixes:B.NONE,value:315576e4,offset:0},millennium:{name:"millennium",base:O.TIME,prefixes:B.NONE,value:315576e5,offset:0},hertz:{name:"Hertz",base:O.FREQUENCY,prefixes:B.LONG,value:1,offset:0,reciprocal:!0},Hz:{name:"Hz",base:O.FREQUENCY,prefixes:B.SHORT,value:1,offset:0,reciprocal:!0},rad:{name:"rad",base:O.ANGLE,prefixes:B.SHORT,value:1,offset:0},radian:{name:"radian",base:O.ANGLE,prefixes:B.LONG,value:1,offset:0},deg:{name:"deg",base:O.ANGLE,prefixes:B.SHORT,value:null,offset:0},degree:{name:"degree",base:O.ANGLE,prefixes:B.LONG,value:null,offset:0},grad:{name:"grad",base:O.ANGLE,prefixes:B.SHORT,value:null,offset:0},gradian:{name:"gradian",base:O.ANGLE,prefixes:B.LONG,value:null,offset:0},cycle:{name:"cycle",base:O.ANGLE,prefixes:B.NONE,value:null,offset:0},arcsec:{name:"arcsec",base:O.ANGLE,prefixes:B.NONE,value:null,offset:0},arcmin:{name:"arcmin",base:O.ANGLE,prefixes:B.NONE,value:null,offset:0},A:{name:"A",base:O.CURRENT,prefixes:B.SHORT,value:1,offset:0},ampere:{name:"ampere",base:O.CURRENT,prefixes:B.LONG,value:1,offset:0},K:{name:"K",base:O.TEMPERATURE,prefixes:B.SHORT,value:1,offset:0},degC:{name:"degC",base:O.TEMPERATURE,prefixes:B.SHORT,value:1,offset:273.15},degF:{name:"degF",base:O.TEMPERATURE,prefixes:B.SHORT,value:new g(5,9),offset:459.67},degR:{name:"degR",base:O.TEMPERATURE,prefixes:B.SHORT,value:new g(5,9),offset:0},kelvin:{name:"kelvin",base:O.TEMPERATURE,prefixes:B.LONG,value:1,offset:0},celsius:{name:"celsius",base:O.TEMPERATURE,prefixes:B.LONG,value:1,offset:273.15},fahrenheit:{name:"fahrenheit",base:O.TEMPERATURE,prefixes:B.LONG,value:new g(5,9),offset:459.67},rankine:{name:"rankine",base:O.TEMPERATURE,prefixes:B.LONG,value:new g(5,9),offset:0},mol:{name:"mol",base:O.AMOUNT_OF_SUBSTANCE,prefixes:B.SHORT,value:1,offset:0},mole:{name:"mole",base:O.AMOUNT_OF_SUBSTANCE,prefixes:B.LONG,value:1,offset:0},cd:{name:"cd",base:O.LUMINOUS_INTENSITY,prefixes:B.SHORT,value:1,offset:0},candela:{name:"candela",base:O.LUMINOUS_INTENSITY,prefixes:B.LONG,value:1,offset:0},N:{name:"N",base:O.FORCE,prefixes:B.SHORT,value:1,offset:0},newton:{name:"newton",base:O.FORCE,prefixes:B.LONG,value:1,offset:0},dyn:{name:"dyn",base:O.FORCE,prefixes:B.SHORT,value:1e-5,offset:0},dyne:{name:"dyne",base:O.FORCE,prefixes:B.LONG,value:1e-5,offset:0},lbf:{name:"lbf",base:O.FORCE,prefixes:B.NONE,value:4.4482216152605,offset:0},poundforce:{name:"poundforce",base:O.FORCE,prefixes:B.NONE,value:4.4482216152605,offset:0},kip:{name:"kip",base:O.FORCE,prefixes:B.LONG,value:4448.2216,offset:0},kilogramforce:{name:"kilogramforce",base:O.FORCE,prefixes:B.NONE,value:9.80665,offset:0},J:{name:"J",base:O.ENERGY,prefixes:B.SHORT,value:1,offset:0},joule:{name:"joule",base:O.ENERGY,prefixes:B.LONG,value:1,offset:0},erg:{name:"erg",base:O.ENERGY,prefixes:B.SHORTLONG,value:1e-7,offset:0},Wh:{name:"Wh",base:O.ENERGY,prefixes:B.SHORT,value:3600,offset:0},BTU:{name:"BTU",base:O.ENERGY,prefixes:B.BTU,value:1055.05585262,offset:0},eV:{name:"eV",base:O.ENERGY,prefixes:B.SHORT,value:1602176565e-28,offset:0},electronvolt:{name:"electronvolt",base:O.ENERGY,prefixes:B.LONG,value:1602176565e-28,offset:0},W:{name:"W",base:O.POWER,prefixes:B.SHORT,value:1,offset:0},watt:{name:"watt",base:O.POWER,prefixes:B.LONG,value:1,offset:0},hp:{name:"hp",base:O.POWER,prefixes:B.NONE,value:745.6998715386,offset:0},VAR:{name:"VAR",base:O.POWER,prefixes:B.SHORT,value:p.I,offset:0},VA:{name:"VA",base:O.POWER,prefixes:B.SHORT,value:1,offset:0},Pa:{name:"Pa",base:O.PRESSURE,prefixes:B.SHORT,value:1,offset:0},psi:{name:"psi",base:O.PRESSURE,prefixes:B.NONE,value:6894.75729276459,offset:0},atm:{name:"atm",base:O.PRESSURE,prefixes:B.NONE,value:101325,offset:0},bar:{name:"bar",base:O.PRESSURE,prefixes:B.SHORTLONG,value:1e5,offset:0},torr:{name:"torr",base:O.PRESSURE,prefixes:B.NONE,value:133.322,offset:0},mmHg:{name:"mmHg",base:O.PRESSURE,prefixes:B.NONE,value:133.322,offset:0},mmH2O:{name:"mmH2O",base:O.PRESSURE,prefixes:B.NONE,value:9.80665,offset:0},cmH2O:{name:"cmH2O",base:O.PRESSURE,prefixes:B.NONE,value:98.0665,offset:0},coulomb:{name:"coulomb",base:O.ELECTRIC_CHARGE,prefixes:B.LONG,value:1,offset:0},C:{name:"C",base:O.ELECTRIC_CHARGE,prefixes:B.SHORT,value:1,offset:0},farad:{name:"farad",base:O.ELECTRIC_CAPACITANCE,prefixes:B.LONG,value:1,offset:0},F:{name:"F",base:O.ELECTRIC_CAPACITANCE,prefixes:B.SHORT,value:1,offset:0},volt:{name:"volt",base:O.ELECTRIC_POTENTIAL,prefixes:B.LONG,value:1,offset:0},V:{name:"V",base:O.ELECTRIC_POTENTIAL,prefixes:B.SHORT,value:1,offset:0},ohm:{name:"ohm",base:O.ELECTRIC_RESISTANCE,prefixes:B.SHORTLONG,value:1,offset:0},henry:{name:"henry",base:O.ELECTRIC_INDUCTANCE,prefixes:B.LONG,value:1,offset:0},H:{name:"H",base:O.ELECTRIC_INDUCTANCE,prefixes:B.SHORT,value:1,offset:0},siemens:{name:"siemens",base:O.ELECTRIC_CONDUCTANCE,prefixes:B.LONG,value:1,offset:0},S:{name:"S",base:O.ELECTRIC_CONDUCTANCE,prefixes:B.SHORT,value:1,offset:0},weber:{name:"weber",base:O.MAGNETIC_FLUX,prefixes:B.LONG,value:1,offset:0},Wb:{name:"Wb",base:O.MAGNETIC_FLUX,prefixes:B.SHORT,value:1,offset:0},tesla:{name:"tesla",base:O.MAGNETIC_FLUX_DENSITY,prefixes:B.LONG,value:1,offset:0},T:{name:"T",base:O.MAGNETIC_FLUX_DENSITY,prefixes:B.SHORT,value:1,offset:0},b:{name:"b",base:O.BIT,prefixes:B.BINARY_SHORT,value:1,offset:0},bits:{name:"bits",base:O.BIT,prefixes:B.BINARY_LONG,value:1,offset:0},B:{name:"B",base:O.BIT,prefixes:B.BINARY_SHORT,value:8,offset:0},bytes:{name:"bytes",base:O.BIT,prefixes:B.BINARY_LONG,value:8,offset:0}},Q={meters:"meter",inches:"inch",feet:"foot",yards:"yard",miles:"mile",links:"link",rods:"rod",chains:"chain",angstroms:"angstrom",lt:"l",litres:"litre",liter:"litre",liters:"litre",teaspoons:"teaspoon",tablespoons:"tablespoon",minims:"minim",fluiddrams:"fluiddram",fluidounces:"fluidounce",gills:"gill",cups:"cup",pints:"pint",quarts:"quart",gallons:"gallon",beerbarrels:"beerbarrel",oilbarrels:"oilbarrel",hogsheads:"hogshead",gtts:"gtt",grams:"gram",tons:"ton",tonnes:"tonne",grains:"grain",drams:"dram",ounces:"ounce",poundmasses:"poundmass",hundredweights:"hundredweight",sticks:"stick",lb:"lbm",lbs:"lbm",kips:"kip",kgf:"kilogramforce",acres:"acre",hectares:"hectare",sqfeet:"sqft",sqyard:"sqyd",sqmile:"sqmi",sqmiles:"sqmi",mmhg:"mmHg",mmh2o:"mmH2O",cmh2o:"cmH2O",seconds:"second",secs:"second",minutes:"minute",mins:"minute",hours:"hour",hr:"hour",hrs:"hour",days:"day",weeks:"week",months:"month",years:"year",decades:"decade",centuries:"century",millennia:"millennium",hertz:"hertz",radians:"radian",degrees:"degree",gradians:"gradian",cycles:"cycle",arcsecond:"arcsec",arcseconds:"arcsec",arcminute:"arcmin",arcminutes:"arcmin",BTUs:"BTU",watts:"watt",joules:"joule",amperes:"ampere",amps:"ampere",amp:"ampere",coulombs:"coulomb",volts:"volt",ohms:"ohm",farads:"farad",webers:"weber",teslas:"tesla",electronvolts:"electronvolt",moles:"mole",bit:"bits",byte:"bytes"};function le(P){if(P.number==="BigNumber"){var H=yo(w);z.rad.value=new w(1),z.deg.value=H.div(180),z.grad.value=H.div(200),z.cycle.value=H.times(2),z.arcsec.value=H.div(648e3),z.arcmin.value=H.div(10800)}else z.rad.value=1,z.deg.value=Math.PI/180,z.grad.value=Math.PI/200,z.cycle.value=Math.PI*2,z.arcsec.value=Math.PI/648e3,z.arcmin.value=Math.PI/10800;z.radian.value=z.rad.value,z.degree.value=z.deg.value,z.gradian.value=z.grad.value}le(a),r&&r("config",function(P,H){P.number!==H.number&&le(P)});var j={si:{NONE:{unit:V,prefix:B.NONE[""]},LENGTH:{unit:z.m,prefix:B.SHORT[""]},MASS:{unit:z.g,prefix:B.SHORT.k},TIME:{unit:z.s,prefix:B.SHORT[""]},CURRENT:{unit:z.A,prefix:B.SHORT[""]},TEMPERATURE:{unit:z.K,prefix:B.SHORT[""]},LUMINOUS_INTENSITY:{unit:z.cd,prefix:B.SHORT[""]},AMOUNT_OF_SUBSTANCE:{unit:z.mol,prefix:B.SHORT[""]},ANGLE:{unit:z.rad,prefix:B.SHORT[""]},BIT:{unit:z.bits,prefix:B.SHORT[""]},FORCE:{unit:z.N,prefix:B.SHORT[""]},ENERGY:{unit:z.J,prefix:B.SHORT[""]},POWER:{unit:z.W,prefix:B.SHORT[""]},PRESSURE:{unit:z.Pa,prefix:B.SHORT[""]},ELECTRIC_CHARGE:{unit:z.C,prefix:B.SHORT[""]},ELECTRIC_CAPACITANCE:{unit:z.F,prefix:B.SHORT[""]},ELECTRIC_POTENTIAL:{unit:z.V,prefix:B.SHORT[""]},ELECTRIC_RESISTANCE:{unit:z.ohm,prefix:B.SHORT[""]},ELECTRIC_INDUCTANCE:{unit:z.H,prefix:B.SHORT[""]},ELECTRIC_CONDUCTANCE:{unit:z.S,prefix:B.SHORT[""]},MAGNETIC_FLUX:{unit:z.Wb,prefix:B.SHORT[""]},MAGNETIC_FLUX_DENSITY:{unit:z.T,prefix:B.SHORT[""]},FREQUENCY:{unit:z.Hz,prefix:B.SHORT[""]}}};j.cgs=JSON.parse(JSON.stringify(j.si)),j.cgs.LENGTH={unit:z.m,prefix:B.SHORT.c},j.cgs.MASS={unit:z.g,prefix:B.SHORT[""]},j.cgs.FORCE={unit:z.dyn,prefix:B.SHORT[""]},j.cgs.ENERGY={unit:z.erg,prefix:B.NONE[""]},j.us=JSON.parse(JSON.stringify(j.si)),j.us.LENGTH={unit:z.ft,prefix:B.NONE[""]},j.us.MASS={unit:z.lbm,prefix:B.NONE[""]},j.us.TEMPERATURE={unit:z.degF,prefix:B.NONE[""]},j.us.FORCE={unit:z.lbf,prefix:B.NONE[""]},j.us.ENERGY={unit:z.BTU,prefix:B.BTU[""]},j.us.POWER={unit:z.hp,prefix:B.NONE[""]},j.us.PRESSURE={unit:z.psi,prefix:B.NONE[""]},j.auto=JSON.parse(JSON.stringify(j.si));var re=j.auto;h.setUnitSystem=function(P){if(Se(j,P))re=j[P];else throw new Error("Unit system "+P+" does not exist. Choices are: "+Object.keys(j).join(", "))},h.getUnitSystem=function(){for(var P in j)if(Se(j,P)&&j[P]===re)return P},h.typeConverters={BigNumber:function(H){return H!=null&&H.isFraction?new w(H.n).div(H.d).times(H.s):new w(H+"")},Fraction:function(H){return new g(H)},Complex:function(H){return H},number:function(H){return H!=null&&H.isFraction?d(H):H}},h.prototype._numberConverter=function(){var P=h.typeConverters[this.valueType()];if(P)return P;throw new TypeError('Unsupported Unit value type "'+this.valueType()+'"')},h._getNumberConverter=function(P){if(!h.typeConverters[P])throw new TypeError('Unsupported type "'+P+'"');return h.typeConverters[P]};for(var oe in z)if(Se(z,oe)){var ee=z[oe];ee.dimensions=ee.base.dimensions}for(var ae in Q)if(Se(Q,ae)){var se=z[Q[ae]],pe={};for(var Ne in se)Se(se,Ne)&&(pe[Ne]=se[Ne]);pe.name=ae,z[ae]=pe}h.isValidAlpha=function(H){return/^[a-zA-Z]$/.test(H)};function Ee(P){for(var H=0;H0&&!(h.isValidAlpha(y)||D(y)))throw new Error('Invalid unit name (only alphanumeric characters are allowed): "'+P+'"')}}return h.createUnit=function(P,H){if(typeof P!="object")throw new TypeError("createUnit expects first parameter to be of type 'Object'");if(H&&H.override){for(var te in P)if(Se(P,te)&&h.deleteUnit(te),P[te].aliases)for(var k=0;k"u"||H===null)&&(H={}),typeof P!="string")throw new TypeError("createUnitSingle expects first parameter to be of type 'string'");if(Se(z,P))throw new Error('Cannot create unit "'+P+'": a unit with that name already exists');Ee(P);var te=null,k=[],X=0,W,me,fe;if(H&&H.type==="Unit")te=H.clone();else if(typeof H=="string")H!==""&&(W=H);else if(typeof H=="object")W=H.definition,me=H.prefixes,X=H.offset,fe=H.baseName,H.aliases&&(k=H.aliases.valueOf());else throw new TypeError('Cannot create unit "'+P+'" from "'+H.toString()+'": expecting "string" or "Unit" or "Object"');if(k){for(var R=0;R1e-12){be=!1;break}if(be){ce=!0,U.base=O[he];break}}if(!ce){fe=fe||P+"_STUFF";var ge={dimensions:te.dimensions.slice(0)};ge.key=fe,O[fe]=ge,re[fe]={unit:U,prefix:B.NONE[""]},U.base=O[fe]}}else{if(fe=fe||P+"_STUFF",L.indexOf(fe)>=0)throw new Error('Cannot create new base unit "'+P+'": a base unit with that name already exists (and cannot be overridden)');L.push(fe);for(var J in O)Se(O,J)&&(O[J].dimensions[L.length-1]=0);for(var ne={dimensions:[]},ve=0;ve{var{typed:r,Unit:a}=e;return r(hc,{Unit:function(t){return t.clone()},string:function(t){return a.isValuelessUnit(t)?new a(null,t):a.parse(t,{allowNoUnits:!0})},"number | BigNumber | Fraction | Complex, string | Unit":function(t,n){return new a(t,n)},"number | BigNumber | Fraction":function(t){return new a(t)},"Array | Matrix":r.referToSelf(i=>t=>Ze(t,i))})}),gc="sparse",iN=["typed","SparseMatrix"],oN=q(gc,iN,e=>{var{typed:r,SparseMatrix:a}=e;return r(gc,{"":function(){return new a([])},string:function(t){return new a([],t)},"Array | Matrix":function(t){return new a(t)},"Array | Matrix, string":function(t,n){return new a(t,n)}})}),yc="createUnit",sN=["typed","Unit"],uN=q(yc,sN,e=>{var{typed:r,Unit:a}=e;return r(yc,{"Object, Object":function(t,n){return a.createUnit(t,n)},Object:function(t){return a.createUnit(t,{})},"string, Unit | string | Object, Object":function(t,n,o){var l={};return l[t]=n,a.createUnit(l,o)},"string, Unit | string | Object":function(t,n){var o={};return o[t]=n,a.createUnit(o,{})},string:function(t){var n={};return n[t]={},a.createUnit(n,{})}})}),bc="acos",cN=["typed","config","Complex"],lN=q(bc,cN,e=>{var{typed:r,config:a,Complex:i}=e;return r(bc,{number:function(n){return n>=-1&&n<=1||a.predictable?Math.acos(n):new i(n,0).acos()},Complex:function(n){return n.acos()},BigNumber:function(n){return n.acos()}})}),xc="acosh",fN=["typed","config","Complex"],mN=q(xc,fN,e=>{var{typed:r,config:a,Complex:i}=e;return r(xc,{number:function(n){return n>=1||a.predictable?zm(n):n<=-1?new i(Math.log(Math.sqrt(n*n-1)-n),Math.PI):new i(n,0).acosh()},Complex:function(n){return n.acosh()},BigNumber:function(n){return n.acosh()}})}),wc="acot",vN=["typed","BigNumber"],pN=q(wc,vN,e=>{var{typed:r,BigNumber:a}=e;return r(wc,{number:Pm,Complex:function(t){return t.acot()},BigNumber:function(t){return new a(1).div(t).atan()}})}),Nc="acoth",dN=["typed","config","Complex","BigNumber"],hN=q(Nc,dN,e=>{var{typed:r,config:a,Complex:i,BigNumber:t}=e;return r(Nc,{number:function(o){return o>=1||o<=-1||a.predictable?Um(o):new i(o,0).acoth()},Complex:function(o){return o.acoth()},BigNumber:function(o){return new t(1).div(o).atanh()}})}),Dc="acsc",gN=["typed","config","Complex","BigNumber"],yN=q(Dc,gN,e=>{var{typed:r,config:a,Complex:i,BigNumber:t}=e;return r(Dc,{number:function(o){return o<=-1||o>=1||a.predictable?Lm(o):new i(o,0).acsc()},Complex:function(o){return o.acsc()},BigNumber:function(o){return new t(1).div(o).asin()}})}),Ac="acsch",bN=["typed","BigNumber"],xN=q(Ac,bN,e=>{var{typed:r,BigNumber:a}=e;return r(Ac,{number:km,Complex:function(t){return t.acsch()},BigNumber:function(t){return new a(1).div(t).asinh()}})}),Ec="asec",wN=["typed","config","Complex","BigNumber"],NN=q(Ec,wN,e=>{var{typed:r,config:a,Complex:i,BigNumber:t}=e;return r(Ec,{number:function(o){return o<=-1||o>=1||a.predictable?Hm(o):new i(o,0).asec()},Complex:function(o){return o.asec()},BigNumber:function(o){return new t(1).div(o).acos()}})}),Sc="asech",DN=["typed","config","Complex","BigNumber"],AN=q(Sc,DN,e=>{var{typed:r,config:a,Complex:i,BigNumber:t}=e;return r(Sc,{number:function(o){if(o<=1&&o>=-1||a.predictable){var l=1/o;if(l>0||a.predictable)return Gm(o);var u=Math.sqrt(l*l-1);return new i(Math.log(u-l),Math.PI)}return new i(o,0).asech()},Complex:function(o){return o.asech()},BigNumber:function(o){return new t(1).div(o).acosh()}})}),Cc="asin",EN=["typed","config","Complex"],SN=q(Cc,EN,e=>{var{typed:r,config:a,Complex:i}=e;return r(Cc,{number:function(n){return n>=-1&&n<=1||a.predictable?Math.asin(n):new i(n,0).asin()},Complex:function(n){return n.asin()},BigNumber:function(n){return n.asin()}})}),CN="asinh",MN=["typed"],FN=q(CN,MN,e=>{var{typed:r}=e;return r("asinh",{number:Vm,Complex:function(i){return i.asinh()},BigNumber:function(i){return i.asinh()}})}),BN="atan",TN=["typed"],ON=q(BN,TN,e=>{var{typed:r}=e;return r("atan",{number:function(i){return Math.atan(i)},Complex:function(i){return i.atan()},BigNumber:function(i){return i.atan()}})}),Mc="atan2",_N=["typed","matrix","equalScalar","BigNumber","DenseMatrix","concat"],$N=q(Mc,_N,e=>{var{typed:r,matrix:a,equalScalar:i,BigNumber:t,DenseMatrix:n,concat:o}=e,l=ut({typed:r,equalScalar:i}),u=Rr({typed:r}),s=ov({typed:r,equalScalar:i}),c=Dr({typed:r,equalScalar:i}),f=hr({typed:r,DenseMatrix:n}),m=sr({typed:r,matrix:a,concat:o});return r(Mc,{"number, number":Math.atan2,"BigNumber, BigNumber":(v,d)=>t.atan2(v,d)},m({scalar:"number | BigNumber",SS:s,DS:u,SD:l,Ss:c,sS:f}))}),Fc="atanh",IN=["typed","config","Complex"],qN=q(Fc,IN,e=>{var{typed:r,config:a,Complex:i}=e;return r(Fc,{number:function(n){return n<=1&&n>=-1||a.predictable?Zm(n):new i(n,0).atanh()},Complex:function(n){return n.atanh()},BigNumber:function(n){return n.atanh()}})}),Bn=q("trigUnit",["typed"],e=>{var{typed:r}=e;return{Unit:r.referToSelf(a=>i=>{if(!i.hasBase(i.constructor.BASE_UNITS.ANGLE))throw new TypeError("Unit in function cot is no angle");return r.find(a,i.valueType())(i.value)})}}),Bc="cos",RN=["typed"],zN=q(Bc,RN,e=>{var{typed:r}=e,a=Bn({typed:r});return r(Bc,{number:Math.cos,"Complex | BigNumber":i=>i.cos()},a)}),Tc="cosh",PN=["typed"],UN=q(Tc,PN,e=>{var{typed:r}=e;return r(Tc,{number:_d,"Complex | BigNumber":a=>a.cosh()})}),Oc="cot",LN=["typed","BigNumber"],kN=q(Oc,LN,e=>{var{typed:r,BigNumber:a}=e,i=Bn({typed:r});return r(Oc,{number:Xm,Complex:t=>t.cot(),BigNumber:t=>new a(1).div(t.tan())},i)}),_c="coth",HN=["typed","BigNumber"],GN=q(_c,HN,e=>{var{typed:r,BigNumber:a}=e;return r(_c,{number:Ym,Complex:i=>i.coth(),BigNumber:i=>new a(1).div(i.tanh())})}),$c="csc",VN=["typed","BigNumber"],ZN=q($c,VN,e=>{var{typed:r,BigNumber:a}=e,i=Bn({typed:r});return r($c,{number:Wm,Complex:t=>t.csc(),BigNumber:t=>new a(1).div(t.sin())},i)}),Ic="csch",XN=["typed","BigNumber"],YN=q(Ic,XN,e=>{var{typed:r,BigNumber:a}=e;return r(Ic,{number:Jm,Complex:i=>i.csch(),BigNumber:i=>new a(1).div(i.sinh())})}),qc="sec",WN=["typed","BigNumber"],JN=q(qc,WN,e=>{var{typed:r,BigNumber:a}=e,i=Bn({typed:r});return r(qc,{number:Qm,Complex:t=>t.sec(),BigNumber:t=>new a(1).div(t.cos())},i)}),Rc="sech",QN=["typed","BigNumber"],KN=q(Rc,QN,e=>{var{typed:r,BigNumber:a}=e;return r(Rc,{number:Km,Complex:i=>i.sech(),BigNumber:i=>new a(1).div(i.cosh())})}),zc="sin",jN=["typed"],e2=q(zc,jN,e=>{var{typed:r}=e,a=Bn({typed:r});return r(zc,{number:Math.sin,"Complex | BigNumber":i=>i.sin()},a)}),Pc="sinh",r2=["typed"],t2=q(Pc,r2,e=>{var{typed:r}=e;return r(Pc,{number:jm,"Complex | BigNumber":a=>a.sinh()})}),Uc="tan",n2=["typed"],a2=q(Uc,n2,e=>{var{typed:r}=e,a=Bn({typed:r});return r(Uc,{number:Math.tan,"Complex | BigNumber":i=>i.tan()},a)}),i2="tanh",o2=["typed"],s2=q(i2,o2,e=>{var{typed:r}=e;return r("tanh",{number:Id,"Complex | BigNumber":a=>a.tanh()})}),Lc="setCartesian",u2=["typed","size","subset","compareNatural","Index","DenseMatrix"],c2=q(Lc,u2,e=>{var{typed:r,size:a,subset:i,compareNatural:t,Index:n,DenseMatrix:o}=e;return r(Lc,{"Array | Matrix, Array | Matrix":function(u,s){var c=[];if(i(a(u),new n(0))!==0&&i(a(s),new n(0))!==0){var f=Ke(Array.isArray(u)?u:u.toArray()).sort(t),m=Ke(Array.isArray(s)?s:s.toArray()).sort(t);c=[];for(var v=0;v{var{typed:r,size:a,subset:i,compareNatural:t,Index:n,DenseMatrix:o}=e;return r(kc,{"Array | Matrix, Array | Matrix":function(u,s){var c;if(i(a(u),new n(0))===0)c=[];else{if(i(a(s),new n(0))===0)return Ke(u.toArray());var f=yn(Ke(Array.isArray(u)?u:u.toArray()).sort(t)),m=yn(Ke(Array.isArray(s)?s:s.toArray()).sort(t));c=[];for(var v,d=0;d{var{typed:r,size:a,subset:i,compareNatural:t,Index:n,DenseMatrix:o}=e;return r(Hc,{"Array | Matrix":function(u){var s;if(i(a(u),new n(0))===0)s=[];else{var c=Ke(Array.isArray(u)?u:u.toArray()).sort(t);s=[],s.push(c[0]);for(var f=1;f{var{typed:r,size:a,subset:i,compareNatural:t,Index:n,DenseMatrix:o}=e;return r(Gc,{"Array | Matrix, Array | Matrix":function(u,s){var c;if(i(a(u),new n(0))===0||i(a(s),new n(0))===0)c=[];else{var f=yn(Ke(Array.isArray(u)?u:u.toArray()).sort(t)),m=yn(Ke(Array.isArray(s)?s:s.toArray()).sort(t));c=[];for(var v=0;v{var{typed:r,size:a,subset:i,compareNatural:t,Index:n}=e;return r(Vc,{"Array | Matrix, Array | Matrix":function(l,u){if(i(a(l),new n(0))===0)return!0;if(i(a(u),new n(0))===0)return!1;for(var s=yn(Ke(Array.isArray(l)?l:l.toArray()).sort(t)),c=yn(Ke(Array.isArray(u)?u:u.toArray()).sort(t)),f,m=0;m{var{typed:r,size:a,subset:i,compareNatural:t,Index:n}=e;return r(Zc,{"number | BigNumber | Fraction | Complex, Array | Matrix":function(l,u){if(i(a(u),new n(0))===0)return 0;for(var s=Ke(Array.isArray(u)?u:u.toArray()),c=0,f=0;f{var{typed:r,size:a,subset:i,compareNatural:t,Index:n}=e;return r(Xc,{"Array | Matrix":function(s){if(i(a(s),new n(0))===0)return[];for(var c=Ke(Array.isArray(s)?s:s.toArray()).sort(t),f=[],m=0;m.toString(2).length<=c.length;)f.push(o(c,m.toString(2).split("").reverse())),m++;return l(f)}});function o(u,s){for(var c=[],f=0;f0;c--)for(var f=0;fu[f+1].length&&(s=u[f],u[f]=u[f+1],u[f+1]=s);return u}}),Yc="setSize",N2=["typed","compareNatural"],D2=q(Yc,N2,e=>{var{typed:r,compareNatural:a}=e;return r(Yc,{"Array | Matrix":function(t){return Array.isArray(t)?Ke(t).length:Ke(t.toArray()).length},"Array | Matrix, boolean":function(t,n){if(n===!1||t.length===0)return Array.isArray(t)?Ke(t).length:Ke(t.toArray()).length;for(var o=Ke(Array.isArray(t)?t:t.toArray()).sort(a),l=1,u=1;u{var{typed:r,size:a,concat:i,subset:t,setDifference:n,Index:o}=e;return r(Wc,{"Array | Matrix, Array | Matrix":function(u,s){if(t(a(u),new o(0))===0)return Ke(s);if(t(a(s),new o(0))===0)return Ke(u);var c=Ke(u),f=Ke(s);return i(n(c,f),n(f,c))}})}),Jc="setUnion",S2=["typed","size","concat","subset","setIntersect","setSymDifference","Index"],C2=q(Jc,S2,e=>{var{typed:r,size:a,concat:i,subset:t,setIntersect:n,setSymDifference:o,Index:l}=e;return r(Jc,{"Array | Matrix, Array | Matrix":function(s,c){if(t(a(s),new l(0))===0)return Ke(c);if(t(a(c),new l(0))===0)return Ke(s);var f=Ke(s),m=Ke(c);return i(o(f,m),n(f,m))}})}),Qc="add",M2=["typed","matrix","addScalar","equalScalar","DenseMatrix","SparseMatrix","concat"],F2=q(Qc,M2,e=>{var{typed:r,matrix:a,addScalar:i,equalScalar:t,DenseMatrix:n,SparseMatrix:o,concat:l}=e,u=qt({typed:r}),s=mo({typed:r,equalScalar:t}),c=Yt({typed:r,DenseMatrix:n}),f=sr({typed:r,matrix:a,concat:l});return r(Qc,{"any, any":i,"any, any, ...any":r.referToSelf(m=>(v,d,p)=>{for(var w=m(v,d),g=0;g{var{typed:r,abs:a,addScalar:i,divideScalar:t,multiplyScalar:n,sqrt:o,smaller:l,isPositive:u}=e;return r(Kc,{"... number | BigNumber":s,Array:s,Matrix:c=>s(Ke(c.toArray()))});function s(c){for(var f=0,m=0,v=0;v{var{typed:r,abs:a,add:i,pow:t,conj:n,sqrt:o,multiply:l,equalScalar:u,larger:s,smaller:c,matrix:f,ctranspose:m,eigs:v}=e;return r(jc,{number:Math.abs,Complex:function(S){return S.abs()},BigNumber:function(S){return S.abs()},boolean:function(S){return Math.abs(S)},Array:function(S){return y(f(S),2)},Matrix:function(S){return y(S,2)},"Array, number | BigNumber | string":function(S,D){return y(f(S),D)},"Matrix, number | BigNumber | string":function(S,D){return y(S,D)}});function d(A){var S=0;return A.forEach(function(D){var E=a(D);s(E,S)&&(S=E)},!0),S}function p(A){var S;return A.forEach(function(D){var E=a(D);(!S||c(E,S))&&(S=E)},!0),S||0}function w(A,S){if(S===Number.POSITIVE_INFINITY||S==="inf")return d(A);if(S===Number.NEGATIVE_INFINITY||S==="-inf")return p(A);if(S==="fro")return y(A,2);if(typeof S=="number"&&!isNaN(S)){if(!u(S,0)){var D=0;return A.forEach(function(E){D=i(t(a(E),S),D)},!0),t(D,1/S)}return Number.POSITIVE_INFINITY}throw new Error("Unsupported parameter value")}function g(A){var S=0;return A.forEach(function(D,E){S=i(S,l(D,n(D)))}),a(o(S))}function N(A){var S=[],D=0;return A.forEach(function(E,C){var F=C[1],_=i(S[F]||0,a(E));s(_,D)&&(D=_),S[F]=_},!0),D}function h(A){var S=A.size();if(S[0]!==S[1])throw new RangeError("Invalid matrix dimensions");var D=m(A),E=l(D,A),C=v(E).values.toArray(),F=C[C.length-1];return a(o(F))}function b(A){var S=[],D=0;return A.forEach(function(E,C){var F=C[0],_=i(S[F]||0,a(E));s(_,D)&&(D=_),S[F]=_},!0),D}function x(A,S){if(S===1)return N(A);if(S===Number.POSITIVE_INFINITY||S==="inf")return b(A);if(S==="fro")return g(A);if(S===2)return h(A);throw new Error("Unsupported parameter value "+S)}function y(A,S){var D=A.size();if(D.length===1)return w(A,S);if(D.length===2){if(D[0]&&D[1])return x(A,S);throw new RangeError("Invalid matrix dimensions")}}}),el="dot",$2=["typed","addScalar","multiplyScalar","conj","size"],I2=q(el,$2,e=>{var{typed:r,addScalar:a,multiplyScalar:i,conj:t,size:n}=e;return r(el,{"Array | DenseMatrix, Array | DenseMatrix":l,"SparseMatrix, SparseMatrix":u});function o(c,f){var m=s(c),v=s(f),d,p;if(m.length===1)d=m[0];else if(m.length===2&&m[1]===1)d=m[0];else throw new RangeError("Expected a column vector, instead got a matrix of size ("+m.join(", ")+")");if(v.length===1)p=v[0];else if(v.length===2&&v[1]===1)p=v[0];else throw new RangeError("Expected a column vector, instead got a matrix of size ("+v.join(", ")+")");if(d!==p)throw new RangeError("Vectors must have equal length ("+d+" != "+p+")");if(d===0)throw new RangeError("Cannot calculate the dot product of empty vectors");return d}function l(c,f){var m=o(c,f),v=Te(c)?c._data:c,d=Te(c)?c._datatype||c.getDataType():void 0,p=Te(f)?f._data:f,w=Te(f)?f._datatype||f.getDataType():void 0,g=s(c).length===2,N=s(f).length===2,h=a,b=i;if(d&&w&&d===w&&typeof d=="string"&&d!=="mixed"){var x=d;h=r.find(a,[x,x]),b=r.find(i,[x,x])}if(!g&&!N){for(var y=b(t(v[0]),p[0]),A=1;Ay){b++;continue}x===y&&(w=g(w,N(v[h],p[b])),h++,b++)}return w}function s(c){return Te(c)?c.size():n(c)}}),q2="trace",R2=["typed","matrix","add"],z2=q(q2,R2,e=>{var{typed:r,matrix:a,add:i}=e;return r("trace",{Array:function(l){return t(a(l))},SparseMatrix:n,DenseMatrix:t,any:qe});function t(o){var l=o._size,u=o._data;switch(l.length){case 1:if(l[0]===1)return qe(u[0]);throw new RangeError("Matrix must be square (size: "+Ge(l)+")");case 2:{var s=l[0],c=l[1];if(s===c){for(var f=0,m=0;m0)for(var d=0;dd)break}return v}throw new RangeError("Matrix must be square (size: "+Ge(c)+")")}}),rl="index",P2=["typed","Index"],U2=q(rl,P2,e=>{var{typed:r,Index:a}=e;return r(rl,{"...number | string | BigNumber | Range | Array | Matrix":function(t){var n=t.map(function(l){return Le(l)?l.toNumber():je(l)||Te(l)?l.map(function(u){return Le(u)?u.toNumber():u}):l}),o=new a;return a.apply(o,n),o}})}),Dv=new Set(["end"]),L2="Node",k2=["mathWithTransform"],H2=q(L2,k2,e=>{var{mathWithTransform:r}=e;function a(t){for(var n of[...Dv])if(t.has(n))throw new Error('Scope contains an illegal symbol, "'+n+'" is a reserved keyword')}class i{get type(){return"Node"}get isNode(){return!0}evaluate(n){return this.compile().evaluate(n)}compile(){var n=this._compile(r,{}),o={},l=null;function u(s){var c=pn(s);return a(c),n(c,o,l)}return{evaluate:u}}_compile(n,o){throw new Error("Method _compile must be implemented by type "+this.type)}forEach(n){throw new Error("Cannot run forEach on a Node interface")}map(n){throw new Error("Cannot run map on a Node interface")}_ifNode(n){if(!rr(n))throw new TypeError("Callback function must return a Node");return n}traverse(n){n(this,null,null);function o(l,u){l.forEach(function(s,c,f){u(s,c,f),o(s,u)})}o(this,n)}transform(n){function o(l,u,s){var c=n(l,u,s);return c!==l?c:l.map(o)}return o(this,null,null)}filter(n){var o=[];return this.traverse(function(l,u,s){n(l,u,s)&&o.push(l)}),o}clone(){throw new Error("Cannot clone a Node interface")}cloneDeep(){return this.map(function(n){return n.cloneDeep()})}equals(n){return n?this.type===n.type&&Xt(this,n):!1}toString(n){var o=this._getCustomString(n);return typeof o<"u"?o:this._toString(n)}_toString(){throw new Error("_toString not implemented for "+this.type)}toJSON(){throw new Error("Cannot serialize object: toJSON not implemented by "+this.type)}toHTML(n){var o=this._getCustomString(n);return typeof o<"u"?o:this._toHTML(n)}_toHTML(){throw new Error("_toHTML not implemented for "+this.type)}toTex(n){var o=this._getCustomString(n);return typeof o<"u"?o:this._toTex(n)}_toTex(n){throw new Error("_toTex not implemented for "+this.type)}_getCustomString(n){if(n&&typeof n=="object")switch(typeof n.handler){case"object":case"undefined":return;case"function":return n.handler(this,n);default:throw new TypeError("Object or function expected as callback")}}getIdentifier(){return this.type}getContent(){return this}}return i},{isClass:!0,isNode:!0});function zr(e){return e&&e.isIndexError?new it(e.index+1,e.min+1,e.max!==void 0?e.max+1:void 0):e}function Av(e){var{subset:r}=e;return function(i,t){try{if(Array.isArray(i))return r(i,t);if(i&&typeof i.subset=="function")return i.subset(t);if(typeof i=="string")return r(i,t);if(typeof i=="object"){if(!t.isObjectProperty())throw new TypeError("Cannot apply a numeric index as object property");return Or(i,t.getObjectProperty())}else throw new TypeError("Cannot apply index: unsupported type of object")}catch(n){throw zr(n)}}}var la="AccessorNode",G2=["subset","Node"],V2=q(la,G2,e=>{var{subset:r,Node:a}=e,i=Av({subset:r});function t(o){return!(Zt(o)||Yr(o)||We(o)||Ot(o)||si(o)||Dt(o)||yr(o))}class n extends a{constructor(l,u){if(super(),!rr(l))throw new TypeError('Node expected for parameter "object"');if(!An(u))throw new TypeError('IndexNode expected for parameter "index"');this.object=l,this.index=u}get name(){return this.index?this.index.isObjectProperty()?this.index.getObjectProperty():"":this.object.name||""}get type(){return la}get isAccessorNode(){return!0}_compile(l,u){var s=this.object._compile(l,u),c=this.index._compile(l,u);if(this.index.isObjectProperty()){var f=this.index.getObjectProperty();return function(v,d,p){return Or(s(v,d,p),f)}}else return function(v,d,p){var w=s(v,d,p),g=c(v,d,w);return i(w,g)}}forEach(l){l(this.object,"object",this),l(this.index,"index",this)}map(l){return new n(this._ifNode(l(this.object,"object",this)),this._ifNode(l(this.index,"index",this)))}clone(){return new n(this.object,this.index)}_toString(l){var u=this.object.toString(l);return t(this.object)&&(u="("+u+")"),u+this.index.toString(l)}_toHTML(l){var u=this.object.toHTML(l);return t(this.object)&&(u='('+u+')'),u+this.index.toHTML(l)}_toTex(l){var u=this.object.toTex(l);return t(this.object)&&(u="\\left(' + object + '\\right)"),u+this.index.toTex(l)}toJSON(){return{mathjs:la,object:this.object,index:this.index}}static fromJSON(l){return new n(l.object,l.index)}}return dr(n,"name",la),n},{isClass:!0,isNode:!0}),fa="ArrayNode",Z2=["Node"],X2=q(fa,Z2,e=>{var{Node:r}=e;class a extends r{constructor(t){if(super(),this.items=t||[],!Array.isArray(this.items)||!this.items.every(rr))throw new TypeError("Array containing Nodes expected")}get type(){return fa}get isArrayNode(){return!0}_compile(t,n){var o=Nt(this.items,function(s){return s._compile(t,n)}),l=t.config.matrix!=="Array";if(l){var u=t.matrix;return function(c,f,m){return u(Nt(o,function(v){return v(c,f,m)}))}}else return function(c,f,m){return Nt(o,function(v){return v(c,f,m)})}}forEach(t){for(var n=0;n['+n.join(',')+']'}_toTex(t){function n(o,l){var u=o.some(Yr)&&!o.every(Yr),s=l||u,c=s?"&":"\\\\",f=o.map(function(m){return m.items?n(m.items,!l):m.toTex(t)}).join(c);return u||!s||s&&!l?"\\begin{bmatrix}"+f+"\\end{bmatrix}":f}return n(this.items,!1)}}return dr(a,"name",fa),a},{isClass:!0,isNode:!0});function Y2(e){var{subset:r,matrix:a}=e;return function(t,n,o){try{if(Array.isArray(t)){var l=a(t).subset(n,o).valueOf();return l.forEach((u,s)=>{t[s]=u}),t}else{if(t&&typeof t.subset=="function")return t.subset(n,o);if(typeof t=="string")return r(t,n,o);if(typeof t=="object"){if(!n.isObjectProperty())throw TypeError("Cannot apply a numeric index as object property");return bn(t,n.getObjectProperty(),o),t}else throw new TypeError("Cannot apply index: unsupported type of object")}}catch(u){throw zr(u)}}}var tt=[{AssignmentNode:{},FunctionAssignmentNode:{}},{ConditionalNode:{latexLeftParens:!1,latexRightParens:!1,latexParens:!1}},{"OperatorNode:or":{op:"or",associativity:"left",associativeWith:[]}},{"OperatorNode:xor":{op:"xor",associativity:"left",associativeWith:[]}},{"OperatorNode:and":{op:"and",associativity:"left",associativeWith:[]}},{"OperatorNode:bitOr":{op:"|",associativity:"left",associativeWith:[]}},{"OperatorNode:bitXor":{op:"^|",associativity:"left",associativeWith:[]}},{"OperatorNode:bitAnd":{op:"&",associativity:"left",associativeWith:[]}},{"OperatorNode:equal":{op:"==",associativity:"left",associativeWith:[]},"OperatorNode:unequal":{op:"!=",associativity:"left",associativeWith:[]},"OperatorNode:smaller":{op:"<",associativity:"left",associativeWith:[]},"OperatorNode:larger":{op:">",associativity:"left",associativeWith:[]},"OperatorNode:smallerEq":{op:"<=",associativity:"left",associativeWith:[]},"OperatorNode:largerEq":{op:">=",associativity:"left",associativeWith:[]},RelationalNode:{associativity:"left",associativeWith:[]}},{"OperatorNode:leftShift":{op:"<<",associativity:"left",associativeWith:[]},"OperatorNode:rightArithShift":{op:">>",associativity:"left",associativeWith:[]},"OperatorNode:rightLogShift":{op:">>>",associativity:"left",associativeWith:[]}},{"OperatorNode:to":{op:"to",associativity:"left",associativeWith:[]}},{RangeNode:{}},{"OperatorNode:add":{op:"+",associativity:"left",associativeWith:["OperatorNode:add","OperatorNode:subtract"]},"OperatorNode:subtract":{op:"-",associativity:"left",associativeWith:[]}},{"OperatorNode:multiply":{op:"*",associativity:"left",associativeWith:["OperatorNode:multiply","OperatorNode:divide","Operator:dotMultiply","Operator:dotDivide"]},"OperatorNode:divide":{op:"/",associativity:"left",associativeWith:[],latexLeftParens:!1,latexRightParens:!1,latexParens:!1},"OperatorNode:dotMultiply":{op:".*",associativity:"left",associativeWith:["OperatorNode:multiply","OperatorNode:divide","OperatorNode:dotMultiply","OperatorNode:doDivide"]},"OperatorNode:dotDivide":{op:"./",associativity:"left",associativeWith:[]},"OperatorNode:mod":{op:"mod",associativity:"left",associativeWith:[]}},{"OperatorNode:multiply":{associativity:"left",associativeWith:["OperatorNode:multiply","OperatorNode:divide","Operator:dotMultiply","Operator:dotDivide"]}},{"OperatorNode:unaryPlus":{op:"+",associativity:"right"},"OperatorNode:unaryMinus":{op:"-",associativity:"right"},"OperatorNode:bitNot":{op:"~",associativity:"right"},"OperatorNode:not":{op:"not",associativity:"right"}},{"OperatorNode:pow":{op:"^",associativity:"right",associativeWith:[],latexRightParens:!1},"OperatorNode:dotPow":{op:".^",associativity:"right",associativeWith:[]}},{"OperatorNode:factorial":{op:"!",associativity:"left"}},{"OperatorNode:ctranspose":{op:"'",associativity:"left"}}];function ma(e,r){if(!r||r!=="auto")return e;for(var a=e;Dt(a);)a=a.content;return a}function ar(e,r,a,i){var t=e;r!=="keep"&&(t=e.getContent());for(var n=t.getIdentifier(),o=null,l=0;l{var{subset:r,matrix:a,Node:i}=e,t=Av({subset:r}),n=Y2({subset:r,matrix:a});function o(u,s,c){s||(s="keep");var f=ar(u,s,c),m=ar(u.value,s,c);return s==="all"||m!==null&&m<=f}class l extends i{constructor(s,c,f){if(super(),this.object=s,this.index=f?c:null,this.value=f||c,!yr(s)&&!Zt(s))throw new TypeError('SymbolNode or AccessorNode expected as "object"');if(yr(s)&&s.name==="end")throw new Error('Cannot assign to symbol "end"');if(this.index&&!An(this.index))throw new TypeError('IndexNode expected as "index"');if(!rr(this.value))throw new TypeError('Node expected as "value"')}get name(){return this.index?this.index.isObjectProperty()?this.index.getObjectProperty():"":this.object.name||""}get type(){return va}get isAssignmentNode(){return!0}_compile(s,c){var f=this.object._compile(s,c),m=this.index?this.index._compile(s,c):null,v=this.value._compile(s,c),d=this.object.name;if(this.index)if(this.index.isObjectProperty()){var p=this.index.getObjectProperty();return function(b,x,y){var A=f(b,x,y),S=v(b,x,y);return bn(A,p,S),S}}else{if(yr(this.object))return function(b,x,y){var A=f(b,x,y),S=v(b,x,y),D=m(b,x,A);return b.set(d,n(A,D,S)),S};var w=this.object.object._compile(s,c);if(this.object.index.isObjectProperty()){var g=this.object.index.getObjectProperty();return function(b,x,y){var A=w(b,x,y),S=Or(A,g),D=m(b,x,S),E=v(b,x,y);return bn(A,g,n(S,D,E)),E}}else{var N=this.object.index._compile(s,c);return function(b,x,y){var A=w(b,x,y),S=N(b,x,A),D=t(A,S),E=m(b,x,D),C=v(b,x,y);return n(A,S,n(D,E,C)),C}}}else{if(!yr(this.object))throw new TypeError("SymbolNode expected as object");return function(b,x,y){var A=v(b,x,y);return b.set(d,A),A}}}forEach(s){s(this.object,"object",this),this.index&&s(this.index,"index",this),s(this.value,"value",this)}map(s){var c=this._ifNode(s(this.object,"object",this)),f=this.index?this._ifNode(s(this.index,"index",this)):null,m=this._ifNode(s(this.value,"value",this));return new l(c,f,m)}clone(){return new l(this.object,this.index,this.value)}_toString(s){var c=this.object.toString(s),f=this.index?this.index.toString(s):"",m=this.value.toString(s);return o(this,s&&s.parenthesis,s&&s.implicit)&&(m="("+m+")"),c+f+" = "+m}toJSON(){return{mathjs:va,object:this.object,index:this.index,value:this.value}}static fromJSON(s){return new l(s.object,s.index,s.value)}_toHTML(s){var c=this.object.toHTML(s),f=this.index?this.index.toHTML(s):"",m=this.value.toHTML(s);return o(this,s&&s.parenthesis,s&&s.implicit)&&(m='('+m+')'),c+f+'='+m}_toTex(s){var c=this.object.toTex(s),f=this.index?this.index.toTex(s):"",m=this.value.toTex(s);return o(this,s&&s.parenthesis,s&&s.implicit)&&(m="\\left(".concat(m,"\\right)")),c+f+"="+m}}return dr(l,"name",va),l},{isClass:!0,isNode:!0}),pa="BlockNode",K2=["ResultSet","Node"],j2=q(pa,K2,e=>{var{ResultSet:r,Node:a}=e;class i extends a{constructor(n){if(super(),!Array.isArray(n))throw new Error("Array expected");this.blocks=n.map(function(o){var l=o&&o.node,u=o&&o.visible!==void 0?o.visible:!0;if(!rr(l))throw new TypeError('Property "node" must be a Node');if(typeof u!="boolean")throw new TypeError('Property "visible" must be a boolean');return{node:l,visible:u}})}get type(){return pa}get isBlockNode(){return!0}_compile(n,o){var l=Nt(this.blocks,function(u){return{evaluate:u.node._compile(n,o),visible:u.visible}});return function(s,c,f){var m=[];return ci(l,function(d){var p=d.evaluate(s,c,f);d.visible&&m.push(p)}),new r(m)}}forEach(n){for(var o=0;o;')}).join('
')}_toTex(n){return this.blocks.map(function(o){return o.node.toTex(n)+(o.visible?"":";")}).join(`\\;\\; +`)}}return dr(i,"name",pa),i},{isClass:!0,isNode:!0}),da="ConditionalNode",eD=["Node"],rD=q(da,eD,e=>{var{Node:r}=e;function a(t){if(typeof t=="number"||typeof t=="boolean"||typeof t=="string")return!!t;if(t){if(Le(t))return!t.isZero();if(wt(t))return!!(t.re||t.im);if(Wr(t))return!!t.value}if(t==null)return!1;throw new TypeError('Unsupported type of condition "'+ir(t)+'"')}class i extends r{constructor(n,o,l){if(super(),!rr(n))throw new TypeError("Parameter condition must be a Node");if(!rr(o))throw new TypeError("Parameter trueExpr must be a Node");if(!rr(l))throw new TypeError("Parameter falseExpr must be a Node");this.condition=n,this.trueExpr=o,this.falseExpr=l}get type(){return da}get isConditionalNode(){return!0}_compile(n,o){var l=this.condition._compile(n,o),u=this.trueExpr._compile(n,o),s=this.falseExpr._compile(n,o);return function(f,m,v){return a(l(f,m,v))?u(f,m,v):s(f,m,v)}}forEach(n){n(this.condition,"condition",this),n(this.trueExpr,"trueExpr",this),n(this.falseExpr,"falseExpr",this)}map(n){return new i(this._ifNode(n(this.condition,"condition",this)),this._ifNode(n(this.trueExpr,"trueExpr",this)),this._ifNode(n(this.falseExpr,"falseExpr",this)))}clone(){return new i(this.condition,this.trueExpr,this.falseExpr)}_toString(n){var o=n&&n.parenthesis?n.parenthesis:"keep",l=ar(this,o,n&&n.implicit),u=this.condition.toString(n),s=ar(this.condition,o,n&&n.implicit);(o==="all"||this.condition.type==="OperatorNode"||s!==null&&s<=l)&&(u="("+u+")");var c=this.trueExpr.toString(n),f=ar(this.trueExpr,o,n&&n.implicit);(o==="all"||this.trueExpr.type==="OperatorNode"||f!==null&&f<=l)&&(c="("+c+")");var m=this.falseExpr.toString(n),v=ar(this.falseExpr,o,n&&n.implicit);return(o==="all"||this.falseExpr.type==="OperatorNode"||v!==null&&v<=l)&&(m="("+m+")"),u+" ? "+c+" : "+m}toJSON(){return{mathjs:da,condition:this.condition,trueExpr:this.trueExpr,falseExpr:this.falseExpr}}static fromJSON(n){return new i(n.condition,n.trueExpr,n.falseExpr)}_toHTML(n){var o=n&&n.parenthesis?n.parenthesis:"keep",l=ar(this,o,n&&n.implicit),u=this.condition.toHTML(n),s=ar(this.condition,o,n&&n.implicit);(o==="all"||this.condition.type==="OperatorNode"||s!==null&&s<=l)&&(u='('+u+')');var c=this.trueExpr.toHTML(n),f=ar(this.trueExpr,o,n&&n.implicit);(o==="all"||this.trueExpr.type==="OperatorNode"||f!==null&&f<=l)&&(c='('+c+')');var m=this.falseExpr.toHTML(n),v=ar(this.falseExpr,o,n&&n.implicit);return(o==="all"||this.falseExpr.type==="OperatorNode"||v!==null&&v<=l)&&(m='('+m+')'),u+'?'+c+':'+m}_toTex(n){return"\\begin{cases} {"+this.trueExpr.toTex(n)+"}, &\\quad{\\text{if }\\;"+this.condition.toTex(n)+"}\\\\{"+this.falseExpr.toTex(n)+"}, &\\quad{\\text{otherwise}}\\end{cases}"}}return dr(i,"name",da),i},{isClass:!0,isNode:!0}),Ui,tl;function tD(){if(tl)return Ui;tl=1;var e=Object.assign||function(t){for(var n=1;n1&&arguments[1]!==void 0?arguments[1]:{},o=n.preserveFormatting,l=o===void 0?!1:o,u=n.escapeMapFn,s=u===void 0?i:u,c=String(t),f="",m=s(e({},r),l?e({},a):{}),v=Object.keys(m),d=function(){var w=!1;v.forEach(function(g,N){w||c.length>=g.length&&c.slice(0,g.length)===g&&(f+=m[v[N]],c=c.slice(g.length,c.length),w=!0)}),w||(f+=c.slice(0,1),c=c.slice(1,c.length))};c;)d();return f},Ui}var nD=tD();const aD=ai(nD);var ro={Alpha:"A",alpha:"\\alpha",Beta:"B",beta:"\\beta",Gamma:"\\Gamma",gamma:"\\gamma",Delta:"\\Delta",delta:"\\delta",Epsilon:"E",epsilon:"\\epsilon",varepsilon:"\\varepsilon",Zeta:"Z",zeta:"\\zeta",Eta:"H",eta:"\\eta",Theta:"\\Theta",theta:"\\theta",vartheta:"\\vartheta",Iota:"I",iota:"\\iota",Kappa:"K",kappa:"\\kappa",varkappa:"\\varkappa",Lambda:"\\Lambda",lambda:"\\lambda",Mu:"M",mu:"\\mu",Nu:"N",nu:"\\nu",Xi:"\\Xi",xi:"\\xi",Omicron:"O",omicron:"o",Pi:"\\Pi",pi:"\\pi",varpi:"\\varpi",Rho:"P",rho:"\\rho",varrho:"\\varrho",Sigma:"\\Sigma",sigma:"\\sigma",varsigma:"\\varsigma",Tau:"T",tau:"\\tau",Upsilon:"\\Upsilon",upsilon:"\\upsilon",Phi:"\\Phi",phi:"\\phi",varphi:"\\varphi",Chi:"X",chi:"\\chi",Psi:"\\Psi",psi:"\\psi",Omega:"\\Omega",omega:"\\omega",true:"\\mathrm{True}",false:"\\mathrm{False}",i:"i",inf:"\\infty",Inf:"\\infty",infinity:"\\infty",Infinity:"\\infty",oo:"\\infty",lim:"\\lim",undefined:"\\mathbf{?}"},Qe={transpose:"^\\top",ctranspose:"^H",factorial:"!",pow:"^",dotPow:".^\\wedge",unaryPlus:"+",unaryMinus:"-",bitNot:"\\~",not:"\\neg",multiply:"\\cdot",divide:"\\frac",dotMultiply:".\\cdot",dotDivide:".:",mod:"\\mod",add:"+",subtract:"-",to:"\\rightarrow",leftShift:"<<",rightArithShift:">>",rightLogShift:">>>",equal:"=",unequal:"\\neq",smaller:"<",larger:">",smallerEq:"\\leq",largerEq:"\\geq",bitAnd:"\\&",bitXor:"\\underline{|}",bitOr:"|",and:"\\wedge",xor:"\\veebar",or:"\\vee"},nl={abs:{1:"\\left|${args[0]}\\right|"},add:{2:"\\left(${args[0]}".concat(Qe.add,"${args[1]}\\right)")},cbrt:{1:"\\sqrt[3]{${args[0]}}"},ceil:{1:"\\left\\lceil${args[0]}\\right\\rceil"},cube:{1:"\\left(${args[0]}\\right)^3"},divide:{2:"\\frac{${args[0]}}{${args[1]}}"},dotDivide:{2:"\\left(${args[0]}".concat(Qe.dotDivide,"${args[1]}\\right)")},dotMultiply:{2:"\\left(${args[0]}".concat(Qe.dotMultiply,"${args[1]}\\right)")},dotPow:{2:"\\left(${args[0]}".concat(Qe.dotPow,"${args[1]}\\right)")},exp:{1:"\\exp\\left(${args[0]}\\right)"},expm1:"\\left(e".concat(Qe.pow,"{${args[0]}}-1\\right)"),fix:{1:"\\mathrm{${name}}\\left(${args[0]}\\right)"},floor:{1:"\\left\\lfloor${args[0]}\\right\\rfloor"},gcd:"\\gcd\\left(${args}\\right)",hypot:"\\hypot\\left(${args}\\right)",log:{1:"\\ln\\left(${args[0]}\\right)",2:"\\log_{${args[1]}}\\left(${args[0]}\\right)"},log10:{1:"\\log_{10}\\left(${args[0]}\\right)"},log1p:{1:"\\ln\\left(${args[0]}+1\\right)",2:"\\log_{${args[1]}}\\left(${args[0]}+1\\right)"},log2:"\\log_{2}\\left(${args[0]}\\right)",mod:{2:"\\left(${args[0]}".concat(Qe.mod,"${args[1]}\\right)")},multiply:{2:"\\left(${args[0]}".concat(Qe.multiply,"${args[1]}\\right)")},norm:{1:"\\left\\|${args[0]}\\right\\|",2:void 0},nthRoot:{2:"\\sqrt[${args[1]}]{${args[0]}}"},nthRoots:{2:"\\{y : $y^{args[1]} = {${args[0]}}\\}"},pow:{2:"\\left(${args[0]}\\right)".concat(Qe.pow,"{${args[1]}}")},round:{1:"\\left\\lfloor${args[0]}\\right\\rceil",2:void 0},sign:{1:"\\mathrm{${name}}\\left(${args[0]}\\right)"},sqrt:{1:"\\sqrt{${args[0]}}"},square:{1:"\\left(${args[0]}\\right)^2"},subtract:{2:"\\left(${args[0]}".concat(Qe.subtract,"${args[1]}\\right)")},unaryMinus:{1:"".concat(Qe.unaryMinus,"\\left(${args[0]}\\right)")},unaryPlus:{1:"".concat(Qe.unaryPlus,"\\left(${args[0]}\\right)")},bitAnd:{2:"\\left(${args[0]}".concat(Qe.bitAnd,"${args[1]}\\right)")},bitNot:{1:Qe.bitNot+"\\left(${args[0]}\\right)"},bitOr:{2:"\\left(${args[0]}".concat(Qe.bitOr,"${args[1]}\\right)")},bitXor:{2:"\\left(${args[0]}".concat(Qe.bitXor,"${args[1]}\\right)")},leftShift:{2:"\\left(${args[0]}".concat(Qe.leftShift,"${args[1]}\\right)")},rightArithShift:{2:"\\left(${args[0]}".concat(Qe.rightArithShift,"${args[1]}\\right)")},rightLogShift:{2:"\\left(${args[0]}".concat(Qe.rightLogShift,"${args[1]}\\right)")},bellNumbers:{1:"\\mathrm{B}_{${args[0]}}"},catalan:{1:"\\mathrm{C}_{${args[0]}}"},stirlingS2:{2:"\\mathrm{S}\\left(${args}\\right)"},arg:{1:"\\arg\\left(${args[0]}\\right)"},conj:{1:"\\left(${args[0]}\\right)^*"},im:{1:"\\Im\\left\\lbrace${args[0]}\\right\\rbrace"},re:{1:"\\Re\\left\\lbrace${args[0]}\\right\\rbrace"},and:{2:"\\left(${args[0]}".concat(Qe.and,"${args[1]}\\right)")},not:{1:Qe.not+"\\left(${args[0]}\\right)"},or:{2:"\\left(${args[0]}".concat(Qe.or,"${args[1]}\\right)")},xor:{2:"\\left(${args[0]}".concat(Qe.xor,"${args[1]}\\right)")},cross:{2:"\\left(${args[0]}\\right)\\times\\left(${args[1]}\\right)"},ctranspose:{1:"\\left(${args[0]}\\right)".concat(Qe.ctranspose)},det:{1:"\\det\\left(${args[0]}\\right)"},dot:{2:"\\left(${args[0]}\\cdot${args[1]}\\right)"},expm:{1:"\\exp\\left(${args[0]}\\right)"},inv:{1:"\\left(${args[0]}\\right)^{-1}"},pinv:{1:"\\left(${args[0]}\\right)^{+}"},sqrtm:{1:"{${args[0]}}".concat(Qe.pow,"{\\frac{1}{2}}")},trace:{1:"\\mathrm{tr}\\left(${args[0]}\\right)"},transpose:{1:"\\left(${args[0]}\\right)".concat(Qe.transpose)},combinations:{2:"\\binom{${args[0]}}{${args[1]}}"},combinationsWithRep:{2:"\\left(\\!\\!{\\binom{${args[0]}}{${args[1]}}}\\!\\!\\right)"},factorial:{1:"\\left(${args[0]}\\right)".concat(Qe.factorial)},gamma:{1:"\\Gamma\\left(${args[0]}\\right)"},lgamma:{1:"\\ln\\Gamma\\left(${args[0]}\\right)"},equal:{2:"\\left(${args[0]}".concat(Qe.equal,"${args[1]}\\right)")},larger:{2:"\\left(${args[0]}".concat(Qe.larger,"${args[1]}\\right)")},largerEq:{2:"\\left(${args[0]}".concat(Qe.largerEq,"${args[1]}\\right)")},smaller:{2:"\\left(${args[0]}".concat(Qe.smaller,"${args[1]}\\right)")},smallerEq:{2:"\\left(${args[0]}".concat(Qe.smallerEq,"${args[1]}\\right)")},unequal:{2:"\\left(${args[0]}".concat(Qe.unequal,"${args[1]}\\right)")},erf:{1:"erf\\left(${args[0]}\\right)"},max:"\\max\\left(${args}\\right)",min:"\\min\\left(${args}\\right)",variance:"\\mathrm{Var}\\left(${args}\\right)",acos:{1:"\\cos^{-1}\\left(${args[0]}\\right)"},acosh:{1:"\\cosh^{-1}\\left(${args[0]}\\right)"},acot:{1:"\\cot^{-1}\\left(${args[0]}\\right)"},acoth:{1:"\\coth^{-1}\\left(${args[0]}\\right)"},acsc:{1:"\\csc^{-1}\\left(${args[0]}\\right)"},acsch:{1:"\\mathrm{csch}^{-1}\\left(${args[0]}\\right)"},asec:{1:"\\sec^{-1}\\left(${args[0]}\\right)"},asech:{1:"\\mathrm{sech}^{-1}\\left(${args[0]}\\right)"},asin:{1:"\\sin^{-1}\\left(${args[0]}\\right)"},asinh:{1:"\\sinh^{-1}\\left(${args[0]}\\right)"},atan:{1:"\\tan^{-1}\\left(${args[0]}\\right)"},atan2:{2:"\\mathrm{atan2}\\left(${args}\\right)"},atanh:{1:"\\tanh^{-1}\\left(${args[0]}\\right)"},cos:{1:"\\cos\\left(${args[0]}\\right)"},cosh:{1:"\\cosh\\left(${args[0]}\\right)"},cot:{1:"\\cot\\left(${args[0]}\\right)"},coth:{1:"\\coth\\left(${args[0]}\\right)"},csc:{1:"\\csc\\left(${args[0]}\\right)"},csch:{1:"\\mathrm{csch}\\left(${args[0]}\\right)"},sec:{1:"\\sec\\left(${args[0]}\\right)"},sech:{1:"\\mathrm{sech}\\left(${args[0]}\\right)"},sin:{1:"\\sin\\left(${args[0]}\\right)"},sinh:{1:"\\sinh\\left(${args[0]}\\right)"},tan:{1:"\\tan\\left(${args[0]}\\right)"},tanh:{1:"\\tanh\\left(${args[0]}\\right)"},to:{2:"\\left(${args[0]}".concat(Qe.to,"${args[1]}\\right)")},numeric:function(r,a){return r.args[0].toTex()},number:{0:"0",1:"\\left(${args[0]}\\right)",2:"\\left(\\left(${args[0]}\\right)${args[1]}\\right)"},string:{0:'\\mathtt{""}',1:"\\mathrm{string}\\left(${args[0]}\\right)"},bignumber:{0:"0",1:"\\left(${args[0]}\\right)"},complex:{0:"0",1:"\\left(${args[0]}\\right)",2:"\\left(\\left(${args[0]}\\right)+".concat(ro.i,"\\cdot\\left(${args[1]}\\right)\\right)")},matrix:{0:"\\begin{bmatrix}\\end{bmatrix}",1:"\\left(${args[0]}\\right)",2:"\\left(${args[0]}\\right)"},sparse:{0:"\\begin{bsparse}\\end{bsparse}",1:"\\left(${args[0]}\\right)"},unit:{1:"\\left(${args[0]}\\right)",2:"\\left(\\left(${args[0]}\\right)${args[1]}\\right)"}},iD="\\mathrm{${name}}\\left(${args}\\right)",al={deg:"^\\circ"};function to(e){return aD(e,{preserveFormatting:!0})}function Ev(e,r){return r=typeof r>"u"?!1:r,r?Se(al,e)?al[e]:"\\mathrm{"+to(e)+"}":Se(ro,e)?ro[e]:to(e)}var ha="ConstantNode",oD=["Node"],sD=q(ha,oD,e=>{var{Node:r}=e;class a extends r{constructor(t){super(),this.value=t}get type(){return ha}get isConstantNode(){return!0}_compile(t,n){var o=this.value;return function(){return o}}forEach(t){}map(t){return this.clone()}clone(){return new a(this.value)}_toString(t){return Ge(this.value,t)}_toHTML(t){var n=this._toString(t);switch(ir(this.value)){case"number":case"BigNumber":case"Fraction":return''+n+"";case"string":return''+n+"";case"boolean":return''+n+"";case"null":return''+n+"";case"undefined":return''+n+"";default:return''+n+""}}toJSON(){return{mathjs:ha,value:this.value}}static fromJSON(t){return new a(t.value)}_toTex(t){var n=this._toString(t),o=ir(this.value);switch(o){case"string":return"\\mathtt{"+to(n)+"}";case"number":case"BigNumber":{var l=o==="BigNumber"?this.value.isFinite():isFinite(this.value);if(!l)return this.value.valueOf()<0?"-\\infty":"\\infty";var u=n.toLowerCase().indexOf("e");return u!==-1?n.substring(0,u)+"\\cdot10^{"+n.substring(u+1)+"}":n}case"Fraction":return this.value.toLatex();default:return n}}}return dr(a,"name",ha),a},{isClass:!0,isNode:!0}),ga="FunctionAssignmentNode",uD=["typed","Node"],cD=q(ga,uD,e=>{var{typed:r,Node:a}=e;function i(n,o,l){var u=ar(n,o,l),s=ar(n.expr,o,l);return o==="all"||s!==null&&s<=u}class t extends a{constructor(o,l,u){if(super(),typeof o!="string")throw new TypeError('String expected for parameter "name"');if(!Array.isArray(l))throw new TypeError('Array containing strings or objects expected for parameter "params"');if(!rr(u))throw new TypeError('Node expected for parameter "expr"');if(Dv.has(o))throw new Error('Illegal function name, "'+o+'" is a reserved keyword');var s=new Set;for(var c of l){var f=typeof c=="string"?c:c.name;if(s.has(f))throw new Error('Duplicate parameter name "'.concat(f,'"'));s.add(f)}this.name=o,this.params=l.map(function(m){return m&&m.name||m}),this.types=l.map(function(m){return m&&m.type||"any"}),this.expr=u}get type(){return ga}get isFunctionAssignmentNode(){return!0}_compile(o,l){var u=Object.create(l);ci(this.params,function(d){u[d]=!0});var s=this.expr._compile(o,u),c=this.name,f=this.params,m=Ko(this.types,","),v=c+"("+Ko(this.params,", ")+")";return function(p,w,g){var N={};N[m]=function(){for(var b=Object.create(w),x=0;x'+Jr(this.params[s])+"");var c=this.expr.toHTML(o);return i(this,l,o&&o.implicit)&&(c='('+c+')'),''+Jr(this.name)+'('+u.join(',')+')='+c}_toTex(o){var l=o&&o.parenthesis?o.parenthesis:"keep",u=this.expr.toTex(o);return i(this,l,o&&o.implicit)&&(u="\\left(".concat(u,"\\right)")),"\\mathrm{"+this.name+"}\\left("+this.params.map(Ev).join(",")+"\\right)="+u}}return dr(t,"name",ga),t},{isClass:!0,isNode:!0}),ya="IndexNode",lD=["Node","size"],fD=q(ya,lD,e=>{var{Node:r,size:a}=e;class i extends r{constructor(n,o){if(super(),this.dimensions=n,this.dotNotation=o||!1,!Array.isArray(n)||!n.every(rr))throw new TypeError('Array containing Nodes expected for parameter "dimensions"');if(this.dotNotation&&!this.isObjectProperty())throw new Error("dotNotation only applicable for object properties")}get type(){return ya}get isIndexNode(){return!0}_compile(n,o){var l=Nt(this.dimensions,function(s,c){var f=s.filter(d=>d.isSymbolNode&&d.name==="end").length>0;if(f){var m=Object.create(o);m.end=!0;var v=s._compile(n,m);return function(p,w,g){if(!Te(g)&&!je(g)&&!Cr(g))throw new TypeError('Cannot resolve "end": context must be a Matrix, Array, or string but is '+ir(g));var N=a(g).valueOf(),h=Object.create(w);return h.end=N[c],v(p,h,g)}}else return s._compile(n,o)}),u=Or(n,"index");return function(c,f,m){var v=Nt(l,function(d){return d(c,f,m)});return u(...v)}}forEach(n){for(var o=0;o.'+Jr(this.getObjectProperty())+"":'['+o.join(',')+']'}_toTex(n){var o=this.dimensions.map(function(l){return l.toTex(n)});return this.dotNotation?"."+this.getObjectProperty():"_{"+o.join(",")+"}"}}return dr(i,"name",ya),i},{isClass:!0,isNode:!0}),ba="ObjectNode",mD=["Node"],vD=q(ba,mD,e=>{var{Node:r}=e;class a extends r{constructor(t){if(super(),this.properties=t||{},t&&(typeof t!="object"||!Object.keys(t).every(function(n){return rr(t[n])})))throw new TypeError("Object containing Nodes expected")}get type(){return ba}get isObjectNode(){return!0}_compile(t,n){var o={};for(var l in this.properties)if(Se(this.properties,l)){var u=fn(l),s=JSON.parse(u),c=Or(this.properties,l);o[s]=c._compile(t,n)}return function(m,v,d){var p={};for(var w in o)Se(o,w)&&(p[w]=o[w](m,v,d));return p}}forEach(t){for(var n in this.properties)Se(this.properties,n)&&t(this.properties[n],"properties["+fn(n)+"]",this)}map(t){var n={};for(var o in this.properties)Se(this.properties,o)&&(n[o]=this._ifNode(t(this.properties[o],"properties["+fn(o)+"]",this)));return new a(n)}clone(){var t={};for(var n in this.properties)Se(this.properties,n)&&(t[n]=this.properties[n]);return new a(t)}_toString(t){var n=[];for(var o in this.properties)Se(this.properties,o)&&n.push(fn(o)+": "+this.properties[o].toString(t));return"{"+n.join(", ")+"}"}toJSON(){return{mathjs:ba,properties:this.properties}}static fromJSON(t){return new a(t.properties)}_toHTML(t){var n=[];for(var o in this.properties)Se(this.properties,o)&&n.push(''+Jr(o)+':'+this.properties[o].toHTML(t));return'{'+n.join(',')+'}'}_toTex(t){var n=[];for(var o in this.properties)Se(this.properties,o)&&n.push("\\mathbf{"+o+":} & "+this.properties[o].toTex(t)+"\\\\");var l="\\left\\{\\begin{array}{ll}"+n.join(` +`)+"\\end{array}\\right\\}";return l}}return dr(a,"name",ba),a},{isClass:!0,isNode:!0});function Gn(e,r){return new Zf(e,new li(r),new Set(Object.keys(r)))}var xa="OperatorNode",pD=["Node"],dD=q(xa,pD,e=>{var{Node:r}=e;function a(n,o){var l=n;if(o==="auto")for(;Dt(l);)l=l.content;return We(l)?!0:vr(l)?a(l.args[0],o):!1}function i(n,o,l,u,s){var c=ar(n,o,l),f=kn(n,o);if(o==="all"||u.length>2&&n.getIdentifier()!=="OperatorNode:add"&&n.getIdentifier()!=="OperatorNode:multiply")return u.map(function(E){switch(E.getContent().type){case"ArrayNode":case"ConstantNode":case"SymbolNode":case"ParenthesisNode":return!1;default:return!0}});var m;switch(u.length){case 0:m=[];break;case 1:{var v=ar(u[0],o,l,n);if(s&&v!==null){var d,p;if(o==="keep"?(d=u[0].getIdentifier(),p=n.getIdentifier()):(d=u[0].getContent().getIdentifier(),p=n.getContent().getIdentifier()),tt[c][p].latexLeftParens===!1){m=[!1];break}if(tt[v][d].latexParens===!1){m=[!1];break}}if(v===null){m=[!1];break}if(v<=c){m=[!0];break}m=[!1]}break;case 2:{var w,g=ar(u[0],o,l,n),N=Pi(n,u[0],o);g===null?w=!1:g===c&&f==="right"&&!N||g=2&&n.getIdentifier()==="OperatorNode:multiply"&&n.implicit&&o!=="all"&&l==="hide")for(var D=1;D2&&(this.getIdentifier()==="OperatorNode:add"||this.getIdentifier()==="OperatorNode:multiply")){var w=s.map(function(g,N){return g=g.toString(o),c[N]&&(g="("+g+")"),g});return this.implicit&&this.getIdentifier()==="OperatorNode:multiply"&&u==="hide"?w.join(" "):w.join(" "+this.op+" ")}else return this.fn+"("+this.args.join(", ")+")"}toJSON(){return{mathjs:xa,op:this.op,fn:this.fn,args:this.args,implicit:this.implicit,isPercentage:this.isPercentage}}static fromJSON(o){return new t(o.op,o.fn,o.args,o.implicit,o.isPercentage)}_toHTML(o){var l=o&&o.parenthesis?o.parenthesis:"keep",u=o&&o.implicit?o.implicit:"hide",s=this.args,c=i(this,l,u,s,!1);if(s.length===1){var f=kn(this,l),m=s[0].toHTML(o);return c[0]&&(m='('+m+')'),f==="right"?''+Jr(this.op)+""+m:m+''+Jr(this.op)+""}else if(s.length===2){var v=s[0].toHTML(o),d=s[1].toHTML(o);return c[0]&&(v='('+v+')'),c[1]&&(d='('+d+')'),this.implicit&&this.getIdentifier()==="OperatorNode:multiply"&&u==="hide"?v+''+d:v+''+Jr(this.op)+""+d}else{var p=s.map(function(w,g){return w=w.toHTML(o),c[g]&&(w='('+w+')'),w});return s.length>2&&(this.getIdentifier()==="OperatorNode:add"||this.getIdentifier()==="OperatorNode:multiply")?this.implicit&&this.getIdentifier()==="OperatorNode:multiply"&&u==="hide"?p.join(''):p.join(''+Jr(this.op)+""):''+Jr(this.fn)+'('+p.join(',')+')'}}_toTex(o){var l=o&&o.parenthesis?o.parenthesis:"keep",u=o&&o.implicit?o.implicit:"hide",s=this.args,c=i(this,l,u,s,!0),f=Qe[this.fn];if(f=typeof f>"u"?this.op:f,s.length===1){var m=kn(this,l),v=s[0].toTex(o);return c[0]&&(v="\\left(".concat(v,"\\right)")),m==="right"?f+v:v+f}else if(s.length===2){var d=s[0],p=d.toTex(o);c[0]&&(p="\\left(".concat(p,"\\right)"));var w=s[1],g=w.toTex(o);c[1]&&(g="\\left(".concat(g,"\\right)"));var N;switch(l==="keep"?N=d.getIdentifier():N=d.getContent().getIdentifier(),this.getIdentifier()){case"OperatorNode:divide":return f+"{"+p+"}{"+g+"}";case"OperatorNode:pow":switch(p="{"+p+"}",g="{"+g+"}",N){case"ConditionalNode":case"OperatorNode:divide":p="\\left(".concat(p,"\\right)")}break;case"OperatorNode:multiply":if(this.implicit&&u==="hide")return p+"~"+g}return p+f+g}else if(s.length>2&&(this.getIdentifier()==="OperatorNode:add"||this.getIdentifier()==="OperatorNode:multiply")){var h=s.map(function(b,x){return b=b.toTex(o),c[x]&&(b="\\left(".concat(b,"\\right)")),b});return this.getIdentifier()==="OperatorNode:multiply"&&this.implicit&&u==="hide"?h.join("~"):h.join(f)}else return"\\mathrm{"+this.fn+"}\\left("+s.map(function(b){return b.toTex(o)}).join(",")+"\\right)"}getIdentifier(){return this.type+":"+this.fn}}return dr(t,"name",xa),t},{isClass:!0,isNode:!0}),wa="ParenthesisNode",hD=["Node"],gD=q(wa,hD,e=>{var{Node:r}=e;class a extends r{constructor(t){if(super(),!rr(t))throw new TypeError('Node expected for parameter "content"');this.content=t}get type(){return wa}get isParenthesisNode(){return!0}_compile(t,n){return this.content._compile(t,n)}getContent(){return this.content.getContent()}forEach(t){t(this.content,"content",this)}map(t){var n=t(this.content,"content",this);return new a(n)}clone(){return new a(this.content)}_toString(t){return!t||t&&!t.parenthesis||t&&t.parenthesis==="keep"?"("+this.content.toString(t)+")":this.content.toString(t)}toJSON(){return{mathjs:wa,content:this.content}}static fromJSON(t){return new a(t.content)}_toHTML(t){return!t||t&&!t.parenthesis||t&&t.parenthesis==="keep"?'('+this.content.toHTML(t)+')':this.content.toHTML(t)}_toTex(t){return!t||t&&!t.parenthesis||t&&t.parenthesis==="keep"?"\\left(".concat(this.content.toTex(t),"\\right)"):this.content.toTex(t)}}return dr(a,"name",wa),a},{isClass:!0,isNode:!0}),Na="RangeNode",yD=["Node"],bD=q(Na,yD,e=>{var{Node:r}=e;function a(t,n,o){var l=ar(t,n,o),u={},s=ar(t.start,n,o);if(u.start=s!==null&&s<=l||n==="all",t.step){var c=ar(t.step,n,o);u.step=c!==null&&c<=l||n==="all"}var f=ar(t.end,n,o);return u.end=f!==null&&f<=l||n==="all",u}class i extends r{constructor(n,o,l){if(super(),!rr(n))throw new TypeError("Node expected");if(!rr(o))throw new TypeError("Node expected");if(l&&!rr(l))throw new TypeError("Node expected");if(arguments.length>3)throw new Error("Too many arguments");this.start=n,this.end=o,this.step=l||null}get type(){return Na}get isRangeNode(){return!0}needsEnd(){var n=this.filter(function(o){return yr(o)&&o.name==="end"});return n.length>0}_compile(n,o){var l=n.range,u=this.start._compile(n,o),s=this.end._compile(n,o);if(this.step){var c=this.step._compile(n,o);return function(m,v,d){return l(u(m,v,d),s(m,v,d),c(m,v,d))}}else return function(m,v,d){return l(u(m,v,d),s(m,v,d))}}forEach(n){n(this.start,"start",this),n(this.end,"end",this),this.step&&n(this.step,"step",this)}map(n){return new i(this._ifNode(n(this.start,"start",this)),this._ifNode(n(this.end,"end",this)),this.step&&this._ifNode(n(this.step,"step",this)))}clone(){return new i(this.start,this.end,this.step&&this.step)}_toString(n){var o=n&&n.parenthesis?n.parenthesis:"keep",l=a(this,o,n&&n.implicit),u,s=this.start.toString(n);if(l.start&&(s="("+s+")"),u=s,this.step){var c=this.step.toString(n);l.step&&(c="("+c+")"),u+=":"+c}var f=this.end.toString(n);return l.end&&(f="("+f+")"),u+=":"+f,u}toJSON(){return{mathjs:Na,start:this.start,end:this.end,step:this.step}}static fromJSON(n){return new i(n.start,n.end,n.step)}_toHTML(n){var o=n&&n.parenthesis?n.parenthesis:"keep",l=a(this,o,n&&n.implicit),u,s=this.start.toHTML(n);if(l.start&&(s='('+s+')'),u=s,this.step){var c=this.step.toHTML(n);l.step&&(c='('+c+')'),u+=':'+c}var f=this.end.toHTML(n);return l.end&&(f='('+f+')'),u+=':'+f,u}_toTex(n){var o=n&&n.parenthesis?n.parenthesis:"keep",l=a(this,o,n&&n.implicit),u=this.start.toTex(n);if(l.start&&(u="\\left(".concat(u,"\\right)")),this.step){var s=this.step.toTex(n);l.step&&(s="\\left(".concat(s,"\\right)")),u+=":"+s}var c=this.end.toTex(n);return l.end&&(c="\\left(".concat(c,"\\right)")),u+=":"+c,u}}return dr(i,"name",Na),i},{isClass:!0,isNode:!0}),Da="RelationalNode",xD=["Node"],wD=q(Da,xD,e=>{var{Node:r}=e,a={equal:"==",unequal:"!=",smaller:"<",larger:">",smallerEq:"<=",largerEq:">="};class i extends r{constructor(n,o){if(super(),!Array.isArray(n))throw new TypeError("Parameter conditionals must be an array");if(!Array.isArray(o))throw new TypeError("Parameter params must be an array");if(n.length!==o.length-1)throw new TypeError("Parameter params must contain exactly one more element than parameter conditionals");this.conditionals=n,this.params=o}get type(){return Da}get isRelationalNode(){return!0}_compile(n,o){var l=this,u=this.params.map(s=>s._compile(n,o));return function(c,f,m){for(var v,d=u[0](c,f,m),p=0;pn(o,"params["+l+"]",this),this)}map(n){return new i(this.conditionals.slice(),this.params.map((o,l)=>this._ifNode(n(o,"params["+l+"]",this)),this))}clone(){return new i(this.conditionals,this.params)}_toString(n){for(var o=n&&n.parenthesis?n.parenthesis:"keep",l=ar(this,o,n&&n.implicit),u=this.params.map(function(f,m){var v=ar(f,o,n&&n.implicit);return o==="all"||v!==null&&v<=l?"("+f.toString(n)+")":f.toString(n)}),s=u[0],c=0;c('+f.toHTML(n)+')':f.toHTML(n)}),s=u[0],c=0;c'+Jr(a[this.conditionals[c]])+""+u[c+1];return s}_toTex(n){for(var o=n&&n.parenthesis?n.parenthesis:"keep",l=ar(this,o,n&&n.implicit),u=this.params.map(function(f,m){var v=ar(f,o,n&&n.implicit);return o==="all"||v!==null&&v<=l?"\\left("+f.toTex(n)+"\right)":f.toTex(n)}),s=u[0],c=0;c{var{math:r,Unit:a,Node:i}=e;function t(o){return a?a.isValuelessUnit(o):!1}class n extends i{constructor(l){if(super(),typeof l!="string")throw new TypeError('String expected for parameter "name"');this.name=l}get type(){return"SymbolNode"}get isSymbolNode(){return!0}_compile(l,u){var s=this.name;if(u[s]===!0)return function(f,m,v){return Or(m,s)};if(s in l)return function(f,m,v){return f.has(s)?f.get(s):Or(l,s)};var c=t(s);return function(f,m,v){return f.has(s)?f.get(s):c?new a(null,s):n.onUndefinedSymbol(s)}}forEach(l){}map(l){return this.clone()}static onUndefinedSymbol(l){throw new Error("Undefined symbol "+l)}clone(){return new n(this.name)}_toString(l){return this.name}_toHTML(l){var u=Jr(this.name);return u==="true"||u==="false"?''+u+"":u==="i"?''+u+"":u==="Infinity"?''+u+"":u==="NaN"?''+u+"":u==="null"?''+u+"":u==="undefined"?''+u+"":''+u+""}toJSON(){return{mathjs:"SymbolNode",name:this.name}}static fromJSON(l){return new n(l.name)}_toTex(l){var u=!1;typeof r[this.name]>"u"&&t(this.name)&&(u=!0);var s=Ev(this.name,u);return s[0]==="\\"?s:" "+s}}return n},{isClass:!0,isNode:!0}),Aa="FunctionNode",ED=["math","Node","SymbolNode"],SD=q(Aa,ED,e=>{var r,{math:a,Node:i,SymbolNode:t}=e,n=u=>Ge(u,{truncate:78});function o(u,s,c){for(var f="",m=/\$(?:\{([a-z_][a-z_0-9]*)(?:\[([0-9]+)\])?\}|\$)/gi,v=0,d;(d=m.exec(u))!==null;)if(f+=u.substring(v,d.index),v=d.index,d[0]==="$$")f+="$",v++;else{v+=d[0].length;var p=s[d[1]];if(!p)throw new ReferenceError("Template: Property "+d[1]+" does not exist.");if(d[2]===void 0)switch(typeof p){case"string":f+=p;break;case"object":if(rr(p))f+=p.toTex(c);else if(Array.isArray(p))f+=p.map(function(w,g){if(rr(w))return w.toTex(c);throw new TypeError("Template: "+d[1]+"["+g+"] is not a Node.")}).join(",");else throw new TypeError("Template: "+d[1]+" has to be a Node, String or array of Nodes");break;default:throw new TypeError("Template: "+d[1]+" has to be a Node, String or array of Nodes")}else if(rr(p[d[2]]&&p[d[2]]))f+=p[d[2]].toTex(c);else throw new TypeError("Template: "+d[1]+"["+d[2]+"] is not a Node.")}return f+=u.slice(v),f}class l extends i{constructor(s,c){if(super(),typeof s=="string"&&(s=new t(s)),!rr(s))throw new TypeError('Node expected as parameter "fn"');if(!Array.isArray(c)||!c.every(rr))throw new TypeError('Array containing Nodes expected for parameter "args"');this.fn=s,this.args=c||[]}get name(){return this.fn.name||""}get type(){return Aa}get isFunctionNode(){return!0}_compile(s,c){var f=this.args.map(S=>S._compile(s,c));if(yr(this.fn)){var m=this.fn.name;if(c[m]){var g=this.args;return function(D,E,C){var F=Or(E,m);if(typeof F!="function")throw new TypeError("Argument '".concat(m,"' was not a function; received: ").concat(n(F)));if(F.rawArgs)return F(g,s,Gn(D,E));var _=f.map(I=>I(D,E,C));return F.apply(F,_)}}else{var v=m in s?Or(s,m):void 0,d=typeof v=="function"&&v.rawArgs===!0,p=S=>{var D;if(S.has(m))D=S.get(m);else if(m in s)D=Or(s,m);else return l.onUndefinedFunction(m);if(typeof D=="function")return D;throw new TypeError("'".concat(m,`' is not a function; its value is: + `).concat(n(D)))};if(d){var w=this.args;return function(D,E,C){var F=p(D);return F(w,s,Gn(D,E))}}else switch(f.length){case 0:return function(D,E,C){var F=p(D);return F()};case 1:return function(D,E,C){var F=p(D),_=f[0];return F(_(D,E,C))};case 2:return function(D,E,C){var F=p(D),_=f[0],I=f[1];return F(_(D,E,C),I(D,E,C))};default:return function(D,E,C){var F=p(D),_=f.map(I=>I(D,E,C));return F(..._)}}}}else if(Zt(this.fn)&&An(this.fn.index)&&this.fn.index.isObjectProperty()){var N=this.fn.object._compile(s,c),h=this.fn.index.getObjectProperty(),b=this.args;return function(D,E,C){var F=N(D,E,C),_=Qd(F,h);if(_!=null&&_.rawArgs)return _(b,s,Gn(D,E));var I=f.map($=>$(D,E,C));return _.apply(F,I)}}else{var x=this.fn.toString(),y=this.fn._compile(s,c),A=this.args;return function(D,E,C){var F=y(D,E,C);if(typeof F!="function")throw new TypeError("Expression '".concat(x,"' did not evaluate to a function; value is:")+` + `.concat(n(F)));if(F.rawArgs)return F(A,s,Gn(D,E));var _=f.map(I=>I(D,E,C));return F.apply(F,_)}}}forEach(s){s(this.fn,"fn",this);for(var c=0;c'+Jr(this.fn)+'('+c.join(',')+')'}toTex(s){var c;return s&&typeof s.handler=="object"&&Se(s.handler,this.name)&&(c=s.handler[this.name](this,s)),typeof c<"u"?c:super.toTex(s)}_toTex(s){var c=this.args.map(function(v){return v.toTex(s)}),f;nl[this.name]&&(f=nl[this.name]),a[this.name]&&(typeof a[this.name].toTex=="function"||typeof a[this.name].toTex=="object"||typeof a[this.name].toTex=="string")&&(f=a[this.name].toTex);var m;switch(typeof f){case"function":m=f(this,s);break;case"string":m=o(f,this,s);break;case"object":switch(typeof f[c.length]){case"function":m=f[c.length](this,s);break;case"string":m=o(f[c.length],this,s);break}}return typeof m<"u"?m:o(iD,this,s)}getIdentifier(){return this.type+":"+this.name}}return r=l,dr(l,"name",Aa),dr(l,"onUndefinedFunction",function(u){throw new Error("Undefined function "+u)}),dr(l,"fromJSON",function(u){return new r(u.fn,u.args)}),l},{isClass:!0,isNode:!0}),il="parse",CD=["typed","numeric","config","AccessorNode","ArrayNode","AssignmentNode","BlockNode","ConditionalNode","ConstantNode","FunctionAssignmentNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","ParenthesisNode","RangeNode","RelationalNode","SymbolNode"],MD=q(il,CD,e=>{var{typed:r,numeric:a,config:i,AccessorNode:t,ArrayNode:n,AssignmentNode:o,BlockNode:l,ConditionalNode:u,ConstantNode:s,FunctionAssignmentNode:c,FunctionNode:f,IndexNode:m,ObjectNode:v,OperatorNode:d,ParenthesisNode:p,RangeNode:w,RelationalNode:g,SymbolNode:N}=e,h=r(il,{string:function(Z){return K(Z,{})},"Array | Matrix":function(Z){return b(Z,{})},"string, Object":function(Z,ie){var xe=ie.nodes!==void 0?ie.nodes:{};return K(Z,xe)},"Array | Matrix, Object":b});function b(M){var Z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ie=Z.nodes!==void 0?Z.nodes:{};return Ze(M,function(xe){if(typeof xe!="string")throw new TypeError("String expected");return K(xe,ie)})}var x={NULL:0,DELIMITER:1,NUMBER:2,SYMBOL:3,UNKNOWN:4},y={",":!0,"(":!0,")":!0,"[":!0,"]":!0,"{":!0,"}":!0,'"':!0,"'":!0,";":!0,"+":!0,"-":!0,"*":!0,".*":!0,"/":!0,"./":!0,"%":!0,"^":!0,".^":!0,"~":!0,"!":!0,"&":!0,"|":!0,"^|":!0,"=":!0,":":!0,"?":!0,"==":!0,"!=":!0,"<":!0,">":!0,"<=":!0,">=":!0,"<<":!0,">>":!0,">>>":!0},A={mod:!0,to:!0,in:!0,and:!0,xor:!0,or:!0,not:!0},S={true:!0,false:!1,null:null,undefined:void 0},D=["NaN","Infinity"],E={'"':'"',"'":"'","\\":"\\","/":"/",b:"\b",f:"\f",n:` +`,r:"\r",t:" "};function C(){return{extraNodes:{},expression:"",comment:"",index:0,token:"",tokenType:x.NULL,nestingLevel:0,conditionalLevel:null}}function F(M,Z){return M.expression.substr(M.index,Z)}function _(M){return F(M,1)}function I(M){M.index++}function $(M){return M.expression.charAt(M.index-1)}function T(M){return M.expression.charAt(M.index+1)}function B(M){for(M.tokenType=x.NULL,M.token="",M.comment="";;){if(_(M)==="#")for(;_(M)!==` +`&&_(M)!=="";)M.comment+=_(M),I(M);if(h.isWhitespace(_(M),M.nestingLevel))I(M);else break}if(_(M)===""){M.tokenType=x.DELIMITER;return}if(_(M)===` +`&&!M.nestingLevel){M.tokenType=x.DELIMITER,M.token=_(M),I(M);return}var Z=_(M),ie=F(M,2),xe=F(M,3);if(xe.length===3&&y[xe]){M.tokenType=x.DELIMITER,M.token=xe,I(M),I(M),I(M);return}if(ie.length===2&&y[ie]){M.tokenType=x.DELIMITER,M.token=ie,I(M),I(M);return}if(y[Z]){M.tokenType=x.DELIMITER,M.token=Z,I(M);return}if(h.isDigitDot(Z)){M.tokenType=x.NUMBER;var $e=F(M,2);if($e==="0b"||$e==="0o"||$e==="0x"){for(M.token+=_(M),I(M),M.token+=_(M),I(M);h.isHexDigit(_(M));)M.token+=_(M),I(M);if(_(M)===".")for(M.token+=".",I(M);h.isHexDigit(_(M));)M.token+=_(M),I(M);else if(_(M)==="i")for(M.token+="i",I(M);h.isDigit(_(M));)M.token+=_(M),I(M);return}if(_(M)==="."){if(M.token+=_(M),I(M),!h.isDigit(_(M))){M.tokenType=x.DELIMITER;return}}else{for(;h.isDigit(_(M));)M.token+=_(M),I(M);h.isDecimalMark(_(M),T(M))&&(M.token+=_(M),I(M))}for(;h.isDigit(_(M));)M.token+=_(M),I(M);if(_(M)==="E"||_(M)==="e"){if(h.isDigit(T(M))||T(M)==="-"||T(M)==="+"){if(M.token+=_(M),I(M),(_(M)==="+"||_(M)==="-")&&(M.token+=_(M),I(M)),!h.isDigit(_(M)))throw Fe(M,'Digit expected, got "'+_(M)+'"');for(;h.isDigit(_(M));)M.token+=_(M),I(M);if(h.isDecimalMark(_(M),T(M)))throw Fe(M,'Digit expected, got "'+_(M)+'"')}else if(T(M)===".")throw I(M),Fe(M,'Digit expected, got "'+_(M)+'"')}return}if(h.isAlpha(_(M),$(M),T(M))){for(;h.isAlpha(_(M),$(M),T(M))||h.isDigit(_(M));)M.token+=_(M),I(M);Se(A,M.token)?M.tokenType=x.DELIMITER:M.tokenType=x.SYMBOL;return}for(M.tokenType=x.UNKNOWN;_(M)!=="";)M.token+=_(M),I(M);throw Fe(M,'Syntax error in part "'+M.token+'"')}function L(M){do B(M);while(M.token===` +`)}function O(M){M.nestingLevel++}function Y(M){M.nestingLevel--}h.isAlpha=function(Z,ie,xe){return h.isValidLatinOrGreek(Z)||h.isValidMathSymbol(Z,xe)||h.isValidMathSymbol(ie,Z)},h.isValidLatinOrGreek=function(Z){return/^[a-zA-Z_$\u00C0-\u02AF\u0370-\u03FF\u2100-\u214F]$/.test(Z)},h.isValidMathSymbol=function(Z,ie){return/^[\uD835]$/.test(Z)&&/^[\uDC00-\uDFFF]$/.test(ie)&&/^[^\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDFCC\uDFCD]$/.test(ie)},h.isWhitespace=function(Z,ie){return Z===" "||Z===" "||Z===` +`&&ie>0},h.isDecimalMark=function(Z,ie){return Z==="."&&ie!=="/"&&ie!=="*"&&ie!=="^"},h.isDigitDot=function(Z){return Z>="0"&&Z<="9"||Z==="."},h.isDigit=function(Z){return Z>="0"&&Z<="9"},h.isHexDigit=function(Z){return Z>="0"&&Z<="9"||Z>="a"&&Z<="f"||Z>="A"&&Z<="F"};function K(M,Z){var ie=C();xr(ie,{expression:M,extraNodes:Z}),B(ie);var xe=V(ie);if(ie.token!=="")throw ie.tokenType===x.DELIMITER?lr(ie,"Unexpected operator "+ie.token):Fe(ie,'Unexpected part "'+ie.token+'"');return xe}function V(M){var Z,ie=[],xe;for(M.token!==""&&M.token!==` +`&&M.token!==";"&&(Z=z(M),M.comment&&(Z.comment=M.comment));M.token===` +`||M.token===";";)ie.length===0&&Z&&(xe=M.token!==";",ie.push({node:Z,visible:xe})),B(M),M.token!==` +`&&M.token!==";"&&M.token!==""&&(Z=z(M),M.comment&&(Z.comment=M.comment),xe=M.token!==";",ie.push({node:Z,visible:xe}));return ie.length>0?new l(ie):(Z||(Z=new s(void 0),M.comment&&(Z.comment=M.comment)),Z)}function z(M){var Z,ie,xe,$e,Ie=Q(M);if(M.token==="="){if(yr(Ie))return Z=Ie.name,L(M),xe=z(M),new o(new N(Z),xe);if(Zt(Ie))return L(M),xe=z(M),new o(Ie.object,Ie.index,xe);if(Ot(Ie)&&yr(Ie.fn)&&($e=!0,ie=[],Z=Ie.name,Ie.args.forEach(function(Er,Mi){yr(Er)?ie[Mi]=Er.name:$e=!1}),$e))return L(M),xe=z(M),new c(Z,ie,xe);throw Fe(M,"Invalid left hand side of assignment operator =")}return Ie}function Q(M){for(var Z=le(M);M.token==="?";){var ie=M.conditionalLevel;M.conditionalLevel=M.nestingLevel,L(M);var xe=Z,$e=z(M);if(M.token!==":")throw Fe(M,"False part of conditional expression expected");M.conditionalLevel=null,L(M);var Ie=z(M);Z=new u(xe,$e,Ie),M.conditionalLevel=ie}return Z}function le(M){for(var Z=j(M);M.token==="or";)L(M),Z=new d("or","or",[Z,j(M)]);return Z}function j(M){for(var Z=re(M);M.token==="xor";)L(M),Z=new d("xor","xor",[Z,re(M)]);return Z}function re(M){for(var Z=oe(M);M.token==="and";)L(M),Z=new d("and","and",[Z,oe(M)]);return Z}function oe(M){for(var Z=ee(M);M.token==="|";)L(M),Z=new d("|","bitOr",[Z,ee(M)]);return Z}function ee(M){for(var Z=ae(M);M.token==="^|";)L(M),Z=new d("^|","bitXor",[Z,ae(M)]);return Z}function ae(M){for(var Z=se(M);M.token==="&";)L(M),Z=new d("&","bitAnd",[Z,se(M)]);return Z}function se(M){for(var Z=[pe(M)],ie=[],xe={"==":"equal","!=":"unequal","<":"smaller",">":"larger","<=":"smallerEq",">=":"largerEq"};Se(xe,M.token);){var $e={name:M.token,fn:xe[M.token]};ie.push($e),L(M),Z.push(pe(M))}return Z.length===1?Z[0]:Z.length===2?new d(ie[0].name,ie[0].fn,Z):new g(ie.map(Ie=>Ie.fn),Z)}function pe(M){var Z,ie,xe,$e;Z=Ne(M);for(var Ie={"<<":"leftShift",">>":"rightArithShift",">>>":"rightLogShift"};Se(Ie,M.token);)ie=M.token,xe=Ie[ie],L(M),$e=[Z,Ne(M)],Z=new d(ie,xe,$e);return Z}function Ne(M){var Z,ie,xe,$e;Z=Ee(M);for(var Ie={to:"to",in:"to"};Se(Ie,M.token);)ie=M.token,xe=Ie[ie],L(M),ie==="in"&&M.token===""?Z=new d("*","multiply",[Z,new N("in")],!0):($e=[Z,Ee(M)],Z=new d(ie,xe,$e));return Z}function Ee(M){var Z,ie=[];if(M.token===":"?Z=new s(1):Z=P(M),M.token===":"&&M.conditionalLevel!==M.nestingLevel){for(ie.push(Z);M.token===":"&&ie.length<3;)L(M),M.token===")"||M.token==="]"||M.token===","||M.token===""?ie.push(new N("end")):ie.push(P(M));ie.length===3?Z=new w(ie[0],ie[2],ie[1]):Z=new w(ie[0],ie[1])}return Z}function P(M){var Z,ie,xe,$e;Z=H(M);for(var Ie={"+":"add","-":"subtract"};Se(Ie,M.token);){ie=M.token,xe=Ie[ie],L(M);var Er=H(M);Er.isPercentage?$e=[Z,new d("*","multiply",[Z,Er])]:$e=[Z,Er],Z=new d(ie,xe,$e)}return Z}function H(M){var Z,ie,xe,$e;Z=te(M),ie=Z;for(var Ie={"*":"multiply",".*":"dotMultiply","/":"divide","./":"dotDivide"};Se(Ie,M.token);)xe=M.token,$e=Ie[xe],L(M),ie=te(M),Z=new d(xe,$e,[Z,ie]);return Z}function te(M){var Z,ie;for(Z=k(M),ie=Z;M.tokenType===x.SYMBOL||M.token==="in"&&We(Z)||M.tokenType===x.NUMBER&&!We(ie)&&(!vr(ie)||ie.op==="!")||M.token==="(";)ie=k(M),Z=new d("*","multiply",[Z,ie],!0);return Z}function k(M){for(var Z=X(M),ie=Z,xe=[];M.token==="/"&&Gi(ie);)if(xe.push(xr({},M)),L(M),M.tokenType===x.NUMBER)if(xe.push(xr({},M)),L(M),M.tokenType===x.SYMBOL||M.token==="(")xr(M,xe.pop()),xe.pop(),ie=X(M),Z=new d("/","divide",[Z,ie]);else{xe.pop(),xr(M,xe.pop());break}else{xr(M,xe.pop());break}return Z}function X(M){var Z,ie,xe,$e;Z=W(M);for(var Ie={"%":"mod",mod:"mod"};Se(Ie,M.token);)ie=M.token,xe=Ie[ie],L(M),ie==="%"&&M.tokenType===x.DELIMITER&&M.token!=="("?Z=new d("/","divide",[Z,new s(100)],!1,!0):($e=[Z,W(M)],Z=new d(ie,xe,$e));return Z}function W(M){var Z,ie,xe,$e={"-":"unaryMinus","+":"unaryPlus","~":"bitNot",not:"not"};return Se($e,M.token)?(xe=$e[M.token],Z=M.token,L(M),ie=[W(M)],new d(Z,xe,ie)):me(M)}function me(M){var Z,ie,xe,$e;return Z=fe(M),(M.token==="^"||M.token===".^")&&(ie=M.token,xe=ie==="^"?"pow":"dotPow",L(M),$e=[Z,W(M)],Z=new d(ie,xe,$e)),Z}function fe(M){var Z,ie,xe,$e;Z=R(M);for(var Ie={"!":"factorial","'":"ctranspose"};Se(Ie,M.token);)ie=M.token,xe=Ie[ie],B(M),$e=[Z],Z=new d(ie,xe,$e),Z=J(M,Z);return Z}function R(M){var Z=[];if(M.tokenType===x.SYMBOL&&Se(M.extraNodes,M.token)){var ie=M.extraNodes[M.token];if(B(M),M.token==="("){if(Z=[],O(M),B(M),M.token!==")")for(Z.push(z(M));M.token===",";)B(M),Z.push(z(M));if(M.token!==")")throw Fe(M,"Parenthesis ) expected");Y(M),B(M)}return new ie(Z)}return U(M)}function U(M){var Z,ie;return M.tokenType===x.SYMBOL||M.tokenType===x.DELIMITER&&M.token in A?(ie=M.token,B(M),Se(S,ie)?Z=new s(S[ie]):D.indexOf(ie)!==-1?Z=new s(a(ie,"number")):Z=new N(ie),Z=J(M,Z),Z):ne(M)}function J(M,Z,ie){for(var xe;M.token==="("||M.token==="["||M.token===".";)if(xe=[],M.token==="(")if(yr(Z)||Zt(Z)){if(O(M),B(M),M.token!==")")for(xe.push(z(M));M.token===",";)B(M),xe.push(z(M));if(M.token!==")")throw Fe(M,"Parenthesis ) expected");Y(M),B(M),Z=new f(Z,xe)}else return Z;else if(M.token==="["){if(O(M),B(M),M.token!=="]")for(xe.push(z(M));M.token===",";)B(M),xe.push(z(M));if(M.token!=="]")throw Fe(M,"Parenthesis ] expected");Y(M),B(M),Z=new t(Z,new m(xe))}else{B(M);var $e=M.tokenType===x.SYMBOL||M.tokenType===x.DELIMITER&&M.token in A;if(!$e)throw Fe(M,"Property name expected after dot");xe.push(new s(M.token)),B(M);var Ie=!0;Z=new t(Z,new m(xe,Ie))}return Z}function ne(M){var Z,ie;return M.token==='"'||M.token==="'"?(ie=ve(M,M.token),Z=new s(ie),Z=J(M,Z),Z):ce(M)}function ve(M,Z){for(var ie="";_(M)!==""&&_(M)!==Z;)if(_(M)==="\\"){I(M);var xe=_(M),$e=E[xe];if($e!==void 0)ie+=$e,M.index+=1;else if(xe==="u"){var Ie=M.expression.slice(M.index+1,M.index+5);if(/^[0-9A-Fa-f]{4}$/.test(Ie))ie+=String.fromCharCode(parseInt(Ie,16)),M.index+=5;else throw Fe(M,"Invalid unicode character \\u".concat(Ie))}else throw Fe(M,"Bad escape character \\".concat(xe))}else ie+=_(M),I(M);if(B(M),M.token!==Z)throw Fe(M,"End of string ".concat(Z," expected"));return B(M),ie}function ce(M){var Z,ie,xe,$e;if(M.token==="["){if(O(M),B(M),M.token!=="]"){var Ie=he(M);if(M.token===";"){for(xe=1,ie=[Ie];M.token===";";)B(M),M.token!=="]"&&(ie[xe]=he(M),xe++);if(M.token!=="]")throw Fe(M,"End of matrix ] expected");Y(M),B(M),$e=ie[0].items.length;for(var Er=1;Er{var{typed:r,parse:a}=e;return r(ol,{string:function(t){return a(t).compile()},"Array | Matrix":function(t){return Ze(t,function(n){return a(n).compile()})}})}),sl="evaluate",TD=["typed","parse"],OD=q(sl,TD,e=>{var{typed:r,parse:a}=e;return r(sl,{string:function(t){var n=Zn();return a(t).compile().evaluate(n)},"string, Map | Object":function(t,n){return a(t).compile().evaluate(n)},"Array | Matrix":function(t){var n=Zn();return Ze(t,function(o){return a(o).compile().evaluate(n)})},"Array | Matrix, Map | Object":function(t,n){return Ze(t,function(o){return a(o).compile().evaluate(n)})}})}),_D="Parser",$D=["evaluate"],ID=q(_D,$D,e=>{var{evaluate:r}=e;function a(){if(!(this instanceof a))throw new SyntaxError("Constructor must be called with the new operator");Object.defineProperty(this,"scope",{value:Zn(),writable:!1})}return a.prototype.type="Parser",a.prototype.isParser=!0,a.prototype.evaluate=function(i){return r(i,this.scope)},a.prototype.get=function(i){if(this.scope.has(i))return this.scope.get(i)},a.prototype.getAll=function(){return eh(this.scope)},a.prototype.getAllAsMap=function(){return this.scope},a.prototype.set=function(i,t){return this.scope.set(i,t),t},a.prototype.remove=function(i){this.scope.delete(i)},a.prototype.clear=function(){this.scope.clear()},a},{isClass:!0}),ul="parser",qD=["typed","Parser"],RD=q(ul,qD,e=>{var{typed:r,Parser:a}=e;return r(ul,{"":function(){return new a}})}),cl="lup",zD=["typed","matrix","abs","addScalar","divideScalar","multiplyScalar","subtractScalar","larger","equalScalar","unaryMinus","DenseMatrix","SparseMatrix","Spa"],PD=q(cl,zD,e=>{var{typed:r,matrix:a,abs:i,addScalar:t,divideScalar:n,multiplyScalar:o,subtractScalar:l,larger:u,equalScalar:s,unaryMinus:c,DenseMatrix:f,SparseMatrix:m,Spa:v}=e;return r(cl,{DenseMatrix:function(g){return d(g)},SparseMatrix:function(g){return p(g)},Array:function(g){var N=a(g),h=d(N);return{L:h.L.valueOf(),U:h.U.valueOf(),p:h.p}}});function d(w){var g=w._size[0],N=w._size[1],h=Math.min(g,N),b=qe(w._data),x=[],y=[g,h],A=[],S=[h,N],D,E,C,F=[];for(D=0;D0)for(D=0;D0&&z.forEach(0,T-1,function(ee,ae){m._forEachRow(ee,A,S,D,function(se,pe){se>ee&&z.accumulate(se,c(o(pe,ae)))})});var j=T,re=z.get(T),oe=i(re);z.forEach(T+1,g-1,function(ee,ae){var se=i(ae);u(se,oe)&&(j=ee,oe=se,re=ae)}),T!==j&&(m._swapRows(T,j,E[1],A,S,D),m._swapRows(T,j,I[1],C,F,_),z.swap(T,j),Y(T,j)),z.forEach(0,g-1,function(ee,ae){ee<=T?(C.push(ae),F.push(ee)):(ae=n(ae,re),s(ae,0)||(A.push(ae),S.push(ee)))})};for(T=0;T{var{typed:r,matrix:a,zeros:i,identity:t,isZero:n,equal:o,sign:l,sqrt:u,conj:s,unaryMinus:c,addScalar:f,divideScalar:m,multiplyScalar:v,subtractScalar:d,complex:p}=e;return xr(r(ll,{DenseMatrix:function(b){return g(b)},SparseMatrix:function(b){return N()},Array:function(b){var x=a(b),y=g(x);return{Q:y.Q.valueOf(),R:y.R.valueOf()}}}),{_denseQRimpl:w});function w(h){var b=h._size[0],x=h._size[1],y=t([b],"dense"),A=y._data,S=h.clone(),D=S._data,E,C,F,_=i([b],"");for(F=0;F0)for(var y=x[0][0].type==="Complex"?p(0):0,A=0;A=0;){var u=a[o+l],s=a[i+u];s===-1?(l--,n[r++]=u):(a[i+u]=a[t+s],++l,a[o+l]=s)}return r}function HD(e,r){if(!e)return null;var a=0,i,t=[],n=[],o=0,l=r,u=2*r;for(i=0;i=0;i--)e[i]!==-1&&(n[l+i]=n[o+e[i]],n[o+e[i]]=i);for(i=0;i{var{add:r,multiply:a,transpose:i}=e;return function(c,f){if(!f||c<=0||c>3)return null;var m=f._size,v=m[0],d=m[1],p=0,w=Math.max(16,10*Math.sqrt(d));w=Math.min(d-2,w);var g=t(c,f,v,d,w);VD(g,u,null);for(var N=g._index,h=g._ptr,b=h[d],x=[],y=[],A=0,S=d+1,D=2*(d+1),E=3*(d+1),C=4*(d+1),F=5*(d+1),_=6*(d+1),I=7*(d+1),$=x,T=n(d,h,y,A,E,$,D,I,S,_,C,F),B=o(d,h,y,F,C,_,w,S,E,$,D),L=0,O,Y,K,V,z,Q,le,j,re,oe,ee,ae,se,pe,Ne,Ee;BP?(Q=K,le=k,j=y[A+K]-P):(Q=N[k++],le=h[Q],j=y[A+Q]),z=1;z<=j;z++)O=N[le++],!((re=y[S+O])<=0)&&(te+=re,y[S+O]=-re,N[W++]=O,y[D+O]!==-1&&($[y[D+O]]=$[O]),$[O]!==-1?y[D+$[O]]=y[D+O]:y[E+y[F+O]]=y[D+O]);Q!==K&&(h[Q]=Ft(K),y[_+Q]=0)}for(P!==0&&(b=W),y[F+K]=te,h[K]=X,y[A+K]=W-X,y[C+K]=-2,T=l(T,p,y,_,d),oe=X;oe=T?y[_+Q]-=re:y[_+Q]!==0&&(y[_+Q]=y[F+Q]+me)}for(oe=X;oe0?(Ee+=fe,N[pe++]=Q,Ne+=Q):(h[Q]=Ft(K),y[_+Q]=0)}y[C+O]=pe-ae+1;var R=pe,U=ae+y[A+O];for(k=se+1;k=0))for(Ne=$[O],O=y[I+Ne],y[I+Ne]=-1;O!==-1&&y[D+O]!==-1;O=y[D+O],T++){for(j=y[A+O],ee=y[C+O],k=h[O]+1;k<=h[O]+j-1;k++)y[_+N[k]]=T;var ne=O;for(Y=y[D+O];Y!==-1;){var ve=y[A+Y]===j&&y[C+Y]===ee;for(k=h[Y]+1;ve&&k<=h[Y]+j-1;k++)y[_+N[k]]!==T&&(ve=0);ve?(h[Y]=Ft(O),y[S+O]+=y[S+Y],y[S+Y]=0,y[C+Y]=-1,Y=y[D+Y],y[D+ne]=Y):(ne=Y,Y=y[D+Y])}}for(k=X,oe=X;oe=0;Y--)y[S+Y]>0||(y[D+Y]=y[E+h[Y]],y[E+h[Y]]=Y);for(Q=d;Q>=0;Q--)y[S+Q]<=0||h[Q]!==-1&&(y[D+Q]=y[E+h[Q]],y[E+h[Q]]=Q);for(K=0,O=0;O<=d;O++)h[O]===-1&&(K=Sv(O,K,y,E,D,x,_));return x.splice(x.length-1,1),x};function t(s,c,f,m,v){var d=i(c);if(s===1&&m===f)return r(c,d);if(s===2){for(var p=d._index,w=d._ptr,g=0,N=0;Nv))for(var b=w[N+1];hp)f[w+x]=0,f[v+x]=-1,b++,c[x]=Ft(s),f[w+s]++;else{var A=f[g+y];A!==-1&&(N[A]=x),f[h+x]=f[g+y],f[g+y]=x}}return b}function l(s,c,f,m,v){if(s<2||s+c<0){for(var d=0;d{var{transpose:r}=e;return function(a,i,t,n){if(!a||!i||!t)return null;var o=a._size,l=o[0],u=o[1],s,c,f,m,v,d,p,w=4*u+(n?u+l+1:0),g=[],N=0,h=u,b=2*u,x=3*u,y=4*u,A=5*u+1;for(f=0;f=1&&S[c]++,F.jleaf===2&&S[F.q]--}i[c]!==-1&&(g[N+c]=i[c])}for(c=0;c{var{add:r,multiply:a,transpose:i}=e,t=YD({add:r,multiply:a,transpose:i}),n=KD({transpose:i});return function(u,s,c){var f=s._ptr,m=s._size,v=m[1],d,p={};if(p.q=t(u,s),u&&!p.q)return null;if(c){var w=u?kD(s,null,p.q):s;p.parent=GD(w);var g=HD(p.parent,v);if(p.cp=n(w,p.parent,g,1),w&&p.parent&&p.cp&&o(w,p))for(p.unz=0,d=0;d=0;A--)for(D=s[A],E=s[A+1],S=D;S=0;y--)p[y]=-1,A=w[y],A!==-1&&(g[x+A]++===0&&(g[b+A]=y),g[N+y]=g[h+A],g[h+A]=y);for(u.lnz=0,u.m2=m,A=0;A=0;){e=i[m];var v=t?t[e]:e;no(o,e)||(Cv(o,e),i[u+m]=v<0?0:fl(o[v]));var d=1;for(c=i[u+m],f=v<0?0:fl(o[v+1]);c{var{divideScalar:r,multiply:a,subtract:i}=e;return function(n,o,l,u,s,c,f){var m=n._values,v=n._index,d=n._ptr,p=n._size,w=p[1],g=o._values,N=o._index,h=o._ptr,b,x,y,A,S=nA(n,o,l,u,c);for(b=S;b{var{abs:r,divideScalar:a,multiply:i,subtract:t,larger:n,largerEq:o,SparseMatrix:l}=e,u=oA({divideScalar:a,multiply:i,subtract:t});return function(c,f,m){if(!c)return null;var v=c._size,d=v[1],p,w=100,g=100;f&&(p=f.q,w=f.lnz||w,g=f.unz||g);var N=[],h=[],b=[],x=new l({values:N,index:h,ptr:b,size:[d,d]}),y=[],A=[],S=[],D=new l({values:y,index:A,ptr:S,size:[d,d]}),E=[],C,F,_=[],I=[];for(C=0;C{var{typed:r,abs:a,add:i,multiply:t,transpose:n,divideScalar:o,subtract:l,larger:u,largerEq:s,SparseMatrix:c}=e,f=rA({add:i,multiply:t,transpose:n}),m=cA({abs:a,divideScalar:o,multiply:t,subtract:l,larger:u,largerEq:s,SparseMatrix:c});return r(ml,{"SparseMatrix, number, number":function(d,p,w){if(!Ce(p)||p<0||p>3)throw new Error("Symbolic Ordering and Analysis order must be an integer number in the interval [0, 3]");if(w<0||w>1)throw new Error("Partial pivoting threshold must be a number from 0 to 1");var g=f(p,d,!1),N=m(d,g,w);return{L:N.L,U:N.U,p:N.pinv,q:g.q,toString:function(){return"L: "+this.L.toString()+` +U: `+this.U.toString()+` +p: `+this.p.toString()+(this.q?` +q: `+this.q.toString():"")+` +`}}}})});function vl(e,r){var a,i=r.length,t=[];if(e)for(a=0;a{var{typed:r,matrix:a,lup:i,slu:t,usolve:n,lsolve:o,DenseMatrix:l}=e,u=ea({DenseMatrix:l});return r(pl,{"Array, Array | Matrix":function(m,v){m=a(m);var d=i(m),p=c(d.L,d.U,d.p,null,v);return p.valueOf()},"DenseMatrix, Array | Matrix":function(m,v){var d=i(m);return c(d.L,d.U,d.p,null,v)},"SparseMatrix, Array | Matrix":function(m,v){var d=i(m);return c(d.L,d.U,d.p,null,v)},"SparseMatrix, Array | Matrix, number, number":function(m,v,d,p){var w=t(m,d,p);return c(w.L,w.U,w.p,w.q,v)},"Object, Array | Matrix":function(m,v){return c(m.L,m.U,m.p,m.q,v)}});function s(f){if(Te(f))return f;if(je(f))return a(f);throw new TypeError("Invalid Matrix LU decomposition")}function c(f,m,v,d,p){f=s(f),m=s(m),v&&(p=u(f,p,!0),p._data=vl(v,p._data));var w=o(f,p),g=n(m,w);return d&&(g._data=vl(d,g._data)),g}}),dl="polynomialRoot",pA=["typed","isZero","equalScalar","add","subtract","multiply","divide","sqrt","unaryMinus","cbrt","typeOf","im","re"],dA=q(dl,pA,e=>{var{typed:r,isZero:a,equalScalar:i,add:t,subtract:n,multiply:o,divide:l,sqrt:u,unaryMinus:s,cbrt:c,typeOf:f,im:m,re:v}=e;return r(dl,{"number|Complex, ...number|Complex":(d,p)=>{for(var w=[d,...p];w.length>0&&a(w[w.length-1]);)w.pop();if(w.length<2)throw new RangeError("Polynomial [".concat(d,", ").concat(p,"] must have a non-zero non-constant coefficient"));switch(w.length){case 2:return[s(l(w[0],w[1]))];case 3:{var[g,N,h]=w,b=o(2,h),x=o(N,N),y=o(4,h,g);if(i(x,y))return[l(s(N),b)];var A=u(n(x,y));return[l(n(A,N),b),l(n(s(A),N),b)]}case 4:{var[S,D,E,C]=w,F=s(o(3,C)),_=o(E,E),I=o(3,C,D),$=t(o(2,E,E,E),o(27,C,C,S)),T=o(9,C,E,D);if(i(_,I)&&i($,T))return[l(E,F)];var B=n(_,I),L=n($,T),O=t(o(18,C,E,D,S),o(E,E,D,D)),Y=t(o(4,E,E,E,S),o(4,C,D,D,D),o(27,C,C,S,S));if(i(O,Y))return[l(n(o(4,C,E,D),t(o(9,C,C,S),o(E,E,E))),o(C,B)),l(n(o(9,C,S),o(E,D)),o(2,B))];var K;i(_,I)?K=L:K=l(t(L,u(n(o(L,L),o(4,B,B,B)))),2);var V=!0,z=c(K,V).toArray().map(Q=>l(t(E,Q,l(B,Q)),F));return z.map(Q=>f(Q)==="Complex"&&i(v(Q),v(Q)+m(Q))?v(Q):Q)}default:throw new RangeError("only implemented for cubic or lower-order polynomials, not ".concat(w))}}})}),hA="Help",gA=["evaluate"],yA=q(hA,gA,e=>{var{evaluate:r}=e;function a(i){if(!(this instanceof a))throw new SyntaxError("Constructor must be called with the new operator");if(!i)throw new Error('Argument "doc" missing');this.doc=i}return a.prototype.type="Help",a.prototype.isHelp=!0,a.prototype.toString=function(){var i=this.doc||{},t=` +`;if(i.name&&(t+="Name: "+i.name+` + +`),i.category&&(t+="Category: "+i.category+` + +`),i.description&&(t+=`Description: + `+i.description+` + +`),i.syntax&&(t+=`Syntax: + `+i.syntax.join(` + `)+` + +`),i.examples){t+=`Examples: +`;for(var n=!1,o=r("config()"),l={config:f=>(n=!0,r("config(newConfig)",{newConfig:f}))},u=0;un!=="mathjs").forEach(n=>{t[n]=i[n]}),new a(t)},a.prototype.valueOf=a.prototype.toString,a},{isClass:!0}),bA="Chain",xA=["?on","math","typed"],wA=q(bA,xA,e=>{var{on:r,math:a,typed:i}=e;function t(s){if(!(this instanceof t))throw new SyntaxError("Constructor must be called with the new operator");Ff(s)?this.value=s.value:this.value=s}t.prototype.type="Chain",t.prototype.isChain=!0,t.prototype.done=function(){return this.value},t.prototype.valueOf=function(){return this.value},t.prototype.toString=function(){return Ge(this.value)},t.prototype.toJSON=function(){return{mathjs:"Chain",value:this.value}},t.fromJSON=function(s){return new t(s.value)};function n(s,c){typeof c=="function"&&(t.prototype[s]=l(c))}function o(s,c){gd(t.prototype,s,function(){var m=c();if(typeof m=="function")return l(m)})}function l(s){return function(){if(arguments.length===0)return new t(s(this.value));for(var c=[this.value],f=0;fs[d])};for(var m in s)f(m)}};var u={expression:!0,docs:!0,type:!0,classes:!0,json:!0,error:!0,isChain:!0};return t.createProxy(a),r&&r("import",function(s,c,f){f||o(s,c)}),t},{isClass:!0}),hl={name:"e",category:"Constants",syntax:["e"],description:"Euler's number, the base of the natural logarithm. Approximately equal to 2.71828",examples:["e","e ^ 2","exp(2)","log(e)"],seealso:["exp"]},NA={name:"false",category:"Constants",syntax:["false"],description:"Boolean value false",examples:["false"],seealso:["true"]},DA={name:"i",category:"Constants",syntax:["i"],description:"Imaginary unit, defined as i*i=-1. A complex number is described as a + b*i, where a is the real part, and b is the imaginary part.",examples:["i","i * i","sqrt(-1)"],seealso:[]},AA={name:"Infinity",category:"Constants",syntax:["Infinity"],description:"Infinity, a number which is larger than the maximum number that can be handled by a floating point number.",examples:["Infinity","1 / 0"],seealso:[]},EA={name:"LN10",category:"Constants",syntax:["LN10"],description:"Returns the natural logarithm of 10, approximately equal to 2.302",examples:["LN10","log(10)"],seealso:[]},SA={name:"LN2",category:"Constants",syntax:["LN2"],description:"Returns the natural logarithm of 2, approximately equal to 0.693",examples:["LN2","log(2)"],seealso:[]},CA={name:"LOG10E",category:"Constants",syntax:["LOG10E"],description:"Returns the base-10 logarithm of E, approximately equal to 0.434",examples:["LOG10E","log(e, 10)"],seealso:[]},MA={name:"LOG2E",category:"Constants",syntax:["LOG2E"],description:"Returns the base-2 logarithm of E, approximately equal to 1.442",examples:["LOG2E","log(e, 2)"],seealso:[]},FA={name:"NaN",category:"Constants",syntax:["NaN"],description:"Not a number",examples:["NaN","0 / 0"],seealso:[]},BA={name:"null",category:"Constants",syntax:["null"],description:"Value null",examples:["null"],seealso:["true","false"]},TA={name:"phi",category:"Constants",syntax:["phi"],description:"Phi is the golden ratio. Two quantities are in the golden ratio if their ratio is the same as the ratio of their sum to the larger of the two quantities. Phi is defined as `(1 + sqrt(5)) / 2` and is approximately 1.618034...",examples:["phi"],seealso:[]},gl={name:"pi",category:"Constants",syntax:["pi"],description:"The number pi is a mathematical constant that is the ratio of a circle's circumference to its diameter, and is approximately equal to 3.14159",examples:["pi","sin(pi/2)"],seealso:["tau"]},OA={name:"SQRT1_2",category:"Constants",syntax:["SQRT1_2"],description:"Returns the square root of 1/2, approximately equal to 0.707",examples:["SQRT1_2","sqrt(1/2)"],seealso:[]},_A={name:"SQRT2",category:"Constants",syntax:["SQRT2"],description:"Returns the square root of 2, approximately equal to 1.414",examples:["SQRT2","sqrt(2)"],seealso:[]},$A={name:"tau",category:"Constants",syntax:["tau"],description:"Tau is the ratio constant of a circle's circumference to radius, equal to 2 * pi, approximately 6.2832.",examples:["tau","2 * pi"],seealso:["pi"]},IA={name:"true",category:"Constants",syntax:["true"],description:"Boolean value true",examples:["true"],seealso:["false"]},qA={name:"version",category:"Constants",syntax:["version"],description:"A string with the version number of math.js",examples:["version"],seealso:[]},RA={name:"bignumber",category:"Construction",syntax:["bignumber(x)"],description:"Create a big number from a number or string.",examples:["0.1 + 0.2","bignumber(0.1) + bignumber(0.2)",'bignumber("7.2")','bignumber("7.2e500")',"bignumber([0.1, 0.2, 0.3])"],seealso:["boolean","complex","fraction","index","matrix","string","unit"]},zA={name:"boolean",category:"Construction",syntax:["x","boolean(x)"],description:"Convert a string or number into a boolean.",examples:["boolean(0)","boolean(1)","boolean(3)",'boolean("true")','boolean("false")',"boolean([1, 0, 1, 1])"],seealso:["bignumber","complex","index","matrix","number","string","unit"]},PA={name:"complex",category:"Construction",syntax:["complex()","complex(re, im)","complex(string)"],description:"Create a complex number.",examples:["complex()","complex(2, 3)",'complex("7 - 2i")'],seealso:["bignumber","boolean","index","matrix","number","string","unit"]},UA={name:"createUnit",category:"Construction",syntax:["createUnit(definitions)","createUnit(name, definition)"],description:"Create a user-defined unit and register it with the Unit type.",examples:['createUnit("foo")','createUnit("knot", {definition: "0.514444444 m/s", aliases: ["knots", "kt", "kts"]})','createUnit("mph", "1 mile/hour")'],seealso:["unit","splitUnit"]},LA={name:"fraction",category:"Construction",syntax:["fraction(num)","fraction(matrix)","fraction(num,den)","fraction({n: num, d: den})"],description:"Create a fraction from a number or from integer numerator and denominator.",examples:["fraction(0.125)","fraction(1, 3) + fraction(2, 5)","fraction({n: 333, d: 53})","fraction([sqrt(9), sqrt(10), sqrt(11)])"],seealso:["bignumber","boolean","complex","index","matrix","string","unit"]},kA={name:"index",category:"Construction",syntax:["[start]","[start:end]","[start:step:end]","[start1, start 2, ...]","[start1:end1, start2:end2, ...]","[start1:step1:end1, start2:step2:end2, ...]"],description:"Create an index to get or replace a subset of a matrix",examples:["A = [1, 2, 3; 4, 5, 6]","A[1, :]","A[1, 2] = 50","A[1:2, 1:2] = 1","B = [1, 2, 3]","B[B>1 and B<3]"],seealso:["bignumber","boolean","complex","matrix,","number","range","string","unit"]},HA={name:"matrix",category:"Construction",syntax:["[]","[a1, b1, ...; a2, b2, ...]","matrix()",'matrix("dense")',"matrix([...])"],description:"Create a matrix.",examples:["[]","[1, 2, 3]","[1, 2, 3; 4, 5, 6]","matrix()","matrix([3, 4])",'matrix([3, 4; 5, 6], "sparse")','matrix([3, 4; 5, 6], "sparse", "number")'],seealso:["bignumber","boolean","complex","index","number","string","unit","sparse"]},GA={name:"number",category:"Construction",syntax:["x","number(x)","number(unit, valuelessUnit)"],description:"Create a number or convert a string or boolean into a number.",examples:["2","2e3","4.05","number(2)",'number("7.2")',"number(true)","number([true, false, true, true])",'number(unit("52cm"), "m")'],seealso:["bignumber","boolean","complex","fraction","index","matrix","string","unit"]},VA={name:"sparse",category:"Construction",syntax:["sparse()","sparse([a1, b1, ...; a1, b2, ...])",'sparse([a1, b1, ...; a1, b2, ...], "number")'],description:"Create a sparse matrix.",examples:["sparse()","sparse([3, 4; 5, 6])",'sparse([3, 0; 5, 0], "number")'],seealso:["bignumber","boolean","complex","index","number","string","unit","matrix"]},ZA={name:"splitUnit",category:"Construction",syntax:["splitUnit(unit: Unit, parts: Unit[])"],description:"Split a unit in an array of units whose sum is equal to the original unit.",examples:['splitUnit(1 m, ["feet", "inch"])'],seealso:["unit","createUnit"]},XA={name:"string",category:"Construction",syntax:['"text"',"string(x)"],description:"Create a string or convert a value to a string",examples:['"Hello World!"',"string(4.2)","string(3 + 2i)"],seealso:["bignumber","boolean","complex","index","matrix","number","unit"]},YA={name:"unit",category:"Construction",syntax:["value unit","unit(value, unit)","unit(string)"],description:"Create a unit.",examples:["5.5 mm","3 inch",'unit(7.1, "kilogram")','unit("23 deg")'],seealso:["bignumber","boolean","complex","index","matrix","number","string"]},WA={name:"config",category:"Core",syntax:["config()","config(options)"],description:"Get configuration or change configuration.",examples:["config()","1/3 + 1/4",'config({number: "Fraction"})',"1/3 + 1/4"],seealso:[]},JA={name:"import",category:"Core",syntax:["import(functions)","import(functions, options)"],description:"Import functions or constants from an object.",examples:["import({myFn: f(x)=x^2, myConstant: 32 })","myFn(2)","myConstant"],seealso:[]},QA={name:"typed",category:"Core",syntax:["typed(signatures)","typed(name, signatures)"],description:"Create a typed function.",examples:['double = typed({ "number": f(x)=x+x, "string": f(x)=concat(x,x) })',"double(2)",'double("hello")'],seealso:[]},KA={name:"derivative",category:"Algebra",syntax:["derivative(expr, variable)","derivative(expr, variable, {simplify: boolean})"],description:"Takes the derivative of an expression expressed in parser Nodes. The derivative will be taken over the supplied variable in the second parameter. If there are multiple variables in the expression, it will return a partial derivative.",examples:['derivative("2x^3", "x")','derivative("2x^3", "x", {simplify: false})','derivative("2x^2 + 3x + 4", "x")','derivative("sin(2x)", "x")','f = parse("x^2 + x")','x = parse("x")',"df = derivative(f, x)","df.evaluate({x: 3})"],seealso:["simplify","parse","evaluate"]},jA={name:"leafCount",category:"Algebra",syntax:["leafCount(expr)"],description:"Computes the number of leaves in the parse tree of the given expression",examples:['leafCount("e^(i*pi)-1")','leafCount(parse("{a: 22/7, b: 10^(1/2)}"))'],seealso:["simplify"]},eE={name:"lsolve",category:"Algebra",syntax:["x=lsolve(L, b)"],description:"Finds one solution of the linear system L * x = b where L is an [n x n] lower triangular matrix and b is a [n] column vector.",examples:["a = [-2, 3; 2, 1]","b = [11, 9]","x = lsolve(a, b)"],seealso:["lsolveAll","lup","lusolve","usolve","matrix","sparse"]},rE={name:"lsolveAll",category:"Algebra",syntax:["x=lsolveAll(L, b)"],description:"Finds all solutions of the linear system L * x = b where L is an [n x n] lower triangular matrix and b is a [n] column vector.",examples:["a = [-2, 3; 2, 1]","b = [11, 9]","x = lsolve(a, b)"],seealso:["lsolve","lup","lusolve","usolve","matrix","sparse"]},tE={name:"lup",category:"Algebra",syntax:["lup(m)"],description:"Calculate the Matrix LU decomposition with partial pivoting. Matrix A is decomposed in three matrices (L, U, P) where P * A = L * U",examples:["lup([[2, 1], [1, 4]])","lup(matrix([[2, 1], [1, 4]]))","lup(sparse([[2, 1], [1, 4]]))"],seealso:["lusolve","lsolve","usolve","matrix","sparse","slu","qr"]},nE={name:"lusolve",category:"Algebra",syntax:["x=lusolve(A, b)","x=lusolve(lu, b)"],description:"Solves the linear system A * x = b where A is an [n x n] matrix and b is a [n] column vector.",examples:["a = [-2, 3; 2, 1]","b = [11, 9]","x = lusolve(a, b)"],seealso:["lup","slu","lsolve","usolve","matrix","sparse"]},aE={name:"polynomialRoot",category:"Algebra",syntax:["x=polynomialRoot(-6, 3)","x=polynomialRoot(4, -4, 1)","x=polynomialRoot(-8, 12, -6, 1)"],description:"Finds the roots of a univariate polynomial given by its coefficients starting from constant, linear, and so on, increasing in degree.",examples:["a = polynomialRoot(-6, 11, -6, 1)"],seealso:["cbrt","sqrt"]},iE={name:"qr",category:"Algebra",syntax:["qr(A)"],description:"Calculates the Matrix QR decomposition. Matrix `A` is decomposed in two matrices (`Q`, `R`) where `Q` is an orthogonal matrix and `R` is an upper triangular matrix.",examples:["qr([[1, -1, 4], [1, 4, -2], [1, 4, 2], [1, -1, 0]])"],seealso:["lup","slu","matrix"]},oE={name:"rationalize",category:"Algebra",syntax:["rationalize(expr)","rationalize(expr, scope)","rationalize(expr, scope, detailed)"],description:"Transform a rationalizable expression in a rational fraction. If rational fraction is one variable polynomial then converts the numerator and denominator in canonical form, with decreasing exponents, returning the coefficients of numerator.",examples:['rationalize("2x/y - y/(x+1)")','rationalize("2x/y - y/(x+1)", true)'],seealso:["simplify"]},sE={name:"resolve",category:"Algebra",syntax:["resolve(node, scope)"],description:"Recursively substitute variables in an expression tree.",examples:['resolve(parse("1 + x"), { x: 7 })','resolve(parse("size(text)"), { text: "Hello World" })','resolve(parse("x + y"), { x: parse("3z") })','resolve(parse("3x"), { x: parse("y+z"), z: parse("w^y") })'],seealso:["simplify","evaluate"],mayThrow:["ReferenceError"]},uE={name:"simplify",category:"Algebra",syntax:["simplify(expr)","simplify(expr, rules)"],description:"Simplify an expression tree.",examples:['simplify("3 + 2 / 4")','simplify("2x + x")','f = parse("x * (x + 2 + x)")',"simplified = simplify(f)","simplified.evaluate({x: 2})"],seealso:["simplifyCore","derivative","evaluate","parse","rationalize","resolve"]},cE={name:"simplifyConstant",category:"Algebra",syntax:["simplifyConstant(expr)","simplifyConstant(expr, options)"],description:"Replace constant subexpressions of node with their values.",examples:['simplifyConstant("(3-3)*x")','simplifyConstant(parse("z-cos(tau/8)"))'],seealso:["simplify","simplifyCore","evaluate"]},lE={name:"simplifyCore",category:"Algebra",syntax:["simplifyCore(node)"],description:"Perform simple one-pass simplifications on an expression tree.",examples:['simplifyCore(parse("0*x"))','simplifyCore(parse("(x+0)*2"))'],seealso:["simplify","simplifyConstant","evaluate"]},fE={name:"slu",category:"Algebra",syntax:["slu(A, order, threshold)"],description:"Calculate the Matrix LU decomposition with full pivoting. Matrix A is decomposed in two matrices (L, U) and two permutation vectors (pinv, q) where P * A * Q = L * U",examples:["slu(sparse([4.5, 0, 3.2, 0; 3.1, 2.9, 0, 0.9; 0, 1.7, 3, 0; 3.5, 0.4, 0, 1]), 1, 0.001)"],seealso:["lusolve","lsolve","usolve","matrix","sparse","lup","qr"]},mE={name:"symbolicEqual",category:"Algebra",syntax:["symbolicEqual(expr1, expr2)","symbolicEqual(expr1, expr2, options)"],description:"Returns true if the difference of the expressions simplifies to 0",examples:['symbolicEqual("x*y","y*x")','symbolicEqual("abs(x^2)", "x^2")','symbolicEqual("abs(x)", "x", {context: {abs: {trivial: true}}})'],seealso:["simplify","evaluate"]},vE={name:"usolve",category:"Algebra",syntax:["x=usolve(U, b)"],description:"Finds one solution of the linear system U * x = b where U is an [n x n] upper triangular matrix and b is a [n] column vector.",examples:["x=usolve(sparse([1, 1, 1, 1; 0, 1, 1, 1; 0, 0, 1, 1; 0, 0, 0, 1]), [1; 2; 3; 4])"],seealso:["usolveAll","lup","lusolve","lsolve","matrix","sparse"]},pE={name:"usolveAll",category:"Algebra",syntax:["x=usolve(U, b)"],description:"Finds all solutions of the linear system U * x = b where U is an [n x n] upper triangular matrix and b is a [n] column vector.",examples:["x=usolve(sparse([1, 1, 1, 1; 0, 1, 1, 1; 0, 0, 1, 1; 0, 0, 0, 1]), [1; 2; 3; 4])"],seealso:["usolve","lup","lusolve","lsolve","matrix","sparse"]},dE={name:"abs",category:"Arithmetic",syntax:["abs(x)"],description:"Compute the absolute value.",examples:["abs(3.5)","abs(-4.2)"],seealso:["sign"]},hE={name:"add",category:"Operators",syntax:["x + y","add(x, y)"],description:"Add two values.",examples:["a = 2.1 + 3.6","a - 3.6","3 + 2i","3 cm + 2 inch",'"2.3" + "4"'],seealso:["subtract"]},gE={name:"cbrt",category:"Arithmetic",syntax:["cbrt(x)","cbrt(x, allRoots)"],description:"Compute the cubic root value. If x = y * y * y, then y is the cubic root of x. When `x` is a number or complex number, an optional second argument `allRoots` can be provided to return all three cubic roots. If not provided, the principal root is returned",examples:["cbrt(64)","cube(4)","cbrt(-8)","cbrt(2 + 3i)","cbrt(8i)","cbrt(8i, true)","cbrt(27 m^3)"],seealso:["square","sqrt","cube","multiply"]},yE={name:"ceil",category:"Arithmetic",syntax:["ceil(x)"],description:"Round a value towards plus infinity. If x is complex, both real and imaginary part are rounded towards plus infinity.",examples:["ceil(3.2)","ceil(3.8)","ceil(-4.2)"],seealso:["floor","fix","round"]},bE={name:"cube",category:"Arithmetic",syntax:["cube(x)"],description:"Compute the cube of a value. The cube of x is x * x * x.",examples:["cube(2)","2^3","2 * 2 * 2"],seealso:["multiply","square","pow"]},xE={name:"divide",category:"Operators",syntax:["x / y","divide(x, y)"],description:"Divide two values.",examples:["a = 2 / 3","a * 3","4.5 / 2","3 + 4 / 2","(3 + 4) / 2","18 km / 4.5"],seealso:["multiply"]},wE={name:"dotDivide",category:"Operators",syntax:["x ./ y","dotDivide(x, y)"],description:"Divide two values element wise.",examples:["a = [1, 2, 3; 4, 5, 6]","b = [2, 1, 1; 3, 2, 5]","a ./ b"],seealso:["multiply","dotMultiply","divide"]},NE={name:"dotMultiply",category:"Operators",syntax:["x .* y","dotMultiply(x, y)"],description:"Multiply two values element wise.",examples:["a = [1, 2, 3; 4, 5, 6]","b = [2, 1, 1; 3, 2, 5]","a .* b"],seealso:["multiply","divide","dotDivide"]},DE={name:"dotPow",category:"Operators",syntax:["x .^ y","dotPow(x, y)"],description:"Calculates the power of x to y element wise.",examples:["a = [1, 2, 3; 4, 5, 6]","a .^ 2"],seealso:["pow"]},AE={name:"exp",category:"Arithmetic",syntax:["exp(x)"],description:"Calculate the exponent of a value.",examples:["exp(1.3)","e ^ 1.3","log(exp(1.3))","x = 2.4","(exp(i*x) == cos(x) + i*sin(x)) # Euler's formula"],seealso:["expm","expm1","pow","log"]},EE={name:"expm",category:"Arithmetic",syntax:["exp(x)"],description:"Compute the matrix exponential, expm(A) = e^A. The matrix must be square. Not to be confused with exp(a), which performs element-wise exponentiation.",examples:["expm([[0,2],[0,0]])"],seealso:["exp"]},SE={name:"expm1",category:"Arithmetic",syntax:["expm1(x)"],description:"Calculate the value of subtracting 1 from the exponential value.",examples:["expm1(2)","pow(e, 2) - 1","log(expm1(2) + 1)"],seealso:["exp","pow","log"]},CE={name:"fix",category:"Arithmetic",syntax:["fix(x)"],description:"Round a value towards zero. If x is complex, both real and imaginary part are rounded towards zero.",examples:["fix(3.2)","fix(3.8)","fix(-4.2)","fix(-4.8)"],seealso:["ceil","floor","round"]},ME={name:"floor",category:"Arithmetic",syntax:["floor(x)"],description:"Round a value towards minus infinity.If x is complex, both real and imaginary part are rounded towards minus infinity.",examples:["floor(3.2)","floor(3.8)","floor(-4.2)"],seealso:["ceil","fix","round"]},FE={name:"gcd",category:"Arithmetic",syntax:["gcd(a, b)","gcd(a, b, c, ...)"],description:"Compute the greatest common divisor.",examples:["gcd(8, 12)","gcd(-4, 6)","gcd(25, 15, -10)"],seealso:["lcm","xgcd"]},BE={name:"hypot",category:"Arithmetic",syntax:["hypot(a, b, c, ...)","hypot([a, b, c, ...])"],description:"Calculate the hypotenusa of a list with values. ",examples:["hypot(3, 4)","sqrt(3^2 + 4^2)","hypot(-2)","hypot([3, 4, 5])"],seealso:["abs","norm"]},TE={name:"invmod",category:"Arithmetic",syntax:["invmod(a, b)"],description:"Calculate the (modular) multiplicative inverse of a modulo b. Solution to the equation ax โ‰ฃ 1 (mod b)",examples:["invmod(8, 12)","invmod(7, 13)","invmod(15151, 15122)"],seealso:["gcd","xgcd"]},OE={name:"lcm",category:"Arithmetic",syntax:["lcm(x, y)"],description:"Compute the least common multiple.",examples:["lcm(4, 6)","lcm(6, 21)","lcm(6, 21, 5)"],seealso:["gcd"]},_E={name:"log",category:"Arithmetic",syntax:["log(x)","log(x, base)"],description:"Compute the logarithm of a value. If no base is provided, the natural logarithm of x is calculated. If base if provided, the logarithm is calculated for the specified base. log(x, base) is defined as log(x) / log(base).",examples:["log(3.5)","a = log(2.4)","exp(a)","10 ^ 4","log(10000, 10)","log(10000) / log(10)","b = log(1024, 2)","2 ^ b"],seealso:["exp","log1p","log2","log10"]},$E={name:"log10",category:"Arithmetic",syntax:["log10(x)"],description:"Compute the 10-base logarithm of a value.",examples:["log10(0.00001)","log10(10000)","10 ^ 4","log(10000) / log(10)","log(10000, 10)"],seealso:["exp","log"]},IE={name:"log1p",category:"Arithmetic",syntax:["log1p(x)","log1p(x, base)"],description:"Calculate the logarithm of a `value+1`",examples:["log1p(2.5)","exp(log1p(1.4))","pow(10, 4)","log1p(9999, 10)","log1p(9999) / log(10)"],seealso:["exp","log","log2","log10"]},qE={name:"log2",category:"Arithmetic",syntax:["log2(x)"],description:"Calculate the 2-base of a value. This is the same as calculating `log(x, 2)`.",examples:["log2(0.03125)","log2(16)","log2(16) / log2(2)","pow(2, 4)"],seealso:["exp","log1p","log","log10"]},RE={name:"mod",category:"Operators",syntax:["x % y","x mod y","mod(x, y)"],description:"Calculates the modulus, the remainder of an integer division.",examples:["7 % 3","11 % 2","10 mod 4","isOdd(x) = x % 2","isOdd(2)","isOdd(3)"],seealso:["divide"]},zE={name:"multiply",category:"Operators",syntax:["x * y","multiply(x, y)"],description:"multiply two values.",examples:["a = 2.1 * 3.4","a / 3.4","2 * 3 + 4","2 * (3 + 4)","3 * 2.1 km"],seealso:["divide"]},PE={name:"norm",category:"Arithmetic",syntax:["norm(x)","norm(x, p)"],description:"Calculate the norm of a number, vector or matrix.",examples:["abs(-3.5)","norm(-3.5)","norm(3 - 4i)","norm([1, 2, -3], Infinity)","norm([1, 2, -3], -Infinity)","norm([3, 4], 2)","norm([[1, 2], [3, 4]], 1)",'norm([[1, 2], [3, 4]], "inf")','norm([[1, 2], [3, 4]], "fro")']},UE={name:"nthRoot",category:"Arithmetic",syntax:["nthRoot(a)","nthRoot(a, root)"],description:'Calculate the nth root of a value. The principal nth root of a positive real number A, is the positive real solution of the equation "x^root = A".',examples:["4 ^ 3","nthRoot(64, 3)","nthRoot(9, 2)","sqrt(9)"],seealso:["nthRoots","pow","sqrt"]},LE={name:"nthRoots",category:"Arithmetic",syntax:["nthRoots(A)","nthRoots(A, root)"],description:'Calculate the nth roots of a value. An nth root of a positive real number A, is a positive real solution of the equation "x^root = A". This function returns an array of complex values.',examples:["nthRoots(1)","nthRoots(1, 3)"],seealso:["sqrt","pow","nthRoot"]},kE={name:"pow",category:"Operators",syntax:["x ^ y","pow(x, y)"],description:"Calculates the power of x to y, x^y.",examples:["2^3","2*2*2","1 + e ^ (pi * i)","pow([[1, 2], [4, 3]], 2)","pow([[1, 2], [4, 3]], -1)"],seealso:["multiply","nthRoot","nthRoots","sqrt"]},HE={name:"round",category:"Arithmetic",syntax:["round(x)","round(x, n)","round(unit, valuelessUnit)","round(unit, n, valuelessUnit)"],description:"round a value towards the nearest integer.If x is complex, both real and imaginary part are rounded towards the nearest integer. When n is specified, the value is rounded to n decimals.",examples:["round(3.2)","round(3.8)","round(-4.2)","round(-4.8)","round(pi, 3)","round(123.45678, 2)","round(3.241cm, 2, cm)","round([3.2, 3.8, -4.7])"],seealso:["ceil","floor","fix"]},GE={name:"sign",category:"Arithmetic",syntax:["sign(x)"],description:"Compute the sign of a value. The sign of a value x is 1 when x>1, -1 when x<0, and 0 when x=0.",examples:["sign(3.5)","sign(-4.2)","sign(0)"],seealso:["abs"]},VE={name:"sqrt",category:"Arithmetic",syntax:["sqrt(x)"],description:"Compute the square root value. If x = y * y, then y is the square root of x.",examples:["sqrt(25)","5 * 5","sqrt(-1)"],seealso:["square","sqrtm","multiply","nthRoot","nthRoots","pow"]},ZE={name:"sqrtm",category:"Arithmetic",syntax:["sqrtm(x)"],description:"Calculate the principal square root of a square matrix. The principal square root matrix `X` of another matrix `A` is such that `X * X = A`.",examples:["sqrtm([[33, 24], [48, 57]])"],seealso:["sqrt","abs","square","multiply"]},XE={name:"sylvester",category:"Algebra",syntax:["sylvester(A,B,C)"],description:"Solves the real-valued Sylvester equation AX+XB=C for X",examples:["sylvester([[-1, -2], [1, 1]], [[-2, 1], [-1, 2]], [[-3, 2], [3, 0]])","A = [[-1, -2], [1, 1]]; B = [[2, -1], [1, -2]]; C = [[-3, 2], [3, 0]]","sylvester(A, B, C)"],seealso:["schur","lyap"]},YE={name:"schur",category:"Algebra",syntax:["schur(A)"],description:"Performs a real Schur decomposition of the real matrix A = UTU'",examples:["schur([[1, 0], [-4, 3]])","A = [[1, 0], [-4, 3]]","schur(A)"],seealso:["lyap","sylvester"]},WE={name:"lyap",category:"Algebra",syntax:["lyap(A,Q)"],description:"Solves the Continuous-time Lyapunov equation AP+PA'+Q=0 for P",examples:["lyap([[-2, 0], [1, -4]], [[3, 1], [1, 3]])","A = [[-2, 0], [1, -4]]","Q = [[3, 1], [1, 3]]","lyap(A,Q)"],seealso:["schur","sylvester"]},JE={name:"square",category:"Arithmetic",syntax:["square(x)"],description:"Compute the square of a value. The square of x is x * x.",examples:["square(3)","sqrt(9)","3^2","3 * 3"],seealso:["multiply","pow","sqrt","cube"]},QE={name:"subtract",category:"Operators",syntax:["x - y","subtract(x, y)"],description:"subtract two values.",examples:["a = 5.3 - 2","a + 2","2/3 - 1/6","2 * 3 - 3","2.1 km - 500m"],seealso:["add"]},KE={name:"unaryMinus",category:"Operators",syntax:["-x","unaryMinus(x)"],description:"Inverse the sign of a value. Converts booleans and strings to numbers.",examples:["-4.5","-(-5.6)",'-"22"'],seealso:["add","subtract","unaryPlus"]},jE={name:"unaryPlus",category:"Operators",syntax:["+x","unaryPlus(x)"],description:"Converts booleans and strings to numbers.",examples:["+true",'+"2"'],seealso:["add","subtract","unaryMinus"]},eS={name:"xgcd",category:"Arithmetic",syntax:["xgcd(a, b)"],description:"Calculate the extended greatest common divisor for two values. The result is an array [d, x, y] with 3 entries, where d is the greatest common divisor, and d = x * a + y * b.",examples:["xgcd(8, 12)","gcd(8, 12)","xgcd(36163, 21199)"],seealso:["gcd","lcm"]},rS={name:"bitAnd",category:"Bitwise",syntax:["x & y","bitAnd(x, y)"],description:"Bitwise AND operation. Performs the logical AND operation on each pair of the corresponding bits of the two given values by multiplying them. If both bits in the compared position are 1, the bit in the resulting binary representation is 1, otherwise, the result is 0",examples:["5 & 3","bitAnd(53, 131)","[1, 12, 31] & 42"],seealso:["bitNot","bitOr","bitXor","leftShift","rightArithShift","rightLogShift"]},tS={name:"bitNot",category:"Bitwise",syntax:["~x","bitNot(x)"],description:"Bitwise NOT operation. Performs a logical negation on each bit of the given value. Bits that are 0 become 1, and those that are 1 become 0.",examples:["~1","~2","bitNot([2, -3, 4])"],seealso:["bitAnd","bitOr","bitXor","leftShift","rightArithShift","rightLogShift"]},nS={name:"bitOr",category:"Bitwise",syntax:["x | y","bitOr(x, y)"],description:"Bitwise OR operation. Performs the logical inclusive OR operation on each pair of corresponding bits of the two given values. The result in each position is 1 if the first bit is 1 or the second bit is 1 or both bits are 1, otherwise, the result is 0.",examples:["5 | 3","bitOr([1, 2, 3], 4)"],seealso:["bitAnd","bitNot","bitXor","leftShift","rightArithShift","rightLogShift"]},aS={name:"bitXor",category:"Bitwise",syntax:["bitXor(x, y)"],description:"Bitwise XOR operation, exclusive OR. Performs the logical exclusive OR operation on each pair of corresponding bits of the two given values. The result in each position is 1 if only the first bit is 1 or only the second bit is 1, but will be 0 if both are 0 or both are 1.",examples:["bitOr(1, 2)","bitXor([2, 3, 4], 4)"],seealso:["bitAnd","bitNot","bitOr","leftShift","rightArithShift","rightLogShift"]},iS={name:"leftShift",category:"Bitwise",syntax:["x << y","leftShift(x, y)"],description:"Bitwise left logical shift of a value x by y number of bits.",examples:["4 << 1","8 >> 1"],seealso:["bitAnd","bitNot","bitOr","bitXor","rightArithShift","rightLogShift"]},oS={name:"rightArithShift",category:"Bitwise",syntax:["x >> y","rightArithShift(x, y)"],description:"Bitwise right arithmetic shift of a value x by y number of bits.",examples:["8 >> 1","4 << 1","-12 >> 2"],seealso:["bitAnd","bitNot","bitOr","bitXor","leftShift","rightLogShift"]},sS={name:"rightLogShift",category:"Bitwise",syntax:["x >>> y","rightLogShift(x, y)"],description:"Bitwise right logical shift of a value x by y number of bits.",examples:["8 >>> 1","4 << 1","-12 >>> 2"],seealso:["bitAnd","bitNot","bitOr","bitXor","leftShift","rightArithShift"]},uS={name:"bellNumbers",category:"Combinatorics",syntax:["bellNumbers(n)"],description:"The Bell Numbers count the number of partitions of a set. A partition is a pairwise disjoint subset of S whose union is S. `bellNumbers` only takes integer arguments. The following condition must be enforced: n >= 0.",examples:["bellNumbers(3)","bellNumbers(8)"],seealso:["stirlingS2"]},cS={name:"catalan",category:"Combinatorics",syntax:["catalan(n)"],description:"The Catalan Numbers enumerate combinatorial structures of many different types. catalan only takes integer arguments. The following condition must be enforced: n >= 0.",examples:["catalan(3)","catalan(8)"],seealso:["bellNumbers"]},lS={name:"composition",category:"Combinatorics",syntax:["composition(n, k)"],description:"The composition counts of n into k parts. composition only takes integer arguments. The following condition must be enforced: k <= n.",examples:["composition(5, 3)"],seealso:["combinations"]},fS={name:"stirlingS2",category:"Combinatorics",syntax:["stirlingS2(n, k)"],description:"he Stirling numbers of the second kind, counts the number of ways to partition a set of n labelled objects into k nonempty unlabelled subsets. `stirlingS2` only takes integer arguments. The following condition must be enforced: k <= n. If n = k or k = 1, then s(n,k) = 1.",examples:["stirlingS2(5, 3)"],seealso:["bellNumbers"]},mS={name:"arg",category:"Complex",syntax:["arg(x)"],description:"Compute the argument of a complex value. If x = a+bi, the argument is computed as atan2(b, a).",examples:["arg(2 + 2i)","atan2(3, 2)","arg(2 + 3i)"],seealso:["re","im","conj","abs"]},vS={name:"conj",category:"Complex",syntax:["conj(x)"],description:"Compute the complex conjugate of a complex value. If x = a+bi, the complex conjugate is a-bi.",examples:["conj(2 + 3i)","conj(2 - 3i)","conj(-5.2i)"],seealso:["re","im","abs","arg"]},pS={name:"im",category:"Complex",syntax:["im(x)"],description:"Get the imaginary part of a complex number.",examples:["im(2 + 3i)","re(2 + 3i)","im(-5.2i)","im(2.4)"],seealso:["re","conj","abs","arg"]},dS={name:"re",category:"Complex",syntax:["re(x)"],description:"Get the real part of a complex number.",examples:["re(2 + 3i)","im(2 + 3i)","re(-5.2i)","re(2.4)"],seealso:["im","conj","abs","arg"]},hS={name:"evaluate",category:"Expression",syntax:["evaluate(expression)","evaluate(expression, scope)","evaluate([expr1, expr2, expr3, ...])","evaluate([expr1, expr2, expr3, ...], scope)"],description:"Evaluate an expression or an array with expressions.",examples:['evaluate("2 + 3")','evaluate("sqrt(16)")','evaluate("2 inch to cm")','evaluate("sin(x * pi)", { "x": 1/2 })','evaluate(["width=2", "height=4","width*height"])'],seealso:[]},gS={name:"help",category:"Expression",syntax:["help(object)","help(string)"],description:"Display documentation on a function or data type.",examples:["help(sqrt)",'help("complex")'],seealso:[]},yS={name:"distance",category:"Geometry",syntax:["distance([x1, y1], [x2, y2])","distance([[x1, y1], [x2, y2]])"],description:"Calculates the Euclidean distance between two points.",examples:["distance([0,0], [4,4])","distance([[0,0], [4,4]])"],seealso:[]},bS={name:"intersect",category:"Geometry",syntax:["intersect(expr1, expr2, expr3, expr4)","intersect(expr1, expr2, expr3)"],description:"Computes the intersection point of lines and/or planes.",examples:["intersect([0, 0], [10, 10], [10, 0], [0, 10])","intersect([1, 0, 1], [4, -2, 2], [1, 1, 1, 6])"],seealso:[]},xS={name:"and",category:"Logical",syntax:["x and y","and(x, y)"],description:"Logical and. Test whether two values are both defined with a nonzero/nonempty value.",examples:["true and false","true and true","2 and 4"],seealso:["not","or","xor"]},wS={name:"not",category:"Logical",syntax:["not x","not(x)"],description:"Logical not. Flips the boolean value of given argument.",examples:["not true","not false","not 2","not 0"],seealso:["and","or","xor"]},NS={name:"or",category:"Logical",syntax:["x or y","or(x, y)"],description:"Logical or. Test if at least one value is defined with a nonzero/nonempty value.",examples:["true or false","false or false","0 or 4"],seealso:["not","and","xor"]},DS={name:"xor",category:"Logical",syntax:["x xor y","xor(x, y)"],description:"Logical exclusive or, xor. Test whether one and only one value is defined with a nonzero/nonempty value.",examples:["true xor false","false xor false","true xor true","0 xor 4"],seealso:["not","and","or"]},AS={name:"column",category:"Matrix",syntax:["column(x, index)"],description:"Return a column from a matrix or array.",examples:["A = [[1, 2], [3, 4]]","column(A, 1)","column(A, 2)"],seealso:["row","matrixFromColumns"]},ES={name:"concat",category:"Matrix",syntax:["concat(A, B, C, ...)","concat(A, B, C, ..., dim)"],description:"Concatenate matrices. By default, the matrices are concatenated by the last dimension. The dimension on which to concatenate can be provided as last argument.",examples:["A = [1, 2; 5, 6]","B = [3, 4; 7, 8]","concat(A, B)","concat(A, B, 1)","concat(A, B, 2)"],seealso:["det","diag","identity","inv","ones","range","size","squeeze","subset","trace","transpose","zeros"]},SS={name:"count",category:"Matrix",syntax:["count(x)"],description:"Count the number of elements of a matrix, array or string.",examples:["a = [1, 2; 3, 4; 5, 6]","count(a)","size(a)",'count("hello world")'],seealso:["size"]},CS={name:"cross",category:"Matrix",syntax:["cross(A, B)"],description:"Calculate the cross product for two vectors in three dimensional space.",examples:["cross([1, 1, 0], [0, 1, 1])","cross([3, -3, 1], [4, 9, 2])","cross([2, 3, 4], [5, 6, 7])"],seealso:["multiply","dot"]},MS={name:"ctranspose",category:"Matrix",syntax:["x'","ctranspose(x)"],description:"Complex Conjugate and Transpose a matrix",examples:["a = [1, 2, 3; 4, 5, 6]","a'","ctranspose(a)"],seealso:["concat","det","diag","identity","inv","ones","range","size","squeeze","subset","trace","zeros"]},FS={name:"det",category:"Matrix",syntax:["det(x)"],description:"Calculate the determinant of a matrix",examples:["det([1, 2; 3, 4])","det([-2, 2, 3; -1, 1, 3; 2, 0, -1])"],seealso:["concat","diag","identity","inv","ones","range","size","squeeze","subset","trace","transpose","zeros"]},BS={name:"diag",category:"Matrix",syntax:["diag(x)","diag(x, k)"],description:"Create a diagonal matrix or retrieve the diagonal of a matrix. When x is a vector, a matrix with the vector values on the diagonal will be returned. When x is a matrix, a vector with the diagonal values of the matrix is returned. When k is provided, the k-th diagonal will be filled in or retrieved, if k is positive, the values are placed on the super diagonal. When k is negative, the values are placed on the sub diagonal.",examples:["diag(1:3)","diag(1:3, 1)","a = [1, 2, 3; 4, 5, 6; 7, 8, 9]","diag(a)"],seealso:["concat","det","identity","inv","ones","range","size","squeeze","subset","trace","transpose","zeros"]},TS={name:"diff",category:"Matrix",syntax:["diff(arr)","diff(arr, dim)"],description:["Create a new matrix or array with the difference of the passed matrix or array.","Dim parameter is optional and used to indicant the dimension of the array/matrix to apply the difference","If no dimension parameter is passed it is assumed as dimension 0","Dimension is zero-based in javascript and one-based in the parser","Arrays must be 'rectangular' meaning arrays like [1, 2]","If something is passed as a matrix it will be returned as a matrix but other than that all matrices are converted to arrays"],examples:["A = [1, 2, 4, 7, 0]","diff(A)","diff(A, 1)","B = [[1, 2], [3, 4]]","diff(B)","diff(B, 1)","diff(B, 2)","diff(B, bignumber(2))","diff([[1, 2], matrix([3, 4])], 2)"],seealso:["subtract","partitionSelect"]},OS={name:"dot",category:"Matrix",syntax:["dot(A, B)","A * B"],description:"Calculate the dot product of two vectors. The dot product of A = [a1, a2, a3, ..., an] and B = [b1, b2, b3, ..., bn] is defined as dot(A, B) = a1 * b1 + a2 * b2 + a3 * b3 + ... + an * bn",examples:["dot([2, 4, 1], [2, 2, 3])","[2, 4, 1] * [2, 2, 3]"],seealso:["multiply","cross"]},_S={name:"eigs",category:"Matrix",syntax:["eigs(x)"],description:"Calculate the eigenvalues and optionally eigenvectors of a square matrix",examples:["eigs([[5, 2.3], [2.3, 1]])","eigs([[1, 2, 3], [4, 5, 6], [7, 8, 9]], { precision: 1e-6, eigenvectors: false })"],seealso:["inv"]},$S={name:"filter",category:"Matrix",syntax:["filter(x, test)"],description:"Filter items in a matrix.",examples:["isPositive(x) = x > 0","filter([6, -2, -1, 4, 3], isPositive)","filter([6, -2, 0, 1, 0], x != 0)"],seealso:["sort","map","forEach"]},IS={name:"flatten",category:"Matrix",syntax:["flatten(x)"],description:"Flatten a multi dimensional matrix into a single dimensional matrix.",examples:["a = [1, 2, 3; 4, 5, 6]","size(a)","b = flatten(a)","size(b)"],seealso:["concat","resize","size","squeeze"]},qS={name:"forEach",category:"Matrix",syntax:["forEach(x, callback)"],description:"Iterates over all elements of a matrix/array, and executes the given callback function.",examples:["numberOfPets = {}","addPet(n) = numberOfPets[n] = (numberOfPets[n] ? numberOfPets[n]:0 ) + 1;",'forEach(["Dog","Cat","Cat"], addPet)',"numberOfPets"],seealso:["map","sort","filter"]},RS={name:"getMatrixDataType",category:"Matrix",syntax:["getMatrixDataType(x)"],description:'Find the data type of all elements in a matrix or array, for example "number" if all items are a number and "Complex" if all values are complex numbers. If a matrix contains more than one data type, it will return "mixed".',examples:["getMatrixDataType([1, 2, 3])","getMatrixDataType([[5 cm], [2 inch]])",'getMatrixDataType([1, "text"])',"getMatrixDataType([1, bignumber(4)])"],seealso:["matrix","sparse","typeOf"]},zS={name:"identity",category:"Matrix",syntax:["identity(n)","identity(m, n)","identity([m, n])"],description:"Returns the identity matrix with size m-by-n. The matrix has ones on the diagonal and zeros elsewhere.",examples:["identity(3)","identity(3, 5)","a = [1, 2, 3; 4, 5, 6]","identity(size(a))"],seealso:["concat","det","diag","inv","ones","range","size","squeeze","subset","trace","transpose","zeros"]},PS={name:"inv",category:"Matrix",syntax:["inv(x)"],description:"Calculate the inverse of a matrix",examples:["inv([1, 2; 3, 4])","inv(4)","1 / 4"],seealso:["concat","det","diag","identity","ones","range","size","squeeze","subset","trace","transpose","zeros"]},US={name:"pinv",category:"Matrix",syntax:["pinv(x)"],description:"Calculate the Mooreโ€“Penrose inverse of a matrix",examples:["pinv([1, 2; 3, 4])","pinv([[1, 0], [0, 1], [0, 1]])","pinv(4)"],seealso:["inv"]},LS={name:"kron",category:"Matrix",syntax:["kron(x, y)"],description:"Calculates the kronecker product of 2 matrices or vectors.",examples:["kron([[1, 0], [0, 1]], [[1, 2], [3, 4]])","kron([1,1], [2,3,4])"],seealso:["multiply","dot","cross"]},kS={name:"map",category:"Matrix",syntax:["map(x, callback)"],description:"Create a new matrix or array with the results of the callback function executed on each entry of the matrix/array.",examples:["map([1, 2, 3], square)"],seealso:["filter","forEach"]},HS={name:"matrixFromColumns",category:"Matrix",syntax:["matrixFromColumns(...arr)","matrixFromColumns(row1, row2)","matrixFromColumns(row1, row2, row3)"],description:"Create a dense matrix from vectors as individual columns.",examples:["matrixFromColumns([1, 2, 3], [[4],[5],[6]])"],seealso:["matrix","matrixFromRows","matrixFromFunction","zeros"]},GS={name:"matrixFromFunction",category:"Matrix",syntax:["matrixFromFunction(size, fn)","matrixFromFunction(size, fn, format)","matrixFromFunction(size, fn, format, datatype)","matrixFromFunction(size, format, fn)","matrixFromFunction(size, format, datatype, fn)"],description:"Create a matrix by evaluating a generating function at each index.",examples:["f(I) = I[1] - I[2]","matrixFromFunction([3,3], f)","g(I) = I[1] - I[2] == 1 ? 4 : 0",'matrixFromFunction([100, 100], "sparse", g)',"matrixFromFunction([5], random)"],seealso:["matrix","matrixFromRows","matrixFromColumns","zeros"]},VS={name:"matrixFromRows",category:"Matrix",syntax:["matrixFromRows(...arr)","matrixFromRows(row1, row2)","matrixFromRows(row1, row2, row3)"],description:"Create a dense matrix from vectors as individual rows.",examples:["matrixFromRows([1, 2, 3], [[4],[5],[6]])"],seealso:["matrix","matrixFromColumns","matrixFromFunction","zeros"]},ZS={name:"ones",category:"Matrix",syntax:["ones(m)","ones(m, n)","ones(m, n, p, ...)","ones([m])","ones([m, n])","ones([m, n, p, ...])"],description:"Create a matrix containing ones.",examples:["ones(3)","ones(3, 5)","ones([2,3]) * 4.5","a = [1, 2, 3; 4, 5, 6]","ones(size(a))"],seealso:["concat","det","diag","identity","inv","range","size","squeeze","subset","trace","transpose","zeros"]},XS={name:"partitionSelect",category:"Matrix",syntax:["partitionSelect(x, k)","partitionSelect(x, k, compare)"],description:"Partition-based selection of an array or 1D matrix. Will find the kth smallest value, and mutates the input array. Uses Quickselect.",examples:["partitionSelect([5, 10, 1], 2)",'partitionSelect(["C", "B", "A", "D"], 1, compareText)',"arr = [5, 2, 1]","partitionSelect(arr, 0) # returns 1, arr is now: [1, 2, 5]","arr","partitionSelect(arr, 1, 'desc') # returns 2, arr is now: [5, 2, 1]","arr"],seealso:["sort"]},YS={name:"range",category:"Type",syntax:["start:end","start:step:end","range(start, end)","range(start, end, step)","range(string)"],description:"Create a range. Lower bound of the range is included, upper bound is excluded.",examples:["1:5","3:-1:-3","range(3, 7)","range(0, 12, 2)",'range("4:10")',"range(1m, 1m, 3m)","a = [1, 2, 3, 4; 5, 6, 7, 8]","a[1:2, 1:2]"],seealso:["concat","det","diag","identity","inv","ones","size","squeeze","subset","trace","transpose","zeros"]},WS={name:"reshape",category:"Matrix",syntax:["reshape(x, sizes)"],description:"Reshape a multi dimensional array to fit the specified dimensions.",examples:["reshape([1, 2, 3, 4, 5, 6], [2, 3])","reshape([[1, 2], [3, 4]], [1, 4])","reshape([[1, 2], [3, 4]], [4])","reshape([1, 2, 3, 4], [-1, 2])"],seealso:["size","squeeze","resize"]},JS={name:"resize",category:"Matrix",syntax:["resize(x, size)","resize(x, size, defaultValue)"],description:"Resize a matrix.",examples:["resize([1,2,3,4,5], [3])","resize([1,2,3], [5])","resize([1,2,3], [5], -1)","resize(2, [2, 3])",'resize("hello", [8], "!")'],seealso:["size","subset","squeeze","reshape"]},QS={name:"rotate",category:"Matrix",syntax:["rotate(w, theta)","rotate(w, theta, v)"],description:"Returns a 2-D rotation matrix (2x2) for a given angle (in radians). Returns a 2-D rotation matrix (3x3) of a given angle (in radians) around given axis.",examples:["rotate([1, 0], pi / 2)",'rotate(matrix([1, 0]), unit("35deg"))','rotate([1, 0, 0], unit("90deg"), [0, 0, 1])','rotate(matrix([1, 0, 0]), unit("90deg"), matrix([0, 0, 1]))'],seealso:["matrix","rotationMatrix"]},KS={name:"rotationMatrix",category:"Matrix",syntax:["rotationMatrix(theta)","rotationMatrix(theta, v)","rotationMatrix(theta, v, format)"],description:"Returns a 2-D rotation matrix (2x2) for a given angle (in radians). Returns a 2-D rotation matrix (3x3) of a given angle (in radians) around given axis.",examples:["rotationMatrix(pi / 2)",'rotationMatrix(unit("45deg"), [0, 0, 1])','rotationMatrix(1, matrix([0, 0, 1]), "sparse")'],seealso:["cos","sin"]},jS={name:"row",category:"Matrix",syntax:["row(x, index)"],description:"Return a row from a matrix or array.",examples:["A = [[1, 2], [3, 4]]","row(A, 1)","row(A, 2)"],seealso:["column","matrixFromRows"]},eC={name:"size",category:"Matrix",syntax:["size(x)"],description:"Calculate the size of a matrix.",examples:["size(2.3)",'size("hello world")',"a = [1, 2; 3, 4; 5, 6]","size(a)","size(1:6)"],seealso:["concat","count","det","diag","identity","inv","ones","range","squeeze","subset","trace","transpose","zeros"]},rC={name:"sort",category:"Matrix",syntax:["sort(x)","sort(x, compare)"],description:'Sort the items in a matrix. Compare can be a string "asc", "desc", "natural", or a custom sort function.',examples:["sort([5, 10, 1])",'sort(["C", "B", "A", "D"], "natural")',"sortByLength(a, b) = size(a)[1] - size(b)[1]",'sort(["Langdon", "Tom", "Sara"], sortByLength)','sort(["10", "1", "2"], "natural")'],seealso:["map","filter","forEach"]},tC={name:"squeeze",category:"Matrix",syntax:["squeeze(x)"],description:"Remove inner and outer singleton dimensions from a matrix.",examples:["a = zeros(3,2,1)","size(squeeze(a))","b = zeros(1,1,3)","size(squeeze(b))"],seealso:["concat","det","diag","identity","inv","ones","range","size","subset","trace","transpose","zeros"]},nC={name:"subset",category:"Matrix",syntax:["value(index)","value(index) = replacement","subset(value, [index])","subset(value, [index], replacement)"],description:"Get or set a subset of the entries of a matrix or characters of a string. Indexes are one-based. There should be one index specification for each dimension of the target. Each specification can be a single index, a list of indices, or a range in colon notation `l:u`. In a range, both the lower bound l and upper bound u are included; and if a bound is omitted it defaults to the most extreme valid value. The cartesian product of the indices specified in each dimension determines the target of the operation.",examples:["d = [1, 2; 3, 4]","e = []","e[1, 1:2] = [5, 6]","e[2, :] = [7, 8]","f = d * e","f[2, 1]","f[:, 1]","f[[1,2], [1,3]] = [9, 10; 11, 12]","f"],seealso:["concat","det","diag","identity","inv","ones","range","size","squeeze","trace","transpose","zeros"]},aC={name:"trace",category:"Matrix",syntax:["trace(A)"],description:"Calculate the trace of a matrix: the sum of the elements on the main diagonal of a square matrix.",examples:["A = [1, 2, 3; -1, 2, 3; 2, 0, 3]","trace(A)"],seealso:["concat","det","diag","identity","inv","ones","range","size","squeeze","subset","transpose","zeros"]},iC={name:"transpose",category:"Matrix",syntax:["x'","transpose(x)"],description:"Transpose a matrix",examples:["a = [1, 2, 3; 4, 5, 6]","a'","transpose(a)"],seealso:["concat","det","diag","identity","inv","ones","range","size","squeeze","subset","trace","zeros"]},oC={name:"zeros",category:"Matrix",syntax:["zeros(m)","zeros(m, n)","zeros(m, n, p, ...)","zeros([m])","zeros([m, n])","zeros([m, n, p, ...])"],description:"Create a matrix containing zeros.",examples:["zeros(3)","zeros(3, 5)","a = [1, 2, 3; 4, 5, 6]","zeros(size(a))"],seealso:["concat","det","diag","identity","inv","ones","range","size","squeeze","subset","trace","transpose"]},sC={name:"fft",category:"Matrix",syntax:["fft(x)"],description:"Calculate N-dimensional fourier transform",examples:["fft([[1, 0], [1, 0]])"],seealso:["ifft"]},uC={name:"ifft",category:"Matrix",syntax:["ifft(x)"],description:"Calculate N-dimensional inverse fourier transform",examples:["ifft([[2, 2], [0, 0]])"],seealso:["fft"]},cC={name:"combinations",category:"Probability",syntax:["combinations(n, k)"],description:"Compute the number of combinations of n items taken k at a time",examples:["combinations(7, 5)"],seealso:["combinationsWithRep","permutations","factorial"]},lC={name:"combinationsWithRep",category:"Probability",syntax:["combinationsWithRep(n, k)"],description:"Compute the number of combinations of n items taken k at a time with replacements.",examples:["combinationsWithRep(7, 5)"],seealso:["combinations","permutations","factorial"]},fC={name:"factorial",category:"Probability",syntax:["n!","factorial(n)"],description:"Compute the factorial of a value",examples:["5!","5 * 4 * 3 * 2 * 1","3!"],seealso:["combinations","combinationsWithRep","permutations","gamma"]},mC={name:"gamma",category:"Probability",syntax:["gamma(n)"],description:"Compute the gamma function. For small values, the Lanczos approximation is used, and for large values the extended Stirling approximation.",examples:["gamma(4)","3!","gamma(1/2)","sqrt(pi)"],seealso:["factorial"]},vC={name:"lgamma",category:"Probability",syntax:["lgamma(n)"],description:"Logarithm of the gamma function for real, positive numbers and complex numbers, using Lanczos approximation for numbers and Stirling series for complex numbers.",examples:["lgamma(4)","lgamma(1/2)","lgamma(i)","lgamma(complex(1.1, 2))"],seealso:["gamma"]},pC={name:"kldivergence",category:"Probability",syntax:["kldivergence(x, y)"],description:"Calculate the Kullback-Leibler (KL) divergence between two distributions.",examples:["kldivergence([0.7,0.5,0.4], [0.2,0.9,0.5])"],seealso:[]},dC={name:"multinomial",category:"Probability",syntax:["multinomial(A)"],description:"Multinomial Coefficients compute the number of ways of picking a1, a2, ..., ai unordered outcomes from `n` possibilities. multinomial takes one array of integers as an argument. The following condition must be enforced: every ai > 0.",examples:["multinomial([1, 2, 1])"],seealso:["combinations","factorial"]},hC={name:"permutations",category:"Probability",syntax:["permutations(n)","permutations(n, k)"],description:"Compute the number of permutations of n items taken k at a time",examples:["permutations(5)","permutations(5, 3)"],seealso:["combinations","combinationsWithRep","factorial"]},gC={name:"pickRandom",category:"Probability",syntax:["pickRandom(array)","pickRandom(array, number)","pickRandom(array, weights)","pickRandom(array, number, weights)","pickRandom(array, weights, number)"],description:"Pick a random entry from a given array.",examples:["pickRandom(0:10)","pickRandom([1, 3, 1, 6])","pickRandom([1, 3, 1, 6], 2)","pickRandom([1, 3, 1, 6], [2, 3, 2, 1])","pickRandom([1, 3, 1, 6], 2, [2, 3, 2, 1])","pickRandom([1, 3, 1, 6], [2, 3, 2, 1], 2)"],seealso:["random","randomInt"]},yC={name:"random",category:"Probability",syntax:["random()","random(max)","random(min, max)","random(size)","random(size, max)","random(size, min, max)"],description:"Return a random number.",examples:["random()","random(10, 20)","random([2, 3])"],seealso:["pickRandom","randomInt"]},bC={name:"randomInt",category:"Probability",syntax:["randomInt(max)","randomInt(min, max)","randomInt(size)","randomInt(size, max)","randomInt(size, min, max)"],description:"Return a random integer number",examples:["randomInt(10, 20)","randomInt([2, 3], 10)"],seealso:["pickRandom","random"]},xC={name:"compare",category:"Relational",syntax:["compare(x, y)"],description:"Compare two values. Returns 1 when x > y, -1 when x < y, and 0 when x == y.",examples:["compare(2, 3)","compare(3, 2)","compare(2, 2)","compare(5cm, 40mm)","compare(2, [1, 2, 3])"],seealso:["equal","unequal","smaller","smallerEq","largerEq","compareNatural","compareText"]},wC={name:"compareNatural",category:"Relational",syntax:["compareNatural(x, y)"],description:"Compare two values of any type in a deterministic, natural way. Returns 1 when x > y, -1 when x < y, and 0 when x == y.",examples:["compareNatural(2, 3)","compareNatural(3, 2)","compareNatural(2, 2)","compareNatural(5cm, 40mm)",'compareNatural("2", "10")',"compareNatural(2 + 3i, 2 + 4i)","compareNatural([1, 2, 4], [1, 2, 3])","compareNatural([1, 5], [1, 2, 3])","compareNatural([1, 2], [1, 2])","compareNatural({a: 2}, {a: 4})"],seealso:["equal","unequal","smaller","smallerEq","largerEq","compare","compareText"]},NC={name:"compareText",category:"Relational",syntax:["compareText(x, y)"],description:"Compare two strings lexically. Comparison is case sensitive. Returns 1 when x > y, -1 when x < y, and 0 when x == y.",examples:['compareText("B", "A")','compareText("A", "B")','compareText("A", "A")','compareText("2", "10")','compare("2", "10")',"compare(2, 10)",'compareNatural("2", "10")','compareText("B", ["A", "B", "C"])'],seealso:["compare","compareNatural"]},DC={name:"deepEqual",category:"Relational",syntax:["deepEqual(x, y)"],description:"Check equality of two matrices element wise. Returns true if the size of both matrices is equal and when and each of the elements are equal.",examples:["deepEqual([1,3,4], [1,3,4])","deepEqual([1,3,4], [1,3])"],seealso:["equal","unequal","smaller","larger","smallerEq","largerEq","compare"]},AC={name:"equal",category:"Relational",syntax:["x == y","equal(x, y)"],description:"Check equality of two values. Returns true if the values are equal, and false if not.",examples:["2+2 == 3","2+2 == 4","a = 3.2","b = 6-2.8","a == b","50cm == 0.5m"],seealso:["unequal","smaller","larger","smallerEq","largerEq","compare","deepEqual","equalText"]},EC={name:"equalText",category:"Relational",syntax:["equalText(x, y)"],description:"Check equality of two strings. Comparison is case sensitive. Returns true if the values are equal, and false if not.",examples:['equalText("Hello", "Hello")','equalText("a", "A")','equal("2e3", "2000")','equalText("2e3", "2000")','equalText("B", ["A", "B", "C"])'],seealso:["compare","compareNatural","compareText","equal"]},SC={name:"larger",category:"Relational",syntax:["x > y","larger(x, y)"],description:"Check if value x is larger than y. Returns true if x is larger than y, and false if not.",examples:["2 > 3","5 > 2*2","a = 3.3","b = 6-2.8","(a > b)","(b < a)","5 cm > 2 inch"],seealso:["equal","unequal","smaller","smallerEq","largerEq","compare"]},CC={name:"largerEq",category:"Relational",syntax:["x >= y","largerEq(x, y)"],description:"Check if value x is larger or equal to y. Returns true if x is larger or equal to y, and false if not.",examples:["2 >= 1+1","2 > 1+1","a = 3.2","b = 6-2.8","(a >= b)"],seealso:["equal","unequal","smallerEq","smaller","compare"]},MC={name:"smaller",category:"Relational",syntax:["x < y","smaller(x, y)"],description:"Check if value x is smaller than value y. Returns true if x is smaller than y, and false if not.",examples:["2 < 3","5 < 2*2","a = 3.3","b = 6-2.8","(a < b)","5 cm < 2 inch"],seealso:["equal","unequal","larger","smallerEq","largerEq","compare"]},FC={name:"smallerEq",category:"Relational",syntax:["x <= y","smallerEq(x, y)"],description:"Check if value x is smaller or equal to value y. Returns true if x is smaller than y, and false if not.",examples:["2 <= 1+1","2 < 1+1","a = 3.2","b = 6-2.8","(a <= b)"],seealso:["equal","unequal","larger","smaller","largerEq","compare"]},BC={name:"unequal",category:"Relational",syntax:["x != y","unequal(x, y)"],description:"Check unequality of two values. Returns true if the values are unequal, and false if they are equal.",examples:["2+2 != 3","2+2 != 4","a = 3.2","b = 6-2.8","a != b","50cm != 0.5m","5 cm != 2 inch"],seealso:["equal","smaller","larger","smallerEq","largerEq","compare","deepEqual"]},TC={name:"setCartesian",category:"Set",syntax:["setCartesian(set1, set2)"],description:"Create the cartesian product of two (multi)sets. Multi-dimension arrays will be converted to single-dimension arrays and the values will be sorted in ascending order before the operation.",examples:["setCartesian([1, 2], [3, 4])"],seealso:["setUnion","setIntersect","setDifference","setPowerset"]},OC={name:"setDifference",category:"Set",syntax:["setDifference(set1, set2)"],description:"Create the difference of two (multi)sets: every element of set1, that is not the element of set2. Multi-dimension arrays will be converted to single-dimension arrays before the operation.",examples:["setDifference([1, 2, 3, 4], [3, 4, 5, 6])","setDifference([[1, 2], [3, 4]], [[3, 4], [5, 6]])"],seealso:["setUnion","setIntersect","setSymDifference"]},_C={name:"setDistinct",category:"Set",syntax:["setDistinct(set)"],description:"Collect the distinct elements of a multiset. A multi-dimension array will be converted to a single-dimension array before the operation.",examples:["setDistinct([1, 1, 1, 2, 2, 3])"],seealso:["setMultiplicity"]},$C={name:"setIntersect",category:"Set",syntax:["setIntersect(set1, set2)"],description:"Create the intersection of two (multi)sets. Multi-dimension arrays will be converted to single-dimension arrays before the operation.",examples:["setIntersect([1, 2, 3, 4], [3, 4, 5, 6])","setIntersect([[1, 2], [3, 4]], [[3, 4], [5, 6]])"],seealso:["setUnion","setDifference"]},IC={name:"setIsSubset",category:"Set",syntax:["setIsSubset(set1, set2)"],description:"Check whether a (multi)set is a subset of another (multi)set: every element of set1 is the element of set2. Multi-dimension arrays will be converted to single-dimension arrays before the operation.",examples:["setIsSubset([1, 2], [3, 4, 5, 6])","setIsSubset([3, 4], [3, 4, 5, 6])"],seealso:["setUnion","setIntersect","setDifference"]},qC={name:"setMultiplicity",category:"Set",syntax:["setMultiplicity(element, set)"],description:"Count the multiplicity of an element in a multiset. A multi-dimension array will be converted to a single-dimension array before the operation.",examples:["setMultiplicity(1, [1, 2, 2, 4])","setMultiplicity(2, [1, 2, 2, 4])"],seealso:["setDistinct","setSize"]},RC={name:"setPowerset",category:"Set",syntax:["setPowerset(set)"],description:"Create the powerset of a (multi)set: the powerset contains very possible subsets of a (multi)set. A multi-dimension array will be converted to a single-dimension array before the operation.",examples:["setPowerset([1, 2, 3])"],seealso:["setCartesian"]},zC={name:"setSize",category:"Set",syntax:["setSize(set)","setSize(set, unique)"],description:'Count the number of elements of a (multi)set. When the second parameter "unique" is true, count only the unique values. A multi-dimension array will be converted to a single-dimension array before the operation.',examples:["setSize([1, 2, 2, 4])","setSize([1, 2, 2, 4], true)"],seealso:["setUnion","setIntersect","setDifference"]},PC={name:"setSymDifference",category:"Set",syntax:["setSymDifference(set1, set2)"],description:"Create the symmetric difference of two (multi)sets. Multi-dimension arrays will be converted to single-dimension arrays before the operation.",examples:["setSymDifference([1, 2, 3, 4], [3, 4, 5, 6])","setSymDifference([[1, 2], [3, 4]], [[3, 4], [5, 6]])"],seealso:["setUnion","setIntersect","setDifference"]},UC={name:"setUnion",category:"Set",syntax:["setUnion(set1, set2)"],description:"Create the union of two (multi)sets. Multi-dimension arrays will be converted to single-dimension arrays before the operation.",examples:["setUnion([1, 2, 3, 4], [3, 4, 5, 6])","setUnion([[1, 2], [3, 4]], [[3, 4], [5, 6]])"],seealso:["setIntersect","setDifference"]},LC={name:"zpk2tf",category:"Signal",syntax:["zpk2tf(z, p, k)"],description:"Compute the transfer function of a zero-pole-gain model.",examples:["zpk2tf([1, 2], [-1, -2], 1)","zpk2tf([1, 2], [-1, -2])","zpk2tf([1 - 3i, 2 + 2i], [-1, -2])"],seealso:[]},kC={name:"freqz",category:"Signal",syntax:["freqz(b, a)","freqz(b, a, w)"],description:"Calculates the frequency response of a filter given its numerator and denominator coefficients.",examples:["freqz([1, 2], [1, 2, 3])","freqz([1, 2], [1, 2, 3], [0, 1])","freqz([1, 2], [1, 2, 3], 512)"],seealso:[]},HC={name:"erf",category:"Special",syntax:["erf(x)"],description:"Compute the erf function of a value using a rational Chebyshev approximations for different intervals of x",examples:["erf(0.2)","erf(-0.5)","erf(4)"],seealso:[]},GC={name:"zeta",category:"Special",syntax:["zeta(s)"],description:"Compute the Riemann Zeta Function using an infinite series and Riemanns Functional Equation for the entire complex plane",examples:["zeta(0.2)","zeta(-0.5)","zeta(4)"],seealso:[]},VC={name:"mad",category:"Statistics",syntax:["mad(a, b, c, ...)","mad(A)"],description:"Compute the median absolute deviation of a matrix or a list with values. The median absolute deviation is defined as the median of the absolute deviations from the median.",examples:["mad(10, 20, 30)","mad([1, 2, 3])"],seealso:["mean","median","std","abs"]},ZC={name:"max",category:"Statistics",syntax:["max(a, b, c, ...)","max(A)","max(A, dimension)"],description:"Compute the maximum value of a list of values.",examples:["max(2, 3, 4, 1)","max([2, 3, 4, 1])","max([2, 5; 4, 3])","max([2, 5; 4, 3], 1)","max([2, 5; 4, 3], 2)","max(2.7, 7.1, -4.5, 2.0, 4.1)","min(2.7, 7.1, -4.5, 2.0, 4.1)"],seealso:["mean","median","min","prod","std","sum","variance"]},XC={name:"mean",category:"Statistics",syntax:["mean(a, b, c, ...)","mean(A)","mean(A, dimension)"],description:"Compute the arithmetic mean of a list of values.",examples:["mean(2, 3, 4, 1)","mean([2, 3, 4, 1])","mean([2, 5; 4, 3])","mean([2, 5; 4, 3], 1)","mean([2, 5; 4, 3], 2)","mean([1.0, 2.7, 3.2, 4.0])"],seealso:["max","median","min","prod","std","sum","variance"]},YC={name:"median",category:"Statistics",syntax:["median(a, b, c, ...)","median(A)"],description:"Compute the median of all values. The values are sorted and the middle value is returned. In case of an even number of values, the average of the two middle values is returned.",examples:["median(5, 2, 7)","median([3, -1, 5, 7])"],seealso:["max","mean","min","prod","std","sum","variance","quantileSeq"]},WC={name:"min",category:"Statistics",syntax:["min(a, b, c, ...)","min(A)","min(A, dimension)"],description:"Compute the minimum value of a list of values.",examples:["min(2, 3, 4, 1)","min([2, 3, 4, 1])","min([2, 5; 4, 3])","min([2, 5; 4, 3], 1)","min([2, 5; 4, 3], 2)","min(2.7, 7.1, -4.5, 2.0, 4.1)","max(2.7, 7.1, -4.5, 2.0, 4.1)"],seealso:["max","mean","median","prod","std","sum","variance"]},JC={name:"mode",category:"Statistics",syntax:["mode(a, b, c, ...)","mode(A)","mode(A, a, b, B, c, ...)"],description:"Computes the mode of all values as an array. In case mode being more than one, multiple values are returned in an array.",examples:["mode(2, 1, 4, 3, 1)","mode([1, 2.7, 3.2, 4, 2.7])","mode(1, 4, 6, 1, 6)"],seealso:["max","mean","min","median","prod","std","sum","variance"]},QC={name:"prod",category:"Statistics",syntax:["prod(a, b, c, ...)","prod(A)"],description:"Compute the product of all values.",examples:["prod(2, 3, 4)","prod([2, 3, 4])","prod([2, 5; 4, 3])"],seealso:["max","mean","min","median","min","std","sum","variance"]},KC={name:"quantileSeq",category:"Statistics",syntax:["quantileSeq(A, prob[, sorted])","quantileSeq(A, [prob1, prob2, ...][, sorted])","quantileSeq(A, N[, sorted])"],description:`Compute the prob order quantile of a matrix or a list with values. The sequence is sorted and the middle value is returned. Supported types of sequence values are: Number, BigNumber, Unit Supported types of probablity are: Number, BigNumber. + +In case of a (multi dimensional) array or matrix, the prob order quantile of all elements will be calculated.`,examples:["quantileSeq([3, -1, 5, 7], 0.5)","quantileSeq([3, -1, 5, 7], [1/3, 2/3])","quantileSeq([3, -1, 5, 7], 2)","quantileSeq([-1, 3, 5, 7], 0.5, true)"],seealso:["mean","median","min","max","prod","std","sum","variance"]},jC={name:"std",category:"Statistics",syntax:["std(a, b, c, ...)","std(A)","std(A, dimension)","std(A, normalization)","std(A, dimension, normalization)"],description:'Compute the standard deviation of all values, defined as std(A) = sqrt(variance(A)). Optional parameter normalization can be "unbiased" (default), "uncorrected", or "biased".',examples:["std(2, 4, 6)","std([2, 4, 6, 8])",'std([2, 4, 6, 8], "uncorrected")','std([2, 4, 6, 8], "biased")',"std([1, 2, 3; 4, 5, 6])"],seealso:["max","mean","min","median","prod","sum","variance"]},eM={name:"cumsum",category:"Statistics",syntax:["cumsum(a, b, c, ...)","cumsum(A)"],description:"Compute the cumulative sum of all values.",examples:["cumsum(2, 3, 4, 1)","cumsum([2, 3, 4, 1])","cumsum([1, 2; 3, 4])","cumsum([1, 2; 3, 4], 1)","cumsum([1, 2; 3, 4], 2)"],seealso:["max","mean","median","min","prod","std","sum","variance"]},rM={name:"sum",category:"Statistics",syntax:["sum(a, b, c, ...)","sum(A)","sum(A, dimension)"],description:"Compute the sum of all values.",examples:["sum(2, 3, 4, 1)","sum([2, 3, 4, 1])","sum([2, 5; 4, 3])"],seealso:["max","mean","median","min","prod","std","sum","variance"]},tM={name:"variance",category:"Statistics",syntax:["variance(a, b, c, ...)","variance(A)","variance(A, dimension)","variance(A, normalization)","variance(A, dimension, normalization)"],description:'Compute the variance of all values. Optional parameter normalization can be "unbiased" (default), "uncorrected", or "biased".',examples:["variance(2, 4, 6)","variance([2, 4, 6, 8])",'variance([2, 4, 6, 8], "uncorrected")','variance([2, 4, 6, 8], "biased")',"variance([1, 2, 3; 4, 5, 6])"],seealso:["max","mean","min","median","min","prod","std","sum"]},nM={name:"corr",category:"Statistics",syntax:["corr(A,B)"],description:"Compute the correlation coefficient of a two list with values, For matrices, the matrix correlation coefficient is calculated.",examples:["corr([2, 4, 6, 8],[1, 2, 3, 6])","corr(matrix([[1, 2.2, 3, 4.8, 5], [1, 2, 3, 4, 5]]), matrix([[4, 5.3, 6.6, 7, 8], [1, 2, 3, 4, 5]]))"],seealso:["max","mean","min","median","min","prod","std","sum"]},aM={name:"acos",category:"Trigonometry",syntax:["acos(x)"],description:"Compute the inverse cosine of a value in radians.",examples:["acos(0.5)","acos(cos(2.3))"],seealso:["cos","atan","asin"]},iM={name:"acosh",category:"Trigonometry",syntax:["acosh(x)"],description:"Calculate the hyperbolic arccos of a value, defined as `acosh(x) = ln(sqrt(x^2 - 1) + x)`.",examples:["acosh(1.5)"],seealso:["cosh","asinh","atanh"]},oM={name:"acot",category:"Trigonometry",syntax:["acot(x)"],description:"Calculate the inverse cotangent of a value.",examples:["acot(0.5)","acot(cot(0.5))","acot(2)"],seealso:["cot","atan"]},sM={name:"acoth",category:"Trigonometry",syntax:["acoth(x)"],description:"Calculate the hyperbolic arccotangent of a value, defined as `acoth(x) = (ln((x+1)/x) + ln(x/(x-1))) / 2`.",examples:["acoth(2)","acoth(0.5)"],seealso:["acsch","asech"]},uM={name:"acsc",category:"Trigonometry",syntax:["acsc(x)"],description:"Calculate the inverse cotangent of a value.",examples:["acsc(2)","acsc(csc(0.5))","acsc(0.5)"],seealso:["csc","asin","asec"]},cM={name:"acsch",category:"Trigonometry",syntax:["acsch(x)"],description:"Calculate the hyperbolic arccosecant of a value, defined as `acsch(x) = ln(1/x + sqrt(1/x^2 + 1))`.",examples:["acsch(0.5)"],seealso:["asech","acoth"]},lM={name:"asec",category:"Trigonometry",syntax:["asec(x)"],description:"Calculate the inverse secant of a value.",examples:["asec(0.5)","asec(sec(0.5))","asec(2)"],seealso:["acos","acot","acsc"]},fM={name:"asech",category:"Trigonometry",syntax:["asech(x)"],description:"Calculate the inverse secant of a value.",examples:["asech(0.5)"],seealso:["acsch","acoth"]},mM={name:"asin",category:"Trigonometry",syntax:["asin(x)"],description:"Compute the inverse sine of a value in radians.",examples:["asin(0.5)","asin(sin(0.5))"],seealso:["sin","acos","atan"]},vM={name:"asinh",category:"Trigonometry",syntax:["asinh(x)"],description:"Calculate the hyperbolic arcsine of a value, defined as `asinh(x) = ln(x + sqrt(x^2 + 1))`.",examples:["asinh(0.5)"],seealso:["acosh","atanh"]},pM={name:"atan",category:"Trigonometry",syntax:["atan(x)"],description:"Compute the inverse tangent of a value in radians.",examples:["atan(0.5)","atan(tan(0.5))"],seealso:["tan","acos","asin"]},dM={name:"atan2",category:"Trigonometry",syntax:["atan2(y, x)"],description:"Computes the principal value of the arc tangent of y/x in radians.",examples:["atan2(2, 2) / pi","angle = 60 deg in rad","x = cos(angle)","y = sin(angle)","atan2(y, x)"],seealso:["sin","cos","tan"]},hM={name:"atanh",category:"Trigonometry",syntax:["atanh(x)"],description:"Calculate the hyperbolic arctangent of a value, defined as `atanh(x) = ln((1 + x)/(1 - x)) / 2`.",examples:["atanh(0.5)"],seealso:["acosh","asinh"]},gM={name:"cos",category:"Trigonometry",syntax:["cos(x)"],description:"Compute the cosine of x in radians.",examples:["cos(2)","cos(pi / 4) ^ 2","cos(180 deg)","cos(60 deg)","sin(0.2)^2 + cos(0.2)^2"],seealso:["acos","sin","tan"]},yM={name:"cosh",category:"Trigonometry",syntax:["cosh(x)"],description:"Compute the hyperbolic cosine of x in radians.",examples:["cosh(0.5)"],seealso:["sinh","tanh","coth"]},bM={name:"cot",category:"Trigonometry",syntax:["cot(x)"],description:"Compute the cotangent of x in radians. Defined as 1/tan(x)",examples:["cot(2)","1 / tan(2)"],seealso:["sec","csc","tan"]},xM={name:"coth",category:"Trigonometry",syntax:["coth(x)"],description:"Compute the hyperbolic cotangent of x in radians.",examples:["coth(2)","1 / tanh(2)"],seealso:["sech","csch","tanh"]},wM={name:"csc",category:"Trigonometry",syntax:["csc(x)"],description:"Compute the cosecant of x in radians. Defined as 1/sin(x)",examples:["csc(2)","1 / sin(2)"],seealso:["sec","cot","sin"]},NM={name:"csch",category:"Trigonometry",syntax:["csch(x)"],description:"Compute the hyperbolic cosecant of x in radians. Defined as 1/sinh(x)",examples:["csch(2)","1 / sinh(2)"],seealso:["sech","coth","sinh"]},DM={name:"sec",category:"Trigonometry",syntax:["sec(x)"],description:"Compute the secant of x in radians. Defined as 1/cos(x)",examples:["sec(2)","1 / cos(2)"],seealso:["cot","csc","cos"]},AM={name:"sech",category:"Trigonometry",syntax:["sech(x)"],description:"Compute the hyperbolic secant of x in radians. Defined as 1/cosh(x)",examples:["sech(2)","1 / cosh(2)"],seealso:["coth","csch","cosh"]},EM={name:"sin",category:"Trigonometry",syntax:["sin(x)"],description:"Compute the sine of x in radians.",examples:["sin(2)","sin(pi / 4) ^ 2","sin(90 deg)","sin(30 deg)","sin(0.2)^2 + cos(0.2)^2"],seealso:["asin","cos","tan"]},SM={name:"sinh",category:"Trigonometry",syntax:["sinh(x)"],description:"Compute the hyperbolic sine of x in radians.",examples:["sinh(0.5)"],seealso:["cosh","tanh"]},CM={name:"tan",category:"Trigonometry",syntax:["tan(x)"],description:"Compute the tangent of x in radians.",examples:["tan(0.5)","sin(0.5) / cos(0.5)","tan(pi / 4)","tan(45 deg)"],seealso:["atan","sin","cos"]},MM={name:"tanh",category:"Trigonometry",syntax:["tanh(x)"],description:"Compute the hyperbolic tangent of x in radians.",examples:["tanh(0.5)","sinh(0.5) / cosh(0.5)"],seealso:["sinh","cosh"]},FM={name:"to",category:"Units",syntax:["x to unit","to(x, unit)"],description:"Change the unit of a value.",examples:["5 inch to cm","3.2kg to g","16 bytes in bits"],seealso:[]},BM={name:"bin",category:"Utils",syntax:["bin(value)"],description:"Format a number as binary",examples:["bin(2)"],seealso:["oct","hex"]},TM={name:"clone",category:"Utils",syntax:["clone(x)"],description:"Clone a variable. Creates a copy of primitive variables,and a deep copy of matrices",examples:["clone(3.5)","clone(2 - 4i)","clone(45 deg)","clone([1, 2; 3, 4])",'clone("hello world")'],seealso:[]},OM={name:"format",category:"Utils",syntax:["format(value)","format(value, precision)"],description:"Format a value of any type as string.",examples:["format(2.3)","format(3 - 4i)","format([])","format(pi, 3)"],seealso:["print"]},_M={name:"hasNumericValue",category:"Utils",syntax:["hasNumericValue(x)"],description:"Test whether a value is an numeric value. In case of a string, true is returned if the string contains a numeric value.",examples:["hasNumericValue(2)",'hasNumericValue("2")','isNumeric("2")',"hasNumericValue(0)","hasNumericValue(bignumber(500))","hasNumericValue(fraction(0.125))","hasNumericValue(2 + 3i)",'hasNumericValue([2.3, "foo", false])'],seealso:["isInteger","isZero","isNegative","isPositive","isNaN","isNumeric"]},$M={name:"hex",category:"Utils",syntax:["hex(value)"],description:"Format a number as hexadecimal",examples:["hex(240)"],seealso:["bin","oct"]},IM={name:"isInteger",category:"Utils",syntax:["isInteger(x)"],description:"Test whether a value is an integer number.",examples:["isInteger(2)","isInteger(3.5)","isInteger([3, 0.5, -2])"],seealso:["isNegative","isNumeric","isPositive","isZero"]},qM={name:"isNaN",category:"Utils",syntax:["isNaN(x)"],description:"Test whether a value is NaN (not a number)",examples:["isNaN(2)","isNaN(0 / 0)","isNaN(NaN)","isNaN(Infinity)"],seealso:["isNegative","isNumeric","isPositive","isZero"]},RM={name:"isNegative",category:"Utils",syntax:["isNegative(x)"],description:"Test whether a value is negative: smaller than zero.",examples:["isNegative(2)","isNegative(0)","isNegative(-4)","isNegative([3, 0.5, -2])"],seealso:["isInteger","isNumeric","isPositive","isZero"]},zM={name:"isNumeric",category:"Utils",syntax:["isNumeric(x)"],description:"Test whether a value is a numeric value. Returns true when the input is a number, BigNumber, Fraction, or boolean.",examples:["isNumeric(2)",'isNumeric("2")','hasNumericValue("2")',"isNumeric(0)","isNumeric(bignumber(500))","isNumeric(fraction(0.125))","isNumeric(2 + 3i)",'isNumeric([2.3, "foo", false])'],seealso:["isInteger","isZero","isNegative","isPositive","isNaN","hasNumericValue"]},PM={name:"isPositive",category:"Utils",syntax:["isPositive(x)"],description:"Test whether a value is positive: larger than zero.",examples:["isPositive(2)","isPositive(0)","isPositive(-4)","isPositive([3, 0.5, -2])"],seealso:["isInteger","isNumeric","isNegative","isZero"]},UM={name:"isPrime",category:"Utils",syntax:["isPrime(x)"],description:"Test whether a value is prime: has no divisors other than itself and one.",examples:["isPrime(3)","isPrime(-2)","isPrime([2, 17, 100])"],seealso:["isInteger","isNumeric","isNegative","isZero"]},LM={name:"isZero",category:"Utils",syntax:["isZero(x)"],description:"Test whether a value is zero.",examples:["isZero(2)","isZero(0)","isZero(-4)","isZero([3, 0, -2, 0])"],seealso:["isInteger","isNumeric","isNegative","isPositive"]},kM={name:"numeric",category:"Utils",syntax:["numeric(x)"],description:"Convert a numeric input to a specific numeric type: number, BigNumber, or Fraction.",examples:['numeric("4")','numeric("4", "number")','numeric("4", "BigNumber")','numeric("4", "Fraction")','numeric(4, "Fraction")','numeric(fraction(2, 5), "number")'],seealso:["number","fraction","bignumber","string","format"]},HM={name:"oct",category:"Utils",syntax:["oct(value)"],description:"Format a number as octal",examples:["oct(56)"],seealso:["bin","hex"]},GM={name:"print",category:"Utils",syntax:["print(template, values)","print(template, values, precision)"],description:"Interpolate values into a string template.",examples:['print("Lucy is $age years old", {age: 5})','print("The value of pi is $pi", {pi: pi}, 3)','print("Hello, $user.name!", {user: {name: "John"}})','print("Values: $1, $2, $3", [6, 9, 4])'],seealso:["format"]},VM={name:"typeOf",category:"Utils",syntax:["typeOf(x)"],description:"Get the type of a variable.",examples:["typeOf(3.5)","typeOf(2 - 4i)","typeOf(45 deg)",'typeOf("hello world")'],seealso:["getMatrixDataType"]},ZM={name:"solveODE",category:"Numeric",syntax:["solveODE(func, tspan, y0)","solveODE(func, tspan, y0, options)"],description:"Numerical Integration of Ordinary Differential Equations.",examples:["f(t,y) = y","tspan = [0, 4]","solveODE(f, tspan, 1)","solveODE(f, tspan, [1, 2])",'solveODE(f, tspan, 1, { method:"RK23", maxStep:0.1 })'],seealso:["derivative","simplifyCore"]},XM={bignumber:RA,boolean:zA,complex:PA,createUnit:UA,fraction:LA,index:kA,matrix:HA,number:GA,sparse:VA,splitUnit:ZA,string:XA,unit:YA,e:hl,E:hl,false:NA,i:DA,Infinity:AA,LN2:SA,LN10:EA,LOG2E:MA,LOG10E:CA,NaN:FA,null:BA,pi:gl,PI:gl,phi:TA,SQRT1_2:OA,SQRT2:_A,tau:$A,true:IA,version:qA,speedOfLight:{description:"Speed of light in vacuum",examples:["speedOfLight"]},gravitationConstant:{description:"Newtonian constant of gravitation",examples:["gravitationConstant"]},planckConstant:{description:"Planck constant",examples:["planckConstant"]},reducedPlanckConstant:{description:"Reduced Planck constant",examples:["reducedPlanckConstant"]},magneticConstant:{description:"Magnetic constant (vacuum permeability)",examples:["magneticConstant"]},electricConstant:{description:"Electric constant (vacuum permeability)",examples:["electricConstant"]},vacuumImpedance:{description:"Characteristic impedance of vacuum",examples:["vacuumImpedance"]},coulomb:{description:"Coulomb's constant",examples:["coulomb"]},elementaryCharge:{description:"Elementary charge",examples:["elementaryCharge"]},bohrMagneton:{description:"Borh magneton",examples:["bohrMagneton"]},conductanceQuantum:{description:"Conductance quantum",examples:["conductanceQuantum"]},inverseConductanceQuantum:{description:"Inverse conductance quantum",examples:["inverseConductanceQuantum"]},magneticFluxQuantum:{description:"Magnetic flux quantum",examples:["magneticFluxQuantum"]},nuclearMagneton:{description:"Nuclear magneton",examples:["nuclearMagneton"]},klitzing:{description:"Von Klitzing constant",examples:["klitzing"]},bohrRadius:{description:"Borh radius",examples:["bohrRadius"]},classicalElectronRadius:{description:"Classical electron radius",examples:["classicalElectronRadius"]},electronMass:{description:"Electron mass",examples:["electronMass"]},fermiCoupling:{description:"Fermi coupling constant",examples:["fermiCoupling"]},fineStructure:{description:"Fine-structure constant",examples:["fineStructure"]},hartreeEnergy:{description:"Hartree energy",examples:["hartreeEnergy"]},protonMass:{description:"Proton mass",examples:["protonMass"]},deuteronMass:{description:"Deuteron Mass",examples:["deuteronMass"]},neutronMass:{description:"Neutron mass",examples:["neutronMass"]},quantumOfCirculation:{description:"Quantum of circulation",examples:["quantumOfCirculation"]},rydberg:{description:"Rydberg constant",examples:["rydberg"]},thomsonCrossSection:{description:"Thomson cross section",examples:["thomsonCrossSection"]},weakMixingAngle:{description:"Weak mixing angle",examples:["weakMixingAngle"]},efimovFactor:{description:"Efimov factor",examples:["efimovFactor"]},atomicMass:{description:"Atomic mass constant",examples:["atomicMass"]},avogadro:{description:"Avogadro's number",examples:["avogadro"]},boltzmann:{description:"Boltzmann constant",examples:["boltzmann"]},faraday:{description:"Faraday constant",examples:["faraday"]},firstRadiation:{description:"First radiation constant",examples:["firstRadiation"]},loschmidt:{description:"Loschmidt constant at T=273.15 K and p=101.325 kPa",examples:["loschmidt"]},gasConstant:{description:"Gas constant",examples:["gasConstant"]},molarPlanckConstant:{description:"Molar Planck constant",examples:["molarPlanckConstant"]},molarVolume:{description:"Molar volume of an ideal gas at T=273.15 K and p=101.325 kPa",examples:["molarVolume"]},sackurTetrode:{description:"Sackur-Tetrode constant at T=1 K and p=101.325 kPa",examples:["sackurTetrode"]},secondRadiation:{description:"Second radiation constant",examples:["secondRadiation"]},stefanBoltzmann:{description:"Stefan-Boltzmann constant",examples:["stefanBoltzmann"]},wienDisplacement:{description:"Wien displacement law constant",examples:["wienDisplacement"]},molarMass:{description:"Molar mass constant",examples:["molarMass"]},molarMassC12:{description:"Molar mass constant of carbon-12",examples:["molarMassC12"]},gravity:{description:"Standard acceleration of gravity (standard acceleration of free-fall on Earth)",examples:["gravity"]},planckLength:{description:"Planck length",examples:["planckLength"]},planckMass:{description:"Planck mass",examples:["planckMass"]},planckTime:{description:"Planck time",examples:["planckTime"]},planckCharge:{description:"Planck charge",examples:["planckCharge"]},planckTemperature:{description:"Planck temperature",examples:["planckTemperature"]},derivative:KA,lsolve:eE,lsolveAll:rE,lup:tE,lusolve:nE,leafCount:jA,polynomialRoot:aE,resolve:sE,simplify:uE,simplifyConstant:cE,simplifyCore:lE,symbolicEqual:mE,rationalize:oE,slu:fE,usolve:vE,usolveAll:pE,qr:iE,abs:dE,add:hE,cbrt:gE,ceil:yE,cube:bE,divide:xE,dotDivide:wE,dotMultiply:NE,dotPow:DE,exp:AE,expm:EE,expm1:SE,fix:CE,floor:ME,gcd:FE,hypot:BE,lcm:OE,log:_E,log2:qE,log1p:IE,log10:$E,mod:RE,multiply:zE,norm:PE,nthRoot:UE,nthRoots:LE,pow:kE,round:HE,sign:GE,sqrt:VE,sqrtm:ZE,square:JE,subtract:QE,unaryMinus:KE,unaryPlus:jE,xgcd:eS,invmod:TE,bitAnd:rS,bitNot:tS,bitOr:nS,bitXor:aS,leftShift:iS,rightArithShift:oS,rightLogShift:sS,bellNumbers:uS,catalan:cS,composition:lS,stirlingS2:fS,config:WA,import:JA,typed:QA,arg:mS,conj:vS,re:dS,im:pS,evaluate:hS,help:gS,distance:yS,intersect:bS,and:xS,not:wS,or:NS,xor:DS,concat:ES,count:SS,cross:CS,column:AS,ctranspose:MS,det:FS,diag:BS,diff:TS,dot:OS,getMatrixDataType:RS,identity:zS,filter:$S,flatten:IS,forEach:qS,inv:PS,pinv:US,eigs:_S,kron:LS,matrixFromFunction:GS,matrixFromRows:VS,matrixFromColumns:HS,map:kS,ones:ZS,partitionSelect:XS,range:YS,resize:JS,reshape:WS,rotate:QS,rotationMatrix:KS,row:jS,size:eC,sort:rC,squeeze:tC,subset:nC,trace:aC,transpose:iC,zeros:oC,fft:sC,ifft:uC,sylvester:XE,schur:YE,lyap:WE,solveODE:ZM,combinations:cC,combinationsWithRep:lC,factorial:fC,gamma:mC,kldivergence:pC,lgamma:vC,multinomial:dC,permutations:hC,pickRandom:gC,random:yC,randomInt:bC,compare:xC,compareNatural:wC,compareText:NC,deepEqual:DC,equal:AC,equalText:EC,larger:SC,largerEq:CC,smaller:MC,smallerEq:FC,unequal:BC,setCartesian:TC,setDifference:OC,setDistinct:_C,setIntersect:$C,setIsSubset:IC,setMultiplicity:qC,setPowerset:RC,setSize:zC,setSymDifference:PC,setUnion:UC,zpk2tf:LC,freqz:kC,erf:HC,zeta:GC,cumsum:eM,mad:VC,max:ZC,mean:XC,median:YC,min:WC,mode:JC,prod:QC,quantileSeq:KC,std:jC,sum:rM,variance:tM,corr:nM,acos:aM,acosh:iM,acot:oM,acoth:sM,acsc:uM,acsch:cM,asec:lM,asech:fM,asin:mM,asinh:vM,atan:pM,atanh:hM,atan2:dM,cos:gM,cosh:yM,cot:bM,coth:xM,csc:wM,csch:NM,sec:DM,sech:AM,sin:EM,sinh:SM,tan:CM,tanh:MM,to:FM,clone:TM,format:OM,bin:BM,oct:HM,hex:$M,isNaN:qM,isInteger:IM,isNegative:RM,isNumeric:zM,hasNumericValue:_M,isPositive:PM,isPrime:UM,isZero:LM,print:GM,typeOf:VM,numeric:kM},yl="help",YM=["typed","mathWithTransform","Help"],WM=q(yl,YM,e=>{var{typed:r,mathWithTransform:a,Help:i}=e;return r(yl,{any:function(n){var o,l=n;if(typeof n!="string"){for(o in a)if(Se(a,o)&&n===a[o]){l=o;break}}var u=Or(XM,l);if(!u){var s=typeof l=="function"?l.name:l;throw new Error('No documentation found on "'+s+'"')}return new i(u)}})}),bl="chain",JM=["typed","Chain"],QM=q(bl,JM,e=>{var{typed:r,Chain:a}=e;return r(bl,{"":function(){return new a},any:function(t){return new a(t)}})}),xl="det",KM=["typed","matrix","subtractScalar","multiply","divideScalar","isZero","unaryMinus"],jM=q(xl,KM,e=>{var{typed:r,matrix:a,subtractScalar:i,multiply:t,divideScalar:n,isZero:o,unaryMinus:l}=e;return r(xl,{any:function(c){return qe(c)},"Array | Matrix":function(c){var f;switch(Te(c)?f=c.size():Array.isArray(c)?(c=a(c),f=c.size()):f=[],f.length){case 0:return qe(c);case 1:if(f[0]===1)return qe(c.valueOf()[0]);if(f[0]===0)return 1;throw new RangeError("Matrix must be square (size: "+Ge(f)+")");case 2:{var m=f[0],v=f[1];if(m===v)return u(c.clone().valueOf(),m);if(v===0)return 1;throw new RangeError("Matrix must be square (size: "+Ge(f)+")")}default:throw new RangeError("Matrix must be two dimensional (size: "+Ge(f)+")")}}});function u(s,c,f){if(c===1)return qe(s[0][0]);if(c===2)return i(t(s[0][0],s[1][1]),t(s[1][0],s[0][1]));for(var m=!1,v=new Array(c).fill(0).map((A,S)=>S),d=0;d{var{typed:r,matrix:a,divideScalar:i,addScalar:t,multiply:n,unaryMinus:o,det:l,identity:u,abs:s}=e;return r(wl,{"Array | Matrix":function(m){var v=Te(m)?m.size():Pe(m);switch(v.length){case 1:if(v[0]===1)return Te(m)?a([i(1,m.valueOf()[0])]):[i(1,m[0])];throw new RangeError("Matrix must be square (size: "+Ge(v)+")");case 2:{var d=v[0],p=v[1];if(d===p)return Te(m)?a(c(m.valueOf(),d,p),m.storage()):c(m,d,p);throw new RangeError("Matrix must be square (size: "+Ge(v)+")")}default:throw new RangeError("Matrix must be two dimensional (size: "+Ge(v)+")")}},any:function(m){return i(1,m)}});function c(f,m,v){var d,p,w,g,N;if(m===1){if(g=f[0][0],g===0)throw Error("Cannot calculate inverse, determinant is zero");return[[i(1,g)]]}else if(m===2){var h=l(f);if(h===0)throw Error("Cannot calculate inverse, determinant is zero");return[[i(f[1][1],h),i(o(f[0][1]),h)],[i(o(f[1][0]),h),i(f[0][0],h)]]}else{var b=f.concat();for(d=0;dA&&(A=s(b[d][y]),S=d),d++;if(A===0)throw Error("Cannot calculate inverse, determinant is zero");d=S,d!==y&&(N=b[y],b[y]=b[d],b[d]=N,N=x[y],x[y]=x[d],x[d]=N);var D=b[y],E=x[y];for(d=0;d{var{typed:r,matrix:a,inv:i,deepEqual:t,equal:n,dotDivide:o,dot:l,ctranspose:u,divideScalar:s,multiply:c,add:f,Complex:m}=e;return r(Nl,{"Array | Matrix":function(h){var b=Te(h)?h.size():Pe(h);switch(b.length){case 1:return g(h)?u(h):b[0]===1?i(h):o(u(h),l(h,h));case 2:{if(g(h))return u(h);var x=b[0],y=b[1];if(x===y)try{return i(h)}catch(A){if(!(A instanceof Error&&A.message.match(/Cannot calculate inverse, determinant is zero/)))throw A}return Te(h)?a(v(h.valueOf(),x,y),h.storage()):v(h,x,y)}default:throw new RangeError("Matrix must be two dimensional (size: "+Ge(b)+")")}},any:function(h){return n(h,0)?qe(h):s(1,h)}});function v(N,h,b){var{C:x,F:y}=p(N,h,b),A=c(i(c(u(x),x)),u(x)),S=c(u(y),i(c(y,u(y))));return c(S,A)}function d(N,h,b){for(var x=qe(N),y=0,A=0;AS.filter((E,C)=>C!w(l(x[D],x[D])));return{C:y,F:A}}function w(N){return n(f(N,m(1,1)),f(0,m(1,1)))}function g(N){return t(f(N,m(1,1)),f(c(N,0),m(1,1)))}});function a3(e){var{addScalar:r,subtract:a,flatten:i,multiply:t,multiplyScalar:n,divideScalar:o,sqrt:l,abs:u,bignumber:s,diag:c,size:f,reshape:m,inv:v,qr:d,usolve:p,usolveAll:w,equal:g,complex:N,larger:h,smaller:b,matrixFromColumns:x,dot:y}=e;function A(V,z,Q,le){var j=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,re=S(V,z,Q,le,j);D(V,z,Q,le,j,re);var{values:oe,C:ee}=E(V,z,Q,le,j);if(j){var ae=C(V,z,ee,re,oe,Q,le);return{values:oe,eigenvectors:ae}}return{values:oe}}function S(V,z,Q,le,j){var re=le==="BigNumber",oe=le==="Complex",ee=re?s(0):0,ae=re?s(1):oe?N(1):1,se=re?s(1):1,pe=re?s(10):2,Ne=n(pe,pe),Ee;j&&(Ee=Array(z).fill(ae));for(var P=!1;!P;){P=!0;for(var H=0;H1&&(P=c(Array(pe-1).fill(ee)))),pe-=1,ae.pop();for(var fe=0;fe2&&(P=c(Array(pe-2).fill(ee)))),pe-=2,ae.pop(),ae.pop();for(var U=0;U+a(u(ve),u(ce))),H>100){var J=Error("The eigenvalues failed to converge. Only found these eigenvalues: "+se.join(", "));throw J.values=se,J.vectors=[],J}var ne=j?t(Ee,$(Ne,z)):void 0;return{values:se,C:ne}}function C(V,z,Q,le,j,re,oe){var ee=v(Q),ae=t(ee,V,Q),se=oe==="BigNumber",pe=oe==="Complex",Ne=se?s(0):pe?N(0):0,Ee=se?s(1):pe?N(1):1,P=[],H=[];for(var te of j){var k=T(P,te,g);k===-1?(P.push(te),H.push(1)):H[k]+=1}for(var X=[],W=P.length,me=Array(z).fill(Ne),fe=c(Array(z).fill(Ee)),R=function(){var ne=P[U],ve=a(ae,t(ne,fe)),ce=w(ve,me);for(ce.shift();ce.lengtht(be,Ae)),X.push(...ce.map(Ae=>({value:ne,vector:i(Ae)})))},U=0;U=5)return null;for(ee=0;;){var ae=p(V,oe);if(b(Y(O(oe,[ae])),le))break;if(++ee>=10)return null;oe=K(ae)}return oe}function L(V,z,Q){var le=Q==="BigNumber",j=Q==="Complex",re=Array(V).fill(0).map(oe=>2*Math.random()-1);return le&&(re=re.map(oe=>s(oe))),j&&(re=re.map(oe=>N(oe))),re=O(re,z),K(re,Q)}function O(V,z){var Q=f(V);for(var le of z)le=m(le,Q),V=a(V,t(o(y(le,V),y(le,le)),le));return V}function Y(V){return u(l(y(V,V)))}function K(V,z){var Q=z==="BigNumber",le=z==="Complex",j=Q?s(1):le?N(1):1;return t(o(j,Y(V)),V)}return A}function i3(e){var{config:r,addScalar:a,subtract:i,abs:t,atan:n,cos:o,sin:l,multiplyScalar:u,inv:s,bignumber:c,multiply:f,add:m}=e;function v(D,E){var C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:r.epsilon,F=arguments.length>3?arguments[3]:void 0,_=arguments.length>4?arguments[4]:void 0;if(F==="number")return d(D,C,_);if(F==="BigNumber")return p(D,C,_);throw TypeError("Unsupported data type: "+F)}function d(D,E,C){var F=D.length,_=Math.abs(E/F),I,$;if(C){$=new Array(F);for(var T=0;T=Math.abs(_);){var L=B[0][0],O=B[0][1];I=w(D[L][L],D[O][O],D[L][O]),D=x(D,I,L,O),C&&($=N($,I,L,O)),B=y(D)}for(var Y=Array(F).fill(0),K=0;K=t(_);){var L=B[0][0],O=B[0][1];I=g(D[L][L],D[O][O],D[L][O]),D=b(D,I,L,O),C&&($=h($,I,L,O)),B=A(D)}for(var Y=Array(F).fill(0),K=0;K({value:_[z],vector:V}));return{values:_,eigenvectors:K}}return v}var o3="eigs",s3=["config","typed","matrix","addScalar","equal","subtract","abs","atan","cos","sin","multiplyScalar","divideScalar","inv","bignumber","multiply","add","larger","column","flatten","number","complex","sqrt","diag","size","reshape","qr","usolve","usolveAll","im","re","smaller","matrixFromColumns","dot"],u3=q(o3,s3,e=>{var{config:r,typed:a,matrix:i,addScalar:t,subtract:n,equal:o,abs:l,atan:u,cos:s,sin:c,multiplyScalar:f,divideScalar:m,inv:v,bignumber:d,multiply:p,add:w,larger:g,column:N,flatten:h,number:b,complex:x,sqrt:y,diag:A,size:S,reshape:D,qr:E,usolve:C,usolveAll:F,im:_,re:I,smaller:$,matrixFromColumns:T,dot:B}=e,L=i3({config:r,addScalar:t,subtract:n,abs:l,atan:u,cos:s,sin:c,multiplyScalar:f,inv:v,bignumber:d,multiply:p,add:w}),O=a3({addScalar:t,subtract:n,multiply:p,multiplyScalar:f,flatten:h,divideScalar:m,sqrt:y,abs:l,bignumber:d,diag:A,size:S,reshape:D,qr:E,inv:v,usolve:C,usolveAll:F,equal:o,complex:x,larger:g,smaller:$,matrixFromColumns:T,dot:B});return a("eigs",{Array:function(re){return Y(i(re))},"Array, number|BigNumber":function(re,oe){return Y(i(re),{precision:oe})},"Array, Object"(j,re){return Y(i(j),re)},Matrix:function(re){return Y(re,{matricize:!0})},"Matrix, number|BigNumber":function(re,oe){return Y(re,{precision:oe,matricize:!0})},"Matrix, Object":function(re,oe){var ee={matricize:!0};return xr(ee,oe),Y(re,ee)}});function Y(j){var re,oe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ee="eigenvectors"in oe?oe.eigenvectors:!0,ae=(re=oe.precision)!==null&&re!==void 0?re:r.epsilon,se=K(j,ae,ee);return oe.matricize&&(se.values=i(se.values),ee&&(se.eigenvectors=se.eigenvectors.map(pe=>{var{value:Ne,vector:Ee}=pe;return{value:Ne,vector:i(Ee)}}))),ee&&Object.defineProperty(se,"vectors",{enumerable:!1,get:()=>{throw new Error("eigs(M).vectors replaced with eigs(M).eigenvectors")}}),se}function K(j,re,oe){var ee=j.toArray(),ae=j.size();if(ae.length!==2||ae[0]!==ae[1])throw new RangeError("Matrix must be square (size: ".concat(Ge(ae),")"));var se=ae[0];if(z(ee,se,re)&&(Q(ee,se),V(ee,se,re))){var pe=le(j,ee,se);return L(ee,se,re,pe,oe)}var Ne=le(j,ee,se);return O(ee,se,re,Ne,oe)}function V(j,re,oe){for(var ee=0;ee{var{typed:r,abs:a,add:i,identity:t,inv:n,multiply:o}=e;return r(Dl,{Matrix:function(f){var m=f.size();if(m.length!==2||m[0]!==m[1])throw new RangeError("Matrix must be square (size: "+Ge(m)+")");for(var v=m[0],d=1e-15,p=l(f),w=u(p,d),g=w.q,N=w.j,h=o(f,Math.pow(2,-N)),b=t(v),x=t(v),y=1,A=h,S=-1,D=1;D<=g;D++)D>1&&(A=o(A,h),S=-S),y=y*(g-D+1)/((2*g-D+1)*D),b=i(b,o(y,A)),x=i(x,o(y*S,A));for(var E=o(n(x),b),C=0;C{var{typed:r,abs:a,add:i,multiply:t,map:n,sqrt:o,subtract:l,inv:u,size:s,max:c,identity:f}=e,m=1e3,v=1e-6;function d(p){var w,g=0,N=p,h=f(s(p));do{var b=N;if(N=t(.5,i(b,u(h))),h=t(.5,i(h,u(b))),w=c(a(l(N,b))),w>v&&++g>m)throw new Error("computing square root of matrix: iterative method could not converge")}while(w>v);return N}return r(Al,{"Array | Matrix":function(w){var g=Te(w)?w.size():Pe(w);switch(g.length){case 1:if(g[0]===1)return n(w,o);throw new RangeError("Matrix must be square (size: "+Ge(g)+")");case 2:{var N=g[0],h=g[1];if(N===h)return d(w);throw new RangeError("Matrix must be square (size: "+Ge(g)+")")}default:throw new RangeError("Matrix must be at most two dimensional (size: "+Ge(g)+")")}}})}),El="sylvester",v3=["typed","schur","matrixFromColumns","matrix","multiply","range","concat","transpose","index","subset","add","subtract","identity","lusolve","abs"],p3=q(El,v3,e=>{var{typed:r,schur:a,matrixFromColumns:i,matrix:t,multiply:n,range:o,concat:l,transpose:u,index:s,subset:c,add:f,subtract:m,identity:v,lusolve:d,abs:p}=e;return r(El,{"Matrix, Matrix, Matrix":w,"Array, Matrix, Matrix":function(N,h,b){return w(t(N),h,b)},"Array, Array, Matrix":function(N,h,b){return w(t(N),t(h),b)},"Array, Matrix, Array":function(N,h,b){return w(t(N),h,t(b))},"Matrix, Array, Matrix":function(N,h,b){return w(N,t(h),b)},"Matrix, Array, Array":function(N,h,b){return w(N,t(h),t(b))},"Matrix, Matrix, Array":function(N,h,b){return w(N,h,t(b))},"Array, Array, Array":function(N,h,b){return w(t(N),t(h),t(b)).toArray()}});function w(g,N,h){for(var b=N.size()[0],x=g.size()[0],y=a(g),A=y.T,S=y.U,D=a(n(-1,N)),E=D.T,C=D.U,F=n(n(u(S),h),C),_=o(0,x),I=[],$=(pe,Ne)=>l(pe,Ne,1),T=(pe,Ne)=>l(pe,Ne,0),B=0;B1e-5){for(var L=T(c(F,s(_,B)),c(F,s(_,B+1))),O=0;O{var{typed:r,matrix:a,identity:i,multiply:t,qr:n,norm:o,subtract:l}=e;return r(Sl,{Array:function(c){var f=u(a(c));return{U:f.U.valueOf(),T:f.T.valueOf()}},Matrix:function(c){return u(c)}});function u(s){var c=s.size()[0],f=s,m=i(c),v=0,d;do{d=f;var p=n(f),w=p.Q,g=p.R;if(f=t(g,w),m=t(m,w),v++>100)break}while(o(l(f,d))>1e-4);return{U:m,T:f}}}),Cl="lyap",g3=["typed","matrix","sylvester","multiply","transpose"],y3=q(Cl,g3,e=>{var{typed:r,matrix:a,sylvester:i,multiply:t,transpose:n}=e;return r(Cl,{"Matrix, Matrix":function(l,u){return i(l,n(l),t(-1,u))},"Array, Matrix":function(l,u){return i(a(l),n(a(l)),t(-1,u))},"Matrix, Array":function(l,u){return i(l,n(a(l)),a(t(-1,u)))},"Array, Array":function(l,u){return i(a(l),n(a(l)),a(t(-1,u))).toArray()}})}),b3="divide",x3=["typed","matrix","multiply","equalScalar","divideScalar","inv"],w3=q(b3,x3,e=>{var{typed:r,matrix:a,multiply:i,equalScalar:t,divideScalar:n,inv:o}=e,l=Dr({typed:r,equalScalar:t}),u=st({typed:r});return r("divide",Bf({"Array | Matrix, Array | Matrix":function(c,f){return i(c,o(f))},"DenseMatrix, any":function(c,f){return u(c,f,n,!1)},"SparseMatrix, any":function(c,f){return l(c,f,n,!1)},"Array, any":function(c,f){return u(a(c),f,n,!1).valueOf()},"any, Array | Matrix":function(c,f){return i(c,o(f))}},n.signatures))}),Ml="distance",N3=["typed","addScalar","subtractScalar","divideScalar","multiplyScalar","deepEqual","sqrt","abs"],D3=q(Ml,N3,e=>{var{typed:r,addScalar:a,subtractScalar:i,multiplyScalar:t,divideScalar:n,deepEqual:o,sqrt:l,abs:u}=e;return r(Ml,{"Array, Array, Array":function(x,y,A){if(x.length===2&&y.length===2&&A.length===2){if(!c(x))throw new TypeError("Array with 2 numbers or BigNumbers expected for first argument");if(!c(y))throw new TypeError("Array with 2 numbers or BigNumbers expected for second argument");if(!c(A))throw new TypeError("Array with 2 numbers or BigNumbers expected for third argument");if(o(y,A))throw new TypeError("LinePoint1 should not be same with LinePoint2");var S=i(A[1],y[1]),D=i(y[0],A[0]),E=i(t(A[0],y[1]),t(y[0],A[1]));return w(x[0],x[1],S,D,E)}else throw new TypeError("Invalid Arguments: Try again")},"Object, Object, Object":function(x,y,A){if(Object.keys(x).length===2&&Object.keys(y).length===2&&Object.keys(A).length===2){if(!c(x))throw new TypeError("Values of pointX and pointY should be numbers or BigNumbers");if(!c(y))throw new TypeError("Values of lineOnePtX and lineOnePtY should be numbers or BigNumbers");if(!c(A))throw new TypeError("Values of lineTwoPtX and lineTwoPtY should be numbers or BigNumbers");if(o(d(y),d(A)))throw new TypeError("LinePoint1 should not be same with LinePoint2");if("pointX"in x&&"pointY"in x&&"lineOnePtX"in y&&"lineOnePtY"in y&&"lineTwoPtX"in A&&"lineTwoPtY"in A){var S=i(A.lineTwoPtY,y.lineOnePtY),D=i(y.lineOnePtX,A.lineTwoPtX),E=i(t(A.lineTwoPtX,y.lineOnePtY),t(y.lineOnePtX,A.lineTwoPtY));return w(x.pointX,x.pointY,S,D,E)}else throw new TypeError("Key names do not match")}else throw new TypeError("Invalid Arguments: Try again")},"Array, Array":function(x,y){if(x.length===2&&y.length===3){if(!c(x))throw new TypeError("Array with 2 numbers or BigNumbers expected for first argument");if(!f(y))throw new TypeError("Array with 3 numbers or BigNumbers expected for second argument");return w(x[0],x[1],y[0],y[1],y[2])}else if(x.length===3&&y.length===6){if(!f(x))throw new TypeError("Array with 3 numbers or BigNumbers expected for first argument");if(!v(y))throw new TypeError("Array with 6 numbers or BigNumbers expected for second argument");return g(x[0],x[1],x[2],y[0],y[1],y[2],y[3],y[4],y[5])}else if(x.length===y.length&&x.length>0){if(!m(x))throw new TypeError("All values of an array should be numbers or BigNumbers");if(!m(y))throw new TypeError("All values of an array should be numbers or BigNumbers");return N(x,y)}else throw new TypeError("Invalid Arguments: Try again")},"Object, Object":function(x,y){if(Object.keys(x).length===2&&Object.keys(y).length===3){if(!c(x))throw new TypeError("Values of pointX and pointY should be numbers or BigNumbers");if(!f(y))throw new TypeError("Values of xCoeffLine, yCoeffLine and constant should be numbers or BigNumbers");if("pointX"in x&&"pointY"in x&&"xCoeffLine"in y&&"yCoeffLine"in y&&"constant"in y)return w(x.pointX,x.pointY,y.xCoeffLine,y.yCoeffLine,y.constant);throw new TypeError("Key names do not match")}else if(Object.keys(x).length===3&&Object.keys(y).length===6){if(!f(x))throw new TypeError("Values of pointX, pointY and pointZ should be numbers or BigNumbers");if(!v(y))throw new TypeError("Values of x0, y0, z0, a, b and c should be numbers or BigNumbers");if("pointX"in x&&"pointY"in x&&"x0"in y&&"y0"in y&&"z0"in y&&"a"in y&&"b"in y&&"c"in y)return g(x.pointX,x.pointY,x.pointZ,y.x0,y.y0,y.z0,y.a,y.b,y.c);throw new TypeError("Key names do not match")}else if(Object.keys(x).length===2&&Object.keys(y).length===2){if(!c(x))throw new TypeError("Values of pointOneX and pointOneY should be numbers or BigNumbers");if(!c(y))throw new TypeError("Values of pointTwoX and pointTwoY should be numbers or BigNumbers");if("pointOneX"in x&&"pointOneY"in x&&"pointTwoX"in y&&"pointTwoY"in y)return N([x.pointOneX,x.pointOneY],[y.pointTwoX,y.pointTwoY]);throw new TypeError("Key names do not match")}else if(Object.keys(x).length===3&&Object.keys(y).length===3){if(!f(x))throw new TypeError("Values of pointOneX, pointOneY and pointOneZ should be numbers or BigNumbers");if(!f(y))throw new TypeError("Values of pointTwoX, pointTwoY and pointTwoZ should be numbers or BigNumbers");if("pointOneX"in x&&"pointOneY"in x&&"pointOneZ"in x&&"pointTwoX"in y&&"pointTwoY"in y&&"pointTwoZ"in y)return N([x.pointOneX,x.pointOneY,x.pointOneZ],[y.pointTwoX,y.pointTwoY,y.pointTwoZ]);throw new TypeError("Key names do not match")}else throw new TypeError("Invalid Arguments: Try again")},Array:function(x){if(!p(x))throw new TypeError("Incorrect array format entered for pairwise distance calculation");return h(x)}});function s(b){return typeof b=="number"||Le(b)}function c(b){return b.constructor!==Array&&(b=d(b)),s(b[0])&&s(b[1])}function f(b){return b.constructor!==Array&&(b=d(b)),s(b[0])&&s(b[1])&&s(b[2])}function m(b){return Array.isArray(b)||(b=d(b)),b.every(s)}function v(b){return b.constructor!==Array&&(b=d(b)),s(b[0])&&s(b[1])&&s(b[2])&&s(b[3])&&s(b[4])&&s(b[5])}function d(b){for(var x=Object.keys(b),y=[],A=0;Ax.length!==2||!s(x[0])||!s(x[1])))return!1}else if(b[0].length===3&&s(b[0][0])&&s(b[0][1])&&s(b[0][2])){if(b.some(x=>x.length!==3||!s(x[0])||!s(x[1])||!s(x[2])))return!1}else return!1;return!0}function w(b,x,y,A,S){var D=u(a(a(t(y,b),t(A,x)),S)),E=l(a(t(y,y),t(A,A)));return n(D,E)}function g(b,x,y,A,S,D,E,C,F){var _=[i(t(i(S,x),F),t(i(D,y),C)),i(t(i(D,y),E),t(i(A,b),F)),i(t(i(A,b),C),t(i(S,x),E))];_=l(a(a(t(_[0],_[0]),t(_[1],_[1])),t(_[2],_[2])));var I=l(a(a(t(E,E),t(C,C)),t(F,F)));return n(_,I)}function N(b,x){for(var y=b.length,A=0,S=0,D=0;D{var{typed:r,config:a,abs:i,add:t,addScalar:n,matrix:o,multiply:l,multiplyScalar:u,divideScalar:s,subtract:c,smaller:f,equalScalar:m,flatten:v,isZero:d,isNumeric:p}=e;return r("intersect",{"Array, Array, Array":w,"Array, Array, Array, Array":g,"Matrix, Matrix, Matrix":function(C,F,_){var I=w(C.valueOf(),F.valueOf(),_.valueOf());return I===null?null:o(I)},"Matrix, Matrix, Matrix, Matrix":function(C,F,_,I){var $=g(C.valueOf(),F.valueOf(),_.valueOf(),I.valueOf());return $===null?null:o($)}});function w(E,C,F){if(E=N(E),C=N(C),F=N(F),!b(E))throw new TypeError("Array with 3 numbers or BigNumbers expected for first argument");if(!b(C))throw new TypeError("Array with 3 numbers or BigNumbers expected for second argument");if(!x(F))throw new TypeError("Array with 4 numbers expected as third argument");return D(E[0],E[1],E[2],C[0],C[1],C[2],F[0],F[1],F[2],F[3])}function g(E,C,F,_){if(E=N(E),C=N(C),F=N(F),_=N(_),E.length===2){if(!h(E))throw new TypeError("Array with 2 numbers or BigNumbers expected for first argument");if(!h(C))throw new TypeError("Array with 2 numbers or BigNumbers expected for second argument");if(!h(F))throw new TypeError("Array with 2 numbers or BigNumbers expected for third argument");if(!h(_))throw new TypeError("Array with 2 numbers or BigNumbers expected for fourth argument");return y(E,C,F,_)}else if(E.length===3){if(!b(E))throw new TypeError("Array with 3 numbers or BigNumbers expected for first argument");if(!b(C))throw new TypeError("Array with 3 numbers or BigNumbers expected for second argument");if(!b(F))throw new TypeError("Array with 3 numbers or BigNumbers expected for third argument");if(!b(_))throw new TypeError("Array with 3 numbers or BigNumbers expected for fourth argument");return S(E[0],E[1],E[2],C[0],C[1],C[2],F[0],F[1],F[2],_[0],_[1],_[2])}else throw new TypeError("Arrays with two or thee dimensional points expected")}function N(E){return E.length===1?E[0]:E.length>1&&Array.isArray(E[0])&&E.every(C=>Array.isArray(C)&&C.length===1)?v(E):E}function h(E){return E.length===2&&p(E[0])&&p(E[1])}function b(E){return E.length===3&&p(E[0])&&p(E[1])&&p(E[2])}function x(E){return E.length===4&&p(E[0])&&p(E[1])&&p(E[2])&&p(E[3])}function y(E,C,F,_){var I=E,$=F,T=c(I,C),B=c($,_),L=c(u(T[0],B[1]),u(B[0],T[1]));if(d(L)||f(i(L),a.epsilon))return null;var O=u(B[0],I[1]),Y=u(B[1],I[0]),K=u(B[0],$[1]),V=u(B[1],$[0]),z=s(n(c(c(O,Y),K),V),L);return t(l(T,z),I)}function A(E,C,F,_,I,$,T,B,L,O,Y,K){var V=u(c(E,C),c(F,_)),z=u(c(I,$),c(T,B)),Q=u(c(L,O),c(Y,K));return n(n(V,z),Q)}function S(E,C,F,_,I,$,T,B,L,O,Y,K){var V=A(E,T,O,T,C,B,Y,B,F,L,K,L),z=A(O,T,_,E,Y,B,I,C,K,L,$,F),Q=A(E,T,_,E,C,B,I,C,F,L,$,F),le=A(O,T,O,T,Y,B,Y,B,K,L,K,L),j=A(_,E,_,E,I,C,I,C,$,F,$,F),re=c(u(V,z),u(Q,le)),oe=c(u(j,le),u(z,z));if(d(oe))return null;var ee=s(re,oe),ae=s(n(V,u(ee,z)),le),se=n(E,u(ee,c(_,E))),pe=n(C,u(ee,c(I,C))),Ne=n(F,u(ee,c($,F))),Ee=n(T,u(ae,c(O,T))),P=n(B,u(ae,c(Y,B))),H=n(L,u(ae,c(K,L)));return m(se,Ee)&&m(pe,P)&&m(Ne,H)?[se,pe,Ne]:null}function D(E,C,F,_,I,$,T,B,L,O){var Y=u(E,T),K=u(_,T),V=u(C,B),z=u(I,B),Q=u(F,L),le=u($,L),j=c(c(c(O,Y),V),Q),re=c(c(c(n(n(K,z),le),Y),V),Q),oe=s(j,re),ee=n(E,u(oe,c(_,E))),ae=n(C,u(oe,c(I,C))),se=n(F,u(oe,c($,F)));return[ee,ae,se]}}),Fl="sum",C3=["typed","config","add","numeric"],Mv=q(Fl,C3,e=>{var{typed:r,config:a,add:i,numeric:t}=e;return r(Fl,{"Array | Matrix":n,"Array | Matrix, number | BigNumber":o,"...":function(u){if(En(u))throw new TypeError("Scalar values expected in function sum");return n(u)}});function n(l){var u;return At(l,function(s){try{u=u===void 0?s:i(u,s)}catch(c){throw qr(c,"sum",s)}}),u===void 0&&(u=t(0,a.number)),typeof u=="string"&&(u=t(u,a.number)),u}function o(l,u){try{var s=pi(l,u,i);return s}catch(c){throw qr(c,"sum")}}}),Ea="cumsum",M3=["typed","add","unaryPlus"],Fv=q(Ea,M3,e=>{var{typed:r,add:a,unaryPlus:i}=e;return r(Ea,{Array:t,Matrix:function(s){return s.create(t(s.valueOf()))},"Array, number | BigNumber":o,"Matrix, number | BigNumber":function(s,c){return s.create(o(s.valueOf(),c))},"...":function(s){if(En(s))throw new TypeError("All values expected to be scalar in function cumsum");return t(s)}});function t(u){try{return n(u)}catch(s){throw qr(s,Ea)}}function n(u){if(u.length===0)return[];for(var s=[i(u[0])],c=1;c=c.length)throw new it(s,c.length);try{return l(u,s)}catch(f){throw qr(f,Ea)}}function l(u,s){var c,f,m;if(s<=0){var v=u[0][0];if(Array.isArray(v)){for(m=um(u),f=[],c=0;c{var{typed:r,add:a,divide:i}=e;return r(Bl,{"Array | Matrix":n,"Array | Matrix, number | BigNumber":t,"...":function(l){if(En(l))throw new TypeError("Scalar values expected in function mean");return n(l)}});function t(o,l){try{var u=pi(o,l,a),s=Array.isArray(o)?Pe(o):o.size();return i(u,s[l])}catch(c){throw qr(c,"mean")}}function n(o){var l,u=0;if(At(o,function(s){try{l=l===void 0?s:a(l,s),u++}catch(c){throw qr(c,"mean",s)}}),u===0)throw new Error("Cannot calculate the mean of an empty array");return i(l,u)}}),Tl="median",B3=["typed","add","divide","compare","partitionSelect"],T3=q(Tl,B3,e=>{var{typed:r,add:a,divide:i,compare:t,partitionSelect:n}=e;function o(s){try{s=Ke(s.valueOf());var c=s.length;if(c===0)throw new Error("Cannot calculate median of an empty array");if(c%2===0){for(var f=c/2-1,m=n(s,f+1),v=s[f],d=0;d0&&(v=s[d]);return u(v,m)}else{var p=n(s,(c-1)/2);return l(p)}}catch(w){throw qr(w,"median")}}var l=r({"number | BigNumber | Complex | Unit":function(c){return c}}),u=r({"number | BigNumber | Complex | Unit, number | BigNumber | Complex | Unit":function(c,f){return i(a(c,f),2)}});return r(Tl,{"Array | Matrix":o,"Array | Matrix, number | BigNumber":function(c,f){throw new Error("median(A, dim) is not yet supported")},"...":function(c){if(En(c))throw new TypeError("Scalar values expected in function median");return o(c)}})}),Ol="mad",O3=["typed","abs","map","median","subtract"],_3=q(Ol,O3,e=>{var{typed:r,abs:a,map:i,median:t,subtract:n}=e;return r(Ol,{"Array | Matrix":o,"...":function(u){return o(u)}});function o(l){if(l=Ke(l.valueOf()),l.length===0)throw new Error("Cannot calculate median absolute deviation (mad) of an empty array");try{var u=t(l);return t(i(l,function(s){return a(n(s,u))}))}catch(s){throw s instanceof TypeError&&s.message.indexOf("median")!==-1?new TypeError(s.message.replace("median","mad")):qr(s,"mad")}}}),Li="unbiased",_l="variance",$3=["typed","add","subtract","multiply","divide","apply","isNaN"],Tv=q(_l,$3,e=>{var{typed:r,add:a,subtract:i,multiply:t,divide:n,apply:o,isNaN:l}=e;return r(_l,{"Array | Matrix":function(f){return u(f,Li)},"Array | Matrix, string":u,"Array | Matrix, number | BigNumber":function(f,m){return s(f,m,Li)},"Array | Matrix, number | BigNumber, string":s,"...":function(f){return u(f,Li)}});function u(c,f){var m,v=0;if(c.length===0)throw new SyntaxError("Function variance requires one or more parameters (0 provided)");if(At(c,function(w){try{m=m===void 0?w:a(m,w),v++}catch(g){throw qr(g,"variance",w)}}),v===0)throw new Error("Cannot calculate variance of an empty array");var d=n(m,v);if(m=void 0,At(c,function(w){var g=i(w,d);m=m===void 0?t(g,g):a(m,t(g,g))}),l(m))return m;switch(f){case"uncorrected":return n(m,v);case"biased":return n(m,v+1);case"unbiased":{var p=Le(m)?m.mul(0):0;return v===1?p:n(m,v-1)}default:throw new Error('Unknown normalization "'+f+'". Choose "unbiased" (default), "uncorrected", or "biased".')}}function s(c,f,m){try{if(c.length===0)throw new SyntaxError("Function variance requires one or more parameters (0 provided)");return o(c,f,v=>u(v,m))}catch(v){throw qr(v,"variance")}}}),$l="quantileSeq",I3=["typed","?bignumber","add","subtract","divide","multiply","partitionSelect","compare","isInteger","smaller","smallerEq","larger"],Ov=q($l,I3,e=>{var{typed:r,bignumber:a,add:i,subtract:t,divide:n,multiply:o,partitionSelect:l,compare:u,isInteger:s,smaller:c,smallerEq:f,larger:m}=e,v=fo({typed:r,isInteger:s});return r($l,{"Array | Matrix, number | BigNumber":(N,h)=>p(N,h,!1),"Array | Matrix, number | BigNumber, number":(N,h,b)=>d(N,h,!1,b,p),"Array | Matrix, number | BigNumber, boolean":p,"Array | Matrix, number | BigNumber, boolean, number":(N,h,b,x)=>d(N,h,b,x,p),"Array | Matrix, Array | Matrix":(N,h)=>w(N,h,!1),"Array | Matrix, Array | Matrix, number":(N,h,b)=>d(N,h,!1,b,w),"Array | Matrix, Array | Matrix, boolean":w,"Array | Matrix, Array | Matrix, boolean, number":(N,h,b,x)=>d(N,h,b,x,w)});function d(N,h,b,x,y){return v(N,x,A=>y(A,h,b))}function p(N,h,b){var x,y=N.valueOf();if(c(h,0))throw new Error("N/prob must be non-negative");if(f(h,1))return Ue(h)?g(y,h,b):a(g(y,h,b));if(m(h,1)){if(!s(h))throw new Error("N must be a positive integer");if(m(h,4294967295))throw new Error("N must be less than or equal to 2^32-1, as that is the maximum length of an Array");var A=i(h,1);x=[];for(var S=0;c(S,h);S++){var D=n(S+1,A);x.push(g(y,D,b))}return Ue(h)?x:a(x)}}function w(N,h,b){for(var x=N.valueOf(),y=h.valueOf(),A=[],S=0;S0&&(E=x[F])}return i(o(E,t(1,D)),o(C,D))}}),Il="std",q3=["typed","map","sqrt","variance"],_v=q(Il,q3,e=>{var{typed:r,map:a,sqrt:i,variance:t}=e;return r(Il,{"Array | Matrix":n,"Array | Matrix, string":n,"Array | Matrix, number | BigNumber":n,"Array | Matrix, number | BigNumber, string":n,"...":function(l){return n(l)}});function n(o,l){if(o.length===0)throw new SyntaxError("Function std requires one or more parameters (0 provided)");try{var u=t.apply(null,arguments);return Qr(u)?a(u,i):i(u)}catch(s){throw s instanceof TypeError&&s.message.indexOf(" variance")!==-1?new TypeError(s.message.replace(" variance"," std")):s}}}),ql="corr",R3=["typed","matrix","mean","sqrt","sum","add","subtract","multiply","pow","divide"],z3=q(ql,R3,e=>{var{typed:r,matrix:a,sqrt:i,sum:t,add:n,subtract:o,multiply:l,pow:u,divide:s}=e;return r(ql,{"Array, Array":function(v,d){return c(v,d)},"Matrix, Matrix":function(v,d){var p=c(v.toArray(),d.toArray());return Array.isArray(p)?a(p):p}});function c(m,v){var d=[];if(Array.isArray(m[0])&&Array.isArray(v[0])){if(m.length!==v.length)throw new SyntaxError("Dimension mismatch. Array A and B must have the same length.");for(var p=0;pn(y,l(A,v[S])),0),N=t(m.map(y=>u(y,2))),h=t(v.map(y=>u(y,2))),b=o(l(d,g),l(p,w)),x=i(l(o(l(d,N),u(p,2)),o(l(d,h),u(w,2))));return s(b,x)}}),Rl="combinations",P3=["typed"],U3=q(Rl,P3,e=>{var{typed:r}=e;return r(Rl,{"number, number":Tm,"BigNumber, BigNumber":function(i,t){var n=i.constructor,o,l,u=i.minus(t),s=new n(1);if(!zl(i)||!zl(t))throw new TypeError("Positive integer value expected in function combinations");if(t.gt(i))throw new TypeError("k must be less than n in function combinations");if(o=s,t.lt(u))for(l=s;l.lte(u);l=l.plus(s))o=o.times(t.plus(l)).dividedBy(l);else for(l=s;l.lte(t);l=l.plus(s))o=o.times(u.plus(l)).dividedBy(l);return o}})});function zl(e){return e.isInteger()&&e.gte(0)}var Pl="combinationsWithRep",L3=["typed"],k3=q(Pl,L3,e=>{var{typed:r}=e;return r(Pl,{"number, number":function(i,t){if(!Ce(i)||i<0)throw new TypeError("Positive integer value expected in function combinationsWithRep");if(!Ce(t)||t<0)throw new TypeError("Positive integer value expected in function combinationsWithRep");if(i<1)throw new TypeError("k must be less than or equal to n + k - 1");if(t{var{typed:r,config:a,multiplyScalar:i,pow:t,BigNumber:n,Complex:o}=e;function l(s){if(s.im===0)return Va(s.re);if(s.re<.5){var c=new o(1-s.re,-s.im),f=new o(Math.PI*s.re,Math.PI*s.im);return new o(Math.PI).div(f.sin()).div(l(c))}s=new o(s.re-1,s.im);for(var m=new o(dn[0],0),v=1;v2;)m-=2,d+=m,v=v.times(d);return new n(v.toPrecision(n.precision))}}),kl="lgamma",V3=["Complex","typed"],Z3=q(kl,V3,e=>{var{Complex:r,typed:a}=e,i=7,t=7,n=[-.029550653594771242,.00641025641025641,-.0019175269175269176,.0008417508417508417,-.0005952380952380953,.0007936507936507937,-.002777777777777778,.08333333333333333];return a(kl,{number:Za,Complex:o,BigNumber:function(){throw new Error("mathjs doesn't yet provide an implementation of the algorithm lgamma for BigNumber")}});function o(s){var c=6.283185307179586,f=1.1447298858494002,m=.1;if(s.isNaN())return new r(NaN,NaN);if(s.im===0)return new r(Za(s.re),0);if(s.re>=i||Math.abs(s.im)>=t)return l(s);if(s.re<=m){var v=qd(c,s.im)*Math.floor(.5*s.re+.25),d=s.mul(Math.PI).sin().log(),p=o(new r(1-s.re,-s.im));return new r(f,v).sub(d).sub(p)}else return s.im>=0?u(s):u(s.conjugate()).conjugate()}function l(s){for(var c=s.sub(.5).mul(s.log()).sub(s).add(Rm),f=new r(1,0).div(s),m=f.div(s),v=n[0],d=n[1],p=2*m.re,w=m.re*m.re+m.im*m.im,g=2;g<8;g++){var N=d;d=-w*v+n[g],v=p*v+N}var h=f.mul(m.mul(v).add(d));return c.add(h)}function u(s){var c=0,f=0,m=s;for(s=s.add(1);s.re<=i;){m=m.mul(s);var v=m.im<0?1:0;v!==0&&f===0&&c++,f=v,s=s.add(1)}return l(s).sub(m.log()).sub(new r(0,c*2*Math.PI*1))}}),Hl="factorial",X3=["typed","gamma"],Y3=q(Hl,X3,e=>{var{typed:r,gamma:a}=e;return r(Hl,{number:function(t){if(t<0)throw new Error("Value must be non-negative");return a(t+1)},BigNumber:function(t){if(t.isNegative())throw new Error("Value must be non-negative");return a(t.plus(1))},"Array | Matrix":r.referToSelf(i=>t=>Ze(t,i))})}),Gl="kldivergence",W3=["typed","matrix","divide","sum","multiply","map","dotDivide","log","isNumeric"],J3=q(Gl,W3,e=>{var{typed:r,matrix:a,divide:i,sum:t,multiply:n,map:o,dotDivide:l,log:u,isNumeric:s}=e;return r(Gl,{"Array, Array":function(m,v){return c(a(m),a(v))},"Matrix, Array":function(m,v){return c(m,a(v))},"Array, Matrix":function(m,v){return c(a(m),v)},"Matrix, Matrix":function(m,v){return c(m,v)}});function c(f,m){var v=m.size().length,d=f.size().length;if(v>1)throw new Error("first object must be one dimensional");if(d>1)throw new Error("second object must be one dimensional");if(v!==d)throw new Error("Length of two vectors must be equal");var p=t(f);if(p===0)throw new Error("Sum of elements in first object must be non zero");var w=t(m);if(w===0)throw new Error("Sum of elements in second object must be non zero");var g=i(f,t(f)),N=i(m,t(m)),h=t(n(g,o(l(g,N),b=>u(b))));return s(h)?h:Number.NaN}}),Vl="multinomial",Q3=["typed","add","divide","multiply","factorial","isInteger","isPositive"],K3=q(Vl,Q3,e=>{var{typed:r,add:a,divide:i,multiply:t,factorial:n,isInteger:o,isPositive:l}=e;return r(Vl,{"Array | Matrix":function(s){var c=0,f=1;return At(s,function(m){if(!o(m)||!l(m))throw new TypeError("Positive integer value expected in function multinomial");c=a(c,m),f=t(f,n(m))}),i(n(c),f)}})}),Zl="permutations",j3=["typed","factorial"],eF=q(Zl,j3,e=>{var{typed:r,factorial:a}=e;return r(Zl,{"number | BigNumber":a,"number, number":function(t,n){if(!Ce(t)||t<0)throw new TypeError("Positive integer value expected in function permutations");if(!Ce(n)||n<0)throw new TypeError("Positive integer value expected in function permutations");if(n>t)throw new TypeError("second argument k must be less than or equal to first argument n");return xt(t-n+1,t)},"BigNumber, BigNumber":function(t,n){var o,l;if(!Xl(t)||!Xl(n))throw new TypeError("Positive integer value expected in function permutations");if(n.gt(t))throw new TypeError("second argument k must be less than or equal to first argument n");var u=t.mul(0).add(1);for(o=u,l=t.minus(n).plus(1);l.lte(t);l=l.plus(1))o=o.times(l);return o}})});function Xl(e){return e.isInteger()&&e.gte(0)}var Ma={exports:{}},rF=Ma.exports,Yl;function tF(){return Yl||(Yl=1,(function(e){(function(r,a,i){function t(u){var s=this,c=l();s.next=function(){var f=2091639*s.s0+s.c*23283064365386963e-26;return s.s0=s.s1,s.s1=s.s2,s.s2=f-(s.c=f|0)},s.c=1,s.s0=c(" "),s.s1=c(" "),s.s2=c(" "),s.s0-=c(u),s.s0<0&&(s.s0+=1),s.s1-=c(u),s.s1<0&&(s.s1+=1),s.s2-=c(u),s.s2<0&&(s.s2+=1),c=null}function n(u,s){return s.c=u.c,s.s0=u.s0,s.s1=u.s1,s.s2=u.s2,s}function o(u,s){var c=new t(u),f=s&&s.state,m=c.next;return m.int32=function(){return c.next()*4294967296|0},m.double=function(){return m()+(m()*2097152|0)*11102230246251565e-32},m.quick=m,f&&(typeof f=="object"&&n(f,c),m.state=function(){return n(c,{})}),m}function l(){var u=4022871197,s=function(c){c=String(c);for(var f=0;f>>0,m-=u,m*=u,u=m>>>0,m-=u,u+=m*4294967296}return(u>>>0)*23283064365386963e-26};return s}a&&a.exports?a.exports=o:this.alea=o})(rF,e)})(Ma)),Ma.exports}var Fa={exports:{}},nF=Fa.exports,Wl;function aF(){return Wl||(Wl=1,(function(e){(function(r,a,i){function t(l){var u=this,s="";u.x=0,u.y=0,u.z=0,u.w=0,u.next=function(){var f=u.x^u.x<<11;return u.x=u.y,u.y=u.z,u.z=u.w,u.w^=u.w>>>19^f^f>>>8},l===(l|0)?u.x=l:s+=l;for(var c=0;c>>0)/4294967296};return f.double=function(){do var m=s.next()>>>11,v=(s.next()>>>0)/4294967296,d=(m+v)/(1<<21);while(d===0);return d},f.int32=s.next,f.quick=f,c&&(typeof c=="object"&&n(c,s),f.state=function(){return n(s,{})}),f}a&&a.exports?a.exports=o:this.xor128=o})(nF,e)})(Fa)),Fa.exports}var Ba={exports:{}},iF=Ba.exports,Jl;function oF(){return Jl||(Jl=1,(function(e){(function(r,a,i){function t(l){var u=this,s="";u.next=function(){var f=u.x^u.x>>>2;return u.x=u.y,u.y=u.z,u.z=u.w,u.w=u.v,(u.d=u.d+362437|0)+(u.v=u.v^u.v<<4^(f^f<<1))|0},u.x=0,u.y=0,u.z=0,u.w=0,u.v=0,l===(l|0)?u.x=l:s+=l;for(var c=0;c>>4),u.next()}function n(l,u){return u.x=l.x,u.y=l.y,u.z=l.z,u.w=l.w,u.v=l.v,u.d=l.d,u}function o(l,u){var s=new t(l),c=u&&u.state,f=function(){return(s.next()>>>0)/4294967296};return f.double=function(){do var m=s.next()>>>11,v=(s.next()>>>0)/4294967296,d=(m+v)/(1<<21);while(d===0);return d},f.int32=s.next,f.quick=f,c&&(typeof c=="object"&&n(c,s),f.state=function(){return n(s,{})}),f}a&&a.exports?a.exports=o:this.xorwow=o})(iF,e)})(Ba)),Ba.exports}var Ta={exports:{}},sF=Ta.exports,Ql;function uF(){return Ql||(Ql=1,(function(e){(function(r,a,i){function t(l){var u=this;u.next=function(){var c=u.x,f=u.i,m,v;return m=c[f],m^=m>>>7,v=m^m<<24,m=c[f+1&7],v^=m^m>>>10,m=c[f+3&7],v^=m^m>>>3,m=c[f+4&7],v^=m^m<<7,m=c[f+7&7],m=m^m<<13,v^=m^m<<9,c[f]=v,u.i=f+1&7,v};function s(c,f){var m,v=[];if(f===(f|0))v[0]=f;else for(f=""+f,m=0;m0;--m)c.next()}s(u,l)}function n(l,u){return u.x=l.x.slice(),u.i=l.i,u}function o(l,u){l==null&&(l=+new Date);var s=new t(l),c=u&&u.state,f=function(){return(s.next()>>>0)/4294967296};return f.double=function(){do var m=s.next()>>>11,v=(s.next()>>>0)/4294967296,d=(m+v)/(1<<21);while(d===0);return d},f.int32=s.next,f.quick=f,c&&(c.x&&n(c,s),f.state=function(){return n(s,{})}),f}a&&a.exports?a.exports=o:this.xorshift7=o})(sF,e)})(Ta)),Ta.exports}var Oa={exports:{}},cF=Oa.exports,Kl;function lF(){return Kl||(Kl=1,(function(e){(function(r,a,i){function t(l){var u=this;u.next=function(){var c=u.w,f=u.X,m=u.i,v,d;return u.w=c=c+1640531527|0,d=f[m+34&127],v=f[m=m+1&127],d^=d<<13,v^=v<<17,d^=d>>>15,v^=v>>>12,d=f[m]=d^v,u.i=m,d+(c^c>>>16)|0};function s(c,f){var m,v,d,p,w,g=[],N=128;for(f===(f|0)?(v=f,f=null):(f=f+"\0",v=0,N=Math.max(N,f.length)),d=0,p=-32;p>>15,v^=v<<4,v^=v>>>13,p>=0&&(w=w+1640531527|0,m=g[p&127]^=v+w,d=m==0?d+1:0);for(d>=128&&(g[(f&&f.length||0)&127]=-1),d=127,p=512;p>0;--p)v=g[d+34&127],m=g[d=d+1&127],v^=v<<13,m^=m<<17,v^=v>>>15,m^=m>>>12,g[d]=v^m;c.w=w,c.X=g,c.i=d}s(u,l)}function n(l,u){return u.i=l.i,u.w=l.w,u.X=l.X.slice(),u}function o(l,u){l==null&&(l=+new Date);var s=new t(l),c=u&&u.state,f=function(){return(s.next()>>>0)/4294967296};return f.double=function(){do var m=s.next()>>>11,v=(s.next()>>>0)/4294967296,d=(m+v)/(1<<21);while(d===0);return d},f.int32=s.next,f.quick=f,c&&(c.X&&n(c,s),f.state=function(){return n(s,{})}),f}a&&a.exports?a.exports=o:this.xor4096=o})(cF,e)})(Oa)),Oa.exports}var _a={exports:{}},fF=_a.exports,jl;function mF(){return jl||(jl=1,(function(e){(function(r,a,i){function t(l){var u=this,s="";u.next=function(){var f=u.b,m=u.c,v=u.d,d=u.a;return f=f<<25^f>>>7^m,m=m-v|0,v=v<<24^v>>>8^d,d=d-f|0,u.b=f=f<<20^f>>>12^m,u.c=m=m-v|0,u.d=v<<16^m>>>16^d,u.a=d-f|0},u.a=0,u.b=0,u.c=-1640531527,u.d=1367130551,l===Math.floor(l)?(u.a=l/4294967296|0,u.b=l|0):s+=l;for(var c=0;c>>0)/4294967296};return f.double=function(){do var m=s.next()>>>11,v=(s.next()>>>0)/4294967296,d=(m+v)/(1<<21);while(d===0);return d},f.int32=s.next,f.quick=f,c&&(typeof c=="object"&&n(c,s),f.state=function(){return n(s,{})}),f}a&&a.exports?a.exports=o:this.tychei=o})(fF,e)})(_a)),_a.exports}var $a={exports:{}};const vF={},pF=Object.freeze(Object.defineProperty({__proto__:null,default:vF},Symbol.toStringTag,{value:"Module"})),dF=nd(pF);var hF=$a.exports,ef;function gF(){return ef||(ef=1,(function(e){(function(r,a,i){var t=256,n=6,o=52,l="random",u=i.pow(t,n),s=i.pow(2,o),c=s*2,f=t-1,m;function v(b,x,y){var A=[];x=x==!0?{entropy:!0}:x||{};var S=g(w(x.entropy?[b,h(a)]:b??N(),3),A),D=new d(A),E=function(){for(var C=D.g(n),F=u,_=0;C=c;)C/=2,F/=2,_>>>=1;return(C+_)/F};return E.int32=function(){return D.g(4)|0},E.quick=function(){return D.g(4)/4294967296},E.double=E,g(h(D.S),a),(x.pass||y||function(C,F,_,I){return I&&(I.S&&p(I,D),C.state=function(){return p(D,{})}),_?(i[l]=C,F):C})(E,S,"global"in x?x.global:this==i,x.state)}function d(b){var x,y=b.length,A=this,S=0,D=A.i=A.j=0,E=A.S=[];for(y||(b=[y++]);S{var{typed:r,config:a,on:i}=e,t=wn(a.randomSeed);return i&&i("config",function(o,l){o.randomSeed!==l.randomSeed&&(t=wn(o.randomSeed))}),r(tf,{"Array | Matrix":function(l){return n(l,{})},"Array | Matrix, Object":function(l,u){return n(l,u)},"Array | Matrix, number":function(l,u){return n(l,{number:u})},"Array | Matrix, Array | Matrix":function(l,u){return n(l,{weights:u})},"Array | Matrix, Array | Matrix, number":function(l,u,s){return n(l,{number:s,weights:u})},"Array | Matrix, number, Array | Matrix":function(l,u,s){return n(l,{number:u,weights:s})}});function n(o,l){var{number:u,weights:s,elementWise:c=!0}=l,f=typeof u>"u";f&&(u=1);var m=Te(o)?o.create:Te(s)?s.create:null;o=o.valueOf(),s&&(s=s.valueOf()),c===!0&&(o=Ke(o),s=Ke(s));var v=0;if(typeof s<"u"){if(s.length!==o.length)throw new Error("Weights must have the same length as possibles");for(var d=0,p=s.length;d"u")N=o[Math.floor(t()*w)];else for(var h=t()*v,b=0,x=o.length;b1)for(var i=0,t=e.shift();i{var{typed:r,config:a,on:i}=e,t=wn(a.randomSeed);return i&&i("config",function(l,u){l.randomSeed!==u.randomSeed&&(t=wn(l.randomSeed))}),r(nf,{"":()=>o(0,1),number:l=>o(0,l),"number, number":(l,u)=>o(l,u),"Array | Matrix":l=>n(l,0,1),"Array | Matrix, number":(l,u)=>n(l,0,u),"Array | Matrix, number, number":(l,u,s)=>n(l,u,s)});function n(l,u,s){var c=bo(l.valueOf(),()=>o(u,s));return Te(l)?l.create(c):c}function o(l,u){return l+t()*(u-l)}}),af="randomInt",EF=["typed","config","?on"],SF=q(af,EF,e=>{var{typed:r,config:a,on:i}=e,t=wn(a.randomSeed);return i&&i("config",function(l,u){l.randomSeed!==u.randomSeed&&(t=wn(l.randomSeed))}),r(af,{"":()=>o(0,1),number:l=>o(0,l),"number, number":(l,u)=>o(l,u),"Array | Matrix":l=>n(l,0,1),"Array | Matrix, number":(l,u)=>n(l,0,u),"Array | Matrix, number, number":(l,u,s)=>n(l,u,s)});function n(l,u,s){var c=bo(l.valueOf(),()=>o(u,s));return Te(l)?l.create(c):c}function o(l,u){return Math.floor(l+t()*(u-l))}}),of="stirlingS2",CF=["typed","addScalar","subtractScalar","multiplyScalar","divideScalar","pow","factorial","combinations","isNegative","isInteger","number","?bignumber","larger"],MF=q(of,CF,e=>{var{typed:r,addScalar:a,subtractScalar:i,multiplyScalar:t,divideScalar:n,pow:o,factorial:l,combinations:u,isNegative:s,isInteger:c,number:f,bignumber:m,larger:v}=e,d=[],p=[];return r(of,{"number | BigNumber, number | BigNumber":function(g,N){if(!c(g)||s(g)||!c(N)||s(N))throw new TypeError("Non-negative integer value expected in function stirlingS2");if(v(N,g))throw new TypeError("k must be less than or equal to n in function stirlingS2");var h=!(Ue(g)&&Ue(N)),b=h?p:d,x=h?m:f,y=f(g),A=f(N);if(b[y]&&b[y].length>A)return b[y][A];for(var S=0;S<=y;++S)if(b[S]||(b[S]=[x(S===0?1:0)]),S!==0)for(var D=b[S],E=b[S-1],C=D.length;C<=S&&C<=A;++C)C===S?D[C]=1:D[C]=a(t(x(C),E[C]),E[C-1]);return b[y][A]}})}),sf="bellNumbers",FF=["typed","addScalar","isNegative","isInteger","stirlingS2"],BF=q(sf,FF,e=>{var{typed:r,addScalar:a,isNegative:i,isInteger:t,stirlingS2:n}=e;return r(sf,{"number | BigNumber":function(l){if(!t(l)||i(l))throw new TypeError("Non-negative integer value expected in function bellNumbers");for(var u=0,s=0;s<=l;s++)u=a(u,n(l,s));return u}})}),uf="catalan",TF=["typed","addScalar","divideScalar","multiplyScalar","combinations","isNegative","isInteger"],OF=q(uf,TF,e=>{var{typed:r,addScalar:a,divideScalar:i,multiplyScalar:t,combinations:n,isNegative:o,isInteger:l}=e;return r(uf,{"number | BigNumber":function(s){if(!l(s)||o(s))throw new TypeError("Non-negative integer value expected in function catalan");return i(n(t(s,2),s),a(s,1))}})}),cf="composition",_F=["typed","addScalar","combinations","isNegative","isPositive","isInteger","larger"],$F=q(cf,_F,e=>{var{typed:r,addScalar:a,combinations:i,isPositive:t,isNegative:n,isInteger:o,larger:l}=e;return r(cf,{"number | BigNumber, number | BigNumber":function(s,c){if(!o(s)||!t(s)||!o(c)||!t(c))throw new TypeError("Positive integer value expected in function composition");if(l(c,s))throw new TypeError("k must be less than or equal to n in function composition");return i(a(s,-1),a(c,-1))}})}),lf="leafCount",IF=["parse","typed"],qF=q(lf,IF,e=>{var{parse:r,typed:a}=e;function i(t){var n=0;return t.forEach(o=>{n+=i(o)}),n||1}return a(lf,{Node:function(n){return i(n)}})});function ff(e){return We(e)||vr(e)&&e.isUnary()&&We(e.args[0])}function ti(e){return!!(We(e)||(Ot(e)||vr(e))&&e.args.every(ti)||Dt(e)&&ti(e.content))}function mf(e,r){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),a.push.apply(a,i)}return a}function Hi(e){for(var r=1;r{var{FunctionNode:r,OperatorNode:a,SymbolNode:i}=e,t=!0,n=!1,o="defaultF",l={add:{trivial:t,total:t,commutative:t,associative:t},unaryPlus:{trivial:t,total:t,commutative:t,associative:t},subtract:{trivial:n,total:t,commutative:n,associative:n},multiply:{trivial:t,total:t,commutative:t,associative:t},divide:{trivial:n,total:t,commutative:n,associative:n},paren:{trivial:t,total:t,commutative:t,associative:n},defaultF:{trivial:n,total:t,commutative:n,associative:n}},u={divide:{total:n},log:{total:n}},s={subtract:{total:n},abs:{trivial:t},log:{total:t}};function c(h,b){var x=arguments.length>2&&arguments[2]!==void 0?arguments[2]:l,y=o;if(typeof h=="string"?y=h:vr(h)?y=h.fn.toString():Ot(h)?y=h.name:Dt(h)&&(y="paren"),Se(x,y)){var A=x[y];if(Se(A,b))return A[b];if(Se(l,y))return l[y][b]}if(Se(x,o)){var S=x[o];return Se(S,b)?S[b]:l[o][b]}if(Se(l,y)){var D=l[y];if(Se(D,b))return D[b]}return l[o][b]}function f(h){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:l;return c(h,"commutative",b)}function m(h){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:l;return c(h,"associative",b)}function v(h,b){var x=Hi({},h);for(var y in b)Se(h,y)?x[y]=Hi(Hi({},b[y]),h[y]):x[y]=b[y];return x}function d(h,b){if(!h.args||h.args.length===0)return h;h.args=p(h,b);for(var x=0;x2&&m(h,b)){for(var S=h.args.pop();h.args.length>0;)S=x([h.args.pop(),S]);h.args=S.args}}}function g(h,b){if(!(!h.args||h.args.length===0)){for(var x=N(h),y=h.args.length,A=0;A2&&m(h,b)){for(var S=h.args.shift();h.args.length>0;)S=x([S,h.args.shift()]);h.args=S.args}}}function N(h){return vr(h)?function(b){try{return new a(h.op,h.fn,b,h.implicit)}catch(x){return console.error(x),[]}}:function(b){return new r(new i(h.name),b)}}return{createMakeNodeFunction:N,hasProperty:c,isCommutative:f,isAssociative:m,mergeContext:v,flatten:d,allChildren:p,unflattenr:w,unflattenl:g,defaultContext:l,realContext:u,positiveContext:s}}),PF="simplify",UF=["config","typed","parse","add","subtract","multiply","divide","pow","isZero","equal","resolve","simplifyConstant","simplifyCore","?fraction","?bignumber","mathWithTransform","matrix","AccessorNode","ArrayNode","ConstantNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","ParenthesisNode","SymbolNode"],LF=q(PF,UF,e=>{var{config:r,typed:a,parse:i,add:t,subtract:n,multiply:o,divide:l,pow:u,isZero:s,equal:c,resolve:f,simplifyConstant:m,simplifyCore:v,fraction:d,bignumber:p,mathWithTransform:w,matrix:g,AccessorNode:N,ArrayNode:h,ConstantNode:b,FunctionNode:x,IndexNode:y,ObjectNode:A,OperatorNode:S,ParenthesisNode:D,SymbolNode:E}=e,{hasProperty:C,isCommutative:F,isAssociative:_,mergeContext:I,flatten:$,unflattenr:T,unflattenl:B,createMakeNodeFunction:L,defaultContext:O,realContext:Y,positiveContext:K}=xo({FunctionNode:x,OperatorNode:S,SymbolNode:E});a.addConversion({from:"Object",to:"Map",convert:pn});var V=a("simplify",{Node:ee,"Node, Map":(k,X)=>ee(k,!1,X),"Node, Map, Object":(k,X,W)=>ee(k,!1,X,W),"Node, Array":ee,"Node, Array, Map":ee,"Node, Array, Map, Object":ee});a.removeConversion({from:"Object",to:"Map",convert:pn}),V.defaultContext=O,V.realContext=Y,V.positiveContext=K;function z(k){return k.transform(function(X,W,me){return Dt(X)?z(X.content):X})}var Q={true:!0,false:!0,e:!0,i:!0,Infinity:!0,LN2:!0,LN10:!0,LOG2E:!0,LOG10E:!0,NaN:!0,phi:!0,pi:!0,SQRT1_2:!0,SQRT2:!0,tau:!0};V.rules=[v,{l:"log(e)",r:"1"},{s:"n-n1 -> n+-n1",assuming:{subtract:{total:!0}}},{s:"n-n -> 0",assuming:{subtract:{total:!1}}},{s:"-(cl*v) -> v * (-cl)",assuming:{multiply:{commutative:!0},subtract:{total:!0}}},{s:"-(cl*v) -> (-cl) * v",assuming:{multiply:{commutative:!1},subtract:{total:!0}}},{s:"-(v*cl) -> v * (-cl)",assuming:{multiply:{commutative:!1},subtract:{total:!0}}},{l:"-(n1/n2)",r:"-n1/n2"},{l:"-v",r:"v * (-1)"},{l:"(n1 + n2)*(-1)",r:"n1*(-1) + n2*(-1)",repeat:!0},{l:"n/n1^n2",r:"n*n1^-n2"},{l:"n/n1",r:"n*n1^-1"},{s:"(n1*n2)^n3 -> n1^n3 * n2^n3",assuming:{multiply:{commutative:!0}}},{s:"(n1*n2)^(-1) -> n2^(-1) * n1^(-1)",assuming:{multiply:{commutative:!1}}},{s:"(n ^ n1) ^ n2 -> n ^ (n1 * n2)",assuming:{divide:{total:!0}}},{l:" vd * ( vd * n1 + n2)",r:"vd^2 * n1 + vd * n2"},{s:" vd * (vd^n4 * n1 + n2) -> vd^(1+n4) * n1 + vd * n2",assuming:{divide:{total:!0}}},{s:"vd^n3 * ( vd * n1 + n2) -> vd^(n3+1) * n1 + vd^n3 * n2",assuming:{divide:{total:!0}}},{s:"vd^n3 * (vd^n4 * n1 + n2) -> vd^(n3+n4) * n1 + vd^n3 * n2",assuming:{divide:{total:!0}}},{l:"n*n",r:"n^2"},{s:"n * n^n1 -> n^(n1+1)",assuming:{divide:{total:!0}}},{s:"n^n1 * n^n2 -> n^(n1+n2)",assuming:{divide:{total:!0}}},m,{s:"n+n -> 2*n",assuming:{add:{total:!0}}},{l:"n+-n",r:"0"},{l:"vd*n + vd",r:"vd*(n+1)"},{l:"n3*n1 + n3*n2",r:"n3*(n1+n2)"},{l:"n3^(-n4)*n1 + n3 * n2",r:"n3^(-n4)*(n1 + n3^(n4+1) *n2)"},{l:"n3^(-n4)*n1 + n3^n5 * n2",r:"n3^(-n4)*(n1 + n3^(n4+n5)*n2)"},{s:"n*vd + vd -> (n+1)*vd",assuming:{multiply:{commutative:!1}}},{s:"vd + n*vd -> (1+n)*vd",assuming:{multiply:{commutative:!1}}},{s:"n1*n3 + n2*n3 -> (n1+n2)*n3",assuming:{multiply:{commutative:!1}}},{s:"n^n1 * n -> n^(n1+1)",assuming:{divide:{total:!0},multiply:{commutative:!1}}},{s:"n1*n3^(-n4) + n2 * n3 -> (n1 + n2*n3^(n4 + 1))*n3^(-n4)",assuming:{multiply:{commutative:!1}}},{s:"n1*n3^(-n4) + n2 * n3^n5 -> (n1 + n2*n3^(n4 + n5))*n3^(-n4)",assuming:{multiply:{commutative:!1}}},{l:"n*cd + cd",r:"(n+1)*cd"},{s:"cd*n + cd -> cd*(n+1)",assuming:{multiply:{commutative:!1}}},{s:"cd + cd*n -> cd*(1+n)",assuming:{multiply:{commutative:!1}}},m,{s:"(-n)*n1 -> -(n*n1)",assuming:{subtract:{total:!0}}},{s:"n1*(-n) -> -(n1*n)",assuming:{subtract:{total:!0},multiply:{commutative:!1}}},{s:"ce+ve -> ve+ce",assuming:{add:{commutative:!0}},imposeContext:{add:{commutative:!1}}},{s:"vd*cd -> cd*vd",assuming:{multiply:{commutative:!0}},imposeContext:{multiply:{commutative:!1}}},{l:"n+-n1",r:"n-n1"},{l:"n+-(n1)",r:"n-(n1)"},{s:"n*(n1^-1) -> n/n1",assuming:{multiply:{commutative:!0}}},{s:"n*n1^-n2 -> n/n1^n2",assuming:{multiply:{commutative:!0}}},{s:"n^-1 -> 1/n",assuming:{multiply:{commutative:!0}}},{l:"n^1",r:"n"},{s:"n*(n1/n2) -> (n*n1)/n2",assuming:{multiply:{associative:!0}}},{s:"n-(n1+n2) -> n-n1-n2",assuming:{addition:{associative:!0,commutative:!0}}},{l:"1*n",r:"n",imposeContext:{multiply:{commutative:!0}}},{s:"n1/(n2/n3) -> (n1*n3)/n2",assuming:{multiply:{associative:!0}}},{l:"n1/(-n2)",r:"-n1/n2"}];function le(k,X){var W={};if(k.s){var me=k.s.split("->");if(me.length===2)W.l=me[0],W.r=me[1];else throw SyntaxError("Could not parse rule: "+k.s)}else W.l=k.l,W.r=k.r;W.l=z(i(W.l)),W.r=z(i(W.r));for(var fe of["imposeContext","repeat","assuming"])fe in k&&(W[fe]=k[fe]);if(k.evaluate&&(W.evaluate=i(k.evaluate)),_(W.l,X)){var R=!F(W.l,X),U;R&&(U=oe());var J=L(W.l),ne=oe();W.expanded={},W.expanded.l=J([W.l,ne]),$(W.expanded.l,X),T(W.expanded.l,X),W.expanded.r=J([W.r,ne]),R&&(W.expandedNC1={},W.expandedNC1.l=J([U,W.l]),W.expandedNC1.r=J([U,W.r]),W.expandedNC2={},W.expandedNC2.l=J([U,W.expanded.l]),W.expandedNC2.r=J([U,W.expanded.r]))}return W}function j(k,X){for(var W=[],me=0;me2&&arguments[2]!==void 0?arguments[2]:Zn(),me=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},fe=me.consoleDebug;X=j(X||V.rules,me.context);var R=f(k,W);R=z(R);for(var U={},J=R.toString({parenthesis:"all"});!U[J];){U[J]=!0,re=0;var ne=J;fe&&console.log("Working on: ",J);for(var ve=0;ve ").concat(X[ve].r.toString()))),fe){var he=R.toString({parenthesis:"all"});he!==ne&&(console.log("Applying",ce,"produced",he),ne=he)}B(R,me.context)}J=R.toString({parenthesis:"all"})}return R}function ae(k,X,W){var me=k;if(k)for(var fe=0;fe1&&(ne=R(k.args.slice(0,J))),fe=k.args.slice(J),me=fe.length===1?fe[0]:R(fe),W.push(R([ne,me]))}return W}function Ne(k,X){var W={placeholders:{}};if(!k.placeholders&&!X.placeholders)return W;if(k.placeholders){if(!X.placeholders)return k}else return X;for(var me in k.placeholders)if(Se(k.placeholders,me)&&(W.placeholders[me]=k.placeholders[me],Se(X.placeholders,me)&&!te(k.placeholders[me],X.placeholders[me])))return null;for(var fe in X.placeholders)Se(X.placeholders,fe)&&(W.placeholders[fe]=X.placeholders[fe]);return W}function Ee(k,X){var W=[];if(k.length===0||X.length===0)return W;for(var me,fe=0;fe2)throw new Error("permuting >2 commutative non-associative rule arguments not yet implemented");var ne=H(k.args[0],X.args[1],W);if(ne.length===0)return[];var ve=H(k.args[1],X.args[0],W);if(ve.length===0)return[];R=[ne,ve]}fe=P(R)}else if(X.args.length>=2&&k.args.length===2){for(var ce=pe(X,W),he=[],be=0;be2)throw Error("Unexpected non-binary associative function: "+k.toString());return[]}}else if(k instanceof E){if(k.name.length===0)throw new Error("Symbol in rule has 0 length...!?");if(Q[k.name]){if(k.name!==X.name)return[]}else switch(k.name[1]>="a"&&k.name[1]<="z"?k.name.substring(0,2):k.name[0]){case"n":case"_p":fe[0].placeholders[k.name]=X;break;case"c":case"cl":if(We(X))fe[0].placeholders[k.name]=X;else return[];break;case"v":if(!We(X))fe[0].placeholders[k.name]=X;else return[];break;case"vl":if(yr(X))fe[0].placeholders[k.name]=X;else return[];break;case"cd":if(ff(X))fe[0].placeholders[k.name]=X;else return[];break;case"vd":if(!ff(X))fe[0].placeholders[k.name]=X;else return[];break;case"ce":if(ti(X))fe[0].placeholders[k.name]=X;else return[];break;case"ve":if(!ti(X))fe[0].placeholders[k.name]=X;else return[];break;default:throw new Error("Invalid symbol in rule: "+k.name)}}else if(k instanceof b){if(!c(k.value,X.value))return[]}else return[];return fe}function te(k,X){if(k instanceof b&&X instanceof b){if(!c(k.value,X.value))return!1}else if(k instanceof E&&X instanceof E){if(k.name!==X.name)return!1}else if(k instanceof S&&X instanceof S||k instanceof x&&X instanceof x){if(k instanceof S){if(k.op!==X.op||k.fn!==X.fn)return!1}else if(k instanceof x&&k.name!==X.name)return!1;if(k.args.length!==X.args.length)return!1;for(var W=0;W{var{typed:r,config:a,mathWithTransform:i,matrix:t,fraction:n,bignumber:o,AccessorNode:l,ArrayNode:u,ConstantNode:s,FunctionNode:c,IndexNode:f,ObjectNode:m,OperatorNode:v,SymbolNode:d}=e,{isCommutative:p,isAssociative:w,allChildren:g,createMakeNodeFunction:N}=xo({FunctionNode:c,OperatorNode:v,SymbolNode:d}),h=r("simplifyConstant",{Node:$=>A(I($,{})),"Node, Object":function(T,B){return A(I(T,B))}});function b($){return Jn($)?$.valueOf():$ instanceof Array?$.map(b):Te($)?t(b($.valueOf())):$}function x($,T,B){try{return i[$].apply(null,T)}catch{return T=T.map(b),D(i[$].apply(null,T),B)}}var y=r({Fraction:C,number:function(T){return T<0?E(new s(-T)):new s(T)},BigNumber:function(T){return T<0?E(new s(-T)):new s(T)},Complex:function(T){throw new Error("Cannot convert Complex number to Node")},string:function(T){return new s(T)},Matrix:function(T){return new u(T.valueOf().map(B=>y(B)))}});function A($){return rr($)?$:y($)}function S($,T){var B=T&&T.exactFractions!==!1;if(B&&isFinite($)&&n){var L=n($),O=T&&typeof T.fractionsLimit=="number"?T.fractionsLimit:1/0;if(L.valueOf()===$&&L.n0;)if(We(L[0])&&typeof L[0].value!="string"){var O=D(L.shift().value,B);Yr($)?$=$.items[O-1]:($=$.valueOf()[O-1],$ instanceof Array&&($=t($)))}else if(L.length>1&&We(L[1])&&typeof L[1].value!="string"){var Y=D(L[1].value,B),K=[],V=Yr($)?$.items:$.valueOf();for(var z of V)if(Yr(z))K.push(z.items[Y-1]);else if(Te($))K.push(z[Y-1]);else break;if(K.length===V.length)Yr($)?$=new u(K):$=t(K),L.splice(1,1);else break}else break;return L.length===T.dimensions.length?new l(A($),T):L.length>0?(T=new f(L),new l(A($),T)):$}if(si($)&&T.dimensions.length===1&&We(T.dimensions[0])){var Q=T.dimensions[0].value;return Q in $.properties?$.properties[Q]:new s}return new l(A($),T)}function _($,T,B,L){var O=T.shift(),Y=T.reduce((K,V)=>{if(!rr(V)){var z=K.pop();if(rr(z))return[z,V];try{return K.push(x($,[z,V],L)),K}catch{K.push(z)}}K.push(A(K.pop()));var Q=K.length===1?K[0]:B(K);return[B([Q,A(V)])]},[O]);return Y.length===1?Y[0]:B([Y[0],y(Y[1])])}function I($,T){switch($.type){case"SymbolNode":return $;case"ConstantNode":switch(typeof $.value){case"number":return D($.value,T);case"string":return $.value;default:if(!isNaN($.value))return D($.value,T)}return $;case"FunctionNode":if(i[$.name]&&i[$.name].rawArgs)return $;{var B=["add","multiply"];if(B.indexOf($.name)===-1){var L=$.args.map(se=>I(se,T));if(!L.some(rr))try{return x($.name,L,T)}catch{}if($.name==="size"&&L.length===1&&Yr(L[0])){for(var O=[],Y=L[0];Yr(Y);)O.push(Y.items.length),Y=Y.items[0];return t(O)}return new c($.name,L.map(A))}}case"OperatorNode":{var K=$.fn.toString(),V,z,Q=N($);if(vr($)&&$.isUnary())V=[I($.args[0],T)],rr(V[0])?z=Q(V):z=x(K,V,T);else if(w($,T.context))if(V=g($,T.context),V=V.map(se=>I(se,T)),p(K,T.context)){for(var le=[],j=[],re=0;re1?(z=_(K,le,Q,T),j.unshift(z),z=_(K,j,Q,T)):z=_(K,V,Q,T)}else z=_(K,V,Q,T);else V=$.args.map(se=>I(se,T)),z=_(K,V,Q,T);return z}case"ParenthesisNode":return I($.content,T);case"AccessorNode":return F(I($.object,T),I($.index,T),T);case"ArrayNode":{var oe=$.items.map(se=>I(se,T));return oe.some(rr)?new u(oe.map(A)):t(oe)}case"IndexNode":return new f($.dimensions.map(se=>h(se,T)));case"ObjectNode":{var ee={};for(var ae in $.properties)ee[ae]=h($.properties[ae],T);return new m(ee)}case"AssignmentNode":case"BlockNode":case"FunctionAssignmentNode":case"RangeNode":case"ConditionalNode":default:throw new Error("Unimplemented node type in simplifyConstant: ".concat($.type))}}return h}),vf="simplifyCore",VF=["typed","parse","equal","isZero","add","subtract","multiply","divide","pow","AccessorNode","ArrayNode","ConstantNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","ParenthesisNode","SymbolNode"],ZF=q(vf,VF,e=>{var{typed:r,parse:a,equal:i,isZero:t,add:n,subtract:o,multiply:l,divide:u,pow:s,AccessorNode:c,ArrayNode:f,ConstantNode:m,FunctionNode:v,IndexNode:d,ObjectNode:p,OperatorNode:w,ParenthesisNode:g,SymbolNode:N}=e,h=new m(0),b=new m(1),x=new m(!0),y=new m(!1);function A(C){return vr(C)&&["and","not","or"].includes(C.op)}var{hasProperty:S,isCommutative:D}=xo({FunctionNode:v,OperatorNode:w,SymbolNode:N});function E(C){var F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},_=F?F.context:void 0;if(S(C,"trivial",_)){if(Ot(C)&&C.args.length===1)return E(C.args[0],F);var I=!1,$=0;if(C.forEach(j=>{++$,$===1&&(I=E(j,F))}),$===1)return I}var T=C;if(Ot(T)){var B=W2(T.name);if(B){if(T.args.length>2&&S(T,"associative",_))for(;T.args.length>2;){var L=T.args.pop(),O=T.args.pop();T.args.push(new w(B,T.name,[L,O]))}T=new w(B,T.name,T.args)}else return new v(E(T.fn),T.args.map(j=>E(j,F)))}if(vr(T)&&T.isUnary()){var Y=E(T.args[0],F);if(T.op==="~"&&vr(Y)&&Y.isUnary()&&Y.op==="~"||T.op==="not"&&vr(Y)&&Y.isUnary()&&Y.op==="not"&&A(Y.args[0]))return Y.args[0];var K=!0;if(T.op==="-"&&vr(Y)&&(Y.isBinary()&&Y.fn==="subtract"&&(T=new w("-","subtract",[Y.args[1],Y.args[0]]),K=!1),Y.isUnary()&&Y.op==="-"))return Y.args[0];if(K)return new w(T.op,T.fn,[Y])}if(vr(T)&&T.isBinary()){var V=E(T.args[0],F),z=E(T.args[1],F);if(T.op==="+"){if(We(V)&&t(V.value))return z;if(We(z)&&t(z.value))return V;vr(z)&&z.isUnary()&&z.op==="-"&&(z=z.args[0],T=new w("-","subtract",[V,z]))}if(T.op==="-")return vr(z)&&z.isUnary()&&z.op==="-"?E(new w("+","add",[V,z.args[0]]),F):We(V)&&t(V.value)?E(new w("-","unaryMinus",[z])):We(z)&&t(z.value)?V:new w(T.op,T.fn,[V,z]);if(T.op==="*"){if(We(V)){if(t(V.value))return h;if(i(V.value,1))return z}if(We(z)){if(t(z.value))return h;if(i(z.value,1))return V;if(D(T,_))return new w(T.op,T.fn,[z,V],T.implicit)}return new w(T.op,T.fn,[V,z],T.implicit)}if(T.op==="/")return We(V)&&t(V.value)?h:We(z)&&i(z.value,1)?V:new w(T.op,T.fn,[V,z]);if(T.op==="^"&&We(z)){if(t(z.value))return b;if(i(z.value,1))return V}if(T.op==="and"){if(We(V))if(V.value){if(A(z))return z;if(We(z))return z.value?x:y}else return y;if(We(z))if(z.value){if(A(V))return V}else return y}if(T.op==="or"){if(We(V)){if(V.value)return x;if(A(z))return z}if(We(z)){if(z.value)return x;if(A(V))return V}}return new w(T.op,T.fn,[V,z])}if(vr(T))return new w(T.op,T.fn,T.args.map(j=>E(j,F)));if(Yr(T))return new f(T.items.map(j=>E(j,F)));if(Zt(T))return new c(E(T.object,F),E(T.index,F));if(An(T))return new d(T.dimensions.map(j=>E(j,F)));if(si(T)){var Q={};for(var le in T.properties)Q[le]=E(T.properties[le],F);return new p(Q)}return T}return r(vf,{Node:E,"Node,Object":E})}),XF="resolve",YF=["typed","parse","ConstantNode","FunctionNode","OperatorNode","ParenthesisNode"],WF=q(XF,YF,e=>{var{typed:r,parse:a,ConstantNode:i,FunctionNode:t,OperatorNode:n,ParenthesisNode:o}=e;function l(u,s){var c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:new Set;if(!s)return u;if(yr(u)){if(c.has(u.name)){var f=Array.from(c).join(", ");throw new ReferenceError("recursive loop of variable definitions among {".concat(f,"}"))}var m=s.get(u.name);if(rr(m)){var v=new Set(c);return v.add(u.name),l(m,s,v)}else return typeof m=="number"?a(String(m)):m!==void 0?new i(m):u}else if(vr(u)){var d=u.args.map(function(w){return l(w,s,c)});return new n(u.op,u.fn,d,u.implicit)}else{if(Dt(u))return new o(l(u.content,s,c));if(Ot(u)){var p=u.args.map(function(w){return l(w,s,c)});return new t(u.name,p)}}return u.map(w=>l(w,s,c))}return r("resolve",{Node:l,"Node, Map | null | undefined":l,"Node, Object":(u,s)=>l(u,pn(s)),"Array | Matrix":r.referToSelf(u=>s=>s.map(c=>u(c))),"Array | Matrix, null | undefined":r.referToSelf(u=>s=>s.map(c=>u(c))),"Array, Object":r.referTo("Array,Map",u=>(s,c)=>u(s,pn(c))),"Matrix, Object":r.referTo("Matrix,Map",u=>(s,c)=>u(s,pn(c))),"Array | Matrix, Map":r.referToSelf(u=>(s,c)=>s.map(f=>u(f,c)))})}),pf="symbolicEqual",JF=["parse","simplify","typed","OperatorNode"],QF=q(pf,JF,e=>{var{parse:r,simplify:a,typed:i,OperatorNode:t}=e;function n(o,l){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=new t("-","subtract",[o,l]),c=a(s,{},u);return We(c)&&!c.value}return i(pf,{"Node, Node":n,"Node, Node, Object":n})}),df="derivative",KF=["typed","config","parse","simplify","equal","isZero","numeric","ConstantNode","FunctionNode","OperatorNode","ParenthesisNode","SymbolNode"],jF=q(df,KF,e=>{var{typed:r,config:a,parse:i,simplify:t,equal:n,isZero:o,numeric:l,ConstantNode:u,FunctionNode:s,OperatorNode:c,ParenthesisNode:f,SymbolNode:m}=e;function v(h,b){var x=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{simplify:!0},y={};w(y,h,b.name);var A=g(h,y);return x.simplify?t(A):A}r.addConversion({from:"identifier",to:"SymbolNode",convert:i});var d=r(df,{"Node, SymbolNode":v,"Node, SymbolNode, Object":v});r.removeConversion({from:"identifier",to:"SymbolNode",convert:i}),d._simplify=!0,d.toTex=function(h){return p.apply(null,h.args)};var p=r("_derivTex",{"Node, SymbolNode":function(b,x){return We(b)&&ir(b.value)==="string"?p(i(b.value).toString(),x.toString(),1):p(b.toTex(),x.toString(),1)},"Node, ConstantNode":function(b,x){if(ir(x.value)==="string")return p(b,i(x.value));throw new Error("The second parameter to 'derivative' is a non-string constant")},"Node, SymbolNode, ConstantNode":function(b,x,y){return p(b.toString(),x.name,y.value)},"string, string, number":function(b,x,y){var A;return y===1?A="{d\\over d"+x+"}":A="{d^{"+y+"}\\over d"+x+"^{"+y+"}}",A+"\\left[".concat(b,"\\right]")}}),w=r("constTag",{"Object, ConstantNode, string":function(b,x){return b[x]=!0,!0},"Object, SymbolNode, string":function(b,x,y){return x.name!==y?(b[x]=!0,!0):!1},"Object, ParenthesisNode, string":function(b,x,y){return w(b,x.content,y)},"Object, FunctionAssignmentNode, string":function(b,x,y){return x.params.indexOf(y)===-1?(b[x]=!0,!0):w(b,x.expr,y)},"Object, FunctionNode | OperatorNode, string":function(b,x,y){if(x.args.length>0){for(var A=w(b,x.args[0],y),S=1;S0){var A=b.args.filter(function($){return x[$]===void 0}),S=A.length===1?A[0]:new c("*","multiply",A),D=y.concat(g(S,x));return new c("*","multiply",D)}return new c("+","add",b.args.map(function($){return new c("*","multiply",b.args.map(function(T){return T===$?g(T,x):T.clone()}))}))}if(b.op==="/"&&b.isBinary()){var E=b.args[0],C=b.args[1];return x[C]!==void 0?new c("/","divide",[g(E,x),C]):x[E]!==void 0?new c("*","multiply",[new c("-","unaryMinus",[E]),new c("/","divide",[g(C,x),new c("^","pow",[C.clone(),N(2)])])]):new c("/","divide",[new c("-","subtract",[new c("*","multiply",[g(E,x),C.clone()]),new c("*","multiply",[E.clone(),g(C,x)])]),new c("^","pow",[C.clone(),N(2)])])}if(b.op==="^"&&b.isBinary()){var F=b.args[0],_=b.args[1];if(x[F]!==void 0)return We(F)&&(o(F.value)||n(F.value,1))?N(0):new c("*","multiply",[b,new c("*","multiply",[new s("log",[F.clone()]),g(_.clone(),x)])]);if(x[_]!==void 0){if(We(_)){if(o(_.value))return N(0);if(n(_.value,1))return g(F,x)}var I=new c("^","pow",[F.clone(),new c("-","subtract",[_,N(1)])]);return new c("*","multiply",[_.clone(),new c("*","multiply",[g(F,x),I])])}return new c("*","multiply",[new c("^","pow",[F.clone(),_.clone()]),new c("+","add",[new c("*","multiply",[g(F,x),new c("/","divide",[_.clone(),F.clone()])]),new c("*","multiply",[g(_,x),new s("log",[F.clone()])])])])}throw new Error('Cannot process operator "'+b.op+'" in derivative: the operator is not supported, undefined, or the number of arguments passed to it are not supported')}});function N(h,b){return new u(l(h,a.number))}return d}),hf="rationalize",e4=["config","typed","equal","isZero","add","subtract","multiply","divide","pow","parse","simplifyConstant","simplifyCore","simplify","?bignumber","?fraction","mathWithTransform","matrix","AccessorNode","ArrayNode","ConstantNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","SymbolNode","ParenthesisNode"],r4=q(hf,e4,e=>{var{config:r,typed:a,equal:i,isZero:t,add:n,subtract:o,multiply:l,divide:u,pow:s,parse:c,simplifyConstant:f,simplifyCore:m,simplify:v,fraction:d,bignumber:p,mathWithTransform:w,matrix:g,AccessorNode:N,ArrayNode:h,ConstantNode:b,FunctionNode:x,IndexNode:y,ObjectNode:A,OperatorNode:S,SymbolNode:D,ParenthesisNode:E}=e;function C(T){var B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},L=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,O=_(),Y=F(T,B,!0,O.firstRules),K=Y.variables.length,V={exactFractions:!1},z={exactFractions:!0};if(T=Y.expression,K>=1){T=I(T);var Q,le,j=!0,re=!1;T=v(T,O.firstRules,{},V);for(var oe;le=j?O.distrDivRules:O.sucDivRules,T=v(T,le,{},z),j=!j,oe=T.toString(),oe!==Q;)re=!0,Q=oe;re&&(T=v(T,O.firstRulesAgain,{},V)),T=v(T,O.finalRules,{},V)}var ee=[],ae={};return T.type==="OperatorNode"&&T.isBinary()&&T.op==="/"?(K===1&&(T.args[0]=$(T.args[0],ee),T.args[1]=$(T.args[1])),L&&(ae.numerator=T.args[0],ae.denominator=T.args[1])):(K===1&&(T=$(T,ee)),L&&(ae.numerator=T,ae.denominator=null)),L?(ae.coefficients=ee,ae.variables=Y.variables,ae.expression=T,ae):T}return a(hf,{Node:C,"Node, boolean":(T,B)=>C(T,{},B),"Node, Object":C,"Node, Object, boolean":C});function F(T,B,L,O){var Y=[],K=v(T,O,B,{exactFractions:!1});L=!!L;var V="+-*"+(L?"/":"");Q(K);var z={};return z.expression=K,z.variables=Y,z;function Q(le){var j=le.type;if(j==="FunctionNode")throw new Error("There is an unsolved function call");if(j==="OperatorNode")if(le.op==="^"){if(le.args[1].type!=="ConstantNode"||!Ce(parseFloat(le.args[1].value)))throw new Error("There is a non-integer exponent");Q(le.args[0])}else{if(V.indexOf(le.op)===-1)throw new Error("Operator "+le.op+" invalid in polynomial expression");for(var re=0;re1;if(O==="OperatorNode"&&T.isBinary()){var K=!1,V;if(T.op==="^"&&(T.args[0].type==="ParenthesisNode"||T.args[0].type==="OperatorNode")&&T.args[1].type==="ConstantNode"&&(V=parseFloat(T.args[1].value),K=V>=2&&Ce(V)),K){if(V>2){var z=T.args[0],Q=new S("^","pow",[T.args[0].cloneDeep(),new b(V-1)]);T=new S("*","multiply",[z,Q])}else T=new S("*","multiply",[T.args[0],T.args[0].cloneDeep()]);Y&&(L==="content"?B.content=T:B.args[L]=T)}}if(O==="ParenthesisNode")I(T.content,T,"content");else if(O!=="ConstantNode"&&O!=="SymbolNode")for(var le=0;le=0;z--)if(B[z]!==0){var Q=new b(K?B[z]:Math.abs(B[z])),le=B[z]<0?"-":"+";if(z>0){var j=new D(Y);if(z>1){var re=new b(z);j=new S("^","pow",[j,re])}B[z]===-1&&K?Q=new S("-","unaryMinus",[j]):Math.abs(B[z])===1?Q=j:Q=new S("*","multiply",[Q,j])}K?V=Q:le==="+"?V=new S("+","add",[V,Q]):V=new S("-","subtract",[V,Q]),K=!1}if(K)return new b(0);return V;function oe(ee,ae,se){var pe=ee.type;if(pe==="FunctionNode")throw new Error("There is an unsolved function call");if(pe==="OperatorNode"){if("+-*^".indexOf(ee.op)===-1)throw new Error("Operator "+ee.op+" invalid");if(ae!==null){if((ee.fn==="unaryMinus"||ee.fn==="pow")&&ae.fn!=="add"&&ae.fn!=="subtract"&&ae.fn!=="multiply")throw new Error("Invalid "+ee.op+" placing");if((ee.fn==="subtract"||ee.fn==="add"||ee.fn==="multiply")&&ae.fn!=="add"&&ae.fn!=="subtract")throw new Error("Invalid "+ee.op+" placing");if((ee.fn==="subtract"||ee.fn==="add"||ee.fn==="unaryMinus")&&se.noFil!==0)throw new Error("Invalid "+ee.op+" placing")}(ee.op==="^"||ee.op==="*")&&(se.fire=ee.op);for(var Ne=0;NeO&&(B[Ee]=0),B[Ee]+=se.cte*(se.oper==="+"?1:-1),O=Math.max(Ee,O);return}se.cte=Ee,se.fire===""&&(B[0]+=se.cte*(se.oper==="+"?1:-1))}else throw new Error("Type "+pe+" is not allowed")}}}),gf="zpk2tf",t4=["typed","add","multiply","Complex","number"],n4=q(gf,t4,e=>{var{typed:r,add:a,multiply:i,Complex:t,number:n}=e;return r(gf,{"Array,Array,number":function(s,c,f){return o(s,c,f)},"Array,Array":function(s,c){return o(s,c,1)},"Matrix,Matrix,number":function(s,c,f){return o(s.valueOf(),c.valueOf(),f)},"Matrix,Matrix":function(s,c){return o(s.valueOf(),c.valueOf(),1)}});function o(u,s,c){u.some(N=>N.type==="BigNumber")&&(u=u.map(N=>n(N))),s.some(N=>N.type==="BigNumber")&&(s=s.map(N=>n(N)));for(var f=[t(1,0)],m=[t(1,0)],v=0;v=0&&f-m{var{typed:r,add:a,multiply:i,Complex:t,divide:n,matrix:o}=e;return r(yf,{"Array, Array":function(c,f){var m=u(512);return l(c,f,m)},"Array, Array, Array":function(c,f,m){return l(c,f,m)},"Array, Array, number":function(c,f,m){if(m<0)throw new Error("w must be a positive number");var v=u(m);return l(c,f,v)},"Matrix, Matrix":function(c,f){var m=u(512),{w:v,h:d}=l(c.valueOf(),f.valueOf(),m);return{w:o(v),h:o(d)}},"Matrix, Matrix, Matrix":function(c,f,m){var{h:v}=l(c.valueOf(),f.valueOf(),m.valueOf());return{h:o(v),w:o(m)}},"Matrix, Matrix, number":function(c,f,m){if(m<0)throw new Error("w must be a positive number");var v=u(m),{h:d}=l(c.valueOf(),f.valueOf(),v);return{h:o(d),w:o(v)}}});function l(s,c,f){for(var m=[],v=[],d=0;d{var{classes:r}=e;return function(i,t){var n=r[t&&t.mathjs];return n&&typeof n.fromJSON=="function"?n.fromJSON(t):t}}),c4="replacer",l4=[],f4=q(c4,l4,()=>function(r,a){return typeof a=="number"&&(!isFinite(a)||isNaN(a))?{mathjs:"number",value:String(a)}:a}),m4="12.4.1",v4=q("true",[],()=>!0),p4=q("false",[],()=>!1),d4=q("null",[],()=>null),h4=Gr("Infinity",["config","?BigNumber"],e=>{var{config:r,BigNumber:a}=e;return r.number==="BigNumber"?new a(1/0):1/0}),g4=Gr("NaN",["config","?BigNumber"],e=>{var{config:r,BigNumber:a}=e;return r.number==="BigNumber"?new a(NaN):NaN}),y4=Gr("pi",["config","?BigNumber"],e=>{var{config:r,BigNumber:a}=e;return r.number==="BigNumber"?yo(a):F0}),b4=Gr("tau",["config","?BigNumber"],e=>{var{config:r,BigNumber:a}=e;return r.number==="BigNumber"?jw(a):B0}),x4=Gr("e",["config","?BigNumber"],e=>{var{config:r,BigNumber:a}=e;return r.number==="BigNumber"?Qw(a):T0}),w4=Gr("phi",["config","?BigNumber"],e=>{var{config:r,BigNumber:a}=e;return r.number==="BigNumber"?Kw(a):O0}),N4=Gr("LN2",["config","?BigNumber"],e=>{var{config:r,BigNumber:a}=e;return r.number==="BigNumber"?new a(2).ln():Math.LN2}),D4=Gr("LN10",["config","?BigNumber"],e=>{var{config:r,BigNumber:a}=e;return r.number==="BigNumber"?new a(10).ln():Math.LN10}),A4=Gr("LOG2E",["config","?BigNumber"],e=>{var{config:r,BigNumber:a}=e;return r.number==="BigNumber"?new a(1).div(new a(2).ln()):Math.LOG2E}),E4=Gr("LOG10E",["config","?BigNumber"],e=>{var{config:r,BigNumber:a}=e;return r.number==="BigNumber"?new a(1).div(new a(10).ln()):Math.LOG10E}),S4=Gr("SQRT1_2",["config","?BigNumber"],e=>{var{config:r,BigNumber:a}=e;return r.number==="BigNumber"?new a("0.5").sqrt():Math.SQRT1_2}),C4=Gr("SQRT2",["config","?BigNumber"],e=>{var{config:r,BigNumber:a}=e;return r.number==="BigNumber"?new a(2).sqrt():Math.SQRT2}),M4=Gr("i",["Complex"],e=>{var{Complex:r}=e;return r.I}),F4=q("version",[],()=>m4);function Gr(e,r,a){return q(e,r,a,{recreateOnConfigChange:!0})}var B4=ze("speedOfLight","299792458","m s^-1"),T4=ze("gravitationConstant","6.67430e-11","m^3 kg^-1 s^-2"),O4=ze("planckConstant","6.62607015e-34","J s"),_4=ze("reducedPlanckConstant","1.0545718176461565e-34","J s"),$4=ze("magneticConstant","1.25663706212e-6","N A^-2"),I4=ze("electricConstant","8.8541878128e-12","F m^-1"),q4=ze("vacuumImpedance","376.730313667","ohm"),R4=ze("coulomb","8.987551792261171e9","N m^2 C^-2"),z4=ze("elementaryCharge","1.602176634e-19","C"),P4=ze("bohrMagneton","9.2740100783e-24","J T^-1"),U4=ze("conductanceQuantum","7.748091729863649e-5","S"),L4=ze("inverseConductanceQuantum","12906.403729652257","ohm"),k4=ze("magneticFluxQuantum","2.0678338484619295e-15","Wb"),H4=ze("nuclearMagneton","5.0507837461e-27","J T^-1"),G4=ze("klitzing","25812.807459304513","ohm"),V4=ze("bohrRadius","5.29177210903e-11","m"),Z4=ze("classicalElectronRadius","2.8179403262e-15","m"),X4=ze("electronMass","9.1093837015e-31","kg"),Y4=ze("fermiCoupling","1.1663787e-5","GeV^-2"),W4=bi("fineStructure",.0072973525693),J4=ze("hartreeEnergy","4.3597447222071e-18","J"),Q4=ze("protonMass","1.67262192369e-27","kg"),K4=ze("deuteronMass","3.3435830926e-27","kg"),j4=ze("neutronMass","1.6749271613e-27","kg"),eB=ze("quantumOfCirculation","3.6369475516e-4","m^2 s^-1"),rB=ze("rydberg","10973731.568160","m^-1"),tB=ze("thomsonCrossSection","6.6524587321e-29","m^2"),nB=bi("weakMixingAngle",.2229),aB=bi("efimovFactor",22.7),iB=ze("atomicMass","1.66053906660e-27","kg"),oB=ze("avogadro","6.02214076e23","mol^-1"),sB=ze("boltzmann","1.380649e-23","J K^-1"),uB=ze("faraday","96485.33212331001","C mol^-1"),cB=ze("firstRadiation","3.7417718521927573e-16","W m^2"),lB=ze("loschmidt","2.686780111798444e25","m^-3"),fB=ze("gasConstant","8.31446261815324","J K^-1 mol^-1"),mB=ze("molarPlanckConstant","3.990312712893431e-10","J s mol^-1"),vB=ze("molarVolume","0.022413969545014137","m^3 mol^-1"),pB=bi("sackurTetrode",-1.16487052358),dB=ze("secondRadiation","0.014387768775039337","m K"),hB=ze("stefanBoltzmann","5.67037441918443e-8","W m^-2 K^-4"),gB=ze("wienDisplacement","2.897771955e-3","m K"),yB=ze("molarMass","0.99999999965e-3","kg mol^-1"),bB=ze("molarMassC12","11.9999999958e-3","kg mol^-1"),xB=ze("gravity","9.80665","m s^-2"),wB=ze("planckLength","1.616255e-35","m"),NB=ze("planckMass","2.176435e-8","kg"),DB=ze("planckTime","5.391245e-44","s"),AB=ze("planckCharge","1.87554603778e-18","C"),EB=ze("planckTemperature","1.416785e+32","K");function ze(e,r,a){var i=["config","Unit","BigNumber"];return q(e,i,t=>{var{config:n,Unit:o,BigNumber:l}=t,u=n.number==="BigNumber"?new l(r):parseFloat(r),s=new o(u,a);return s.fixPrefix=!0,s})}function bi(e,r){var a=["config","BigNumber"];return q(e,a,i=>{var{config:t,BigNumber:n}=i;return t.number==="BigNumber"?new n(r):r})}var SB="apply",CB=["typed","isInteger"],MB=q(SB,CB,e=>{var{typed:r,isInteger:a}=e,i=fo({typed:r,isInteger:a});return r("apply",{"...any":function(n){var o=n[1];Ue(o)?n[1]=o-1:Le(o)&&(n[1]=o.minus(1));try{return i.apply(null,n)}catch(l){throw zr(l)}}})},{isTransformFunction:!0}),FB="column",BB=["typed","Index","matrix","range"],TB=q(FB,BB,e=>{var{typed:r,Index:a,matrix:i,range:t}=e,n=fv({typed:r,Index:a,matrix:i,range:t});return r("column",{"...any":function(l){var u=l.length-1,s=l[u];Ue(s)&&(l[u]=s-1);try{return n.apply(null,l)}catch(c){throw zr(c)}}})},{isTransformFunction:!0});function wo(e,r,a){var i=e.filter(function(u){return yr(u)&&!(u.name in r)&&!a.has(u.name)})[0];if(!i)throw new Error('No undefined variable found in inline expression "'+e+'"');var t=i.name,n=new Map,o=new Zf(a,n,new Set([t])),l=e.compile();return function(s){return n.set(t,s),l.evaluate(o)}}var OB="filter",_B=["typed"],$B=q(OB,_B,e=>{var{typed:r}=e;function a(t,n,o){var l,u;return t[0]&&(l=t[0].compile().evaluate(o)),t[1]&&(yr(t[1])||Qn(t[1])?u=t[1].compile().evaluate(o):u=wo(t[1],n,o)),i(l,u)}a.rawArgs=!0;var i=r("filter",{"Array, function":bf,"Matrix, function":function(n,o){return n.create(bf(n.toArray(),o))},"Array, RegExp":za,"Matrix, RegExp":function(n,o){return n.create(za(n.toArray(),o))}});return a},{isTransformFunction:!0});function bf(e,r){return Lf(e,function(a,i,t){return Fn(r,a,[i+1],t,"filter")})}var IB="forEach",qB=["typed"],RB=q(IB,qB,e=>{var{typed:r}=e;function a(t,n,o){var l,u;return t[0]&&(l=t[0].compile().evaluate(o)),t[1]&&(yr(t[1])||Qn(t[1])?u=t[1].compile().evaluate(o):u=wo(t[1],n,o)),i(l,u)}a.rawArgs=!0;var i=r("forEach",{"Array | Matrix, function":function(n,o){var l=function u(s,c){if(Array.isArray(s))ci(s,function(f,m){u(f,c.concat(m+1))});else return Fn(o,s,c,n,"forEach")};l(n.valueOf(),[])}});return a},{isTransformFunction:!0}),zB="index",PB=["Index","getMatrixDataType"],UB=q(zB,PB,e=>{var{Index:r,getMatrixDataType:a}=e;return function(){for(var t=[],n=0,o=arguments.length;n0?0:2;else if(l&&l.isSet===!0)l=l.map(function(s){return s-1});else if(je(l)||Te(l))a(l)!=="boolean"&&(l=l.map(function(s){return s-1}));else if(Ue(l))l--;else if(Le(l))l=l.toNumber()-1;else if(typeof l!="string")throw new TypeError("Dimension must be an Array, Matrix, number, string, or Range");t[n]=l}var u=new r;return r.apply(u,t),u}},{isTransformFunction:!0}),LB="map",kB=["typed"],HB=q(LB,kB,e=>{var{typed:r}=e;function a(t,n,o){var l,u;return t[0]&&(l=t[0].compile().evaluate(o)),t[1]&&(yr(t[1])||Qn(t[1])?u=t[1].compile().evaluate(o):u=wo(t[1],n,o)),i(l,u)}a.rawArgs=!0;var i=r("map",{"Array, function":function(n,o){return xf(n,o,n)},"Matrix, function":function(n,o){return n.create(xf(n.valueOf(),o,n))}});return a},{isTransformFunction:!0});function xf(e,r,a){function i(t,n){return Array.isArray(t)?Nt(t,function(o,l){return i(o,n.concat(l+1))}):Fn(r,t,n,a,"map")}return i(e,[])}function Rt(e){if(e.length===2&&Qr(e[0])){e=e.slice();var r=e[1];Ue(r)?e[1]=r-1:Le(r)&&(e[1]=r.minus(1))}return e}var GB="max",VB=["typed","config","numeric","larger"],ZB=q(GB,VB,e=>{var{typed:r,config:a,numeric:i,larger:t}=e,n=wv({typed:r,config:a,numeric:i,larger:t});return r("max",{"...any":function(l){l=Rt(l);try{return n.apply(null,l)}catch(u){throw zr(u)}}})},{isTransformFunction:!0}),XB="mean",YB=["typed","add","divide"],WB=q(XB,YB,e=>{var{typed:r,add:a,divide:i}=e,t=Bv({typed:r,add:a,divide:i});return r("mean",{"...any":function(o){o=Rt(o);try{return t.apply(null,o)}catch(l){throw zr(l)}}})},{isTransformFunction:!0}),JB="min",QB=["typed","config","numeric","smaller"],KB=q(JB,QB,e=>{var{typed:r,config:a,numeric:i,smaller:t}=e,n=Nv({typed:r,config:a,numeric:i,smaller:t});return r("min",{"...any":function(l){l=Rt(l);try{return n.apply(null,l)}catch(u){throw zr(u)}}})},{isTransformFunction:!0}),jB="range",eT=["typed","config","?matrix","?bignumber","smaller","smallerEq","larger","largerEq","add","isPositive"],rT=q(jB,eT,e=>{var{typed:r,config:a,matrix:i,bignumber:t,smaller:n,smallerEq:o,larger:l,largerEq:u,add:s,isPositive:c}=e,f=dv({typed:r,config:a,matrix:i,bignumber:t,smaller:n,smallerEq:o,larger:l,largerEq:u,add:s,isPositive:c});return r("range",{"...any":function(v){var d=v.length-1,p=v[d];return typeof p!="boolean"&&v.push(!0),f.apply(null,v)}})},{isTransformFunction:!0}),tT="row",nT=["typed","Index","matrix","range"],aT=q(tT,nT,e=>{var{typed:r,Index:a,matrix:i,range:t}=e,n=hv({typed:r,Index:a,matrix:i,range:t});return r("row",{"...any":function(l){var u=l.length-1,s=l[u];Ue(s)&&(l[u]=s-1);try{return n.apply(null,l)}catch(c){throw zr(c)}}})},{isTransformFunction:!0}),iT="subset",oT=["typed","matrix","zeros","add"],sT=q(iT,oT,e=>{var{typed:r,matrix:a,zeros:i,add:t}=e,n=gv({typed:r,matrix:a,zeros:i,add:t});return r("subset",{"...any":function(l){try{return n.apply(null,l)}catch(u){throw zr(u)}}})},{isTransformFunction:!0}),uT="concat",cT=["typed","matrix","isInteger"],lT=q(uT,cT,e=>{var{typed:r,matrix:a,isInteger:i}=e,t=lv({typed:r,matrix:a,isInteger:i});return r("concat",{"...any":function(o){var l=o.length-1,u=o[l];Ue(u)?o[l]=u-1:Le(u)&&(o[l]=u.minus(1));try{return t.apply(null,o)}catch(s){throw zr(s)}}})},{isTransformFunction:!0}),wf="diff",fT=["typed","matrix","subtract","number","bignumber"],mT=q(wf,fT,e=>{var{typed:r,matrix:a,subtract:i,number:t,bignumber:n}=e,o=mv({typed:r,matrix:a,subtract:i,number:t,bignumber:n});return r(wf,{"...any":function(u){u=Rt(u);try{return o.apply(null,u)}catch(s){throw zr(s)}}})},{isTransformFunction:!0}),vT="std",pT=["typed","map","sqrt","variance"],dT=q(vT,pT,e=>{var{typed:r,map:a,sqrt:i,variance:t}=e,n=_v({typed:r,map:a,sqrt:i,variance:t});return r("std",{"...any":function(l){l=Rt(l);try{return n.apply(null,l)}catch(u){throw zr(u)}}})},{isTransformFunction:!0}),Nf="sum",hT=["typed","config","add","numeric"],gT=q(Nf,hT,e=>{var{typed:r,config:a,add:i,numeric:t}=e,n=Mv({typed:r,config:a,add:i,numeric:t});return r(Nf,{"...any":function(l){l=Rt(l);try{return n.apply(null,l)}catch(u){throw zr(u)}}})},{isTransformFunction:!0}),yT="quantileSeq",bT=["typed","bignumber","add","subtract","divide","multiply","partitionSelect","compare","isInteger","smaller","smallerEq","larger"],xT=q(yT,bT,e=>{var{typed:r,bignumber:a,add:i,subtract:t,divide:n,multiply:o,partitionSelect:l,compare:u,isInteger:s,smaller:c,smallerEq:f,larger:m}=e,v=Ov({typed:r,bignumber:a,add:i,subtract:t,divide:n,multiply:o,partitionSelect:l,compare:u,isInteger:s,smaller:c,smallerEq:f,larger:m});return r("quantileSeq",{"Array | Matrix, number | BigNumber":v,"Array | Matrix, number | BigNumber, number":(p,w,g)=>v(p,w,d(g)),"Array | Matrix, number | BigNumber, boolean":v,"Array | Matrix, number | BigNumber, boolean, number":(p,w,g,N)=>v(p,w,g,d(N)),"Array | Matrix, Array | Matrix":v,"Array | Matrix, Array | Matrix, number":(p,w,g)=>v(p,w,d(g)),"Array | Matrix, Array | Matrix, boolean":v,"Array | Matrix, Array | Matrix, boolean, number":(p,w,g,N)=>v(p,w,g,d(N))});function d(p){return Rt([[],p])[1]}},{isTransformFunction:!0}),Df="cumsum",wT=["typed","add","unaryPlus"],NT=q(Df,wT,e=>{var{typed:r,add:a,unaryPlus:i}=e,t=Fv({typed:r,add:a,unaryPlus:i});return r(Df,{"...any":function(o){if(o.length===2&&Qr(o[0])){var l=o[1];Ue(l)?o[1]=l-1:Le(l)&&(o[1]=l.minus(1))}try{return t.apply(null,o)}catch(u){throw zr(u)}}})},{isTransformFunction:!0}),Af="variance",DT=["typed","add","subtract","multiply","divide","apply","isNaN"],AT=q(Af,DT,e=>{var{typed:r,add:a,subtract:i,multiply:t,divide:n,apply:o,isNaN:l}=e,u=Tv({typed:r,add:a,subtract:i,multiply:t,divide:n,apply:o,isNaN:l});return r(Af,{"...any":function(c){c=Rt(c);try{return u.apply(null,c)}catch(f){throw zr(f)}}})},{isTransformFunction:!0}),Ef="print",ET=["typed","matrix","zeros","add"],ST=q(Ef,ET,e=>{var{typed:r,matrix:a,zeros:i,add:t}=e,n=bv({typed:r,matrix:a,zeros:i,add:t});return r(Ef,{"string, Object | Array":function(u,s){return n(o(u),s)},"string, Object | Array, number | Object":function(u,s,c){return n(o(u),s,c)}});function o(l){return l.replace(yv,u=>{var s=u.slice(1).split("."),c=s.map(function(f){return!isNaN(f)&&f.length>0?parseInt(f)-1:f});return"$"+c.join(".")})}},{isTransformFunction:!0}),CT="and",MT=["typed","matrix","zeros","add","equalScalar","not","concat"],FT=q(CT,MT,e=>{var{typed:r,matrix:a,equalScalar:i,zeros:t,not:n,concat:o}=e,l=xv({typed:r,matrix:a,equalScalar:i,zeros:t,not:n,concat:o});function u(s,c,f){var m=s[0].compile().evaluate(f);if(!Qr(m)&&!l(m,!0))return!1;var v=s[1].compile().evaluate(f);return l(m,v)}return u.rawArgs=!0,u},{isTransformFunction:!0}),BT="or",TT=["typed","matrix","equalScalar","DenseMatrix","concat"],OT=q(BT,TT,e=>{var{typed:r,matrix:a,equalScalar:i,DenseMatrix:t,concat:n}=e,o=cv({typed:r,matrix:a,equalScalar:i,DenseMatrix:t,concat:n});function l(u,s,c){var f=u[0].compile().evaluate(c);if(!Qr(f)&&o(f,!1))return!0;var m=u[1].compile().evaluate(c);return o(f,m)}return l.rawArgs=!0,l},{isTransformFunction:!0}),_T="bitAnd",$T=["typed","matrix","zeros","add","equalScalar","not","concat"],IT=q(_T,$T,e=>{var{typed:r,matrix:a,equalScalar:i,zeros:t,not:n,concat:o}=e,l=sv({typed:r,matrix:a,equalScalar:i,zeros:t,not:n,concat:o});function u(s,c,f){var m=s[0].compile().evaluate(f);if(!Qr(m)){if(isNaN(m))return NaN;if(m===0||m===!1)return 0}var v=s[1].compile().evaluate(f);return l(m,v)}return u.rawArgs=!0,u},{isTransformFunction:!0}),qT="bitOr",RT=["typed","matrix","equalScalar","DenseMatrix","concat"],zT=q(qT,RT,e=>{var{typed:r,matrix:a,equalScalar:i,DenseMatrix:t,concat:n}=e,o=uv({typed:r,matrix:a,equalScalar:i,DenseMatrix:t,concat:n});function l(u,s,c){var f=u[0].compile().evaluate(c);if(!Qr(f)){if(isNaN(f))return NaN;if(f===-1)return-1;if(f===!0)return 1}var m=u[1].compile().evaluate(c);return o(f,m)}return l.rawArgs=!0,l},{isTransformFunction:!0}),De=t0({config:de}),or=s0({}),Sf=x4({BigNumber:De,config:de}),PT=p4({}),UT=W4({BigNumber:De,config:de}),Jt=m0({}),Iv=M4({Complex:or}),LT=h4({BigNumber:De,config:de}),kT=D4({BigNumber:De,config:de}),HT=E4({BigNumber:De,config:de}),xi=y0({}),GT=g4({BigNumber:De,config:de}),VT=d4({}),ZT=w4({BigNumber:De,config:de}),XT=d0({}),qv=oh({}),YT=S4({BigNumber:De,config:de}),WT=pB({BigNumber:De,config:de}),Rv=b4({BigNumber:De,config:de}),JT=v4({}),QT=F4({}),ke=N0({Matrix:xi}),KT=aB({BigNumber:De,config:de}),jT=N4({BigNumber:De,config:de}),ao=y4({BigNumber:De,config:de}),eO=f4({}),rO=C4({BigNumber:De,config:de}),G=th({BigNumber:De,Complex:or,DenseMatrix:ke,Fraction:Jt}),No=_g({BigNumber:De,config:de,typed:G}),tO=nB({BigNumber:De,config:de}),Pr=Ig({typed:G}),nO=lN({Complex:or,config:de,typed:G}),aO=pN({BigNumber:De,typed:G}),iO=yN({BigNumber:De,Complex:or,config:de,typed:G}),gr=Pg({typed:G}),oO=Sy({typed:G}),sO=AN({BigNumber:De,Complex:or,config:de,typed:G}),uO=FN({typed:G}),zv=ON({typed:G}),cO=qN({Complex:or,config:de,typed:G}),Hr=vg({BigNumber:De,typed:G}),lO=by({typed:G}),fO=lg({typed:G}),mO=A0({typed:G}),wi=U3({typed:G}),Ni=hg({Complex:or,typed:G}),Qt=My({typed:G}),Do=zN({typed:G}),vO=kN({BigNumber:De,typed:G}),pO=ZN({BigNumber:De,typed:G}),dO=e1({typed:G}),Xe=K0({config:de,typed:G}),hO=Jb({typed:G}),Pv=t1({typed:G}),gO=a1({Complex:or,typed:G}),yO=Yy({typed:G}),bO=Ky({typed:G}),ra=sx({typed:G}),Ao=rb({typed:G}),xO=vx({format:ra,typed:G}),Eo=By({typed:G}),Lr=S0({typed:G}),zt=R0({typed:G}),Kt=H0({typed:G}),ct=V0({typed:G}),wO=A4({BigNumber:De,config:de}),NO=Z3({Complex:or,typed:G}),DO=P1({Complex:or,config:de,typed:G}),Uv=L1({Complex:or,config:de,typed:G}),jt=sb({typed:G}),mr=G1({typed:G}),ni=$y({typed:G}),Et=og({typed:G}),AO=fx({format:ra,typed:G}),EO=NF({config:de,typed:G}),SO=bv({typed:G}),CO=AF({config:de,typed:G}),So=Oy({typed:G}),MO=JN({BigNumber:De,typed:G}),Lv=J1({BigNumber:De,Fraction:Jt,complex:Ni,typed:G}),Di=e2({typed:G}),St=rg({Matrix:xi,equalScalar:Xe,typed:G}),FO=Fg({typed:G}),BO=ry({typed:G}),TO=ug({typed:G}),jr=Lg({typed:G}),OO=a2({typed:G}),kv=W0({typed:G}),_O=mN({Complex:or,config:de,typed:G}),$O=xN({BigNumber:De,typed:G}),Co=fo({isInteger:Lr,typed:G}),IO=NN({BigNumber:De,Complex:or,config:de,typed:G}),qO=cx({format:ra,typed:G}),RO=k3({typed:G}),zO=UN({typed:G}),PO=YN({BigNumber:De,typed:G}),ta=X0({typed:G}),UO=yx({typed:G}),LO=SF({config:de,typed:G}),kO=KN({BigNumber:De,typed:G}),HO=t2({typed:G}),GO=oN({SparseMatrix:St,typed:G}),lt=j1({Complex:or,config:de,typed:G}),VO=s2({typed:G}),pt=Tg({typed:G}),ZO=hN({BigNumber:De,Complex:or,config:de,typed:G}),XO=GN({BigNumber:De,typed:G}),Tn=bg({Fraction:Jt,typed:G}),en=P0({typed:G}),we=wg({DenseMatrix:ke,Matrix:xi,SparseMatrix:St,typed:G}),YO=Dg({isZero:ct,matrix:we,typed:G}),WO=nx({isNaN:ta,isNumeric:en,typed:G}),at=wx({bignumber:Hr,fraction:Tn,number:Et}),Hv=ix({config:de,multiplyScalar:mr,numeric:at,typed:G}),Gv=db({isInteger:Lr,matrix:we,typed:G}),Ar=Eb({matrix:we,config:de,typed:G}),JO=Cb({matrix:we,typed:G}),na=_b({matrix:we,typed:G}),Vv=iy({BigNumber:De,config:de,matrix:we,typed:G}),Nr=Rb({BigNumber:De,config:de,matrix:we,typed:G}),QO=SN({Complex:or,config:de,typed:G}),Zv=Hg({BigNumber:De,Complex:or,Fraction:Jt,config:de,isNegative:zt,matrix:we,typed:G,unaryMinus:pt}),Je=lv({isInteger:Lr,matrix:we,typed:G}),KO=Ly({prod:Hv,size:Ar,typed:G}),Mo=Ib({conj:Qt,transpose:na,typed:G}),Xv=Vy({DenseMatrix:ke,SparseMatrix:St,matrix:we,typed:G}),cr=Dx({numeric:at,typed:G}),aa=Rx({DenseMatrix:ke,concat:Je,divideScalar:cr,equalScalar:Xe,matrix:we,typed:G}),et=mw({DenseMatrix:ke,concat:Je,equalScalar:Xe,matrix:we,typed:G}),ia=Jy({matrix:we,typed:G}),jO=L0({isNumeric:en,typed:G}),Pt=nb({BigNumber:De,DenseMatrix:ke,SparseMatrix:St,config:de,matrix:we,typed:G}),e5=ib({matrix:we,multiplyScalar:mr,typed:G}),Ai=Sw({DenseMatrix:ke,concat:Je,config:de,matrix:we,typed:G}),r5=Wx({DenseMatrix:ke,concat:Je,equalScalar:Xe,matrix:we,typed:G,zeros:Nr}),Yv=Px({DenseMatrix:ke,divideScalar:cr,equalScalar:Xe,matrix:we,multiplyScalar:mr,subtractScalar:jr,typed:G}),Fo=Cg({flatten:ia,matrix:we,size:Ar,typed:G}),t5=Y1({BigNumber:De,concat:Je,equalScalar:Xe,matrix:we,typed:G}),n5=mb({BigNumber:De,config:de,matrix:we,typed:G}),Bo=LD({addScalar:gr,complex:Ni,conj:Qt,divideScalar:cr,equal:et,identity:Pt,isZero:ct,matrix:we,multiplyScalar:mr,sign:Lv,sqrt:lt,subtractScalar:jr,typed:G,unaryMinus:pt,zeros:Nr}),a5=yb({config:de,matrix:we}),i5=Qx({DenseMatrix:ke,concat:Je,equalScalar:Xe,matrix:we,typed:G,zeros:Nr}),On=Cx({BigNumber:De,DenseMatrix:ke,config:de,equalScalar:Xe,matrix:we,typed:G,zeros:Nr}),_r=gw({DenseMatrix:ke,concat:Je,config:de,matrix:we,typed:G}),fr=ny({DenseMatrix:ke,concat:Je,equalScalar:Xe,matrix:we,subtractScalar:jr,typed:G,unaryMinus:pt}),o5=hx({concat:Je,matrix:we,typed:G}),s5=Tw({DenseMatrix:ke,concat:Je,config:de,equalScalar:Xe,matrix:we,typed:G}),To=Lx({DenseMatrix:ke,divideScalar:cr,equalScalar:Xe,matrix:we,multiplyScalar:mr,subtractScalar:jr,typed:G}),u5=Ry({DenseMatrix:ke,concat:Je,matrix:we,typed:G}),Ye=F2({DenseMatrix:ke,SparseMatrix:St,addScalar:gr,concat:Je,equalScalar:Xe,matrix:we,typed:G}),c5=$N({BigNumber:De,DenseMatrix:ke,concat:Je,equalScalar:Xe,matrix:we,typed:G}),l5=sv({concat:Je,equalScalar:Xe,matrix:we,typed:G}),f5=uv({DenseMatrix:ke,concat:Je,equalScalar:Xe,matrix:we,typed:G}),m5=Ay({DenseMatrix:ke,concat:Je,matrix:we,typed:G}),v5=OF({addScalar:gr,combinations:wi,divideScalar:cr,isInteger:Lr,isNegative:zt,multiplyScalar:mr,typed:G}),rn=tw({BigNumber:De,DenseMatrix:ke,Fraction:Jt,concat:Je,config:de,equalScalar:Xe,matrix:we,typed:G}),Wv=lw({concat:Je,matrix:we,typed:G}),p5=Fv({add:Ye,typed:G,unaryPlus:No}),Oo=Fw({equal:et,typed:G}),d5=mv({matrix:we,number:Et,subtract:fr,typed:G}),h5=D3({abs:Pr,addScalar:gr,deepEqual:Oo,divideScalar:cr,multiplyScalar:mr,sqrt:lt,subtractScalar:jr,typed:G}),Ei=I2({addScalar:gr,conj:Qt,multiplyScalar:mr,size:Ar,typed:G}),g5=dw({compareText:Wv,isZero:ct,typed:G}),Jv=av({DenseMatrix:ke,config:de,equalScalar:Xe,matrix:we,round:On,typed:G,zeros:Nr}),y5=_1({BigNumber:De,DenseMatrix:ke,concat:Je,config:de,equalScalar:Xe,matrix:we,round:On,typed:G,zeros:Nr}),b5=T2({abs:Pr,addScalar:gr,divideScalar:cr,isPositive:Kt,multiplyScalar:mr,smaller:_r,sqrt:lt,typed:G}),Qv=Lw({DenseMatrix:ke,smaller:_r}),Mr=Gw({ImmutableDenseMatrix:Qv,getMatrixDataType:Ao}),$r=Dw({DenseMatrix:ke,concat:Je,config:de,matrix:we,typed:G}),_o=Fx({Complex:or,config:de,divideScalar:cr,typed:G}),x5=Hx({DenseMatrix:ke,divideScalar:cr,equalScalar:Xe,matrix:we,multiplyScalar:mr,subtractScalar:jr,typed:G}),w5=Eg({flatten:ia,matrix:we,size:Ar,typed:G}),N5=Nv({config:de,numeric:at,smaller:_r,typed:G}),Kv=iv({DenseMatrix:ke,concat:Je,config:de,equalScalar:Xe,matrix:we,round:On,typed:G,zeros:Nr}),er=Z1({addScalar:gr,dot:Ei,equalScalar:Xe,matrix:we,multiplyScalar:mr,typed:G}),D5=_x({Complex:or,config:de,divideScalar:cr,typed:G}),A5=cv({DenseMatrix:ke,concat:Je,equalScalar:Xe,matrix:we,typed:G}),Si=$w({compare:rn,isNaN:ta,isNumeric:en,typed:G}),E5=jx({DenseMatrix:ke,concat:Je,equalScalar:Xe,matrix:we,typed:G,zeros:Nr}),jv=fA({SparseMatrix:St,abs:Pr,add:Ye,divideScalar:cr,larger:$r,largerEq:Ai,multiply:er,subtract:fr,transpose:na,typed:G}),Vr=gv({add:Ye,matrix:we,typed:G,zeros:Nr}),$o=Mv({add:Ye,config:de,numeric:at,typed:G}),S5=z2({add:Ye,matrix:we,typed:G}),ep=Vx({DenseMatrix:ke,divideScalar:cr,equalScalar:Xe,matrix:we,multiplyScalar:mr,subtractScalar:jr,typed:G}),C5=n4({Complex:or,add:Ye,multiply:er,number:Et,typed:G}),Io=Kg({DenseMatrix:ke,config:de,equalScalar:Xe,matrix:we,round:On,typed:G,zeros:Nr}),dt=sw({compare:rn,typed:G}),M5=$F({addScalar:gr,combinations:wi,isInteger:Lr,isNegative:zt,isPositive:Kt,larger:$r,typed:G}),F5=Hy({matrix:we,multiply:er,subtract:fr,typed:G}),rp=jM({divideScalar:cr,isZero:ct,matrix:we,multiply:er,subtractScalar:jr,typed:G,unaryMinus:pt}),B5=fy({concat:Je,equalScalar:Xe,matrix:we,multiplyScalar:mr,typed:G}),tp=Xw({larger:$r,smaller:_r}),np=s1({Complex:or,DenseMatrix:ke,ceil:Io,equalScalar:Xe,floor:Jv,matrix:we,typed:G,zeros:Nr}),ap=U2({Index:Mr,typed:G}),T5=S3({abs:Pr,add:Ye,addScalar:gr,config:de,divideScalar:cr,equalScalar:Xe,flatten:ia,isNumeric:en,isZero:ct,matrix:we,multiply:er,multiplyScalar:mr,smaller:_r,subtract:fr,typed:G}),O5=sy({BigNumber:De,add:Ye,config:de,equal:et,isInteger:Lr,mod:Kv,smaller:_r,typed:G,xgcd:Vv}),_5=R1({concat:Je,equalScalar:Xe,matrix:we,typed:G}),$5=Tx({Complex:or,config:de,divideScalar:cr,log:_o,typed:G}),qo=wv({config:de,larger:$r,numeric:at,typed:G}),I5=c2({DenseMatrix:ke,Index:Mr,compareNatural:dt,size:Ar,subset:Vr,typed:G}),q5=v2({DenseMatrix:ke,Index:Mr,compareNatural:dt,size:Ar,subset:Vr,typed:G}),R5=g2({Index:Mr,compareNatural:dt,size:Ar,subset:Vr,typed:G}),z5=w2({Index:Mr,compareNatural:dt,size:Ar,subset:Vr,typed:G}),Nn=xw({DenseMatrix:ke,concat:Je,config:de,matrix:we,typed:G}),P5=qw({compare:rn,compareNatural:dt,matrix:we,typed:G}),U5=xv({concat:Je,equalScalar:Xe,matrix:we,not:ni,typed:G,zeros:Nr}),Dn=dv({bignumber:Hr,matrix:we,add:Ye,config:de,isPositive:Kt,larger:$r,largerEq:Ai,smaller:_r,smallerEq:Nn,typed:G}),L5=hv({Index:Mr,matrix:we,range:Dn,typed:G}),ip=f2({DenseMatrix:ke,Index:Mr,compareNatural:dt,size:Ar,subset:Vr,typed:G}),k5=b2({Index:Mr,compareNatural:dt,size:Ar,subset:Vr,typed:G}),op=E2({Index:Mr,concat:Je,setDifference:ip,size:Ar,subset:Vr,typed:G}),sp=Jw({FibonacciHeap:tp,addScalar:gr,equalScalar:Xe}),up=fv({Index:Mr,matrix:we,range:Dn,typed:G}),tn=r3({abs:Pr,addScalar:gr,det:rp,divideScalar:cr,identity:Pt,matrix:we,multiply:er,typed:G,unaryMinus:pt}),cp=PD({DenseMatrix:ke,Spa:sp,SparseMatrix:St,abs:Pr,addScalar:gr,divideScalar:cr,equalScalar:Xe,larger:$r,matrix:we,multiplyScalar:mr,subtractScalar:jr,typed:G,unaryMinus:pt}),H5=n3({Complex:or,add:Ye,ctranspose:Mo,deepEqual:Oo,divideScalar:cr,dot:Ei,dotDivide:aa,equal:et,inv:tn,matrix:we,multiply:er,typed:G}),rt=Ex({Complex:or,config:de,fraction:Tn,identity:Pt,inv:tn,matrix:we,multiply:er,number:Et,typed:G}),lp=d2({DenseMatrix:ke,Index:Mr,compareNatural:dt,size:Ar,subset:Vr,typed:G}),G5=C2({Index:Mr,concat:Je,setIntersect:lp,setSymDifference:op,size:Ar,subset:Vr,typed:G}),V5=m3({abs:Pr,add:Ye,identity:Pt,inv:tn,map:jt,max:qo,multiply:er,size:Ar,sqrt:lt,subtract:fr,typed:G}),_e=tN({BigNumber:De,Complex:or,Fraction:Jt,abs:Pr,addScalar:gr,config:de,divideScalar:cr,equal:et,fix:np,format:ra,isNumeric:en,multiplyScalar:mr,number:Et,pow:rt,round:On,subtractScalar:jr}),Z5=q4({BigNumber:De,Unit:_e,config:de}),X5=gB({BigNumber:De,Unit:_e,config:de}),Y5=iB({BigNumber:De,Unit:_e,config:de}),W5=P4({BigNumber:De,Unit:_e,config:de}),J5=sB({BigNumber:De,Unit:_e,config:de}),Q5=U4({BigNumber:De,Unit:_e,config:de}),K5=R4({BigNumber:De,Unit:_e,config:de}),j5=K4({BigNumber:De,Unit:_e,config:de}),e8=Ix({DenseMatrix:ke,concat:Je,equalScalar:Xe,matrix:we,pow:rt,typed:G}),r8=I4({BigNumber:De,Unit:_e,config:de}),t8=z4({BigNumber:De,Unit:_e,config:de}),n8=l3({abs:Pr,add:Ye,identity:Pt,inv:tn,multiply:er,typed:G}),a8=uB({BigNumber:De,Unit:_e,config:de}),fp=Pb({addScalar:gr,ceil:Io,conj:Qt,divideScalar:cr,dotDivide:aa,exp:Pv,i:Iv,log2:Uv,matrix:we,multiplyScalar:mr,pow:rt,tau:Rv,typed:G}),Ro=G3({BigNumber:De,Complex:or,config:de,multiplyScalar:mr,pow:rt,typed:G}),i8=T4({BigNumber:De,Unit:_e,config:de}),o8=J4({BigNumber:De,Unit:_e,config:de}),s8=Lb({conj:Qt,dotDivide:aa,fft:fp,typed:G}),u8=G4({BigNumber:De,Unit:_e,config:de}),c8=lB({BigNumber:De,Unit:_e,config:de}),l8=$4({BigNumber:De,Unit:_e,config:de}),f8=yB({BigNumber:De,Unit:_e,config:de}),m8=mB({BigNumber:De,Unit:_e,config:de}),v8=j4({BigNumber:De,Unit:_e,config:de}),p8=H4({BigNumber:De,Unit:_e,config:de}),d8=AB({BigNumber:De,Unit:_e,config:de}),h8=wB({BigNumber:De,Unit:_e,config:de}),g8=EB({BigNumber:De,Unit:_e,config:de}),y8=Q4({BigNumber:De,Unit:_e,config:de}),b8=eB({BigNumber:De,Unit:_e,config:de}),x8=_4({BigNumber:De,Unit:_e,config:de}),w8=rB({BigNumber:De,Unit:_e,config:de}),N8=dB({BigNumber:De,Unit:_e,config:de}),D8=B4({BigNumber:De,Unit:_e,config:de}),A8=hB({BigNumber:De,Unit:_e,config:de}),E8=tB({BigNumber:De,Unit:_e,config:de}),S8=oB({BigNumber:De,Unit:_e,config:de}),C8=V4({BigNumber:De,Unit:_e,config:de}),M8=uN({Unit:_e,typed:G}),br=w3({divideScalar:cr,equalScalar:Xe,inv:tn,matrix:we,multiply:er,typed:G}),F8=X4({BigNumber:De,Unit:_e,config:de}),oa=Y3({gamma:Ro,typed:G}),B8=cB({BigNumber:De,Unit:_e,config:de}),T8=xB({BigNumber:De,Unit:_e,config:de}),O8=L4({BigNumber:De,Unit:_e,config:de}),mp=vA({DenseMatrix:ke,lsolve:Yv,lup:cp,matrix:we,slu:jv,typed:G,usolve:To}),_8=k4({BigNumber:De,Unit:_e,config:de}),$8=bB({BigNumber:De,Unit:_e,config:de}),I8=K3({add:Ye,divide:br,factorial:oa,isInteger:Lr,isPositive:Kt,multiply:er,typed:G}),q8=eF({factorial:oa,typed:G}),R8=NB({BigNumber:De,Unit:_e,config:de}),z8=dA({add:Ye,cbrt:Zv,divide:br,equalScalar:Xe,im:Eo,isZero:ct,multiply:er,re:So,sqrt:lt,subtract:fr,typeOf:kv,typed:G,unaryMinus:pt}),P8=D2({compareNatural:dt,typed:G}),U8=Xb({abs:Pr,add:Ye,bignumber:Hr,divide:br,isNegative:zt,isPositive:Kt,larger:$r,map:jt,matrix:we,max:qo,multiply:er,smaller:_r,subtract:fr,typed:G,unaryMinus:pt}),vp=MF({bignumber:Hr,addScalar:gr,combinations:wi,divideScalar:cr,factorial:oa,isInteger:Lr,isNegative:zt,larger:$r,multiplyScalar:mr,number:Et,pow:rt,subtractScalar:jr,typed:G}),L8=aN({Unit:_e,typed:G}),k8=BF({addScalar:gr,isInteger:Lr,isNegative:zt,stirlingS2:vp,typed:G}),pp=u3({abs:Pr,add:Ye,addScalar:gr,atan:zv,bignumber:Hr,column:up,complex:Ni,config:de,cos:Do,diag:Xv,divideScalar:cr,dot:Ei,equal:et,flatten:ia,im:Eo,inv:tn,larger:$r,matrix:we,matrixFromColumns:Fo,multiply:er,multiplyScalar:mr,number:Et,qr:Bo,re:So,reshape:Gv,sin:Di,size:Ar,smaller:_r,sqrt:lt,subtract:fr,typed:G,usolve:To,usolveAll:ep}),H8=Y4({BigNumber:De,Unit:_e,config:de}),G8=fB({BigNumber:De,Unit:_e,config:de}),V8=J3({divide:br,dotDivide:aa,isNumeric:en,log:_o,map:jt,matrix:we,multiply:er,sum:$o,typed:G}),dp=Bv({add:Ye,divide:br,typed:G}),Z8=vB({BigNumber:De,Unit:_e,config:de}),X8=O4({BigNumber:De,Unit:_e,config:de}),Y8=Ov({bignumber:Hr,add:Ye,compare:rn,divide:br,isInteger:Lr,larger:$r,multiply:er,partitionSelect:Si,smaller:_r,smallerEq:Nn,subtract:fr,typed:G}),zo=Tv({add:Ye,apply:Co,divide:br,isNaN:ta,multiply:er,subtract:fr,typed:G}),W8=Z4({BigNumber:De,Unit:_e,config:de}),hp=T3({add:Ye,compare:rn,divide:br,partitionSelect:Si,typed:G}),J8=z3({add:Ye,divide:br,matrix:we,mean:dp,multiply:er,pow:rt,sqrt:lt,subtract:fr,sum:$o,typed:G}),Q8=i4({Complex:or,add:Ye,divide:br,matrix:we,multiply:er,typed:G}),K8=_3({abs:Pr,map:jt,median:hp,subtract:fr,typed:G}),j8=_v({map:jt,sqrt:lt,typed:G,variance:zo}),e6=rx({BigNumber:De,Complex:or,add:Ye,config:de,divide:br,equal:et,factorial:oa,gamma:Ro,isNegative:zt,multiply:er,pi:ao,pow:rt,sin:Di,smallerEq:Nn,subtract:fr,typed:G}),Po=_2({abs:Pr,add:Ye,conj:Qt,ctranspose:Mo,eigs:pp,equalScalar:Xe,larger:$r,matrix:we,multiply:er,pow:rt,smaller:_r,sqrt:lt,typed:G}),gp=Nb({BigNumber:De,DenseMatrix:ke,SparseMatrix:St,addScalar:gr,config:de,cos:Do,matrix:we,multiplyScalar:mr,norm:Po,sin:Di,typed:G,unaryMinus:pt}),r6=DB({BigNumber:De,Unit:_e,config:de}),yp=h3({identity:Pt,matrix:we,multiply:er,norm:Po,qr:Bo,subtract:fr,typed:G}),t6=xb({multiply:er,rotationMatrix:gp,typed:G}),bp=p3({abs:Pr,add:Ye,concat:Je,identity:Pt,index:ap,lusolve:mp,matrix:we,matrixFromColumns:Fo,multiply:er,range:Dn,schur:yp,subset:Vr,subtract:fr,transpose:na,typed:G}),n6=y3({matrix:we,multiply:er,sylvester:bp,transpose:na,typed:G}),_n={},$n={},xp={},Tr=H2({mathWithTransform:$n}),In=vD({Node:Tr}),Ct=dD({Node:Tr}),nn=gD({Node:Tr}),wp=wD({Node:Tr}),qn=X2({Node:Tr}),Np=j2({Node:Tr,ResultSet:qv}),Dp=rD({Node:Tr}),Ut=sD({Node:Tr}),Ap=bD({Node:Tr}),a6=u4({classes:xp}),Uo=wA({math:_n,typed:G}),Ep=cD({Node:Tr,typed:G}),i6=QM({Chain:Uo,typed:G}),Rn=fD({Node:Tr,size:Ar}),zn=V2({Node:Tr,subset:Vr}),Sp=Q2({matrix:we,Node:Tr,subset:Vr}),Lt=AD({Unit:_e,Node:Tr,math:_n}),kt=SD({Node:Tr,SymbolNode:Lt,math:_n}),ht=MD({AccessorNode:zn,ArrayNode:qn,AssignmentNode:Sp,BlockNode:Np,ConditionalNode:Dp,ConstantNode:Ut,FunctionAssignmentNode:Ep,FunctionNode:kt,IndexNode:Rn,ObjectNode:In,OperatorNode:Ct,ParenthesisNode:nn,RangeNode:Ap,RelationalNode:wp,SymbolNode:Lt,config:de,numeric:at,typed:G}),Cp=WF({ConstantNode:Ut,FunctionNode:kt,OperatorNode:Ct,ParenthesisNode:nn,parse:ht,typed:G}),Lo=GF({bignumber:Hr,fraction:Tn,AccessorNode:zn,ArrayNode:qn,ConstantNode:Ut,FunctionNode:kt,IndexNode:Rn,ObjectNode:In,OperatorNode:Ct,SymbolNode:Lt,config:de,mathWithTransform:$n,matrix:we,typed:G}),o6=BD({parse:ht,typed:G}),ko=ZF({AccessorNode:zn,ArrayNode:qn,ConstantNode:Ut,FunctionNode:kt,IndexNode:Rn,ObjectNode:In,OperatorNode:Ct,ParenthesisNode:nn,SymbolNode:Lt,add:Ye,divide:br,equal:et,isZero:ct,multiply:er,parse:ht,pow:rt,subtract:fr,typed:G}),Ho=OD({parse:ht,typed:G}),Mp=yA({evaluate:Ho}),Fp=ID({evaluate:Ho}),Ci=LF({bignumber:Hr,fraction:Tn,AccessorNode:zn,ArrayNode:qn,ConstantNode:Ut,FunctionNode:kt,IndexNode:Rn,ObjectNode:In,OperatorNode:Ct,ParenthesisNode:nn,SymbolNode:Lt,add:Ye,config:de,divide:br,equal:et,isZero:ct,mathWithTransform:$n,matrix:we,multiply:er,parse:ht,pow:rt,resolve:Cp,simplifyConstant:Lo,simplifyCore:ko,subtract:fr,typed:G}),s6=QF({OperatorNode:Ct,parse:ht,simplify:Ci,typed:G}),u6=qF({parse:ht,typed:G}),c6=RD({Parser:Fp,typed:G}),l6=r4({bignumber:Hr,fraction:Tn,AccessorNode:zn,ArrayNode:qn,ConstantNode:Ut,FunctionNode:kt,IndexNode:Rn,ObjectNode:In,OperatorNode:Ct,ParenthesisNode:nn,SymbolNode:Lt,add:Ye,config:de,divide:br,equal:et,isZero:ct,mathWithTransform:$n,matrix:we,multiply:er,parse:ht,pow:rt,simplify:Ci,simplifyConstant:Lo,simplifyCore:ko,subtract:fr,typed:G}),f6=jF({ConstantNode:Ut,FunctionNode:kt,OperatorNode:Ct,ParenthesisNode:nn,SymbolNode:Lt,config:de,equal:et,isZero:ct,numeric:at,parse:ht,simplify:Ci,typed:G}),m6=WM({Help:Mp,mathWithTransform:$n,typed:G});xr(_n,{e:Sf,false:PT,fineStructure:UT,i:Iv,Infinity:LT,LN10:kT,LOG10E:HT,NaN:GT,null:VT,phi:ZT,SQRT1_2:YT,sackurTetrode:WT,tau:Rv,true:JT,E:Sf,version:QT,efimovFactor:KT,LN2:jT,pi:ao,replacer:eO,reviver:a6,SQRT2:rO,typed:G,unaryPlus:No,PI:ao,weakMixingAngle:tO,abs:Pr,acos:nO,acot:aO,acsc:iO,addScalar:gr,arg:oO,asech:sO,asinh:uO,atan:zv,atanh:cO,bignumber:Hr,bitNot:lO,boolean:fO,clone:mO,combinations:wi,complex:Ni,conj:Qt,cos:Do,cot:vO,csc:pO,cube:dO,equalScalar:Xe,erf:hO,exp:Pv,expm1:gO,filter:yO,forEach:bO,format:ra,getMatrixDataType:Ao,hex:xO,im:Eo,isInteger:Lr,isNegative:zt,isPositive:Kt,isZero:ct,LOG2E:wO,lgamma:NO,log10:DO,log2:Uv,map:jt,multiplyScalar:mr,not:ni,number:Et,oct:AO,pickRandom:EO,print:SO,random:CO,re:So,sec:MO,sign:Lv,sin:Di,splitUnit:FO,square:BO,string:TO,subtractScalar:jr,tan:OO,typeOf:kv,acosh:_O,acsch:$O,apply:Co,asec:IO,bin:qO,chain:i6,combinationsWithRep:RO,cosh:zO,csch:PO,isNaN:ta,isPrime:UO,randomInt:LO,sech:kO,sinh:HO,sparse:GO,sqrt:lt,tanh:VO,unaryMinus:pt,acoth:ZO,coth:XO,fraction:Tn,isNumeric:en,matrix:we,matrixFromFunction:YO,mode:WO,numeric:at,prod:Hv,reshape:Gv,size:Ar,squeeze:JO,transpose:na,xgcd:Vv,zeros:Nr,asin:QO,cbrt:Zv,concat:Je,count:KO,ctranspose:Mo,diag:Xv,divideScalar:cr,dotDivide:aa,equal:et,flatten:ia,hasNumericValue:jO,identity:Pt,kron:e5,largerEq:Ai,leftShift:r5,lsolve:Yv,matrixFromColumns:Fo,nthRoot:t5,ones:n5,qr:Bo,resize:a5,rightArithShift:i5,round:On,smaller:_r,subtract:fr,to:o5,unequal:s5,usolve:To,xor:u5,add:Ye,atan2:c5,bitAnd:l5,bitOr:f5,bitXor:m5,catalan:v5,compare:rn,compareText:Wv,cumsum:p5,deepEqual:Oo,diff:d5,distance:h5,dot:Ei,equalText:g5,floor:Jv,gcd:y5,hypot:b5,larger:$r,log:_o,lsolveAll:x5,matrixFromRows:w5,min:N5,mod:Kv,multiply:er,nthRoots:D5,or:A5,partitionSelect:Si,rightLogShift:E5,slu:jv,subset:Vr,sum:$o,trace:S5,usolveAll:ep,zpk2tf:C5,ceil:Io,compareNatural:dt,composition:M5,cross:F5,det:rp,dotMultiply:B5,fix:np,index:ap,intersect:T5,invmod:O5,lcm:_5,log1p:$5,max:qo,setCartesian:I5,setDistinct:q5,setIsSubset:R5,setPowerset:z5,smallerEq:Nn,sort:P5,and:U5,range:Dn,row:L5,setDifference:ip,setMultiplicity:k5,setSymDifference:op,column:up,inv:tn,lup:cp,pinv:H5,pow:rt,setIntersect:lp,setUnion:G5,sqrtm:V5,vacuumImpedance:Z5,wienDisplacement:X5,atomicMass:Y5,bohrMagneton:W5,boltzmann:J5,conductanceQuantum:Q5,coulomb:K5,deuteronMass:j5,dotPow:e8,electricConstant:r8,elementaryCharge:t8,expm:n8,faraday:a8,fft:fp,gamma:Ro,gravitationConstant:i8,hartreeEnergy:o8,ifft:s8,klitzing:u8,loschmidt:c8,magneticConstant:l8,molarMass:f8,molarPlanckConstant:m8,neutronMass:v8,nuclearMagneton:p8,planckCharge:d8,planckLength:h8,planckTemperature:g8,protonMass:y8,quantumOfCirculation:b8,reducedPlanckConstant:x8,rydberg:w8,secondRadiation:N8,speedOfLight:D8,stefanBoltzmann:A8,thomsonCrossSection:E8,avogadro:S8,bohrRadius:C8,createUnit:M8,divide:br,electronMass:F8,factorial:oa,firstRadiation:B8,gravity:T8,inverseConductanceQuantum:O8,lusolve:mp,magneticFluxQuantum:_8,molarMassC12:$8,multinomial:I8,parse:ht,permutations:q8,planckMass:R8,polynomialRoot:z8,resolve:Cp,setSize:P8,simplifyConstant:Lo,solveODE:U8,stirlingS2:vp,unit:L8,bellNumbers:k8,compile:o6,eigs:pp,fermiCoupling:H8,gasConstant:G8,kldivergence:V8,mean:dp,molarVolume:Z8,planckConstant:X8,quantileSeq:Y8,simplifyCore:ko,variance:zo,classicalElectronRadius:W8,evaluate:Ho,median:hp,simplify:Ci,symbolicEqual:s6,corr:J8,freqz:Q8,leafCount:u6,mad:K8,parser:c6,rationalize:l6,std:j8,zeta:e6,derivative:f6,norm:Po,rotationMatrix:gp,help:m6,planckTime:r6,schur:yp,rotate:t6,sylvester:bp,lyap:n6,config:de});xr($n,_n,{filter:$B({typed:G}),forEach:RB({typed:G}),map:HB({typed:G}),apply:MB({isInteger:Lr,typed:G}),or:OT({DenseMatrix:ke,concat:Je,equalScalar:Xe,matrix:we,typed:G}),and:FT({add:Ye,concat:Je,equalScalar:Xe,matrix:we,not:ni,typed:G,zeros:Nr}),concat:lT({isInteger:Lr,matrix:we,typed:G}),max:ZB({config:de,larger:$r,numeric:at,typed:G}),print:ST({add:Ye,matrix:we,typed:G,zeros:Nr}),bitAnd:IT({add:Ye,concat:Je,equalScalar:Xe,matrix:we,not:ni,typed:G,zeros:Nr}),diff:mT({bignumber:Hr,matrix:we,number:Et,subtract:fr,typed:G}),min:KB({config:de,numeric:at,smaller:_r,typed:G}),subset:sT({add:Ye,matrix:we,typed:G,zeros:Nr}),bitOr:zT({DenseMatrix:ke,concat:Je,equalScalar:Xe,matrix:we,typed:G}),cumsum:NT({add:Ye,typed:G,unaryPlus:No}),index:UB({Index:Mr,getMatrixDataType:Ao}),sum:gT({add:Ye,config:de,numeric:at,typed:G}),range:rT({bignumber:Hr,matrix:we,add:Ye,config:de,isPositive:Kt,larger:$r,largerEq:Ai,smaller:_r,smallerEq:Nn,typed:G}),row:aT({Index:Mr,matrix:we,range:Dn,typed:G}),column:TB({Index:Mr,matrix:we,range:Dn,typed:G}),mean:WB({add:Ye,divide:br,typed:G}),quantileSeq:xT({add:Ye,bignumber:Hr,compare:rn,divide:br,isInteger:Lr,larger:$r,multiply:er,partitionSelect:Si,smaller:_r,smallerEq:Nn,subtract:fr,typed:G}),variance:AT({add:Ye,apply:Co,divide:br,isNaN:ta,multiply:er,subtract:fr,typed:G}),std:dT({map:jt,sqrt:lt,typed:G,variance:zo})});xr(xp,{BigNumber:De,Complex:or,Fraction:Jt,Matrix:xi,Node:Tr,ObjectNode:In,OperatorNode:Ct,ParenthesisNode:nn,Range:XT,RelationalNode:wp,ResultSet:qv,ArrayNode:qn,BlockNode:Np,ConditionalNode:Dp,ConstantNode:Ut,DenseMatrix:ke,RangeNode:Ap,Chain:Uo,FunctionAssignmentNode:Ep,SparseMatrix:St,IndexNode:Rn,ImmutableDenseMatrix:Qv,Index:Mr,AccessorNode:zn,AssignmentNode:Sp,FibonacciHeap:tp,Spa:sp,Unit:_e,SymbolNode:Lt,FunctionNode:kt,Help:Mp,Parser:Fp});Uo.createProxy(_n);export{o6 as c,f6 as d,ht as p}; diff --git a/site/assets/index-DJrAq1Rk.js b/site/assets/index-DJrAq1Rk.js new file mode 100644 index 0000000..0042914 --- /dev/null +++ b/site/assets/index-DJrAq1Rk.js @@ -0,0 +1,299 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/BasicsView-Ces5tTvG.js","assets/MatrixInput-BvG_poIz.js","assets/WolframHelper-C3f14kAl.js","assets/chevron-right-KbXem8Tn.js","assets/MathRenderer-DoWdgGCt.js","assets/settings-2-BYyATKYL.js","assets/maximize-BW0NideE.js","assets/OperationsView-B2CRBmuD.js","assets/matrixMath-CNHWal2D.js","assets/DeterminantView-B12-SV-Q.js","assets/scan-BEuCCSbY.js","assets/InverseView-f4AQbsbM.js","assets/circle-check-7SRCYW7Y.js","assets/triangle-alert-7X0SgA5l.js","assets/ExercisesView-C-gZzMQC.js","assets/lightbulb-CK5FIpYu.js","assets/SequencesView-D362I2Es.js","assets/Sequences3DView-f2aGHw3l.js","assets/react-three-fiber.esm-DbvaK_kO.js","assets/Line-DRGYPd7c.js","assets/extends-CF3RwP-h.js","assets/OrbitControls-C12Qjv1w.js","assets/Float-DkPwlzaD.js","assets/Stars-m_MGQ0wC.js","assets/constants-Br-Ti-Jl.js","assets/FunctionsView-CURlAo-G.js","assets/mouse-pointer-2-CKfMob4f.js","assets/impureFunctionsAny.generated-DwS8eMcc.js","assets/Surface3DView-DR4ocFB5.js","assets/Grid-BzfIX0gF.js","assets/FinalExamView-Bd8W2xqo.js","assets/examStorage-DURyP8UF.js","assets/zap-Bss3mUov.js","assets/refresh-ccw-DTX90cW0.js","assets/ExamAnalysisView-DyppqzSR.js","assets/DerivativesRulesView-CcHPI4L5.js","assets/FunctionAnalysisView-BppRFCo9.js","assets/SystemsView-0Pnb8mJU.js","assets/ContinuityView-CSRJFUO9.js","assets/GaussianView-CVoXY7jU.js","assets/EigenView-vzcUWw_g.js","assets/SeriesView-js2OwgAV.js","assets/TransformationsView-CcLdqflF.js","assets/NewtonView-D8Lq1Xw6.js","assets/IntegralBasicsView-IHUY2mpE.js","assets/IntegralRulesView-C3PlQOL5.js","assets/AreaUnderCurveView-D8J_c91U.js","assets/Integrals3DView-CLF6cvHs.js","assets/DiffEqBasicsView-GrafeQN7.js","assets/PopulationModelsView-BB4Pshcn.js","assets/RadioactiveDecayView-D39iBORv.js","assets/DiffEq3DView-B2vjbbYS.js","assets/CheatSheetView-Cyb0L-8D.js","assets/LinearTransformation3DView-CiwQ5lqc.js","assets/Text-BaglAl3o.js","assets/VectorOperations3DView-EaRYXIXa.js","assets/AIChatView-BugcxH5N.js"])))=>i.map(i=>d[i]); +(function(){const l=document.createElement("link").relList;if(l&&l.supports&&l.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))o(c);new MutationObserver(c=>{for(const h of c)if(h.type==="childList")for(const f of h.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&o(f)}).observe(document,{childList:!0,subtree:!0});function u(c){const h={};return c.integrity&&(h.integrity=c.integrity),c.referrerPolicy&&(h.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?h.credentials="include":c.crossOrigin==="anonymous"?h.credentials="omit":h.credentials="same-origin",h}function o(c){if(c.ep)return;c.ep=!0;const h=u(c);fetch(c.href,h)}})();function Py(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}function O3(i){if(Object.prototype.hasOwnProperty.call(i,"__esModule"))return i;var l=i.default;if(typeof l=="function"){var u=function o(){return this instanceof o?Reflect.construct(l,arguments,this.constructor):l.apply(this,arguments)};u.prototype=l.prototype}else u={};return Object.defineProperty(u,"__esModule",{value:!0}),Object.keys(i).forEach(function(o){var c=Object.getOwnPropertyDescriptor(i,o);Object.defineProperty(u,o,c.get?c:{enumerable:!0,get:function(){return i[o]}})}),u}var qr={exports:{}},cl={};/** + * @license React + * react-jsx-runtime.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var gp;function mS(){if(gp)return cl;gp=1;var i=Symbol.for("react.transitional.element"),l=Symbol.for("react.fragment");function u(o,c,h){var f=null;if(h!==void 0&&(f=""+h),c.key!==void 0&&(f=""+c.key),"key"in c){h={};for(var m in c)m!=="key"&&(h[m]=c[m])}else h=c;return c=h.ref,{$$typeof:i,type:o,key:f,ref:c!==void 0?c:null,props:h}}return cl.Fragment=l,cl.jsx=u,cl.jsxs=u,cl}var vp;function pS(){return vp||(vp=1,qr.exports=mS()),qr.exports}var A=pS(),Gr={exports:{}},lt={};/** + * @license React + * react.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Sp;function yS(){if(Sp)return lt;Sp=1;var i=Symbol.for("react.transitional.element"),l=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),h=Symbol.for("react.consumer"),f=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),y=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),S=Symbol.for("react.activity"),b=Symbol.iterator;function V(E){return E===null||typeof E!="object"?null:(E=b&&E[b]||E["@@iterator"],typeof E=="function"?E:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},H=Object.assign,X={};function q(E,B,k){this.props=E,this.context=B,this.refs=X,this.updater=k||w}q.prototype.isReactComponent={},q.prototype.setState=function(E,B){if(typeof E!="object"&&typeof E!="function"&&E!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,E,B,"setState")},q.prototype.forceUpdate=function(E){this.updater.enqueueForceUpdate(this,E,"forceUpdate")};function Q(){}Q.prototype=q.prototype;function Y(E,B,k){this.props=E,this.context=B,this.refs=X,this.updater=k||w}var Z=Y.prototype=new Q;Z.constructor=Y,H(Z,q.prototype),Z.isPureReactComponent=!0;var K=Array.isArray;function at(){}var et={H:null,A:null,T:null,S:null},P=Object.prototype.hasOwnProperty;function st(E,B,k){var W=k.ref;return{$$typeof:i,type:E,key:B,ref:W!==void 0?W:null,props:k}}function Rt(E,B){return st(E.type,B,E.props)}function Ht(E){return typeof E=="object"&&E!==null&&E.$$typeof===i}function Xt(E){var B={"=":"=0",":":"=2"};return"$"+E.replace(/[=:]/g,function(k){return B[k]})}var Xe=/\/+/g;function Ve(E,B){return typeof E=="object"&&E!==null&&E.key!=null?Xt(""+E.key):B.toString(36)}function fe(E){switch(E.status){case"fulfilled":return E.value;case"rejected":throw E.reason;default:switch(typeof E.status=="string"?E.then(at,at):(E.status="pending",E.then(function(B){E.status==="pending"&&(E.status="fulfilled",E.value=B)},function(B){E.status==="pending"&&(E.status="rejected",E.reason=B)})),E.status){case"fulfilled":return E.value;case"rejected":throw E.reason}}throw E}function z(E,B,k,W,ut){var ft=typeof E;(ft==="undefined"||ft==="boolean")&&(E=null);var Et=!1;if(E===null)Et=!0;else switch(ft){case"bigint":case"string":case"number":Et=!0;break;case"object":switch(E.$$typeof){case i:case l:Et=!0;break;case v:return Et=E._init,z(Et(E._payload),B,k,W,ut)}}if(Et)return ut=ut(E),Et=W===""?"."+Ve(E,0):W,K(ut)?(k="",Et!=null&&(k=Et.replace(Xe,"$&/")+"/"),z(ut,B,k,"",function(ga){return ga})):ut!=null&&(Ht(ut)&&(ut=Rt(ut,k+(ut.key==null||E&&E.key===ut.key?"":(""+ut.key).replace(Xe,"$&/")+"/")+Et)),B.push(ut)),1;Et=0;var ue=W===""?".":W+":";if(K(E))for(var qt=0;qt>>1,vt=z[mt];if(0>>1;mtc(k,$))Wc(ut,k)?(z[mt]=ut,z[W]=$,mt=W):(z[mt]=k,z[B]=$,mt=B);else if(Wc(ut,$))z[mt]=ut,z[W]=$,mt=W;else break t}}return G}function c(z,G){var $=z.sortIndex-G.sortIndex;return $!==0?$:z.id-G.id}if(i.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var h=performance;i.unstable_now=function(){return h.now()}}else{var f=Date,m=f.now();i.unstable_now=function(){return f.now()-m}}var y=[],p=[],v=1,S=null,b=3,V=!1,w=!1,H=!1,X=!1,q=typeof setTimeout=="function"?setTimeout:null,Q=typeof clearTimeout=="function"?clearTimeout:null,Y=typeof setImmediate<"u"?setImmediate:null;function Z(z){for(var G=u(p);G!==null;){if(G.callback===null)o(p);else if(G.startTime<=z)o(p),G.sortIndex=G.expirationTime,l(y,G);else break;G=u(p)}}function K(z){if(H=!1,Z(z),!w)if(u(y)!==null)w=!0,at||(at=!0,Xt());else{var G=u(p);G!==null&&fe(K,G.startTime-z)}}var at=!1,et=-1,P=5,st=-1;function Rt(){return X?!0:!(i.unstable_now()-stz&&Rt());){var mt=S.callback;if(typeof mt=="function"){S.callback=null,b=S.priorityLevel;var vt=mt(S.expirationTime<=z);if(z=i.unstable_now(),typeof vt=="function"){S.callback=vt,Z(z),G=!0;break e}S===u(y)&&o(y),Z(z)}else o(y);S=u(y)}if(S!==null)G=!0;else{var E=u(p);E!==null&&fe(K,E.startTime-z),G=!1}}break t}finally{S=null,b=$,V=!1}G=void 0}}finally{G?Xt():at=!1}}}var Xt;if(typeof Y=="function")Xt=function(){Y(Ht)};else if(typeof MessageChannel<"u"){var Xe=new MessageChannel,Ve=Xe.port2;Xe.port1.onmessage=Ht,Xt=function(){Ve.postMessage(null)}}else Xt=function(){q(Ht,0)};function fe(z,G){et=q(function(){z(i.unstable_now())},G)}i.unstable_IdlePriority=5,i.unstable_ImmediatePriority=1,i.unstable_LowPriority=4,i.unstable_NormalPriority=3,i.unstable_Profiling=null,i.unstable_UserBlockingPriority=2,i.unstable_cancelCallback=function(z){z.callback=null},i.unstable_forceFrameRate=function(z){0>z||125mt?(z.sortIndex=$,l(p,z),u(y)===null&&z===u(p)&&(H?(Q(et),et=-1):H=!0,fe(K,$-mt))):(z.sortIndex=vt,l(y,z),w||V||(w=!0,at||(at=!0,Xt()))),z},i.unstable_shouldYield=Rt,i.unstable_wrapCallback=function(z){var G=b;return function(){var $=b;b=G;try{return z.apply(this,arguments)}finally{b=$}}}})(kr)),kr}var xp;function SS(){return xp||(xp=1,Xr.exports=vS()),Xr.exports}var Qr={exports:{}},se={};/** + * @license React + * react-dom.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Ep;function bS(){if(Ep)return se;Ep=1;var i=Uc();function l(y){var p="https://react.dev/errors/"+y;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(l){console.error(l)}}return i(),Qr.exports=bS(),Qr.exports}/** + * @license React + * react-dom-client.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Dp;function xS(){if(Dp)return fl;Dp=1;var i=SS(),l=Uc(),u=TS();function o(t){var e="https://react.dev/errors/"+t;if(1vt||(t.current=mt[vt],mt[vt]=null,vt--)}function k(t,e){vt++,mt[vt]=t.current,t.current=e}var W=E(null),ut=E(null),ft=E(null),Et=E(null);function ue(t,e){switch(k(ft,e),k(ut,t),k(W,null),e.nodeType){case 9:case 11:t=(t=e.documentElement)&&(t=t.namespaceURI)?qm(t):0;break;default:if(t=e.tagName,e=e.namespaceURI)e=qm(e),t=Gm(e,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}B(W),k(W,t)}function qt(){B(W),B(ut),B(ft)}function ga(t){t.memoizedState!==null&&k(Et,t);var e=W.current,n=Gm(e,t.type);e!==n&&(k(ut,t),k(W,n))}function Nl(t){ut.current===t&&(B(W),B(ut)),Et.current===t&&(B(Et),sl._currentValue=$)}var Tu,yf;function $n(t){if(Tu===void 0)try{throw Error()}catch(n){var e=n.stack.trim().match(/\n( *(at )?)/);Tu=e&&e[1]||"",yf=-1)":-1s||T[a]!==_[s]){var O=` +`+T[a].replace(" at new "," at ");return t.displayName&&O.includes("")&&(O=O.replace("",t.displayName)),O}while(1<=a&&0<=s);break}}}finally{xu=!1,Error.prepareStackTrace=n}return(n=t?t.displayName||t.name:"")?$n(n):""}function Qg(t,e){switch(t.tag){case 26:case 27:case 5:return $n(t.type);case 16:return $n("Lazy");case 13:return t.child!==e&&e!==null?$n("Suspense Fallback"):$n("Suspense");case 19:return $n("SuspenseList");case 0:case 15:return Eu(t.type,!1);case 11:return Eu(t.type.render,!1);case 1:return Eu(t.type,!0);case 31:return $n("Activity");default:return""}}function gf(t){try{var e="",n=null;do e+=Qg(t,n),n=t,t=t.return;while(t);return e}catch(a){return` +Error generating stack: `+a.message+` +`+a.stack}}var Au=Object.prototype.hasOwnProperty,Du=i.unstable_scheduleCallback,Mu=i.unstable_cancelCallback,Zg=i.unstable_shouldYield,Kg=i.unstable_requestPaint,Se=i.unstable_now,Ig=i.unstable_getCurrentPriorityLevel,vf=i.unstable_ImmediatePriority,Sf=i.unstable_UserBlockingPriority,Ol=i.unstable_NormalPriority,Fg=i.unstable_LowPriority,bf=i.unstable_IdlePriority,Jg=i.log,Pg=i.unstable_setDisableYieldValue,va=null,be=null;function En(t){if(typeof Jg=="function"&&Pg(t),be&&typeof be.setStrictMode=="function")try{be.setStrictMode(va,t)}catch{}}var Te=Math.clz32?Math.clz32:tv,Wg=Math.log,$g=Math.LN2;function tv(t){return t>>>=0,t===0?32:31-(Wg(t)/$g|0)|0}var zl=256,jl=262144,Ll=4194304;function ti(t){var e=t&42;if(e!==0)return e;switch(t&-t){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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function Ul(t,e,n){var a=t.pendingLanes;if(a===0)return 0;var s=0,r=t.suspendedLanes,d=t.pingedLanes;t=t.warmLanes;var g=a&134217727;return g!==0?(a=g&~r,a!==0?s=ti(a):(d&=g,d!==0?s=ti(d):n||(n=g&~t,n!==0&&(s=ti(n))))):(g=a&~r,g!==0?s=ti(g):d!==0?s=ti(d):n||(n=a&~t,n!==0&&(s=ti(n)))),s===0?0:e!==0&&e!==s&&(e&r)===0&&(r=s&-s,n=e&-e,r>=n||r===32&&(n&4194048)!==0)?e:s}function Sa(t,e){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&e)===0}function ev(t,e){switch(t){case 1:case 2:case 4:case 8:case 64:return e+250;case 16:case 32: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+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Tf(){var t=Ll;return Ll<<=1,(Ll&62914560)===0&&(Ll=4194304),t}function _u(t){for(var e=[],n=0;31>n;n++)e.push(t);return e}function ba(t,e){t.pendingLanes|=e,e!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function nv(t,e,n,a,s,r){var d=t.pendingLanes;t.pendingLanes=n,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=n,t.entangledLanes&=n,t.errorRecoveryDisabledLanes&=n,t.shellSuspendCounter=0;var g=t.entanglements,T=t.expirationTimes,_=t.hiddenUpdates;for(n=d&~n;0"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var ov=/[\n"\\]/g;function Re(t){return t.replace(ov,function(e){return"\\"+e.charCodeAt(0).toString(16)+" "})}function Ou(t,e,n,a,s,r,d,g){t.name="",d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"?t.type=d:t.removeAttribute("type"),e!=null?d==="number"?(e===0&&t.value===""||t.value!=e)&&(t.value=""+we(e)):t.value!==""+we(e)&&(t.value=""+we(e)):d!=="submit"&&d!=="reset"||t.removeAttribute("value"),e!=null?zu(t,d,we(e)):n!=null?zu(t,d,we(n)):a!=null&&t.removeAttribute("value"),s==null&&r!=null&&(t.defaultChecked=!!r),s!=null&&(t.checked=s&&typeof s!="function"&&typeof s!="symbol"),g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"?t.name=""+we(g):t.removeAttribute("name")}function zf(t,e,n,a,s,r,d,g){if(r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"&&(t.type=r),e!=null||n!=null){if(!(r!=="submit"&&r!=="reset"||e!=null)){Nu(t);return}n=n!=null?""+we(n):"",e=e!=null?""+we(e):n,g||e===t.value||(t.value=e),t.defaultValue=e}a=a??s,a=typeof a!="function"&&typeof a!="symbol"&&!!a,t.checked=g?t.checked:!!a,t.defaultChecked=!!a,d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(t.name=d),Nu(t)}function zu(t,e,n){e==="number"&&ql(t.ownerDocument)===t||t.defaultValue===""+n||(t.defaultValue=""+n)}function wi(t,e,n,a){if(t=t.options,e){e={};for(var s=0;s"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Hu=!1;if(an)try{var Aa={};Object.defineProperty(Aa,"passive",{get:function(){Hu=!0}}),window.addEventListener("test",Aa,Aa),window.removeEventListener("test",Aa,Aa)}catch{Hu=!1}var Dn=null,qu=null,Yl=null;function Gf(){if(Yl)return Yl;var t,e=qu,n=e.length,a,s="value"in Dn?Dn.value:Dn.textContent,r=s.length;for(t=0;t=_a),Kf=" ",If=!1;function Ff(t,e){switch(t){case"keyup":return Lv.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Jf(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var zi=!1;function Bv(t,e){switch(t){case"compositionend":return Jf(e);case"keypress":return e.which!==32?null:(If=!0,Kf);case"textInput":return t=e.data,t===Kf&&If?null:t;default:return null}}function Hv(t,e){if(zi)return t==="compositionend"||!Qu&&Ff(t,e)?(t=Gf(),Yl=qu=Dn=null,zi=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:n,offset:e-t};t=a}t:{for(;n;){if(n.nextSibling){n=n.nextSibling;break t}n=n.parentNode}n=void 0}n=ad(n)}}function sd(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?sd(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function ud(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var e=ql(t.document);e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=ql(t.document)}return e}function Iu(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}var Kv=an&&"documentMode"in document&&11>=document.documentMode,ji=null,Fu=null,Ra=null,Ju=!1;function od(t,e,n){var a=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ju||ji==null||ji!==ql(a)||(a=ji,"selectionStart"in a&&Iu(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),Ra&&wa(Ra,a)||(Ra=a,a=js(Fu,"onSelect"),0>=d,s-=d,Fe=1<<32-Te(e)+s|n<ct?(yt=tt,tt=null):yt=tt.sibling;var Tt=C(D,tt,M[ct],L);if(Tt===null){tt===null&&(tt=yt);break}t&&tt&&Tt.alternate===null&&e(D,tt),x=r(Tt,x,ct),bt===null?nt=Tt:bt.sibling=Tt,bt=Tt,tt=yt}if(ct===M.length)return n(D,tt),gt&&sn(D,ct),nt;if(tt===null){for(;ctct?(yt=tt,tt=null):yt=tt.sibling;var Kn=C(D,tt,Tt.value,L);if(Kn===null){tt===null&&(tt=yt);break}t&&tt&&Kn.alternate===null&&e(D,tt),x=r(Kn,x,ct),bt===null?nt=Kn:bt.sibling=Kn,bt=Kn,tt=yt}if(Tt.done)return n(D,tt),gt&&sn(D,ct),nt;if(tt===null){for(;!Tt.done;ct++,Tt=M.next())Tt=U(D,Tt.value,L),Tt!==null&&(x=r(Tt,x,ct),bt===null?nt=Tt:bt.sibling=Tt,bt=Tt);return gt&&sn(D,ct),nt}for(tt=a(tt);!Tt.done;ct++,Tt=M.next())Tt=R(tt,D,ct,Tt.value,L),Tt!==null&&(t&&Tt.alternate!==null&&tt.delete(Tt.key===null?ct:Tt.key),x=r(Tt,x,ct),bt===null?nt=Tt:bt.sibling=Tt,bt=Tt);return t&&tt.forEach(function(hS){return e(D,hS)}),gt&&sn(D,ct),nt}function Ct(D,x,M,L){if(typeof M=="object"&&M!==null&&M.type===H&&M.key===null&&(M=M.props.children),typeof M=="object"&&M!==null){switch(M.$$typeof){case V:t:{for(var nt=M.key;x!==null;){if(x.key===nt){if(nt=M.type,nt===H){if(x.tag===7){n(D,x.sibling),L=s(x,M.props.children),L.return=D,D=L;break t}}else if(x.elementType===nt||typeof nt=="object"&&nt!==null&&nt.$$typeof===P&&fi(nt)===x.type){n(D,x.sibling),L=s(x,M.props),Ua(L,M),L.return=D,D=L;break t}n(D,x);break}else e(D,x);x=x.sibling}M.type===H?(L=si(M.props.children,D.mode,L,M.key),L.return=D,D=L):(L=Wl(M.type,M.key,M.props,null,D.mode,L),Ua(L,M),L.return=D,D=L)}return d(D);case w:t:{for(nt=M.key;x!==null;){if(x.key===nt)if(x.tag===4&&x.stateNode.containerInfo===M.containerInfo&&x.stateNode.implementation===M.implementation){n(D,x.sibling),L=s(x,M.children||[]),L.return=D,D=L;break t}else{n(D,x);break}else e(D,x);x=x.sibling}L=io(M,D.mode,L),L.return=D,D=L}return d(D);case P:return M=fi(M),Ct(D,x,M,L)}if(fe(M))return I(D,x,M,L);if(Xt(M)){if(nt=Xt(M),typeof nt!="function")throw Error(o(150));return M=nt.call(M),it(D,x,M,L)}if(typeof M.then=="function")return Ct(D,x,ls(M),L);if(M.$$typeof===Y)return Ct(D,x,es(D,M),L);ss(D,M)}return typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint"?(M=""+M,x!==null&&x.tag===6?(n(D,x.sibling),L=s(x,M),L.return=D,D=L):(n(D,x),L=no(M,D.mode,L),L.return=D,D=L),d(D)):n(D,x)}return function(D,x,M,L){try{La=0;var nt=Ct(D,x,M,L);return Zi=null,nt}catch(tt){if(tt===Qi||tt===is)throw tt;var bt=Ee(29,tt,null,D.mode);return bt.lanes=L,bt.return=D,bt}finally{}}}var hi=Rd(!0),Nd=Rd(!1),wn=!1;function yo(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function go(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function Rn(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function Nn(t,e,n){var a=t.updateQueue;if(a===null)return null;if(a=a.shared,(xt&2)!==0){var s=a.pending;return s===null?e.next=e:(e.next=s.next,s.next=e),a.pending=e,e=Pl(t),pd(t,null,n),e}return Jl(t,a,e,n),Pl(t)}function Ba(t,e,n){if(e=e.updateQueue,e!==null&&(e=e.shared,(n&4194048)!==0)){var a=e.lanes;a&=t.pendingLanes,n|=a,e.lanes=n,Ef(t,n)}}function vo(t,e){var n=t.updateQueue,a=t.alternate;if(a!==null&&(a=a.updateQueue,n===a)){var s=null,r=null;if(n=n.firstBaseUpdate,n!==null){do{var d={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};r===null?s=r=d:r=r.next=d,n=n.next}while(n!==null);r===null?s=r=e:r=r.next=e}else s=r=e;n={baseState:a.baseState,firstBaseUpdate:s,lastBaseUpdate:r,shared:a.shared,callbacks:a.callbacks},t.updateQueue=n;return}t=n.lastBaseUpdate,t===null?n.firstBaseUpdate=e:t.next=e,n.lastBaseUpdate=e}var So=!1;function Ha(){if(So){var t=ki;if(t!==null)throw t}}function qa(t,e,n,a){So=!1;var s=t.updateQueue;wn=!1;var r=s.firstBaseUpdate,d=s.lastBaseUpdate,g=s.shared.pending;if(g!==null){s.shared.pending=null;var T=g,_=T.next;T.next=null,d===null?r=_:d.next=_,d=T;var O=t.alternate;O!==null&&(O=O.updateQueue,g=O.lastBaseUpdate,g!==d&&(g===null?O.firstBaseUpdate=_:g.next=_,O.lastBaseUpdate=T))}if(r!==null){var U=s.baseState;d=0,O=_=T=null,g=r;do{var C=g.lane&-536870913,R=C!==g.lane;if(R?(pt&C)===C:(a&C)===C){C!==0&&C===Xi&&(So=!0),O!==null&&(O=O.next={lane:0,tag:g.tag,payload:g.payload,callback:null,next:null});t:{var I=t,it=g;C=e;var Ct=n;switch(it.tag){case 1:if(I=it.payload,typeof I=="function"){U=I.call(Ct,U,C);break t}U=I;break t;case 3:I.flags=I.flags&-65537|128;case 0:if(I=it.payload,C=typeof I=="function"?I.call(Ct,U,C):I,C==null)break t;U=S({},U,C);break t;case 2:wn=!0}}C=g.callback,C!==null&&(t.flags|=64,R&&(t.flags|=8192),R=s.callbacks,R===null?s.callbacks=[C]:R.push(C))}else R={lane:C,tag:g.tag,payload:g.payload,callback:g.callback,next:null},O===null?(_=O=R,T=U):O=O.next=R,d|=C;if(g=g.next,g===null){if(g=s.shared.pending,g===null)break;R=g,g=R.next,R.next=null,s.lastBaseUpdate=R,s.shared.pending=null}}while(!0);O===null&&(T=U),s.baseState=T,s.firstBaseUpdate=_,s.lastBaseUpdate=O,r===null&&(s.shared.lanes=0),Un|=d,t.lanes=d,t.memoizedState=U}}function Od(t,e){if(typeof t!="function")throw Error(o(191,t));t.call(e)}function zd(t,e){var n=t.callbacks;if(n!==null)for(t.callbacks=null,t=0;tr?r:8;var d=z.T,g={};z.T=g,Bo(t,!1,e,n);try{var T=s(),_=z.S;if(_!==null&&_(g,T),T!==null&&typeof T=="object"&&typeof T.then=="function"){var O=n1(T,a);Xa(t,e,O,Ce(t))}else Xa(t,e,a,Ce(t))}catch(U){Xa(t,e,{then:function(){},status:"rejected",reason:U},Ce())}finally{G.p=r,d!==null&&g.types!==null&&(d.types=g.types),z.T=d}}function o1(){}function Lo(t,e,n,a){if(t.tag!==5)throw Error(o(476));var s=dh(t).queue;fh(t,s,e,$,n===null?o1:function(){return hh(t),n(a)})}function dh(t){var e=t.memoizedState;if(e!==null)return e;e={memoizedState:$,baseState:$,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:cn,lastRenderedState:$},next:null};var n={};return e.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:cn,lastRenderedState:n},next:null},t.memoizedState=e,t=t.alternate,t!==null&&(t.memoizedState=e),e}function hh(t){var e=dh(t);e.next===null&&(e=t.alternate.memoizedState),Xa(t,e.next.queue,{},Ce())}function Uo(){return ne(sl)}function mh(){return Yt().memoizedState}function ph(){return Yt().memoizedState}function r1(t){for(var e=t.return;e!==null;){switch(e.tag){case 24:case 3:var n=Ce();t=Rn(n);var a=Nn(e,t,n);a!==null&&(ve(a,e,n),Ba(a,e,n)),e={cache:fo()},t.payload=e;return}e=e.return}}function c1(t,e,n){var a=Ce();n={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},ys(t)?gh(e,n):(n=to(t,e,n,a),n!==null&&(ve(n,t,a),vh(n,e,a)))}function yh(t,e,n){var a=Ce();Xa(t,e,n,a)}function Xa(t,e,n,a){var s={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(ys(t))gh(e,s);else{var r=t.alternate;if(t.lanes===0&&(r===null||r.lanes===0)&&(r=e.lastRenderedReducer,r!==null))try{var d=e.lastRenderedState,g=r(d,n);if(s.hasEagerState=!0,s.eagerState=g,xe(g,d))return Jl(t,e,s,0),wt===null&&Fl(),!1}catch{}finally{}if(n=to(t,e,s,a),n!==null)return ve(n,t,a),vh(n,e,a),!0}return!1}function Bo(t,e,n,a){if(a={lane:2,revertLane:yr(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},ys(t)){if(e)throw Error(o(479))}else e=to(t,n,a,2),e!==null&&ve(e,t,2)}function ys(t){var e=t.alternate;return t===ot||e!==null&&e===ot}function gh(t,e){Ii=rs=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function vh(t,e,n){if((n&4194048)!==0){var a=e.lanes;a&=t.pendingLanes,n|=a,e.lanes=n,Ef(t,n)}}var ka={readContext:ne,use:ds,useCallback:Lt,useContext:Lt,useEffect:Lt,useImperativeHandle:Lt,useLayoutEffect:Lt,useInsertionEffect:Lt,useMemo:Lt,useReducer:Lt,useRef:Lt,useState:Lt,useDebugValue:Lt,useDeferredValue:Lt,useTransition:Lt,useSyncExternalStore:Lt,useId:Lt,useHostTransitionStatus:Lt,useFormState:Lt,useActionState:Lt,useOptimistic:Lt,useMemoCache:Lt,useCacheRefresh:Lt};ka.useEffectEvent=Lt;var Sh={readContext:ne,use:ds,useCallback:function(t,e){return oe().memoizedState=[t,e===void 0?null:e],t},useContext:ne,useEffect:nh,useImperativeHandle:function(t,e,n){n=n!=null?n.concat([t]):null,ms(4194308,4,sh.bind(null,e,t),n)},useLayoutEffect:function(t,e){return ms(4194308,4,t,e)},useInsertionEffect:function(t,e){ms(4,2,t,e)},useMemo:function(t,e){var n=oe();e=e===void 0?null:e;var a=t();if(mi){En(!0);try{t()}finally{En(!1)}}return n.memoizedState=[a,e],a},useReducer:function(t,e,n){var a=oe();if(n!==void 0){var s=n(e);if(mi){En(!0);try{n(e)}finally{En(!1)}}}else s=e;return a.memoizedState=a.baseState=s,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:s},a.queue=t,t=t.dispatch=c1.bind(null,ot,t),[a.memoizedState,t]},useRef:function(t){var e=oe();return t={current:t},e.memoizedState=t},useState:function(t){t=Ro(t);var e=t.queue,n=yh.bind(null,ot,e);return e.dispatch=n,[t.memoizedState,n]},useDebugValue:zo,useDeferredValue:function(t,e){var n=oe();return jo(n,t,e)},useTransition:function(){var t=Ro(!1);return t=fh.bind(null,ot,t.queue,!0,!1),oe().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,e,n){var a=ot,s=oe();if(gt){if(n===void 0)throw Error(o(407));n=n()}else{if(n=e(),wt===null)throw Error(o(349));(pt&127)!==0||qd(a,e,n)}s.memoizedState=n;var r={value:n,getSnapshot:e};return s.queue=r,nh(Yd.bind(null,a,r,t),[t]),a.flags|=2048,Ji(9,{destroy:void 0},Gd.bind(null,a,r,n,e),null),n},useId:function(){var t=oe(),e=wt.identifierPrefix;if(gt){var n=Je,a=Fe;n=(a&~(1<<32-Te(a)-1)).toString(32)+n,e="_"+e+"R_"+n,n=cs++,0<\/script>",r=r.removeChild(r.firstChild);break;case"select":r=typeof a.is=="string"?d.createElement("select",{is:a.is}):d.createElement("select"),a.multiple?r.multiple=!0:a.size&&(r.size=a.size);break;default:r=typeof a.is=="string"?d.createElement(s,{is:a.is}):d.createElement(s)}}r[te]=e,r[de]=a;t:for(d=e.child;d!==null;){if(d.tag===5||d.tag===6)r.appendChild(d.stateNode);else if(d.tag!==4&&d.tag!==27&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break t;for(;d.sibling===null;){if(d.return===null||d.return===e)break t;d=d.return}d.sibling.return=d.return,d=d.sibling}e.stateNode=r;t:switch(ae(r,s,a),s){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break t;case"img":a=!0;break t;default:a=!1}a&&dn(e)}}return Ot(e),Wo(e,e.type,t===null?null:t.memoizedProps,e.pendingProps,n),null;case 6:if(t&&e.stateNode!=null)t.memoizedProps!==a&&dn(e);else{if(typeof a!="string"&&e.stateNode===null)throw Error(o(166));if(t=ft.current,Gi(e)){if(t=e.stateNode,n=e.memoizedProps,a=null,s=ee,s!==null)switch(s.tag){case 27:case 5:a=s.memoizedProps}t[te]=e,t=!!(t.nodeValue===n||a!==null&&a.suppressHydrationWarning===!0||Bm(t.nodeValue,n)),t||Cn(e,!0)}else t=Ls(t).createTextNode(a),t[te]=e,e.stateNode=t}return Ot(e),null;case 31:if(n=e.memoizedState,t===null||t.memoizedState!==null){if(a=Gi(e),n!==null){if(t===null){if(!a)throw Error(o(318));if(t=e.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(o(557));t[te]=e}else ui(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;Ot(e),t=!1}else n=uo(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=n),t=!0;if(!t)return e.flags&256?(De(e),e):(De(e),null);if((e.flags&128)!==0)throw Error(o(558))}return Ot(e),null;case 13:if(a=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(s=Gi(e),a!==null&&a.dehydrated!==null){if(t===null){if(!s)throw Error(o(318));if(s=e.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(o(317));s[te]=e}else ui(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;Ot(e),s=!1}else s=uo(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=s),s=!0;if(!s)return e.flags&256?(De(e),e):(De(e),null)}return De(e),(e.flags&128)!==0?(e.lanes=n,e):(n=a!==null,t=t!==null&&t.memoizedState!==null,n&&(a=e.child,s=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(s=a.alternate.memoizedState.cachePool.pool),r=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(r=a.memoizedState.cachePool.pool),r!==s&&(a.flags|=2048)),n!==t&&n&&(e.child.flags|=8192),Ts(e,e.updateQueue),Ot(e),null);case 4:return qt(),t===null&&br(e.stateNode.containerInfo),Ot(e),null;case 10:return on(e.type),Ot(e),null;case 19:if(B(Gt),a=e.memoizedState,a===null)return Ot(e),null;if(s=(e.flags&128)!==0,r=a.rendering,r===null)if(s)Za(a,!1);else{if(Ut!==0||t!==null&&(t.flags&128)!==0)for(t=e.child;t!==null;){if(r=os(t),r!==null){for(e.flags|=128,Za(a,!1),t=r.updateQueue,e.updateQueue=t,Ts(e,t),e.subtreeFlags=0,t=n,n=e.child;n!==null;)yd(n,t),n=n.sibling;return k(Gt,Gt.current&1|2),gt&&sn(e,a.treeForkCount),e.child}t=t.sibling}a.tail!==null&&Se()>Ms&&(e.flags|=128,s=!0,Za(a,!1),e.lanes=4194304)}else{if(!s)if(t=os(r),t!==null){if(e.flags|=128,s=!0,t=t.updateQueue,e.updateQueue=t,Ts(e,t),Za(a,!0),a.tail===null&&a.tailMode==="hidden"&&!r.alternate&&!gt)return Ot(e),null}else 2*Se()-a.renderingStartTime>Ms&&n!==536870912&&(e.flags|=128,s=!0,Za(a,!1),e.lanes=4194304);a.isBackwards?(r.sibling=e.child,e.child=r):(t=a.last,t!==null?t.sibling=r:e.child=r,a.last=r)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=Se(),t.sibling=null,n=Gt.current,k(Gt,s?n&1|2:n&1),gt&&sn(e,a.treeForkCount),t):(Ot(e),null);case 22:case 23:return De(e),To(),a=e.memoizedState!==null,t!==null?t.memoizedState!==null!==a&&(e.flags|=8192):a&&(e.flags|=8192),a?(n&536870912)!==0&&(e.flags&128)===0&&(Ot(e),e.subtreeFlags&6&&(e.flags|=8192)):Ot(e),n=e.updateQueue,n!==null&&Ts(e,n.retryQueue),n=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),a=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),a!==n&&(e.flags|=2048),t!==null&&B(ci),null;case 24:return n=null,t!==null&&(n=t.memoizedState.cache),e.memoizedState.cache!==n&&(e.flags|=2048),on(kt),Ot(e),null;case 25:return null;case 30:return null}throw Error(o(156,e.tag))}function p1(t,e){switch(lo(e),e.tag){case 1:return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return on(kt),qt(),t=e.flags,(t&65536)!==0&&(t&128)===0?(e.flags=t&-65537|128,e):null;case 26:case 27:case 5:return Nl(e),null;case 31:if(e.memoizedState!==null){if(De(e),e.alternate===null)throw Error(o(340));ui()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 13:if(De(e),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(o(340));ui()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return B(Gt),null;case 4:return qt(),null;case 10:return on(e.type),null;case 22:case 23:return De(e),To(),t!==null&&B(ci),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 24:return on(kt),null;case 25:return null;default:return null}}function Xh(t,e){switch(lo(e),e.tag){case 3:on(kt),qt();break;case 26:case 27:case 5:Nl(e);break;case 4:qt();break;case 31:e.memoizedState!==null&&De(e);break;case 13:De(e);break;case 19:B(Gt);break;case 10:on(e.type);break;case 22:case 23:De(e),To(),t!==null&&B(ci);break;case 24:on(kt)}}function Ka(t,e){try{var n=e.updateQueue,a=n!==null?n.lastEffect:null;if(a!==null){var s=a.next;n=s;do{if((n.tag&t)===t){a=void 0;var r=n.create,d=n.inst;a=r(),d.destroy=a}n=n.next}while(n!==s)}}catch(g){Dt(e,e.return,g)}}function jn(t,e,n){try{var a=e.updateQueue,s=a!==null?a.lastEffect:null;if(s!==null){var r=s.next;a=r;do{if((a.tag&t)===t){var d=a.inst,g=d.destroy;if(g!==void 0){d.destroy=void 0,s=e;var T=n,_=g;try{_()}catch(O){Dt(s,T,O)}}}a=a.next}while(a!==r)}}catch(O){Dt(e,e.return,O)}}function kh(t){var e=t.updateQueue;if(e!==null){var n=t.stateNode;try{zd(e,n)}catch(a){Dt(t,t.return,a)}}}function Qh(t,e,n){n.props=pi(t.type,t.memoizedProps),n.state=t.memoizedState;try{n.componentWillUnmount()}catch(a){Dt(t,e,a)}}function Ia(t,e){try{var n=t.ref;if(n!==null){switch(t.tag){case 26:case 27:case 5:var a=t.stateNode;break;case 30:a=t.stateNode;break;default:a=t.stateNode}typeof n=="function"?t.refCleanup=n(a):n.current=a}}catch(s){Dt(t,e,s)}}function Pe(t,e){var n=t.ref,a=t.refCleanup;if(n!==null)if(typeof a=="function")try{a()}catch(s){Dt(t,e,s)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(s){Dt(t,e,s)}else n.current=null}function Zh(t){var e=t.type,n=t.memoizedProps,a=t.stateNode;try{t:switch(e){case"button":case"input":case"select":case"textarea":n.autoFocus&&a.focus();break t;case"img":n.src?a.src=n.src:n.srcSet&&(a.srcset=n.srcSet)}}catch(s){Dt(t,t.return,s)}}function $o(t,e,n){try{var a=t.stateNode;U1(a,t.type,n,e),a[de]=e}catch(s){Dt(t,t.return,s)}}function Kh(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&Yn(t.type)||t.tag===4}function tr(t){t:for(;;){for(;t.sibling===null;){if(t.return===null||Kh(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&Yn(t.type)||t.flags&2||t.child===null||t.tag===4)continue t;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function er(t,e,n){var a=t.tag;if(a===5||a===6)t=t.stateNode,e?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(t,e):(e=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,e.appendChild(t),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=nn));else if(a!==4&&(a===27&&Yn(t.type)&&(n=t.stateNode,e=null),t=t.child,t!==null))for(er(t,e,n),t=t.sibling;t!==null;)er(t,e,n),t=t.sibling}function xs(t,e,n){var a=t.tag;if(a===5||a===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(a!==4&&(a===27&&Yn(t.type)&&(n=t.stateNode),t=t.child,t!==null))for(xs(t,e,n),t=t.sibling;t!==null;)xs(t,e,n),t=t.sibling}function Ih(t){var e=t.stateNode,n=t.memoizedProps;try{for(var a=t.type,s=e.attributes;s.length;)e.removeAttributeNode(s[0]);ae(e,a,n),e[te]=t,e[de]=n}catch(r){Dt(t,t.return,r)}}var hn=!1,Kt=!1,nr=!1,Fh=typeof WeakSet=="function"?WeakSet:Set,Wt=null;function y1(t,e){if(t=t.containerInfo,Er=Xs,t=ud(t),Iu(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else t:{n=(n=t.ownerDocument)&&n.defaultView||window;var a=n.getSelection&&n.getSelection();if(a&&a.rangeCount!==0){n=a.anchorNode;var s=a.anchorOffset,r=a.focusNode;a=a.focusOffset;try{n.nodeType,r.nodeType}catch{n=null;break t}var d=0,g=-1,T=-1,_=0,O=0,U=t,C=null;e:for(;;){for(var R;U!==n||s!==0&&U.nodeType!==3||(g=d+s),U!==r||a!==0&&U.nodeType!==3||(T=d+a),U.nodeType===3&&(d+=U.nodeValue.length),(R=U.firstChild)!==null;)C=U,U=R;for(;;){if(U===t)break e;if(C===n&&++_===s&&(g=d),C===r&&++O===a&&(T=d),(R=U.nextSibling)!==null)break;U=C,C=U.parentNode}U=R}n=g===-1||T===-1?null:{start:g,end:T}}else n=null}n=n||{start:0,end:0}}else n=null;for(Ar={focusedElem:t,selectionRange:n},Xs=!1,Wt=e;Wt!==null;)if(e=Wt,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,Wt=t;else for(;Wt!==null;){switch(e=Wt,r=e.alternate,t=e.flags,e.tag){case 0:if((t&4)!==0&&(t=e.updateQueue,t=t!==null?t.events:null,t!==null))for(n=0;n title"))),ae(r,a,n),r[te]=t,Pt(r),a=r;break t;case"link":var d=ep("link","href",s).get(a+(n.href||""));if(d){for(var g=0;gCt&&(d=Ct,Ct=it,it=d);var D=ld(g,it),x=ld(g,Ct);if(D&&x&&(R.rangeCount!==1||R.anchorNode!==D.node||R.anchorOffset!==D.offset||R.focusNode!==x.node||R.focusOffset!==x.offset)){var M=U.createRange();M.setStart(D.node,D.offset),R.removeAllRanges(),it>Ct?(R.addRange(M),R.extend(x.node,x.offset)):(M.setEnd(x.node,x.offset),R.addRange(M))}}}}for(U=[],R=g;R=R.parentNode;)R.nodeType===1&&U.push({element:R,left:R.scrollLeft,top:R.scrollTop});for(typeof g.focus=="function"&&g.focus(),g=0;gn?32:n,z.T=null,n=rr,rr=null;var r=Hn,d=vn;if(Ft=0,ea=Hn=null,vn=0,(xt&6)!==0)throw Error(o(331));var g=xt;if(xt|=4,sm(r.current),im(r,r.current,d,n),xt=g,tl(0,!1),be&&typeof be.onPostCommitFiberRoot=="function")try{be.onPostCommitFiberRoot(va,r)}catch{}return!0}finally{G.p=s,z.T=a,Am(t,e)}}function Mm(t,e,n){e=Oe(n,e),e=Yo(t.stateNode,e,2),t=Nn(t,e,2),t!==null&&(ba(t,2),We(t))}function Dt(t,e,n){if(t.tag===3)Mm(t,t,n);else for(;e!==null;){if(e.tag===3){Mm(e,t,n);break}else if(e.tag===1){var a=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(Bn===null||!Bn.has(a))){t=Oe(n,t),n=_h(2),a=Nn(e,n,2),a!==null&&(Ch(n,a,e,t),ba(a,2),We(a));break}}e=e.return}}function hr(t,e,n){var a=t.pingCache;if(a===null){a=t.pingCache=new S1;var s=new Set;a.set(e,s)}else s=a.get(e),s===void 0&&(s=new Set,a.set(e,s));s.has(n)||(lr=!0,s.add(n),t=A1.bind(null,t,e,n),e.then(t,t))}function A1(t,e,n){var a=t.pingCache;a!==null&&a.delete(e),t.pingedLanes|=t.suspendedLanes&n,t.warmLanes&=~n,wt===t&&(pt&n)===n&&(Ut===4||Ut===3&&(pt&62914560)===pt&&300>Se()-Ds?(xt&2)===0&&na(t,0):sr|=n,ta===pt&&(ta=0)),We(t)}function _m(t,e){e===0&&(e=Tf()),t=li(t,e),t!==null&&(ba(t,e),We(t))}function D1(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),_m(t,n)}function M1(t,e){var n=0;switch(t.tag){case 31:case 13:var a=t.stateNode,s=t.memoizedState;s!==null&&(n=s.retryLane);break;case 19:a=t.stateNode;break;case 22:a=t.stateNode._retryCache;break;default:throw Error(o(314))}a!==null&&a.delete(e),_m(t,n)}function _1(t,e){return Du(t,e)}var Ns=null,aa=null,mr=!1,Os=!1,pr=!1,Gn=0;function We(t){t!==aa&&t.next===null&&(aa===null?Ns=aa=t:aa=aa.next=t),Os=!0,mr||(mr=!0,V1())}function tl(t,e){if(!pr&&Os){pr=!0;do for(var n=!1,a=Ns;a!==null;){if(t!==0){var s=a.pendingLanes;if(s===0)var r=0;else{var d=a.suspendedLanes,g=a.pingedLanes;r=(1<<31-Te(42|t)+1)-1,r&=s&~(d&~g),r=r&201326741?r&201326741|1:r?r|2:0}r!==0&&(n=!0,Rm(a,r))}else r=pt,r=Ul(a,a===wt?r:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(r&3)===0||Sa(a,r)||(n=!0,Rm(a,r));a=a.next}while(n);pr=!1}}function C1(){Cm()}function Cm(){Os=mr=!1;var t=0;Gn!==0&&H1()&&(t=Gn);for(var e=Se(),n=null,a=Ns;a!==null;){var s=a.next,r=Vm(a,e);r===0?(a.next=null,n===null?Ns=s:n.next=s,s===null&&(aa=n)):(n=a,(t!==0||(r&3)!==0)&&(Os=!0)),a=s}Ft!==0&&Ft!==5||tl(t),Gn!==0&&(Gn=0)}function Vm(t,e){for(var n=t.suspendedLanes,a=t.pingedLanes,s=t.expirationTimes,r=t.pendingLanes&-62914561;0g)break;var O=T.transferSize,U=T.initiatorType;O&&Hm(U)&&(T=T.responseEnd,d+=O*(T"u"?null:document;function Pm(t,e,n){var a=la;if(a&&typeof e=="string"&&e){var s=Re(e);s='link[rel="'+t+'"][href="'+s+'"]',typeof n=="string"&&(s+='[crossorigin="'+n+'"]'),Jm.has(s)||(Jm.add(s),t={rel:t,crossOrigin:n,href:e},a.querySelector(s)===null&&(e=a.createElement("link"),ae(e,"link",t),Pt(e),a.head.appendChild(e)))}}function I1(t){Sn.D(t),Pm("dns-prefetch",t,null)}function F1(t,e){Sn.C(t,e),Pm("preconnect",t,e)}function J1(t,e,n){Sn.L(t,e,n);var a=la;if(a&&t&&e){var s='link[rel="preload"][as="'+Re(e)+'"]';e==="image"&&n&&n.imageSrcSet?(s+='[imagesrcset="'+Re(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(s+='[imagesizes="'+Re(n.imageSizes)+'"]')):s+='[href="'+Re(t)+'"]';var r=s;switch(e){case"style":r=sa(t);break;case"script":r=ua(t)}He.has(r)||(t=S({rel:"preload",href:e==="image"&&n&&n.imageSrcSet?void 0:t,as:e},n),He.set(r,t),a.querySelector(s)!==null||e==="style"&&a.querySelector(al(r))||e==="script"&&a.querySelector(ll(r))||(e=a.createElement("link"),ae(e,"link",t),Pt(e),a.head.appendChild(e)))}}function P1(t,e){Sn.m(t,e);var n=la;if(n&&t){var a=e&&typeof e.as=="string"?e.as:"script",s='link[rel="modulepreload"][as="'+Re(a)+'"][href="'+Re(t)+'"]',r=s;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":r=ua(t)}if(!He.has(r)&&(t=S({rel:"modulepreload",href:t},e),He.set(r,t),n.querySelector(s)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(ll(r)))return}a=n.createElement("link"),ae(a,"link",t),Pt(a),n.head.appendChild(a)}}}function W1(t,e,n){Sn.S(t,e,n);var a=la;if(a&&t){var s=Ci(a).hoistableStyles,r=sa(t);e=e||"default";var d=s.get(r);if(!d){var g={loading:0,preload:null};if(d=a.querySelector(al(r)))g.loading=5;else{t=S({rel:"stylesheet",href:t,"data-precedence":e},n),(n=He.get(r))&&Rr(t,n);var T=d=a.createElement("link");Pt(T),ae(T,"link",t),T._p=new Promise(function(_,O){T.onload=_,T.onerror=O}),T.addEventListener("load",function(){g.loading|=1}),T.addEventListener("error",function(){g.loading|=2}),g.loading|=4,Bs(d,e,a)}d={type:"stylesheet",instance:d,count:1,state:g},s.set(r,d)}}}function $1(t,e){Sn.X(t,e);var n=la;if(n&&t){var a=Ci(n).hoistableScripts,s=ua(t),r=a.get(s);r||(r=n.querySelector(ll(s)),r||(t=S({src:t,async:!0},e),(e=He.get(s))&&Nr(t,e),r=n.createElement("script"),Pt(r),ae(r,"link",t),n.head.appendChild(r)),r={type:"script",instance:r,count:1,state:null},a.set(s,r))}}function tS(t,e){Sn.M(t,e);var n=la;if(n&&t){var a=Ci(n).hoistableScripts,s=ua(t),r=a.get(s);r||(r=n.querySelector(ll(s)),r||(t=S({src:t,async:!0,type:"module"},e),(e=He.get(s))&&Nr(t,e),r=n.createElement("script"),Pt(r),ae(r,"link",t),n.head.appendChild(r)),r={type:"script",instance:r,count:1,state:null},a.set(s,r))}}function Wm(t,e,n,a){var s=(s=ft.current)?Us(s):null;if(!s)throw Error(o(446));switch(t){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(e=sa(n.href),n=Ci(s).hoistableStyles,a=n.get(e),a||(a={type:"style",instance:null,count:0,state:null},n.set(e,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){t=sa(n.href);var r=Ci(s).hoistableStyles,d=r.get(t);if(d||(s=s.ownerDocument||s,d={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},r.set(t,d),(r=s.querySelector(al(t)))&&!r._p&&(d.instance=r,d.state.loading=5),He.has(t)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},He.set(t,n),r||eS(s,t,n,d.state))),e&&a===null)throw Error(o(528,""));return d}if(e&&a!==null)throw Error(o(529,""));return null;case"script":return e=n.async,n=n.src,typeof n=="string"&&e&&typeof e!="function"&&typeof e!="symbol"?(e=ua(n),n=Ci(s).hoistableScripts,a=n.get(e),a||(a={type:"script",instance:null,count:0,state:null},n.set(e,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,t))}}function sa(t){return'href="'+Re(t)+'"'}function al(t){return'link[rel="stylesheet"]['+t+"]"}function $m(t){return S({},t,{"data-precedence":t.precedence,precedence:null})}function eS(t,e,n,a){t.querySelector('link[rel="preload"][as="style"]['+e+"]")?a.loading=1:(e=t.createElement("link"),a.preload=e,e.addEventListener("load",function(){return a.loading|=1}),e.addEventListener("error",function(){return a.loading|=2}),ae(e,"link",n),Pt(e),t.head.appendChild(e))}function ua(t){return'[src="'+Re(t)+'"]'}function ll(t){return"script[async]"+t}function tp(t,e,n){if(e.count++,e.instance===null)switch(e.type){case"style":var a=t.querySelector('style[data-href~="'+Re(n.href)+'"]');if(a)return e.instance=a,Pt(a),a;var s=S({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return a=(t.ownerDocument||t).createElement("style"),Pt(a),ae(a,"style",s),Bs(a,n.precedence,t),e.instance=a;case"stylesheet":s=sa(n.href);var r=t.querySelector(al(s));if(r)return e.state.loading|=4,e.instance=r,Pt(r),r;a=$m(n),(s=He.get(s))&&Rr(a,s),r=(t.ownerDocument||t).createElement("link"),Pt(r);var d=r;return d._p=new Promise(function(g,T){d.onload=g,d.onerror=T}),ae(r,"link",a),e.state.loading|=4,Bs(r,n.precedence,t),e.instance=r;case"script":return r=ua(n.src),(s=t.querySelector(ll(r)))?(e.instance=s,Pt(s),s):(a=n,(s=He.get(r))&&(a=S({},n),Nr(a,s)),t=t.ownerDocument||t,s=t.createElement("script"),Pt(s),ae(s,"link",a),t.head.appendChild(s),e.instance=s);case"void":return null;default:throw Error(o(443,e.type))}else e.type==="stylesheet"&&(e.state.loading&4)===0&&(a=e.instance,e.state.loading|=4,Bs(a,n.precedence,t));return e.instance}function Bs(t,e,n){for(var a=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),s=a.length?a[a.length-1]:null,r=s,d=0;d title"):null)}function nS(t,e,n){if(n===1||e.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof e.precedence!="string"||typeof e.href!="string"||e.href==="")break;return!0;case"link":if(typeof e.rel!="string"||typeof e.href!="string"||e.href===""||e.onLoad||e.onError)break;switch(e.rel){case"stylesheet":return t=e.disabled,typeof e.precedence=="string"&&t==null;default:return!0}case"script":if(e.async&&typeof e.async!="function"&&typeof e.async!="symbol"&&!e.onLoad&&!e.onError&&e.src&&typeof e.src=="string")return!0}return!1}function ip(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function iS(t,e,n,a){if(n.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var s=sa(a.href),r=e.querySelector(al(s));if(r){e=r._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(t.count++,t=qs.bind(t),e.then(t,t)),n.state.loading|=4,n.instance=r,Pt(r);return}r=e.ownerDocument||e,a=$m(a),(s=He.get(s))&&Rr(a,s),r=r.createElement("link"),Pt(r);var d=r;d._p=new Promise(function(g,T){d.onload=g,d.onerror=T}),ae(r,"link",a),n.instance=r}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(n,e),(e=n.state.preload)&&(n.state.loading&3)===0&&(t.count++,n=qs.bind(t),e.addEventListener("load",n),e.addEventListener("error",n))}}var Or=0;function aS(t,e){return t.stylesheets&&t.count===0&&Ys(t,t.stylesheets),0Or?50:800)+e);return t.unsuspend=n,function(){t.unsuspend=null,clearTimeout(a),clearTimeout(s)}}:null}function qs(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Ys(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var Gs=null;function Ys(t,e){t.stylesheets=null,t.unsuspend!==null&&(t.count++,Gs=new Map,e.forEach(lS,t),Gs=null,qs.call(t))}function lS(t,e){if(!(e.state.loading&4)){var n=Gs.get(t);if(n)var a=n.get(null);else{n=new Map,Gs.set(t,n);for(var s=t.querySelectorAll("link[data-precedence],style[data-precedence]"),r=0;r"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(l){console.error(l)}}return i(),Yr.exports=xS(),Yr.exports}var AS=ES();const DS=Py(AS),MS="modulepreload",_S=function(i){return"/Math-Biotech-Project/site/"+i},_p={},St=function(l,u,o){let c=Promise.resolve();if(u&&u.length>0){let f=function(p){return Promise.all(p.map(v=>Promise.resolve(v).then(S=>({status:"fulfilled",value:S}),S=>({status:"rejected",reason:S}))))};document.getElementsByTagName("link");const m=document.querySelector("meta[property=csp-nonce]"),y=(m==null?void 0:m.nonce)||(m==null?void 0:m.getAttribute("nonce"));c=f(u.map(p=>{if(p=_S(p),p in _p)return;_p[p]=!0;const v=p.endsWith(".css"),S=v?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${p}"]${S}`))return;const b=document.createElement("link");if(b.rel=v?"stylesheet":MS,v||(b.as="script"),b.crossOrigin="",b.href=p,y&&b.setAttribute("nonce",y),document.head.appendChild(b),v)return new Promise((V,w)=>{b.addEventListener("load",V),b.addEventListener("error",()=>w(new Error(`Unable to preload CSS for ${p}`)))})}))}function h(f){const m=new Event("vite:preloadError",{cancelable:!0});if(m.payload=f,window.dispatchEvent(m),!m.defaultPrevented)throw f}return c.then(f=>{for(const m of f||[])m.status==="rejected"&&h(m.reason);return l().catch(h)})};var J=(i=>(i.HOME="HOME",i.MATRIX="MATRIX",i.SEQUENCES="SEQUENCES",i.FUNCTIONS="FUNCTIONS",i.LIMITS="LIMITS",i.DERIVATIVES="DERIVATIVES",i.INTEGRALS="INTEGRALS",i.DIFF_EQ="DIFF_EQ",i.EXAMS="EXAMS",i))(J||{}),N=(i=>(i.BASICS="BASICS",i.OPERATIONS="OPERATIONS",i.DETERMINANT="DETERMINANT",i.INVERSE="INVERSE",i.SYSTEMS="SYSTEMS",i.GAUSSIAN="GAUSSIAN",i.EIGENVALUES="EIGENVALUES",i.VECTOR_3D="VECTOR_3D",i.VECTOR_OPS_3D="VECTOR_OPS_3D",i.SEQUENCES="SEQUENCES",i.SERIES="SERIES",i.COBWEB="COBWEB",i.SEQUENCES_3D="SEQUENCES_3D",i.FUNCTIONS="FUNCTIONS",i.TRANSFORMATIONS="TRANSFORMATIONS",i.NEWTON="NEWTON",i.FUNCTIONS_3D="FUNCTIONS_3D",i.LIMITS="LIMITS",i.CONTINUITY="CONTINUITY",i.LIMITS_3D="LIMITS_3D",i.DERIVATIVE_RULES="DERIVATIVE_RULES",i.FUNCTION_ANALYSIS="FUNCTION_ANALYSIS",i.TAYLOR="TAYLOR",i.DERIVATIVES_3D="DERIVATIVES_3D",i.INTEGRAL_BASICS="INTEGRAL_BASICS",i.INTEGRAL_RULES="INTEGRAL_RULES",i.AREA_UNDER_CURVE="AREA_UNDER_CURVE",i.INTEGRALS_3D="INTEGRALS_3D",i.DIFF_BASICS="DIFF_BASICS",i.POPULATION_MODELS="POPULATION_MODELS",i.RADIOACTIVE_DECAY="RADIOACTIVE_DECAY",i.DIFF_EQ_3D="DIFF_EQ_3D",i.CLASS_EXAM_1="CLASS_EXAM_1",i.CLASS_EXAM_2="CLASS_EXAM_2",i.CLASS_EXAM_3="CLASS_EXAM_3",i.FULL_EXAM="FULL_EXAM",i.EXAM_ANALYSIS="EXAM_ANALYSIS",i.CHEAT_SHEET="CHEAT_SHEET",i.HOMEWORK="HOMEWORK",i.FINAL_EXAM="FINAL_EXAM",i.AI_CHAT="AI_CHAT",i))(N||{}),CS=(i=>(i.ADD="ADD",i.SUBTRACT="SUBTRACT",i.MULTIPLY="MULTIPLY",i.SCALAR="SCALAR",i))(CS||{});/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const VS=i=>i.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),wS=i=>i.replace(/^([A-Z])|[\s-_]+(\w)/g,(l,u,o)=>o?o.toUpperCase():u.toLowerCase()),Cp=i=>{const l=wS(i);return l.charAt(0).toUpperCase()+l.slice(1)},Wy=(...i)=>i.filter((l,u,o)=>!!l&&l.trim()!==""&&o.indexOf(l)===u).join(" ").trim(),RS=i=>{for(const l in i)if(l.startsWith("aria-")||l==="role"||l==="title")return!0};/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */var NS={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const OS=j.forwardRef(({color:i="currentColor",size:l=24,strokeWidth:u=2,absoluteStrokeWidth:o,className:c="",children:h,iconNode:f,...m},y)=>j.createElement("svg",{ref:y,...NS,width:l,height:l,stroke:i,strokeWidth:o?Number(u)*24/Number(l):u,className:Wy("lucide",c),...!h&&!RS(m)&&{"aria-hidden":"true"},...m},[...f.map(([p,v])=>j.createElement(p,v)),...Array.isArray(h)?h:[h]]));/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const rt=(i,l)=>{const u=j.forwardRef(({className:o,...c},h)=>j.createElement(OS,{ref:h,iconNode:l,className:Wy(`lucide-${VS(Cp(i))}`,`lucide-${i}`,o),...c}));return u.displayName=Cp(i),u};/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const zS=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],$y=rt("activity",zS);/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const jS=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],LS=rt("arrow-left",jS);/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const US=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],t0=rt("arrow-right",US);/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const BS=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],HS=rt("arrow-up-right",BS);/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const qS=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["path",{d:"M20.2 20.2c2.04-2.03.02-7.36-4.5-11.9-4.54-4.52-9.87-6.54-11.9-4.5-2.04 2.03-.02 7.36 4.5 11.9 4.54 4.52 9.87 6.54 11.9 4.5Z",key:"1l2ple"}],["path",{d:"M15.7 15.7c4.52-4.54 6.54-9.87 4.5-11.9-2.03-2.04-7.36-.02-11.9 4.5-4.52 4.54-6.54 9.87-4.5 11.9 2.03 2.04 7.36.02 11.9-4.5Z",key:"1wam0m"}]],GS=rt("atom",qS);/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const YS=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],XS=rt("book-open",YS);/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const kS=[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]],dl=rt("box",kS);/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const QS=[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",key:"1nb95v"}],["line",{x1:"8",x2:"16",y1:"6",y2:"6",key:"x4nwl0"}],["line",{x1:"16",x2:"16",y1:"14",y2:"18",key:"wjye3r"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M8 18h.01",key:"lrp35t"}]],ZS=rt("calculator",QS);/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const KS=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M7 11.207a.5.5 0 0 1 .146-.353l2-2a.5.5 0 0 1 .708 0l3.292 3.292a.5.5 0 0 0 .708 0l4.292-4.292a.5.5 0 0 1 .854.353V16a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1z",key:"q0gr47"}]],e0=rt("chart-area",KS);/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const IS=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"m19 9-5 5-4-4-3 3",key:"2osh9i"}]],FS=rt("chart-line",IS);/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const JS=[["path",{d:"M21 12c.552 0 1.005-.449.95-.998a10 10 0 0 0-8.953-8.951c-.55-.055-.998.398-.998.95v8a1 1 0 0 0 1 1z",key:"pzmjnu"}],["path",{d:"M21.21 15.89A10 10 0 1 1 8 2.83",key:"k2fpak"}]],PS=rt("chart-pie",JS);/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const WS=[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]],$S=rt("command",WS);/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const tb=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5v14a9 3 0 0 0 18 0V5",key:"aqi0yr"}]],eb=rt("cylinder",tb);/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const nb=[["circle",{cx:"12",cy:"6",r:"1",key:"1bh7o1"}],["line",{x1:"5",x2:"19",y1:"12",y2:"12",key:"13b5wn"}],["circle",{cx:"12",cy:"18",r:"1",key:"lqb9t5"}]],n0=rt("divide",nb);/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ib=[["path",{d:"m10 16 1.5 1.5",key:"11lckj"}],["path",{d:"m14 8-1.5-1.5",key:"1ohn8i"}],["path",{d:"M15 2c-1.798 1.998-2.518 3.995-2.807 5.993",key:"80uv8i"}],["path",{d:"m16.5 10.5 1 1",key:"696xn5"}],["path",{d:"m17 6-2.891-2.891",key:"xu6p2f"}],["path",{d:"M2 15c6.667-6 13.333 0 20-6",key:"1pyr53"}],["path",{d:"m20 9 .891.891",key:"3xwk7g"}],["path",{d:"M3.109 14.109 4 15",key:"q76aoh"}],["path",{d:"m6.5 12.5 1 1",key:"cs35ky"}],["path",{d:"m7 18 2.891 2.891",key:"1sisit"}],["path",{d:"M9 22c1.798-1.998 2.518-3.995 2.807-5.993",key:"q3hbxp"}]],dc=rt("dna",ib);/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ab=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],Js=rt("file-text",ab);/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const lb=[["circle",{cx:"5",cy:"6",r:"3",key:"1qnov2"}],["path",{d:"M5 9v6",key:"158jrl"}],["circle",{cx:"5",cy:"18",r:"3",key:"104gr9"}],["path",{d:"M12 3v18",key:"108xh3"}],["circle",{cx:"19",cy:"6",r:"3",key:"108a5v"}],["path",{d:"M16 15.7A9 9 0 0 0 19 9",key:"1e3vqb"}]],sb=rt("git-graph",lb);/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ub=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],ob=rt("globe",ub);/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const rb=[["path",{d:"M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z",key:"j76jl0"}],["path",{d:"M22 10v6",key:"1lu8f3"}],["path",{d:"M6 12.5V16a6 3 0 0 0 12 0v-3.5",key:"1r8lef"}]],hc=rt("graduation-cap",rb);/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const cb=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]],i0=rt("grid-3x3",cb);/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const fb=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],db=rt("history",fb);/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const hb=[["path",{d:"M6 16c5 0 7-8 12-8a4 4 0 0 1 0 8c-5 0-7-8-12-8a4 4 0 1 0 0 8",key:"18ogeb"}]],a0=rt("infinity",hb);/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const mb=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],mc=rt("layers",mb);/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const pb=[["path",{d:"m16 6 4 14",key:"ji33uf"}],["path",{d:"M12 6v14",key:"1n7gus"}],["path",{d:"M8 8v12",key:"1gg7y9"}],["path",{d:"M4 4v16",key:"6qkkli"}]],yb=rt("library",pb);/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const gb=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],vb=rt("loader-circle",gb);/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Sb=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],bb=rt("lock",Sb);/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Tb=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],xb=rt("menu",Tb);/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Eb=[["path",{d:"M6 18h8",key:"1borvv"}],["path",{d:"M3 22h18",key:"8prr45"}],["path",{d:"M14 22a7 7 0 1 0 0-14h-1",key:"1jwaiy"}],["path",{d:"M9 14h2",key:"197e7h"}],["path",{d:"M9 12a2 2 0 0 1-2-2V6h6v4a2 2 0 0 1-2 2Z",key:"1bmzmy"}],["path",{d:"M12 6V3a1 1 0 0 0-1-1H9a1 1 0 0 0-1 1v3",key:"1drr47"}]],Ab=rt("microscope",Eb);/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Db=[["path",{d:"M12 2v20",key:"t6zp3m"}],["path",{d:"m15 19-3 3-3-3",key:"11eu04"}],["path",{d:"m19 9 3 3-3 3",key:"1mg7y2"}],["path",{d:"M2 12h20",key:"9i4pu4"}],["path",{d:"m5 9-3 3 3 3",key:"j64kie"}],["path",{d:"m9 5 3-3 3 3",key:"l8vdw6"}]],Mb=rt("move",Db);/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const _b=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],Cb=rt("play",_b);/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Vb=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],wb=rt("search",Vb);/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Rb=[["path",{d:"m18 14 4 4-4 4",key:"10pe0f"}],["path",{d:"m18 2 4 4-4 4",key:"pucp1d"}],["path",{d:"M2 18h1.973a4 4 0 0 0 3.3-1.7l5.454-8.6a4 4 0 0 1 3.3-1.7H22",key:"1ailkh"}],["path",{d:"M2 6h1.972a4 4 0 0 1 3.6 2.2",key:"km57vx"}],["path",{d:"M22 18h-6.041a4 4 0 0 1-3.3-1.8l-.359-.45",key:"os18l9"}]],Nb=rt("shuffle",Rb);/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Ob=[["path",{d:"M18 7V5a1 1 0 0 0-1-1H6.5a.5.5 0 0 0-.4.8l4.5 6a2 2 0 0 1 0 2.4l-4.5 6a.5.5 0 0 0 .4.8H17a1 1 0 0 0 1-1v-2",key:"wuwx1p"}]],zb=rt("sigma",Ob);/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const jb=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],Lb=rt("sparkles",jb);/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Ub=[["path",{d:"M14 9.536V7a4 4 0 0 1 4-4h1.5a.5.5 0 0 1 .5.5V5a4 4 0 0 1-4 4 4 4 0 0 0-4 4c0 2 1 3 1 5a5 5 0 0 1-1 3",key:"139s4v"}],["path",{d:"M4 9a5 5 0 0 1 8 4 5 5 0 0 1-8-4",key:"1dlkgp"}],["path",{d:"M5 21h14",key:"11awu3"}]],Bb=rt("sprout",Ub);/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Hb=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],qb=rt("target",Hb);/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Gb=[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]],Yb=rt("timer",Gb);/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Xb=[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]],l0=rt("trending-up",Xb);/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const kb=[["path",{d:"m19 5 3-3",key:"yk6iyv"}],["path",{d:"m2 22 3-3",key:"19mgm9"}],["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z",key:"goz73y"}],["path",{d:"M7.5 13.5 10 11",key:"7xgeeb"}],["path",{d:"M10.5 16.5 13 14",key:"10btkg"}],["path",{d:"m12 6 6 6 2.3-2.3a2.4 2.4 0 0 0 0-3.4l-2.6-2.6a2.4 2.4 0 0 0-3.4 0Z",key:"1snsnr"}]],Qb=rt("unplug",kb);/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Zb=[["path",{d:"M8 21s-4-3-4-9 4-9 4-9",key:"uto9ud"}],["path",{d:"M16 3s4 3 4 9-4 9-4 9",key:"4w2vsq"}],["line",{x1:"15",x2:"9",y1:"9",y2:"15",key:"f7djnv"}],["line",{x1:"9",x2:"15",y1:"9",y2:"15",key:"1shsy8"}]],Kb=rt("variable",Zb);/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Ib=[["path",{d:"M2 6c.6.5 1.2 1 2.5 1C7 7 7 5 9.5 5c2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"knzxuh"}],["path",{d:"M2 12c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"2jd2cc"}],["path",{d:"M2 18c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"rd2r6e"}]],Fb=rt("waves",Ib);/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Jb=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Pb=rt("x",Jb),Bc=j.createContext({});function Ei(i){const l=j.useRef(null);return l.current===null&&(l.current=i()),l.current}const s0=typeof window<"u",Hc=s0?j.useLayoutEffect:j.useEffect,pu=j.createContext(null);function qc(i,l){i.indexOf(l)===-1&&i.push(l)}function Gc(i,l){const u=i.indexOf(l);u>-1&&i.splice(u,1)}const tn=(i,l,u)=>u>l?l:u{};const Tn={},u0=i=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(i);function o0(i){return typeof i=="object"&&i!==null}const r0=i=>/^0[^.\s]+$/u.test(i);function Xc(i){let l;return()=>(l===void 0&&(l=i()),l)}const Ye=i=>i,Wb=(i,l)=>u=>l(i(u)),_l=(...i)=>i.reduce(Wb),xl=(i,l,u)=>{const o=l-i;return o===0?1:(u-i)/o};class kc{constructor(){this.subscriptions=[]}add(l){return qc(this.subscriptions,l),()=>Gc(this.subscriptions,l)}notify(l,u,o){const c=this.subscriptions.length;if(c)if(c===1)this.subscriptions[0](l,u,o);else for(let h=0;hi*1e3,Ge=i=>i/1e3;function c0(i,l){return l?i*(1e3/l):0}const f0=(i,l,u)=>(((1-3*u+3*l)*i+(3*u-6*l))*i+3*l)*i,$b=1e-7,tT=12;function eT(i,l,u,o,c){let h,f,m=0;do f=l+(u-l)/2,h=f0(f,o,c)-i,h>0?u=f:l=f;while(Math.abs(h)>$b&&++meT(h,0,1,i,u);return h=>h===0||h===1?h:f0(c(h),l,o)}const d0=i=>l=>l<=.5?i(2*l)/2:(2-i(2*(1-l)))/2,h0=i=>l=>1-i(1-l),m0=Cl(.33,1.53,.69,.99),Qc=h0(m0),p0=d0(Qc),y0=i=>(i*=2)<1?.5*Qc(i):.5*(2-Math.pow(2,-10*(i-1))),Zc=i=>1-Math.sin(Math.acos(i)),g0=h0(Zc),v0=d0(Zc),nT=Cl(.42,0,1,1),iT=Cl(0,0,.58,1),S0=Cl(.42,0,.58,1),aT=i=>Array.isArray(i)&&typeof i[0]!="number",b0=i=>Array.isArray(i)&&typeof i[0]=="number",lT={linear:Ye,easeIn:nT,easeInOut:S0,easeOut:iT,circIn:Zc,circInOut:v0,circOut:g0,backIn:Qc,backInOut:p0,backOut:m0,anticipate:y0},sT=i=>typeof i=="string",Vp=i=>{if(b0(i)){Yc(i.length===4);const[l,u,o,c]=i;return Cl(l,u,o,c)}else if(sT(i))return lT[i];return i},Ps=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function uT(i,l){let u=new Set,o=new Set,c=!1,h=!1;const f=new WeakSet;let m={delta:0,timestamp:0,isProcessing:!1};function y(v){f.has(v)&&(p.schedule(v),i()),v(m)}const p={schedule:(v,S=!1,b=!1)=>{const w=b&&c?u:o;return S&&f.add(v),w.has(v)||w.add(v),v},cancel:v=>{o.delete(v),f.delete(v)},process:v=>{if(m=v,c){h=!0;return}c=!0,[u,o]=[o,u],u.forEach(y),u.clear(),c=!1,h&&(h=!1,p.process(v))}};return p}const oT=40;function T0(i,l){let u=!1,o=!0;const c={delta:0,timestamp:0,isProcessing:!1},h=()=>u=!0,f=Ps.reduce((Y,Z)=>(Y[Z]=uT(h),Y),{}),{setup:m,read:y,resolveKeyframes:p,preUpdate:v,update:S,preRender:b,render:V,postRender:w}=f,H=()=>{const Y=Tn.useManualTiming?c.timestamp:performance.now();u=!1,Tn.useManualTiming||(c.delta=o?1e3/60:Math.max(Math.min(Y-c.timestamp,oT),1)),c.timestamp=Y,c.isProcessing=!0,m.process(c),y.process(c),p.process(c),v.process(c),S.process(c),b.process(c),V.process(c),w.process(c),c.isProcessing=!1,u&&l&&(o=!1,i(H))},X=()=>{u=!0,o=!0,c.isProcessing||i(H)};return{schedule:Ps.reduce((Y,Z)=>{const K=f[Z];return Y[Z]=(at,et=!1,P=!1)=>(u||X(),K.schedule(at,et,P)),Y},{}),cancel:Y=>{for(let Z=0;Z(eu===void 0&&re.set(le.isProcessing||Tn.useManualTiming?le.timestamp:performance.now()),eu),set:i=>{eu=i,queueMicrotask(rT)}},x0=i=>l=>typeof l=="string"&&l.startsWith(i),E0=x0("--"),cT=x0("var(--"),Kc=i=>cT(i)?fT.test(i.split("/*")[0].trim()):!1,fT=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function wp(i){return typeof i!="string"?!1:i.split("/*")[0].includes("var(--")}const ma={test:i=>typeof i=="number",parse:parseFloat,transform:i=>i},El={...ma,transform:i=>tn(0,1,i)},Ws={...ma,default:1},gl=i=>Math.round(i*1e5)/1e5,Ic=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function dT(i){return i==null}const hT=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Fc=(i,l)=>u=>!!(typeof u=="string"&&hT.test(u)&&u.startsWith(i)||l&&!dT(u)&&Object.prototype.hasOwnProperty.call(u,l)),A0=(i,l,u)=>o=>{if(typeof o!="string")return o;const[c,h,f,m]=o.match(Ic);return{[i]:parseFloat(c),[l]:parseFloat(h),[u]:parseFloat(f),alpha:m!==void 0?parseFloat(m):1}},mT=i=>tn(0,255,i),Kr={...ma,transform:i=>Math.round(mT(i))},bi={test:Fc("rgb","red"),parse:A0("red","green","blue"),transform:({red:i,green:l,blue:u,alpha:o=1})=>"rgba("+Kr.transform(i)+", "+Kr.transform(l)+", "+Kr.transform(u)+", "+gl(El.transform(o))+")"};function pT(i){let l="",u="",o="",c="";return i.length>5?(l=i.substring(1,3),u=i.substring(3,5),o=i.substring(5,7),c=i.substring(7,9)):(l=i.substring(1,2),u=i.substring(2,3),o=i.substring(3,4),c=i.substring(4,5),l+=l,u+=u,o+=o,c+=c),{red:parseInt(l,16),green:parseInt(u,16),blue:parseInt(o,16),alpha:c?parseInt(c,16)/255:1}}const pc={test:Fc("#"),parse:pT,transform:bi.transform},Vl=i=>({test:l=>typeof l=="string"&&l.endsWith(i)&&l.split(" ").length===1,parse:parseFloat,transform:l=>`${l}${i}`}),In=Vl("deg"),$e=Vl("%"),F=Vl("px"),yT=Vl("vh"),gT=Vl("vw"),Rp={...$e,parse:i=>$e.parse(i)/100,transform:i=>$e.transform(i*100)},ra={test:Fc("hsl","hue"),parse:A0("hue","saturation","lightness"),transform:({hue:i,saturation:l,lightness:u,alpha:o=1})=>"hsla("+Math.round(i)+", "+$e.transform(gl(l))+", "+$e.transform(gl(u))+", "+gl(El.transform(o))+")"},It={test:i=>bi.test(i)||pc.test(i)||ra.test(i),parse:i=>bi.test(i)?bi.parse(i):ra.test(i)?ra.parse(i):pc.parse(i),transform:i=>typeof i=="string"?i:i.hasOwnProperty("red")?bi.transform(i):ra.transform(i),getAnimatableNone:i=>{const l=It.parse(i);return l.alpha=0,It.transform(l)}},vT=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function ST(i){var l,u;return isNaN(i)&&typeof i=="string"&&(((l=i.match(Ic))==null?void 0:l.length)||0)+(((u=i.match(vT))==null?void 0:u.length)||0)>0}const D0="number",M0="color",bT="var",TT="var(",Np="${}",xT=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Al(i){const l=i.toString(),u=[],o={color:[],number:[],var:[]},c=[];let h=0;const m=l.replace(xT,y=>(It.test(y)?(o.color.push(h),c.push(M0),u.push(It.parse(y))):y.startsWith(TT)?(o.var.push(h),c.push(bT),u.push(y)):(o.number.push(h),c.push(D0),u.push(parseFloat(y))),++h,Np)).split(Np);return{values:u,split:m,indexes:o,types:c}}function _0(i){return Al(i).values}function C0(i){const{split:l,types:u}=Al(i),o=l.length;return c=>{let h="";for(let f=0;ftypeof i=="number"?0:It.test(i)?It.getAnimatableNone(i):i;function AT(i){const l=_0(i);return C0(i)(l.map(ET))}const Pn={test:ST,parse:_0,createTransformer:C0,getAnimatableNone:AT};function Ir(i,l,u){return u<0&&(u+=1),u>1&&(u-=1),u<1/6?i+(l-i)*6*u:u<1/2?l:u<2/3?i+(l-i)*(2/3-u)*6:i}function DT({hue:i,saturation:l,lightness:u,alpha:o}){i/=360,l/=100,u/=100;let c=0,h=0,f=0;if(!l)c=h=f=u;else{const m=u<.5?u*(1+l):u+l-u*l,y=2*u-m;c=Ir(y,m,i+1/3),h=Ir(y,m,i),f=Ir(y,m,i-1/3)}return{red:Math.round(c*255),green:Math.round(h*255),blue:Math.round(f*255),alpha:o}}function lu(i,l){return u=>u>0?l:i}const jt=(i,l,u)=>i+(l-i)*u,Fr=(i,l,u)=>{const o=i*i,c=u*(l*l-o)+o;return c<0?0:Math.sqrt(c)},MT=[pc,bi,ra],_T=i=>MT.find(l=>l.test(i));function Op(i){const l=_T(i);if(!l)return!1;let u=l.parse(i);return l===ra&&(u=DT(u)),u}const zp=(i,l)=>{const u=Op(i),o=Op(l);if(!u||!o)return lu(i,l);const c={...u};return h=>(c.red=Fr(u.red,o.red,h),c.green=Fr(u.green,o.green,h),c.blue=Fr(u.blue,o.blue,h),c.alpha=jt(u.alpha,o.alpha,h),bi.transform(c))},yc=new Set(["none","hidden"]);function CT(i,l){return yc.has(i)?u=>u<=0?i:l:u=>u>=1?l:i}function VT(i,l){return u=>jt(i,l,u)}function Jc(i){return typeof i=="number"?VT:typeof i=="string"?Kc(i)?lu:It.test(i)?zp:NT:Array.isArray(i)?V0:typeof i=="object"?It.test(i)?zp:wT:lu}function V0(i,l){const u=[...i],o=u.length,c=i.map((h,f)=>Jc(h)(h,l[f]));return h=>{for(let f=0;f{for(const h in o)u[h]=o[h](c);return u}}function RT(i,l){const u=[],o={color:0,var:0,number:0};for(let c=0;c{const u=Pn.createTransformer(l),o=Al(i),c=Al(l);return o.indexes.var.length===c.indexes.var.length&&o.indexes.color.length===c.indexes.color.length&&o.indexes.number.length>=c.indexes.number.length?yc.has(i)&&!c.values.length||yc.has(l)&&!o.values.length?CT(i,l):_l(V0(RT(o,c),c.values),u):lu(i,l)};function w0(i,l,u){return typeof i=="number"&&typeof l=="number"&&typeof u=="number"?jt(i,l,u):Jc(i)(i,l)}const OT=i=>{const l=({timestamp:u})=>i(u);return{start:(u=!0)=>Vt.update(l,u),stop:()=>xn(l),now:()=>le.isProcessing?le.timestamp:re.now()}},R0=(i,l,u=10)=>{let o="";const c=Math.max(Math.round(l/u),2);for(let h=0;h=su?1/0:l}function zT(i,l=100,u){const o=u({...i,keyframes:[0,l]}),c=Math.min(Pc(o),su);return{type:"keyframes",ease:h=>o.next(c*h).value/l,duration:Ge(c)}}const jT=5;function N0(i,l,u){const o=Math.max(l-jT,0);return c0(u-i(o),l-o)}const Bt={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Jr=.001;function LT({duration:i=Bt.duration,bounce:l=Bt.bounce,velocity:u=Bt.velocity,mass:o=Bt.mass}){let c,h,f=1-l;f=tn(Bt.minDamping,Bt.maxDamping,f),i=tn(Bt.minDuration,Bt.maxDuration,Ge(i)),f<1?(c=p=>{const v=p*f,S=v*i,b=v-u,V=gc(p,f),w=Math.exp(-S);return Jr-b/V*w},h=p=>{const S=p*f*i,b=S*u+u,V=Math.pow(f,2)*Math.pow(p,2)*i,w=Math.exp(-S),H=gc(Math.pow(p,2),f);return(-c(p)+Jr>0?-1:1)*((b-V)*w)/H}):(c=p=>{const v=Math.exp(-p*i),S=(p-u)*i+1;return-Jr+v*S},h=p=>{const v=Math.exp(-p*i),S=(u-p)*(i*i);return v*S});const m=5/i,y=BT(c,h,m);if(i=bn(i),isNaN(y))return{stiffness:Bt.stiffness,damping:Bt.damping,duration:i};{const p=Math.pow(y,2)*o;return{stiffness:p,damping:f*2*Math.sqrt(o*p),duration:i}}}const UT=12;function BT(i,l,u){let o=u;for(let c=1;ci[u]!==void 0)}function GT(i){let l={velocity:Bt.velocity,stiffness:Bt.stiffness,damping:Bt.damping,mass:Bt.mass,isResolvedFromDuration:!1,...i};if(!jp(i,qT)&&jp(i,HT))if(i.visualDuration){const u=i.visualDuration,o=2*Math.PI/(u*1.2),c=o*o,h=2*tn(.05,1,1-(i.bounce||0))*Math.sqrt(c);l={...l,mass:Bt.mass,stiffness:c,damping:h}}else{const u=LT(i);l={...l,...u,mass:Bt.mass},l.isResolvedFromDuration=!0}return l}function uu(i=Bt.visualDuration,l=Bt.bounce){const u=typeof i!="object"?{visualDuration:i,keyframes:[0,1],bounce:l}:i;let{restSpeed:o,restDelta:c}=u;const h=u.keyframes[0],f=u.keyframes[u.keyframes.length-1],m={done:!1,value:h},{stiffness:y,damping:p,mass:v,duration:S,velocity:b,isResolvedFromDuration:V}=GT({...u,velocity:-Ge(u.velocity||0)}),w=b||0,H=p/(2*Math.sqrt(y*v)),X=f-h,q=Ge(Math.sqrt(y/v)),Q=Math.abs(X)<5;o||(o=Q?Bt.restSpeed.granular:Bt.restSpeed.default),c||(c=Q?Bt.restDelta.granular:Bt.restDelta.default);let Y;if(H<1){const K=gc(q,H);Y=at=>{const et=Math.exp(-H*q*at);return f-et*((w+H*q*X)/K*Math.sin(K*at)+X*Math.cos(K*at))}}else if(H===1)Y=K=>f-Math.exp(-q*K)*(X+(w+q*X)*K);else{const K=q*Math.sqrt(H*H-1);Y=at=>{const et=Math.exp(-H*q*at),P=Math.min(K*at,300);return f-et*((w+H*q*X)*Math.sinh(P)+K*X*Math.cosh(P))/K}}const Z={calculatedDuration:V&&S||null,next:K=>{const at=Y(K);if(V)m.done=K>=S;else{let et=K===0?w:0;H<1&&(et=K===0?bn(w):N0(Y,K,at));const P=Math.abs(et)<=o,st=Math.abs(f-at)<=c;m.done=P&&st}return m.value=m.done?f:at,m},toString:()=>{const K=Math.min(Pc(Z),su),at=R0(et=>Z.next(K*et).value,K,30);return K+"ms "+at},toTransition:()=>{}};return Z}uu.applyToOptions=i=>{const l=zT(i,100,uu);return i.ease=l.ease,i.duration=bn(l.duration),i.type="keyframes",i};function vc({keyframes:i,velocity:l=0,power:u=.8,timeConstant:o=325,bounceDamping:c=10,bounceStiffness:h=500,modifyTarget:f,min:m,max:y,restDelta:p=.5,restSpeed:v}){const S=i[0],b={done:!1,value:S},V=P=>m!==void 0&&Py,w=P=>m===void 0?y:y===void 0||Math.abs(m-P)-H*Math.exp(-P/o),Y=P=>q+Q(P),Z=P=>{const st=Q(P),Rt=Y(P);b.done=Math.abs(st)<=p,b.value=b.done?q:Rt};let K,at;const et=P=>{V(b.value)&&(K=P,at=uu({keyframes:[b.value,w(b.value)],velocity:N0(Y,P,b.value),damping:c,stiffness:h,restDelta:p,restSpeed:v}))};return et(0),{calculatedDuration:null,next:P=>{let st=!1;return!at&&K===void 0&&(st=!0,Z(P),et(P)),K!==void 0&&P>=K?at.next(P-K):(!st&&Z(P),b)}}}function YT(i,l,u){const o=[],c=u||Tn.mix||w0,h=i.length-1;for(let f=0;fl[0];if(h===2&&l[0]===l[1])return()=>l[1];const f=i[0]===i[1];i[0]>i[h-1]&&(i=[...i].reverse(),l=[...l].reverse());const m=YT(l,o,c),y=m.length,p=v=>{if(f&&v1)for(;Sp(tn(i[0],i[h-1],v)):p}function XT(i,l){const u=i[i.length-1];for(let o=1;o<=l;o++){const c=xl(0,l,o);i.push(jt(u,1,c))}}function kT(i){const l=[0];return XT(l,i.length-1),l}function QT(i,l){return i.map(u=>u*l)}function ZT(i,l){return i.map(()=>l||S0).splice(0,i.length-1)}function vl({duration:i=300,keyframes:l,times:u,ease:o="easeInOut"}){const c=aT(o)?o.map(Vp):Vp(o),h={done:!1,value:l[0]},f=QT(u&&u.length===l.length?u:kT(l),i),m=O0(f,l,{ease:Array.isArray(c)?c:ZT(l,c)});return{calculatedDuration:i,next:y=>(h.value=m(y),h.done=y>=i,h)}}const KT=i=>i!==null;function Wc(i,{repeat:l,repeatType:u="loop"},o,c=1){const h=i.filter(KT),m=c<0||l&&u!=="loop"&&l%2===1?0:h.length-1;return!m||o===void 0?h[m]:o}const IT={decay:vc,inertia:vc,tween:vl,keyframes:vl,spring:uu};function z0(i){typeof i.type=="string"&&(i.type=IT[i.type])}class $c{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(l=>{this.resolve=l})}notifyFinished(){this.resolve()}then(l,u){return this.finished.then(l,u)}}const FT=i=>i/100;class yu extends $c{constructor(l){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var o,c;const{motionValue:u}=this.options;u&&u.updatedAt!==re.now()&&this.tick(re.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(c=(o=this.options).onStop)==null||c.call(o))},this.options=l,this.initAnimation(),this.play(),l.autoplay===!1&&this.pause()}initAnimation(){const{options:l}=this;z0(l);const{type:u=vl,repeat:o=0,repeatDelay:c=0,repeatType:h,velocity:f=0}=l;let{keyframes:m}=l;const y=u||vl;y!==vl&&typeof m[0]!="number"&&(this.mixKeyframes=_l(FT,w0(m[0],m[1])),m=[0,100]);const p=y({...l,keyframes:m});h==="mirror"&&(this.mirroredGenerator=y({...l,keyframes:[...m].reverse(),velocity:-f})),p.calculatedDuration===null&&(p.calculatedDuration=Pc(p));const{calculatedDuration:v}=p;this.calculatedDuration=v,this.resolvedDuration=v+c,this.totalDuration=this.resolvedDuration*(o+1)-c,this.generator=p}updateTime(l){const u=Math.round(l-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=u}tick(l,u=!1){const{generator:o,totalDuration:c,mixKeyframes:h,mirroredGenerator:f,resolvedDuration:m,calculatedDuration:y}=this;if(this.startTime===null)return o.next(0);const{delay:p=0,keyframes:v,repeat:S,repeatType:b,repeatDelay:V,type:w,onUpdate:H,finalKeyframe:X}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,l):this.speed<0&&(this.startTime=Math.min(l-c/this.speed,this.startTime)),u?this.currentTime=l:this.updateTime(l);const q=this.currentTime-p*(this.playbackSpeed>=0?1:-1),Q=this.playbackSpeed>=0?q<0:q>c;this.currentTime=Math.max(q,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=c);let Y=this.currentTime,Z=o;if(S){const P=Math.min(this.currentTime,c)/m;let st=Math.floor(P),Rt=P%1;!Rt&&P>=1&&(Rt=1),Rt===1&&st--,st=Math.min(st,S+1),!!(st%2)&&(b==="reverse"?(Rt=1-Rt,V&&(Rt-=V/m)):b==="mirror"&&(Z=f)),Y=tn(0,1,Rt)*m}const K=Q?{done:!1,value:v[0]}:Z.next(Y);h&&(K.value=h(K.value));let{done:at}=K;!Q&&y!==null&&(at=this.playbackSpeed>=0?this.currentTime>=c:this.currentTime<=0);const et=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&at);return et&&w!==vc&&(K.value=Wc(v,this.options,X,this.speed)),H&&H(K.value),et&&this.finish(),K}then(l,u){return this.finished.then(l,u)}get duration(){return Ge(this.calculatedDuration)}get iterationDuration(){const{delay:l=0}=this.options||{};return this.duration+Ge(l)}get time(){return Ge(this.currentTime)}set time(l){var u;l=bn(l),this.currentTime=l,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=l:this.driver&&(this.startTime=this.driver.now()-l/this.playbackSpeed),(u=this.driver)==null||u.start(!1)}get speed(){return this.playbackSpeed}set speed(l){this.updateTime(re.now());const u=this.playbackSpeed!==l;this.playbackSpeed=l,u&&(this.time=Ge(this.currentTime))}play(){var c,h;if(this.isStopped)return;const{driver:l=OT,startTime:u}=this.options;this.driver||(this.driver=l(f=>this.tick(f))),(h=(c=this.options).onPlay)==null||h.call(c);const o=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=o):this.holdTime!==null?this.startTime=o-this.holdTime:this.startTime||(this.startTime=u??o),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(re.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var l,u;this.notifyFinished(),this.teardown(),this.state="finished",(u=(l=this.options).onComplete)==null||u.call(l)}cancel(){var l,u;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(u=(l=this.options).onCancel)==null||u.call(l)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(l){return this.startTime=0,this.tick(l,!0)}attachTimeline(l){var u;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(u=this.driver)==null||u.stop(),l.observe(this)}}function JT(i){for(let l=1;li*180/Math.PI,Sc=i=>{const l=Ti(Math.atan2(i[1],i[0]));return bc(l)},PT={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:i=>(Math.abs(i[0])+Math.abs(i[3]))/2,rotate:Sc,rotateZ:Sc,skewX:i=>Ti(Math.atan(i[1])),skewY:i=>Ti(Math.atan(i[2])),skew:i=>(Math.abs(i[1])+Math.abs(i[2]))/2},bc=i=>(i=i%360,i<0&&(i+=360),i),Lp=Sc,Up=i=>Math.sqrt(i[0]*i[0]+i[1]*i[1]),Bp=i=>Math.sqrt(i[4]*i[4]+i[5]*i[5]),WT={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Up,scaleY:Bp,scale:i=>(Up(i)+Bp(i))/2,rotateX:i=>bc(Ti(Math.atan2(i[6],i[5]))),rotateY:i=>bc(Ti(Math.atan2(-i[2],i[0]))),rotateZ:Lp,rotate:Lp,skewX:i=>Ti(Math.atan(i[4])),skewY:i=>Ti(Math.atan(i[1])),skew:i=>(Math.abs(i[1])+Math.abs(i[4]))/2};function Tc(i){return i.includes("scale")?1:0}function xc(i,l){if(!i||i==="none")return Tc(l);const u=i.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let o,c;if(u)o=WT,c=u;else{const m=i.match(/^matrix\(([-\d.e\s,]+)\)$/u);o=PT,c=m}if(!c)return Tc(l);const h=o[l],f=c[1].split(",").map(t2);return typeof h=="function"?h(f):f[h]}const $T=(i,l)=>{const{transform:u="none"}=getComputedStyle(i);return xc(u,l)};function t2(i){return parseFloat(i.trim())}const pa=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ya=new Set(pa),Hp=i=>i===ma||i===F,e2=new Set(["x","y","z"]),n2=pa.filter(i=>!e2.has(i));function i2(i){const l=[];return n2.forEach(u=>{const o=i.getValue(u);o!==void 0&&(l.push([u,o.get()]),o.set(u.startsWith("scale")?1:0))}),l}const Fn={width:({x:i},{paddingLeft:l="0",paddingRight:u="0"})=>i.max-i.min-parseFloat(l)-parseFloat(u),height:({y:i},{paddingTop:l="0",paddingBottom:u="0"})=>i.max-i.min-parseFloat(l)-parseFloat(u),top:(i,{top:l})=>parseFloat(l),left:(i,{left:l})=>parseFloat(l),bottom:({y:i},{top:l})=>parseFloat(l)+(i.max-i.min),right:({x:i},{left:l})=>parseFloat(l)+(i.max-i.min),x:(i,{transform:l})=>xc(l,"x"),y:(i,{transform:l})=>xc(l,"y")};Fn.translateX=Fn.x;Fn.translateY=Fn.y;const xi=new Set;let Ec=!1,Ac=!1,Dc=!1;function j0(){if(Ac){const i=Array.from(xi).filter(o=>o.needsMeasurement),l=new Set(i.map(o=>o.element)),u=new Map;l.forEach(o=>{const c=i2(o);c.length&&(u.set(o,c),o.render())}),i.forEach(o=>o.measureInitialState()),l.forEach(o=>{o.render();const c=u.get(o);c&&c.forEach(([h,f])=>{var m;(m=o.getValue(h))==null||m.set(f)})}),i.forEach(o=>o.measureEndState()),i.forEach(o=>{o.suspendedScrollY!==void 0&&window.scrollTo(0,o.suspendedScrollY)})}Ac=!1,Ec=!1,xi.forEach(i=>i.complete(Dc)),xi.clear()}function L0(){xi.forEach(i=>{i.readKeyframes(),i.needsMeasurement&&(Ac=!0)})}function a2(){Dc=!0,L0(),j0(),Dc=!1}class tf{constructor(l,u,o,c,h,f=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...l],this.onComplete=u,this.name=o,this.motionValue=c,this.element=h,this.isAsync=f}scheduleResolve(){this.state="scheduled",this.isAsync?(xi.add(this),Ec||(Ec=!0,Vt.read(L0),Vt.resolveKeyframes(j0))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:l,name:u,element:o,motionValue:c}=this;if(l[0]===null){const h=c==null?void 0:c.get(),f=l[l.length-1];if(h!==void 0)l[0]=h;else if(o&&u){const m=o.readValue(u,f);m!=null&&(l[0]=m)}l[0]===void 0&&(l[0]=f),c&&h===void 0&&c.set(l[0])}JT(l)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(l=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,l),xi.delete(this)}cancel(){this.state==="scheduled"&&(xi.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const l2=i=>i.startsWith("--");function s2(i,l,u){l2(l)?i.style.setProperty(l,u):i.style[l]=u}const u2=Xc(()=>window.ScrollTimeline!==void 0),o2={};function r2(i,l){const u=Xc(i);return()=>o2[l]??u()}const U0=r2(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),pl=([i,l,u,o])=>`cubic-bezier(${i}, ${l}, ${u}, ${o})`,qp={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:pl([0,.65,.55,1]),circOut:pl([.55,0,1,.45]),backIn:pl([.31,.01,.66,-.59]),backOut:pl([.33,1.53,.69,.99])};function B0(i,l){if(i)return typeof i=="function"?U0()?R0(i,l):"ease-out":b0(i)?pl(i):Array.isArray(i)?i.map(u=>B0(u,l)||qp.easeOut):qp[i]}function c2(i,l,u,{delay:o=0,duration:c=300,repeat:h=0,repeatType:f="loop",ease:m="easeOut",times:y}={},p=void 0){const v={[l]:u};y&&(v.offset=y);const S=B0(m,c);Array.isArray(S)&&(v.easing=S);const b={delay:o,duration:c,easing:Array.isArray(S)?"linear":S,fill:"both",iterations:h+1,direction:f==="reverse"?"alternate":"normal"};return p&&(b.pseudoElement=p),i.animate(v,b)}function H0(i){return typeof i=="function"&&"applyToOptions"in i}function f2({type:i,...l}){return H0(i)&&U0()?i.applyToOptions(l):(l.duration??(l.duration=300),l.ease??(l.ease="easeOut"),l)}class d2 extends $c{constructor(l){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!l)return;const{element:u,name:o,keyframes:c,pseudoElement:h,allowFlatten:f=!1,finalKeyframe:m,onComplete:y}=l;this.isPseudoElement=!!h,this.allowFlatten=f,this.options=l,Yc(typeof l.type!="string");const p=f2(l);this.animation=c2(u,o,c,p,h),p.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!h){const v=Wc(c,this.options,m,this.speed);this.updateMotionValue?this.updateMotionValue(v):s2(u,o,v),this.animation.cancel()}y==null||y(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var l,u;(u=(l=this.animation).finish)==null||u.call(l)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:l}=this;l==="idle"||l==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var u,o,c;const l=(u=this.options)==null?void 0:u.element;!this.isPseudoElement&&(l!=null&&l.isConnected)&&((c=(o=this.animation).commitStyles)==null||c.call(o))}get duration(){var u,o;const l=((o=(u=this.animation.effect)==null?void 0:u.getComputedTiming)==null?void 0:o.call(u).duration)||0;return Ge(Number(l))}get iterationDuration(){const{delay:l=0}=this.options||{};return this.duration+Ge(l)}get time(){return Ge(Number(this.animation.currentTime)||0)}set time(l){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=bn(l)}get speed(){return this.animation.playbackRate}set speed(l){l<0&&(this.finishedTime=null),this.animation.playbackRate=l}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(l){this.manualStartTime=this.animation.startTime=l}attachTimeline({timeline:l,observe:u}){var o;return this.allowFlatten&&((o=this.animation.effect)==null||o.updateTiming({easing:"linear"})),this.animation.onfinish=null,l&&u2()?(this.animation.timeline=l,Ye):u(this)}}const q0={anticipate:y0,backInOut:p0,circInOut:v0};function h2(i){return i in q0}function m2(i){typeof i.ease=="string"&&h2(i.ease)&&(i.ease=q0[i.ease])}const Pr=10;class p2 extends d2{constructor(l){m2(l),z0(l),super(l),l.startTime!==void 0&&(this.startTime=l.startTime),this.options=l}updateMotionValue(l){const{motionValue:u,onUpdate:o,onComplete:c,element:h,...f}=this.options;if(!u)return;if(l!==void 0){u.set(l);return}const m=new yu({...f,autoplay:!1}),y=Math.max(Pr,re.now()-this.startTime),p=tn(0,Pr,y-Pr);u.setWithVelocity(m.sample(Math.max(0,y-p)).value,m.sample(y).value,p),m.stop()}}const Gp=(i,l)=>l==="zIndex"?!1:!!(typeof i=="number"||Array.isArray(i)||typeof i=="string"&&(Pn.test(i)||i==="0")&&!i.startsWith("url("));function y2(i){const l=i[0];if(i.length===1)return!0;for(let u=0;uObject.hasOwnProperty.call(Element.prototype,"animate"));function b2(i){var v;const{motionValue:l,name:u,repeatDelay:o,repeatType:c,damping:h,type:f}=i;if(!(((v=l==null?void 0:l.owner)==null?void 0:v.current)instanceof HTMLElement))return!1;const{onUpdate:y,transformTemplate:p}=l.owner.getProps();return S2()&&u&&v2.has(u)&&(u!=="transform"||!p)&&!y&&!o&&c!=="mirror"&&h!==0&&f!=="inertia"}const T2=40;class x2 extends $c{constructor({autoplay:l=!0,delay:u=0,type:o="keyframes",repeat:c=0,repeatDelay:h=0,repeatType:f="loop",keyframes:m,name:y,motionValue:p,element:v,...S}){var w;super(),this.stop=()=>{var H,X;this._animation&&(this._animation.stop(),(H=this.stopTimeline)==null||H.call(this)),(X=this.keyframeResolver)==null||X.cancel()},this.createdAt=re.now();const b={autoplay:l,delay:u,type:o,repeat:c,repeatDelay:h,repeatType:f,name:y,motionValue:p,element:v,...S},V=(v==null?void 0:v.KeyframeResolver)||tf;this.keyframeResolver=new V(m,(H,X,q)=>this.onKeyframesResolved(H,X,b,!q),y,p,v),(w=this.keyframeResolver)==null||w.scheduleResolve()}onKeyframesResolved(l,u,o,c){var X,q;this.keyframeResolver=void 0;const{name:h,type:f,velocity:m,delay:y,isHandoff:p,onUpdate:v}=o;this.resolvedAt=re.now(),g2(l,h,f,m)||((Tn.instantAnimations||!y)&&(v==null||v(Wc(l,o,u))),l[0]=l[l.length-1],Mc(o),o.repeat=0);const b={startTime:c?this.resolvedAt?this.resolvedAt-this.createdAt>T2?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:u,...o,keyframes:l},V=!p&&b2(b),w=(q=(X=b.motionValue)==null?void 0:X.owner)==null?void 0:q.current,H=V?new p2({...b,element:w}):new yu(b);H.finished.then(()=>{this.notifyFinished()}).catch(Ye),this.pendingTimeline&&(this.stopTimeline=H.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=H}get finished(){return this._animation?this.animation.finished:this._finished}then(l,u){return this.finished.finally(l).then(()=>{})}get animation(){var l;return this._animation||((l=this.keyframeResolver)==null||l.resume(),a2()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(l){this.animation.time=l}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(l){this.animation.speed=l}get startTime(){return this.animation.startTime}attachTimeline(l){return this._animation?this.stopTimeline=this.animation.attachTimeline(l):this.pendingTimeline=l,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var l;this._animation&&this.animation.cancel(),(l=this.keyframeResolver)==null||l.cancel()}}function G0(i,l,u,o=0,c=1){const h=Array.from(i).sort((p,v)=>p.sortNodePosition(v)).indexOf(l),f=i.size,m=(f-1)*o;return typeof u=="function"?u(h,f):c===1?h*o:m-h*o}const E2=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function A2(i){const l=E2.exec(i);if(!l)return[,];const[,u,o,c]=l;return[`--${u??o}`,c]}function Y0(i,l,u=1){const[o,c]=A2(i);if(!o)return;const h=window.getComputedStyle(l).getPropertyValue(o);if(h){const f=h.trim();return u0(f)?parseFloat(f):f}return Kc(c)?Y0(c,l,u+1):c}const D2={type:"spring",stiffness:500,damping:25,restSpeed:10},M2=i=>({type:"spring",stiffness:550,damping:i===0?2*Math.sqrt(550):30,restSpeed:10}),_2={type:"keyframes",duration:.8},C2={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},V2=(i,{keyframes:l})=>l.length>2?_2:ya.has(i)?i.startsWith("scale")?M2(l[1]):D2:C2,w2=i=>i!==null;function R2(i,{repeat:l,repeatType:u="loop"},o){const c=i.filter(w2),h=l&&u!=="loop"&&l%2===1?0:c.length-1;return c[h]}function ef(i,l){return(i==null?void 0:i[l])??(i==null?void 0:i.default)??i}function N2({when:i,delay:l,delayChildren:u,staggerChildren:o,staggerDirection:c,repeat:h,repeatType:f,repeatDelay:m,from:y,elapsed:p,...v}){return!!Object.keys(v).length}const nf=(i,l,u,o={},c,h)=>f=>{const m=ef(o,i)||{},y=m.delay||o.delay||0;let{elapsed:p=0}=o;p=p-bn(y);const v={keyframes:Array.isArray(u)?u:[null,u],ease:"easeOut",velocity:l.getVelocity(),...m,delay:-p,onUpdate:b=>{l.set(b),m.onUpdate&&m.onUpdate(b)},onComplete:()=>{f(),m.onComplete&&m.onComplete()},name:i,motionValue:l,element:h?void 0:c};N2(m)||Object.assign(v,V2(i,v)),v.duration&&(v.duration=bn(v.duration)),v.repeatDelay&&(v.repeatDelay=bn(v.repeatDelay)),v.from!==void 0&&(v.keyframes[0]=v.from);let S=!1;if((v.type===!1||v.duration===0&&!v.repeatDelay)&&(Mc(v),v.delay===0&&(S=!0)),(Tn.instantAnimations||Tn.skipAnimations||c!=null&&c.shouldSkipAnimations)&&(S=!0,Mc(v),v.delay=0),v.allowFlatten=!m.type&&!m.ease,S&&!h&&l.get()!==void 0){const b=R2(v.keyframes,m);if(b!==void 0){Vt.update(()=>{v.onUpdate(b),v.onComplete()});return}}return m.isSync?new yu(v):new x2(v)};function Yp(i){const l=[{},{}];return i==null||i.values.forEach((u,o)=>{l[0][o]=u.get(),l[1][o]=u.getVelocity()}),l}function af(i,l,u,o){if(typeof l=="function"){const[c,h]=Yp(o);l=l(u!==void 0?u:i.custom,c,h)}if(typeof l=="string"&&(l=i.variants&&i.variants[l]),typeof l=="function"){const[c,h]=Yp(o);l=l(u!==void 0?u:i.custom,c,h)}return l}function ha(i,l,u){const o=i.getProps();return af(o,l,u!==void 0?u:o.custom,i)}const X0=new Set(["width","height","top","left","right","bottom",...pa]),Xp=30,O2=i=>!isNaN(parseFloat(i)),Sl={current:void 0};class z2{constructor(l,u={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=o=>{var h;const c=re.now();if(this.updatedAt!==c&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(o),this.current!==this.prev&&((h=this.events.change)==null||h.notify(this.current),this.dependents))for(const f of this.dependents)f.dirty()},this.hasAnimated=!1,this.setCurrent(l),this.owner=u.owner}setCurrent(l){this.current=l,this.updatedAt=re.now(),this.canTrackVelocity===null&&l!==void 0&&(this.canTrackVelocity=O2(this.current))}setPrevFrameValue(l=this.current){this.prevFrameValue=l,this.prevUpdatedAt=this.updatedAt}onChange(l){return this.on("change",l)}on(l,u){this.events[l]||(this.events[l]=new kc);const o=this.events[l].add(u);return l==="change"?()=>{o(),Vt.read(()=>{this.events.change.getSize()||this.stop()})}:o}clearListeners(){for(const l in this.events)this.events[l].clear()}attach(l,u){this.passiveEffect=l,this.stopPassiveEffect=u}set(l){this.passiveEffect?this.passiveEffect(l,this.updateAndNotify):this.updateAndNotify(l)}setWithVelocity(l,u,o){this.set(u),this.prev=void 0,this.prevFrameValue=l,this.prevUpdatedAt=this.updatedAt-o}jump(l,u=!0){this.updateAndNotify(l),this.prev=l,this.prevUpdatedAt=this.prevFrameValue=void 0,u&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var l;(l=this.events.change)==null||l.notify(this.current)}addDependent(l){this.dependents||(this.dependents=new Set),this.dependents.add(l)}removeDependent(l){this.dependents&&this.dependents.delete(l)}get(){return Sl.current&&Sl.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const l=re.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||l-this.updatedAt>Xp)return 0;const u=Math.min(this.updatedAt-this.prevUpdatedAt,Xp);return c0(parseFloat(this.current)-parseFloat(this.prevFrameValue),u)}start(l){return this.stop(),new Promise(u=>{this.hasAnimated=!0,this.animation=l(u),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var l,u;(l=this.dependents)==null||l.clear(),(u=this.events.destroy)==null||u.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Ai(i,l){return new z2(i,l)}const _c=i=>Array.isArray(i);function j2(i,l,u){i.hasValue(l)?i.getValue(l).set(u):i.addValue(l,Ai(u))}function L2(i){return _c(i)?i[i.length-1]||0:i}function U2(i,l){const u=ha(i,l);let{transitionEnd:o={},transition:c={},...h}=u||{};h={...h,...o};for(const f in h){const m=L2(h[f]);j2(i,f,m)}}const $t=i=>!!(i&&i.getVelocity);function B2(i){return!!($t(i)&&i.add)}function Cc(i,l){const u=i.getValue("willChange");if(B2(u))return u.add(l);if(!u&&Tn.WillChange){const o=new Tn.WillChange("auto");i.addValue("willChange",o),o.add(l)}}function lf(i){return i.replace(/([A-Z])/g,l=>`-${l.toLowerCase()}`)}const H2="framerAppearId",k0="data-"+lf(H2);function Q0(i){return i.props[k0]}function q2({protectedKeys:i,needsAnimating:l},u){const o=i.hasOwnProperty(u)&&l[u]!==!0;return l[u]=!1,o}function Z0(i,l,{delay:u=0,transitionOverride:o,type:c}={}){let{transition:h=i.getDefaultTransition(),transitionEnd:f,...m}=l;const y=h==null?void 0:h.reduceMotion;o&&(h=o);const p=[],v=c&&i.animationState&&i.animationState.getState()[c];for(const S in m){const b=i.getValue(S,i.latestValues[S]??null),V=m[S];if(V===void 0||v&&q2(v,S))continue;const w={delay:u,...ef(h||{},S)},H=b.get();if(H!==void 0&&!b.isAnimating&&!Array.isArray(V)&&V===H&&!w.velocity)continue;let X=!1;if(window.MotionHandoffAnimation){const Y=Q0(i);if(Y){const Z=window.MotionHandoffAnimation(Y,S,Vt);Z!==null&&(w.startTime=Z,X=!0)}}Cc(i,S);const q=y??i.shouldReduceMotion;b.start(nf(S,b,V,q&&X0.has(S)?{type:!1}:w,i,X));const Q=b.animation;Q&&p.push(Q)}return f&&Promise.all(p).then(()=>{Vt.update(()=>{f&&U2(i,f)})}),p}function Vc(i,l,u={}){var y;const o=ha(i,l,u.type==="exit"?(y=i.presenceContext)==null?void 0:y.custom:void 0);let{transition:c=i.getDefaultTransition()||{}}=o||{};u.transitionOverride&&(c=u.transitionOverride);const h=o?()=>Promise.all(Z0(i,o,u)):()=>Promise.resolve(),f=i.variantChildren&&i.variantChildren.size?(p=0)=>{const{delayChildren:v=0,staggerChildren:S,staggerDirection:b}=c;return G2(i,l,p,v,S,b,u)}:()=>Promise.resolve(),{when:m}=c;if(m){const[p,v]=m==="beforeChildren"?[h,f]:[f,h];return p().then(()=>v())}else return Promise.all([h(),f(u.delay)])}function G2(i,l,u=0,o=0,c=0,h=1,f){const m=[];for(const y of i.variantChildren)y.notify("AnimationStart",l),m.push(Vc(y,l,{...f,delay:u+(typeof o=="function"?0:o)+G0(i.variantChildren,y,o,c,h)}).then(()=>y.notify("AnimationComplete",l)));return Promise.all(m)}function Y2(i,l,u={}){i.notify("AnimationStart",l);let o;if(Array.isArray(l)){const c=l.map(h=>Vc(i,h,u));o=Promise.all(c)}else if(typeof l=="string")o=Vc(i,l,u);else{const c=typeof l=="function"?ha(i,l,u.custom):l;o=Promise.all(Z0(i,c,u))}return o.then(()=>{i.notify("AnimationComplete",l)})}const X2={test:i=>i==="auto",parse:i=>i},K0=i=>l=>l.test(i),I0=[ma,F,$e,In,gT,yT,X2],kp=i=>I0.find(K0(i));function k2(i){return typeof i=="number"?i===0:i!==null?i==="none"||i==="0"||r0(i):!0}const Q2=new Set(["brightness","contrast","saturate","opacity"]);function Z2(i){const[l,u]=i.slice(0,-1).split("(");if(l==="drop-shadow")return i;const[o]=u.match(Ic)||[];if(!o)return i;const c=u.replace(o,"");let h=Q2.has(l)?1:0;return o!==u&&(h*=100),l+"("+h+c+")"}const K2=/\b([a-z-]*)\(.*?\)/gu,wc={...Pn,getAnimatableNone:i=>{const l=i.match(K2);return l?l.map(Z2).join(" "):i}},Qp={...ma,transform:Math.round},I2={rotate:In,rotateX:In,rotateY:In,rotateZ:In,scale:Ws,scaleX:Ws,scaleY:Ws,scaleZ:Ws,skew:In,skewX:In,skewY:In,distance:F,translateX:F,translateY:F,translateZ:F,x:F,y:F,z:F,perspective:F,transformPerspective:F,opacity:El,originX:Rp,originY:Rp,originZ:F},sf={borderWidth:F,borderTopWidth:F,borderRightWidth:F,borderBottomWidth:F,borderLeftWidth:F,borderRadius:F,borderTopLeftRadius:F,borderTopRightRadius:F,borderBottomRightRadius:F,borderBottomLeftRadius:F,width:F,maxWidth:F,height:F,maxHeight:F,top:F,right:F,bottom:F,left:F,inset:F,insetBlock:F,insetBlockStart:F,insetBlockEnd:F,insetInline:F,insetInlineStart:F,insetInlineEnd:F,padding:F,paddingTop:F,paddingRight:F,paddingBottom:F,paddingLeft:F,paddingBlock:F,paddingBlockStart:F,paddingBlockEnd:F,paddingInline:F,paddingInlineStart:F,paddingInlineEnd:F,margin:F,marginTop:F,marginRight:F,marginBottom:F,marginLeft:F,marginBlock:F,marginBlockStart:F,marginBlockEnd:F,marginInline:F,marginInlineStart:F,marginInlineEnd:F,fontSize:F,backgroundPositionX:F,backgroundPositionY:F,...I2,zIndex:Qp,fillOpacity:El,strokeOpacity:El,numOctaves:Qp},F2={...sf,color:It,backgroundColor:It,outlineColor:It,fill:It,stroke:It,borderColor:It,borderTopColor:It,borderRightColor:It,borderBottomColor:It,borderLeftColor:It,filter:wc,WebkitFilter:wc},F0=i=>F2[i];function J0(i,l){let u=F0(i);return u!==wc&&(u=Pn),u.getAnimatableNone?u.getAnimatableNone(l):void 0}const J2=new Set(["auto","none","0"]);function P2(i,l,u){let o=0,c;for(;o{l.getValue(y).set(p)}),this.resolveNoneKeyframes()}}function $2(i,l,u){if(i==null)return[];if(i instanceof EventTarget)return[i];if(typeof i=="string"){let o=document;const c=(u==null?void 0:u[i])??o.querySelectorAll(i);return c?Array.from(c):[]}return Array.from(i).filter(o=>o!=null)}const P0=(i,l)=>l&&typeof i=="number"?l.transform(i):i;function Rc(i){return o0(i)&&"offsetHeight"in i}const{schedule:uf}=T0(queueMicrotask,!1),Ie={x:!1,y:!1};function W0(){return Ie.x||Ie.y}function tx(i){return i==="x"||i==="y"?Ie[i]?null:(Ie[i]=!0,()=>{Ie[i]=!1}):Ie.x||Ie.y?null:(Ie.x=Ie.y=!0,()=>{Ie.x=Ie.y=!1})}function $0(i,l){const u=$2(i),o=new AbortController,c={passive:!0,...l,signal:o.signal};return[u,c,()=>o.abort()]}function Zp(i){return!(i.pointerType==="touch"||W0())}function ex(i,l,u={}){const[o,c,h]=$0(i,u),f=m=>{if(!Zp(m))return;const{target:y}=m,p=l(y,m);if(typeof p!="function"||!y)return;const v=S=>{Zp(S)&&(p(S),y.removeEventListener("pointerleave",v))};y.addEventListener("pointerleave",v,c)};return o.forEach(m=>{m.addEventListener("pointerenter",f,c)}),h}const tg=(i,l)=>l?i===l?!0:tg(i,l.parentElement):!1,of=i=>i.pointerType==="mouse"?typeof i.button!="number"||i.button<=0:i.isPrimary!==!1,nx=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function ix(i){return nx.has(i.tagName)||i.isContentEditable===!0}const ax=new Set(["INPUT","SELECT","TEXTAREA"]);function lx(i){return ax.has(i.tagName)||i.isContentEditable===!0}const nu=new WeakSet;function Kp(i){return l=>{l.key==="Enter"&&i(l)}}function Wr(i,l){i.dispatchEvent(new PointerEvent("pointer"+l,{isPrimary:!0,bubbles:!0}))}const sx=(i,l)=>{const u=i.currentTarget;if(!u)return;const o=Kp(()=>{if(nu.has(u))return;Wr(u,"down");const c=Kp(()=>{Wr(u,"up")}),h=()=>Wr(u,"cancel");u.addEventListener("keyup",c,l),u.addEventListener("blur",h,l)});u.addEventListener("keydown",o,l),u.addEventListener("blur",()=>u.removeEventListener("keydown",o),l)};function Ip(i){return of(i)&&!W0()}function ux(i,l,u={}){const[o,c,h]=$0(i,u),f=m=>{const y=m.currentTarget;if(!Ip(m))return;nu.add(y);const p=l(y,m),v=(V,w)=>{window.removeEventListener("pointerup",S),window.removeEventListener("pointercancel",b),nu.has(y)&&nu.delete(y),Ip(V)&&typeof p=="function"&&p(V,{success:w})},S=V=>{v(V,y===window||y===document||u.useGlobalTarget||tg(y,V.target))},b=V=>{v(V,!1)};window.addEventListener("pointerup",S,c),window.addEventListener("pointercancel",b,c)};return o.forEach(m=>{(u.useGlobalTarget?window:m).addEventListener("pointerdown",f,c),Rc(m)&&(m.addEventListener("focus",p=>sx(p,c)),!ix(m)&&!m.hasAttribute("tabindex")&&(m.tabIndex=0))}),h}function eg(i){return o0(i)&&"ownerSVGElement"in i}function ox(i){return eg(i)&&i.tagName==="svg"}function rx(...i){const l=!Array.isArray(i[0]),u=l?0:-1,o=i[0+u],c=i[1+u],h=i[2+u],f=i[3+u],m=O0(c,h,f);return l?m(o):m}function cx(i,l,u={}){const o=i.get();let c=null,h=o,f;const m=typeof o=="string"?o.replace(/[\d.-]/g,""):void 0,y=()=>{c&&(c.stop(),c=null)},p=()=>{y();const v=Jp(i.get()),S=Jp(h);v!==S&&(c=new yu({keyframes:[v,S],velocity:i.getVelocity(),type:"spring",restDelta:.001,restSpeed:.01,...u,onUpdate:f}))};if(i.attach((v,S)=>{h=v,f=b=>S(Fp(b,m)),Vt.postRender(()=>{var b;p(),(b=i.events.animationStart)==null||b.notify(),c==null||c.then(()=>{var V;(V=i.events.animationComplete)==null||V.notify()})})},y),$t(l)){const v=l.on("change",b=>i.set(Fp(b,m))),S=i.on("destroy",v);return()=>{v(),S()}}return y}function Fp(i,l){return l?i+l:i}function Jp(i){return typeof i=="number"?i:parseFloat(i)}const fx=[...I0,It,Pn],dx=i=>fx.find(K0(i)),Pp=()=>({translate:0,scale:1,origin:0,originPoint:0}),ca=()=>({x:Pp(),y:Pp()}),Wp=()=>({min:0,max:0}),Jt=()=>({x:Wp(),y:Wp()}),ou={current:null},rf={current:!1},hx=typeof window<"u";function ng(){if(rf.current=!0,!!hx)if(window.matchMedia){const i=window.matchMedia("(prefers-reduced-motion)"),l=()=>ou.current=i.matches;i.addEventListener("change",l),l()}else ou.current=!1}const mx=new WeakMap;function gu(i){return i!==null&&typeof i=="object"&&typeof i.start=="function"}function Dl(i){return typeof i=="string"||Array.isArray(i)}const cf=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],ff=["initial",...cf];function vu(i){return gu(i.animate)||ff.some(l=>Dl(i[l]))}function ig(i){return!!(vu(i)||i.variants)}function px(i,l,u){for(const o in l){const c=l[o],h=u[o];if($t(c))i.addValue(o,c);else if($t(h))i.addValue(o,Ai(c,{owner:i}));else if(h!==c)if(i.hasValue(o)){const f=i.getValue(o);f.liveStyle===!0?f.jump(c):f.hasAnimated||f.set(c)}else{const f=i.getStaticValue(o);i.addValue(o,Ai(f!==void 0?f:c,{owner:i}))}}for(const o in u)l[o]===void 0&&i.removeValue(o);return l}const $p=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let ru={};function ag(i){ru=i}function yx(){return ru}class gx{scrapeMotionValuesFromProps(l,u,o){return{}}constructor({parent:l,props:u,presenceContext:o,reducedMotionConfig:c,skipAnimations:h,blockInitialAnimation:f,visualState:m},y={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=tf,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const V=re.now();this.renderScheduledAtthis.bindToMotionValue(c,o)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(rf.current||ng(),this.shouldReduceMotion=ou.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(u=this.parent)==null||u.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var l;this.projection&&this.projection.unmount(),xn(this.notifyUpdate),xn(this.render),this.valueSubscriptions.forEach(u=>u()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(l=this.parent)==null||l.removeChild(this);for(const u in this.events)this.events[u].clear();for(const u in this.features){const o=this.features[u];o&&(o.unmount(),o.isMounted=!1)}this.current=null}addChild(l){this.children.add(l),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(l)}removeChild(l){this.children.delete(l),this.enteringChildren&&this.enteringChildren.delete(l)}bindToMotionValue(l,u){this.valueSubscriptions.has(l)&&this.valueSubscriptions.get(l)();const o=ya.has(l);o&&this.onBindTransform&&this.onBindTransform();const c=u.on("change",f=>{this.latestValues[l]=f,this.props.onUpdate&&Vt.preRender(this.notifyUpdate),o&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let h;typeof window<"u"&&window.MotionCheckAppearSync&&(h=window.MotionCheckAppearSync(this,l,u)),this.valueSubscriptions.set(l,()=>{c(),h&&h(),u.owner&&u.stop()})}sortNodePosition(l){return!this.current||!this.sortInstanceNodePosition||this.type!==l.type?0:this.sortInstanceNodePosition(this.current,l.current)}updateFeatures(){let l="animation";for(l in ru){const u=ru[l];if(!u)continue;const{isEnabled:o,Feature:c}=u;if(!this.features[l]&&c&&o(this.props)&&(this.features[l]=new c(this)),this.features[l]){const h=this.features[l];h.isMounted?h.update():(h.mount(),h.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Jt()}getStaticValue(l){return this.latestValues[l]}setStaticValue(l,u){this.latestValues[l]=u}update(l,u){(l.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=l,this.prevPresenceContext=this.presenceContext,this.presenceContext=u;for(let o=0;o<$p.length;o++){const c=$p[o];this.propEventSubscriptions[c]&&(this.propEventSubscriptions[c](),delete this.propEventSubscriptions[c]);const h="on"+c,f=l[h];f&&(this.propEventSubscriptions[c]=this.on(c,f))}this.prevMotionValues=px(this,this.scrapeMotionValuesFromProps(l,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(l){return this.props.variants?this.props.variants[l]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(l){const u=this.getClosestVariantNode();if(u)return u.variantChildren&&u.variantChildren.add(l),()=>u.variantChildren.delete(l)}addValue(l,u){const o=this.values.get(l);u!==o&&(o&&this.removeValue(l),this.bindToMotionValue(l,u),this.values.set(l,u),this.latestValues[l]=u.get())}removeValue(l){this.values.delete(l);const u=this.valueSubscriptions.get(l);u&&(u(),this.valueSubscriptions.delete(l)),delete this.latestValues[l],this.removeValueFromRenderState(l,this.renderState)}hasValue(l){return this.values.has(l)}getValue(l,u){if(this.props.values&&this.props.values[l])return this.props.values[l];let o=this.values.get(l);return o===void 0&&u!==void 0&&(o=Ai(u===null?void 0:u,{owner:this}),this.addValue(l,o)),o}readValue(l,u){let o=this.latestValues[l]!==void 0||!this.current?this.latestValues[l]:this.getBaseTargetFromProps(this.props,l)??this.readValueFromInstance(this.current,l,this.options);return o!=null&&(typeof o=="string"&&(u0(o)||r0(o))?o=parseFloat(o):!dx(o)&&Pn.test(u)&&(o=J0(l,u)),this.setBaseTarget(l,$t(o)?o.get():o)),$t(o)?o.get():o}setBaseTarget(l,u){this.baseTarget[l]=u}getBaseTarget(l){var h;const{initial:u}=this.props;let o;if(typeof u=="string"||typeof u=="object"){const f=af(this.props,u,(h=this.presenceContext)==null?void 0:h.custom);f&&(o=f[l])}if(u&&o!==void 0)return o;const c=this.getBaseTargetFromProps(this.props,l);return c!==void 0&&!$t(c)?c:this.initialValues[l]!==void 0&&o===void 0?void 0:this.baseTarget[l]}on(l,u){return this.events[l]||(this.events[l]=new kc),this.events[l].add(u)}notify(l,...u){this.events[l]&&this.events[l].notify(...u)}scheduleRenderMicrotask(){uf.render(this.render)}}class lg extends gx{constructor(){super(...arguments),this.KeyframeResolver=W2}sortInstanceNodePosition(l,u){return l.compareDocumentPosition(u)&2?1:-1}getBaseTargetFromProps(l,u){const o=l.style;return o?o[u]:void 0}removeValueFromRenderState(l,{vars:u,style:o}){delete u[l],delete o[l]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:l}=this.props;$t(l)&&(this.childSubscription=l.on("change",u=>{this.current&&(this.current.textContent=`${u}`)}))}}class Wn{constructor(l){this.isMounted=!1,this.node=l}update(){}}function sg({top:i,left:l,right:u,bottom:o}){return{x:{min:l,max:u},y:{min:i,max:o}}}function vx({x:i,y:l}){return{top:l.min,right:i.max,bottom:l.max,left:i.min}}function Sx(i,l){if(!l)return i;const u=l({x:i.left,y:i.top}),o=l({x:i.right,y:i.bottom});return{top:u.y,left:u.x,bottom:o.y,right:o.x}}function $r(i){return i===void 0||i===1}function Nc({scale:i,scaleX:l,scaleY:u}){return!$r(i)||!$r(l)||!$r(u)}function Si(i){return Nc(i)||ug(i)||i.z||i.rotate||i.rotateX||i.rotateY||i.skewX||i.skewY}function ug(i){return ty(i.x)||ty(i.y)}function ty(i){return i&&i!=="0%"}function cu(i,l,u){const o=i-u,c=l*o;return u+c}function ey(i,l,u,o,c){return c!==void 0&&(i=cu(i,c,o)),cu(i,u,o)+l}function Oc(i,l=0,u=1,o,c){i.min=ey(i.min,l,u,o,c),i.max=ey(i.max,l,u,o,c)}function og(i,{x:l,y:u}){Oc(i.x,l.translate,l.scale,l.originPoint),Oc(i.y,u.translate,u.scale,u.originPoint)}const ny=.999999999999,iy=1.0000000000001;function bx(i,l,u,o=!1){const c=u.length;if(!c)return;l.x=l.y=1;let h,f;for(let m=0;mny&&(l.x=1),l.yny&&(l.y=1)}function fa(i,l){i.min=i.min+l,i.max=i.max+l}function ay(i,l,u,o,c=.5){const h=jt(i.min,i.max,c);Oc(i,l,u,h,o)}function da(i,l){ay(i.x,l.x,l.scaleX,l.scale,l.originX),ay(i.y,l.y,l.scaleY,l.scale,l.originY)}function rg(i,l){return sg(Sx(i.getBoundingClientRect(),l))}function Tx(i,l,u){const o=rg(i,u),{scroll:c}=l;return c&&(fa(o.x,c.offset.x),fa(o.y,c.offset.y)),o}const xx={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Ex=pa.length;function Ax(i,l,u){let o="",c=!0;for(let h=0;h{if(!l.target)return i;if(typeof i=="string")if(F.test(i))i=parseFloat(i);else return i;const u=ly(i,l.target.x),o=ly(i,l.target.y);return`${u}% ${o}%`}},Dx={correct:(i,{treeScale:l,projectionDelta:u})=>{const o=i,c=Pn.parse(i);if(c.length>5)return o;const h=Pn.createTransformer(i),f=typeof c[0]!="number"?1:0,m=u.x.scale*l.x,y=u.y.scale*l.y;c[0+f]/=m,c[1+f]/=y;const p=jt(m,y,.5);return typeof c[2+f]=="number"&&(c[2+f]/=p),typeof c[3+f]=="number"&&(c[3+f]/=p),h(c)}},zc={borderRadius:{...hl,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:hl,borderTopRightRadius:hl,borderBottomLeftRadius:hl,borderBottomRightRadius:hl,boxShadow:Dx};function fg(i,{layout:l,layoutId:u}){return ya.has(i)||i.startsWith("origin")||(l||u!==void 0)&&(!!zc[i]||i==="opacity")}function hf(i,l,u){var f;const o=i.style,c=l==null?void 0:l.style,h={};if(!o)return h;for(const m in o)($t(o[m])||c&&$t(c[m])||fg(m,i)||((f=u==null?void 0:u.getValue(m))==null?void 0:f.liveStyle)!==void 0)&&(h[m]=o[m]);return h}function Mx(i){return window.getComputedStyle(i)}class _x extends lg{constructor(){super(...arguments),this.type="html",this.renderInstance=cg}readValueFromInstance(l,u){var o;if(ya.has(u))return(o=this.projection)!=null&&o.isProjecting?Tc(u):$T(l,u);{const c=Mx(l),h=(E0(u)?c.getPropertyValue(u):c[u])||0;return typeof h=="string"?h.trim():h}}measureInstanceViewportBox(l,{transformPagePoint:u}){return rg(l,u)}build(l,u,o){df(l,u,o.transformTemplate)}scrapeMotionValuesFromProps(l,u,o){return hf(l,u,o)}}const Cx={offset:"stroke-dashoffset",array:"stroke-dasharray"},Vx={offset:"strokeDashoffset",array:"strokeDasharray"};function wx(i,l,u=1,o=0,c=!0){i.pathLength=1;const h=c?Cx:Vx;i[h.offset]=`${-o}`,i[h.array]=`${l} ${u}`}const Rx=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function dg(i,{attrX:l,attrY:u,attrScale:o,pathLength:c,pathSpacing:h=1,pathOffset:f=0,...m},y,p,v){if(df(i,m,p),y){i.style.viewBox&&(i.attrs.viewBox=i.style.viewBox);return}i.attrs=i.style,i.style={};const{attrs:S,style:b}=i;S.transform&&(b.transform=S.transform,delete S.transform),(b.transform||S.transformOrigin)&&(b.transformOrigin=S.transformOrigin??"50% 50%",delete S.transformOrigin),b.transform&&(b.transformBox=(v==null?void 0:v.transformBox)??"fill-box",delete S.transformBox);for(const V of Rx)S[V]!==void 0&&(b[V]=S[V],delete S[V]);l!==void 0&&(S.x=l),u!==void 0&&(S.y=u),o!==void 0&&(S.scale=o),c!==void 0&&wx(S,c,h,f,!1)}const hg=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),mg=i=>typeof i=="string"&&i.toLowerCase()==="svg";function Nx(i,l,u,o){cg(i,l,void 0,o);for(const c in l.attrs)i.setAttribute(hg.has(c)?c:lf(c),l.attrs[c])}function pg(i,l,u){const o=hf(i,l,u);for(const c in i)if($t(i[c])||$t(l[c])){const h=pa.indexOf(c)!==-1?"attr"+c.charAt(0).toUpperCase()+c.substring(1):c;o[h]=i[c]}return o}class Ox extends lg{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Jt}getBaseTargetFromProps(l,u){return l[u]}readValueFromInstance(l,u){if(ya.has(u)){const o=F0(u);return o&&o.default||0}return u=hg.has(u)?u:lf(u),l.getAttribute(u)}scrapeMotionValuesFromProps(l,u,o){return pg(l,u,o)}build(l,u,o){dg(l,u,this.isSVGTag,o.transformTemplate,o.style)}renderInstance(l,u,o,c){Nx(l,u,o,c)}mount(l){this.isSVGTag=mg(l.tagName),super.mount(l)}}const zx=ff.length;function yg(i){if(!i)return;if(!i.isControllingVariants){const u=i.parent?yg(i.parent)||{}:{};return i.props.initial!==void 0&&(u.initial=i.props.initial),u}const l={};for(let u=0;uPromise.all(l.map(({animation:u,options:o})=>Y2(i,u,o)))}function Bx(i){let l=Ux(i),u=sy(),o=!0;const c=y=>(p,v)=>{var b;const S=ha(i,v,y==="exit"?(b=i.presenceContext)==null?void 0:b.custom:void 0);if(S){const{transition:V,transitionEnd:w,...H}=S;p={...p,...H,...w}}return p};function h(y){l=y(i)}function f(y){const{props:p}=i,v=yg(i.parent)||{},S=[],b=new Set;let V={},w=1/0;for(let X=0;Xw&&Z,st=!1;const Rt=Array.isArray(Y)?Y:[Y];let Ht=Rt.reduce(c(q),{});K===!1&&(Ht={});const{prevResolvedValues:Xt={}}=Q,Xe={...Xt,...Ht},Ve=G=>{P=!0,b.has(G)&&(st=!0,b.delete(G)),Q.needsAnimating[G]=!0;const $=i.getValue(G);$&&($.liveStyle=!1)};for(const G in Xe){const $=Ht[G],mt=Xt[G];if(V.hasOwnProperty(G))continue;let vt=!1;_c($)&&_c(mt)?vt=!gg($,mt):vt=$!==mt,vt?$!=null?Ve(G):b.add(G):$!==void 0&&b.has(G)?Ve(G):Q.protectedKeys[G]=!0}Q.prevProp=Y,Q.prevResolvedValues=Ht,Q.isActive&&(V={...V,...Ht}),o&&i.blockInitialAnimation&&(P=!1);const fe=at&&et;P&&(!fe||st)&&S.push(...Rt.map(G=>{const $={type:q};if(typeof G=="string"&&o&&!fe&&i.manuallyAnimateOnMount&&i.parent){const{parent:mt}=i,vt=ha(mt,G);if(mt.enteringChildren&&vt){const{delayChildren:E}=vt.transition||{};$.delay=G0(mt.enteringChildren,i,E)}}return{animation:G,options:$}}))}if(b.size){const X={};if(typeof p.initial!="boolean"){const q=ha(i,Array.isArray(p.initial)?p.initial[0]:p.initial);q&&q.transition&&(X.transition=q.transition)}b.forEach(q=>{const Q=i.getBaseTarget(q),Y=i.getValue(q);Y&&(Y.liveStyle=!0),X[q]=Q??null}),S.push({animation:X})}let H=!!S.length;return o&&(p.initial===!1||p.initial===p.animate)&&!i.manuallyAnimateOnMount&&(H=!1),o=!1,H?l(S):Promise.resolve()}function m(y,p){var S;if(u[y].isActive===p)return Promise.resolve();(S=i.variantChildren)==null||S.forEach(b=>{var V;return(V=b.animationState)==null?void 0:V.setActive(y,p)}),u[y].isActive=p;const v=f(y);for(const b in u)u[b].protectedKeys={};return v}return{animateChanges:f,setActive:m,setAnimateFunction:h,getState:()=>u,reset:()=>{u=sy()}}}function Hx(i,l){return typeof l=="string"?l!==i:Array.isArray(l)?!gg(l,i):!1}function vi(i=!1){return{isActive:i,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function sy(){return{animate:vi(!0),whileInView:vi(),whileHover:vi(),whileTap:vi(),whileDrag:vi(),whileFocus:vi(),exit:vi()}}function uy(i,l){i.min=l.min,i.max=l.max}function Ke(i,l){uy(i.x,l.x),uy(i.y,l.y)}function oy(i,l){i.translate=l.translate,i.scale=l.scale,i.originPoint=l.originPoint,i.origin=l.origin}const vg=1e-4,qx=1-vg,Gx=1+vg,Sg=.01,Yx=0-Sg,Xx=0+Sg;function ce(i){return i.max-i.min}function kx(i,l,u){return Math.abs(i-l)<=u}function ry(i,l,u,o=.5){i.origin=o,i.originPoint=jt(l.min,l.max,i.origin),i.scale=ce(u)/ce(l),i.translate=jt(u.min,u.max,i.origin)-i.originPoint,(i.scale>=qx&&i.scale<=Gx||isNaN(i.scale))&&(i.scale=1),(i.translate>=Yx&&i.translate<=Xx||isNaN(i.translate))&&(i.translate=0)}function bl(i,l,u,o){ry(i.x,l.x,u.x,o?o.originX:void 0),ry(i.y,l.y,u.y,o?o.originY:void 0)}function cy(i,l,u){i.min=u.min+l.min,i.max=i.min+ce(l)}function Qx(i,l,u){cy(i.x,l.x,u.x),cy(i.y,l.y,u.y)}function fy(i,l,u){i.min=l.min-u.min,i.max=i.min+ce(l)}function fu(i,l,u){fy(i.x,l.x,u.x),fy(i.y,l.y,u.y)}function dy(i,l,u,o,c){return i-=l,i=cu(i,1/u,o),c!==void 0&&(i=cu(i,1/c,o)),i}function Zx(i,l=0,u=1,o=.5,c,h=i,f=i){if($e.test(l)&&(l=parseFloat(l),l=jt(f.min,f.max,l/100)-f.min),typeof l!="number")return;let m=jt(h.min,h.max,o);i===h&&(m-=l),i.min=dy(i.min,l,u,m,c),i.max=dy(i.max,l,u,m,c)}function hy(i,l,[u,o,c],h,f){Zx(i,l[u],l[o],l[c],l.scale,h,f)}const Kx=["x","scaleX","originX"],Ix=["y","scaleY","originY"];function my(i,l,u,o){hy(i.x,l,Kx,u?u.x:void 0,o?o.x:void 0),hy(i.y,l,Ix,u?u.y:void 0,o?o.y:void 0)}function py(i){return i.translate===0&&i.scale===1}function bg(i){return py(i.x)&&py(i.y)}function yy(i,l){return i.min===l.min&&i.max===l.max}function Fx(i,l){return yy(i.x,l.x)&&yy(i.y,l.y)}function gy(i,l){return Math.round(i.min)===Math.round(l.min)&&Math.round(i.max)===Math.round(l.max)}function Tg(i,l){return gy(i.x,l.x)&&gy(i.y,l.y)}function vy(i){return ce(i.x)/ce(i.y)}function Sy(i,l){return i.translate===l.translate&&i.scale===l.scale&&i.originPoint===l.originPoint}function qe(i){return[i("x"),i("y")]}function Jx(i,l,u){let o="";const c=i.x.translate/l.x,h=i.y.translate/l.y,f=(u==null?void 0:u.z)||0;if((c||h||f)&&(o=`translate3d(${c}px, ${h}px, ${f}px) `),(l.x!==1||l.y!==1)&&(o+=`scale(${1/l.x}, ${1/l.y}) `),u){const{transformPerspective:p,rotate:v,rotateX:S,rotateY:b,skewX:V,skewY:w}=u;p&&(o=`perspective(${p}px) ${o}`),v&&(o+=`rotate(${v}deg) `),S&&(o+=`rotateX(${S}deg) `),b&&(o+=`rotateY(${b}deg) `),V&&(o+=`skewX(${V}deg) `),w&&(o+=`skewY(${w}deg) `)}const m=i.x.scale*l.x,y=i.y.scale*l.y;return(m!==1||y!==1)&&(o+=`scale(${m}, ${y})`),o||"none"}const xg=["TopLeft","TopRight","BottomLeft","BottomRight"],Px=xg.length,by=i=>typeof i=="string"?parseFloat(i):i,Ty=i=>typeof i=="number"||F.test(i);function Wx(i,l,u,o,c,h){c?(i.opacity=jt(0,u.opacity??1,$x(o)),i.opacityExit=jt(l.opacity??1,0,tE(o))):h&&(i.opacity=jt(l.opacity??1,u.opacity??1,o));for(let f=0;fol?1:u(xl(i,l,o))}function eE(i,l,u){const o=$t(i)?i:Ai(i);return o.start(nf("",o,l,u)),o.animation}function Ml(i,l,u,o={passive:!0}){return i.addEventListener(l,u,o),()=>i.removeEventListener(l,u)}const nE=(i,l)=>i.depth-l.depth;class iE{constructor(){this.children=[],this.isDirty=!1}add(l){qc(this.children,l),this.isDirty=!0}remove(l){Gc(this.children,l),this.isDirty=!0}forEach(l){this.isDirty&&this.children.sort(nE),this.isDirty=!1,this.children.forEach(l)}}function aE(i,l){const u=re.now(),o=({timestamp:c})=>{const h=c-u;h>=l&&(xn(o),i(h-l))};return Vt.setup(o,!0),()=>xn(o)}function iu(i){return $t(i)?i.get():i}class lE{constructor(){this.members=[]}add(l){qc(this.members,l),l.scheduleRender()}remove(l){if(Gc(this.members,l),l===this.prevLead&&(this.prevLead=void 0),l===this.lead){const u=this.members[this.members.length-1];u&&this.promote(u)}}relegate(l){const u=this.members.findIndex(c=>l===c);if(u===0)return!1;let o;for(let c=u;c>=0;c--){const h=this.members[c];if(h.isPresent!==!1){o=h;break}}return o?(this.promote(o),!0):!1}promote(l,u){const o=this.lead;if(l!==o&&(this.prevLead=o,this.lead=l,l.show(),o)){o.instance&&o.scheduleRender(),l.scheduleRender();const c=o.options.layoutDependency,h=l.options.layoutDependency;c!==void 0&&h!==void 0&&c===h||(l.resumeFrom=o,u&&(l.resumeFrom.preserveOpacity=!0),o.snapshot&&(l.snapshot=o.snapshot,l.snapshot.latestValues=o.animationValues||o.latestValues),l.root&&l.root.isUpdating&&(l.isLayoutDirty=!0));const{crossfade:m}=l.options;m===!1&&o.hide()}}exitAnimationComplete(){this.members.forEach(l=>{const{options:u,resumingFrom:o}=l;u.onExitComplete&&u.onExitComplete(),o&&o.options.onExitComplete&&o.options.onExitComplete()})}scheduleRender(){this.members.forEach(l=>{l.instance&&l.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const au={hasAnimatedSinceResize:!0,hasEverUpdated:!1},tc=["","X","Y","Z"],sE=1e3;let uE=0;function ec(i,l,u,o){const{latestValues:c}=l;c[i]&&(u[i]=c[i],l.setStaticValue(i,0),o&&(o[i]=0))}function Ag(i){if(i.hasCheckedOptimisedAppear=!0,i.root===i)return;const{visualElement:l}=i.options;if(!l)return;const u=Q0(l);if(window.MotionHasOptimisedAnimation(u,"transform")){const{layout:c,layoutId:h}=i.options;window.MotionCancelOptimisedAnimation(u,"transform",Vt,!(c||h))}const{parent:o}=i;o&&!o.hasCheckedOptimisedAppear&&Ag(o)}function Dg({attachResizeListener:i,defaultParent:l,measureScroll:u,checkIsScrollRoot:o,resetTransform:c}){return class{constructor(f={},m=l==null?void 0:l()){this.id=uE++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(cE),this.nodes.forEach(mE),this.nodes.forEach(pE),this.nodes.forEach(fE)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=f,this.root=m?m.root||m:this,this.path=m?[...m.path,m]:[],this.parent=m,this.depth=m?m.depth+1:0;for(let y=0;ythis.root.updateBlockedByResize=!1;Vt.read(()=>{S=window.innerWidth}),i(f,()=>{const V=window.innerWidth;V!==S&&(S=V,this.root.updateBlockedByResize=!0,v&&v(),v=aE(b,250),au.hasAnimatedSinceResize&&(au.hasAnimatedSinceResize=!1,this.nodes.forEach(Dy)))})}m&&this.root.registerSharedNode(m,this),this.options.animate!==!1&&p&&(m||y)&&this.addEventListener("didUpdate",({delta:v,hasLayoutChanged:S,hasRelativeLayoutChanged:b,layout:V})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const w=this.options.transition||p.getDefaultTransition()||bE,{onLayoutAnimationStart:H,onLayoutAnimationComplete:X}=p.getProps(),q=!this.targetLayout||!Tg(this.targetLayout,V),Q=!S&&b;if(this.options.layoutRoot||this.resumeFrom||Q||S&&(q||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const Y={...ef(w,"layout"),onPlay:H,onComplete:X};(p.shouldReduceMotion||this.options.layoutRoot)&&(Y.delay=0,Y.type=!1),this.startAnimation(Y),this.setAnimationOrigin(v,Q)}else S||Dy(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=V})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const f=this.getStack();f&&f.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),xn(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(yE),this.animationId++)}getTransformTemplate(){const{visualElement:f}=this.options;return f&&f.getProps().transformTemplate}willUpdate(f=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Ag(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let v=0;v{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!ce(this.snapshot.measuredBox.x)&&!ce(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let y=0;y{const K=Z/1e3;My(S.x,f.x,K),My(S.y,f.y,K),this.setTargetDelta(S),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(fu(b,this.layout.layoutBox,this.relativeParent.layout.layoutBox),vE(this.relativeTarget,this.relativeTargetOrigin,b,K),Y&&Fx(this.relativeTarget,Y)&&(this.isProjectionDirty=!1),Y||(Y=Jt()),Ke(Y,this.relativeTarget)),H&&(this.animationValues=v,Wx(v,p,this.latestValues,K,Q,q)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=K},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(f){var m,y,p;this.notifyListeners("animationStart"),(m=this.currentAnimation)==null||m.stop(),(p=(y=this.resumingFrom)==null?void 0:y.currentAnimation)==null||p.stop(),this.pendingAnimation&&(xn(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Vt.update(()=>{au.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Ai(0)),this.currentAnimation=eE(this.motionValue,[0,1e3],{...f,velocity:0,isSync:!0,onUpdate:v=>{this.mixTargetDelta(v),f.onUpdate&&f.onUpdate(v)},onStop:()=>{},onComplete:()=>{f.onComplete&&f.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const f=this.getStack();f&&f.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(sE),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const f=this.getLead();let{targetWithTransforms:m,target:y,layout:p,latestValues:v}=f;if(!(!m||!y||!p)){if(this!==f&&this.layout&&p&&Mg(this.options.animationType,this.layout.layoutBox,p.layoutBox)){y=this.target||Jt();const S=ce(this.layout.layoutBox.x);y.x.min=f.target.x.min,y.x.max=y.x.min+S;const b=ce(this.layout.layoutBox.y);y.y.min=f.target.y.min,y.y.max=y.y.min+b}Ke(m,y),da(m,v),bl(this.projectionDeltaWithTransform,this.layoutCorrected,m,v)}}registerSharedNode(f,m){this.sharedNodes.has(f)||this.sharedNodes.set(f,new lE),this.sharedNodes.get(f).add(m);const p=m.options.initialPromotionConfig;m.promote({transition:p?p.transition:void 0,preserveFollowOpacity:p&&p.shouldPreserveFollowOpacity?p.shouldPreserveFollowOpacity(m):void 0})}isLead(){const f=this.getStack();return f?f.lead===this:!0}getLead(){var m;const{layoutId:f}=this.options;return f?((m=this.getStack())==null?void 0:m.lead)||this:this}getPrevLead(){var m;const{layoutId:f}=this.options;return f?(m=this.getStack())==null?void 0:m.prevLead:void 0}getStack(){const{layoutId:f}=this.options;if(f)return this.root.sharedNodes.get(f)}promote({needsReset:f,transition:m,preserveFollowOpacity:y}={}){const p=this.getStack();p&&p.promote(this,y),f&&(this.projectionDelta=void 0,this.needsReset=!0),m&&this.setOptions({transition:m})}relegate(){const f=this.getStack();return f?f.relegate(this):!1}resetSkewAndRotation(){const{visualElement:f}=this.options;if(!f)return;let m=!1;const{latestValues:y}=f;if((y.z||y.rotate||y.rotateX||y.rotateY||y.rotateZ||y.skewX||y.skewY)&&(m=!0),!m)return;const p={};y.z&&ec("z",f,p,this.animationValues);for(let v=0;v{var m;return(m=f.currentAnimation)==null?void 0:m.stop()}),this.root.nodes.forEach(Ey),this.root.sharedNodes.clear()}}}function oE(i){i.updateLayout()}function rE(i){var u;const l=((u=i.resumeFrom)==null?void 0:u.snapshot)||i.snapshot;if(i.isLead()&&i.layout&&l&&i.hasListeners("didUpdate")){const{layoutBox:o,measuredBox:c}=i.layout,{animationType:h}=i.options,f=l.source!==i.layout.source;h==="size"?qe(S=>{const b=f?l.measuredBox[S]:l.layoutBox[S],V=ce(b);b.min=o[S].min,b.max=b.min+V}):Mg(h,l.layoutBox,o)&&qe(S=>{const b=f?l.measuredBox[S]:l.layoutBox[S],V=ce(o[S]);b.max=b.min+V,i.relativeTarget&&!i.currentAnimation&&(i.isProjectionDirty=!0,i.relativeTarget[S].max=i.relativeTarget[S].min+V)});const m=ca();bl(m,o,l.layoutBox);const y=ca();f?bl(y,i.applyTransform(c,!0),l.measuredBox):bl(y,o,l.layoutBox);const p=!bg(m);let v=!1;if(!i.resumeFrom){const S=i.getClosestProjectingParent();if(S&&!S.resumeFrom){const{snapshot:b,layout:V}=S;if(b&&V){const w=Jt();fu(w,l.layoutBox,b.layoutBox);const H=Jt();fu(H,o,V.layoutBox),Tg(w,H)||(v=!0),S.options.layoutRoot&&(i.relativeTarget=H,i.relativeTargetOrigin=w,i.relativeParent=S)}}}i.notifyListeners("didUpdate",{layout:o,snapshot:l,delta:y,layoutDelta:m,hasLayoutChanged:p,hasRelativeLayoutChanged:v})}else if(i.isLead()){const{onExitComplete:o}=i.options;o&&o()}i.options.transition=void 0}function cE(i){i.parent&&(i.isProjecting()||(i.isProjectionDirty=i.parent.isProjectionDirty),i.isSharedProjectionDirty||(i.isSharedProjectionDirty=!!(i.isProjectionDirty||i.parent.isProjectionDirty||i.parent.isSharedProjectionDirty)),i.isTransformDirty||(i.isTransformDirty=i.parent.isTransformDirty))}function fE(i){i.isProjectionDirty=i.isSharedProjectionDirty=i.isTransformDirty=!1}function dE(i){i.clearSnapshot()}function Ey(i){i.clearMeasurements()}function Ay(i){i.isLayoutDirty=!1}function hE(i){const{visualElement:l}=i.options;l&&l.getProps().onBeforeLayoutMeasure&&l.notify("BeforeLayoutMeasure"),i.resetTransform()}function Dy(i){i.finishAnimation(),i.targetDelta=i.relativeTarget=i.target=void 0,i.isProjectionDirty=!0}function mE(i){i.resolveTargetDelta()}function pE(i){i.calcProjection()}function yE(i){i.resetSkewAndRotation()}function gE(i){i.removeLeadSnapshot()}function My(i,l,u){i.translate=jt(l.translate,0,u),i.scale=jt(l.scale,1,u),i.origin=l.origin,i.originPoint=l.originPoint}function _y(i,l,u,o){i.min=jt(l.min,u.min,o),i.max=jt(l.max,u.max,o)}function vE(i,l,u,o){_y(i.x,l.x,u.x,o),_y(i.y,l.y,u.y,o)}function SE(i){return i.animationValues&&i.animationValues.opacityExit!==void 0}const bE={duration:.45,ease:[.4,0,.1,1]},Cy=i=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(i),Vy=Cy("applewebkit/")&&!Cy("chrome/")?Math.round:Ye;function wy(i){i.min=Vy(i.min),i.max=Vy(i.max)}function TE(i){wy(i.x),wy(i.y)}function Mg(i,l,u){return i==="position"||i==="preserve-aspect"&&!kx(vy(l),vy(u),.2)}function xE(i){var l;return i!==i.root&&((l=i.scroll)==null?void 0:l.wasRoot)}const EE=Dg({attachResizeListener:(i,l)=>Ml(i,"resize",l),measureScroll:()=>{var i,l;return{x:document.documentElement.scrollLeft||((i=document.body)==null?void 0:i.scrollLeft)||0,y:document.documentElement.scrollTop||((l=document.body)==null?void 0:l.scrollTop)||0}},checkIsScrollRoot:()=>!0}),nc={current:void 0},_g=Dg({measureScroll:i=>({x:i.scrollLeft,y:i.scrollTop}),defaultParent:()=>{if(!nc.current){const i=new EE({});i.mount(window),i.setOptions({layoutScroll:!0}),nc.current=i}return nc.current},resetTransform:(i,l)=>{i.style.transform=l!==void 0?l:"none"},checkIsScrollRoot:i=>window.getComputedStyle(i).position==="fixed"}),wl=j.createContext({transformPagePoint:i=>i,isStatic:!1,reducedMotion:"never"});function Ry(i,l){if(typeof i=="function")return i(l);i!=null&&(i.current=l)}function AE(...i){return l=>{let u=!1;const o=i.map(c=>{const h=Ry(c,l);return!u&&typeof h=="function"&&(u=!0),h});if(u)return()=>{for(let c=0;c{const{width:b,height:V,top:w,left:H,right:X,bottom:q}=m.current;if(l||!f.current||!b||!V)return;const Q=u==="left"?`left: ${H}`:`right: ${X}`,Y=o==="bottom"?`bottom: ${q}`:`top: ${w}`;f.current.dataset.motionPopId=h;const Z=document.createElement("style");y&&(Z.nonce=y);const K=c??document.head;return K.appendChild(Z),Z.sheet&&Z.sheet.insertRule(` + [data-motion-pop-id="${h}"] { + position: absolute !important; + width: ${b}px !important; + height: ${V}px !important; + ${Q}px !important; + ${Y}px !important; + } + `),()=>{K.contains(Z)&&K.removeChild(Z)}},[l]),A.jsx(ME,{isPresent:l,childRef:f,sizeRef:m,children:j.cloneElement(i,{ref:v})})}const CE=({children:i,initial:l,isPresent:u,onExitComplete:o,custom:c,presenceAffectsLayout:h,mode:f,anchorX:m,anchorY:y,root:p})=>{const v=Ei(VE),S=j.useId();let b=!0,V=j.useMemo(()=>(b=!1,{id:S,initial:l,isPresent:u,custom:c,onExitComplete:w=>{v.set(w,!0);for(const H of v.values())if(!H)return;o&&o()},register:w=>(v.set(w,!1),()=>v.delete(w))}),[u,v,o]);return h&&b&&(V={...V}),j.useMemo(()=>{v.forEach((w,H)=>v.set(H,!1))},[u]),j.useEffect(()=>{!u&&!v.size&&o&&o()},[u]),f==="popLayout"&&(i=A.jsx(_E,{isPresent:u,anchorX:m,anchorY:y,root:p,children:i})),A.jsx(pu.Provider,{value:V,children:i})};function VE(){return new Map}function Cg(i=!0){const l=j.useContext(pu);if(l===null)return[!0,null];const{isPresent:u,onExitComplete:o,register:c}=l,h=j.useId();j.useEffect(()=>{if(i)return c(h)},[i]);const f=j.useCallback(()=>i&&o&&o(h),[h,o,i]);return!u&&o?[!1,f]:[!0]}const $s=i=>i.key||"";function Ny(i){const l=[];return j.Children.forEach(i,u=>{j.isValidElement(u)&&l.push(u)}),l}const Vg=({children:i,custom:l,initial:u=!0,onExitComplete:o,presenceAffectsLayout:c=!0,mode:h="sync",propagate:f=!1,anchorX:m="left",anchorY:y="top",root:p})=>{const[v,S]=Cg(f),b=j.useMemo(()=>Ny(i),[i]),V=f&&!v?[]:b.map($s),w=j.useRef(!0),H=j.useRef(b),X=Ei(()=>new Map),q=j.useRef(new Set),[Q,Y]=j.useState(b),[Z,K]=j.useState(b);Hc(()=>{w.current=!1,H.current=b;for(let P=0;P{const st=$s(P),Rt=f&&!v?!1:b===Z||V.includes(st),Ht=()=>{if(q.current.has(st))return;if(q.current.add(st),X.has(st))X.set(st,!0);else return;let Xt=!0;X.forEach(Xe=>{Xe||(Xt=!1)}),Xt&&(et==null||et(),K(H.current),f&&(S==null||S()),o&&o())};return A.jsx(CE,{isPresent:Rt,initial:!w.current||u?void 0:!1,custom:l,presenceAffectsLayout:c,mode:h,root:p,onExitComplete:Rt?void 0:Ht,anchorX:m,anchorY:y,children:P},st)})})},wg=j.createContext({strict:!1}),Oy={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let zy=!1;function wE(){if(zy)return;const i={};for(const l in Oy)i[l]={isEnabled:u=>Oy[l].some(o=>!!u[o])};ag(i),zy=!0}function Rg(){return wE(),yx()}function RE(i){const l=Rg();for(const u in i)l[u]={...l[u],...i[u]};ag(l)}const NE=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function du(i){return i.startsWith("while")||i.startsWith("drag")&&i!=="draggable"||i.startsWith("layout")||i.startsWith("onTap")||i.startsWith("onPan")||i.startsWith("onLayout")||NE.has(i)}let Ng=i=>!du(i);function OE(i){typeof i=="function"&&(Ng=l=>l.startsWith("on")?!du(l):i(l))}try{OE(require("@emotion/is-prop-valid").default)}catch{}function zE(i,l,u){const o={};for(const c in i)c==="values"&&typeof i.values=="object"||(Ng(c)||u===!0&&du(c)||!l&&!du(c)||i.draggable&&c.startsWith("onDrag"))&&(o[c]=i[c]);return o}const Su=j.createContext({});function jE(i,l){if(vu(i)){const{initial:u,animate:o}=i;return{initial:u===!1||Dl(u)?u:void 0,animate:Dl(o)?o:void 0}}return i.inherit!==!1?l:{}}function LE(i){const{initial:l,animate:u}=jE(i,j.useContext(Su));return j.useMemo(()=>({initial:l,animate:u}),[jy(l),jy(u)])}function jy(i){return Array.isArray(i)?i.join(" "):i}const mf=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Og(i,l,u){for(const o in l)!$t(l[o])&&!fg(o,u)&&(i[o]=l[o])}function UE({transformTemplate:i},l){return j.useMemo(()=>{const u=mf();return df(u,l,i),Object.assign({},u.vars,u.style)},[l])}function BE(i,l){const u=i.style||{},o={};return Og(o,u,i),Object.assign(o,UE(i,l)),o}function HE(i,l){const u={},o=BE(i,l);return i.drag&&i.dragListener!==!1&&(u.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=i.drag===!0?"none":`pan-${i.drag==="x"?"y":"x"}`),i.tabIndex===void 0&&(i.onTap||i.onTapStart||i.whileTap)&&(u.tabIndex=0),u.style=o,u}const zg=()=>({...mf(),attrs:{}});function qE(i,l,u,o){const c=j.useMemo(()=>{const h=zg();return dg(h,l,mg(o),i.transformTemplate,i.style),{...h.attrs,style:{...h.style}}},[l]);if(i.style){const h={};Og(h,i.style,i),c.style={...h,...c.style}}return c}const GE=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function pf(i){return typeof i!="string"||i.includes("-")?!1:!!(GE.indexOf(i)>-1||/[A-Z]/u.test(i))}function YE(i,l,u,{latestValues:o},c,h=!1,f){const y=(f??pf(i)?qE:HE)(l,o,c,i),p=zE(l,typeof i=="string",h),v=i!==j.Fragment?{...p,...y,ref:u}:{},{children:S}=l,b=j.useMemo(()=>$t(S)?S.get():S,[S]);return j.createElement(i,{...v,children:b})}function XE({scrapeMotionValuesFromProps:i,createRenderState:l},u,o,c){return{latestValues:kE(u,o,c,i),renderState:l()}}function kE(i,l,u,o){const c={},h=o(i,{});for(const b in h)c[b]=iu(h[b]);let{initial:f,animate:m}=i;const y=vu(i),p=ig(i);l&&p&&!y&&i.inherit!==!1&&(f===void 0&&(f=l.initial),m===void 0&&(m=l.animate));let v=u?u.initial===!1:!1;v=v||f===!1;const S=v?m:f;if(S&&typeof S!="boolean"&&!gu(S)){const b=Array.isArray(S)?S:[S];for(let V=0;V(l,u)=>{const o=j.useContext(Su),c=j.useContext(pu),h=()=>XE(i,l,o,c);return u?h():Ei(h)},QE=jg({scrapeMotionValuesFromProps:hf,createRenderState:mf}),ZE=jg({scrapeMotionValuesFromProps:pg,createRenderState:zg}),KE=Symbol.for("motionComponentSymbol");function IE(i,l,u){const o=j.useRef(u);j.useInsertionEffect(()=>{o.current=u});const c=j.useRef(null);return j.useCallback(h=>{var m;h&&((m=i.onMount)==null||m.call(i,h)),l&&(h?l.mount(h):l.unmount());const f=o.current;if(typeof f=="function")if(h){const y=f(h);typeof y=="function"&&(c.current=y)}else c.current?(c.current(),c.current=null):f(h);else f&&(f.current=h)},[l])}const Lg=j.createContext({});function yl(i){return i&&typeof i=="object"&&Object.prototype.hasOwnProperty.call(i,"current")}function FE(i,l,u,o,c,h){var Y,Z;const{visualElement:f}=j.useContext(Su),m=j.useContext(wg),y=j.useContext(pu),p=j.useContext(wl),v=p.reducedMotion,S=p.skipAnimations,b=j.useRef(null),V=j.useRef(!1);o=o||m.renderer,!b.current&&o&&(b.current=o(i,{visualState:l,parent:f,props:u,presenceContext:y,blockInitialAnimation:y?y.initial===!1:!1,reducedMotionConfig:v,skipAnimations:S,isSVG:h}),V.current&&b.current&&(b.current.manuallyAnimateOnMount=!0));const w=b.current,H=j.useContext(Lg);w&&!w.projection&&c&&(w.type==="html"||w.type==="svg")&&JE(b.current,u,c,H);const X=j.useRef(!1);j.useInsertionEffect(()=>{w&&X.current&&w.update(u,y)});const q=u[k0],Q=j.useRef(!!q&&!((Y=window.MotionHandoffIsComplete)!=null&&Y.call(window,q))&&((Z=window.MotionHasOptimisedAnimation)==null?void 0:Z.call(window,q)));return Hc(()=>{V.current=!0,w&&(X.current=!0,window.MotionIsMounted=!0,w.updateFeatures(),w.scheduleRenderMicrotask(),Q.current&&w.animationState&&w.animationState.animateChanges())}),j.useEffect(()=>{w&&(!Q.current&&w.animationState&&w.animationState.animateChanges(),Q.current&&(queueMicrotask(()=>{var K;(K=window.MotionHandoffMarkAsComplete)==null||K.call(window,q)}),Q.current=!1),w.enteringChildren=void 0)}),w}function JE(i,l,u,o){const{layoutId:c,layout:h,drag:f,dragConstraints:m,layoutScroll:y,layoutRoot:p,layoutCrossfade:v}=l;i.projection=new u(i.latestValues,l["data-framer-portal-id"]?void 0:Ug(i.parent)),i.projection.setOptions({layoutId:c,layout:h,alwaysMeasureLayout:!!f||m&&yl(m),visualElement:i,animationType:typeof h=="string"?h:"both",initialPromotionConfig:o,crossfade:v,layoutScroll:y,layoutRoot:p})}function Ug(i){if(i)return i.options.allowProjection!==!1?i.projection:Ug(i.parent)}function ic(i,{forwardMotionProps:l=!1,type:u}={},o,c){o&&RE(o);const h=u?u==="svg":pf(i),f=h?ZE:QE;function m(p,v){let S;const b={...j.useContext(wl),...p,layoutId:PE(p)},{isStatic:V}=b,w=LE(p),H=f(p,V);if(!V&&s0){WE();const X=$E(b);S=X.MeasureLayout,w.visualElement=FE(i,H,b,c,X.ProjectionNode,h)}return A.jsxs(Su.Provider,{value:w,children:[S&&w.visualElement?A.jsx(S,{visualElement:w.visualElement,...b}):null,YE(i,p,IE(H,w.visualElement,v),H,V,l,h)]})}m.displayName=`motion.${typeof i=="string"?i:`create(${i.displayName??i.name??""})`}`;const y=j.forwardRef(m);return y[KE]=i,y}function PE({layoutId:i}){const l=j.useContext(Bc).id;return l&&i!==void 0?l+"-"+i:i}function WE(i,l){j.useContext(wg).strict}function $E(i){const l=Rg(),{drag:u,layout:o}=l;if(!u&&!o)return{};const c={...u,...o};return{MeasureLayout:u!=null&&u.isEnabled(i)||o!=null&&o.isEnabled(i)?c.MeasureLayout:void 0,ProjectionNode:c.ProjectionNode}}function tA(i,l){if(typeof Proxy>"u")return ic;const u=new Map,o=(h,f)=>ic(h,f,i,l),c=(h,f)=>o(h,f);return new Proxy(c,{get:(h,f)=>f==="create"?o:(u.has(f)||u.set(f,ic(f,void 0,i,l)),u.get(f))})}const eA=(i,l)=>l.isSVG??pf(i)?new Ox(l):new _x(l,{allowProjection:i!==j.Fragment});class nA extends Wn{constructor(l){super(l),l.animationState||(l.animationState=Bx(l))}updateAnimationControlsSubscription(){const{animate:l}=this.node.getProps();gu(l)&&(this.unmountControls=l.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:l}=this.node.getProps(),{animate:u}=this.node.prevProps||{};l!==u&&this.updateAnimationControlsSubscription()}unmount(){var l;this.node.animationState.reset(),(l=this.unmountControls)==null||l.call(this)}}let iA=0;class aA extends Wn{constructor(){super(...arguments),this.id=iA++}update(){if(!this.node.presenceContext)return;const{isPresent:l,onExitComplete:u}=this.node.presenceContext,{isPresent:o}=this.node.prevPresenceContext||{};if(!this.node.animationState||l===o)return;const c=this.node.animationState.setActive("exit",!l);u&&!l&&c.then(()=>{u(this.id)})}mount(){const{register:l,onExitComplete:u}=this.node.presenceContext||{};u&&u(this.id),l&&(this.unmount=l(this.id))}unmount(){}}const lA={animation:{Feature:nA},exit:{Feature:aA}};function Rl(i){return{point:{x:i.pageX,y:i.pageY}}}const sA=i=>l=>of(l)&&i(l,Rl(l));function Tl(i,l,u,o){return Ml(i,l,sA(u),o)}const Bg=({current:i})=>i?i.ownerDocument.defaultView:null,Ly=(i,l)=>Math.abs(i-l);function uA(i,l){const u=Ly(i.x,l.x),o=Ly(i.y,l.y);return Math.sqrt(u**2+o**2)}const Uy=new Set(["auto","scroll"]);class Hg{constructor(l,u,{transformPagePoint:o,contextWindow:c=window,dragSnapToOrigin:h=!1,distanceThreshold:f=3,element:m}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=V=>{this.handleScroll(V.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const V=lc(this.lastMoveEventInfo,this.history),w=this.startEvent!==null,H=uA(V.offset,{x:0,y:0})>=this.distanceThreshold;if(!w&&!H)return;const{point:X}=V,{timestamp:q}=le;this.history.push({...X,timestamp:q});const{onStart:Q,onMove:Y}=this.handlers;w||(Q&&Q(this.lastMoveEvent,V),this.startEvent=this.lastMoveEvent),Y&&Y(this.lastMoveEvent,V)},this.handlePointerMove=(V,w)=>{this.lastMoveEvent=V,this.lastMoveEventInfo=ac(w,this.transformPagePoint),Vt.update(this.updatePoint,!0)},this.handlePointerUp=(V,w)=>{this.end();const{onEnd:H,onSessionEnd:X,resumeAnimation:q}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&q&&q(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const Q=lc(V.type==="pointercancel"?this.lastMoveEventInfo:ac(w,this.transformPagePoint),this.history);this.startEvent&&H&&H(V,Q),X&&X(V,Q)},!of(l))return;this.dragSnapToOrigin=h,this.handlers=u,this.transformPagePoint=o,this.distanceThreshold=f,this.contextWindow=c||window;const y=Rl(l),p=ac(y,this.transformPagePoint),{point:v}=p,{timestamp:S}=le;this.history=[{...v,timestamp:S}];const{onSessionStart:b}=u;b&&b(l,lc(p,this.history)),this.removeListeners=_l(Tl(this.contextWindow,"pointermove",this.handlePointerMove),Tl(this.contextWindow,"pointerup",this.handlePointerUp),Tl(this.contextWindow,"pointercancel",this.handlePointerUp)),m&&this.startScrollTracking(m)}startScrollTracking(l){let u=l.parentElement;for(;u;){const o=getComputedStyle(u);(Uy.has(o.overflowX)||Uy.has(o.overflowY))&&this.scrollPositions.set(u,{x:u.scrollLeft,y:u.scrollTop}),u=u.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener("scroll",this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(l){const u=this.scrollPositions.get(l);if(!u)return;const o=l===window,c=o?{x:window.scrollX,y:window.scrollY}:{x:l.scrollLeft,y:l.scrollTop},h={x:c.x-u.x,y:c.y-u.y};h.x===0&&h.y===0||(o?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=h.x,this.lastMoveEventInfo.point.y+=h.y):this.history.length>0&&(this.history[0].x-=h.x,this.history[0].y-=h.y),this.scrollPositions.set(l,c),Vt.update(this.updatePoint,!0))}updateHandlers(l){this.handlers=l}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),xn(this.updatePoint)}}function ac(i,l){return l?{point:l(i.point)}:i}function By(i,l){return{x:i.x-l.x,y:i.y-l.y}}function lc({point:i},l){return{point:i,delta:By(i,qg(l)),offset:By(i,oA(l)),velocity:rA(l,.1)}}function oA(i){return i[0]}function qg(i){return i[i.length-1]}function rA(i,l){if(i.length<2)return{x:0,y:0};let u=i.length-1,o=null;const c=qg(i);for(;u>=0&&(o=i[u],!(c.timestamp-o.timestamp>bn(l)));)u--;if(!o)return{x:0,y:0};const h=Ge(c.timestamp-o.timestamp);if(h===0)return{x:0,y:0};const f={x:(c.x-o.x)/h,y:(c.y-o.y)/h};return f.x===1/0&&(f.x=0),f.y===1/0&&(f.y=0),f}function cA(i,{min:l,max:u},o){return l!==void 0&&iu&&(i=o?jt(u,i,o.max):Math.min(i,u)),i}function Hy(i,l,u){return{min:l!==void 0?i.min+l:void 0,max:u!==void 0?i.max+u-(i.max-i.min):void 0}}function fA(i,{top:l,left:u,bottom:o,right:c}){return{x:Hy(i.x,u,c),y:Hy(i.y,l,o)}}function qy(i,l){let u=l.min-i.min,o=l.max-i.max;return l.max-l.mino?u=xl(l.min,l.max-o,i.min):o>c&&(u=xl(i.min,i.max-c,l.min)),tn(0,1,u)}function mA(i,l){const u={};return l.min!==void 0&&(u.min=l.min-i.min),l.max!==void 0&&(u.max=l.max-i.min),u}const jc=.35;function pA(i=jc){return i===!1?i=0:i===!0&&(i=jc),{x:Gy(i,"left","right"),y:Gy(i,"top","bottom")}}function Gy(i,l,u){return{min:Yy(i,l),max:Yy(i,u)}}function Yy(i,l){return typeof i=="number"?i:i[l]||0}const yA=new WeakMap;class gA{constructor(l){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Jt(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=l}start(l,{snapToCursor:u=!1,distanceThreshold:o}={}){const{presenceContext:c}=this.visualElement;if(c&&c.isPresent===!1)return;const h=S=>{u?(this.stopAnimation(),this.snapToCursor(Rl(S).point)):this.pauseAnimation()},f=(S,b)=>{this.stopAnimation();const{drag:V,dragPropagation:w,onDragStart:H}=this.getProps();if(V&&!w&&(this.openDragLock&&this.openDragLock(),this.openDragLock=tx(V),!this.openDragLock))return;this.latestPointerEvent=S,this.latestPanInfo=b,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),qe(q=>{let Q=this.getAxisMotionValue(q).get()||0;if($e.test(Q)){const{projection:Y}=this.visualElement;if(Y&&Y.layout){const Z=Y.layout.layoutBox[q];Z&&(Q=ce(Z)*(parseFloat(Q)/100))}}this.originPoint[q]=Q}),H&&Vt.update(()=>H(S,b),!1,!0),Cc(this.visualElement,"transform");const{animationState:X}=this.visualElement;X&&X.setActive("whileDrag",!0)},m=(S,b)=>{this.latestPointerEvent=S,this.latestPanInfo=b;const{dragPropagation:V,dragDirectionLock:w,onDirectionLock:H,onDrag:X}=this.getProps();if(!V&&!this.openDragLock)return;const{offset:q}=b;if(w&&this.currentDirection===null){this.currentDirection=vA(q),this.currentDirection!==null&&H&&H(this.currentDirection);return}this.updateAxis("x",b.point,q),this.updateAxis("y",b.point,q),this.visualElement.render(),X&&Vt.update(()=>X(S,b),!1,!0)},y=(S,b)=>{this.latestPointerEvent=S,this.latestPanInfo=b,this.stop(S,b),this.latestPointerEvent=null,this.latestPanInfo=null},p=()=>qe(S=>{var b;return this.getAnimationState(S)==="paused"&&((b=this.getAxisMotionValue(S).animation)==null?void 0:b.play())}),{dragSnapToOrigin:v}=this.getProps();this.panSession=new Hg(l,{onSessionStart:h,onStart:f,onMove:m,onSessionEnd:y,resumeAnimation:p},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:v,distanceThreshold:o,contextWindow:Bg(this.visualElement),element:this.visualElement.current})}stop(l,u){const o=l||this.latestPointerEvent,c=u||this.latestPanInfo,h=this.isDragging;if(this.cancel(),!h||!c||!o)return;const{velocity:f}=c;this.startAnimation(f);const{onDragEnd:m}=this.getProps();m&&Vt.postRender(()=>m(o,c))}cancel(){this.isDragging=!1;const{projection:l,animationState:u}=this.visualElement;l&&(l.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:o}=this.getProps();!o&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),u&&u.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(l,u,o){const{drag:c}=this.getProps();if(!o||!tu(l,c,this.currentDirection))return;const h=this.getAxisMotionValue(l);let f=this.originPoint[l]+o[l];this.constraints&&this.constraints[l]&&(f=cA(f,this.constraints[l],this.elastic[l])),h.set(f)}resolveConstraints(){var h;const{dragConstraints:l,dragElastic:u}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(h=this.visualElement.projection)==null?void 0:h.layout,c=this.constraints;l&&yl(l)?this.constraints||(this.constraints=this.resolveRefConstraints()):l&&o?this.constraints=fA(o.layoutBox,l):this.constraints=!1,this.elastic=pA(u),c!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&qe(f=>{this.constraints!==!1&&this.getAxisMotionValue(f)&&(this.constraints[f]=mA(o.layoutBox[f],this.constraints[f]))})}resolveRefConstraints(){const{dragConstraints:l,onMeasureDragConstraints:u}=this.getProps();if(!l||!yl(l))return!1;const o=l.current,{projection:c}=this.visualElement;if(!c||!c.layout)return!1;const h=Tx(o,c.root,this.visualElement.getTransformPagePoint());let f=dA(c.layout.layoutBox,h);if(u){const m=u(vx(f));this.hasMutatedConstraints=!!m,m&&(f=sg(m))}return f}startAnimation(l){const{drag:u,dragMomentum:o,dragElastic:c,dragTransition:h,dragSnapToOrigin:f,onDragTransitionEnd:m}=this.getProps(),y=this.constraints||{},p=qe(v=>{if(!tu(v,u,this.currentDirection))return;let S=y&&y[v]||{};f&&(S={min:0,max:0});const b=c?200:1e6,V=c?40:1e7,w={type:"inertia",velocity:o?l[v]:0,bounceStiffness:b,bounceDamping:V,timeConstant:750,restDelta:1,restSpeed:10,...h,...S};return this.startAxisValueAnimation(v,w)});return Promise.all(p).then(m)}startAxisValueAnimation(l,u){const o=this.getAxisMotionValue(l);return Cc(this.visualElement,l),o.start(nf(l,o,0,u,this.visualElement,!1))}stopAnimation(){qe(l=>this.getAxisMotionValue(l).stop())}pauseAnimation(){qe(l=>{var u;return(u=this.getAxisMotionValue(l).animation)==null?void 0:u.pause()})}getAnimationState(l){var u;return(u=this.getAxisMotionValue(l).animation)==null?void 0:u.state}getAxisMotionValue(l){const u=`_drag${l.toUpperCase()}`,o=this.visualElement.getProps(),c=o[u];return c||this.visualElement.getValue(l,(o.initial?o.initial[l]:void 0)||0)}snapToCursor(l){qe(u=>{const{drag:o}=this.getProps();if(!tu(u,o,this.currentDirection))return;const{projection:c}=this.visualElement,h=this.getAxisMotionValue(u);if(c&&c.layout){const{min:f,max:m}=c.layout.layoutBox[u],y=h.get()||0;h.set(l[u]-jt(f,m,.5)+y)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:l,dragConstraints:u}=this.getProps(),{projection:o}=this.visualElement;if(!yl(u)||!o||!this.constraints)return;this.stopAnimation();const c={x:0,y:0};qe(f=>{const m=this.getAxisMotionValue(f);if(m&&this.constraints!==!1){const y=m.get();c[f]=hA({min:y,max:y},this.constraints[f])}});const{transformTemplate:h}=this.visualElement.getProps();this.visualElement.current.style.transform=h?h({},""):"none",o.root&&o.root.updateScroll(),o.updateLayout(),this.resolveConstraints(),qe(f=>{if(!tu(f,l,null))return;const m=this.getAxisMotionValue(f),{min:y,max:p}=this.constraints[f];m.set(jt(y,p,c[f]))})}addListeners(){if(!this.visualElement.current)return;yA.set(this.visualElement,this);const l=this.visualElement.current,u=Tl(l,"pointerdown",y=>{const{drag:p,dragListener:v=!0}=this.getProps(),S=y.target,b=S!==l&&lx(S);p&&v&&!b&&this.start(y)}),o=()=>{const{dragConstraints:y}=this.getProps();yl(y)&&y.current&&(this.constraints=this.resolveRefConstraints())},{projection:c}=this.visualElement,h=c.addEventListener("measure",o);c&&!c.layout&&(c.root&&c.root.updateScroll(),c.updateLayout()),Vt.read(o);const f=Ml(window,"resize",()=>this.scalePositionWithinConstraints()),m=c.addEventListener("didUpdate",(({delta:y,hasLayoutChanged:p})=>{this.isDragging&&p&&(qe(v=>{const S=this.getAxisMotionValue(v);S&&(this.originPoint[v]+=y[v].translate,S.set(S.get()+y[v].translate))}),this.visualElement.render())}));return()=>{f(),u(),h(),m&&m()}}getProps(){const l=this.visualElement.getProps(),{drag:u=!1,dragDirectionLock:o=!1,dragPropagation:c=!1,dragConstraints:h=!1,dragElastic:f=jc,dragMomentum:m=!0}=l;return{...l,drag:u,dragDirectionLock:o,dragPropagation:c,dragConstraints:h,dragElastic:f,dragMomentum:m}}}function tu(i,l,u){return(l===!0||l===i)&&(u===null||u===i)}function vA(i,l=10){let u=null;return Math.abs(i.y)>l?u="y":Math.abs(i.x)>l&&(u="x"),u}class SA extends Wn{constructor(l){super(l),this.removeGroupControls=Ye,this.removeListeners=Ye,this.controls=new gA(l)}mount(){const{dragControls:l}=this.node.getProps();l&&(this.removeGroupControls=l.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ye}update(){const{dragControls:l}=this.node.getProps(),{dragControls:u}=this.node.prevProps||{};l!==u&&(this.removeGroupControls(),l&&(this.removeGroupControls=l.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const sc=i=>(l,u)=>{i&&Vt.update(()=>i(l,u),!1,!0)};class bA extends Wn{constructor(){super(...arguments),this.removePointerDownListener=Ye}onPointerDown(l){this.session=new Hg(l,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Bg(this.node)})}createPanHandlers(){const{onPanSessionStart:l,onPanStart:u,onPan:o,onPanEnd:c}=this.node.getProps();return{onSessionStart:sc(l),onStart:sc(u),onMove:sc(o),onEnd:(h,f)=>{delete this.session,c&&Vt.postRender(()=>c(h,f))}}}mount(){this.removePointerDownListener=Tl(this.node.current,"pointerdown",l=>this.onPointerDown(l))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let uc=!1;class TA extends j.Component{componentDidMount(){const{visualElement:l,layoutGroup:u,switchLayoutGroup:o,layoutId:c}=this.props,{projection:h}=l;h&&(u.group&&u.group.add(h),o&&o.register&&c&&o.register(h),uc&&h.root.didUpdate(),h.addEventListener("animationComplete",()=>{this.safeToRemove()}),h.setOptions({...h.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),au.hasEverUpdated=!0}getSnapshotBeforeUpdate(l){const{layoutDependency:u,visualElement:o,drag:c,isPresent:h}=this.props,{projection:f}=o;return f&&(f.isPresent=h,l.layoutDependency!==u&&f.setOptions({...f.options,layoutDependency:u}),uc=!0,c||l.layoutDependency!==u||u===void 0||l.isPresent!==h?f.willUpdate():this.safeToRemove(),l.isPresent!==h&&(h?f.promote():f.relegate()||Vt.postRender(()=>{const m=f.getStack();(!m||!m.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:l}=this.props.visualElement;l&&(l.root.didUpdate(),uf.postRender(()=>{!l.currentAnimation&&l.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:l,layoutGroup:u,switchLayoutGroup:o}=this.props,{projection:c}=l;uc=!0,c&&(c.scheduleCheckAfterUnmount(),u&&u.group&&u.group.remove(c),o&&o.deregister&&o.deregister(c))}safeToRemove(){const{safeToRemove:l}=this.props;l&&l()}render(){return null}}function Gg(i){const[l,u]=Cg(),o=j.useContext(Bc);return A.jsx(TA,{...i,layoutGroup:o,switchLayoutGroup:j.useContext(Lg),isPresent:l,safeToRemove:u})}const xA={pan:{Feature:bA},drag:{Feature:SA,ProjectionNode:_g,MeasureLayout:Gg}};function Xy(i,l,u){const{props:o}=i;i.animationState&&o.whileHover&&i.animationState.setActive("whileHover",u==="Start");const c="onHover"+u,h=o[c];h&&Vt.postRender(()=>h(l,Rl(l)))}class EA extends Wn{mount(){const{current:l}=this.node;l&&(this.unmount=ex(l,(u,o)=>(Xy(this.node,o,"Start"),c=>Xy(this.node,c,"End"))))}unmount(){}}class AA extends Wn{constructor(){super(...arguments),this.isActive=!1}onFocus(){let l=!1;try{l=this.node.current.matches(":focus-visible")}catch{l=!0}!l||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=_l(Ml(this.node.current,"focus",()=>this.onFocus()),Ml(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function ky(i,l,u){const{props:o}=i;if(i.current instanceof HTMLButtonElement&&i.current.disabled)return;i.animationState&&o.whileTap&&i.animationState.setActive("whileTap",u==="Start");const c="onTap"+(u==="End"?"":u),h=o[c];h&&Vt.postRender(()=>h(l,Rl(l)))}class DA extends Wn{mount(){const{current:l}=this.node;l&&(this.unmount=ux(l,(u,o)=>(ky(this.node,o,"Start"),(c,{success:h})=>ky(this.node,c,h?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Lc=new WeakMap,oc=new WeakMap,MA=i=>{const l=Lc.get(i.target);l&&l(i)},_A=i=>{i.forEach(MA)};function CA({root:i,...l}){const u=i||document;oc.has(u)||oc.set(u,{});const o=oc.get(u),c=JSON.stringify(l);return o[c]||(o[c]=new IntersectionObserver(_A,{root:i,...l})),o[c]}function VA(i,l,u){const o=CA(l);return Lc.set(i,u),o.observe(i),()=>{Lc.delete(i),o.unobserve(i)}}const wA={some:0,all:1};class RA extends Wn{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:l={}}=this.node.getProps(),{root:u,margin:o,amount:c="some",once:h}=l,f={root:u?u.current:void 0,rootMargin:o,threshold:typeof c=="number"?c:wA[c]},m=y=>{const{isIntersecting:p}=y;if(this.isInView===p||(this.isInView=p,h&&!p&&this.hasEnteredView))return;p&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",p);const{onViewportEnter:v,onViewportLeave:S}=this.node.getProps(),b=p?v:S;b&&b(y)};return VA(this.node.current,f,m)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:l,prevProps:u}=this.node;["amount","margin","root"].some(NA(l,u))&&this.startObserver()}unmount(){}}function NA({viewport:i={}},{viewport:l={}}={}){return u=>i[u]!==l[u]}const OA={inView:{Feature:RA},tap:{Feature:DA},focus:{Feature:AA},hover:{Feature:EA}},zA={layout:{ProjectionNode:_g,MeasureLayout:Gg}},jA={...lA,...OA,...xA,...zA},Jn=tA(jA,eA);function hu(i){const l=Ei(()=>Ai(i)),{isStatic:u}=j.useContext(wl);if(u){const[,o]=j.useState(i);j.useEffect(()=>l.on("change",o),[])}return l}function Yg(i,l){const u=hu(l()),o=()=>u.set(l());return o(),Hc(()=>{const c=()=>Vt.preRender(o,!1,!0),h=i.map(f=>f.on("change",c));return()=>{h.forEach(f=>f()),xn(o)}}),u}function LA(i){Sl.current=[],i();const l=Yg(Sl.current,i);return Sl.current=void 0,l}function mu(i,l,u,o){if(typeof i=="function")return LA(i);if(u!==void 0&&!Array.isArray(u)&&typeof l!="function")return UA(i,l,u,o);const f=typeof l=="function"?l:rx(l,u,o);return Array.isArray(i)?Qy(i,f):Qy([i],([m])=>f(m))}function Qy(i,l){const u=Ei(()=>[]);return Yg(i,()=>{u.length=0;const o=i.length;for(let c=0;cObject.keys(u)),h=Ei(()=>({}));for(const f of c)h[f]=mu(i,l,u[f],o);return h}function BA(i,l={}){const{isStatic:u}=j.useContext(wl),o=()=>$t(i)?i.get():i;if(u)return mu(o);const c=hu(o());return j.useInsertionEffect(()=>cx(c,i,l),[c,JSON.stringify(l)]),c}function Zy(i,l={}){return BA(i,{type:"spring",...l})}function bu(){!rf.current&&ng();const[i]=j.useState(ou.current);return i}const HA="Inmerson",qA="Personal Math & Biotech Lab",GA="Inmerson Lab",YA="A personal interactive laboratory for mathematical modeling, biotechnology, observation and learning.",XA=({currentView:i,currentModule:l,setView:u,goHome:o,isOpen:c,toggleSidebar:h})=>{const m=(()=>{const y=[{type:"header",label:"Academic Tools"},{id:N.CHEAT_SHEET,label:"Cheat Sheet",icon:Js},{id:N.AI_CHAT,label:"AI Assistant",icon:Lb},{id:N.HOMEWORK,label:"Homework Exercises",icon:yb},{id:N.FINAL_EXAM,label:"Module Test",icon:hc}];switch(l){case J.MATRIX:return[{type:"header",label:"Core Concepts"},{id:N.BASICS,label:"Definitions",icon:XS},{id:N.OPERATIONS,label:"Operations",icon:ZS},{type:"header",label:"3D Space"},{id:N.VECTOR_OPS_3D,label:"Vector Lab (3D)",icon:HS},{id:N.VECTOR_3D,label:"Matrix Warper (3D)",icon:dl},{type:"header",label:"Linear Systems"},{id:N.GAUSSIAN,label:"Gaussian Elimination",icon:mc},{id:N.SYSTEMS,label:"Cramer's Systems",icon:zb},{id:N.INVERSE,label:"Inverse Matrix",icon:sb},{type:"header",label:"Spectral Theory"},{id:N.DETERMINANT,label:"Determinant",icon:i0},{id:N.EIGENVALUES,label:"Eigenvalues",icon:GS},...y];case J.SEQUENCES:return[{type:"header",label:"Sequence Analysis"},{id:N.SEQUENCES,label:"Limits & Monotonicity",icon:l0},{id:N.COBWEB,label:"Chaos & Cobweb",icon:Nb},{type:"header",label:"Visualization"},{id:N.SEQUENCES_3D,label:"3D Helix Visualizer",icon:dl},{type:"header",label:"Infinite Series"},{id:N.SERIES,label:"Partial Sums",icon:mc},...y];case J.FUNCTIONS:return[{type:"header",label:"Properties"},{id:N.FUNCTIONS,label:"Graphing & Domain",icon:$y},{id:N.TRANSFORMATIONS,label:"Transformations",icon:Mb},{type:"header",label:"3D Geometry"},{id:N.FUNCTIONS_3D,label:"Surface Plotter",icon:dl},{type:"header",label:"Applications"},{id:N.NEWTON,label:"Newton Optimization",icon:qb},...y];case J.LIMITS:return[{type:"header",label:"Analysis"},{id:N.FUNCTIONS,label:"Limit Analysis",icon:a0},{id:N.CONTINUITY,label:"Continuity & Holes",icon:Qb},{type:"header",label:"Multivariable"},{id:N.LIMITS_3D,label:"3D Limits",icon:dl},...y];case J.DERIVATIVES:return[{type:"header",label:"Calculus I"},{id:N.DERIVATIVE_RULES,label:"Rules & Formulas",icon:n0},{id:N.FUNCTION_ANALYSIS,label:"Curve Analysis",icon:FS},{type:"header",label:"Multivariable"},{id:N.DERIVATIVES_3D,label:"Tangent Planes (3D)",icon:dl},{type:"header",label:"Approximation"},{id:N.TAYLOR,label:"Taylor Series",icon:Fb},...y];case J.INTEGRALS:return[{type:"header",label:"Calculus II"},{id:N.INTEGRAL_BASICS,label:"Concept & Constant",icon:db},{id:N.INTEGRAL_RULES,label:"Rules & Formulas",icon:Kb},{type:"header",label:"Definite Integrals"},{id:N.AREA_UNDER_CURVE,label:"Area & FTC",icon:e0},{id:N.INTEGRALS_3D,label:"Solid of Revolution",icon:eb},...y];case J.DIFF_EQ:return[{type:"header",label:"Modeling Change"},{id:N.DIFF_BASICS,label:"Solutions & Curves",icon:Ab},{id:N.POPULATION_MODELS,label:"Population Bio-Models",icon:Bb},{id:N.RADIOACTIVE_DECAY,label:"Radioactive Decay",icon:Yb},{type:"header",label:"Chaos Theory"},{id:N.DIFF_EQ_3D,label:"Lorenz Attractor (3D)",icon:ob},...y];case J.EXAMS:return[{type:"header",label:"Examination Hall"},{id:N.CLASS_EXAM_1,label:"Class Exam I",icon:Js},{id:N.CLASS_EXAM_2,label:"Class Exam II",icon:Js},{id:N.CLASS_EXAM_3,label:"Class Exam III",icon:Js},{type:"header",label:"Final Assessment"},{id:N.FULL_EXAM,label:"Final Exam",icon:hc},{id:N.EXAM_ANALYSIS,label:"Performance Analytics",icon:PS}];default:return[]}})();return A.jsxs(A.Fragment,{children:[A.jsx(Vg,{children:c&&A.jsx(Jn.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:h,className:"fixed inset-0 bg-black/80 backdrop-blur-sm z-40 md:hidden"})}),A.jsxs(Jn.div,{className:` + framer-motion-sidebar + fixed top-0 bottom-0 left-0 w-72 z-50 + md:top-4 md:bottom-4 md:left-4 md:w-64 md:rounded-2xl + glass-panel + overflow-y-auto flex flex-col + border-r md:border border-white/10 + shadow-2xl shadow-black/50 + `,initial:!1,animate:{x:c?0:"-100%"},variants:{open:{x:0},closed:{x:"-100%"}},style:{},transition:{type:"spring",stiffness:300,damping:30},children:[A.jsx("style",{children:"@media (min-width: 768px) { .framer-motion-sidebar { transform: none !important; } }"}),A.jsx("div",{className:"absolute top-4 right-4 md:hidden",children:A.jsx("button",{onClick:h,className:"p-2 text-slate-400 hover:text-white transition-colors",children:A.jsx(Pb,{size:24})})}),A.jsxs("div",{className:"p-6 flex-1 flex flex-col",children:[A.jsxs("div",{className:"mb-10",children:[A.jsxs("button",{onClick:o,className:"flex items-center gap-2 text-[10px] font-bold text-slate-400 hover:text-accent-cyan uppercase tracking-widest transition-colors mb-6 group pl-1",children:[A.jsx(LS,{size:12,className:"group-hover:-translate-x-1 transition-transform"}),"Back to Dashboard"]}),A.jsxs("div",{className:"flex items-center gap-4",children:[A.jsx("div",{className:"w-10 h-10 rounded-xl bg-gradient-to-br from-accent-cyan to-accent-blue flex items-center justify-center shadow-lg shadow-accent-cyan/20 text-white shrink-0",children:A.jsx(dc,{size:20})}),A.jsxs("div",{children:[A.jsx("h1",{className:"font-bold text-white text-base leading-tight tracking-tight",children:GA}),A.jsx("div",{className:"text-[10px] font-mono text-accent-cyan uppercase tracking-wider mt-0.5 opacity-80",children:l.replace("_"," ")})]})]})]}),A.jsx("nav",{className:"space-y-1",children:m.map((y,p)=>{if(y.type==="header")return A.jsx("div",{className:"pt-6 pb-2 px-3 text-[10px] font-bold text-slate-500 uppercase tracking-[0.2em] font-mono",children:y.label},`head-${p}`);const v=y.icon,S=i===y.id;return A.jsxs("button",{onClick:()=>{u(y.id),window.innerWidth<768&&h()},className:` + relative w-full flex items-center gap-3 px-3 py-2.5 rounded-xl transition-all duration-300 group overflow-hidden + ${S?"text-white":"text-slate-400 hover:text-slate-200"} + `,children:[S&&A.jsx(Jn.div,{layoutId:"activeNavBg",className:"absolute inset-0 bg-accent-cyan/10 border border-accent-cyan/20 rounded-xl",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},children:A.jsx("div",{className:"absolute inset-0 bg-accent-cyan/5 blur-md"})}),S&&A.jsx(Jn.div,{layoutId:"activeNavDot",className:"absolute left-1.5 w-1 h-1 bg-accent-cyan rounded-full shadow-[0_0_8px_#00f6ff]"}),A.jsx("div",{className:`relative z-10 transition-colors ${S?"text-accent-cyan translate-x-1":"text-slate-500 group-hover:text-slate-300"}`,children:A.jsx(v,{size:18,strokeWidth:S?2.5:2})}),A.jsx("span",{className:`relative z-10 text-[13px] font-medium tracking-tight transition-transform ${S?"translate-x-1":""}`,children:y.label}),A.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-white/0 via-white/5 to-white/0 -translate-x-full group-hover:translate-x-full transition-transform duration-700 ease-in-out pointer-events-none"})]},y.id)})}),A.jsx("div",{className:"mt-auto pt-8",children:A.jsx("div",{className:"p-4 rounded-xl bg-white/5 border border-white/5 backdrop-blur-md",children:A.jsxs("p",{className:"text-[10px] text-slate-400 leading-relaxed",children:[A.jsx("strong",{className:"text-slate-200",children:"Pro Tip:"})," Use the 3D visualizers to better understand complex concepts."]})})})]})]})]})},kA={[J.HOME]:N.BASICS,[J.MATRIX]:N.BASICS,[J.SEQUENCES]:N.SEQUENCES,[J.FUNCTIONS]:N.FUNCTIONS,[J.LIMITS]:N.FUNCTIONS,[J.DERIVATIVES]:N.DERIVATIVE_RULES,[J.INTEGRALS]:N.INTEGRAL_BASICS,[J.DIFF_EQ]:N.DIFF_BASICS,[J.EXAMS]:N.FULL_EXAM},Xg=[{module:J.MATRIX,view:N.BASICS,moduleTitle:"Matrix",title:"Matrix Definitions",description:"Rows, columns, dimensions and matrix notation.",keywords:["linear algebra","matrix basics","dimensions"]},{module:J.MATRIX,view:N.OPERATIONS,moduleTitle:"Matrix",title:"Matrix Operations",description:"Addition, subtraction, scalar and matrix multiplication.",keywords:["multiply matrices","matrix arithmetic"]},{module:J.MATRIX,view:N.GAUSSIAN,moduleTitle:"Matrix",title:"Gaussian Elimination",description:"Solve linear systems through row reduction.",keywords:["row echelon","rref","linear systems"]},{module:J.MATRIX,view:N.SYSTEMS,moduleTitle:"Matrix",title:"Cramer's Systems",description:"Solve systems with determinants and Cramerโ€™s rule.",keywords:["cramer rule","simultaneous equations"]},{module:J.MATRIX,view:N.INVERSE,moduleTitle:"Matrix",title:"Inverse Matrix",description:"Understand and calculate matrix inverses.",keywords:["inverse","identity matrix"]},{module:J.MATRIX,view:N.DETERMINANT,moduleTitle:"Matrix",title:"Determinant",description:"Interpret determinants geometrically and algebraically.",keywords:["det","area scale","volume scale"]},{module:J.MATRIX,view:N.EIGENVALUES,moduleTitle:"Matrix",title:"Eigenvalues",description:"Explore eigenvalues, eigenvectors and invariant directions.",keywords:["eigenvector","spectral theory"]},{module:J.MATRIX,view:N.VECTOR_OPS_3D,moduleTitle:"Matrix",title:"Vector Lab (3D)",description:"Visualize vector operations in three-dimensional space.",keywords:["vector","dot product","cross product","3d"]},{module:J.MATRIX,view:N.VECTOR_3D,moduleTitle:"Matrix",title:"Matrix Warper (3D)",description:"Observe linear transformations of space.",keywords:["linear transformation","basis","3d"]},{module:J.SEQUENCES,view:N.SEQUENCES,moduleTitle:"Sequences",title:"Limits & Monotonicity",description:"Study convergence, bounds and monotone sequences.",keywords:["sequence limit","convergence","monotonicity"]},{module:J.SEQUENCES,view:N.COBWEB,moduleTitle:"Sequences",title:"Chaos & Cobweb",description:"Observe iterative maps and sensitive dynamics.",keywords:["chaos","iteration","logistic map"]},{module:J.SEQUENCES,view:N.SEQUENCES_3D,moduleTitle:"Sequences",title:"3D Helix Visualizer",description:"Represent indexed values as spatial trajectories.",keywords:["helix","sequence visualization","3d"]},{module:J.SEQUENCES,view:N.SERIES,moduleTitle:"Sequences",title:"Partial Sums",description:"Build infinite series from their finite partial sums.",keywords:["series","summation","convergence tests"]},{module:J.FUNCTIONS,view:N.FUNCTIONS,moduleTitle:"Functions",title:"Graphing & Domain",description:"Inspect graphs, domains, ranges and key properties.",keywords:["function graph","domain","range"]},{module:J.FUNCTIONS,view:N.TRANSFORMATIONS,moduleTitle:"Functions",title:"Transformations",description:"Translate, scale and reflect mathematical functions.",keywords:["shift","reflection","stretch"]},{module:J.FUNCTIONS,view:N.FUNCTIONS_3D,moduleTitle:"Functions",title:"Surface Plotter (3D)",description:"Explore functions of two variables as surfaces.",keywords:["multivariable function","surface","3d"]},{module:J.FUNCTIONS,view:N.NEWTON,moduleTitle:"Functions",title:"Newton Optimization",description:"Use tangent-based iteration to locate roots and optima.",keywords:["newton method","root finding","optimization"]},{module:J.LIMITS,view:N.FUNCTIONS,moduleTitle:"Limits",title:"Limit Analysis",description:"Explore one-sided limits and asymptotic behavior.",keywords:["limit","asymptote","approach"]},{module:J.LIMITS,view:N.CONTINUITY,moduleTitle:"Limits",title:"Continuity & Holes",description:"Distinguish removable, jump and infinite discontinuities.",keywords:["continuity","discontinuity","holes"]},{module:J.LIMITS,view:N.LIMITS_3D,moduleTitle:"Limits",title:"3D Limits",description:"Approach multivariable limits from different paths.",keywords:["multivariable limit","path dependence","3d"]},{module:J.DERIVATIVES,view:N.DERIVATIVE_RULES,moduleTitle:"Derivatives",title:"Rules & Formulas",description:"Apply product, quotient and chain rules.",keywords:["differentiate","chain rule","product rule"]},{module:J.DERIVATIVES,view:N.FUNCTION_ANALYSIS,moduleTitle:"Derivatives",title:"Curve Analysis",description:"Find extrema, monotonicity and concavity intervals.",keywords:["critical points","maximum","minimum","concavity"]},{module:J.DERIVATIVES,view:N.DERIVATIVES_3D,moduleTitle:"Derivatives",title:"Tangent Planes (3D)",description:"Visualize partial derivatives and tangent planes.",keywords:["partial derivative","gradient","tangent plane"]},{module:J.DERIVATIVES,view:N.TAYLOR,moduleTitle:"Derivatives",title:"Taylor Series",description:"Approximate functions with local polynomial models.",keywords:["taylor","maclaurin","polynomial approximation"]},{module:J.INTEGRALS,view:N.INTEGRAL_BASICS,moduleTitle:"Integrals",title:"Integral Concept",description:"Connect antiderivatives, accumulation and constants.",keywords:["antiderivative","indefinite integral","constant"]},{module:J.INTEGRALS,view:N.INTEGRAL_RULES,moduleTitle:"Integrals",title:"Rules & Formulas",description:"Apply core integration rules and substitutions.",keywords:["integration rules","substitution"]},{module:J.INTEGRALS,view:N.AREA_UNDER_CURVE,moduleTitle:"Integrals",title:"Area & FTC",description:"Relate definite integrals to area and the fundamental theorem.",keywords:["fundamental theorem of calculus","definite integral","area"]},{module:J.INTEGRALS,view:N.INTEGRALS_3D,moduleTitle:"Integrals",title:"Solid of Revolution",description:"Generate and inspect volumes formed by rotation.",keywords:["volume","washer method","disk method","3d"]},{module:J.DIFF_EQ,view:N.DIFF_BASICS,moduleTitle:"Differential Equations",title:"Solutions & Curves",description:"Interpret differential equations and solution families.",keywords:["ode","solution curve","initial condition"]},{module:J.DIFF_EQ,view:N.POPULATION_MODELS,moduleTitle:"Differential Equations",title:"Population Models",description:"Compare exponential and logistic population growth.",keywords:["population growth","malthus","verhulst","logistic growth","biotechnology"]},{module:J.DIFF_EQ,view:N.RADIOACTIVE_DECAY,moduleTitle:"Differential Equations",title:"Radioactive Decay",description:"Model exponential decay and half-life.",keywords:["half life","decay","isotope"]},{module:J.DIFF_EQ,view:N.DIFF_EQ_3D,moduleTitle:"Differential Equations",title:"Lorenz Attractor (3D)",description:"Observe a classical nonlinear dynamical system.",keywords:["lorenz","chaos theory","dynamical systems","3d"]},{module:J.EXAMS,view:N.FULL_EXAM,moduleTitle:"Exams",title:"Final Exam",description:"Complete a comprehensive mixed-topic assessment.",keywords:["assessment","practice exam","final"]},{module:J.EXAMS,view:N.EXAM_ANALYSIS,moduleTitle:"Exams",title:"Performance Analytics",description:"Review strengths, weaknesses and question outcomes.",keywords:["results","analytics","score","progress"]}],ml=i=>i.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().trim(),QA=i=>kA[i],ZA=i=>i?Xg.find(l=>l.module===i.module&&l.view===i.view)??null:null,KA=(i,l=6)=>{const u=ml(i);if(!u)return[];const o=u.split(/\s+/);return Xg.map((c,h)=>{const f=ml(c.title),m=ml(c.moduleTitle),y=ml(c.keywords.join(" ")),p=ml(`${c.title} ${c.moduleTitle} ${c.description} ${c.keywords.join(" ")}`);if(!o.every(S=>p.includes(S)))return null;let v=5;return f===u?v=0:f.startsWith(u)?v=1:f.includes(u)?v=2:y.includes(u)?v=3:m.includes(u)&&(v=4),{destination:c,score:v,index:h}}).filter(c=>c!==null).sort((c,h)=>c.score-h.score||c.index-h.index).slice(0,l).map(({destination:c})=>c)},Ky=[{id:J.MATRIX,title:"Matrix",subtitle:"Linear Algebra",icon:i0,color:"text-accent-cyan",gradient:"from-accent-cyan/20 to-accent-blue/20",desc:"Systems, determinants and vector spaces."},{id:J.SEQUENCES,title:"Sequences",subtitle:"Discrete Math",icon:l0,color:"text-accent-purple",gradient:"from-accent-purple/20 to-accent-pink/20",desc:"Limits, convergence and infinite series."},{id:J.FUNCTIONS,title:"Functions",subtitle:"Analysis I",icon:$y,color:"text-accent-pink",gradient:"from-accent-pink/20 to-red-600/20",desc:"Domains, ranges, graphs and transformations."},{id:J.LIMITS,title:"Limits",subtitle:"Foundations",icon:a0,color:"text-orange-400",gradient:"from-orange-500/20 to-amber-600/20",desc:"Continuity, asymptotes and local behavior."},{id:J.DERIVATIVES,title:"Derivatives",subtitle:"Calculus I",icon:n0,color:"text-teal-400",gradient:"from-teal-500/20 to-emerald-600/20",desc:"Rates of change, approximation and optimization."},{id:J.INTEGRALS,title:"Integrals",subtitle:"Calculus II",icon:e0,color:"text-emerald-400",gradient:"from-emerald-500/20 to-green-600/20",desc:"Area, volume and accumulated change."},{id:J.DIFF_EQ,title:"Diff Eq",subtitle:"Modeling",icon:mc,color:"text-indigo-400",gradient:"from-indigo-500/20 to-violet-600/20",desc:"Growth, decay and biological dynamics."},{id:J.EXAMS,title:"Exams",subtitle:"Assessment",icon:hc,color:"text-white",gradient:"from-slate-700/50 to-slate-800/50",desc:"Practice, evaluate and review your performance."}],IA=({module:i,onSelect:l,index:u})=>{const o=i.icon,c=bu();return A.jsxs(Jn.button,{initial:c?{opacity:0}:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{delay:c?0:u*.04},onClick:()=>l(i.id),className:"relative overflow-hidden rounded-2xl p-4 text-left glass-card hover:bg-white/5 transition-colors group min-h-[140px] flex flex-col justify-between","aria-label":`Open ${i.title} module`,children:[A.jsx("div",{className:`absolute inset-0 bg-gradient-to-br ${i.gradient} opacity-0 group-hover:opacity-100 transition-opacity duration-500`}),A.jsx("div",{className:"relative z-10 flex justify-between items-start",children:A.jsx("div",{className:`p-2.5 rounded-xl bg-white/5 w-fit ${i.color} border border-white/5 shadow-inner`,children:A.jsx(o,{size:20})})}),A.jsxs("div",{className:"relative z-10",children:[A.jsx("h3",{className:"font-bold text-white text-base leading-tight mb-1",children:i.title}),A.jsx("p",{className:"text-[10px] text-slate-400 font-medium uppercase tracking-wider",children:i.subtitle})]})]})},FA=({module:i,onSelect:l,index:u})=>{const o=i.icon,c=j.useRef(null),h=bu(),f=hu(0),m=hu(0),y=Zy(f,{stiffness:500,damping:100}),p=Zy(m,{stiffness:500,damping:100}),v=mu(p,[-.5,.5],["17.5deg","-17.5deg"]),S=mu(y,[-.5,.5],["-17.5deg","17.5deg"]),b=w=>{if(!c.current||h)return;const H=c.current.getBoundingClientRect();f.set((w.clientX-H.left)/H.width-.5),m.set((w.clientY-H.top)/H.height-.5)},V=()=>{f.set(0),m.set(0)};return A.jsxs(Jn.button,{ref:c,initial:h?{opacity:0}:{opacity:0,y:50},animate:{opacity:1,y:0},transition:{delay:h?0:u*.05,duration:h?.01:.5},onClick:()=>l(i.id),onMouseMove:b,onMouseLeave:V,onBlur:V,style:h?void 0:{rotateX:v,rotateY:S,transformStyle:"preserve-3d"},className:"group relative h-full w-full rounded-[2rem] border border-white/10 bg-slate-900/20 backdrop-blur-sm p-8 text-left transition-colors hover:border-white/20 hover:bg-slate-900/40 perspective-1000","aria-label":`Open ${i.title} module`,children:[A.jsx("div",{className:`absolute inset-0 bg-gradient-to-br ${i.gradient} opacity-0 transition-opacity duration-500 group-hover:opacity-100 rounded-[2rem]`,style:{transform:"translateZ(-50px)"}}),A.jsxs("div",{className:"relative z-10 flex h-full flex-col justify-between",style:{transform:"translateZ(20px)"},children:[A.jsxs("div",{children:[A.jsx("div",{className:`mb-6 inline-flex rounded-2xl bg-white/5 p-4 ${i.color} ring-1 ring-white/10 shadow-lg shadow-black/20`,children:A.jsx(o,{size:32})}),A.jsx("h3",{className:"mb-2 text-3xl font-bold text-white tracking-tight",children:i.title}),A.jsx("p",{className:`text-xs font-bold uppercase tracking-widest ${i.color} opacity-80`,children:i.subtitle})]}),A.jsxs("div",{className:"mt-8 flex items-end justify-between",children:[A.jsx("p",{className:"max-w-[80%] text-sm text-slate-400 leading-relaxed group-hover:text-slate-200 transition-colors",children:i.desc}),A.jsx("div",{className:"rounded-full bg-white/5 p-3 text-slate-400 transition-all group-hover:bg-accent-cyan group-hover:text-black group-hover:scale-110",children:A.jsx(t0,{size:20})})]})]})]})},JA=({onNavigate:i})=>{const[l,u]=j.useState(""),o=j.useRef(null),c=j.useMemo(()=>KA(l),[l]),h=l.trim().length>0;j.useEffect(()=>{const m=y=>{var S,b;const p=y.target,v=(p==null?void 0:p.tagName)==="INPUT"||(p==null?void 0:p.tagName)==="TEXTAREA"||(p==null?void 0:p.isContentEditable);y.key==="/"&&!v&&(y.preventDefault(),(S=o.current)==null||S.focus()),y.key==="Escape"&&document.activeElement===o.current&&(u(""),(b=o.current)==null||b.blur())};return window.addEventListener("keydown",m),()=>window.removeEventListener("keydown",m)},[]);const f=m=>{u(""),i(m)};return A.jsxs("div",{className:"relative z-30",children:[A.jsx("label",{htmlFor:"learning-search",className:"sr-only",children:"Search mathematics and biotechnology topics"}),A.jsxs("div",{className:"relative",children:[A.jsx(wb,{size:20,className:"absolute left-4 top-1/2 -translate-y-1/2 text-slate-500","aria-hidden":"true"}),A.jsx("input",{ref:o,id:"learning-search",type:"search",value:l,onChange:m=>u(m.target.value),placeholder:"Search Gaussian elimination, population growth, Taylor...",className:"w-full h-14 rounded-2xl border border-white/10 bg-slate-950/70 pl-12 pr-14 text-sm text-white placeholder:text-slate-600 outline-none transition-all focus:border-accent-cyan/50 focus:ring-4 focus:ring-accent-cyan/10",role:"combobox","aria-autocomplete":"list","aria-expanded":h,"aria-controls":"learning-search-results"}),A.jsxs("div",{className:"absolute right-4 top-1/2 -translate-y-1/2 hidden sm:flex items-center gap-1 rounded-lg border border-white/10 bg-white/5 px-2 py-1 text-[10px] font-mono text-slate-500","aria-hidden":"true",children:[A.jsx($S,{size:11}),"/"]})]}),h&&A.jsx("div",{id:"learning-search-results",role:"listbox",className:"absolute left-0 right-0 top-[calc(100%+0.75rem)] max-h-[360px] overflow-y-auto rounded-2xl border border-white/10 bg-slate-950/95 p-2 shadow-2xl shadow-black/60 backdrop-blur-2xl",children:c.length>0?c.map(m=>A.jsx("button",{type:"button",role:"option","aria-selected":!1,onClick:()=>f(m),className:"w-full rounded-xl p-3 text-left transition-colors hover:bg-white/5 focus:bg-white/5 focus:outline-none",children:A.jsxs("div",{className:"flex items-center justify-between gap-4",children:[A.jsxs("div",{children:[A.jsx("p",{className:"text-sm font-semibold text-white",children:m.title}),A.jsx("p",{className:"mt-1 text-xs text-slate-500",children:m.description})]}),A.jsx("span",{className:"shrink-0 rounded-full border border-accent-cyan/20 bg-accent-cyan/10 px-2 py-1 text-[9px] font-bold uppercase tracking-wider text-accent-cyan",children:m.moduleTitle})]})},`${m.module}-${m.view}`)):A.jsxs("div",{className:"px-4 py-6 text-center",children:[A.jsx("p",{className:"text-sm font-medium text-slate-300",children:"No matching learning topic"}),A.jsx("p",{className:"mt-1 text-xs text-slate-600",children:"Try a concept, method or biological application."})]})})]})},PA=({onSelectModule:i,onNavigate:l,lastDestination:u})=>{const o=bu(),c=ZA(u);return A.jsx("div",{className:"relative min-h-screen overflow-x-hidden w-full",children:A.jsxs("div",{className:"relative z-20 mx-auto flex min-h-screen max-w-[1600px] flex-col px-6 py-10 md:px-12 md:py-12",children:[A.jsxs(Jn.header,{initial:o?{opacity:0}:{opacity:0,y:-20,filter:"blur(10px)"},animate:{opacity:1,y:0,filter:"blur(0px)"},transition:{duration:o?.01:.7},className:"mt-2 md:mt-8",children:[A.jsxs("div",{className:"flex items-center gap-3 md:gap-4",children:[A.jsxs("div",{className:"rounded-xl bg-gradient-to-br from-accent-cyan to-accent-blue p-2.5 shadow-lg shadow-accent-cyan/20 md:rounded-2xl md:p-3",children:[A.jsx(dc,{size:28,className:"text-white md:hidden"}),A.jsx(dc,{size:40,className:"hidden text-white md:block"})]}),A.jsxs("div",{children:[A.jsx("p",{className:"mb-1 text-[10px] font-bold uppercase tracking-[0.22em] text-accent-cyan sm:text-xs md:text-sm",children:qA}),A.jsx("h1",{className:"text-4xl font-black tracking-tighter text-white sm:text-5xl md:text-7xl",children:HA})]})]}),A.jsxs("p",{className:"mt-4 max-w-3xl text-sm font-light leading-relaxed text-slate-400 md:ml-2 md:text-lg",children:[YA," Search a concept or enter a module to learn through careful observation and interaction."]})]}),A.jsxs("section",{className:"mt-8 grid gap-4 lg:grid-cols-[minmax(0,1fr)_360px]",children:[A.jsx(JA,{onNavigate:l}),c?A.jsxs("button",{type:"button",onClick:()=>l(c),className:"group flex min-h-14 items-center justify-between gap-4 rounded-2xl border border-accent-cyan/20 bg-accent-cyan/10 px-4 py-3 text-left transition-all hover:border-accent-cyan/40 hover:bg-accent-cyan/15 focus:outline-none focus:ring-4 focus:ring-accent-cyan/10",children:[A.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[A.jsx("div",{className:"rounded-xl bg-accent-cyan/15 p-2.5 text-accent-cyan",children:A.jsx(Cb,{size:18,fill:"currentColor"})}),A.jsxs("div",{className:"min-w-0",children:[A.jsx("p",{className:"text-[9px] font-bold uppercase tracking-[0.18em] text-accent-cyan",children:"Continue learning"}),A.jsx("p",{className:"truncate text-sm font-semibold text-white",children:c.title}),A.jsx("p",{className:"truncate text-[10px] text-slate-500",children:c.moduleTitle})]})]}),A.jsx(t0,{size:18,className:"shrink-0 text-slate-500 transition-transform group-hover:translate-x-1 group-hover:text-accent-cyan"})]}):A.jsx("div",{className:"flex min-h-14 items-center rounded-2xl border border-white/5 bg-white/[0.03] px-4 py-3 text-xs text-slate-500",children:"Your most recently opened topic will appear here."})]}),A.jsx("section",{className:"mt-10 hidden grid-cols-2 gap-8 pb-12 md:grid lg:grid-cols-3 xl:grid-cols-4",children:Ky.map((h,f)=>A.jsx(FA,{module:h,onSelect:i,index:f},h.id))}),A.jsx("section",{className:"mt-8 grid flex-1 grid-cols-2 content-start gap-4 pb-8 md:hidden",children:Ky.map((h,f)=>A.jsx(IA,{module:h,onSelect:i,index:f},h.id))})]})})},WA=()=>A.jsxs("div",{className:"fixed inset-0 z-0 overflow-hidden pointer-events-none bg-background",children:[A.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-[#030014] via-[#050b14] to-[#030014]"}),A.jsx("div",{className:"absolute inset-0 opacity-20",style:{backgroundImage:"radial-gradient(1px 1px at 20px 30px, #eee, rgba(0,0,0,0)), radial-gradient(1px 1px at 40px 70px, #fff, rgba(0,0,0,0)), radial-gradient(1px 1px at 50px 160px, #ddd, rgba(0,0,0,0)), radial-gradient(1.5px 1.5px at 90px 40px, #fff, rgba(0,0,0,0)), radial-gradient(1px 1px at 130px 80px, #fff, rgba(0,0,0,0)), radial-gradient(1.5px 1.5px at 160px 120px, #ddd, rgba(0,0,0,0))",backgroundSize:"200px 200px"}}),A.jsx("div",{className:"absolute top-[-10%] left-[-10%] w-[50vw] h-[50vw] bg-purple-900/20 rounded-full blur-[100px] mix-blend-screen animate-blob"}),A.jsx("div",{className:"absolute top-[20%] right-[-10%] w-[40vw] h-[40vw] bg-cyan-900/20 rounded-full blur-[100px] mix-blend-screen animate-blob animation-delay-2000"}),A.jsx("div",{className:"absolute bottom-[-20%] left-[20%] w-[60vw] h-[60vw] bg-blue-900/10 rounded-full blur-[120px] mix-blend-screen animate-blob animation-delay-4000"}),A.jsx("div",{className:"absolute inset-0 opacity-[0.03]",style:{backgroundImage:"linear-gradient(to right, #808080 1px, transparent 1px), linear-gradient(to bottom, #808080 1px, transparent 1px)",backgroundSize:"40px 40px",maskImage:"radial-gradient(circle at 50% 50%, black 40%, transparent 100%)"}}),A.jsx("div",{className:"absolute inset-0 bg-noise opacity-[0.03] mix-blend-overlay"})]});function rc(i,l){const[u,o]=j.useState(()=>{try{if(typeof window>"u")return l;const c=window.localStorage.getItem(i);return c?JSON.parse(c):l}catch(c){return console.warn(`Error reading localStorage key "${i}":`,c),l}});return j.useEffect(()=>{try{typeof window<"u"&&window.localStorage.setItem(i,JSON.stringify(u))}catch(c){console.warn(`Error writing localStorage key "${i}":`,c)}},[i,u]),[u,o]}const Iy=j.lazy(()=>St(async()=>{const{BasicsView:i}=await import("./BasicsView-Ces5tTvG.js");return{BasicsView:i}},__vite__mapDeps([0,1,2,3,4,5,6])).then(({BasicsView:i})=>({default:i}))),$A=j.lazy(()=>St(async()=>{const{OperationsView:i}=await import("./OperationsView-B2CRBmuD.js");return{OperationsView:i}},__vite__mapDeps([7,1,8,2,3])).then(({OperationsView:i})=>({default:i}))),t3=j.lazy(()=>St(async()=>{const{DeterminantView:i}=await import("./DeterminantView-B12-SV-Q.js");return{DeterminantView:i}},__vite__mapDeps([9,8,2,3,10])).then(({DeterminantView:i})=>({default:i}))),e3=j.lazy(()=>St(async()=>{const{InverseView:i}=await import("./InverseView-f4AQbsbM.js");return{InverseView:i}},__vite__mapDeps([11,1,8,2,3,12,13])).then(({InverseView:i})=>({default:i}))),n3=j.lazy(()=>St(async()=>{const{HomeworkView:i}=await import("./ExercisesView-C-gZzMQC.js");return{HomeworkView:i}},__vite__mapDeps([14,4,15])).then(({HomeworkView:i})=>({default:i}))),i3=j.lazy(()=>St(async()=>{const{SequencesView:i}=await import("./SequencesView-D362I2Es.js");return{SequencesView:i}},__vite__mapDeps([16,4,2,3,15])).then(({SequencesView:i})=>({default:i}))),a3=j.lazy(()=>St(async()=>{const{Sequences3DView:i}=await import("./Sequences3DView-f2aGHw3l.js");return{Sequences3DView:i}},__vite__mapDeps([17,18,19,20,5,21,22,23,24])).then(({Sequences3DView:i})=>({default:i}))),Fy=j.lazy(()=>St(async()=>{const{FunctionsView:i}=await import("./FunctionsView-CURlAo-G.js");return{FunctionsView:i}},__vite__mapDeps([25,2,3,26,27,20])).then(({FunctionsView:i})=>({default:i}))),cc=j.lazy(()=>St(async()=>{const{Surface3DView:i}=await import("./Surface3DView-DR4ocFB5.js");return{Surface3DView:i}},__vite__mapDeps([28,18,21,20,29,24])).then(({Surface3DView:i})=>({default:i}))),Jy=j.lazy(()=>St(async()=>{const{FinalExamView:i}=await import("./FinalExamView-Bd8W2xqo.js");return{FinalExamView:i}},__vite__mapDeps([30,18,4,31,32,3,13,33,22,20,23,24])).then(({FinalExamView:i})=>({default:i}))),l3=j.lazy(()=>St(async()=>{const{ExamAnalysisView:i}=await import("./ExamAnalysisView-DyppqzSR.js");return{ExamAnalysisView:i}},__vite__mapDeps([34,31,12])).then(({ExamAnalysisView:i})=>({default:i}))),s3=j.lazy(()=>St(async()=>{const{DerivativesRulesView:i}=await import("./DerivativesRulesView-CcHPI4L5.js");return{DerivativesRulesView:i}},__vite__mapDeps([35,2,3,4,15,32])).then(({DerivativesRulesView:i})=>({default:i}))),u3=j.lazy(()=>St(async()=>{const{FunctionAnalysisView:i}=await import("./FunctionAnalysisView-BppRFCo9.js");return{FunctionAnalysisView:i}},__vite__mapDeps([36,2,3,27,20])).then(({FunctionAnalysisView:i})=>({default:i}))),o3=j.lazy(()=>St(async()=>{const{SystemsView:i}=await import("./SystemsView-0Pnb8mJU.js");return{SystemsView:i}},__vite__mapDeps([37,1,8,2,3,4,10])).then(({SystemsView:i})=>({default:i}))),r3=j.lazy(()=>St(async()=>{const{ContinuityView:i}=await import("./ContinuityView-CSRJFUO9.js");return{ContinuityView:i}},__vite__mapDeps([38,2,3,4,15,12])).then(({ContinuityView:i})=>({default:i}))),c3=j.lazy(()=>St(async()=>{const{GaussianView:i}=await import("./GaussianView-CVoXY7jU.js");return{GaussianView:i}},__vite__mapDeps([39,1,3])).then(({GaussianView:i})=>({default:i}))),f3=j.lazy(()=>St(async()=>{const{EigenView:i}=await import("./EigenView-vzcUWw_g.js");return{EigenView:i}},__vite__mapDeps([40,1,8])).then(({EigenView:i})=>({default:i}))),d3=j.lazy(()=>St(async()=>{const{CobwebView:i}=await import("./CobwebView-CUIyp2dZ.js");return{CobwebView:i}},[]).then(({CobwebView:i})=>({default:i}))),h3=j.lazy(()=>St(async()=>{const{SeriesView:i}=await import("./SeriesView-js2OwgAV.js");return{SeriesView:i}},__vite__mapDeps([41,4,12,13,15])).then(({SeriesView:i})=>({default:i}))),m3=j.lazy(()=>St(async()=>{const{TransformationsView:i}=await import("./TransformationsView-CcLdqflF.js");return{TransformationsView:i}},__vite__mapDeps([42,6])).then(({TransformationsView:i})=>({default:i}))),p3=j.lazy(()=>St(async()=>{const{NewtonView:i}=await import("./NewtonView-D8Lq1Xw6.js");return{NewtonView:i}},__vite__mapDeps([43,2,3])).then(({NewtonView:i})=>({default:i}))),y3=j.lazy(()=>St(async()=>{const{TaylorSeriesView:i}=await import("./TaylorSeriesView-DJiKKTCO.js");return{TaylorSeriesView:i}},[]).then(({TaylorSeriesView:i})=>({default:i}))),g3=j.lazy(()=>St(async()=>{const{IntegralBasicsView:i}=await import("./IntegralBasicsView-IHUY2mpE.js");return{IntegralBasicsView:i}},__vite__mapDeps([44,4])).then(({IntegralBasicsView:i})=>({default:i}))),v3=j.lazy(()=>St(async()=>{const{IntegralRulesView:i}=await import("./IntegralRulesView-C3PlQOL5.js");return{IntegralRulesView:i}},__vite__mapDeps([45,4,12])).then(({IntegralRulesView:i})=>({default:i}))),S3=j.lazy(()=>St(async()=>{const{AreaUnderCurveView:i}=await import("./AreaUnderCurveView-D8J_c91U.js");return{AreaUnderCurveView:i}},__vite__mapDeps([46,4])).then(({AreaUnderCurveView:i})=>({default:i}))),b3=j.lazy(()=>St(async()=>{const{Integrals3DView:i}=await import("./Integrals3DView-CLF6cvHs.js");return{Integrals3DView:i}},__vite__mapDeps([47,18,6,21,20,29,24,22])).then(({Integrals3DView:i})=>({default:i}))),T3=j.lazy(()=>St(async()=>{const{DiffEqBasicsView:i}=await import("./DiffEqBasicsView-GrafeQN7.js");return{DiffEqBasicsView:i}},__vite__mapDeps([48,4,15])).then(({DiffEqBasicsView:i})=>({default:i}))),x3=j.lazy(()=>St(async()=>{const{PopulationModelsView:i}=await import("./PopulationModelsView-BB4Pshcn.js");return{PopulationModelsView:i}},__vite__mapDeps([49,4,13])).then(({PopulationModelsView:i})=>({default:i}))),E3=j.lazy(()=>St(async()=>{const{RadioactiveDecayView:i}=await import("./RadioactiveDecayView-D39iBORv.js");return{RadioactiveDecayView:i}},__vite__mapDeps([50,4])).then(({RadioactiveDecayView:i})=>({default:i}))),A3=j.lazy(()=>St(async()=>{const{DiffEq3DView:i}=await import("./DiffEq3DView-B2vjbbYS.js");return{DiffEq3DView:i}},__vite__mapDeps([51,18,21,20,19])).then(({DiffEq3DView:i})=>({default:i}))),D3=j.lazy(()=>St(async()=>{const{CheatSheetView:i}=await import("./CheatSheetView-Cyb0L-8D.js");return{CheatSheetView:i}},__vite__mapDeps([52,4])).then(({CheatSheetView:i})=>({default:i}))),M3=j.lazy(()=>St(async()=>{const{LinearTransformation3DView:i}=await import("./LinearTransformation3DView-CiwQ5lqc.js");return{LinearTransformation3DView:i}},__vite__mapDeps([53,18,1,8,33,26,21,20,29,24,19,54])).then(({LinearTransformation3DView:i})=>({default:i}))),_3=j.lazy(()=>St(async()=>{const{VectorOperations3DView:i}=await import("./VectorOperations3DView-EaRYXIXa.js");return{VectorOperations3DView:i}},__vite__mapDeps([55,18,21,20,29,24,54])).then(({VectorOperations3DView:i})=>({default:i}))),C3=j.lazy(()=>St(async()=>{const{AIChatView:i}=await import("./AIChatView-BugcxH5N.js");return{AIChatView:i}},__vite__mapDeps([56,13])).then(({AIChatView:i})=>({default:i}))),fc=({title:i})=>A.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[60vh] text-center space-y-6",children:[A.jsx("div",{className:"p-6 bg-slate-900/50 rounded-full border border-slate-800 shadow-xl backdrop-blur-sm",children:A.jsx(bb,{size:48,className:"text-slate-600"})}),A.jsxs("div",{className:"space-y-2",children:[A.jsx("h2",{className:"text-3xl font-bold text-white tracking-tight",children:i}),A.jsx("div",{className:"px-3 py-1 rounded-full bg-slate-800/50 text-xs font-mono text-slate-400 inline-block border border-slate-700",children:"STATUS: LOCKED"})]}),A.jsxs("p",{className:"text-slate-400 max-w-md text-sm leading-relaxed",children:["This examination module is currently unavailable. Please proceed to the ",A.jsx("strong",{children:"Final Exam"})," for comprehensive assessment."]})]}),V3=()=>A.jsxs("div",{className:"min-h-[60vh] flex flex-col items-center justify-center gap-4 text-center",role:"status","aria-live":"polite",children:[A.jsx("div",{className:"p-4 rounded-2xl bg-accent-cyan/10 border border-accent-cyan/20 text-accent-cyan",children:A.jsx(vb,{size:30,className:"animate-spin"})}),A.jsxs("div",{children:[A.jsx("p",{className:"font-semibold text-white",children:"Preparing the learning lab"}),A.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"Loading only the resources required for this topic."})]})]}),w3=()=>{const[i,l]=rc("app_module",J.HOME),[u,o]=rc("app_view",N.BASICS),[c,h]=rc("last_learning_destination",null),[f,m]=j.useState(!1),y=bu(),p=w=>{l(w.module),o(w.view),h(w),m(!1)},v=w=>{p({module:w,view:QA(w)})},S=w=>{o(w),i!==J.HOME&&h({module:i,view:w})},b=()=>{l(J.HOME),m(!1)},V=()=>{switch(u){case N.BASICS:return A.jsx(Iy,{});case N.OPERATIONS:return A.jsx($A,{});case N.DETERMINANT:return A.jsx(t3,{});case N.INVERSE:return A.jsx(e3,{});case N.SYSTEMS:return A.jsx(o3,{});case N.GAUSSIAN:return A.jsx(c3,{});case N.EIGENVALUES:return A.jsx(f3,{});case N.VECTOR_3D:return A.jsx(M3,{});case N.VECTOR_OPS_3D:return A.jsx(_3,{});case N.SEQUENCES:return A.jsx(i3,{});case N.SERIES:return A.jsx(h3,{});case N.COBWEB:return A.jsx(d3,{});case N.SEQUENCES_3D:return A.jsx(a3,{});case N.FUNCTIONS:return A.jsx(Fy,{});case N.TRANSFORMATIONS:return A.jsx(m3,{});case N.NEWTON:return A.jsx(p3,{});case N.FUNCTIONS_3D:return A.jsx(cc,{mode:"function"});case N.LIMITS:return A.jsx(Fy,{});case N.CONTINUITY:return A.jsx(r3,{});case N.LIMITS_3D:return A.jsx(cc,{mode:"limit"});case N.DERIVATIVE_RULES:return A.jsx(s3,{});case N.FUNCTION_ANALYSIS:return A.jsx(u3,{});case N.TAYLOR:return A.jsx(y3,{});case N.DERIVATIVES_3D:return A.jsx(cc,{mode:"derivative"});case N.INTEGRAL_BASICS:return A.jsx(g3,{});case N.INTEGRAL_RULES:return A.jsx(v3,{});case N.AREA_UNDER_CURVE:return A.jsx(S3,{});case N.INTEGRALS_3D:return A.jsx(b3,{});case N.DIFF_BASICS:return A.jsx(T3,{});case N.POPULATION_MODELS:return A.jsx(x3,{});case N.RADIOACTIVE_DECAY:return A.jsx(E3,{});case N.DIFF_EQ_3D:return A.jsx(A3,{});case N.CLASS_EXAM_1:return A.jsx(fc,{title:"Class Exam I"});case N.CLASS_EXAM_2:return A.jsx(fc,{title:"Class Exam II"});case N.CLASS_EXAM_3:return A.jsx(fc,{title:"Class Exam III"});case N.FULL_EXAM:return A.jsx(Jy,{examMode:"FINAL"},"FINAL");case N.EXAM_ANALYSIS:return A.jsx(l3,{});case N.HOMEWORK:return A.jsx(n3,{module:i},i);case N.FINAL_EXAM:return A.jsx(Jy,{module:i},i);case N.CHEAT_SHEET:return A.jsx(D3,{module:i},i);case N.AI_CHAT:return A.jsx(C3,{});default:return A.jsx(Iy,{})}};return A.jsxs("div",{className:"relative min-h-screen bg-background text-slate-200 font-sans selection:bg-accent-cyan/30 overflow-hidden",children:[A.jsx(WA,{}),A.jsx("div",{className:"relative z-10",children:i===J.HOME?A.jsx(PA,{onSelectModule:v,onNavigate:p,lastDestination:c}):A.jsxs("div",{className:"flex h-screen overflow-hidden",children:[A.jsx(XA,{currentView:u,currentModule:i,setView:S,goHome:b,isOpen:f,toggleSidebar:()=>m(w=>!w)}),A.jsxs("main",{className:"flex-1 md:ml-20 lg:ml-0 overflow-y-auto h-full relative",children:[A.jsxs("div",{className:"md:hidden sticky top-0 z-30 flex items-center justify-between p-4 bg-background/80 backdrop-blur-md border-b border-white/5",children:[A.jsx("button",{onClick:()=>m(!0),className:"p-2 rounded-lg text-white hover:bg-white/10 transition-colors","aria-label":"Open learning navigation",children:A.jsx(xb,{size:24})}),A.jsx("span",{className:"text-xs font-bold text-accent-cyan tracking-widest uppercase glow-text",children:i.replace("_"," ")}),A.jsx("div",{className:"w-10","aria-hidden":"true"})]}),A.jsx("div",{className:"max-w-[1600px] mx-auto p-4 md:p-8 pb-32",children:A.jsx(Vg,{mode:"wait",children:A.jsx(Jn.div,{initial:y?{opacity:0}:{opacity:0,y:20,filter:"blur(10px)"},animate:{opacity:1,y:0,filter:"blur(0px)"},exit:y?{opacity:0}:{opacity:0,y:-20,filter:"blur(10px)"},transition:{duration:y?.01:.4,ease:"easeOut"},children:A.jsx(j.Suspense,{fallback:A.jsx(V3,{}),children:V()})},u)})})]})]})})]})},R3=console.warn;console.warn=(...i)=>{i[0]&&typeof i[0]=="string"&&i[0].includes("KaTeX doesn't work in quirks mode")||R3(...i)};const kg=document.getElementById("root");if(!kg)throw new Error("Could not find root element to mount to");const N3=DS.createRoot(kg);N3.render(A.jsx(gS.StrictMode,{children:A.jsx(w3,{})}));export{Vg as A,dl as B,ZS as C,dc as D,Hc as E,Js as F,hc as G,db as H,a0 as I,Vt as J,Bc as K,mc as L,J as M,Uc as N,CS as O,Cb as P,GA as Q,gS as R,zb as S,qb as T,Lb as U,Kb as V,Fb as W,Pb as X,XS as a,t0 as b,rt as c,$y as d,i0 as e,FS as f,Mb as g,bb as h,LS as i,A as j,Yb as k,PS as l,Jn as m,l0 as n,n0 as o,e0 as p,HS as q,j as r,Py as s,O3 as t,rc as u,eb as v,Ab as w,Bb as x,GS as y,ob as z}; diff --git a/site/assets/index-DypDiaLJ.css b/site/assets/index-DypDiaLJ.css new file mode 100644 index 0000000..835dad2 --- /dev/null +++ b/site/assets/index-DypDiaLJ.css @@ -0,0 +1 @@ +/*! tailwindcss v4.2.4 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial}}}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.visible\!{visibility:visible!important}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.top-1\/2{top:50%}.top-\[-10\%\]{top:-10%}.top-\[20\%\]{top:20%}.top-\[calc\(100\%\+0\.75rem\)\]{top:calc(100% + .75rem)}.right-\[-10\%\]{right:-10%}.bottom-\[-20\%\]{bottom:-20%}.-left-\[31px\]{left:-31px}.left-1\/2{left:50%}.left-\[-10\%\]{left:-10%}.left-\[20\%\]{left:20%}.z-0{z-index:0}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.container{width:100%}.mx-auto{margin-inline:auto}.mt-\[50\%\]{margin-top:50%}.mt-auto{margin-top:auto}.mb-\[50\%\]{margin-bottom:50%}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.h-\[40vw\]{height:40vw}.h-\[50vw\]{height:50vw}.h-\[60vw\]{height:60vw}.h-\[250px\]{height:250px}.h-\[300px\]{height:300px}.h-\[450px\]{height:450px}.h-\[500px\]{height:500px}.h-\[calc\(100vh-100px\)\]{height:calc(100vh - 100px)}.h-\[calc\(100vh-140px\)\]{height:calc(100vh - 140px)}.h-auto{height:auto}.h-fit{height:fit-content}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-\[200px\]{max-height:200px}.max-h-\[360px\]{max-height:360px}.min-h-\[60vh\]{min-height:60vh}.min-h-\[80vh\]{min-height:80vh}.min-h-\[140px\]{min-height:140px}.min-h-\[160px\]{min-height:160px}.min-h-\[250px\]{min-height:250px}.min-h-\[320px\]{min-height:320px}.min-h-\[400px\]{min-height:400px}.min-h-\[420px\]{min-height:420px}.min-h-\[450px\]{min-height:450px}.min-h-\[500px\]{min-height:500px}.min-h-screen{min-height:100vh}.w-1\/2{width:50%}.w-\[40vw\]{width:40vw}.w-\[50vw\]{width:50vw}.w-\[60vw\]{width:60vw}.w-fit{width:fit-content}.w-full{width:100%}.w-px{width:1px}.max-w-\[80\%\]{max-width:80%}.max-w-\[85\%\]{max-width:85%}.max-w-\[600px\]{max-width:600px}.max-w-\[1600px\]{max-width:1600px}.max-w-none{max-width:none}.min-w-\[2px\]{min-width:2px}.min-w-\[30px\]{min-width:30px}.min-w-\[40px\]{min-width:40px}.min-w-\[200px\]{min-width:200px}.flex-1{flex:1}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.-translate-x-1\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-x-full{--tw-translate-x:-100%;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-1\/2{--tw-translate-x: 50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.scale-105{--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x) var(--tw-scale-y)}.scale-110{--tw-scale-x:110%;--tw-scale-y:110%;--tw-scale-z:110%;scale:var(--tw-scale-x) var(--tw-scale-y)}.scale-\[1\.02\]{scale:1.02}.-rotate-90{rotate:-90deg}.rotate-90{rotate:90deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.cursor-crosshair{cursor:crosshair}.cursor-default{cursor:default}.cursor-grab{cursor:grab}.cursor-grabbing{cursor:grabbing}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.cursor-text{cursor:text}.touch-none{touch-action:none}.resize{resize:both}.list-inside{list-style-position:inside}.list-disc{list-style-type:disc}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.content-start{align-content:flex-start}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.items-stretch{align-items:stretch}.justify-around{justify-content:space-around}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.rounded-\[2rem\]{border-radius:2rem}.rounded-\[20px\]{border-radius:20px}.rounded-\[23px\]{border-radius:23px}.rounded-\[32px\]{border-radius:32px}.rounded-full{border-radius:3.40282e38px}.rounded-t-\[30px\]{border-top-left-radius:30px;border-top-right-radius:30px}.rounded-tl-none{border-top-left-radius:0}.rounded-tr-none{border-top-right-radius:0}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-t-4{border-top-style:var(--tw-border-style);border-top-width:4px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-l-2{border-left-style:var(--tw-border-style);border-left-width:2px}.border-l-4{border-left-style:var(--tw-border-style);border-left-width:4px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-transparent{border-color:#0000}.bg-\[\#0B1121\]{background-color:#0b1121}.bg-\[\#020617\]\/90{background-color:#020617e6}.bg-transparent{background-color:#0000}.bg-gradient-to-b{--tw-gradient-position:to bottom in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-br{--tw-gradient-position:to bottom right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-r{--tw-gradient-position:to right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-tr{--tw-gradient-position:to top right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-\[radial-gradient\(circle_at_50\%_50\%\,_rgba\(168\,85\,247\,0\.1\)\,_transparent_70\%\)\]{background-image:radial-gradient(circle,#a855f71a,#0000 70%)}.bg-\[url\(\'https\:\/\/grainy-gradients\.vercel\.app\/noise\.svg\'\)\]{background-image:url(https://grainy-gradients.vercel.app/noise.svg)}.from-\[\#030014\]{--tw-gradient-from:#030014;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-transparent{--tw-gradient-from:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.via-\[\#050b14\]{--tw-gradient-via:#050b14;--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.to-\[\#030014\]{--tw-gradient-to:#030014;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-transparent{--tw-gradient-to:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.bg-clip-text{-webkit-background-clip:text;background-clip:text}.stroke-2{stroke-width:2px}.p-\[1px\]{padding:1px}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.align-top{vertical-align:top}.text-\[9px\]{font-size:9px}.text-\[10px\]{font-size:10px}.text-\[13px\]{font-size:13px}.tracking-\[0\.2em\]{--tw-tracking:.2em;letter-spacing:.2em}.tracking-\[0\.18em\]{--tw-tracking:.18em;letter-spacing:.18em}.tracking-\[0\.22em\]{--tw-tracking:.22em;letter-spacing:.22em}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.whitespace-nowrap{white-space:nowrap}.text-transparent{color:#0000}.uppercase{text-transform:uppercase}.italic{font-style:italic}.overline{text-decoration-line:overline}.underline{text-decoration-line:underline}.opacity-0{opacity:0}.opacity-5{opacity:.05}.opacity-10{opacity:.1}.opacity-20{opacity:.2}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-80{opacity:.8}.opacity-\[0\.03\]{opacity:.03}.mix-blend-overlay{mix-blend-mode:overlay}.mix-blend-screen{mix-blend-mode:screen}.shadow-\[0_0_8px_\#00f6ff\]{--tw-shadow:0 0 8px var(--tw-shadow-color,#00f6ff);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_15px_rgba\(0\,246\,255\,0\.2\)\]{--tw-shadow:0 0 15px var(--tw-shadow-color,#00f6ff33);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_15px_rgba\(16\,185\,129\,0\.1\)\]{--tw-shadow:0 0 15px var(--tw-shadow-color,#10b9811a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_15px_rgba\(16\,185\,129\,0\.3\)\]{--tw-shadow:0 0 15px var(--tw-shadow-color,#10b9814d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_15px_rgba\(34\,211\,238\,0\.4\)\]{--tw-shadow:0 0 15px var(--tw-shadow-color,#22d3ee66);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_15px_rgba\(236\,72\,153\,0\.3\)\]{--tw-shadow:0 0 15px var(--tw-shadow-color,#ec48994d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_15px_rgba\(239\,68\,68\,0\.1\)\]{--tw-shadow:0 0 15px var(--tw-shadow-color,#ef44441a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-1{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.blur-\[100px\]{--tw-blur:blur(100px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.blur-\[120px\]{--tw-blur:blur(120px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.drop-shadow-\[0_0_15px_rgba\(16\,185\,129\,0\.2\)\]{--tw-drop-shadow-size:drop-shadow(0 0 15px var(--tw-drop-shadow-color,#10b98133));--tw-drop-shadow:var(--tw-drop-shadow-size);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.drop-shadow-\[0_0_30px_rgba\(168\,85\,247\,0\.4\)\]{--tw-drop-shadow-size:drop-shadow(0 0 30px var(--tw-drop-shadow-color,#a855f766));--tw-drop-shadow:var(--tw-drop-shadow-size);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.grayscale{--tw-grayscale:grayscale(100%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.invert{--tw-invert:invert(100%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.filter\!{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)!important}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,ease);transition-duration:var(--tw-duration,0s)}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,ease);transition-duration:var(--tw-duration,0s)}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,ease);transition-duration:var(--tw-duration,0s)}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,ease);transition-duration:var(--tw-duration,0s)}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,ease);transition-duration:var(--tw-duration,0s)}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.duration-500{--tw-duration:.5s;transition-duration:.5s}.duration-700{--tw-duration:.7s;transition-duration:.7s}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.\[start\:end\]{start:end}@media(hover:hover){.group-hover\:translate-x-full:is(:where(.group):hover *){--tw-translate-x:100%;translate:var(--tw-translate-x) var(--tw-translate-y)}.group-hover\:scale-110:is(:where(.group):hover *){--tw-scale-x:110%;--tw-scale-y:110%;--tw-scale-z:110%;scale:var(--tw-scale-x) var(--tw-scale-y)}.group-hover\:opacity-10:is(:where(.group):hover *){opacity:.1}.group-hover\:opacity-30:is(:where(.group):hover *){opacity:.3}.group-hover\:opacity-100:is(:where(.group):hover *),.group-hover\/matrix\:opacity-100:is(:where(.group\/matrix):hover *){opacity:1}.hover\:scale-105:hover{--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x) var(--tw-scale-y)}.hover\:scale-\[1\.02\]:hover{scale:1.02}}.focus\:shadow-\[0_0_15px_rgba\(16\,185\,129\,0\.3\)\]:focus{--tw-shadow:0 0 15px var(--tw-shadow-color,#10b9814d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:shadow-\[0_0_15px_rgba\(34\,211\,238\,0\.3\)\]:focus{--tw-shadow:0 0 15px var(--tw-shadow-color,#22d3ee4d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:shadow-\[0_0_15px_rgba\(59\,130\,246\,0\.3\)\]:focus{--tw-shadow:0 0 15px var(--tw-shadow-color,#3b82f64d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:shadow-\[0_0_15px_rgba\(168\,85\,247\,0\.3\)\]:focus{--tw-shadow:0 0 15px var(--tw-shadow-color,#a855f74d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:shadow-\[0_0_15px_rgba\(217\,70\,239\,0\.3\)\]:focus{--tw-shadow:0 0 15px var(--tw-shadow-color,#d946ef4d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:shadow-\[0_0_15px_rgba\(236\,72\,153\,0\.3\)\]:focus{--tw-shadow:0 0 15px var(--tw-shadow-color,#ec48994d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-4:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.active\:scale-95:active{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x) var(--tw-scale-y)}.active\:scale-\[0\.98\]:active{scale:.98}.active\:cursor-grabbing:active{cursor:grabbing}.disabled\:opacity-50:disabled{opacity:.5}:root{color-scheme:dark}body{color:#e2e8f0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;background-color:#020617;background-image:radial-gradient(circle at 15%,#22d3ee14,#0000 25%),radial-gradient(circle at 85% 30%,#a855f714,#0000 25%);background-attachment:fixed;overflow-x:hidden}.glass-panel{-webkit-backdrop-filter:blur(12px);background:#0f172a66;border:1px solid #ffffff14;box-shadow:0 4px 30px #0000001a}.glass-panel-heavy{-webkit-backdrop-filter:blur(20px);background:#020617b3;border-right:1px solid #ffffff14}::-webkit-scrollbar{width:6px;height:6px}::-webkit-scrollbar-track{background:0 0}::-webkit-scrollbar-thumb{background:#ffffff1a;border-radius:99px}::-webkit-scrollbar-thumb:hover{background:#ffffff4d}::selection{color:#22d3ee;background:#22d3ee33}.katex{font-size:1.1em}.katex-display{margin:0}*{-webkit-tap-highlight-color:transparent}@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,:before,:after{transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"";inherits:false;initial-value:100%}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false} diff --git a/site/assets/lightbulb-CK5FIpYu.js b/site/assets/lightbulb-CK5FIpYu.js new file mode 100644 index 0000000..5e2775a --- /dev/null +++ b/site/assets/lightbulb-CK5FIpYu.js @@ -0,0 +1,6 @@ +import{c}from"./index-DJrAq1Rk.js";/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const t=[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]],o=c("lightbulb",t);export{o as L}; diff --git a/site/assets/manifest-TlqCZM9V.json b/site/assets/manifest-TlqCZM9V.json new file mode 100644 index 0000000..e7033c6 --- /dev/null +++ b/site/assets/manifest-TlqCZM9V.json @@ -0,0 +1,26 @@ +{ + "name": "Inmerson โ€ข Personal Math & Biotech Lab", + "short_name": "Inmerson Lab", + "start_url": "/", + "display": "standalone", + "background_color": "#020617", + "theme_color": "#020617", + "orientation": "portrait", + "icons": [ + { + "src": "https://cdn.lucide.dev/icon-library/dna-48.png", + "sizes": "48x48", + "type": "image/png" + }, + { + "src": "https://cdn.lucide.dev/icon-library/dna-192.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "https://cdn.lucide.dev/icon-library/dna-512.png", + "sizes": "512x512", + "type": "image/png" + } + ] +} \ No newline at end of file diff --git a/site/assets/matrixMath-CNHWal2D.js b/site/assets/matrixMath-CNHWal2D.js new file mode 100644 index 0000000..6b351d9 --- /dev/null +++ b/site/assets/matrixMath-CNHWal2D.js @@ -0,0 +1 @@ +const f=(t,n,e=0)=>Array(t).fill(0).map(()=>Array(n).fill(e)),p=(t,n)=>t.length!==n.length||t[0].length!==n[0].length?null:t.map((e,l)=>e.map((r,s)=>r+n[l][s])),M=(t,n)=>t.length!==n.length||t[0].length!==n[0].length?null:t.map((e,l)=>e.map((r,s)=>r-n[l][s])),d=(t,n)=>t.map(e=>e.map(l=>l*n)),y=(t,n)=>{const e=t.length,l=t[0].length,r=n.length,s=n[0].length;if(l!==r)return null;const a=f(e,s);for(let u=0;u{if(t.length!==t[0].length)return null;const n=t.length;if(n===1)return t[0][0];if(n===2)return t[0][0]*t[1][1]-t[0][1]*t[1][0];const e=t.map(r=>[...r]);let l=1;for(let r=0;rMath.abs(e[s][r])&&(s=a);if(Math.abs(e[s][r])<1e-10)return 0;r!==s&&([e[r],e[s]]=[e[s],e[r]],l*=-1),l*=e[r][r];for(let a=r+1;at.filter((l,r)=>r!==n).map(l=>l.filter((r,s)=>s!==e)),x=(t,n,e)=>t.map((l,r)=>{const s=[...l];return s[n]=e[r],s}),h=t=>{if(t.length!==t[0].length)return null;let n=0;for(let e=0;e{if(t.length!==2||t[0].length!==2)return null;const n=h(t),e=g(t);if(n===null||e===null)return null;const l=n*n-4*e;if(l<0)return null;const r=Math.sqrt(l);return{l1:(n+r)/2,l2:(n-r)/2}},w=t=>Math.round(t*100)/100;export{y as a,p as b,f as c,m as d,h as e,w as f,g,j as h,d as m,x as r,M as s}; diff --git a/site/assets/maximize-BW0NideE.js b/site/assets/maximize-BW0NideE.js new file mode 100644 index 0000000..74c9b6d --- /dev/null +++ b/site/assets/maximize-BW0NideE.js @@ -0,0 +1,6 @@ +import{c as a}from"./index-DJrAq1Rk.js";/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const e=[["path",{d:"M8 3H5a2 2 0 0 0-2 2v3",key:"1dcmit"}],["path",{d:"M21 8V5a2 2 0 0 0-2-2h-3",key:"1e4gt3"}],["path",{d:"M3 16v3a2 2 0 0 0 2 2h3",key:"wsl5sc"}],["path",{d:"M16 21h3a2 2 0 0 0 2-2v-3",key:"18trek"}]],c=a("maximize",e);export{c as M}; diff --git a/site/assets/mouse-pointer-2-CKfMob4f.js b/site/assets/mouse-pointer-2-CKfMob4f.js new file mode 100644 index 0000000..da8c7a2 --- /dev/null +++ b/site/assets/mouse-pointer-2-CKfMob4f.js @@ -0,0 +1,6 @@ +import{c as e}from"./index-DJrAq1Rk.js";/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const o=[["path",{d:"M4.037 4.688a.495.495 0 0 1 .651-.651l16 6.5a.5.5 0 0 1-.063.947l-6.124 1.58a2 2 0 0 0-1.438 1.435l-1.579 6.126a.5.5 0 0 1-.947.063z",key:"edeuup"}]],t=e("mouse-pointer-2",o);export{t as M}; diff --git a/site/assets/react-three-fiber.esm-DbvaK_kO.js b/site/assets/react-three-fiber.esm-DbvaK_kO.js new file mode 100644 index 0000000..6586c24 --- /dev/null +++ b/site/assets/react-three-fiber.esm-DbvaK_kO.js @@ -0,0 +1,3879 @@ +import{N as $p,s as tm,R as Db,r as le,j as mi}from"./index-DJrAq1Rk.js";/** + * @license + * Copyright 2010-2024 Three.js Authors + * SPDX-License-Identifier: MIT + */const Eh="170",Ub={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},Nb={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},cy=0,Up=1,uy=2,Lb=3,hy=0,Th=1,fl=2,Vi=3,Us=0,Hn=1,Qi=2,Rs=0,$a=1,Np=2,Lp=3,Pp=4,fy=5,ra=100,dy=101,py=102,my=103,gy=104,vy=200,_y=201,yy=202,xy=203,Iu=204,Ou=205,Sy=206,My=207,by=208,Ey=209,Ty=210,Ay=211,Cy=212,wy=213,Ry=214,Bu=0,zu=1,Fu=2,ir=3,Hu=4,Vu=5,Gu=6,ku=7,Gl=0,Dy=1,Uy=2,es=0,Ny=1,Ly=2,Py=3,em=4,Iy=5,Oy=6,By=7,Ip="attached",zy="detached",Ah=300,Ns=301,oa=302,bl=303,El=304,_o=306,Tl=1e3,Ri=1001,Al=1002,Sn=1003,nm=1004,Pb=1004,ro=1005,Ib=1005,un=1006,dl=1007,Ob=1007,$i=1008,Bb=1008,ki=1009,im=1010,sm=1011,fo=1012,Ch=1013,Ls=1014,Jn=1015,yo=1016,wh=1017,Rh=1018,sr=1020,am=35902,rm=1021,om=1022,Un=1023,lm=1024,cm=1025,tr=1026,ar=1027,Dh=1028,kl=1029,um=1030,Uh=1031,zb=1032,Nh=1033,pl=33776,ml=33777,gl=33778,vl=33779,Wu=35840,Xu=35841,qu=35842,Yu=35843,Zu=36196,Ku=37492,ju=37496,Ju=37808,Qu=37809,$u=37810,th=37811,eh=37812,nh=37813,ih=37814,sh=37815,ah=37816,rh=37817,oh=37818,lh=37819,ch=37820,uh=37821,_l=36492,hh=36494,fh=36495,hm=36283,dh=36284,ph=36285,mh=36286,Fy=2200,Hy=2201,Vy=2202,Cl=2300,gh=2301,Uu=2302,Ka=2400,ja=2401,wl=2402,Lh=2500,fm=2501,Fb=0,Hb=1,Vb=2,Gy=3200,ky=3201,Gb=3202,kb=3203,ca=0,Wy=1,Ts="",Dn="srgb",ua="srgb-linear",Wl="linear",Be="srgb",Wb=0,qa=7680,Xb=7681,qb=7682,Yb=7683,Zb=34055,Kb=34056,jb=5386,Jb=512,Qb=513,$b=514,tE=515,eE=516,nE=517,iE=518,Op=519,Xy=512,qy=513,Yy=514,dm=515,Zy=516,Ky=517,jy=518,Jy=519,Rl=35044,sE=35048,aE=35040,rE=35045,oE=35049,lE=35041,cE=35046,uE=35050,hE=35042,fE="100",Bp="300 es",ts=2e3,Dl=2001;class ss{addEventListener(t,e){this._listeners===void 0&&(this._listeners={});const n=this._listeners;n[t]===void 0&&(n[t]=[]),n[t].indexOf(e)===-1&&n[t].push(e)}hasEventListener(t,e){if(this._listeners===void 0)return!1;const n=this._listeners;return n[t]!==void 0&&n[t].indexOf(e)!==-1}removeEventListener(t,e){if(this._listeners===void 0)return;const i=this._listeners[t];if(i!==void 0){const o=i.indexOf(e);o!==-1&&i.splice(o,1)}}dispatchEvent(t){if(this._listeners===void 0)return;const n=this._listeners[t.type];if(n!==void 0){t.target=this;const i=n.slice(0);for(let o=0,l=i.length;o>8&255]+Cn[s>>16&255]+Cn[s>>24&255]+"-"+Cn[t&255]+Cn[t>>8&255]+"-"+Cn[t>>16&15|64]+Cn[t>>24&255]+"-"+Cn[e&63|128]+Cn[e>>8&255]+"-"+Cn[e>>16&255]+Cn[e>>24&255]+Cn[n&255]+Cn[n>>8&255]+Cn[n>>16&255]+Cn[n>>24&255]).toLowerCase()}function en(s,t,e){return Math.max(t,Math.min(e,s))}function pm(s,t){return(s%t+t)%t}function dE(s,t,e,n,i){return n+(s-t)*(i-n)/(e-t)}function pE(s,t,e){return s!==t?(e-s)/(t-s):0}function yl(s,t,e){return(1-e)*s+e*t}function mE(s,t,e,n){return yl(s,t,1-Math.exp(-e*n))}function gE(s,t=1){return t-Math.abs(pm(s,t*2)-t)}function vE(s,t,e){return s<=t?0:s>=e?1:(s=(s-t)/(e-t),s*s*(3-2*s))}function _E(s,t,e){return s<=t?0:s>=e?1:(s=(s-t)/(e-t),s*s*s*(s*(s*6-15)+10))}function yE(s,t){return s+Math.floor(Math.random()*(t-s+1))}function xE(s,t){return s+Math.random()*(t-s)}function SE(s){return s*(.5-Math.random())}function ME(s){s!==void 0&&(n0=s);let t=n0+=1831565813;return t=Math.imul(t^t>>>15,t|1),t^=t+Math.imul(t^t>>>7,t|61),((t^t>>>14)>>>0)/4294967296}function bE(s){return s*er}function EE(s){return s*po}function TE(s){return(s&s-1)===0&&s!==0}function AE(s){return Math.pow(2,Math.ceil(Math.log(s)/Math.LN2))}function CE(s){return Math.pow(2,Math.floor(Math.log(s)/Math.LN2))}function wE(s,t,e,n,i){const o=Math.cos,l=Math.sin,c=o(e/2),h=l(e/2),f=o((t+n)/2),p=l((t+n)/2),m=o((t-n)/2),g=l((t-n)/2),_=o((n-t)/2),x=l((n-t)/2);switch(i){case"XYX":s.set(c*p,h*m,h*g,c*f);break;case"YZY":s.set(h*g,c*p,h*m,c*f);break;case"ZXZ":s.set(h*m,h*g,c*p,c*f);break;case"XZX":s.set(c*p,h*x,h*_,c*f);break;case"YXY":s.set(h*_,c*p,h*x,c*f);break;case"ZYZ":s.set(h*x,h*_,c*p,c*f);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+i)}}function Fn(s,t){switch(t.constructor){case Float32Array:return s;case Uint32Array:return s/4294967295;case Uint16Array:return s/65535;case Uint8Array:return s/255;case Int32Array:return Math.max(s/2147483647,-1);case Int16Array:return Math.max(s/32767,-1);case Int8Array:return Math.max(s/127,-1);default:throw new Error("Invalid component type.")}}function fe(s,t){switch(t.constructor){case Float32Array:return s;case Uint32Array:return Math.round(s*4294967295);case Uint16Array:return Math.round(s*65535);case Uint8Array:return Math.round(s*255);case Int32Array:return Math.round(s*2147483647);case Int16Array:return Math.round(s*32767);case Int8Array:return Math.round(s*127);default:throw new Error("Invalid component type.")}}const RE={DEG2RAD:er,RAD2DEG:po,generateUUID:gi,clamp:en,euclideanModulo:pm,mapLinear:dE,inverseLerp:pE,lerp:yl,damp:mE,pingpong:gE,smoothstep:vE,smootherstep:_E,randInt:yE,randFloat:xE,randFloatSpread:SE,seededRandom:ME,degToRad:bE,radToDeg:EE,isPowerOfTwo:TE,ceilPowerOfTwo:AE,floorPowerOfTwo:CE,setQuaternionFromProperEuler:wE,normalize:fe,denormalize:Fn};class dt{constructor(t=0,e=0){dt.prototype.isVector2=!0,this.x=t,this.y=e}get width(){return this.x}set width(t){this.x=t}get height(){return this.y}set height(t){this.y=t}set(t,e){return this.x=t,this.y=e,this}setScalar(t){return this.x=t,this.y=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y)}copy(t){return this.x=t.x,this.y=t.y,this}add(t){return this.x+=t.x,this.y+=t.y,this}addScalar(t){return this.x+=t,this.y+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this}subScalar(t){return this.x-=t,this.y-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this}multiply(t){return this.x*=t.x,this.y*=t.y,this}multiplyScalar(t){return this.x*=t,this.y*=t,this}divide(t){return this.x/=t.x,this.y/=t.y,this}divideScalar(t){return this.multiplyScalar(1/t)}applyMatrix3(t){const e=this.x,n=this.y,i=t.elements;return this.x=i[0]*e+i[3]*n+i[6],this.y=i[1]*e+i[4]*n+i[7],this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this}clamp(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this}clampScalar(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=Math.max(t,Math.min(e,this.y)),this}clampLength(t,e){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(t){return this.x*t.x+this.y*t.y}cross(t){return this.x*t.y-this.y*t.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(t){const e=Math.sqrt(this.lengthSq()*t.lengthSq());if(e===0)return Math.PI/2;const n=this.dot(t)/e;return Math.acos(en(n,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,n=this.y-t.y;return e*e+n*n}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this}lerpVectors(t,e,n){return this.x=t.x+(e.x-t.x)*n,this.y=t.y+(e.y-t.y)*n,this}equals(t){return t.x===this.x&&t.y===this.y}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this}rotateAround(t,e){const n=Math.cos(e),i=Math.sin(e),o=this.x-t.x,l=this.y-t.y;return this.x=o*n-l*i+t.x,this.y=o*i+l*n+t.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class ue{constructor(t,e,n,i,o,l,c,h,f){ue.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],t!==void 0&&this.set(t,e,n,i,o,l,c,h,f)}set(t,e,n,i,o,l,c,h,f){const p=this.elements;return p[0]=t,p[1]=i,p[2]=c,p[3]=e,p[4]=o,p[5]=h,p[6]=n,p[7]=l,p[8]=f,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(t){const e=this.elements,n=t.elements;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],this}extractBasis(t,e,n){return t.setFromMatrix3Column(this,0),e.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(t){const e=t.elements;return this.set(e[0],e[4],e[8],e[1],e[5],e[9],e[2],e[6],e[10]),this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,e){const n=t.elements,i=e.elements,o=this.elements,l=n[0],c=n[3],h=n[6],f=n[1],p=n[4],m=n[7],g=n[2],_=n[5],x=n[8],b=i[0],S=i[3],y=i[6],E=i[1],A=i[4],T=i[7],z=i[2],D=i[5],L=i[8];return o[0]=l*b+c*E+h*z,o[3]=l*S+c*A+h*D,o[6]=l*y+c*T+h*L,o[1]=f*b+p*E+m*z,o[4]=f*S+p*A+m*D,o[7]=f*y+p*T+m*L,o[2]=g*b+_*E+x*z,o[5]=g*S+_*A+x*D,o[8]=g*y+_*T+x*L,this}multiplyScalar(t){const e=this.elements;return e[0]*=t,e[3]*=t,e[6]*=t,e[1]*=t,e[4]*=t,e[7]*=t,e[2]*=t,e[5]*=t,e[8]*=t,this}determinant(){const t=this.elements,e=t[0],n=t[1],i=t[2],o=t[3],l=t[4],c=t[5],h=t[6],f=t[7],p=t[8];return e*l*p-e*c*f-n*o*p+n*c*h+i*o*f-i*l*h}invert(){const t=this.elements,e=t[0],n=t[1],i=t[2],o=t[3],l=t[4],c=t[5],h=t[6],f=t[7],p=t[8],m=p*l-c*f,g=c*h-p*o,_=f*o-l*h,x=e*m+n*g+i*_;if(x===0)return this.set(0,0,0,0,0,0,0,0,0);const b=1/x;return t[0]=m*b,t[1]=(i*f-p*n)*b,t[2]=(c*n-i*l)*b,t[3]=g*b,t[4]=(p*e-i*h)*b,t[5]=(i*o-c*e)*b,t[6]=_*b,t[7]=(n*h-f*e)*b,t[8]=(l*e-n*o)*b,this}transpose(){let t;const e=this.elements;return t=e[1],e[1]=e[3],e[3]=t,t=e[2],e[2]=e[6],e[6]=t,t=e[5],e[5]=e[7],e[7]=t,this}getNormalMatrix(t){return this.setFromMatrix4(t).invert().transpose()}transposeIntoArray(t){const e=this.elements;return t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8],this}setUvTransform(t,e,n,i,o,l,c){const h=Math.cos(o),f=Math.sin(o);return this.set(n*h,n*f,-n*(h*l+f*c)+l+t,-i*f,i*h,-i*(-f*l+h*c)+c+e,0,0,1),this}scale(t,e){return this.premultiply(Ad.makeScale(t,e)),this}rotate(t){return this.premultiply(Ad.makeRotation(-t)),this}translate(t,e){return this.premultiply(Ad.makeTranslation(t,e)),this}makeTranslation(t,e){return t.isVector2?this.set(1,0,t.x,0,1,t.y,0,0,1):this.set(1,0,t,0,1,e,0,0,1),this}makeRotation(t){const e=Math.cos(t),n=Math.sin(t);return this.set(e,-n,0,n,e,0,0,0,1),this}makeScale(t,e){return this.set(t,0,0,0,e,0,0,0,1),this}equals(t){const e=this.elements,n=t.elements;for(let i=0;i<9;i++)if(e[i]!==n[i])return!1;return!0}fromArray(t,e=0){for(let n=0;n<9;n++)this.elements[n]=t[n+e];return this}toArray(t=[],e=0){const n=this.elements;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t}clone(){return new this.constructor().fromArray(this.elements)}}const Ad=new ue;function Qy(s){for(let t=s.length-1;t>=0;--t)if(s[t]>=65535)return!0;return!1}const DE={Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};function oo(s,t){return new DE[s](t)}function Ul(s){return document.createElementNS("http://www.w3.org/1999/xhtml",s)}function $y(){const s=Ul("canvas");return s.style.display="block",s}const i0={};function cl(s){s in i0||(i0[s]=!0,console.warn(s))}function UE(s,t,e){return new Promise(function(n,i){function o(){switch(s.clientWaitSync(t,s.SYNC_FLUSH_COMMANDS_BIT,0)){case s.WAIT_FAILED:i();break;case s.TIMEOUT_EXPIRED:setTimeout(o,e);break;default:n()}}setTimeout(o,e)})}function NE(s){const t=s.elements;t[2]=.5*t[2]+.5*t[3],t[6]=.5*t[6]+.5*t[7],t[10]=.5*t[10]+.5*t[11],t[14]=.5*t[14]+.5*t[15]}function LE(s){const t=s.elements;t[11]===-1?(t[10]=-t[10]-1,t[14]=-t[14]):(t[10]=-t[10],t[14]=-t[14]+1)}const Se={enabled:!0,workingColorSpace:ua,spaces:{},convert:function(s,t,e){return this.enabled===!1||t===e||!t||!e||(this.spaces[t].transfer===Be&&(s.r=Ds(s.r),s.g=Ds(s.g),s.b=Ds(s.b)),this.spaces[t].primaries!==this.spaces[e].primaries&&(s.applyMatrix3(this.spaces[t].toXYZ),s.applyMatrix3(this.spaces[e].fromXYZ)),this.spaces[e].transfer===Be&&(s.r=ho(s.r),s.g=ho(s.g),s.b=ho(s.b))),s},fromWorkingColorSpace:function(s,t){return this.convert(s,this.workingColorSpace,t)},toWorkingColorSpace:function(s,t){return this.convert(s,t,this.workingColorSpace)},getPrimaries:function(s){return this.spaces[s].primaries},getTransfer:function(s){return s===Ts?Wl:this.spaces[s].transfer},getLuminanceCoefficients:function(s,t=this.workingColorSpace){return s.fromArray(this.spaces[t].luminanceCoefficients)},define:function(s){Object.assign(this.spaces,s)},_getMatrix:function(s,t,e){return s.copy(this.spaces[t].toXYZ).multiply(this.spaces[e].fromXYZ)},_getDrawingBufferColorSpace:function(s){return this.spaces[s].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(s=this.workingColorSpace){return this.spaces[s].workingColorSpaceConfig.unpackColorSpace}};function Ds(s){return s<.04045?s*.0773993808:Math.pow(s*.9478672986+.0521327014,2.4)}function ho(s){return s<.0031308?s*12.92:1.055*Math.pow(s,.41666)-.055}const s0=[.64,.33,.3,.6,.15,.06],a0=[.2126,.7152,.0722],r0=[.3127,.329],o0=new ue().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),l0=new ue().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715);Se.define({[ua]:{primaries:s0,whitePoint:r0,transfer:Wl,toXYZ:o0,fromXYZ:l0,luminanceCoefficients:a0,workingColorSpaceConfig:{unpackColorSpace:Dn},outputColorSpaceConfig:{drawingBufferColorSpace:Dn}},[Dn]:{primaries:s0,whitePoint:r0,transfer:Be,toXYZ:o0,fromXYZ:l0,luminanceCoefficients:a0,outputColorSpaceConfig:{drawingBufferColorSpace:Dn}}});let Hr;class tx{static getDataURL(t){if(/^data:/i.test(t.src)||typeof HTMLCanvasElement>"u")return t.src;let e;if(t instanceof HTMLCanvasElement)e=t;else{Hr===void 0&&(Hr=Ul("canvas")),Hr.width=t.width,Hr.height=t.height;const n=Hr.getContext("2d");t instanceof ImageData?n.putImageData(t,0,0):n.drawImage(t,0,0,t.width,t.height),e=Hr}return e.width>2048||e.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",t),e.toDataURL("image/jpeg",.6)):e.toDataURL("image/png")}static sRGBToLinear(t){if(typeof HTMLImageElement<"u"&&t instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&t instanceof ImageBitmap){const e=Ul("canvas");e.width=t.width,e.height=t.height;const n=e.getContext("2d");n.drawImage(t,0,0,t.width,t.height);const i=n.getImageData(0,0,t.width,t.height),o=i.data;for(let l=0;l0&&(n.userData=this.userData),e||(t.textures[this.uuid]=n),n}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(t){if(this.mapping!==Ah)return t;if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case Tl:t.x=t.x-Math.floor(t.x);break;case Ri:t.x=t.x<0?0:1;break;case Al:Math.abs(Math.floor(t.x)%2)===1?t.x=Math.ceil(t.x)-t.x:t.x=t.x-Math.floor(t.x);break}if(t.y<0||t.y>1)switch(this.wrapT){case Tl:t.y=t.y-Math.floor(t.y);break;case Ri:t.y=t.y<0?0:1;break;case Al:Math.abs(Math.floor(t.y)%2)===1?t.y=Math.ceil(t.y)-t.y:t.y=t.y-Math.floor(t.y);break}return this.flipY&&(t.y=1-t.y),t}set needsUpdate(t){t===!0&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(t){t===!0&&this.pmremVersion++}}nn.DEFAULT_IMAGE=null;nn.DEFAULT_MAPPING=Ah;nn.DEFAULT_ANISOTROPY=1;class we{constructor(t=0,e=0,n=0,i=1){we.prototype.isVector4=!0,this.x=t,this.y=e,this.z=n,this.w=i}get width(){return this.z}set width(t){this.z=t}get height(){return this.w}set height(t){this.w=t}set(t,e,n,i){return this.x=t,this.y=e,this.z=n,this.w=i,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this.w=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setW(t){return this.w=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;case 3:this.w=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=t.w!==void 0?t.w:1,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this.w+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this.w=t.w+e.w,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this.w+=t.w*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this.w=t.w-e.w,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this.w*=t.w,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this}applyMatrix4(t){const e=this.x,n=this.y,i=this.z,o=this.w,l=t.elements;return this.x=l[0]*e+l[4]*n+l[8]*i+l[12]*o,this.y=l[1]*e+l[5]*n+l[9]*i+l[13]*o,this.z=l[2]*e+l[6]*n+l[10]*i+l[14]*o,this.w=l[3]*e+l[7]*n+l[11]*i+l[15]*o,this}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this.w/=t.w,this}divideScalar(t){return this.multiplyScalar(1/t)}setAxisAngleFromQuaternion(t){this.w=2*Math.acos(t.w);const e=Math.sqrt(1-t.w*t.w);return e<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=t.x/e,this.y=t.y/e,this.z=t.z/e),this}setAxisAngleFromRotationMatrix(t){let e,n,i,o;const h=t.elements,f=h[0],p=h[4],m=h[8],g=h[1],_=h[5],x=h[9],b=h[2],S=h[6],y=h[10];if(Math.abs(p-g)<.01&&Math.abs(m-b)<.01&&Math.abs(x-S)<.01){if(Math.abs(p+g)<.1&&Math.abs(m+b)<.1&&Math.abs(x+S)<.1&&Math.abs(f+_+y-3)<.1)return this.set(1,0,0,0),this;e=Math.PI;const A=(f+1)/2,T=(_+1)/2,z=(y+1)/2,D=(p+g)/4,L=(m+b)/4,B=(x+S)/4;return A>T&&A>z?A<.01?(n=0,i=.707106781,o=.707106781):(n=Math.sqrt(A),i=D/n,o=L/n):T>z?T<.01?(n=.707106781,i=0,o=.707106781):(i=Math.sqrt(T),n=D/i,o=B/i):z<.01?(n=.707106781,i=.707106781,o=0):(o=Math.sqrt(z),n=L/o,i=B/o),this.set(n,i,o,e),this}let E=Math.sqrt((S-x)*(S-x)+(m-b)*(m-b)+(g-p)*(g-p));return Math.abs(E)<.001&&(E=1),this.x=(S-x)/E,this.y=(m-b)/E,this.z=(g-p)/E,this.w=Math.acos((f+_+y-1)/2),this}setFromMatrixPosition(t){const e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this.w=e[15],this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this.w=Math.min(this.w,t.w),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this.w=Math.max(this.w,t.w),this}clamp(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this.w=Math.max(t.w,Math.min(e.w,this.w)),this}clampScalar(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=Math.max(t,Math.min(e,this.y)),this.z=Math.max(t,Math.min(e,this.z)),this.w=Math.max(t,Math.min(e,this.w)),this}clampLength(t,e){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this.w+=(t.w-this.w)*e,this}lerpVectors(t,e,n){return this.x=t.x+(e.x-t.x)*n,this.y=t.y+(e.y-t.y)*n,this.z=t.z+(e.z-t.z)*n,this.w=t.w+(e.w-t.w)*n,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z&&t.w===this.w}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this.w=t[e+3],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t[e+3]=this.w,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this.w=t.getW(e),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class ex extends ss{constructor(t=1,e=1,n={}){super(),this.isRenderTarget=!0,this.width=t,this.height=e,this.depth=1,this.scissor=new we(0,0,t,e),this.scissorTest=!1,this.viewport=new we(0,0,t,e);const i={width:t,height:e,depth:1};n=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:un,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1},n);const o=new nn(i,n.mapping,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.colorSpace);o.flipY=!1,o.generateMipmaps=n.generateMipmaps,o.internalFormat=n.internalFormat,this.textures=[];const l=n.count;for(let c=0;c=0?1:-1,A=1-y*y;if(A>Number.EPSILON){const z=Math.sqrt(A),D=Math.atan2(z,y*E);S=Math.sin(S*D)/z,c=Math.sin(c*D)/z}const T=c*E;if(h=h*S+g*T,f=f*S+_*T,p=p*S+x*T,m=m*S+b*T,S===1-c){const z=1/Math.sqrt(h*h+f*f+p*p+m*m);h*=z,f*=z,p*=z,m*=z}}t[e]=h,t[e+1]=f,t[e+2]=p,t[e+3]=m}static multiplyQuaternionsFlat(t,e,n,i,o,l){const c=n[i],h=n[i+1],f=n[i+2],p=n[i+3],m=o[l],g=o[l+1],_=o[l+2],x=o[l+3];return t[e]=c*x+p*m+h*_-f*g,t[e+1]=h*x+p*g+f*m-c*_,t[e+2]=f*x+p*_+c*g-h*m,t[e+3]=p*x-c*m-h*g-f*_,t}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get w(){return this._w}set w(t){this._w=t,this._onChangeCallback()}set(t,e,n,i){return this._x=t,this._y=e,this._z=n,this._w=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(t){return this._x=t.x,this._y=t.y,this._z=t.z,this._w=t.w,this._onChangeCallback(),this}setFromEuler(t,e=!0){const n=t._x,i=t._y,o=t._z,l=t._order,c=Math.cos,h=Math.sin,f=c(n/2),p=c(i/2),m=c(o/2),g=h(n/2),_=h(i/2),x=h(o/2);switch(l){case"XYZ":this._x=g*p*m+f*_*x,this._y=f*_*m-g*p*x,this._z=f*p*x+g*_*m,this._w=f*p*m-g*_*x;break;case"YXZ":this._x=g*p*m+f*_*x,this._y=f*_*m-g*p*x,this._z=f*p*x-g*_*m,this._w=f*p*m+g*_*x;break;case"ZXY":this._x=g*p*m-f*_*x,this._y=f*_*m+g*p*x,this._z=f*p*x+g*_*m,this._w=f*p*m-g*_*x;break;case"ZYX":this._x=g*p*m-f*_*x,this._y=f*_*m+g*p*x,this._z=f*p*x-g*_*m,this._w=f*p*m+g*_*x;break;case"YZX":this._x=g*p*m+f*_*x,this._y=f*_*m+g*p*x,this._z=f*p*x-g*_*m,this._w=f*p*m-g*_*x;break;case"XZY":this._x=g*p*m-f*_*x,this._y=f*_*m-g*p*x,this._z=f*p*x+g*_*m,this._w=f*p*m+g*_*x;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+l)}return e===!0&&this._onChangeCallback(),this}setFromAxisAngle(t,e){const n=e/2,i=Math.sin(n);return this._x=t.x*i,this._y=t.y*i,this._z=t.z*i,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(t){const e=t.elements,n=e[0],i=e[4],o=e[8],l=e[1],c=e[5],h=e[9],f=e[2],p=e[6],m=e[10],g=n+c+m;if(g>0){const _=.5/Math.sqrt(g+1);this._w=.25/_,this._x=(p-h)*_,this._y=(o-f)*_,this._z=(l-i)*_}else if(n>c&&n>m){const _=2*Math.sqrt(1+n-c-m);this._w=(p-h)/_,this._x=.25*_,this._y=(i+l)/_,this._z=(o+f)/_}else if(c>m){const _=2*Math.sqrt(1+c-n-m);this._w=(o-f)/_,this._x=(i+l)/_,this._y=.25*_,this._z=(h+p)/_}else{const _=2*Math.sqrt(1+m-n-c);this._w=(l-i)/_,this._x=(o+f)/_,this._y=(h+p)/_,this._z=.25*_}return this._onChangeCallback(),this}setFromUnitVectors(t,e){let n=t.dot(e)+1;return nMath.abs(t.z)?(this._x=-t.y,this._y=t.x,this._z=0,this._w=n):(this._x=0,this._y=-t.z,this._z=t.y,this._w=n)):(this._x=t.y*e.z-t.z*e.y,this._y=t.z*e.x-t.x*e.z,this._z=t.x*e.y-t.y*e.x,this._w=n),this.normalize()}angleTo(t){return 2*Math.acos(Math.abs(en(this.dot(t),-1,1)))}rotateTowards(t,e){const n=this.angleTo(t);if(n===0)return this;const i=Math.min(1,e/n);return this.slerp(t,i),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(t){return this._x*t._x+this._y*t._y+this._z*t._z+this._w*t._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let t=this.length();return t===0?(this._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=this._w*t),this._onChangeCallback(),this}multiply(t){return this.multiplyQuaternions(this,t)}premultiply(t){return this.multiplyQuaternions(t,this)}multiplyQuaternions(t,e){const n=t._x,i=t._y,o=t._z,l=t._w,c=e._x,h=e._y,f=e._z,p=e._w;return this._x=n*p+l*c+i*f-o*h,this._y=i*p+l*h+o*c-n*f,this._z=o*p+l*f+n*h-i*c,this._w=l*p-n*c-i*h-o*f,this._onChangeCallback(),this}slerp(t,e){if(e===0)return this;if(e===1)return this.copy(t);const n=this._x,i=this._y,o=this._z,l=this._w;let c=l*t._w+n*t._x+i*t._y+o*t._z;if(c<0?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,c=-c):this.copy(t),c>=1)return this._w=l,this._x=n,this._y=i,this._z=o,this;const h=1-c*c;if(h<=Number.EPSILON){const _=1-e;return this._w=_*l+e*this._w,this._x=_*n+e*this._x,this._y=_*i+e*this._y,this._z=_*o+e*this._z,this.normalize(),this}const f=Math.sqrt(h),p=Math.atan2(f,c),m=Math.sin((1-e)*p)/f,g=Math.sin(e*p)/f;return this._w=l*m+this._w*g,this._x=n*m+this._x*g,this._y=i*m+this._y*g,this._z=o*m+this._z*g,this._onChangeCallback(),this}slerpQuaternions(t,e,n){return this.copy(t).slerp(e,n)}random(){const t=2*Math.PI*Math.random(),e=2*Math.PI*Math.random(),n=Math.random(),i=Math.sqrt(1-n),o=Math.sqrt(n);return this.set(i*Math.sin(t),i*Math.cos(t),o*Math.sin(e),o*Math.cos(e))}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._w===this._w}fromArray(t,e=0){return this._x=t[e],this._y=t[e+1],this._z=t[e+2],this._w=t[e+3],this._onChangeCallback(),this}toArray(t=[],e=0){return t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._w,t}fromBufferAttribute(t,e){return this._x=t.getX(e),this._y=t.getY(e),this._z=t.getZ(e),this._w=t.getW(e),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class O{constructor(t=0,e=0,n=0){O.prototype.isVector3=!0,this.x=t,this.y=e,this.z=n}set(t,e,n){return n===void 0&&(n=this.z),this.x=t,this.y=e,this.z=n,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this}multiplyVectors(t,e){return this.x=t.x*e.x,this.y=t.y*e.y,this.z=t.z*e.z,this}applyEuler(t){return this.applyQuaternion(c0.setFromEuler(t))}applyAxisAngle(t,e){return this.applyQuaternion(c0.setFromAxisAngle(t,e))}applyMatrix3(t){const e=this.x,n=this.y,i=this.z,o=t.elements;return this.x=o[0]*e+o[3]*n+o[6]*i,this.y=o[1]*e+o[4]*n+o[7]*i,this.z=o[2]*e+o[5]*n+o[8]*i,this}applyNormalMatrix(t){return this.applyMatrix3(t).normalize()}applyMatrix4(t){const e=this.x,n=this.y,i=this.z,o=t.elements,l=1/(o[3]*e+o[7]*n+o[11]*i+o[15]);return this.x=(o[0]*e+o[4]*n+o[8]*i+o[12])*l,this.y=(o[1]*e+o[5]*n+o[9]*i+o[13])*l,this.z=(o[2]*e+o[6]*n+o[10]*i+o[14])*l,this}applyQuaternion(t){const e=this.x,n=this.y,i=this.z,o=t.x,l=t.y,c=t.z,h=t.w,f=2*(l*i-c*n),p=2*(c*e-o*i),m=2*(o*n-l*e);return this.x=e+h*f+l*m-c*p,this.y=n+h*p+c*f-o*m,this.z=i+h*m+o*p-l*f,this}project(t){return this.applyMatrix4(t.matrixWorldInverse).applyMatrix4(t.projectionMatrix)}unproject(t){return this.applyMatrix4(t.projectionMatrixInverse).applyMatrix4(t.matrixWorld)}transformDirection(t){const e=this.x,n=this.y,i=this.z,o=t.elements;return this.x=o[0]*e+o[4]*n+o[8]*i,this.y=o[1]*e+o[5]*n+o[9]*i,this.z=o[2]*e+o[6]*n+o[10]*i,this.normalize()}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this}divideScalar(t){return this.multiplyScalar(1/t)}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this}clamp(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this}clampScalar(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=Math.max(t,Math.min(e,this.y)),this.z=Math.max(t,Math.min(e,this.z)),this}clampLength(t,e){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this}lerpVectors(t,e,n){return this.x=t.x+(e.x-t.x)*n,this.y=t.y+(e.y-t.y)*n,this.z=t.z+(e.z-t.z)*n,this}cross(t){return this.crossVectors(this,t)}crossVectors(t,e){const n=t.x,i=t.y,o=t.z,l=e.x,c=e.y,h=e.z;return this.x=i*h-o*c,this.y=o*l-n*h,this.z=n*c-i*l,this}projectOnVector(t){const e=t.lengthSq();if(e===0)return this.set(0,0,0);const n=t.dot(this)/e;return this.copy(t).multiplyScalar(n)}projectOnPlane(t){return wd.copy(this).projectOnVector(t),this.sub(wd)}reflect(t){return this.sub(wd.copy(t).multiplyScalar(2*this.dot(t)))}angleTo(t){const e=Math.sqrt(this.lengthSq()*t.lengthSq());if(e===0)return Math.PI/2;const n=this.dot(t)/e;return Math.acos(en(n,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,n=this.y-t.y,i=this.z-t.z;return e*e+n*n+i*i}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)}setFromSpherical(t){return this.setFromSphericalCoords(t.radius,t.phi,t.theta)}setFromSphericalCoords(t,e,n){const i=Math.sin(e)*t;return this.x=i*Math.sin(n),this.y=Math.cos(e)*t,this.z=i*Math.cos(n),this}setFromCylindrical(t){return this.setFromCylindricalCoords(t.radius,t.theta,t.y)}setFromCylindricalCoords(t,e,n){return this.x=t*Math.sin(e),this.y=n,this.z=t*Math.cos(e),this}setFromMatrixPosition(t){const e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this}setFromMatrixScale(t){const e=this.setFromMatrixColumn(t,0).length(),n=this.setFromMatrixColumn(t,1).length(),i=this.setFromMatrixColumn(t,2).length();return this.x=e,this.y=n,this.z=i,this}setFromMatrixColumn(t,e){return this.fromArray(t.elements,e*4)}setFromMatrix3Column(t,e){return this.fromArray(t.elements,e*3)}setFromEuler(t){return this.x=t._x,this.y=t._y,this.z=t._z,this}setFromColor(t){return this.x=t.r,this.y=t.g,this.z=t.b,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const t=Math.random()*Math.PI*2,e=Math.random()*2-1,n=Math.sqrt(1-e*e);return this.x=n*Math.cos(t),this.y=e,this.z=n*Math.sin(t),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const wd=new O,c0=new Qn;class Vn{constructor(t=new O(1/0,1/0,1/0),e=new O(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=t,this.max=e}set(t,e){return this.min.copy(t),this.max.copy(e),this}setFromArray(t){this.makeEmpty();for(let e=0,n=t.length;e=this.min.x&&t.x<=this.max.x&&t.y>=this.min.y&&t.y<=this.max.y&&t.z>=this.min.z&&t.z<=this.max.z}containsBox(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y&&this.min.z<=t.min.z&&t.max.z<=this.max.z}getParameter(t,e){return e.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y),(t.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(t){return t.max.x>=this.min.x&&t.min.x<=this.max.x&&t.max.y>=this.min.y&&t.min.y<=this.max.y&&t.max.z>=this.min.z&&t.min.z<=this.max.z}intersectsSphere(t){return this.clampPoint(t.center,zi),zi.distanceToSquared(t.center)<=t.radius*t.radius}intersectsPlane(t){let e,n;return t.normal.x>0?(e=t.normal.x*this.min.x,n=t.normal.x*this.max.x):(e=t.normal.x*this.max.x,n=t.normal.x*this.min.x),t.normal.y>0?(e+=t.normal.y*this.min.y,n+=t.normal.y*this.max.y):(e+=t.normal.y*this.max.y,n+=t.normal.y*this.min.y),t.normal.z>0?(e+=t.normal.z*this.min.z,n+=t.normal.z*this.max.z):(e+=t.normal.z*this.max.z,n+=t.normal.z*this.min.z),e<=-t.constant&&n>=-t.constant}intersectsTriangle(t){if(this.isEmpty())return!1;this.getCenter(jo),Fc.subVectors(this.max,jo),Vr.subVectors(t.a,jo),Gr.subVectors(t.b,jo),kr.subVectors(t.c,jo),Qs.subVectors(Gr,Vr),$s.subVectors(kr,Gr),La.subVectors(Vr,kr);let e=[0,-Qs.z,Qs.y,0,-$s.z,$s.y,0,-La.z,La.y,Qs.z,0,-Qs.x,$s.z,0,-$s.x,La.z,0,-La.x,-Qs.y,Qs.x,0,-$s.y,$s.x,0,-La.y,La.x,0];return!Rd(e,Vr,Gr,kr,Fc)||(e=[1,0,0,0,1,0,0,0,1],!Rd(e,Vr,Gr,kr,Fc))?!1:(Hc.crossVectors(Qs,$s),e=[Hc.x,Hc.y,Hc.z],Rd(e,Vr,Gr,kr,Fc))}clampPoint(t,e){return e.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return this.clampPoint(t,zi).distanceTo(t)}getBoundingSphere(t){return this.isEmpty()?t.makeEmpty():(this.getCenter(t.center),t.radius=this.getSize(zi).length()*.5),t}intersect(t){return this.min.max(t.min),this.max.min(t.max),this.isEmpty()&&this.makeEmpty(),this}union(t){return this.min.min(t.min),this.max.max(t.max),this}applyMatrix4(t){return this.isEmpty()?this:(_s[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(t),_s[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(t),_s[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(t),_s[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(t),_s[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(t),_s[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(t),_s[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(t),_s[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(t),this.setFromPoints(_s),this)}translate(t){return this.min.add(t),this.max.add(t),this}equals(t){return t.min.equals(this.min)&&t.max.equals(this.max)}}const _s=[new O,new O,new O,new O,new O,new O,new O,new O],zi=new O,zc=new Vn,Vr=new O,Gr=new O,kr=new O,Qs=new O,$s=new O,La=new O,jo=new O,Fc=new O,Hc=new O,Pa=new O;function Rd(s,t,e,n,i){for(let o=0,l=s.length-3;o<=l;o+=3){Pa.fromArray(s,o);const c=i.x*Math.abs(Pa.x)+i.y*Math.abs(Pa.y)+i.z*Math.abs(Pa.z),h=t.dot(Pa),f=e.dot(Pa),p=n.dot(Pa);if(Math.max(-Math.max(h,f,p),Math.min(h,f,p))>c)return!1}return!0}const zE=new Vn,Jo=new O,Dd=new O;class Nn{constructor(t=new O,e=-1){this.isSphere=!0,this.center=t,this.radius=e}set(t,e){return this.center.copy(t),this.radius=e,this}setFromPoints(t,e){const n=this.center;e!==void 0?n.copy(e):zE.setFromPoints(t).getCenter(n);let i=0;for(let o=0,l=t.length;othis.radius*this.radius&&(e.sub(this.center).normalize(),e.multiplyScalar(this.radius).add(this.center)),e}getBoundingBox(t){return this.isEmpty()?(t.makeEmpty(),t):(t.set(this.center,this.center),t.expandByScalar(this.radius),t)}applyMatrix4(t){return this.center.applyMatrix4(t),this.radius=this.radius*t.getMaxScaleOnAxis(),this}translate(t){return this.center.add(t),this}expandByPoint(t){if(this.isEmpty())return this.center.copy(t),this.radius=0,this;Jo.subVectors(t,this.center);const e=Jo.lengthSq();if(e>this.radius*this.radius){const n=Math.sqrt(e),i=(n-this.radius)*.5;this.center.addScaledVector(Jo,i/n),this.radius+=i}return this}union(t){return t.isEmpty()?this:this.isEmpty()?(this.copy(t),this):(this.center.equals(t.center)===!0?this.radius=Math.max(this.radius,t.radius):(Dd.subVectors(t.center,this.center).setLength(t.radius),this.expandByPoint(Jo.copy(t.center).add(Dd)),this.expandByPoint(Jo.copy(t.center).sub(Dd))),this)}equals(t){return t.center.equals(this.center)&&t.radius===this.radius}clone(){return new this.constructor().copy(this)}}const ys=new O,Ud=new O,Vc=new O,ta=new O,Nd=new O,Gc=new O,Ld=new O;class xo{constructor(t=new O,e=new O(0,0,-1)){this.origin=t,this.direction=e}set(t,e){return this.origin.copy(t),this.direction.copy(e),this}copy(t){return this.origin.copy(t.origin),this.direction.copy(t.direction),this}at(t,e){return e.copy(this.origin).addScaledVector(this.direction,t)}lookAt(t){return this.direction.copy(t).sub(this.origin).normalize(),this}recast(t){return this.origin.copy(this.at(t,ys)),this}closestPointToPoint(t,e){e.subVectors(t,this.origin);const n=e.dot(this.direction);return n<0?e.copy(this.origin):e.copy(this.origin).addScaledVector(this.direction,n)}distanceToPoint(t){return Math.sqrt(this.distanceSqToPoint(t))}distanceSqToPoint(t){const e=ys.subVectors(t,this.origin).dot(this.direction);return e<0?this.origin.distanceToSquared(t):(ys.copy(this.origin).addScaledVector(this.direction,e),ys.distanceToSquared(t))}distanceSqToSegment(t,e,n,i){Ud.copy(t).add(e).multiplyScalar(.5),Vc.copy(e).sub(t).normalize(),ta.copy(this.origin).sub(Ud);const o=t.distanceTo(e)*.5,l=-this.direction.dot(Vc),c=ta.dot(this.direction),h=-ta.dot(Vc),f=ta.lengthSq(),p=Math.abs(1-l*l);let m,g,_,x;if(p>0)if(m=l*h-c,g=l*c-h,x=o*p,m>=0)if(g>=-x)if(g<=x){const b=1/p;m*=b,g*=b,_=m*(m+l*g+2*c)+g*(l*m+g+2*h)+f}else g=o,m=Math.max(0,-(l*g+c)),_=-m*m+g*(g+2*h)+f;else g=-o,m=Math.max(0,-(l*g+c)),_=-m*m+g*(g+2*h)+f;else g<=-x?(m=Math.max(0,-(-l*o+c)),g=m>0?-o:Math.min(Math.max(-o,-h),o),_=-m*m+g*(g+2*h)+f):g<=x?(m=0,g=Math.min(Math.max(-o,-h),o),_=g*(g+2*h)+f):(m=Math.max(0,-(l*o+c)),g=m>0?o:Math.min(Math.max(-o,-h),o),_=-m*m+g*(g+2*h)+f);else g=l>0?-o:o,m=Math.max(0,-(l*g+c)),_=-m*m+g*(g+2*h)+f;return n&&n.copy(this.origin).addScaledVector(this.direction,m),i&&i.copy(Ud).addScaledVector(Vc,g),_}intersectSphere(t,e){ys.subVectors(t.center,this.origin);const n=ys.dot(this.direction),i=ys.dot(ys)-n*n,o=t.radius*t.radius;if(i>o)return null;const l=Math.sqrt(o-i),c=n-l,h=n+l;return h<0?null:c<0?this.at(h,e):this.at(c,e)}intersectsSphere(t){return this.distanceSqToPoint(t.center)<=t.radius*t.radius}distanceToPlane(t){const e=t.normal.dot(this.direction);if(e===0)return t.distanceToPoint(this.origin)===0?0:null;const n=-(this.origin.dot(t.normal)+t.constant)/e;return n>=0?n:null}intersectPlane(t,e){const n=this.distanceToPlane(t);return n===null?null:this.at(n,e)}intersectsPlane(t){const e=t.distanceToPoint(this.origin);return e===0||t.normal.dot(this.direction)*e<0}intersectBox(t,e){let n,i,o,l,c,h;const f=1/this.direction.x,p=1/this.direction.y,m=1/this.direction.z,g=this.origin;return f>=0?(n=(t.min.x-g.x)*f,i=(t.max.x-g.x)*f):(n=(t.max.x-g.x)*f,i=(t.min.x-g.x)*f),p>=0?(o=(t.min.y-g.y)*p,l=(t.max.y-g.y)*p):(o=(t.max.y-g.y)*p,l=(t.min.y-g.y)*p),n>l||o>i||((o>n||isNaN(n))&&(n=o),(l=0?(c=(t.min.z-g.z)*m,h=(t.max.z-g.z)*m):(c=(t.max.z-g.z)*m,h=(t.min.z-g.z)*m),n>h||c>i)||((c>n||n!==n)&&(n=c),(h=0?n:i,e)}intersectsBox(t){return this.intersectBox(t,ys)!==null}intersectTriangle(t,e,n,i,o){Nd.subVectors(e,t),Gc.subVectors(n,t),Ld.crossVectors(Nd,Gc);let l=this.direction.dot(Ld),c;if(l>0){if(i)return null;c=1}else if(l<0)c=-1,l=-l;else return null;ta.subVectors(this.origin,t);const h=c*this.direction.dot(Gc.crossVectors(ta,Gc));if(h<0)return null;const f=c*this.direction.dot(Nd.cross(ta));if(f<0||h+f>l)return null;const p=-c*ta.dot(Ld);return p<0?null:this.at(p/l,o)}applyMatrix4(t){return this.origin.applyMatrix4(t),this.direction.transformDirection(t),this}equals(t){return t.origin.equals(this.origin)&&t.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class ee{constructor(t,e,n,i,o,l,c,h,f,p,m,g,_,x,b,S){ee.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],t!==void 0&&this.set(t,e,n,i,o,l,c,h,f,p,m,g,_,x,b,S)}set(t,e,n,i,o,l,c,h,f,p,m,g,_,x,b,S){const y=this.elements;return y[0]=t,y[4]=e,y[8]=n,y[12]=i,y[1]=o,y[5]=l,y[9]=c,y[13]=h,y[2]=f,y[6]=p,y[10]=m,y[14]=g,y[3]=_,y[7]=x,y[11]=b,y[15]=S,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new ee().fromArray(this.elements)}copy(t){const e=this.elements,n=t.elements;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],e[9]=n[9],e[10]=n[10],e[11]=n[11],e[12]=n[12],e[13]=n[13],e[14]=n[14],e[15]=n[15],this}copyPosition(t){const e=this.elements,n=t.elements;return e[12]=n[12],e[13]=n[13],e[14]=n[14],this}setFromMatrix3(t){const e=t.elements;return this.set(e[0],e[3],e[6],0,e[1],e[4],e[7],0,e[2],e[5],e[8],0,0,0,0,1),this}extractBasis(t,e,n){return t.setFromMatrixColumn(this,0),e.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this}makeBasis(t,e,n){return this.set(t.x,e.x,n.x,0,t.y,e.y,n.y,0,t.z,e.z,n.z,0,0,0,0,1),this}extractRotation(t){const e=this.elements,n=t.elements,i=1/Wr.setFromMatrixColumn(t,0).length(),o=1/Wr.setFromMatrixColumn(t,1).length(),l=1/Wr.setFromMatrixColumn(t,2).length();return e[0]=n[0]*i,e[1]=n[1]*i,e[2]=n[2]*i,e[3]=0,e[4]=n[4]*o,e[5]=n[5]*o,e[6]=n[6]*o,e[7]=0,e[8]=n[8]*l,e[9]=n[9]*l,e[10]=n[10]*l,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromEuler(t){const e=this.elements,n=t.x,i=t.y,o=t.z,l=Math.cos(n),c=Math.sin(n),h=Math.cos(i),f=Math.sin(i),p=Math.cos(o),m=Math.sin(o);if(t.order==="XYZ"){const g=l*p,_=l*m,x=c*p,b=c*m;e[0]=h*p,e[4]=-h*m,e[8]=f,e[1]=_+x*f,e[5]=g-b*f,e[9]=-c*h,e[2]=b-g*f,e[6]=x+_*f,e[10]=l*h}else if(t.order==="YXZ"){const g=h*p,_=h*m,x=f*p,b=f*m;e[0]=g+b*c,e[4]=x*c-_,e[8]=l*f,e[1]=l*m,e[5]=l*p,e[9]=-c,e[2]=_*c-x,e[6]=b+g*c,e[10]=l*h}else if(t.order==="ZXY"){const g=h*p,_=h*m,x=f*p,b=f*m;e[0]=g-b*c,e[4]=-l*m,e[8]=x+_*c,e[1]=_+x*c,e[5]=l*p,e[9]=b-g*c,e[2]=-l*f,e[6]=c,e[10]=l*h}else if(t.order==="ZYX"){const g=l*p,_=l*m,x=c*p,b=c*m;e[0]=h*p,e[4]=x*f-_,e[8]=g*f+b,e[1]=h*m,e[5]=b*f+g,e[9]=_*f-x,e[2]=-f,e[6]=c*h,e[10]=l*h}else if(t.order==="YZX"){const g=l*h,_=l*f,x=c*h,b=c*f;e[0]=h*p,e[4]=b-g*m,e[8]=x*m+_,e[1]=m,e[5]=l*p,e[9]=-c*p,e[2]=-f*p,e[6]=_*m+x,e[10]=g-b*m}else if(t.order==="XZY"){const g=l*h,_=l*f,x=c*h,b=c*f;e[0]=h*p,e[4]=-m,e[8]=f*p,e[1]=g*m+b,e[5]=l*p,e[9]=_*m-x,e[2]=x*m-_,e[6]=c*p,e[10]=b*m+g}return e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromQuaternion(t){return this.compose(FE,t,HE)}lookAt(t,e,n){const i=this.elements;return di.subVectors(t,e),di.lengthSq()===0&&(di.z=1),di.normalize(),ea.crossVectors(n,di),ea.lengthSq()===0&&(Math.abs(n.z)===1?di.x+=1e-4:di.z+=1e-4,di.normalize(),ea.crossVectors(n,di)),ea.normalize(),kc.crossVectors(di,ea),i[0]=ea.x,i[4]=kc.x,i[8]=di.x,i[1]=ea.y,i[5]=kc.y,i[9]=di.y,i[2]=ea.z,i[6]=kc.z,i[10]=di.z,this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,e){const n=t.elements,i=e.elements,o=this.elements,l=n[0],c=n[4],h=n[8],f=n[12],p=n[1],m=n[5],g=n[9],_=n[13],x=n[2],b=n[6],S=n[10],y=n[14],E=n[3],A=n[7],T=n[11],z=n[15],D=i[0],L=i[4],B=i[8],w=i[12],C=i[1],I=i[5],Z=i[9],K=i[13],tt=i[2],rt=i[6],V=i[10],et=i[14],q=i[3],it=i[7],ut=i[11],bt=i[15];return o[0]=l*D+c*C+h*tt+f*q,o[4]=l*L+c*I+h*rt+f*it,o[8]=l*B+c*Z+h*V+f*ut,o[12]=l*w+c*K+h*et+f*bt,o[1]=p*D+m*C+g*tt+_*q,o[5]=p*L+m*I+g*rt+_*it,o[9]=p*B+m*Z+g*V+_*ut,o[13]=p*w+m*K+g*et+_*bt,o[2]=x*D+b*C+S*tt+y*q,o[6]=x*L+b*I+S*rt+y*it,o[10]=x*B+b*Z+S*V+y*ut,o[14]=x*w+b*K+S*et+y*bt,o[3]=E*D+A*C+T*tt+z*q,o[7]=E*L+A*I+T*rt+z*it,o[11]=E*B+A*Z+T*V+z*ut,o[15]=E*w+A*K+T*et+z*bt,this}multiplyScalar(t){const e=this.elements;return e[0]*=t,e[4]*=t,e[8]*=t,e[12]*=t,e[1]*=t,e[5]*=t,e[9]*=t,e[13]*=t,e[2]*=t,e[6]*=t,e[10]*=t,e[14]*=t,e[3]*=t,e[7]*=t,e[11]*=t,e[15]*=t,this}determinant(){const t=this.elements,e=t[0],n=t[4],i=t[8],o=t[12],l=t[1],c=t[5],h=t[9],f=t[13],p=t[2],m=t[6],g=t[10],_=t[14],x=t[3],b=t[7],S=t[11],y=t[15];return x*(+o*h*m-i*f*m-o*c*g+n*f*g+i*c*_-n*h*_)+b*(+e*h*_-e*f*g+o*l*g-i*l*_+i*f*p-o*h*p)+S*(+e*f*m-e*c*_-o*l*m+n*l*_+o*c*p-n*f*p)+y*(-i*c*p-e*h*m+e*c*g+i*l*m-n*l*g+n*h*p)}transpose(){const t=this.elements;let e;return e=t[1],t[1]=t[4],t[4]=e,e=t[2],t[2]=t[8],t[8]=e,e=t[6],t[6]=t[9],t[9]=e,e=t[3],t[3]=t[12],t[12]=e,e=t[7],t[7]=t[13],t[13]=e,e=t[11],t[11]=t[14],t[14]=e,this}setPosition(t,e,n){const i=this.elements;return t.isVector3?(i[12]=t.x,i[13]=t.y,i[14]=t.z):(i[12]=t,i[13]=e,i[14]=n),this}invert(){const t=this.elements,e=t[0],n=t[1],i=t[2],o=t[3],l=t[4],c=t[5],h=t[6],f=t[7],p=t[8],m=t[9],g=t[10],_=t[11],x=t[12],b=t[13],S=t[14],y=t[15],E=m*S*f-b*g*f+b*h*_-c*S*_-m*h*y+c*g*y,A=x*g*f-p*S*f-x*h*_+l*S*_+p*h*y-l*g*y,T=p*b*f-x*m*f+x*c*_-l*b*_-p*c*y+l*m*y,z=x*m*h-p*b*h-x*c*g+l*b*g+p*c*S-l*m*S,D=e*E+n*A+i*T+o*z;if(D===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const L=1/D;return t[0]=E*L,t[1]=(b*g*o-m*S*o-b*i*_+n*S*_+m*i*y-n*g*y)*L,t[2]=(c*S*o-b*h*o+b*i*f-n*S*f-c*i*y+n*h*y)*L,t[3]=(m*h*o-c*g*o-m*i*f+n*g*f+c*i*_-n*h*_)*L,t[4]=A*L,t[5]=(p*S*o-x*g*o+x*i*_-e*S*_-p*i*y+e*g*y)*L,t[6]=(x*h*o-l*S*o-x*i*f+e*S*f+l*i*y-e*h*y)*L,t[7]=(l*g*o-p*h*o+p*i*f-e*g*f-l*i*_+e*h*_)*L,t[8]=T*L,t[9]=(x*m*o-p*b*o-x*n*_+e*b*_+p*n*y-e*m*y)*L,t[10]=(l*b*o-x*c*o+x*n*f-e*b*f-l*n*y+e*c*y)*L,t[11]=(p*c*o-l*m*o-p*n*f+e*m*f+l*n*_-e*c*_)*L,t[12]=z*L,t[13]=(p*b*i-x*m*i+x*n*g-e*b*g-p*n*S+e*m*S)*L,t[14]=(x*c*i-l*b*i-x*n*h+e*b*h+l*n*S-e*c*S)*L,t[15]=(l*m*i-p*c*i+p*n*h-e*m*h-l*n*g+e*c*g)*L,this}scale(t){const e=this.elements,n=t.x,i=t.y,o=t.z;return e[0]*=n,e[4]*=i,e[8]*=o,e[1]*=n,e[5]*=i,e[9]*=o,e[2]*=n,e[6]*=i,e[10]*=o,e[3]*=n,e[7]*=i,e[11]*=o,this}getMaxScaleOnAxis(){const t=this.elements,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],n=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],i=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(e,n,i))}makeTranslation(t,e,n){return t.isVector3?this.set(1,0,0,t.x,0,1,0,t.y,0,0,1,t.z,0,0,0,1):this.set(1,0,0,t,0,1,0,e,0,0,1,n,0,0,0,1),this}makeRotationX(t){const e=Math.cos(t),n=Math.sin(t);return this.set(1,0,0,0,0,e,-n,0,0,n,e,0,0,0,0,1),this}makeRotationY(t){const e=Math.cos(t),n=Math.sin(t);return this.set(e,0,n,0,0,1,0,0,-n,0,e,0,0,0,0,1),this}makeRotationZ(t){const e=Math.cos(t),n=Math.sin(t);return this.set(e,-n,0,0,n,e,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(t,e){const n=Math.cos(e),i=Math.sin(e),o=1-n,l=t.x,c=t.y,h=t.z,f=o*l,p=o*c;return this.set(f*l+n,f*c-i*h,f*h+i*c,0,f*c+i*h,p*c+n,p*h-i*l,0,f*h-i*c,p*h+i*l,o*h*h+n,0,0,0,0,1),this}makeScale(t,e,n){return this.set(t,0,0,0,0,e,0,0,0,0,n,0,0,0,0,1),this}makeShear(t,e,n,i,o,l){return this.set(1,n,o,0,t,1,l,0,e,i,1,0,0,0,0,1),this}compose(t,e,n){const i=this.elements,o=e._x,l=e._y,c=e._z,h=e._w,f=o+o,p=l+l,m=c+c,g=o*f,_=o*p,x=o*m,b=l*p,S=l*m,y=c*m,E=h*f,A=h*p,T=h*m,z=n.x,D=n.y,L=n.z;return i[0]=(1-(b+y))*z,i[1]=(_+T)*z,i[2]=(x-A)*z,i[3]=0,i[4]=(_-T)*D,i[5]=(1-(g+y))*D,i[6]=(S+E)*D,i[7]=0,i[8]=(x+A)*L,i[9]=(S-E)*L,i[10]=(1-(g+b))*L,i[11]=0,i[12]=t.x,i[13]=t.y,i[14]=t.z,i[15]=1,this}decompose(t,e,n){const i=this.elements;let o=Wr.set(i[0],i[1],i[2]).length();const l=Wr.set(i[4],i[5],i[6]).length(),c=Wr.set(i[8],i[9],i[10]).length();this.determinant()<0&&(o=-o),t.x=i[12],t.y=i[13],t.z=i[14],Fi.copy(this);const f=1/o,p=1/l,m=1/c;return Fi.elements[0]*=f,Fi.elements[1]*=f,Fi.elements[2]*=f,Fi.elements[4]*=p,Fi.elements[5]*=p,Fi.elements[6]*=p,Fi.elements[8]*=m,Fi.elements[9]*=m,Fi.elements[10]*=m,e.setFromRotationMatrix(Fi),n.x=o,n.y=l,n.z=c,this}makePerspective(t,e,n,i,o,l,c=ts){const h=this.elements,f=2*o/(e-t),p=2*o/(n-i),m=(e+t)/(e-t),g=(n+i)/(n-i);let _,x;if(c===ts)_=-(l+o)/(l-o),x=-2*l*o/(l-o);else if(c===Dl)_=-l/(l-o),x=-l*o/(l-o);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+c);return h[0]=f,h[4]=0,h[8]=m,h[12]=0,h[1]=0,h[5]=p,h[9]=g,h[13]=0,h[2]=0,h[6]=0,h[10]=_,h[14]=x,h[3]=0,h[7]=0,h[11]=-1,h[15]=0,this}makeOrthographic(t,e,n,i,o,l,c=ts){const h=this.elements,f=1/(e-t),p=1/(n-i),m=1/(l-o),g=(e+t)*f,_=(n+i)*p;let x,b;if(c===ts)x=(l+o)*m,b=-2*m;else if(c===Dl)x=o*m,b=-1*m;else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+c);return h[0]=2*f,h[4]=0,h[8]=0,h[12]=-g,h[1]=0,h[5]=2*p,h[9]=0,h[13]=-_,h[2]=0,h[6]=0,h[10]=b,h[14]=-x,h[3]=0,h[7]=0,h[11]=0,h[15]=1,this}equals(t){const e=this.elements,n=t.elements;for(let i=0;i<16;i++)if(e[i]!==n[i])return!1;return!0}fromArray(t,e=0){for(let n=0;n<16;n++)this.elements[n]=t[n+e];return this}toArray(t=[],e=0){const n=this.elements;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t[e+9]=n[9],t[e+10]=n[10],t[e+11]=n[11],t[e+12]=n[12],t[e+13]=n[13],t[e+14]=n[14],t[e+15]=n[15],t}}const Wr=new O,Fi=new ee,FE=new O(0,0,0),HE=new O(1,1,1),ea=new O,kc=new O,di=new O,u0=new ee,h0=new Qn;class vi{constructor(t=0,e=0,n=0,i=vi.DEFAULT_ORDER){this.isEuler=!0,this._x=t,this._y=e,this._z=n,this._order=i}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get order(){return this._order}set order(t){this._order=t,this._onChangeCallback()}set(t,e,n,i=this._order){return this._x=t,this._y=e,this._z=n,this._order=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(t){return this._x=t._x,this._y=t._y,this._z=t._z,this._order=t._order,this._onChangeCallback(),this}setFromRotationMatrix(t,e=this._order,n=!0){const i=t.elements,o=i[0],l=i[4],c=i[8],h=i[1],f=i[5],p=i[9],m=i[2],g=i[6],_=i[10];switch(e){case"XYZ":this._y=Math.asin(en(c,-1,1)),Math.abs(c)<.9999999?(this._x=Math.atan2(-p,_),this._z=Math.atan2(-l,o)):(this._x=Math.atan2(g,f),this._z=0);break;case"YXZ":this._x=Math.asin(-en(p,-1,1)),Math.abs(p)<.9999999?(this._y=Math.atan2(c,_),this._z=Math.atan2(h,f)):(this._y=Math.atan2(-m,o),this._z=0);break;case"ZXY":this._x=Math.asin(en(g,-1,1)),Math.abs(g)<.9999999?(this._y=Math.atan2(-m,_),this._z=Math.atan2(-l,f)):(this._y=0,this._z=Math.atan2(h,o));break;case"ZYX":this._y=Math.asin(-en(m,-1,1)),Math.abs(m)<.9999999?(this._x=Math.atan2(g,_),this._z=Math.atan2(h,o)):(this._x=0,this._z=Math.atan2(-l,f));break;case"YZX":this._z=Math.asin(en(h,-1,1)),Math.abs(h)<.9999999?(this._x=Math.atan2(-p,f),this._y=Math.atan2(-m,o)):(this._x=0,this._y=Math.atan2(c,_));break;case"XZY":this._z=Math.asin(-en(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(g,f),this._y=Math.atan2(c,o)):(this._x=Math.atan2(-p,_),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+e)}return this._order=e,n===!0&&this._onChangeCallback(),this}setFromQuaternion(t,e,n){return u0.makeRotationFromQuaternion(t),this.setFromRotationMatrix(u0,e,n)}setFromVector3(t,e=this._order){return this.set(t.x,t.y,t.z,e)}reorder(t){return h0.setFromEuler(this),this.setFromQuaternion(h0,t)}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._order===this._order}fromArray(t){return this._x=t[0],this._y=t[1],this._z=t[2],t[3]!==void 0&&(this._order=t[3]),this._onChangeCallback(),this}toArray(t=[],e=0){return t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._order,t}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}vi.DEFAULT_ORDER="XYZ";class mo{constructor(){this.mask=1}set(t){this.mask=(1<>>0}enable(t){this.mask|=1<1){for(let e=0;e1){for(let n=0;n0&&(i.userData=this.userData),i.layers=this.layers.mask,i.matrix=this.matrix.toArray(),i.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(i.matrixAutoUpdate=!1),this.isInstancedMesh&&(i.type="InstancedMesh",i.count=this.count,i.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(i.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(i.type="BatchedMesh",i.perObjectFrustumCulled=this.perObjectFrustumCulled,i.sortObjects=this.sortObjects,i.drawRanges=this._drawRanges,i.reservedRanges=this._reservedRanges,i.visibility=this._visibility,i.active=this._active,i.bounds=this._bounds.map(c=>({boxInitialized:c.boxInitialized,boxMin:c.box.min.toArray(),boxMax:c.box.max.toArray(),sphereInitialized:c.sphereInitialized,sphereRadius:c.sphere.radius,sphereCenter:c.sphere.center.toArray()})),i.maxInstanceCount=this._maxInstanceCount,i.maxVertexCount=this._maxVertexCount,i.maxIndexCount=this._maxIndexCount,i.geometryInitialized=this._geometryInitialized,i.geometryCount=this._geometryCount,i.matricesTexture=this._matricesTexture.toJSON(t),this._colorsTexture!==null&&(i.colorsTexture=this._colorsTexture.toJSON(t)),this.boundingSphere!==null&&(i.boundingSphere={center:i.boundingSphere.center.toArray(),radius:i.boundingSphere.radius}),this.boundingBox!==null&&(i.boundingBox={min:i.boundingBox.min.toArray(),max:i.boundingBox.max.toArray()}));function o(c,h){return c[h.uuid]===void 0&&(c[h.uuid]=h.toJSON(t)),h.uuid}if(this.isScene)this.background&&(this.background.isColor?i.background=this.background.toJSON():this.background.isTexture&&(i.background=this.background.toJSON(t).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(i.environment=this.environment.toJSON(t).uuid);else if(this.isMesh||this.isLine||this.isPoints){i.geometry=o(t.geometries,this.geometry);const c=this.geometry.parameters;if(c!==void 0&&c.shapes!==void 0){const h=c.shapes;if(Array.isArray(h))for(let f=0,p=h.length;f0){i.children=[];for(let c=0;c0){i.animations=[];for(let c=0;c0&&(n.geometries=c),h.length>0&&(n.materials=h),f.length>0&&(n.textures=f),p.length>0&&(n.images=p),m.length>0&&(n.shapes=m),g.length>0&&(n.skeletons=g),_.length>0&&(n.animations=_),x.length>0&&(n.nodes=x)}return n.object=i,n;function l(c){const h=[];for(const f in c){const p=c[f];delete p.metadata,h.push(p)}return h}}clone(t){return new this.constructor().copy(this,t)}copy(t,e=!0){if(this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.rotation.order=t.rotation.order,this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldAutoUpdate=t.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.animations=t.animations.slice(),this.userData=JSON.parse(JSON.stringify(t.userData)),e===!0)for(let n=0;n0?i.multiplyScalar(1/Math.sqrt(o)):i.set(0,0,0)}static getBarycoord(t,e,n,i,o){Hi.subVectors(i,e),Ss.subVectors(n,e),Id.subVectors(t,e);const l=Hi.dot(Hi),c=Hi.dot(Ss),h=Hi.dot(Id),f=Ss.dot(Ss),p=Ss.dot(Id),m=l*f-c*c;if(m===0)return o.set(0,0,0),null;const g=1/m,_=(f*h-c*p)*g,x=(l*p-c*h)*g;return o.set(1-_-x,x,_)}static containsPoint(t,e,n,i){return this.getBarycoord(t,e,n,i,Ms)===null?!1:Ms.x>=0&&Ms.y>=0&&Ms.x+Ms.y<=1}static getInterpolation(t,e,n,i,o,l,c,h){return this.getBarycoord(t,e,n,i,Ms)===null?(h.x=0,h.y=0,"z"in h&&(h.z=0),"w"in h&&(h.w=0),null):(h.setScalar(0),h.addScaledVector(o,Ms.x),h.addScaledVector(l,Ms.y),h.addScaledVector(c,Ms.z),h)}static getInterpolatedAttribute(t,e,n,i,o,l){return Fd.setScalar(0),Hd.setScalar(0),Vd.setScalar(0),Fd.fromBufferAttribute(t,e),Hd.fromBufferAttribute(t,n),Vd.fromBufferAttribute(t,i),l.setScalar(0),l.addScaledVector(Fd,o.x),l.addScaledVector(Hd,o.y),l.addScaledVector(Vd,o.z),l}static isFrontFacing(t,e,n,i){return Hi.subVectors(n,e),Ss.subVectors(t,e),Hi.cross(Ss).dot(i)<0}set(t,e,n){return this.a.copy(t),this.b.copy(e),this.c.copy(n),this}setFromPointsAndIndices(t,e,n,i){return this.a.copy(t[e]),this.b.copy(t[n]),this.c.copy(t[i]),this}setFromAttributeAndIndices(t,e,n,i){return this.a.fromBufferAttribute(t,e),this.b.fromBufferAttribute(t,n),this.c.fromBufferAttribute(t,i),this}clone(){return new this.constructor().copy(this)}copy(t){return this.a.copy(t.a),this.b.copy(t.b),this.c.copy(t.c),this}getArea(){return Hi.subVectors(this.c,this.b),Ss.subVectors(this.a,this.b),Hi.cross(Ss).length()*.5}getMidpoint(t){return t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(t){return jn.getNormal(this.a,this.b,this.c,t)}getPlane(t){return t.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(t,e){return jn.getBarycoord(t,this.a,this.b,this.c,e)}getInterpolation(t,e,n,i,o){return jn.getInterpolation(t,this.a,this.b,this.c,e,n,i,o)}containsPoint(t){return jn.containsPoint(t,this.a,this.b,this.c)}isFrontFacing(t){return jn.isFrontFacing(this.a,this.b,this.c,t)}intersectsBox(t){return t.intersectsTriangle(this)}closestPointToPoint(t,e){const n=this.a,i=this.b,o=this.c;let l,c;Yr.subVectors(i,n),Zr.subVectors(o,n),Od.subVectors(t,n);const h=Yr.dot(Od),f=Zr.dot(Od);if(h<=0&&f<=0)return e.copy(n);Bd.subVectors(t,i);const p=Yr.dot(Bd),m=Zr.dot(Bd);if(p>=0&&m<=p)return e.copy(i);const g=h*m-p*f;if(g<=0&&h>=0&&p<=0)return l=h/(h-p),e.copy(n).addScaledVector(Yr,l);zd.subVectors(t,o);const _=Yr.dot(zd),x=Zr.dot(zd);if(x>=0&&_<=x)return e.copy(o);const b=_*f-h*x;if(b<=0&&f>=0&&x<=0)return c=f/(f-x),e.copy(n).addScaledVector(Zr,c);const S=p*x-_*m;if(S<=0&&m-p>=0&&_-x>=0)return v0.subVectors(o,i),c=(m-p)/(m-p+(_-x)),e.copy(i).addScaledVector(v0,c);const y=1/(S+b+g);return l=b*y,c=g*y,e.copy(n).addScaledVector(Yr,l).addScaledVector(Zr,c)}equals(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}}const nx={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},na={h:0,s:0,l:0},Xc={h:0,s:0,l:0};function Gd(s,t,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?s+(t-s)*6*e:e<1/2?t:e<2/3?s+(t-s)*6*(2/3-e):s}class zt{constructor(t,e,n){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(t,e,n)}set(t,e,n){if(e===void 0&&n===void 0){const i=t;i&&i.isColor?this.copy(i):typeof i=="number"?this.setHex(i):typeof i=="string"&&this.setStyle(i)}else this.setRGB(t,e,n);return this}setScalar(t){return this.r=t,this.g=t,this.b=t,this}setHex(t,e=Dn){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(t&255)/255,Se.toWorkingColorSpace(this,e),this}setRGB(t,e,n,i=Se.workingColorSpace){return this.r=t,this.g=e,this.b=n,Se.toWorkingColorSpace(this,i),this}setHSL(t,e,n,i=Se.workingColorSpace){if(t=pm(t,1),e=en(e,0,1),n=en(n,0,1),e===0)this.r=this.g=this.b=n;else{const o=n<=.5?n*(1+e):n+e-n*e,l=2*n-o;this.r=Gd(l,o,t+1/3),this.g=Gd(l,o,t),this.b=Gd(l,o,t-1/3)}return Se.toWorkingColorSpace(this,i),this}setStyle(t,e=Dn){function n(o){o!==void 0&&parseFloat(o)<1&&console.warn("THREE.Color: Alpha component of "+t+" will be ignored.")}let i;if(i=/^(\w+)\(([^\)]*)\)/.exec(t)){let o;const l=i[1],c=i[2];switch(l){case"rgb":case"rgba":if(o=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(c))return n(o[4]),this.setRGB(Math.min(255,parseInt(o[1],10))/255,Math.min(255,parseInt(o[2],10))/255,Math.min(255,parseInt(o[3],10))/255,e);if(o=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(c))return n(o[4]),this.setRGB(Math.min(100,parseInt(o[1],10))/100,Math.min(100,parseInt(o[2],10))/100,Math.min(100,parseInt(o[3],10))/100,e);break;case"hsl":case"hsla":if(o=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(c))return n(o[4]),this.setHSL(parseFloat(o[1])/360,parseFloat(o[2])/100,parseFloat(o[3])/100,e);break;default:console.warn("THREE.Color: Unknown color model "+t)}}else if(i=/^\#([A-Fa-f\d]+)$/.exec(t)){const o=i[1],l=o.length;if(l===3)return this.setRGB(parseInt(o.charAt(0),16)/15,parseInt(o.charAt(1),16)/15,parseInt(o.charAt(2),16)/15,e);if(l===6)return this.setHex(parseInt(o,16),e);console.warn("THREE.Color: Invalid hex color "+t)}else if(t&&t.length>0)return this.setColorName(t,e);return this}setColorName(t,e=Dn){const n=nx[t.toLowerCase()];return n!==void 0?this.setHex(n,e):console.warn("THREE.Color: Unknown color "+t),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(t){return this.r=t.r,this.g=t.g,this.b=t.b,this}copySRGBToLinear(t){return this.r=Ds(t.r),this.g=Ds(t.g),this.b=Ds(t.b),this}copyLinearToSRGB(t){return this.r=ho(t.r),this.g=ho(t.g),this.b=ho(t.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(t=Dn){return Se.fromWorkingColorSpace(wn.copy(this),t),Math.round(en(wn.r*255,0,255))*65536+Math.round(en(wn.g*255,0,255))*256+Math.round(en(wn.b*255,0,255))}getHexString(t=Dn){return("000000"+this.getHex(t).toString(16)).slice(-6)}getHSL(t,e=Se.workingColorSpace){Se.fromWorkingColorSpace(wn.copy(this),e);const n=wn.r,i=wn.g,o=wn.b,l=Math.max(n,i,o),c=Math.min(n,i,o);let h,f;const p=(c+l)/2;if(c===l)h=0,f=0;else{const m=l-c;switch(f=p<=.5?m/(l+c):m/(2-l-c),l){case n:h=(i-o)/m+(i0!=t>0&&this.version++,this._alphaTest=t}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(t){if(t!==void 0)for(const e in t){const n=t[e];if(n===void 0){console.warn(`THREE.Material: parameter '${e}' has value of undefined.`);continue}const i=this[e];if(i===void 0){console.warn(`THREE.Material: '${e}' is not a property of THREE.${this.type}.`);continue}i&&i.isColor?i.set(n):i&&i.isVector3&&n&&n.isVector3?i.copy(n):this[e]=n}}toJSON(t){const e=t===void 0||typeof t=="string";e&&(t={textures:{},images:{}});const n={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};n.uuid=this.uuid,n.type=this.type,this.name!==""&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),this.roughness!==void 0&&(n.roughness=this.roughness),this.metalness!==void 0&&(n.metalness=this.metalness),this.sheen!==void 0&&(n.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(n.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(n.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity!==void 0&&this.emissiveIntensity!==1&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(n.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(n.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(n.shininess=this.shininess),this.clearcoat!==void 0&&(n.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(t).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(t).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(t).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.dispersion!==void 0&&(n.dispersion=this.dispersion),this.iridescence!==void 0&&(n.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(n.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(n.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(n.iridescenceMap=this.iridescenceMap.toJSON(t).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(n.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(t).uuid),this.anisotropy!==void 0&&(n.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(n.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(n.anisotropyMap=this.anisotropyMap.toJSON(t).uuid),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(t).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(t).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(t).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(t).uuid,n.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(t).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(t).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(t).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(t).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(t).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(t).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(t).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(t).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(n.specularIntensityMap=this.specularIntensityMap.toJSON(t).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(n.specularColorMap=this.specularColorMap.toJSON(t).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(t).uuid,this.combine!==void 0&&(n.combine=this.combine)),this.envMapRotation!==void 0&&(n.envMapRotation=this.envMapRotation.toArray()),this.envMapIntensity!==void 0&&(n.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(n.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(n.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(t).uuid),this.transmission!==void 0&&(n.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(n.transmissionMap=this.transmissionMap.toJSON(t).uuid),this.thickness!==void 0&&(n.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(n.thicknessMap=this.thicknessMap.toJSON(t).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(n.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(n.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(n.size=this.size),this.shadowSide!==null&&(n.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==$a&&(n.blending=this.blending),this.side!==Us&&(n.side=this.side),this.vertexColors===!0&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),this.transparent===!0&&(n.transparent=!0),this.blendSrc!==Iu&&(n.blendSrc=this.blendSrc),this.blendDst!==Ou&&(n.blendDst=this.blendDst),this.blendEquation!==ra&&(n.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(n.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(n.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(n.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(n.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(n.blendAlpha=this.blendAlpha),this.depthFunc!==ir&&(n.depthFunc=this.depthFunc),this.depthTest===!1&&(n.depthTest=this.depthTest),this.depthWrite===!1&&(n.depthWrite=this.depthWrite),this.colorWrite===!1&&(n.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(n.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==Op&&(n.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(n.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(n.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==qa&&(n.stencilFail=this.stencilFail),this.stencilZFail!==qa&&(n.stencilZFail=this.stencilZFail),this.stencilZPass!==qa&&(n.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(n.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(n.rotation=this.rotation),this.polygonOffset===!0&&(n.polygonOffset=!0),this.polygonOffsetFactor!==0&&(n.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(n.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(n.linewidth=this.linewidth),this.dashSize!==void 0&&(n.dashSize=this.dashSize),this.gapSize!==void 0&&(n.gapSize=this.gapSize),this.scale!==void 0&&(n.scale=this.scale),this.dithering===!0&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),this.alphaHash===!0&&(n.alphaHash=!0),this.alphaToCoverage===!0&&(n.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(n.premultipliedAlpha=!0),this.forceSinglePass===!0&&(n.forceSinglePass=!0),this.wireframe===!0&&(n.wireframe=!0),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(n.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(n.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(n.flatShading=!0),this.visible===!1&&(n.visible=!1),this.toneMapped===!1&&(n.toneMapped=!1),this.fog===!1&&(n.fog=!1),Object.keys(this.userData).length>0&&(n.userData=this.userData);function i(o){const l=[];for(const c in o){const h=o[c];delete h.metadata,l.push(h)}return l}if(e){const o=i(t.textures),l=i(t.images);o.length>0&&(n.textures=o),l.length>0&&(n.images=l)}return n}clone(){return new this.constructor().copy(this)}copy(t){this.name=t.name,this.blending=t.blending,this.side=t.side,this.vertexColors=t.vertexColors,this.opacity=t.opacity,this.transparent=t.transparent,this.blendSrc=t.blendSrc,this.blendDst=t.blendDst,this.blendEquation=t.blendEquation,this.blendSrcAlpha=t.blendSrcAlpha,this.blendDstAlpha=t.blendDstAlpha,this.blendEquationAlpha=t.blendEquationAlpha,this.blendColor.copy(t.blendColor),this.blendAlpha=t.blendAlpha,this.depthFunc=t.depthFunc,this.depthTest=t.depthTest,this.depthWrite=t.depthWrite,this.stencilWriteMask=t.stencilWriteMask,this.stencilFunc=t.stencilFunc,this.stencilRef=t.stencilRef,this.stencilFuncMask=t.stencilFuncMask,this.stencilFail=t.stencilFail,this.stencilZFail=t.stencilZFail,this.stencilZPass=t.stencilZPass,this.stencilWrite=t.stencilWrite;const e=t.clippingPlanes;let n=null;if(e!==null){const i=e.length;n=new Array(i);for(let o=0;o!==i;++o)n[o]=e[o].clone()}return this.clippingPlanes=n,this.clipIntersection=t.clipIntersection,this.clipShadows=t.clipShadows,this.shadowSide=t.shadowSide,this.colorWrite=t.colorWrite,this.precision=t.precision,this.polygonOffset=t.polygonOffset,this.polygonOffsetFactor=t.polygonOffsetFactor,this.polygonOffsetUnits=t.polygonOffsetUnits,this.dithering=t.dithering,this.alphaTest=t.alphaTest,this.alphaHash=t.alphaHash,this.alphaToCoverage=t.alphaToCoverage,this.premultipliedAlpha=t.premultipliedAlpha,this.forceSinglePass=t.forceSinglePass,this.visible=t.visible,this.toneMapped=t.toneMapped,this.userData=JSON.parse(JSON.stringify(t.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(t){t===!0&&this.version++}onBuild(){console.warn("Material: onBuild() has been removed.")}}class ha extends Ln{static get type(){return"MeshBasicMaterial"}constructor(t){super(),this.isMeshBasicMaterial=!0,this.color=new zt(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new vi,this.combine=Gl,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.envMapRotation.copy(t.envMapRotation),this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.fog=t.fog,this}}const As=qE();function qE(){const s=new ArrayBuffer(4),t=new Float32Array(s),e=new Uint32Array(s),n=new Uint32Array(512),i=new Uint32Array(512);for(let h=0;h<256;++h){const f=h-127;f<-27?(n[h]=0,n[h|256]=32768,i[h]=24,i[h|256]=24):f<-14?(n[h]=1024>>-f-14,n[h|256]=1024>>-f-14|32768,i[h]=-f-1,i[h|256]=-f-1):f<=15?(n[h]=f+15<<10,n[h|256]=f+15<<10|32768,i[h]=13,i[h|256]=13):f<128?(n[h]=31744,n[h|256]=64512,i[h]=24,i[h|256]=24):(n[h]=31744,n[h|256]=64512,i[h]=13,i[h|256]=13)}const o=new Uint32Array(2048),l=new Uint32Array(64),c=new Uint32Array(64);for(let h=1;h<1024;++h){let f=h<<13,p=0;for(;(f&8388608)===0;)f<<=1,p-=8388608;f&=-8388609,p+=947912704,o[h]=f|p}for(let h=1024;h<2048;++h)o[h]=939524096+(h-1024<<13);for(let h=1;h<31;++h)l[h]=h<<23;l[31]=1199570944,l[32]=2147483648;for(let h=33;h<63;++h)l[h]=2147483648+(h-32<<23);l[63]=3347054592;for(let h=1;h<64;++h)h!==32&&(c[h]=1024);return{floatView:t,uint32View:e,baseTable:n,shiftTable:i,mantissaTable:o,exponentTable:l,offsetTable:c}}function Zn(s){Math.abs(s)>65504&&console.warn("THREE.DataUtils.toHalfFloat(): Value out of range."),s=en(s,-65504,65504),As.floatView[0]=s;const t=As.uint32View[0],e=t>>23&511;return As.baseTable[e]+((t&8388607)>>As.shiftTable[e])}function ul(s){const t=s>>10;return As.uint32View[0]=As.mantissaTable[As.offsetTable[t]+(s&1023)]+As.exponentTable[t],As.floatView[0]}const YE={toHalfFloat:Zn,fromHalfFloat:ul},on=new O,qc=new dt;class Ve{constructor(t,e,n=!1){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=t,this.itemSize=e,this.count=t!==void 0?t.length/e:0,this.normalized=n,this.usage=Rl,this.updateRanges=[],this.gpuType=Jn,this.version=0}onUploadCallback(){}set needsUpdate(t){t===!0&&this.version++}setUsage(t){return this.usage=t,this}addUpdateRange(t,e){this.updateRanges.push({start:t,count:e})}clearUpdateRanges(){this.updateRanges.length=0}copy(t){return this.name=t.name,this.array=new t.array.constructor(t.array),this.itemSize=t.itemSize,this.count=t.count,this.normalized=t.normalized,this.usage=t.usage,this.gpuType=t.gpuType,this}copyAt(t,e,n){t*=this.itemSize,n*=e.itemSize;for(let i=0,o=this.itemSize;ie.count&&console.warn("THREE.BufferGeometry: Buffer size too small for points data. Use .dispose() and create a new geometry."),e.needsUpdate=!0}return this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new Vn);const t=this.attributes.position,e=this.morphAttributes.position;if(t&&t.isGLBufferAttribute){console.error("THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.",this),this.boundingBox.set(new O(-1/0,-1/0,-1/0),new O(1/0,1/0,1/0));return}if(t!==void 0){if(this.boundingBox.setFromBufferAttribute(t),e)for(let n=0,i=e.length;n0&&(t.userData=this.userData),this.parameters!==void 0){const h=this.parameters;for(const f in h)h[f]!==void 0&&(t[f]=h[f]);return t}t.data={attributes:{}};const e=this.index;e!==null&&(t.data.index={type:e.array.constructor.name,array:Array.prototype.slice.call(e.array)});const n=this.attributes;for(const h in n){const f=n[h];t.data.attributes[h]=f.toJSON(t.data)}const i={};let o=!1;for(const h in this.morphAttributes){const f=this.morphAttributes[h],p=[];for(let m=0,g=f.length;m0&&(i[h]=p,o=!0)}o&&(t.data.morphAttributes=i,t.data.morphTargetsRelative=this.morphTargetsRelative);const l=this.groups;l.length>0&&(t.data.groups=JSON.parse(JSON.stringify(l)));const c=this.boundingSphere;return c!==null&&(t.data.boundingSphere={center:c.center.toArray(),radius:c.radius}),t}clone(){return new this.constructor().copy(this)}copy(t){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const e={};this.name=t.name;const n=t.index;n!==null&&this.setIndex(n.clone(e));const i=t.attributes;for(const f in i){const p=i[f];this.setAttribute(f,p.clone(e))}const o=t.morphAttributes;for(const f in o){const p=[],m=o[f];for(let g=0,_=m.length;g<_;g++)p.push(m[g].clone(e));this.morphAttributes[f]=p}this.morphTargetsRelative=t.morphTargetsRelative;const l=t.groups;for(let f=0,p=l.length;f0){const i=e[n[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,l=i.length;o(t.far-t.near)**2))&&(_0.copy(o).invert(),Ia.copy(t.ray).applyMatrix4(_0),!(n.boundingBox!==null&&Ia.intersectsBox(n.boundingBox)===!1)&&this._computeIntersections(t,e,Ia)))}_computeIntersections(t,e,n){let i;const o=this.geometry,l=this.material,c=o.index,h=o.attributes.position,f=o.attributes.uv,p=o.attributes.uv1,m=o.attributes.normal,g=o.groups,_=o.drawRange;if(c!==null)if(Array.isArray(l))for(let x=0,b=g.length;xe.far?null:{distance:f,point:Qc.clone(),object:s}}function $c(s,t,e,n,i,o,l,c,h,f){s.getVertexPosition(c,Zc),s.getVertexPosition(h,Kc),s.getVertexPosition(f,jc);const p=e1(s,t,e,n,Zc,Kc,jc,x0);if(p){const m=new O;jn.getBarycoord(x0,Zc,Kc,jc,m),i&&(p.uv=jn.getInterpolatedAttribute(i,c,h,f,m,new dt)),o&&(p.uv1=jn.getInterpolatedAttribute(o,c,h,f,m,new dt)),l&&(p.normal=jn.getInterpolatedAttribute(l,c,h,f,m,new O),p.normal.dot(n.direction)>0&&p.normal.multiplyScalar(-1));const g={a:c,b:h,c:f,normal:new O,materialIndex:0};jn.getNormal(Zc,Kc,jc,g.normal),p.face=g,p.barycoord=m}return p}class cr extends pe{constructor(t=1,e=1,n=1,i=1,o=1,l=1){super(),this.type="BoxGeometry",this.parameters={width:t,height:e,depth:n,widthSegments:i,heightSegments:o,depthSegments:l};const c=this;i=Math.floor(i),o=Math.floor(o),l=Math.floor(l);const h=[],f=[],p=[],m=[];let g=0,_=0;x("z","y","x",-1,-1,n,e,t,l,o,0),x("z","y","x",1,-1,n,e,-t,l,o,1),x("x","z","y",1,1,t,n,e,i,l,2),x("x","z","y",1,-1,t,n,-e,i,l,3),x("x","y","z",1,-1,t,e,n,i,o,4),x("x","y","z",-1,-1,t,e,-n,i,o,5),this.setIndex(h),this.setAttribute("position",new qt(f,3)),this.setAttribute("normal",new qt(p,3)),this.setAttribute("uv",new qt(m,2));function x(b,S,y,E,A,T,z,D,L,B,w){const C=T/L,I=z/B,Z=T/2,K=z/2,tt=D/2,rt=L+1,V=B+1;let et=0,q=0;const it=new O;for(let ut=0;ut0?1:-1,p.push(it.x,it.y,it.z),m.push(It/L),m.push(1-ut/B),et+=1}}for(let ut=0;ut0&&(e.defines=this.defines),e.vertexShader=this.vertexShader,e.fragmentShader=this.fragmentShader,e.lights=this.lights,e.clipping=this.clipping;const n={};for(const i in this.extensions)this.extensions[i]===!0&&(n[i]=!0);return Object.keys(n).length>0&&(e.extensions=n),e}}class Ih extends Re{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new ee,this.projectionMatrix=new ee,this.projectionMatrixInverse=new ee,this.coordinateSystem=ts}copy(t,e){return super.copy(t,e),this.matrixWorldInverse.copy(t.matrixWorldInverse),this.projectionMatrix.copy(t.projectionMatrix),this.projectionMatrixInverse.copy(t.projectionMatrixInverse),this.coordinateSystem=t.coordinateSystem,this}getWorldDirection(t){return super.getWorldDirection(t).negate()}updateMatrixWorld(t){super.updateMatrixWorld(t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(t,e){super.updateWorldMatrix(t,e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}}const ia=new O,S0=new dt,M0=new dt;class vn extends Ih{constructor(t=50,e=1,n=.1,i=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=t,this.zoom=1,this.near=n,this.far=i,this.focus=10,this.aspect=e,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(t,e){return super.copy(t,e),this.fov=t.fov,this.zoom=t.zoom,this.near=t.near,this.far=t.far,this.focus=t.focus,this.aspect=t.aspect,this.view=t.view===null?null:Object.assign({},t.view),this.filmGauge=t.filmGauge,this.filmOffset=t.filmOffset,this}setFocalLength(t){const e=.5*this.getFilmHeight()/t;this.fov=po*2*Math.atan(e),this.updateProjectionMatrix()}getFocalLength(){const t=Math.tan(er*.5*this.fov);return .5*this.getFilmHeight()/t}getEffectiveFOV(){return po*2*Math.atan(Math.tan(er*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}getViewBounds(t,e,n){ia.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),e.set(ia.x,ia.y).multiplyScalar(-t/ia.z),ia.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),n.set(ia.x,ia.y).multiplyScalar(-t/ia.z)}getViewSize(t,e){return this.getViewBounds(t,S0,M0),e.subVectors(M0,S0)}setViewOffset(t,e,n,i,o,l){this.aspect=t/e,this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=n,this.view.offsetY=i,this.view.width=o,this.view.height=l,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const t=this.near;let e=t*Math.tan(er*.5*this.fov)/this.zoom,n=2*e,i=this.aspect*n,o=-.5*i;const l=this.view;if(this.view!==null&&this.view.enabled){const h=l.fullWidth,f=l.fullHeight;o+=l.offsetX*i/h,e-=l.offsetY*n/f,i*=l.width/h,n*=l.height/f}const c=this.filmOffset;c!==0&&(o+=t*c/this.getFilmWidth()),this.projectionMatrix.makePerspective(o,o+i,e,e-n,t,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(t){const e=super.toJSON(t);return e.object.fov=this.fov,e.object.zoom=this.zoom,e.object.near=this.near,e.object.far=this.far,e.object.focus=this.focus,e.object.aspect=this.aspect,this.view!==null&&(e.object.view=Object.assign({},this.view)),e.object.filmGauge=this.filmGauge,e.object.filmOffset=this.filmOffset,e}}const jr=-90,Jr=1;class ax extends Re{constructor(t,e,n){super(),this.type="CubeCamera",this.renderTarget=n,this.coordinateSystem=null,this.activeMipmapLevel=0;const i=new vn(jr,Jr,t,e);i.layers=this.layers,this.add(i);const o=new vn(jr,Jr,t,e);o.layers=this.layers,this.add(o);const l=new vn(jr,Jr,t,e);l.layers=this.layers,this.add(l);const c=new vn(jr,Jr,t,e);c.layers=this.layers,this.add(c);const h=new vn(jr,Jr,t,e);h.layers=this.layers,this.add(h);const f=new vn(jr,Jr,t,e);f.layers=this.layers,this.add(f)}updateCoordinateSystem(){const t=this.coordinateSystem,e=this.children.concat(),[n,i,o,l,c,h]=e;for(const f of e)this.remove(f);if(t===ts)n.up.set(0,1,0),n.lookAt(1,0,0),i.up.set(0,1,0),i.lookAt(-1,0,0),o.up.set(0,0,-1),o.lookAt(0,1,0),l.up.set(0,0,1),l.lookAt(0,-1,0),c.up.set(0,1,0),c.lookAt(0,0,1),h.up.set(0,1,0),h.lookAt(0,0,-1);else if(t===Dl)n.up.set(0,-1,0),n.lookAt(-1,0,0),i.up.set(0,-1,0),i.lookAt(1,0,0),o.up.set(0,0,1),o.lookAt(0,1,0),l.up.set(0,0,-1),l.lookAt(0,-1,0),c.up.set(0,-1,0),c.lookAt(0,0,1),h.up.set(0,-1,0),h.lookAt(0,0,-1);else throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+t);for(const f of e)this.add(f),f.updateMatrixWorld()}update(t,e){this.parent===null&&this.updateMatrixWorld();const{renderTarget:n,activeMipmapLevel:i}=this;this.coordinateSystem!==t.coordinateSystem&&(this.coordinateSystem=t.coordinateSystem,this.updateCoordinateSystem());const[o,l,c,h,f,p]=this.children,m=t.getRenderTarget(),g=t.getActiveCubeFace(),_=t.getActiveMipmapLevel(),x=t.xr.enabled;t.xr.enabled=!1;const b=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,t.setRenderTarget(n,0,i),t.render(e,o),t.setRenderTarget(n,1,i),t.render(e,l),t.setRenderTarget(n,2,i),t.render(e,c),t.setRenderTarget(n,3,i),t.render(e,h),t.setRenderTarget(n,4,i),t.render(e,f),n.texture.generateMipmaps=b,t.setRenderTarget(n,5,i),t.render(e,p),t.setRenderTarget(m,g,_),t.xr.enabled=x,n.texture.needsPMREMUpdate=!0}}class Xl extends nn{constructor(t,e,n,i,o,l,c,h,f,p){t=t!==void 0?t:[],e=e!==void 0?e:Ns,super(t,e,n,i,o,l,c,h,f,p),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(t){this.image=t}}class rx extends Wi{constructor(t=1,e={}){super(t,t,e),this.isWebGLCubeRenderTarget=!0;const n={width:t,height:t,depth:1},i=[n,n,n,n,n,n];this.texture=new Xl(i,e.mapping,e.wrapS,e.wrapT,e.magFilter,e.minFilter,e.format,e.type,e.anisotropy,e.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=e.generateMipmaps!==void 0?e.generateMipmaps:!1,this.texture.minFilter=e.minFilter!==void 0?e.minFilter:un}fromEquirectangularTexture(t,e){this.texture.type=e.type,this.texture.colorSpace=e.colorSpace,this.texture.generateMipmaps=e.generateMipmaps,this.texture.minFilter=e.minFilter,this.texture.magFilter=e.magFilter;const n={uniforms:{tEquirect:{value:null}},vertexShader:` + + varying vec3 vWorldDirection; + + vec3 transformDirection( in vec3 dir, in mat4 matrix ) { + + return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz ); + + } + + void main() { + + vWorldDirection = transformDirection( position, modelMatrix ); + + #include + #include + + } + `,fragmentShader:` + + uniform sampler2D tEquirect; + + varying vec3 vWorldDirection; + + #include + + void main() { + + vec3 direction = normalize( vWorldDirection ); + + vec2 sampleUV = equirectUv( direction ); + + gl_FragColor = texture2D( tEquirect, sampleUV ); + + } + `},i=new cr(5,5,5),o=new Xi({name:"CubemapFromEquirect",uniforms:go(n.uniforms),vertexShader:n.vertexShader,fragmentShader:n.fragmentShader,side:Hn,blending:Rs});o.uniforms.tEquirect.value=e;const l=new ln(i,o),c=e.minFilter;return e.minFilter===$i&&(e.minFilter=un),new ax(1,10,this).update(t,l),e.minFilter=c,l.geometry.dispose(),l.material.dispose(),this}clear(t,e,n,i){const o=t.getRenderTarget();for(let l=0;l<6;l++)t.setRenderTarget(this,l),t.clear(e,n,i);t.setRenderTarget(o)}}const Xd=new O,a1=new O,r1=new ue;class aa{constructor(t=new O(1,0,0),e=0){this.isPlane=!0,this.normal=t,this.constant=e}set(t,e){return this.normal.copy(t),this.constant=e,this}setComponents(t,e,n,i){return this.normal.set(t,e,n),this.constant=i,this}setFromNormalAndCoplanarPoint(t,e){return this.normal.copy(t),this.constant=-e.dot(this.normal),this}setFromCoplanarPoints(t,e,n){const i=Xd.subVectors(n,e).cross(a1.subVectors(t,e)).normalize();return this.setFromNormalAndCoplanarPoint(i,t),this}copy(t){return this.normal.copy(t.normal),this.constant=t.constant,this}normalize(){const t=1/this.normal.length();return this.normal.multiplyScalar(t),this.constant*=t,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(t){return this.normal.dot(t)+this.constant}distanceToSphere(t){return this.distanceToPoint(t.center)-t.radius}projectPoint(t,e){return e.copy(t).addScaledVector(this.normal,-this.distanceToPoint(t))}intersectLine(t,e){const n=t.delta(Xd),i=this.normal.dot(n);if(i===0)return this.distanceToPoint(t.start)===0?e.copy(t.start):null;const o=-(t.start.dot(this.normal)+this.constant)/i;return o<0||o>1?null:e.copy(t.start).addScaledVector(n,o)}intersectsLine(t){const e=this.distanceToPoint(t.start),n=this.distanceToPoint(t.end);return e<0&&n>0||n<0&&e>0}intersectsBox(t){return t.intersectsPlane(this)}intersectsSphere(t){return t.intersectsPlane(this)}coplanarPoint(t){return t.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(t,e){const n=e||r1.getNormalMatrix(t),i=this.coplanarPoint(Xd).applyMatrix4(t),o=this.normal.applyMatrix3(n).normalize();return this.constant=-i.dot(o),this}translate(t){return this.constant-=t.dot(this.normal),this}equals(t){return t.normal.equals(this.normal)&&t.constant===this.constant}clone(){return new this.constructor().copy(this)}}const Oa=new Nn,tu=new O;class ql{constructor(t=new aa,e=new aa,n=new aa,i=new aa,o=new aa,l=new aa){this.planes=[t,e,n,i,o,l]}set(t,e,n,i,o,l){const c=this.planes;return c[0].copy(t),c[1].copy(e),c[2].copy(n),c[3].copy(i),c[4].copy(o),c[5].copy(l),this}copy(t){const e=this.planes;for(let n=0;n<6;n++)e[n].copy(t.planes[n]);return this}setFromProjectionMatrix(t,e=ts){const n=this.planes,i=t.elements,o=i[0],l=i[1],c=i[2],h=i[3],f=i[4],p=i[5],m=i[6],g=i[7],_=i[8],x=i[9],b=i[10],S=i[11],y=i[12],E=i[13],A=i[14],T=i[15];if(n[0].setComponents(h-o,g-f,S-_,T-y).normalize(),n[1].setComponents(h+o,g+f,S+_,T+y).normalize(),n[2].setComponents(h+l,g+p,S+x,T+E).normalize(),n[3].setComponents(h-l,g-p,S-x,T-E).normalize(),n[4].setComponents(h-c,g-m,S-b,T-A).normalize(),e===ts)n[5].setComponents(h+c,g+m,S+b,T+A).normalize();else if(e===Dl)n[5].setComponents(c,m,b,A).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+e);return this}intersectsObject(t){if(t.boundingSphere!==void 0)t.boundingSphere===null&&t.computeBoundingSphere(),Oa.copy(t.boundingSphere).applyMatrix4(t.matrixWorld);else{const e=t.geometry;e.boundingSphere===null&&e.computeBoundingSphere(),Oa.copy(e.boundingSphere).applyMatrix4(t.matrixWorld)}return this.intersectsSphere(Oa)}intersectsSprite(t){return Oa.center.set(0,0,0),Oa.radius=.7071067811865476,Oa.applyMatrix4(t.matrixWorld),this.intersectsSphere(Oa)}intersectsSphere(t){const e=this.planes,n=t.center,i=-t.radius;for(let o=0;o<6;o++)if(e[o].distanceToPoint(n)0?t.max.x:t.min.x,tu.y=i.normal.y>0?t.max.y:t.min.y,tu.z=i.normal.z>0?t.max.z:t.min.z,i.distanceToPoint(tu)<0)return!1}return!0}containsPoint(t){const e=this.planes;for(let n=0;n<6;n++)if(e[n].distanceToPoint(t)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}function ox(){let s=null,t=!1,e=null,n=null;function i(o,l){e(o,l),n=s.requestAnimationFrame(i)}return{start:function(){t!==!0&&e!==null&&(n=s.requestAnimationFrame(i),t=!0)},stop:function(){s.cancelAnimationFrame(n),t=!1},setAnimationLoop:function(o){e=o},setContext:function(o){s=o}}}function o1(s){const t=new WeakMap;function e(c,h){const f=c.array,p=c.usage,m=f.byteLength,g=s.createBuffer();s.bindBuffer(h,g),s.bufferData(h,f,p),c.onUploadCallback();let _;if(f instanceof Float32Array)_=s.FLOAT;else if(f instanceof Uint16Array)c.isFloat16BufferAttribute?_=s.HALF_FLOAT:_=s.UNSIGNED_SHORT;else if(f instanceof Int16Array)_=s.SHORT;else if(f instanceof Uint32Array)_=s.UNSIGNED_INT;else if(f instanceof Int32Array)_=s.INT;else if(f instanceof Int8Array)_=s.BYTE;else if(f instanceof Uint8Array)_=s.UNSIGNED_BYTE;else if(f instanceof Uint8ClampedArray)_=s.UNSIGNED_BYTE;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+f);return{buffer:g,type:_,bytesPerElement:f.BYTES_PER_ELEMENT,version:c.version,size:m}}function n(c,h,f){const p=h.array,m=h.updateRanges;if(s.bindBuffer(f,c),m.length===0)s.bufferSubData(f,0,p);else{m.sort((_,x)=>_.start-x.start);let g=0;for(let _=1;_ 0 + vec4 plane; + #ifdef ALPHA_TO_COVERAGE + float distanceToPlane, distanceGradient; + float clipOpacity = 1.0; + #pragma unroll_loop_start + for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) { + plane = clippingPlanes[ i ]; + distanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w; + distanceGradient = fwidth( distanceToPlane ) / 2.0; + clipOpacity *= smoothstep( - distanceGradient, distanceGradient, distanceToPlane ); + if ( clipOpacity == 0.0 ) discard; + } + #pragma unroll_loop_end + #if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES + float unionClipOpacity = 1.0; + #pragma unroll_loop_start + for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) { + plane = clippingPlanes[ i ]; + distanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w; + distanceGradient = fwidth( distanceToPlane ) / 2.0; + unionClipOpacity *= 1.0 - smoothstep( - distanceGradient, distanceGradient, distanceToPlane ); + } + #pragma unroll_loop_end + clipOpacity *= 1.0 - unionClipOpacity; + #endif + diffuseColor.a *= clipOpacity; + if ( diffuseColor.a == 0.0 ) discard; + #else + #pragma unroll_loop_start + for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) { + plane = clippingPlanes[ i ]; + if ( dot( vClipPosition, plane.xyz ) > plane.w ) discard; + } + #pragma unroll_loop_end + #if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES + bool clipped = true; + #pragma unroll_loop_start + for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) { + plane = clippingPlanes[ i ]; + clipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped; + } + #pragma unroll_loop_end + if ( clipped ) discard; + #endif + #endif +#endif`,E1=`#if NUM_CLIPPING_PLANES > 0 + varying vec3 vClipPosition; + uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ]; +#endif`,T1=`#if NUM_CLIPPING_PLANES > 0 + varying vec3 vClipPosition; +#endif`,A1=`#if NUM_CLIPPING_PLANES > 0 + vClipPosition = - mvPosition.xyz; +#endif`,C1=`#if defined( USE_COLOR_ALPHA ) + diffuseColor *= vColor; +#elif defined( USE_COLOR ) + diffuseColor.rgb *= vColor; +#endif`,w1=`#if defined( USE_COLOR_ALPHA ) + varying vec4 vColor; +#elif defined( USE_COLOR ) + varying vec3 vColor; +#endif`,R1=`#if defined( USE_COLOR_ALPHA ) + varying vec4 vColor; +#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR ) + varying vec3 vColor; +#endif`,D1=`#if defined( USE_COLOR_ALPHA ) + vColor = vec4( 1.0 ); +#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR ) + vColor = vec3( 1.0 ); +#endif +#ifdef USE_COLOR + vColor *= color; +#endif +#ifdef USE_INSTANCING_COLOR + vColor.xyz *= instanceColor.xyz; +#endif +#ifdef USE_BATCHING_COLOR + vec3 batchingColor = getBatchingColor( getIndirectIndex( gl_DrawID ) ); + vColor.xyz *= batchingColor.xyz; +#endif`,U1=`#define PI 3.141592653589793 +#define PI2 6.283185307179586 +#define PI_HALF 1.5707963267948966 +#define RECIPROCAL_PI 0.3183098861837907 +#define RECIPROCAL_PI2 0.15915494309189535 +#define EPSILON 1e-6 +#ifndef saturate +#define saturate( a ) clamp( a, 0.0, 1.0 ) +#endif +#define whiteComplement( a ) ( 1.0 - saturate( a ) ) +float pow2( const in float x ) { return x*x; } +vec3 pow2( const in vec3 x ) { return x*x; } +float pow3( const in float x ) { return x*x*x; } +float pow4( const in float x ) { float x2 = x*x; return x2*x2; } +float max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); } +float average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); } +highp float rand( const in vec2 uv ) { + const highp float a = 12.9898, b = 78.233, c = 43758.5453; + highp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI ); + return fract( sin( sn ) * c ); +} +#ifdef HIGH_PRECISION + float precisionSafeLength( vec3 v ) { return length( v ); } +#else + float precisionSafeLength( vec3 v ) { + float maxComponent = max3( abs( v ) ); + return length( v / maxComponent ) * maxComponent; + } +#endif +struct IncidentLight { + vec3 color; + vec3 direction; + bool visible; +}; +struct ReflectedLight { + vec3 directDiffuse; + vec3 directSpecular; + vec3 indirectDiffuse; + vec3 indirectSpecular; +}; +#ifdef USE_ALPHAHASH + varying vec3 vPosition; +#endif +vec3 transformDirection( in vec3 dir, in mat4 matrix ) { + return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz ); +} +vec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) { + return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz ); +} +mat3 transposeMat3( const in mat3 m ) { + mat3 tmp; + tmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x ); + tmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y ); + tmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z ); + return tmp; +} +bool isPerspectiveMatrix( mat4 m ) { + return m[ 2 ][ 3 ] == - 1.0; +} +vec2 equirectUv( in vec3 dir ) { + float u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5; + float v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5; + return vec2( u, v ); +} +vec3 BRDF_Lambert( const in vec3 diffuseColor ) { + return RECIPROCAL_PI * diffuseColor; +} +vec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) { + float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH ); + return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel ); +} +float F_Schlick( const in float f0, const in float f90, const in float dotVH ) { + float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH ); + return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel ); +} // validated`,N1=`#ifdef ENVMAP_TYPE_CUBE_UV + #define cubeUV_minMipLevel 4.0 + #define cubeUV_minTileSize 16.0 + float getFace( vec3 direction ) { + vec3 absDirection = abs( direction ); + float face = - 1.0; + if ( absDirection.x > absDirection.z ) { + if ( absDirection.x > absDirection.y ) + face = direction.x > 0.0 ? 0.0 : 3.0; + else + face = direction.y > 0.0 ? 1.0 : 4.0; + } else { + if ( absDirection.z > absDirection.y ) + face = direction.z > 0.0 ? 2.0 : 5.0; + else + face = direction.y > 0.0 ? 1.0 : 4.0; + } + return face; + } + vec2 getUV( vec3 direction, float face ) { + vec2 uv; + if ( face == 0.0 ) { + uv = vec2( direction.z, direction.y ) / abs( direction.x ); + } else if ( face == 1.0 ) { + uv = vec2( - direction.x, - direction.z ) / abs( direction.y ); + } else if ( face == 2.0 ) { + uv = vec2( - direction.x, direction.y ) / abs( direction.z ); + } else if ( face == 3.0 ) { + uv = vec2( - direction.z, direction.y ) / abs( direction.x ); + } else if ( face == 4.0 ) { + uv = vec2( - direction.x, direction.z ) / abs( direction.y ); + } else { + uv = vec2( direction.x, direction.y ) / abs( direction.z ); + } + return 0.5 * ( uv + 1.0 ); + } + vec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) { + float face = getFace( direction ); + float filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 ); + mipInt = max( mipInt, cubeUV_minMipLevel ); + float faceSize = exp2( mipInt ); + highp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0; + if ( face > 2.0 ) { + uv.y += faceSize; + face -= 3.0; + } + uv.x += face * faceSize; + uv.x += filterInt * 3.0 * cubeUV_minTileSize; + uv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize ); + uv.x *= CUBEUV_TEXEL_WIDTH; + uv.y *= CUBEUV_TEXEL_HEIGHT; + #ifdef texture2DGradEXT + return texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb; + #else + return texture2D( envMap, uv ).rgb; + #endif + } + #define cubeUV_r0 1.0 + #define cubeUV_m0 - 2.0 + #define cubeUV_r1 0.8 + #define cubeUV_m1 - 1.0 + #define cubeUV_r4 0.4 + #define cubeUV_m4 2.0 + #define cubeUV_r5 0.305 + #define cubeUV_m5 3.0 + #define cubeUV_r6 0.21 + #define cubeUV_m6 4.0 + float roughnessToMip( float roughness ) { + float mip = 0.0; + if ( roughness >= cubeUV_r1 ) { + mip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0; + } else if ( roughness >= cubeUV_r4 ) { + mip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1; + } else if ( roughness >= cubeUV_r5 ) { + mip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4; + } else if ( roughness >= cubeUV_r6 ) { + mip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5; + } else { + mip = - 2.0 * log2( 1.16 * roughness ); } + return mip; + } + vec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) { + float mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP ); + float mipF = fract( mip ); + float mipInt = floor( mip ); + vec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt ); + if ( mipF == 0.0 ) { + return vec4( color0, 1.0 ); + } else { + vec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 ); + return vec4( mix( color0, color1, mipF ), 1.0 ); + } + } +#endif`,L1=`vec3 transformedNormal = objectNormal; +#ifdef USE_TANGENT + vec3 transformedTangent = objectTangent; +#endif +#ifdef USE_BATCHING + mat3 bm = mat3( batchingMatrix ); + transformedNormal /= vec3( dot( bm[ 0 ], bm[ 0 ] ), dot( bm[ 1 ], bm[ 1 ] ), dot( bm[ 2 ], bm[ 2 ] ) ); + transformedNormal = bm * transformedNormal; + #ifdef USE_TANGENT + transformedTangent = bm * transformedTangent; + #endif +#endif +#ifdef USE_INSTANCING + mat3 im = mat3( instanceMatrix ); + transformedNormal /= vec3( dot( im[ 0 ], im[ 0 ] ), dot( im[ 1 ], im[ 1 ] ), dot( im[ 2 ], im[ 2 ] ) ); + transformedNormal = im * transformedNormal; + #ifdef USE_TANGENT + transformedTangent = im * transformedTangent; + #endif +#endif +transformedNormal = normalMatrix * transformedNormal; +#ifdef FLIP_SIDED + transformedNormal = - transformedNormal; +#endif +#ifdef USE_TANGENT + transformedTangent = ( modelViewMatrix * vec4( transformedTangent, 0.0 ) ).xyz; + #ifdef FLIP_SIDED + transformedTangent = - transformedTangent; + #endif +#endif`,P1=`#ifdef USE_DISPLACEMENTMAP + uniform sampler2D displacementMap; + uniform float displacementScale; + uniform float displacementBias; +#endif`,I1=`#ifdef USE_DISPLACEMENTMAP + transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias ); +#endif`,O1=`#ifdef USE_EMISSIVEMAP + vec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv ); + #ifdef DECODE_VIDEO_TEXTURE_EMISSIVE + emissiveColor = sRGBTransferEOTF( emissiveColor ); + #endif + totalEmissiveRadiance *= emissiveColor.rgb; +#endif`,B1=`#ifdef USE_EMISSIVEMAP + uniform sampler2D emissiveMap; +#endif`,z1="gl_FragColor = linearToOutputTexel( gl_FragColor );",F1=`vec4 LinearTransferOETF( in vec4 value ) { + return value; +} +vec4 sRGBTransferEOTF( in vec4 value ) { + return vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.a ); +} +vec4 sRGBTransferOETF( in vec4 value ) { + return vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a ); +}`,H1=`#ifdef USE_ENVMAP + #ifdef ENV_WORLDPOS + vec3 cameraToFrag; + if ( isOrthographic ) { + cameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) ); + } else { + cameraToFrag = normalize( vWorldPosition - cameraPosition ); + } + vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); + #ifdef ENVMAP_MODE_REFLECTION + vec3 reflectVec = reflect( cameraToFrag, worldNormal ); + #else + vec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio ); + #endif + #else + vec3 reflectVec = vReflect; + #endif + #ifdef ENVMAP_TYPE_CUBE + vec4 envColor = textureCube( envMap, envMapRotation * vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) ); + #else + vec4 envColor = vec4( 0.0 ); + #endif + #ifdef ENVMAP_BLENDING_MULTIPLY + outgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity ); + #elif defined( ENVMAP_BLENDING_MIX ) + outgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity ); + #elif defined( ENVMAP_BLENDING_ADD ) + outgoingLight += envColor.xyz * specularStrength * reflectivity; + #endif +#endif`,V1=`#ifdef USE_ENVMAP + uniform float envMapIntensity; + uniform float flipEnvMap; + uniform mat3 envMapRotation; + #ifdef ENVMAP_TYPE_CUBE + uniform samplerCube envMap; + #else + uniform sampler2D envMap; + #endif + +#endif`,G1=`#ifdef USE_ENVMAP + uniform float reflectivity; + #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) + #define ENV_WORLDPOS + #endif + #ifdef ENV_WORLDPOS + varying vec3 vWorldPosition; + uniform float refractionRatio; + #else + varying vec3 vReflect; + #endif +#endif`,k1=`#ifdef USE_ENVMAP + #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) + #define ENV_WORLDPOS + #endif + #ifdef ENV_WORLDPOS + + varying vec3 vWorldPosition; + #else + varying vec3 vReflect; + uniform float refractionRatio; + #endif +#endif`,W1=`#ifdef USE_ENVMAP + #ifdef ENV_WORLDPOS + vWorldPosition = worldPosition.xyz; + #else + vec3 cameraToVertex; + if ( isOrthographic ) { + cameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) ); + } else { + cameraToVertex = normalize( worldPosition.xyz - cameraPosition ); + } + vec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); + #ifdef ENVMAP_MODE_REFLECTION + vReflect = reflect( cameraToVertex, worldNormal ); + #else + vReflect = refract( cameraToVertex, worldNormal, refractionRatio ); + #endif + #endif +#endif`,X1=`#ifdef USE_FOG + vFogDepth = - mvPosition.z; +#endif`,q1=`#ifdef USE_FOG + varying float vFogDepth; +#endif`,Y1=`#ifdef USE_FOG + #ifdef FOG_EXP2 + float fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth ); + #else + float fogFactor = smoothstep( fogNear, fogFar, vFogDepth ); + #endif + gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor ); +#endif`,Z1=`#ifdef USE_FOG + uniform vec3 fogColor; + varying float vFogDepth; + #ifdef FOG_EXP2 + uniform float fogDensity; + #else + uniform float fogNear; + uniform float fogFar; + #endif +#endif`,K1=`#ifdef USE_GRADIENTMAP + uniform sampler2D gradientMap; +#endif +vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) { + float dotNL = dot( normal, lightDirection ); + vec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 ); + #ifdef USE_GRADIENTMAP + return vec3( texture2D( gradientMap, coord ).r ); + #else + vec2 fw = fwidth( coord ) * 0.5; + return mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) ); + #endif +}`,j1=`#ifdef USE_LIGHTMAP + uniform sampler2D lightMap; + uniform float lightMapIntensity; +#endif`,J1=`LambertMaterial material; +material.diffuseColor = diffuseColor.rgb; +material.specularStrength = specularStrength;`,Q1=`varying vec3 vViewPosition; +struct LambertMaterial { + vec3 diffuseColor; + float specularStrength; +}; +void RE_Direct_Lambert( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) { + float dotNL = saturate( dot( geometryNormal, directLight.direction ) ); + vec3 irradiance = dotNL * directLight.color; + reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); +} +void RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) { + reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); +} +#define RE_Direct RE_Direct_Lambert +#define RE_IndirectDiffuse RE_IndirectDiffuse_Lambert`,$1=`uniform bool receiveShadow; +uniform vec3 ambientLightColor; +#if defined( USE_LIGHT_PROBES ) + uniform vec3 lightProbe[ 9 ]; +#endif +vec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) { + float x = normal.x, y = normal.y, z = normal.z; + vec3 result = shCoefficients[ 0 ] * 0.886227; + result += shCoefficients[ 1 ] * 2.0 * 0.511664 * y; + result += shCoefficients[ 2 ] * 2.0 * 0.511664 * z; + result += shCoefficients[ 3 ] * 2.0 * 0.511664 * x; + result += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y; + result += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z; + result += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 ); + result += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z; + result += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y ); + return result; +} +vec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) { + vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); + vec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe ); + return irradiance; +} +vec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) { + vec3 irradiance = ambientLightColor; + return irradiance; +} +float getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) { + float distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 ); + if ( cutoffDistance > 0.0 ) { + distanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) ); + } + return distanceFalloff; +} +float getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) { + return smoothstep( coneCosine, penumbraCosine, angleCosine ); +} +#if NUM_DIR_LIGHTS > 0 + struct DirectionalLight { + vec3 direction; + vec3 color; + }; + uniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ]; + void getDirectionalLightInfo( const in DirectionalLight directionalLight, out IncidentLight light ) { + light.color = directionalLight.color; + light.direction = directionalLight.direction; + light.visible = true; + } +#endif +#if NUM_POINT_LIGHTS > 0 + struct PointLight { + vec3 position; + vec3 color; + float distance; + float decay; + }; + uniform PointLight pointLights[ NUM_POINT_LIGHTS ]; + void getPointLightInfo( const in PointLight pointLight, const in vec3 geometryPosition, out IncidentLight light ) { + vec3 lVector = pointLight.position - geometryPosition; + light.direction = normalize( lVector ); + float lightDistance = length( lVector ); + light.color = pointLight.color; + light.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay ); + light.visible = ( light.color != vec3( 0.0 ) ); + } +#endif +#if NUM_SPOT_LIGHTS > 0 + struct SpotLight { + vec3 position; + vec3 direction; + vec3 color; + float distance; + float decay; + float coneCos; + float penumbraCos; + }; + uniform SpotLight spotLights[ NUM_SPOT_LIGHTS ]; + void getSpotLightInfo( const in SpotLight spotLight, const in vec3 geometryPosition, out IncidentLight light ) { + vec3 lVector = spotLight.position - geometryPosition; + light.direction = normalize( lVector ); + float angleCos = dot( light.direction, spotLight.direction ); + float spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos ); + if ( spotAttenuation > 0.0 ) { + float lightDistance = length( lVector ); + light.color = spotLight.color * spotAttenuation; + light.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay ); + light.visible = ( light.color != vec3( 0.0 ) ); + } else { + light.color = vec3( 0.0 ); + light.visible = false; + } + } +#endif +#if NUM_RECT_AREA_LIGHTS > 0 + struct RectAreaLight { + vec3 color; + vec3 position; + vec3 halfWidth; + vec3 halfHeight; + }; + uniform sampler2D ltc_1; uniform sampler2D ltc_2; + uniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ]; +#endif +#if NUM_HEMI_LIGHTS > 0 + struct HemisphereLight { + vec3 direction; + vec3 skyColor; + vec3 groundColor; + }; + uniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ]; + vec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) { + float dotNL = dot( normal, hemiLight.direction ); + float hemiDiffuseWeight = 0.5 * dotNL + 0.5; + vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight ); + return irradiance; + } +#endif`,tT=`#ifdef USE_ENVMAP + vec3 getIBLIrradiance( const in vec3 normal ) { + #ifdef ENVMAP_TYPE_CUBE_UV + vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); + vec4 envMapColor = textureCubeUV( envMap, envMapRotation * worldNormal, 1.0 ); + return PI * envMapColor.rgb * envMapIntensity; + #else + return vec3( 0.0 ); + #endif + } + vec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) { + #ifdef ENVMAP_TYPE_CUBE_UV + vec3 reflectVec = reflect( - viewDir, normal ); + reflectVec = normalize( mix( reflectVec, normal, roughness * roughness) ); + reflectVec = inverseTransformDirection( reflectVec, viewMatrix ); + vec4 envMapColor = textureCubeUV( envMap, envMapRotation * reflectVec, roughness ); + return envMapColor.rgb * envMapIntensity; + #else + return vec3( 0.0 ); + #endif + } + #ifdef USE_ANISOTROPY + vec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) { + #ifdef ENVMAP_TYPE_CUBE_UV + vec3 bentNormal = cross( bitangent, viewDir ); + bentNormal = normalize( cross( bentNormal, bitangent ) ); + bentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) ); + return getIBLRadiance( viewDir, bentNormal, roughness ); + #else + return vec3( 0.0 ); + #endif + } + #endif +#endif`,eT=`ToonMaterial material; +material.diffuseColor = diffuseColor.rgb;`,nT=`varying vec3 vViewPosition; +struct ToonMaterial { + vec3 diffuseColor; +}; +void RE_Direct_Toon( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) { + vec3 irradiance = getGradientIrradiance( geometryNormal, directLight.direction ) * directLight.color; + reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); +} +void RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) { + reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); +} +#define RE_Direct RE_Direct_Toon +#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon`,iT=`BlinnPhongMaterial material; +material.diffuseColor = diffuseColor.rgb; +material.specularColor = specular; +material.specularShininess = shininess; +material.specularStrength = specularStrength;`,sT=`varying vec3 vViewPosition; +struct BlinnPhongMaterial { + vec3 diffuseColor; + vec3 specularColor; + float specularShininess; + float specularStrength; +}; +void RE_Direct_BlinnPhong( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) { + float dotNL = saturate( dot( geometryNormal, directLight.direction ) ); + vec3 irradiance = dotNL * directLight.color; + reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); + reflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometryViewDir, geometryNormal, material.specularColor, material.specularShininess ) * material.specularStrength; +} +void RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) { + reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); +} +#define RE_Direct RE_Direct_BlinnPhong +#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong`,aT=`PhysicalMaterial material; +material.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor ); +vec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) ); +float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z ); +material.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness; +material.roughness = min( material.roughness, 1.0 ); +#ifdef IOR + material.ior = ior; + #ifdef USE_SPECULAR + float specularIntensityFactor = specularIntensity; + vec3 specularColorFactor = specularColor; + #ifdef USE_SPECULAR_COLORMAP + specularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb; + #endif + #ifdef USE_SPECULAR_INTENSITYMAP + specularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a; + #endif + material.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor ); + #else + float specularIntensityFactor = 1.0; + vec3 specularColorFactor = vec3( 1.0 ); + material.specularF90 = 1.0; + #endif + material.specularColor = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor ); +#else + material.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor ); + material.specularF90 = 1.0; +#endif +#ifdef USE_CLEARCOAT + material.clearcoat = clearcoat; + material.clearcoatRoughness = clearcoatRoughness; + material.clearcoatF0 = vec3( 0.04 ); + material.clearcoatF90 = 1.0; + #ifdef USE_CLEARCOATMAP + material.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x; + #endif + #ifdef USE_CLEARCOAT_ROUGHNESSMAP + material.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y; + #endif + material.clearcoat = saturate( material.clearcoat ); material.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 ); + material.clearcoatRoughness += geometryRoughness; + material.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 ); +#endif +#ifdef USE_DISPERSION + material.dispersion = dispersion; +#endif +#ifdef USE_IRIDESCENCE + material.iridescence = iridescence; + material.iridescenceIOR = iridescenceIOR; + #ifdef USE_IRIDESCENCEMAP + material.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r; + #endif + #ifdef USE_IRIDESCENCE_THICKNESSMAP + material.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum; + #else + material.iridescenceThickness = iridescenceThicknessMaximum; + #endif +#endif +#ifdef USE_SHEEN + material.sheenColor = sheenColor; + #ifdef USE_SHEEN_COLORMAP + material.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb; + #endif + material.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 ); + #ifdef USE_SHEEN_ROUGHNESSMAP + material.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a; + #endif +#endif +#ifdef USE_ANISOTROPY + #ifdef USE_ANISOTROPYMAP + mat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x ); + vec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb; + vec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b; + #else + vec2 anisotropyV = anisotropyVector; + #endif + material.anisotropy = length( anisotropyV ); + if( material.anisotropy == 0.0 ) { + anisotropyV = vec2( 1.0, 0.0 ); + } else { + anisotropyV /= material.anisotropy; + material.anisotropy = saturate( material.anisotropy ); + } + material.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) ); + material.anisotropyT = tbn[ 0 ] * anisotropyV.x + tbn[ 1 ] * anisotropyV.y; + material.anisotropyB = tbn[ 1 ] * anisotropyV.x - tbn[ 0 ] * anisotropyV.y; +#endif`,rT=`struct PhysicalMaterial { + vec3 diffuseColor; + float roughness; + vec3 specularColor; + float specularF90; + float dispersion; + #ifdef USE_CLEARCOAT + float clearcoat; + float clearcoatRoughness; + vec3 clearcoatF0; + float clearcoatF90; + #endif + #ifdef USE_IRIDESCENCE + float iridescence; + float iridescenceIOR; + float iridescenceThickness; + vec3 iridescenceFresnel; + vec3 iridescenceF0; + #endif + #ifdef USE_SHEEN + vec3 sheenColor; + float sheenRoughness; + #endif + #ifdef IOR + float ior; + #endif + #ifdef USE_TRANSMISSION + float transmission; + float transmissionAlpha; + float thickness; + float attenuationDistance; + vec3 attenuationColor; + #endif + #ifdef USE_ANISOTROPY + float anisotropy; + float alphaT; + vec3 anisotropyT; + vec3 anisotropyB; + #endif +}; +vec3 clearcoatSpecularDirect = vec3( 0.0 ); +vec3 clearcoatSpecularIndirect = vec3( 0.0 ); +vec3 sheenSpecularDirect = vec3( 0.0 ); +vec3 sheenSpecularIndirect = vec3(0.0 ); +vec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) { + float x = clamp( 1.0 - dotVH, 0.0, 1.0 ); + float x2 = x * x; + float x5 = clamp( x * x2 * x2, 0.0, 0.9999 ); + return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 ); +} +float V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) { + float a2 = pow2( alpha ); + float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) ); + float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) ); + return 0.5 / max( gv + gl, EPSILON ); +} +float D_GGX( const in float alpha, const in float dotNH ) { + float a2 = pow2( alpha ); + float denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0; + return RECIPROCAL_PI * a2 / pow2( denom ); +} +#ifdef USE_ANISOTROPY + float V_GGX_SmithCorrelated_Anisotropic( const in float alphaT, const in float alphaB, const in float dotTV, const in float dotBV, const in float dotTL, const in float dotBL, const in float dotNV, const in float dotNL ) { + float gv = dotNL * length( vec3( alphaT * dotTV, alphaB * dotBV, dotNV ) ); + float gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) ); + float v = 0.5 / ( gv + gl ); + return saturate(v); + } + float D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) { + float a2 = alphaT * alphaB; + highp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH ); + highp float v2 = dot( v, v ); + float w2 = a2 / v2; + return RECIPROCAL_PI * a2 * pow2 ( w2 ); + } +#endif +#ifdef USE_CLEARCOAT + vec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) { + vec3 f0 = material.clearcoatF0; + float f90 = material.clearcoatF90; + float roughness = material.clearcoatRoughness; + float alpha = pow2( roughness ); + vec3 halfDir = normalize( lightDir + viewDir ); + float dotNL = saturate( dot( normal, lightDir ) ); + float dotNV = saturate( dot( normal, viewDir ) ); + float dotNH = saturate( dot( normal, halfDir ) ); + float dotVH = saturate( dot( viewDir, halfDir ) ); + vec3 F = F_Schlick( f0, f90, dotVH ); + float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV ); + float D = D_GGX( alpha, dotNH ); + return F * ( V * D ); + } +#endif +vec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) { + vec3 f0 = material.specularColor; + float f90 = material.specularF90; + float roughness = material.roughness; + float alpha = pow2( roughness ); + vec3 halfDir = normalize( lightDir + viewDir ); + float dotNL = saturate( dot( normal, lightDir ) ); + float dotNV = saturate( dot( normal, viewDir ) ); + float dotNH = saturate( dot( normal, halfDir ) ); + float dotVH = saturate( dot( viewDir, halfDir ) ); + vec3 F = F_Schlick( f0, f90, dotVH ); + #ifdef USE_IRIDESCENCE + F = mix( F, material.iridescenceFresnel, material.iridescence ); + #endif + #ifdef USE_ANISOTROPY + float dotTL = dot( material.anisotropyT, lightDir ); + float dotTV = dot( material.anisotropyT, viewDir ); + float dotTH = dot( material.anisotropyT, halfDir ); + float dotBL = dot( material.anisotropyB, lightDir ); + float dotBV = dot( material.anisotropyB, viewDir ); + float dotBH = dot( material.anisotropyB, halfDir ); + float V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL ); + float D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH ); + #else + float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV ); + float D = D_GGX( alpha, dotNH ); + #endif + return F * ( V * D ); +} +vec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) { + const float LUT_SIZE = 64.0; + const float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE; + const float LUT_BIAS = 0.5 / LUT_SIZE; + float dotNV = saturate( dot( N, V ) ); + vec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) ); + uv = uv * LUT_SCALE + LUT_BIAS; + return uv; +} +float LTC_ClippedSphereFormFactor( const in vec3 f ) { + float l = length( f ); + return max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 ); +} +vec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) { + float x = dot( v1, v2 ); + float y = abs( x ); + float a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y; + float b = 3.4175940 + ( 4.1616724 + y ) * y; + float v = a / b; + float theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v; + return cross( v1, v2 ) * theta_sintheta; +} +vec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) { + vec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ]; + vec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ]; + vec3 lightNormal = cross( v1, v2 ); + if( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 ); + vec3 T1, T2; + T1 = normalize( V - N * dot( V, N ) ); + T2 = - cross( N, T1 ); + mat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) ); + vec3 coords[ 4 ]; + coords[ 0 ] = mat * ( rectCoords[ 0 ] - P ); + coords[ 1 ] = mat * ( rectCoords[ 1 ] - P ); + coords[ 2 ] = mat * ( rectCoords[ 2 ] - P ); + coords[ 3 ] = mat * ( rectCoords[ 3 ] - P ); + coords[ 0 ] = normalize( coords[ 0 ] ); + coords[ 1 ] = normalize( coords[ 1 ] ); + coords[ 2 ] = normalize( coords[ 2 ] ); + coords[ 3 ] = normalize( coords[ 3 ] ); + vec3 vectorFormFactor = vec3( 0.0 ); + vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] ); + vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] ); + vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] ); + vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] ); + float result = LTC_ClippedSphereFormFactor( vectorFormFactor ); + return vec3( result ); +} +#if defined( USE_SHEEN ) +float D_Charlie( float roughness, float dotNH ) { + float alpha = pow2( roughness ); + float invAlpha = 1.0 / alpha; + float cos2h = dotNH * dotNH; + float sin2h = max( 1.0 - cos2h, 0.0078125 ); + return ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI ); +} +float V_Neubelt( float dotNV, float dotNL ) { + return saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) ); +} +vec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) { + vec3 halfDir = normalize( lightDir + viewDir ); + float dotNL = saturate( dot( normal, lightDir ) ); + float dotNV = saturate( dot( normal, viewDir ) ); + float dotNH = saturate( dot( normal, halfDir ) ); + float D = D_Charlie( sheenRoughness, dotNH ); + float V = V_Neubelt( dotNV, dotNL ); + return sheenColor * ( D * V ); +} +#endif +float IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) { + float dotNV = saturate( dot( normal, viewDir ) ); + float r2 = roughness * roughness; + float a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95; + float b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72; + float DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) ); + return saturate( DG * RECIPROCAL_PI ); +} +vec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) { + float dotNV = saturate( dot( normal, viewDir ) ); + const vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 ); + const vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 ); + vec4 r = roughness * c0 + c1; + float a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y; + vec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw; + return fab; +} +vec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) { + vec2 fab = DFGApprox( normal, viewDir, roughness ); + return specularColor * fab.x + specularF90 * fab.y; +} +#ifdef USE_IRIDESCENCE +void computeMultiscatteringIridescence( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float iridescence, const in vec3 iridescenceF0, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) { +#else +void computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) { +#endif + vec2 fab = DFGApprox( normal, viewDir, roughness ); + #ifdef USE_IRIDESCENCE + vec3 Fr = mix( specularColor, iridescenceF0, iridescence ); + #else + vec3 Fr = specularColor; + #endif + vec3 FssEss = Fr * fab.x + specularF90 * fab.y; + float Ess = fab.x + fab.y; + float Ems = 1.0 - Ess; + vec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619; vec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg ); + singleScatter += FssEss; + multiScatter += Fms * Ems; +} +#if NUM_RECT_AREA_LIGHTS > 0 + void RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { + vec3 normal = geometryNormal; + vec3 viewDir = geometryViewDir; + vec3 position = geometryPosition; + vec3 lightPos = rectAreaLight.position; + vec3 halfWidth = rectAreaLight.halfWidth; + vec3 halfHeight = rectAreaLight.halfHeight; + vec3 lightColor = rectAreaLight.color; + float roughness = material.roughness; + vec3 rectCoords[ 4 ]; + rectCoords[ 0 ] = lightPos + halfWidth - halfHeight; rectCoords[ 1 ] = lightPos - halfWidth - halfHeight; + rectCoords[ 2 ] = lightPos - halfWidth + halfHeight; + rectCoords[ 3 ] = lightPos + halfWidth + halfHeight; + vec2 uv = LTC_Uv( normal, viewDir, roughness ); + vec4 t1 = texture2D( ltc_1, uv ); + vec4 t2 = texture2D( ltc_2, uv ); + mat3 mInv = mat3( + vec3( t1.x, 0, t1.y ), + vec3( 0, 1, 0 ), + vec3( t1.z, 0, t1.w ) + ); + vec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y ); + reflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords ); + reflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords ); + } +#endif +void RE_Direct_Physical( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { + float dotNL = saturate( dot( geometryNormal, directLight.direction ) ); + vec3 irradiance = dotNL * directLight.color; + #ifdef USE_CLEARCOAT + float dotNLcc = saturate( dot( geometryClearcoatNormal, directLight.direction ) ); + vec3 ccIrradiance = dotNLcc * directLight.color; + clearcoatSpecularDirect += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometryViewDir, geometryClearcoatNormal, material ); + #endif + #ifdef USE_SHEEN + sheenSpecularDirect += irradiance * BRDF_Sheen( directLight.direction, geometryViewDir, geometryNormal, material.sheenColor, material.sheenRoughness ); + #endif + reflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometryViewDir, geometryNormal, material ); + reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); +} +void RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { + reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); +} +void RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) { + #ifdef USE_CLEARCOAT + clearcoatSpecularIndirect += clearcoatRadiance * EnvironmentBRDF( geometryClearcoatNormal, geometryViewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness ); + #endif + #ifdef USE_SHEEN + sheenSpecularIndirect += irradiance * material.sheenColor * IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness ); + #endif + vec3 singleScattering = vec3( 0.0 ); + vec3 multiScattering = vec3( 0.0 ); + vec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI; + #ifdef USE_IRIDESCENCE + computeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering ); + #else + computeMultiscattering( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering ); + #endif + vec3 totalScattering = singleScattering + multiScattering; + vec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) ); + reflectedLight.indirectSpecular += radiance * singleScattering; + reflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance; + reflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance; +} +#define RE_Direct RE_Direct_Physical +#define RE_Direct_RectArea RE_Direct_RectArea_Physical +#define RE_IndirectDiffuse RE_IndirectDiffuse_Physical +#define RE_IndirectSpecular RE_IndirectSpecular_Physical +float computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) { + return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion ); +}`,oT=` +vec3 geometryPosition = - vViewPosition; +vec3 geometryNormal = normal; +vec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition ); +vec3 geometryClearcoatNormal = vec3( 0.0 ); +#ifdef USE_CLEARCOAT + geometryClearcoatNormal = clearcoatNormal; +#endif +#ifdef USE_IRIDESCENCE + float dotNVi = saturate( dot( normal, geometryViewDir ) ); + if ( material.iridescenceThickness == 0.0 ) { + material.iridescence = 0.0; + } else { + material.iridescence = saturate( material.iridescence ); + } + if ( material.iridescence > 0.0 ) { + material.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor ); + material.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi ); + } +#endif +IncidentLight directLight; +#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct ) + PointLight pointLight; + #if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0 + PointLightShadow pointLightShadow; + #endif + #pragma unroll_loop_start + for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) { + pointLight = pointLights[ i ]; + getPointLightInfo( pointLight, geometryPosition, directLight ); + #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS ) + pointLightShadow = pointLightShadows[ i ]; + directLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowIntensity, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0; + #endif + RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); + } + #pragma unroll_loop_end +#endif +#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct ) + SpotLight spotLight; + vec4 spotColor; + vec3 spotLightCoord; + bool inSpotLightMap; + #if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0 + SpotLightShadow spotLightShadow; + #endif + #pragma unroll_loop_start + for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) { + spotLight = spotLights[ i ]; + getSpotLightInfo( spotLight, geometryPosition, directLight ); + #if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS ) + #define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX + #elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) + #define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS + #else + #define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS ) + #endif + #if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS ) + spotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w; + inSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) ); + spotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy ); + directLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color; + #endif + #undef SPOT_LIGHT_MAP_INDEX + #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) + spotLightShadow = spotLightShadows[ i ]; + directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowIntensity, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0; + #endif + RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); + } + #pragma unroll_loop_end +#endif +#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct ) + DirectionalLight directionalLight; + #if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0 + DirectionalLightShadow directionalLightShadow; + #endif + #pragma unroll_loop_start + for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) { + directionalLight = directionalLights[ i ]; + getDirectionalLightInfo( directionalLight, directLight ); + #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS ) + directionalLightShadow = directionalLightShadows[ i ]; + directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowIntensity, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0; + #endif + RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); + } + #pragma unroll_loop_end +#endif +#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea ) + RectAreaLight rectAreaLight; + #pragma unroll_loop_start + for ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) { + rectAreaLight = rectAreaLights[ i ]; + RE_Direct_RectArea( rectAreaLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); + } + #pragma unroll_loop_end +#endif +#if defined( RE_IndirectDiffuse ) + vec3 iblIrradiance = vec3( 0.0 ); + vec3 irradiance = getAmbientLightIrradiance( ambientLightColor ); + #if defined( USE_LIGHT_PROBES ) + irradiance += getLightProbeIrradiance( lightProbe, geometryNormal ); + #endif + #if ( NUM_HEMI_LIGHTS > 0 ) + #pragma unroll_loop_start + for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) { + irradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometryNormal ); + } + #pragma unroll_loop_end + #endif +#endif +#if defined( RE_IndirectSpecular ) + vec3 radiance = vec3( 0.0 ); + vec3 clearcoatRadiance = vec3( 0.0 ); +#endif`,lT=`#if defined( RE_IndirectDiffuse ) + #ifdef USE_LIGHTMAP + vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); + vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity; + irradiance += lightMapIrradiance; + #endif + #if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV ) + iblIrradiance += getIBLIrradiance( geometryNormal ); + #endif +#endif +#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular ) + #ifdef USE_ANISOTROPY + radiance += getIBLAnisotropyRadiance( geometryViewDir, geometryNormal, material.roughness, material.anisotropyB, material.anisotropy ); + #else + radiance += getIBLRadiance( geometryViewDir, geometryNormal, material.roughness ); + #endif + #ifdef USE_CLEARCOAT + clearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness ); + #endif +#endif`,cT=`#if defined( RE_IndirectDiffuse ) + RE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); +#endif +#if defined( RE_IndirectSpecular ) + RE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); +#endif`,uT=`#if defined( USE_LOGDEPTHBUF ) + gl_FragDepth = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5; +#endif`,hT=`#if defined( USE_LOGDEPTHBUF ) + uniform float logDepthBufFC; + varying float vFragDepth; + varying float vIsPerspective; +#endif`,fT=`#ifdef USE_LOGDEPTHBUF + varying float vFragDepth; + varying float vIsPerspective; +#endif`,dT=`#ifdef USE_LOGDEPTHBUF + vFragDepth = 1.0 + gl_Position.w; + vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) ); +#endif`,pT=`#ifdef USE_MAP + vec4 sampledDiffuseColor = texture2D( map, vMapUv ); + #ifdef DECODE_VIDEO_TEXTURE + sampledDiffuseColor = sRGBTransferEOTF( sampledDiffuseColor ); + #endif + diffuseColor *= sampledDiffuseColor; +#endif`,mT=`#ifdef USE_MAP + uniform sampler2D map; +#endif`,gT=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) + #if defined( USE_POINTS_UV ) + vec2 uv = vUv; + #else + vec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy; + #endif +#endif +#ifdef USE_MAP + diffuseColor *= texture2D( map, uv ); +#endif +#ifdef USE_ALPHAMAP + diffuseColor.a *= texture2D( alphaMap, uv ).g; +#endif`,vT=`#if defined( USE_POINTS_UV ) + varying vec2 vUv; +#else + #if defined( USE_MAP ) || defined( USE_ALPHAMAP ) + uniform mat3 uvTransform; + #endif +#endif +#ifdef USE_MAP + uniform sampler2D map; +#endif +#ifdef USE_ALPHAMAP + uniform sampler2D alphaMap; +#endif`,_T=`float metalnessFactor = metalness; +#ifdef USE_METALNESSMAP + vec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv ); + metalnessFactor *= texelMetalness.b; +#endif`,yT=`#ifdef USE_METALNESSMAP + uniform sampler2D metalnessMap; +#endif`,xT=`#ifdef USE_INSTANCING_MORPH + float morphTargetInfluences[ MORPHTARGETS_COUNT ]; + float morphTargetBaseInfluence = texelFetch( morphTexture, ivec2( 0, gl_InstanceID ), 0 ).r; + for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { + morphTargetInfluences[i] = texelFetch( morphTexture, ivec2( i + 1, gl_InstanceID ), 0 ).r; + } +#endif`,ST=`#if defined( USE_MORPHCOLORS ) + vColor *= morphTargetBaseInfluence; + for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { + #if defined( USE_COLOR_ALPHA ) + if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ]; + #elif defined( USE_COLOR ) + if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ]; + #endif + } +#endif`,MT=`#ifdef USE_MORPHNORMALS + objectNormal *= morphTargetBaseInfluence; + for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { + if ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ]; + } +#endif`,bT=`#ifdef USE_MORPHTARGETS + #ifndef USE_INSTANCING_MORPH + uniform float morphTargetBaseInfluence; + uniform float morphTargetInfluences[ MORPHTARGETS_COUNT ]; + #endif + uniform sampler2DArray morphTargetsTexture; + uniform ivec2 morphTargetsTextureSize; + vec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) { + int texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset; + int y = texelIndex / morphTargetsTextureSize.x; + int x = texelIndex - y * morphTargetsTextureSize.x; + ivec3 morphUV = ivec3( x, y, morphTargetIndex ); + return texelFetch( morphTargetsTexture, morphUV, 0 ); + } +#endif`,ET=`#ifdef USE_MORPHTARGETS + transformed *= morphTargetBaseInfluence; + for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { + if ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ]; + } +#endif`,TT=`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0; +#ifdef FLAT_SHADED + vec3 fdx = dFdx( vViewPosition ); + vec3 fdy = dFdy( vViewPosition ); + vec3 normal = normalize( cross( fdx, fdy ) ); +#else + vec3 normal = normalize( vNormal ); + #ifdef DOUBLE_SIDED + normal *= faceDirection; + #endif +#endif +#if defined( USE_NORMALMAP_TANGENTSPACE ) || defined( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) + #ifdef USE_TANGENT + mat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal ); + #else + mat3 tbn = getTangentFrame( - vViewPosition, normal, + #if defined( USE_NORMALMAP ) + vNormalMapUv + #elif defined( USE_CLEARCOAT_NORMALMAP ) + vClearcoatNormalMapUv + #else + vUv + #endif + ); + #endif + #if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED ) + tbn[0] *= faceDirection; + tbn[1] *= faceDirection; + #endif +#endif +#ifdef USE_CLEARCOAT_NORMALMAP + #ifdef USE_TANGENT + mat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal ); + #else + mat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv ); + #endif + #if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED ) + tbn2[0] *= faceDirection; + tbn2[1] *= faceDirection; + #endif +#endif +vec3 nonPerturbedNormal = normal;`,AT=`#ifdef USE_NORMALMAP_OBJECTSPACE + normal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0; + #ifdef FLIP_SIDED + normal = - normal; + #endif + #ifdef DOUBLE_SIDED + normal = normal * faceDirection; + #endif + normal = normalize( normalMatrix * normal ); +#elif defined( USE_NORMALMAP_TANGENTSPACE ) + vec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0; + mapN.xy *= normalScale; + normal = normalize( tbn * mapN ); +#elif defined( USE_BUMPMAP ) + normal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection ); +#endif`,CT=`#ifndef FLAT_SHADED + varying vec3 vNormal; + #ifdef USE_TANGENT + varying vec3 vTangent; + varying vec3 vBitangent; + #endif +#endif`,wT=`#ifndef FLAT_SHADED + varying vec3 vNormal; + #ifdef USE_TANGENT + varying vec3 vTangent; + varying vec3 vBitangent; + #endif +#endif`,RT=`#ifndef FLAT_SHADED + vNormal = normalize( transformedNormal ); + #ifdef USE_TANGENT + vTangent = normalize( transformedTangent ); + vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w ); + #endif +#endif`,DT=`#ifdef USE_NORMALMAP + uniform sampler2D normalMap; + uniform vec2 normalScale; +#endif +#ifdef USE_NORMALMAP_OBJECTSPACE + uniform mat3 normalMatrix; +#endif +#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) ) + mat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) { + vec3 q0 = dFdx( eye_pos.xyz ); + vec3 q1 = dFdy( eye_pos.xyz ); + vec2 st0 = dFdx( uv.st ); + vec2 st1 = dFdy( uv.st ); + vec3 N = surf_norm; + vec3 q1perp = cross( q1, N ); + vec3 q0perp = cross( N, q0 ); + vec3 T = q1perp * st0.x + q0perp * st1.x; + vec3 B = q1perp * st0.y + q0perp * st1.y; + float det = max( dot( T, T ), dot( B, B ) ); + float scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det ); + return mat3( T * scale, B * scale, N ); + } +#endif`,UT=`#ifdef USE_CLEARCOAT + vec3 clearcoatNormal = nonPerturbedNormal; +#endif`,NT=`#ifdef USE_CLEARCOAT_NORMALMAP + vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0; + clearcoatMapN.xy *= clearcoatNormalScale; + clearcoatNormal = normalize( tbn2 * clearcoatMapN ); +#endif`,LT=`#ifdef USE_CLEARCOATMAP + uniform sampler2D clearcoatMap; +#endif +#ifdef USE_CLEARCOAT_NORMALMAP + uniform sampler2D clearcoatNormalMap; + uniform vec2 clearcoatNormalScale; +#endif +#ifdef USE_CLEARCOAT_ROUGHNESSMAP + uniform sampler2D clearcoatRoughnessMap; +#endif`,PT=`#ifdef USE_IRIDESCENCEMAP + uniform sampler2D iridescenceMap; +#endif +#ifdef USE_IRIDESCENCE_THICKNESSMAP + uniform sampler2D iridescenceThicknessMap; +#endif`,IT=`#ifdef OPAQUE +diffuseColor.a = 1.0; +#endif +#ifdef USE_TRANSMISSION +diffuseColor.a *= material.transmissionAlpha; +#endif +gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,OT=`vec3 packNormalToRGB( const in vec3 normal ) { + return normalize( normal ) * 0.5 + 0.5; +} +vec3 unpackRGBToNormal( const in vec3 rgb ) { + return 2.0 * rgb.xyz - 1.0; +} +const float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;const float ShiftRight8 = 1. / 256.; +const float Inv255 = 1. / 255.; +const vec4 PackFactors = vec4( 1.0, 256.0, 256.0 * 256.0, 256.0 * 256.0 * 256.0 ); +const vec2 UnpackFactors2 = vec2( UnpackDownscale, 1.0 / PackFactors.g ); +const vec3 UnpackFactors3 = vec3( UnpackDownscale / PackFactors.rg, 1.0 / PackFactors.b ); +const vec4 UnpackFactors4 = vec4( UnpackDownscale / PackFactors.rgb, 1.0 / PackFactors.a ); +vec4 packDepthToRGBA( const in float v ) { + if( v <= 0.0 ) + return vec4( 0., 0., 0., 0. ); + if( v >= 1.0 ) + return vec4( 1., 1., 1., 1. ); + float vuf; + float af = modf( v * PackFactors.a, vuf ); + float bf = modf( vuf * ShiftRight8, vuf ); + float gf = modf( vuf * ShiftRight8, vuf ); + return vec4( vuf * Inv255, gf * PackUpscale, bf * PackUpscale, af ); +} +vec3 packDepthToRGB( const in float v ) { + if( v <= 0.0 ) + return vec3( 0., 0., 0. ); + if( v >= 1.0 ) + return vec3( 1., 1., 1. ); + float vuf; + float bf = modf( v * PackFactors.b, vuf ); + float gf = modf( vuf * ShiftRight8, vuf ); + return vec3( vuf * Inv255, gf * PackUpscale, bf ); +} +vec2 packDepthToRG( const in float v ) { + if( v <= 0.0 ) + return vec2( 0., 0. ); + if( v >= 1.0 ) + return vec2( 1., 1. ); + float vuf; + float gf = modf( v * 256., vuf ); + return vec2( vuf * Inv255, gf ); +} +float unpackRGBAToDepth( const in vec4 v ) { + return dot( v, UnpackFactors4 ); +} +float unpackRGBToDepth( const in vec3 v ) { + return dot( v, UnpackFactors3 ); +} +float unpackRGToDepth( const in vec2 v ) { + return v.r * UnpackFactors2.r + v.g * UnpackFactors2.g; +} +vec4 pack2HalfToRGBA( const in vec2 v ) { + vec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) ); + return vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w ); +} +vec2 unpackRGBATo2Half( const in vec4 v ) { + return vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) ); +} +float viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) { + return ( viewZ + near ) / ( near - far ); +} +float orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) { + return depth * ( near - far ) - near; +} +float viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) { + return ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ ); +} +float perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) { + return ( near * far ) / ( ( far - near ) * depth - far ); +}`,BT=`#ifdef PREMULTIPLIED_ALPHA + gl_FragColor.rgb *= gl_FragColor.a; +#endif`,zT=`vec4 mvPosition = vec4( transformed, 1.0 ); +#ifdef USE_BATCHING + mvPosition = batchingMatrix * mvPosition; +#endif +#ifdef USE_INSTANCING + mvPosition = instanceMatrix * mvPosition; +#endif +mvPosition = modelViewMatrix * mvPosition; +gl_Position = projectionMatrix * mvPosition;`,FT=`#ifdef DITHERING + gl_FragColor.rgb = dithering( gl_FragColor.rgb ); +#endif`,HT=`#ifdef DITHERING + vec3 dithering( vec3 color ) { + float grid_position = rand( gl_FragCoord.xy ); + vec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 ); + dither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position ); + return color + dither_shift_RGB; + } +#endif`,VT=`float roughnessFactor = roughness; +#ifdef USE_ROUGHNESSMAP + vec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv ); + roughnessFactor *= texelRoughness.g; +#endif`,GT=`#ifdef USE_ROUGHNESSMAP + uniform sampler2D roughnessMap; +#endif`,kT=`#if NUM_SPOT_LIGHT_COORDS > 0 + varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; +#endif +#if NUM_SPOT_LIGHT_MAPS > 0 + uniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ]; +#endif +#ifdef USE_SHADOWMAP + #if NUM_DIR_LIGHT_SHADOWS > 0 + uniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ]; + varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ]; + struct DirectionalLightShadow { + float shadowIntensity; + float shadowBias; + float shadowNormalBias; + float shadowRadius; + vec2 shadowMapSize; + }; + uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ]; + #endif + #if NUM_SPOT_LIGHT_SHADOWS > 0 + uniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ]; + struct SpotLightShadow { + float shadowIntensity; + float shadowBias; + float shadowNormalBias; + float shadowRadius; + vec2 shadowMapSize; + }; + uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ]; + #endif + #if NUM_POINT_LIGHT_SHADOWS > 0 + uniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ]; + varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ]; + struct PointLightShadow { + float shadowIntensity; + float shadowBias; + float shadowNormalBias; + float shadowRadius; + vec2 shadowMapSize; + float shadowCameraNear; + float shadowCameraFar; + }; + uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; + #endif + float texture2DCompare( sampler2D depths, vec2 uv, float compare ) { + return step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) ); + } + vec2 texture2DDistribution( sampler2D shadow, vec2 uv ) { + return unpackRGBATo2Half( texture2D( shadow, uv ) ); + } + float VSMShadow (sampler2D shadow, vec2 uv, float compare ){ + float occlusion = 1.0; + vec2 distribution = texture2DDistribution( shadow, uv ); + float hard_shadow = step( compare , distribution.x ); + if (hard_shadow != 1.0 ) { + float distance = compare - distribution.x ; + float variance = max( 0.00000, distribution.y * distribution.y ); + float softness_probability = variance / (variance + distance * distance ); softness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 ); occlusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 ); + } + return occlusion; + } + float getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord ) { + float shadow = 1.0; + shadowCoord.xyz /= shadowCoord.w; + shadowCoord.z += shadowBias; + bool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0; + bool frustumTest = inFrustum && shadowCoord.z <= 1.0; + if ( frustumTest ) { + #if defined( SHADOWMAP_TYPE_PCF ) + vec2 texelSize = vec2( 1.0 ) / shadowMapSize; + float dx0 = - texelSize.x * shadowRadius; + float dy0 = - texelSize.y * shadowRadius; + float dx1 = + texelSize.x * shadowRadius; + float dy1 = + texelSize.y * shadowRadius; + float dx2 = dx0 / 2.0; + float dy2 = dy0 / 2.0; + float dx3 = dx1 / 2.0; + float dy3 = dy1 / 2.0; + shadow = ( + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z ) + ) * ( 1.0 / 17.0 ); + #elif defined( SHADOWMAP_TYPE_PCF_SOFT ) + vec2 texelSize = vec2( 1.0 ) / shadowMapSize; + float dx = texelSize.x; + float dy = texelSize.y; + vec2 uv = shadowCoord.xy; + vec2 f = fract( uv * shadowMapSize + 0.5 ); + uv -= f * texelSize; + shadow = ( + texture2DCompare( shadowMap, uv, shadowCoord.z ) + + texture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) + + texture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) + + mix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ), + texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ), + f.x ) + + mix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ), + texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ), + f.x ) + + mix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ), + texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ), + f.y ) + + mix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ), + texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ), + f.y ) + + mix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ), + texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ), + f.x ), + mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ), + texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ), + f.x ), + f.y ) + ) * ( 1.0 / 9.0 ); + #elif defined( SHADOWMAP_TYPE_VSM ) + shadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z ); + #else + shadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ); + #endif + } + return mix( 1.0, shadow, shadowIntensity ); + } + vec2 cubeToUV( vec3 v, float texelSizeY ) { + vec3 absV = abs( v ); + float scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) ); + absV *= scaleToCube; + v *= scaleToCube * ( 1.0 - 2.0 * texelSizeY ); + vec2 planar = v.xy; + float almostATexel = 1.5 * texelSizeY; + float almostOne = 1.0 - almostATexel; + if ( absV.z >= almostOne ) { + if ( v.z > 0.0 ) + planar.x = 4.0 - v.x; + } else if ( absV.x >= almostOne ) { + float signX = sign( v.x ); + planar.x = v.z * signX + 2.0 * signX; + } else if ( absV.y >= almostOne ) { + float signY = sign( v.y ); + planar.x = v.x + 2.0 * signY + 2.0; + planar.y = v.z * signY - 2.0; + } + return vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 ); + } + float getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) { + float shadow = 1.0; + vec3 lightToPosition = shadowCoord.xyz; + + float lightToPositionLength = length( lightToPosition ); + if ( lightToPositionLength - shadowCameraFar <= 0.0 && lightToPositionLength - shadowCameraNear >= 0.0 ) { + float dp = ( lightToPositionLength - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear ); dp += shadowBias; + vec3 bd3D = normalize( lightToPosition ); + vec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) ); + #if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM ) + vec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y; + shadow = ( + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp ) + ) * ( 1.0 / 9.0 ); + #else + shadow = texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ); + #endif + } + return mix( 1.0, shadow, shadowIntensity ); + } +#endif`,WT=`#if NUM_SPOT_LIGHT_COORDS > 0 + uniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ]; + varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; +#endif +#ifdef USE_SHADOWMAP + #if NUM_DIR_LIGHT_SHADOWS > 0 + uniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ]; + varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ]; + struct DirectionalLightShadow { + float shadowIntensity; + float shadowBias; + float shadowNormalBias; + float shadowRadius; + vec2 shadowMapSize; + }; + uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ]; + #endif + #if NUM_SPOT_LIGHT_SHADOWS > 0 + struct SpotLightShadow { + float shadowIntensity; + float shadowBias; + float shadowNormalBias; + float shadowRadius; + vec2 shadowMapSize; + }; + uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ]; + #endif + #if NUM_POINT_LIGHT_SHADOWS > 0 + uniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ]; + varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ]; + struct PointLightShadow { + float shadowIntensity; + float shadowBias; + float shadowNormalBias; + float shadowRadius; + vec2 shadowMapSize; + float shadowCameraNear; + float shadowCameraFar; + }; + uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; + #endif +#endif`,XT=`#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 ) + vec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); + vec4 shadowWorldPosition; +#endif +#if defined( USE_SHADOWMAP ) + #if NUM_DIR_LIGHT_SHADOWS > 0 + #pragma unroll_loop_start + for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) { + shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 ); + vDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition; + } + #pragma unroll_loop_end + #endif + #if NUM_POINT_LIGHT_SHADOWS > 0 + #pragma unroll_loop_start + for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) { + shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 ); + vPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition; + } + #pragma unroll_loop_end + #endif +#endif +#if NUM_SPOT_LIGHT_COORDS > 0 + #pragma unroll_loop_start + for ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) { + shadowWorldPosition = worldPosition; + #if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) + shadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias; + #endif + vSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition; + } + #pragma unroll_loop_end +#endif`,qT=`float getShadowMask() { + float shadow = 1.0; + #ifdef USE_SHADOWMAP + #if NUM_DIR_LIGHT_SHADOWS > 0 + DirectionalLightShadow directionalLight; + #pragma unroll_loop_start + for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) { + directionalLight = directionalLightShadows[ i ]; + shadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowIntensity, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0; + } + #pragma unroll_loop_end + #endif + #if NUM_SPOT_LIGHT_SHADOWS > 0 + SpotLightShadow spotLight; + #pragma unroll_loop_start + for ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) { + spotLight = spotLightShadows[ i ]; + shadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowIntensity, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0; + } + #pragma unroll_loop_end + #endif + #if NUM_POINT_LIGHT_SHADOWS > 0 + PointLightShadow pointLight; + #pragma unroll_loop_start + for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) { + pointLight = pointLightShadows[ i ]; + shadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowIntensity, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0; + } + #pragma unroll_loop_end + #endif + #endif + return shadow; +}`,YT=`#ifdef USE_SKINNING + mat4 boneMatX = getBoneMatrix( skinIndex.x ); + mat4 boneMatY = getBoneMatrix( skinIndex.y ); + mat4 boneMatZ = getBoneMatrix( skinIndex.z ); + mat4 boneMatW = getBoneMatrix( skinIndex.w ); +#endif`,ZT=`#ifdef USE_SKINNING + uniform mat4 bindMatrix; + uniform mat4 bindMatrixInverse; + uniform highp sampler2D boneTexture; + mat4 getBoneMatrix( const in float i ) { + int size = textureSize( boneTexture, 0 ).x; + int j = int( i ) * 4; + int x = j % size; + int y = j / size; + vec4 v1 = texelFetch( boneTexture, ivec2( x, y ), 0 ); + vec4 v2 = texelFetch( boneTexture, ivec2( x + 1, y ), 0 ); + vec4 v3 = texelFetch( boneTexture, ivec2( x + 2, y ), 0 ); + vec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 ); + return mat4( v1, v2, v3, v4 ); + } +#endif`,KT=`#ifdef USE_SKINNING + vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 ); + vec4 skinned = vec4( 0.0 ); + skinned += boneMatX * skinVertex * skinWeight.x; + skinned += boneMatY * skinVertex * skinWeight.y; + skinned += boneMatZ * skinVertex * skinWeight.z; + skinned += boneMatW * skinVertex * skinWeight.w; + transformed = ( bindMatrixInverse * skinned ).xyz; +#endif`,jT=`#ifdef USE_SKINNING + mat4 skinMatrix = mat4( 0.0 ); + skinMatrix += skinWeight.x * boneMatX; + skinMatrix += skinWeight.y * boneMatY; + skinMatrix += skinWeight.z * boneMatZ; + skinMatrix += skinWeight.w * boneMatW; + skinMatrix = bindMatrixInverse * skinMatrix * bindMatrix; + objectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz; + #ifdef USE_TANGENT + objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz; + #endif +#endif`,JT=`float specularStrength; +#ifdef USE_SPECULARMAP + vec4 texelSpecular = texture2D( specularMap, vSpecularMapUv ); + specularStrength = texelSpecular.r; +#else + specularStrength = 1.0; +#endif`,QT=`#ifdef USE_SPECULARMAP + uniform sampler2D specularMap; +#endif`,$T=`#if defined( TONE_MAPPING ) + gl_FragColor.rgb = toneMapping( gl_FragColor.rgb ); +#endif`,tA=`#ifndef saturate +#define saturate( a ) clamp( a, 0.0, 1.0 ) +#endif +uniform float toneMappingExposure; +vec3 LinearToneMapping( vec3 color ) { + return saturate( toneMappingExposure * color ); +} +vec3 ReinhardToneMapping( vec3 color ) { + color *= toneMappingExposure; + return saturate( color / ( vec3( 1.0 ) + color ) ); +} +vec3 CineonToneMapping( vec3 color ) { + color *= toneMappingExposure; + color = max( vec3( 0.0 ), color - 0.004 ); + return pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) ); +} +vec3 RRTAndODTFit( vec3 v ) { + vec3 a = v * ( v + 0.0245786 ) - 0.000090537; + vec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081; + return a / b; +} +vec3 ACESFilmicToneMapping( vec3 color ) { + const mat3 ACESInputMat = mat3( + vec3( 0.59719, 0.07600, 0.02840 ), vec3( 0.35458, 0.90834, 0.13383 ), + vec3( 0.04823, 0.01566, 0.83777 ) + ); + const mat3 ACESOutputMat = mat3( + vec3( 1.60475, -0.10208, -0.00327 ), vec3( -0.53108, 1.10813, -0.07276 ), + vec3( -0.07367, -0.00605, 1.07602 ) + ); + color *= toneMappingExposure / 0.6; + color = ACESInputMat * color; + color = RRTAndODTFit( color ); + color = ACESOutputMat * color; + return saturate( color ); +} +const mat3 LINEAR_REC2020_TO_LINEAR_SRGB = mat3( + vec3( 1.6605, - 0.1246, - 0.0182 ), + vec3( - 0.5876, 1.1329, - 0.1006 ), + vec3( - 0.0728, - 0.0083, 1.1187 ) +); +const mat3 LINEAR_SRGB_TO_LINEAR_REC2020 = mat3( + vec3( 0.6274, 0.0691, 0.0164 ), + vec3( 0.3293, 0.9195, 0.0880 ), + vec3( 0.0433, 0.0113, 0.8956 ) +); +vec3 agxDefaultContrastApprox( vec3 x ) { + vec3 x2 = x * x; + vec3 x4 = x2 * x2; + return + 15.5 * x4 * x2 + - 40.14 * x4 * x + + 31.96 * x4 + - 6.868 * x2 * x + + 0.4298 * x2 + + 0.1191 * x + - 0.00232; +} +vec3 AgXToneMapping( vec3 color ) { + const mat3 AgXInsetMatrix = mat3( + vec3( 0.856627153315983, 0.137318972929847, 0.11189821299995 ), + vec3( 0.0951212405381588, 0.761241990602591, 0.0767994186031903 ), + vec3( 0.0482516061458583, 0.101439036467562, 0.811302368396859 ) + ); + const mat3 AgXOutsetMatrix = mat3( + vec3( 1.1271005818144368, - 0.1413297634984383, - 0.14132976349843826 ), + vec3( - 0.11060664309660323, 1.157823702216272, - 0.11060664309660294 ), + vec3( - 0.016493938717834573, - 0.016493938717834257, 1.2519364065950405 ) + ); + const float AgxMinEv = - 12.47393; const float AgxMaxEv = 4.026069; + color *= toneMappingExposure; + color = LINEAR_SRGB_TO_LINEAR_REC2020 * color; + color = AgXInsetMatrix * color; + color = max( color, 1e-10 ); color = log2( color ); + color = ( color - AgxMinEv ) / ( AgxMaxEv - AgxMinEv ); + color = clamp( color, 0.0, 1.0 ); + color = agxDefaultContrastApprox( color ); + color = AgXOutsetMatrix * color; + color = pow( max( vec3( 0.0 ), color ), vec3( 2.2 ) ); + color = LINEAR_REC2020_TO_LINEAR_SRGB * color; + color = clamp( color, 0.0, 1.0 ); + return color; +} +vec3 NeutralToneMapping( vec3 color ) { + const float StartCompression = 0.8 - 0.04; + const float Desaturation = 0.15; + color *= toneMappingExposure; + float x = min( color.r, min( color.g, color.b ) ); + float offset = x < 0.08 ? x - 6.25 * x * x : 0.04; + color -= offset; + float peak = max( color.r, max( color.g, color.b ) ); + if ( peak < StartCompression ) return color; + float d = 1. - StartCompression; + float newPeak = 1. - d * d / ( peak + d - StartCompression ); + color *= newPeak / peak; + float g = 1. - 1. / ( Desaturation * ( peak - newPeak ) + 1. ); + return mix( color, vec3( newPeak ), g ); +} +vec3 CustomToneMapping( vec3 color ) { return color; }`,eA=`#ifdef USE_TRANSMISSION + material.transmission = transmission; + material.transmissionAlpha = 1.0; + material.thickness = thickness; + material.attenuationDistance = attenuationDistance; + material.attenuationColor = attenuationColor; + #ifdef USE_TRANSMISSIONMAP + material.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r; + #endif + #ifdef USE_THICKNESSMAP + material.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g; + #endif + vec3 pos = vWorldPosition; + vec3 v = normalize( cameraPosition - pos ); + vec3 n = inverseTransformDirection( normal, viewMatrix ); + vec4 transmitted = getIBLVolumeRefraction( + n, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90, + pos, modelMatrix, viewMatrix, projectionMatrix, material.dispersion, material.ior, material.thickness, + material.attenuationColor, material.attenuationDistance ); + material.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission ); + totalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission ); +#endif`,nA=`#ifdef USE_TRANSMISSION + uniform float transmission; + uniform float thickness; + uniform float attenuationDistance; + uniform vec3 attenuationColor; + #ifdef USE_TRANSMISSIONMAP + uniform sampler2D transmissionMap; + #endif + #ifdef USE_THICKNESSMAP + uniform sampler2D thicknessMap; + #endif + uniform vec2 transmissionSamplerSize; + uniform sampler2D transmissionSamplerMap; + uniform mat4 modelMatrix; + uniform mat4 projectionMatrix; + varying vec3 vWorldPosition; + float w0( float a ) { + return ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 ); + } + float w1( float a ) { + return ( 1.0 / 6.0 ) * ( a * a * ( 3.0 * a - 6.0 ) + 4.0 ); + } + float w2( float a ){ + return ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 ); + } + float w3( float a ) { + return ( 1.0 / 6.0 ) * ( a * a * a ); + } + float g0( float a ) { + return w0( a ) + w1( a ); + } + float g1( float a ) { + return w2( a ) + w3( a ); + } + float h0( float a ) { + return - 1.0 + w1( a ) / ( w0( a ) + w1( a ) ); + } + float h1( float a ) { + return 1.0 + w3( a ) / ( w2( a ) + w3( a ) ); + } + vec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) { + uv = uv * texelSize.zw + 0.5; + vec2 iuv = floor( uv ); + vec2 fuv = fract( uv ); + float g0x = g0( fuv.x ); + float g1x = g1( fuv.x ); + float h0x = h0( fuv.x ); + float h1x = h1( fuv.x ); + float h0y = h0( fuv.y ); + float h1y = h1( fuv.y ); + vec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy; + vec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy; + vec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy; + vec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy; + return g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) + + g1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) ); + } + vec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) { + vec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) ); + vec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) ); + vec2 fLodSizeInv = 1.0 / fLodSize; + vec2 cLodSizeInv = 1.0 / cLodSize; + vec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) ); + vec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) ); + return mix( fSample, cSample, fract( lod ) ); + } + vec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) { + vec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior ); + vec3 modelScale; + modelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) ); + modelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) ); + modelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) ); + return normalize( refractionVector ) * thickness * modelScale; + } + float applyIorToRoughness( const in float roughness, const in float ior ) { + return roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 ); + } + vec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) { + float lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior ); + return textureBicubic( transmissionSamplerMap, fragCoord.xy, lod ); + } + vec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) { + if ( isinf( attenuationDistance ) ) { + return vec3( 1.0 ); + } else { + vec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance; + vec3 transmittance = exp( - attenuationCoefficient * transmissionDistance ); return transmittance; + } + } + vec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor, + const in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix, + const in mat4 viewMatrix, const in mat4 projMatrix, const in float dispersion, const in float ior, const in float thickness, + const in vec3 attenuationColor, const in float attenuationDistance ) { + vec4 transmittedLight; + vec3 transmittance; + #ifdef USE_DISPERSION + float halfSpread = ( ior - 1.0 ) * 0.025 * dispersion; + vec3 iors = vec3( ior - halfSpread, ior, ior + halfSpread ); + for ( int i = 0; i < 3; i ++ ) { + vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, iors[ i ], modelMatrix ); + vec3 refractedRayExit = position + transmissionRay; + + vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 ); + vec2 refractionCoords = ndcPos.xy / ndcPos.w; + refractionCoords += 1.0; + refractionCoords /= 2.0; + + vec4 transmissionSample = getTransmissionSample( refractionCoords, roughness, iors[ i ] ); + transmittedLight[ i ] = transmissionSample[ i ]; + transmittedLight.a += transmissionSample.a; + transmittance[ i ] = diffuseColor[ i ] * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance )[ i ]; + } + transmittedLight.a /= 3.0; + + #else + + vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix ); + vec3 refractedRayExit = position + transmissionRay; + vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 ); + vec2 refractionCoords = ndcPos.xy / ndcPos.w; + refractionCoords += 1.0; + refractionCoords /= 2.0; + transmittedLight = getTransmissionSample( refractionCoords, roughness, ior ); + transmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance ); + + #endif + vec3 attenuatedColor = transmittance * transmittedLight.rgb; + vec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness ); + float transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0; + return vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor ); + } +#endif`,iA=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) + varying vec2 vUv; +#endif +#ifdef USE_MAP + varying vec2 vMapUv; +#endif +#ifdef USE_ALPHAMAP + varying vec2 vAlphaMapUv; +#endif +#ifdef USE_LIGHTMAP + varying vec2 vLightMapUv; +#endif +#ifdef USE_AOMAP + varying vec2 vAoMapUv; +#endif +#ifdef USE_BUMPMAP + varying vec2 vBumpMapUv; +#endif +#ifdef USE_NORMALMAP + varying vec2 vNormalMapUv; +#endif +#ifdef USE_EMISSIVEMAP + varying vec2 vEmissiveMapUv; +#endif +#ifdef USE_METALNESSMAP + varying vec2 vMetalnessMapUv; +#endif +#ifdef USE_ROUGHNESSMAP + varying vec2 vRoughnessMapUv; +#endif +#ifdef USE_ANISOTROPYMAP + varying vec2 vAnisotropyMapUv; +#endif +#ifdef USE_CLEARCOATMAP + varying vec2 vClearcoatMapUv; +#endif +#ifdef USE_CLEARCOAT_NORMALMAP + varying vec2 vClearcoatNormalMapUv; +#endif +#ifdef USE_CLEARCOAT_ROUGHNESSMAP + varying vec2 vClearcoatRoughnessMapUv; +#endif +#ifdef USE_IRIDESCENCEMAP + varying vec2 vIridescenceMapUv; +#endif +#ifdef USE_IRIDESCENCE_THICKNESSMAP + varying vec2 vIridescenceThicknessMapUv; +#endif +#ifdef USE_SHEEN_COLORMAP + varying vec2 vSheenColorMapUv; +#endif +#ifdef USE_SHEEN_ROUGHNESSMAP + varying vec2 vSheenRoughnessMapUv; +#endif +#ifdef USE_SPECULARMAP + varying vec2 vSpecularMapUv; +#endif +#ifdef USE_SPECULAR_COLORMAP + varying vec2 vSpecularColorMapUv; +#endif +#ifdef USE_SPECULAR_INTENSITYMAP + varying vec2 vSpecularIntensityMapUv; +#endif +#ifdef USE_TRANSMISSIONMAP + uniform mat3 transmissionMapTransform; + varying vec2 vTransmissionMapUv; +#endif +#ifdef USE_THICKNESSMAP + uniform mat3 thicknessMapTransform; + varying vec2 vThicknessMapUv; +#endif`,sA=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) + varying vec2 vUv; +#endif +#ifdef USE_MAP + uniform mat3 mapTransform; + varying vec2 vMapUv; +#endif +#ifdef USE_ALPHAMAP + uniform mat3 alphaMapTransform; + varying vec2 vAlphaMapUv; +#endif +#ifdef USE_LIGHTMAP + uniform mat3 lightMapTransform; + varying vec2 vLightMapUv; +#endif +#ifdef USE_AOMAP + uniform mat3 aoMapTransform; + varying vec2 vAoMapUv; +#endif +#ifdef USE_BUMPMAP + uniform mat3 bumpMapTransform; + varying vec2 vBumpMapUv; +#endif +#ifdef USE_NORMALMAP + uniform mat3 normalMapTransform; + varying vec2 vNormalMapUv; +#endif +#ifdef USE_DISPLACEMENTMAP + uniform mat3 displacementMapTransform; + varying vec2 vDisplacementMapUv; +#endif +#ifdef USE_EMISSIVEMAP + uniform mat3 emissiveMapTransform; + varying vec2 vEmissiveMapUv; +#endif +#ifdef USE_METALNESSMAP + uniform mat3 metalnessMapTransform; + varying vec2 vMetalnessMapUv; +#endif +#ifdef USE_ROUGHNESSMAP + uniform mat3 roughnessMapTransform; + varying vec2 vRoughnessMapUv; +#endif +#ifdef USE_ANISOTROPYMAP + uniform mat3 anisotropyMapTransform; + varying vec2 vAnisotropyMapUv; +#endif +#ifdef USE_CLEARCOATMAP + uniform mat3 clearcoatMapTransform; + varying vec2 vClearcoatMapUv; +#endif +#ifdef USE_CLEARCOAT_NORMALMAP + uniform mat3 clearcoatNormalMapTransform; + varying vec2 vClearcoatNormalMapUv; +#endif +#ifdef USE_CLEARCOAT_ROUGHNESSMAP + uniform mat3 clearcoatRoughnessMapTransform; + varying vec2 vClearcoatRoughnessMapUv; +#endif +#ifdef USE_SHEEN_COLORMAP + uniform mat3 sheenColorMapTransform; + varying vec2 vSheenColorMapUv; +#endif +#ifdef USE_SHEEN_ROUGHNESSMAP + uniform mat3 sheenRoughnessMapTransform; + varying vec2 vSheenRoughnessMapUv; +#endif +#ifdef USE_IRIDESCENCEMAP + uniform mat3 iridescenceMapTransform; + varying vec2 vIridescenceMapUv; +#endif +#ifdef USE_IRIDESCENCE_THICKNESSMAP + uniform mat3 iridescenceThicknessMapTransform; + varying vec2 vIridescenceThicknessMapUv; +#endif +#ifdef USE_SPECULARMAP + uniform mat3 specularMapTransform; + varying vec2 vSpecularMapUv; +#endif +#ifdef USE_SPECULAR_COLORMAP + uniform mat3 specularColorMapTransform; + varying vec2 vSpecularColorMapUv; +#endif +#ifdef USE_SPECULAR_INTENSITYMAP + uniform mat3 specularIntensityMapTransform; + varying vec2 vSpecularIntensityMapUv; +#endif +#ifdef USE_TRANSMISSIONMAP + uniform mat3 transmissionMapTransform; + varying vec2 vTransmissionMapUv; +#endif +#ifdef USE_THICKNESSMAP + uniform mat3 thicknessMapTransform; + varying vec2 vThicknessMapUv; +#endif`,aA=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) + vUv = vec3( uv, 1 ).xy; +#endif +#ifdef USE_MAP + vMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy; +#endif +#ifdef USE_ALPHAMAP + vAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_LIGHTMAP + vLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_AOMAP + vAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_BUMPMAP + vBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_NORMALMAP + vNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_DISPLACEMENTMAP + vDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_EMISSIVEMAP + vEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_METALNESSMAP + vMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_ROUGHNESSMAP + vRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_ANISOTROPYMAP + vAnisotropyMapUv = ( anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_CLEARCOATMAP + vClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_CLEARCOAT_NORMALMAP + vClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_CLEARCOAT_ROUGHNESSMAP + vClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_IRIDESCENCEMAP + vIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_IRIDESCENCE_THICKNESSMAP + vIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_SHEEN_COLORMAP + vSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_SHEEN_ROUGHNESSMAP + vSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_SPECULARMAP + vSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_SPECULAR_COLORMAP + vSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_SPECULAR_INTENSITYMAP + vSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_TRANSMISSIONMAP + vTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_THICKNESSMAP + vThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy; +#endif`,rA=`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0 + vec4 worldPosition = vec4( transformed, 1.0 ); + #ifdef USE_BATCHING + worldPosition = batchingMatrix * worldPosition; + #endif + #ifdef USE_INSTANCING + worldPosition = instanceMatrix * worldPosition; + #endif + worldPosition = modelMatrix * worldPosition; +#endif`;const oA=`varying vec2 vUv; +uniform mat3 uvTransform; +void main() { + vUv = ( uvTransform * vec3( uv, 1 ) ).xy; + gl_Position = vec4( position.xy, 1.0, 1.0 ); +}`,lA=`uniform sampler2D t2D; +uniform float backgroundIntensity; +varying vec2 vUv; +void main() { + vec4 texColor = texture2D( t2D, vUv ); + #ifdef DECODE_VIDEO_TEXTURE + texColor = vec4( mix( pow( texColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), texColor.rgb * 0.0773993808, vec3( lessThanEqual( texColor.rgb, vec3( 0.04045 ) ) ) ), texColor.w ); + #endif + texColor.rgb *= backgroundIntensity; + gl_FragColor = texColor; + #include + #include +}`,cA=`varying vec3 vWorldDirection; +#include +void main() { + vWorldDirection = transformDirection( position, modelMatrix ); + #include + #include + gl_Position.z = gl_Position.w; +}`,uA=`#ifdef ENVMAP_TYPE_CUBE + uniform samplerCube envMap; +#elif defined( ENVMAP_TYPE_CUBE_UV ) + uniform sampler2D envMap; +#endif +uniform float flipEnvMap; +uniform float backgroundBlurriness; +uniform float backgroundIntensity; +uniform mat3 backgroundRotation; +varying vec3 vWorldDirection; +#include +void main() { + #ifdef ENVMAP_TYPE_CUBE + vec4 texColor = textureCube( envMap, backgroundRotation * vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) ); + #elif defined( ENVMAP_TYPE_CUBE_UV ) + vec4 texColor = textureCubeUV( envMap, backgroundRotation * vWorldDirection, backgroundBlurriness ); + #else + vec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 ); + #endif + texColor.rgb *= backgroundIntensity; + gl_FragColor = texColor; + #include + #include +}`,hA=`varying vec3 vWorldDirection; +#include +void main() { + vWorldDirection = transformDirection( position, modelMatrix ); + #include + #include + gl_Position.z = gl_Position.w; +}`,fA=`uniform samplerCube tCube; +uniform float tFlip; +uniform float opacity; +varying vec3 vWorldDirection; +void main() { + vec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) ); + gl_FragColor = texColor; + gl_FragColor.a *= opacity; + #include + #include +}`,dA=`#include +#include +#include +#include +#include +#include +#include +#include +varying vec2 vHighPrecisionZW; +void main() { + #include + #include + #include + #include + #ifdef USE_DISPLACEMENTMAP + #include + #include + #include + #endif + #include + #include + #include + #include + #include + #include + #include + vHighPrecisionZW = gl_Position.zw; +}`,pA=`#if DEPTH_PACKING == 3200 + uniform float opacity; +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +varying vec2 vHighPrecisionZW; +void main() { + vec4 diffuseColor = vec4( 1.0 ); + #include + #if DEPTH_PACKING == 3200 + diffuseColor.a = opacity; + #endif + #include + #include + #include + #include + #include + float fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5; + #if DEPTH_PACKING == 3200 + gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity ); + #elif DEPTH_PACKING == 3201 + gl_FragColor = packDepthToRGBA( fragCoordZ ); + #elif DEPTH_PACKING == 3202 + gl_FragColor = vec4( packDepthToRGB( fragCoordZ ), 1.0 ); + #elif DEPTH_PACKING == 3203 + gl_FragColor = vec4( packDepthToRG( fragCoordZ ), 0.0, 1.0 ); + #endif +}`,mA=`#define DISTANCE +varying vec3 vWorldPosition; +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #ifdef USE_DISPLACEMENTMAP + #include + #include + #include + #endif + #include + #include + #include + #include + #include + #include + #include + vWorldPosition = worldPosition.xyz; +}`,gA=`#define DISTANCE +uniform vec3 referencePosition; +uniform float nearDistance; +uniform float farDistance; +varying vec3 vWorldPosition; +#include +#include +#include +#include +#include +#include +#include +#include +void main () { + vec4 diffuseColor = vec4( 1.0 ); + #include + #include + #include + #include + #include + float dist = length( vWorldPosition - referencePosition ); + dist = ( dist - nearDistance ) / ( farDistance - nearDistance ); + dist = saturate( dist ); + gl_FragColor = packDepthToRGBA( dist ); +}`,vA=`varying vec3 vWorldDirection; +#include +void main() { + vWorldDirection = transformDirection( position, modelMatrix ); + #include + #include +}`,_A=`uniform sampler2D tEquirect; +varying vec3 vWorldDirection; +#include +void main() { + vec3 direction = normalize( vWorldDirection ); + vec2 sampleUV = equirectUv( direction ); + gl_FragColor = texture2D( tEquirect, sampleUV ); + #include + #include +}`,yA=`uniform float scale; +attribute float lineDistance; +varying float vLineDistance; +#include +#include +#include +#include +#include +#include +#include +void main() { + vLineDistance = scale * lineDistance; + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include +}`,xA=`uniform vec3 diffuse; +uniform float opacity; +uniform float dashSize; +uniform float totalSize; +varying float vLineDistance; +#include +#include +#include +#include +#include +#include +#include +void main() { + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + if ( mod( vLineDistance, totalSize ) > dashSize ) { + discard; + } + vec3 outgoingLight = vec3( 0.0 ); + #include + #include + #include + outgoingLight = diffuseColor.rgb; + #include + #include + #include + #include + #include +}`,SA=`#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #if defined ( USE_ENVMAP ) || defined ( USE_SKINNING ) + #include + #include + #include + #include + #include + #endif + #include + #include + #include + #include + #include + #include + #include + #include + #include +}`,MA=`uniform vec3 diffuse; +uniform float opacity; +#ifndef FLAT_SHADED + varying vec3 vNormal; +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + #include + #include + #include + #include + #include + #include + #include + ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); + #ifdef USE_LIGHTMAP + vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); + reflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI; + #else + reflectedLight.indirectDiffuse += vec3( 1.0 ); + #endif + #include + reflectedLight.indirectDiffuse *= diffuseColor.rgb; + vec3 outgoingLight = reflectedLight.indirectDiffuse; + #include + #include + #include + #include + #include + #include + #include +}`,bA=`#define LAMBERT +varying vec3 vViewPosition; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vViewPosition = - mvPosition.xyz; + #include + #include + #include + #include +}`,EA=`#define LAMBERT +uniform vec3 diffuse; +uniform vec3 emissive; +uniform float opacity; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); + vec3 totalEmissiveRadiance = emissive; + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance; + #include + #include + #include + #include + #include + #include + #include +}`,TA=`#define MATCAP +varying vec3 vViewPosition; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vViewPosition = - mvPosition.xyz; +}`,AA=`#define MATCAP +uniform vec3 diffuse; +uniform float opacity; +uniform sampler2D matcap; +varying vec3 vViewPosition; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + #include + #include + #include + #include + #include + #include + #include + #include + vec3 viewDir = normalize( vViewPosition ); + vec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) ); + vec3 y = cross( viewDir, x ); + vec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5; + #ifdef USE_MATCAP + vec4 matcapColor = texture2D( matcap, uv ); + #else + vec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 ); + #endif + vec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb; + #include + #include + #include + #include + #include + #include +}`,CA=`#define NORMAL +#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) + varying vec3 vViewPosition; +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include +#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) + vViewPosition = - mvPosition.xyz; +#endif +}`,wA=`#define NORMAL +uniform float opacity; +#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) + varying vec3 vViewPosition; +#endif +#include +#include +#include +#include +#include +#include +#include +void main() { + vec4 diffuseColor = vec4( 0.0, 0.0, 0.0, opacity ); + #include + #include + #include + #include + gl_FragColor = vec4( packNormalToRGB( normal ), diffuseColor.a ); + #ifdef OPAQUE + gl_FragColor.a = 1.0; + #endif +}`,RA=`#define PHONG +varying vec3 vViewPosition; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vViewPosition = - mvPosition.xyz; + #include + #include + #include + #include +}`,DA=`#define PHONG +uniform vec3 diffuse; +uniform vec3 emissive; +uniform vec3 specular; +uniform float shininess; +uniform float opacity; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); + vec3 totalEmissiveRadiance = emissive; + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance; + #include + #include + #include + #include + #include + #include + #include +}`,UA=`#define STANDARD +varying vec3 vViewPosition; +#ifdef USE_TRANSMISSION + varying vec3 vWorldPosition; +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vViewPosition = - mvPosition.xyz; + #include + #include + #include +#ifdef USE_TRANSMISSION + vWorldPosition = worldPosition.xyz; +#endif +}`,NA=`#define STANDARD +#ifdef PHYSICAL + #define IOR + #define USE_SPECULAR +#endif +uniform vec3 diffuse; +uniform vec3 emissive; +uniform float roughness; +uniform float metalness; +uniform float opacity; +#ifdef IOR + uniform float ior; +#endif +#ifdef USE_SPECULAR + uniform float specularIntensity; + uniform vec3 specularColor; + #ifdef USE_SPECULAR_COLORMAP + uniform sampler2D specularColorMap; + #endif + #ifdef USE_SPECULAR_INTENSITYMAP + uniform sampler2D specularIntensityMap; + #endif +#endif +#ifdef USE_CLEARCOAT + uniform float clearcoat; + uniform float clearcoatRoughness; +#endif +#ifdef USE_DISPERSION + uniform float dispersion; +#endif +#ifdef USE_IRIDESCENCE + uniform float iridescence; + uniform float iridescenceIOR; + uniform float iridescenceThicknessMinimum; + uniform float iridescenceThicknessMaximum; +#endif +#ifdef USE_SHEEN + uniform vec3 sheenColor; + uniform float sheenRoughness; + #ifdef USE_SHEEN_COLORMAP + uniform sampler2D sheenColorMap; + #endif + #ifdef USE_SHEEN_ROUGHNESSMAP + uniform sampler2D sheenRoughnessMap; + #endif +#endif +#ifdef USE_ANISOTROPY + uniform vec2 anisotropyVector; + #ifdef USE_ANISOTROPYMAP + uniform sampler2D anisotropyMap; + #endif +#endif +varying vec3 vViewPosition; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); + vec3 totalEmissiveRadiance = emissive; + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse; + vec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular; + #include + vec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance; + #ifdef USE_SHEEN + float sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor ); + outgoingLight = outgoingLight * sheenEnergyComp + sheenSpecularDirect + sheenSpecularIndirect; + #endif + #ifdef USE_CLEARCOAT + float dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) ); + vec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc ); + outgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat; + #endif + #include + #include + #include + #include + #include + #include +}`,LA=`#define TOON +varying vec3 vViewPosition; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vViewPosition = - mvPosition.xyz; + #include + #include + #include +}`,PA=`#define TOON +uniform vec3 diffuse; +uniform vec3 emissive; +uniform float opacity; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); + vec3 totalEmissiveRadiance = emissive; + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance; + #include + #include + #include + #include + #include + #include +}`,IA=`uniform float size; +uniform float scale; +#include +#include +#include +#include +#include +#include +#ifdef USE_POINTS_UV + varying vec2 vUv; + uniform mat3 uvTransform; +#endif +void main() { + #ifdef USE_POINTS_UV + vUv = ( uvTransform * vec3( uv, 1 ) ).xy; + #endif + #include + #include + #include + #include + #include + #include + gl_PointSize = size; + #ifdef USE_SIZEATTENUATION + bool isPerspective = isPerspectiveMatrix( projectionMatrix ); + if ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z ); + #endif + #include + #include + #include + #include +}`,OA=`uniform vec3 diffuse; +uniform float opacity; +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + vec3 outgoingLight = vec3( 0.0 ); + #include + #include + #include + #include + #include + outgoingLight = diffuseColor.rgb; + #include + #include + #include + #include + #include +}`,BA=`#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include +}`,zA=`uniform vec3 color; +uniform float opacity; +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + gl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) ); + #include + #include + #include +}`,FA=`uniform float rotation; +uniform vec2 center; +#include +#include +#include +#include +#include +void main() { + #include + vec4 mvPosition = modelViewMatrix[ 3 ]; + vec2 scale = vec2( length( modelMatrix[ 0 ].xyz ), length( modelMatrix[ 1 ].xyz ) ); + #ifndef USE_SIZEATTENUATION + bool isPerspective = isPerspectiveMatrix( projectionMatrix ); + if ( isPerspective ) scale *= - mvPosition.z; + #endif + vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale; + vec2 rotatedPosition; + rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y; + rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y; + mvPosition.xy += rotatedPosition; + gl_Position = projectionMatrix * mvPosition; + #include + #include + #include +}`,HA=`uniform vec3 diffuse; +uniform float opacity; +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + vec3 outgoingLight = vec3( 0.0 ); + #include + #include + #include + #include + #include + outgoingLight = diffuseColor.rgb; + #include + #include + #include + #include +}`,de={alphahash_fragment:l1,alphahash_pars_fragment:c1,alphamap_fragment:u1,alphamap_pars_fragment:h1,alphatest_fragment:f1,alphatest_pars_fragment:d1,aomap_fragment:p1,aomap_pars_fragment:m1,batching_pars_vertex:g1,batching_vertex:v1,begin_vertex:_1,beginnormal_vertex:y1,bsdfs:x1,iridescence_fragment:S1,bumpmap_pars_fragment:M1,clipping_planes_fragment:b1,clipping_planes_pars_fragment:E1,clipping_planes_pars_vertex:T1,clipping_planes_vertex:A1,color_fragment:C1,color_pars_fragment:w1,color_pars_vertex:R1,color_vertex:D1,common:U1,cube_uv_reflection_fragment:N1,defaultnormal_vertex:L1,displacementmap_pars_vertex:P1,displacementmap_vertex:I1,emissivemap_fragment:O1,emissivemap_pars_fragment:B1,colorspace_fragment:z1,colorspace_pars_fragment:F1,envmap_fragment:H1,envmap_common_pars_fragment:V1,envmap_pars_fragment:G1,envmap_pars_vertex:k1,envmap_physical_pars_fragment:tT,envmap_vertex:W1,fog_vertex:X1,fog_pars_vertex:q1,fog_fragment:Y1,fog_pars_fragment:Z1,gradientmap_pars_fragment:K1,lightmap_pars_fragment:j1,lights_lambert_fragment:J1,lights_lambert_pars_fragment:Q1,lights_pars_begin:$1,lights_toon_fragment:eT,lights_toon_pars_fragment:nT,lights_phong_fragment:iT,lights_phong_pars_fragment:sT,lights_physical_fragment:aT,lights_physical_pars_fragment:rT,lights_fragment_begin:oT,lights_fragment_maps:lT,lights_fragment_end:cT,logdepthbuf_fragment:uT,logdepthbuf_pars_fragment:hT,logdepthbuf_pars_vertex:fT,logdepthbuf_vertex:dT,map_fragment:pT,map_pars_fragment:mT,map_particle_fragment:gT,map_particle_pars_fragment:vT,metalnessmap_fragment:_T,metalnessmap_pars_fragment:yT,morphinstance_vertex:xT,morphcolor_vertex:ST,morphnormal_vertex:MT,morphtarget_pars_vertex:bT,morphtarget_vertex:ET,normal_fragment_begin:TT,normal_fragment_maps:AT,normal_pars_fragment:CT,normal_pars_vertex:wT,normal_vertex:RT,normalmap_pars_fragment:DT,clearcoat_normal_fragment_begin:UT,clearcoat_normal_fragment_maps:NT,clearcoat_pars_fragment:LT,iridescence_pars_fragment:PT,opaque_fragment:IT,packing:OT,premultiplied_alpha_fragment:BT,project_vertex:zT,dithering_fragment:FT,dithering_pars_fragment:HT,roughnessmap_fragment:VT,roughnessmap_pars_fragment:GT,shadowmap_pars_fragment:kT,shadowmap_pars_vertex:WT,shadowmap_vertex:XT,shadowmask_pars_fragment:qT,skinbase_vertex:YT,skinning_pars_vertex:ZT,skinning_vertex:KT,skinnormal_vertex:jT,specularmap_fragment:JT,specularmap_pars_fragment:QT,tonemapping_fragment:$T,tonemapping_pars_fragment:tA,transmission_fragment:eA,transmission_pars_fragment:nA,uv_pars_fragment:iA,uv_pars_vertex:sA,uv_vertex:aA,worldpos_vertex:rA,background_vert:oA,background_frag:lA,backgroundCube_vert:cA,backgroundCube_frag:uA,cube_vert:hA,cube_frag:fA,depth_vert:dA,depth_frag:pA,distanceRGBA_vert:mA,distanceRGBA_frag:gA,equirect_vert:vA,equirect_frag:_A,linedashed_vert:yA,linedashed_frag:xA,meshbasic_vert:SA,meshbasic_frag:MA,meshlambert_vert:bA,meshlambert_frag:EA,meshmatcap_vert:TA,meshmatcap_frag:AA,meshnormal_vert:CA,meshnormal_frag:wA,meshphong_vert:RA,meshphong_frag:DA,meshphysical_vert:UA,meshphysical_frag:NA,meshtoon_vert:LA,meshtoon_frag:PA,points_vert:IA,points_frag:OA,shadow_vert:BA,shadow_frag:zA,sprite_vert:FA,sprite_frag:HA},At={common:{diffuse:{value:new zt(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new ue},alphaMap:{value:null},alphaMapTransform:{value:new ue},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new ue}},envmap:{envMap:{value:null},envMapRotation:{value:new ue},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new ue}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new ue}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new ue},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new ue},normalScale:{value:new dt(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new ue},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new ue}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new ue}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new ue}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new zt(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new zt(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new ue},alphaTest:{value:0},uvTransform:{value:new ue}},sprite:{diffuse:{value:new zt(16777215)},opacity:{value:1},center:{value:new dt(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new ue},alphaMap:{value:null},alphaMapTransform:{value:new ue},alphaTest:{value:0}}},Gi={basic:{uniforms:zn([At.common,At.specularmap,At.envmap,At.aomap,At.lightmap,At.fog]),vertexShader:de.meshbasic_vert,fragmentShader:de.meshbasic_frag},lambert:{uniforms:zn([At.common,At.specularmap,At.envmap,At.aomap,At.lightmap,At.emissivemap,At.bumpmap,At.normalmap,At.displacementmap,At.fog,At.lights,{emissive:{value:new zt(0)}}]),vertexShader:de.meshlambert_vert,fragmentShader:de.meshlambert_frag},phong:{uniforms:zn([At.common,At.specularmap,At.envmap,At.aomap,At.lightmap,At.emissivemap,At.bumpmap,At.normalmap,At.displacementmap,At.fog,At.lights,{emissive:{value:new zt(0)},specular:{value:new zt(1118481)},shininess:{value:30}}]),vertexShader:de.meshphong_vert,fragmentShader:de.meshphong_frag},standard:{uniforms:zn([At.common,At.envmap,At.aomap,At.lightmap,At.emissivemap,At.bumpmap,At.normalmap,At.displacementmap,At.roughnessmap,At.metalnessmap,At.fog,At.lights,{emissive:{value:new zt(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:de.meshphysical_vert,fragmentShader:de.meshphysical_frag},toon:{uniforms:zn([At.common,At.aomap,At.lightmap,At.emissivemap,At.bumpmap,At.normalmap,At.displacementmap,At.gradientmap,At.fog,At.lights,{emissive:{value:new zt(0)}}]),vertexShader:de.meshtoon_vert,fragmentShader:de.meshtoon_frag},matcap:{uniforms:zn([At.common,At.bumpmap,At.normalmap,At.displacementmap,At.fog,{matcap:{value:null}}]),vertexShader:de.meshmatcap_vert,fragmentShader:de.meshmatcap_frag},points:{uniforms:zn([At.points,At.fog]),vertexShader:de.points_vert,fragmentShader:de.points_frag},dashed:{uniforms:zn([At.common,At.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:de.linedashed_vert,fragmentShader:de.linedashed_frag},depth:{uniforms:zn([At.common,At.displacementmap]),vertexShader:de.depth_vert,fragmentShader:de.depth_frag},normal:{uniforms:zn([At.common,At.bumpmap,At.normalmap,At.displacementmap,{opacity:{value:1}}]),vertexShader:de.meshnormal_vert,fragmentShader:de.meshnormal_frag},sprite:{uniforms:zn([At.sprite,At.fog]),vertexShader:de.sprite_vert,fragmentShader:de.sprite_frag},background:{uniforms:{uvTransform:{value:new ue},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:de.background_vert,fragmentShader:de.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new ue}},vertexShader:de.backgroundCube_vert,fragmentShader:de.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:de.cube_vert,fragmentShader:de.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:de.equirect_vert,fragmentShader:de.equirect_frag},distanceRGBA:{uniforms:zn([At.common,At.displacementmap,{referencePosition:{value:new O},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:de.distanceRGBA_vert,fragmentShader:de.distanceRGBA_frag},shadow:{uniforms:zn([At.lights,At.fog,{color:{value:new zt(0)},opacity:{value:1}}]),vertexShader:de.shadow_vert,fragmentShader:de.shadow_frag}};Gi.physical={uniforms:zn([Gi.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new ue},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new ue},clearcoatNormalScale:{value:new dt(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new ue},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new ue},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new ue},sheen:{value:0},sheenColor:{value:new zt(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new ue},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new ue},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new ue},transmissionSamplerSize:{value:new dt},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new ue},attenuationDistance:{value:0},attenuationColor:{value:new zt(0)},specularColor:{value:new zt(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new ue},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new ue},anisotropyVector:{value:new dt},anisotropyMap:{value:null},anisotropyMapTransform:{value:new ue}}]),vertexShader:de.meshphysical_vert,fragmentShader:de.meshphysical_frag};const eu={r:0,b:0,g:0},Ba=new vi,VA=new ee;function GA(s,t,e,n,i,o,l){const c=new zt(0);let h=o===!0?0:1,f,p,m=null,g=0,_=null;function x(E){let A=E.isScene===!0?E.background:null;return A&&A.isTexture&&(A=(E.backgroundBlurriness>0?e:t).get(A)),A}function b(E){let A=!1;const T=x(E);T===null?y(c,h):T&&T.isColor&&(y(T,1),A=!0);const z=s.xr.getEnvironmentBlendMode();z==="additive"?n.buffers.color.setClear(0,0,0,1,l):z==="alpha-blend"&&n.buffers.color.setClear(0,0,0,0,l),(s.autoClear||A)&&(n.buffers.depth.setTest(!0),n.buffers.depth.setMask(!0),n.buffers.color.setMask(!0),s.clear(s.autoClearColor,s.autoClearDepth,s.autoClearStencil))}function S(E,A){const T=x(A);T&&(T.isCubeTexture||T.mapping===_o)?(p===void 0&&(p=new ln(new cr(1,1,1),new Xi({name:"BackgroundCubeMaterial",uniforms:go(Gi.backgroundCube.uniforms),vertexShader:Gi.backgroundCube.vertexShader,fragmentShader:Gi.backgroundCube.fragmentShader,side:Hn,depthTest:!1,depthWrite:!1,fog:!1})),p.geometry.deleteAttribute("normal"),p.geometry.deleteAttribute("uv"),p.onBeforeRender=function(z,D,L){this.matrixWorld.copyPosition(L.matrixWorld)},Object.defineProperty(p.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),i.update(p)),Ba.copy(A.backgroundRotation),Ba.x*=-1,Ba.y*=-1,Ba.z*=-1,T.isCubeTexture&&T.isRenderTargetTexture===!1&&(Ba.y*=-1,Ba.z*=-1),p.material.uniforms.envMap.value=T,p.material.uniforms.flipEnvMap.value=T.isCubeTexture&&T.isRenderTargetTexture===!1?-1:1,p.material.uniforms.backgroundBlurriness.value=A.backgroundBlurriness,p.material.uniforms.backgroundIntensity.value=A.backgroundIntensity,p.material.uniforms.backgroundRotation.value.setFromMatrix4(VA.makeRotationFromEuler(Ba)),p.material.toneMapped=Se.getTransfer(T.colorSpace)!==Be,(m!==T||g!==T.version||_!==s.toneMapping)&&(p.material.needsUpdate=!0,m=T,g=T.version,_=s.toneMapping),p.layers.enableAll(),E.unshift(p,p.geometry,p.material,0,0,null)):T&&T.isTexture&&(f===void 0&&(f=new ln(new So(2,2),new Xi({name:"BackgroundMaterial",uniforms:go(Gi.background.uniforms),vertexShader:Gi.background.vertexShader,fragmentShader:Gi.background.fragmentShader,side:Us,depthTest:!1,depthWrite:!1,fog:!1})),f.geometry.deleteAttribute("normal"),Object.defineProperty(f.material,"map",{get:function(){return this.uniforms.t2D.value}}),i.update(f)),f.material.uniforms.t2D.value=T,f.material.uniforms.backgroundIntensity.value=A.backgroundIntensity,f.material.toneMapped=Se.getTransfer(T.colorSpace)!==Be,T.matrixAutoUpdate===!0&&T.updateMatrix(),f.material.uniforms.uvTransform.value.copy(T.matrix),(m!==T||g!==T.version||_!==s.toneMapping)&&(f.material.needsUpdate=!0,m=T,g=T.version,_=s.toneMapping),f.layers.enableAll(),E.unshift(f,f.geometry,f.material,0,0,null))}function y(E,A){E.getRGB(eu,ix(s)),n.buffers.color.setClear(eu.r,eu.g,eu.b,A,l)}return{getClearColor:function(){return c},setClearColor:function(E,A=1){c.set(E),h=A,y(c,h)},getClearAlpha:function(){return h},setClearAlpha:function(E){h=E,y(c,h)},render:b,addToRenderList:S}}function kA(s,t){const e=s.getParameter(s.MAX_VERTEX_ATTRIBS),n={},i=g(null);let o=i,l=!1;function c(C,I,Z,K,tt){let rt=!1;const V=m(K,Z,I);o!==V&&(o=V,f(o.object)),rt=_(C,K,Z,tt),rt&&x(C,K,Z,tt),tt!==null&&t.update(tt,s.ELEMENT_ARRAY_BUFFER),(rt||l)&&(l=!1,T(C,I,Z,K),tt!==null&&s.bindBuffer(s.ELEMENT_ARRAY_BUFFER,t.get(tt).buffer))}function h(){return s.createVertexArray()}function f(C){return s.bindVertexArray(C)}function p(C){return s.deleteVertexArray(C)}function m(C,I,Z){const K=Z.wireframe===!0;let tt=n[C.id];tt===void 0&&(tt={},n[C.id]=tt);let rt=tt[I.id];rt===void 0&&(rt={},tt[I.id]=rt);let V=rt[K];return V===void 0&&(V=g(h()),rt[K]=V),V}function g(C){const I=[],Z=[],K=[];for(let tt=0;tt=0){const ut=tt[q];let bt=rt[q];if(bt===void 0&&(q==="instanceMatrix"&&C.instanceMatrix&&(bt=C.instanceMatrix),q==="instanceColor"&&C.instanceColor&&(bt=C.instanceColor)),ut===void 0||ut.attribute!==bt||bt&&ut.data!==bt.data)return!0;V++}return o.attributesNum!==V||o.index!==K}function x(C,I,Z,K){const tt={},rt=I.attributes;let V=0;const et=Z.getAttributes();for(const q in et)if(et[q].location>=0){let ut=rt[q];ut===void 0&&(q==="instanceMatrix"&&C.instanceMatrix&&(ut=C.instanceMatrix),q==="instanceColor"&&C.instanceColor&&(ut=C.instanceColor));const bt={};bt.attribute=ut,ut&&ut.data&&(bt.data=ut.data),tt[q]=bt,V++}o.attributes=tt,o.attributesNum=V,o.index=K}function b(){const C=o.newAttributes;for(let I=0,Z=C.length;I=0){let it=tt[et];if(it===void 0&&(et==="instanceMatrix"&&C.instanceMatrix&&(it=C.instanceMatrix),et==="instanceColor"&&C.instanceColor&&(it=C.instanceColor)),it!==void 0){const ut=it.normalized,bt=it.itemSize,It=t.get(it);if(It===void 0)continue;const ne=It.buffer,st=It.type,mt=It.bytesPerElement,Vt=st===s.INT||st===s.UNSIGNED_INT||it.gpuType===Ch;if(it.isInterleavedBufferAttribute){const Mt=it.data,Yt=Mt.stride,ie=it.offset;if(Mt.isInstancedInterleavedBuffer){for(let $t=0;$t0&&s.getShaderPrecisionFormat(s.FRAGMENT_SHADER,s.HIGH_FLOAT).precision>0)return"highp";L="mediump"}return L==="mediump"&&s.getShaderPrecisionFormat(s.VERTEX_SHADER,s.MEDIUM_FLOAT).precision>0&&s.getShaderPrecisionFormat(s.FRAGMENT_SHADER,s.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let f=e.precision!==void 0?e.precision:"highp";const p=h(f);p!==f&&(console.warn("THREE.WebGLRenderer:",f,"not supported, using",p,"instead."),f=p);const m=e.logarithmicDepthBuffer===!0,g=e.reverseDepthBuffer===!0&&t.has("EXT_clip_control"),_=s.getParameter(s.MAX_TEXTURE_IMAGE_UNITS),x=s.getParameter(s.MAX_VERTEX_TEXTURE_IMAGE_UNITS),b=s.getParameter(s.MAX_TEXTURE_SIZE),S=s.getParameter(s.MAX_CUBE_MAP_TEXTURE_SIZE),y=s.getParameter(s.MAX_VERTEX_ATTRIBS),E=s.getParameter(s.MAX_VERTEX_UNIFORM_VECTORS),A=s.getParameter(s.MAX_VARYING_VECTORS),T=s.getParameter(s.MAX_FRAGMENT_UNIFORM_VECTORS),z=x>0,D=s.getParameter(s.MAX_SAMPLES);return{isWebGL2:!0,getMaxAnisotropy:o,getMaxPrecision:h,textureFormatReadable:l,textureTypeReadable:c,precision:f,logarithmicDepthBuffer:m,reverseDepthBuffer:g,maxTextures:_,maxVertexTextures:x,maxTextureSize:b,maxCubemapSize:S,maxAttributes:y,maxVertexUniforms:E,maxVaryings:A,maxFragmentUniforms:T,vertexTextures:z,maxSamples:D}}function qA(s){const t=this;let e=null,n=0,i=!1,o=!1;const l=new aa,c=new ue,h={value:null,needsUpdate:!1};this.uniform=h,this.numPlanes=0,this.numIntersection=0,this.init=function(m,g){const _=m.length!==0||g||n!==0||i;return i=g,n=m.length,_},this.beginShadows=function(){o=!0,p(null)},this.endShadows=function(){o=!1},this.setGlobalState=function(m,g){e=p(m,g,0)},this.setState=function(m,g,_){const x=m.clippingPlanes,b=m.clipIntersection,S=m.clipShadows,y=s.get(m);if(!i||x===null||x.length===0||o&&!S)o?p(null):f();else{const E=o?0:n,A=E*4;let T=y.clippingState||null;h.value=T,T=p(x,g,A,_);for(let z=0;z!==A;++z)T[z]=e[z];y.clippingState=T,this.numIntersection=b?this.numPlanes:0,this.numPlanes+=E}};function f(){h.value!==e&&(h.value=e,h.needsUpdate=n>0),t.numPlanes=n,t.numIntersection=0}function p(m,g,_,x){const b=m!==null?m.length:0;let S=null;if(b!==0){if(S=h.value,x!==!0||S===null){const y=_+b*4,E=g.matrixWorldInverse;c.getNormalMatrix(E),(S===null||S.length0){const f=new rx(h.height);return f.fromEquirectangularTexture(s,l),t.set(l,f),l.addEventListener("dispose",i),e(f.texture,l.mapping)}else return null}}return l}function i(l){const c=l.target;c.removeEventListener("dispose",i);const h=t.get(c);h!==void 0&&(t.delete(c),h.dispose())}function o(){t=new WeakMap}return{get:n,dispose:o}}class Yl extends Ih{constructor(t=-1,e=1,n=1,i=-1,o=.1,l=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=t,this.right=e,this.top=n,this.bottom=i,this.near=o,this.far=l,this.updateProjectionMatrix()}copy(t,e){return super.copy(t,e),this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.bottom,this.near=t.near,this.far=t.far,this.zoom=t.zoom,this.view=t.view===null?null:Object.assign({},t.view),this}setViewOffset(t,e,n,i,o,l){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=n,this.view.offsetY=i,this.view.width=o,this.view.height=l,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const t=(this.right-this.left)/(2*this.zoom),e=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,i=(this.top+this.bottom)/2;let o=n-t,l=n+t,c=i+e,h=i-e;if(this.view!==null&&this.view.enabled){const f=(this.right-this.left)/this.view.fullWidth/this.zoom,p=(this.top-this.bottom)/this.view.fullHeight/this.zoom;o+=f*this.view.offsetX,l=o+f*this.view.width,c-=p*this.view.offsetY,h=c-p*this.view.height}this.projectionMatrix.makeOrthographic(o,l,c,h,this.near,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(t){const e=super.toJSON(t);return e.object.zoom=this.zoom,e.object.left=this.left,e.object.right=this.right,e.object.top=this.top,e.object.bottom=this.bottom,e.object.near=this.near,e.object.far=this.far,this.view!==null&&(e.object.view=Object.assign({},this.view)),e}}const lo=4,b0=[.125,.215,.35,.446,.526,.582],Za=20,qd=new Yl,E0=new zt;let Yd=null,Zd=0,Kd=0,jd=!1;const Ya=(1+Math.sqrt(5))/2,Qr=1/Ya,T0=[new O(-Ya,Qr,0),new O(Ya,Qr,0),new O(-Qr,0,Ya),new O(Qr,0,Ya),new O(0,Ya,-Qr),new O(0,Ya,Qr),new O(-1,1,-1),new O(1,1,-1),new O(-1,1,1),new O(1,1,1)];class zp{constructor(t){this._renderer=t,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(t,e=0,n=.1,i=100){Yd=this._renderer.getRenderTarget(),Zd=this._renderer.getActiveCubeFace(),Kd=this._renderer.getActiveMipmapLevel(),jd=this._renderer.xr.enabled,this._renderer.xr.enabled=!1,this._setSize(256);const o=this._allocateTargets();return o.depthBuffer=!0,this._sceneToCubeUV(t,n,i,o),e>0&&this._blur(o,0,0,e),this._applyPMREM(o),this._cleanup(o),o}fromEquirectangular(t,e=null){return this._fromTexture(t,e)}fromCubemap(t,e=null){return this._fromTexture(t,e)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=w0(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=C0(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose()}_setSize(t){this._lodMax=Math.floor(Math.log2(t)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let t=0;t2?A:0,A,A),p.setRenderTarget(i),b&&p.render(x,c),p.render(t,c)}x.geometry.dispose(),x.material.dispose(),p.toneMapping=g,p.autoClear=m,t.background=S}_textureToCubeUV(t,e){const n=this._renderer,i=t.mapping===Ns||t.mapping===oa;i?(this._cubemapMaterial===null&&(this._cubemapMaterial=w0()),this._cubemapMaterial.uniforms.flipEnvMap.value=t.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=C0());const o=i?this._cubemapMaterial:this._equirectMaterial,l=new ln(this._lodPlanes[0],o),c=o.uniforms;c.envMap.value=t;const h=this._cubeSize;nu(e,0,0,3*h,2*h),n.setRenderTarget(e),n.render(l,qd)}_applyPMREM(t){const e=this._renderer,n=e.autoClear;e.autoClear=!1;const i=this._lodPlanes.length;for(let o=1;oZa&&console.warn(`sigmaRadians, ${o}, is too large and will clip, as it requested ${S} samples when the maximum is set to ${Za}`);const y=[];let E=0;for(let L=0;LA-lo?i-A+lo:0),D=4*(this._cubeSize-T);nu(e,z,D,3*T,2*T),h.setRenderTarget(e),h.render(m,qd)}}function ZA(s){const t=[],e=[],n=[];let i=s;const o=s-lo+1+b0.length;for(let l=0;ls-lo?h=b0[l-s+lo-1]:l===0&&(h=0),n.push(h);const f=1/(c-2),p=-f,m=1+f,g=[p,p,m,p,m,m,p,p,m,m,p,m],_=6,x=6,b=3,S=2,y=1,E=new Float32Array(b*x*_),A=new Float32Array(S*x*_),T=new Float32Array(y*x*_);for(let D=0;D<_;D++){const L=D%3*2/3-1,B=D>2?0:-1,w=[L,B,0,L+2/3,B,0,L+2/3,B+1,0,L,B,0,L+2/3,B+1,0,L,B+1,0];E.set(w,b*x*D),A.set(g,S*x*D);const C=[D,D,D,D,D,D];T.set(C,y*x*D)}const z=new pe;z.setAttribute("position",new Ve(E,b)),z.setAttribute("uv",new Ve(A,S)),z.setAttribute("faceIndex",new Ve(T,y)),t.push(z),i>lo&&i--}return{lodPlanes:t,sizeLods:e,sigmas:n}}function A0(s,t,e){const n=new Wi(s,t,e);return n.texture.mapping=_o,n.texture.name="PMREM.cubeUv",n.scissorTest=!0,n}function nu(s,t,e,n,i){s.viewport.set(t,e,n,i),s.scissor.set(t,e,n,i)}function KA(s,t,e){const n=new Float32Array(Za),i=new O(0,1,0);return new Xi({name:"SphericalGaussianBlur",defines:{n:Za,CUBEUV_TEXEL_WIDTH:1/t,CUBEUV_TEXEL_HEIGHT:1/e,CUBEUV_MAX_MIP:`${s}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:n},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:i}},vertexShader:_m(),fragmentShader:` + + precision mediump float; + precision mediump int; + + varying vec3 vOutputDirection; + + uniform sampler2D envMap; + uniform int samples; + uniform float weights[ n ]; + uniform bool latitudinal; + uniform float dTheta; + uniform float mipInt; + uniform vec3 poleAxis; + + #define ENVMAP_TYPE_CUBE_UV + #include + + vec3 getSample( float theta, vec3 axis ) { + + float cosTheta = cos( theta ); + // Rodrigues' axis-angle rotation + vec3 sampleDirection = vOutputDirection * cosTheta + + cross( axis, vOutputDirection ) * sin( theta ) + + axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta ); + + return bilinearCubeUV( envMap, sampleDirection, mipInt ); + + } + + void main() { + + vec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection ); + + if ( all( equal( axis, vec3( 0.0 ) ) ) ) { + + axis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x ); + + } + + axis = normalize( axis ); + + gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 ); + gl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis ); + + for ( int i = 1; i < n; i++ ) { + + if ( i >= samples ) { + + break; + + } + + float theta = dTheta * float( i ); + gl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis ); + gl_FragColor.rgb += weights[ i ] * getSample( theta, axis ); + + } + + } + `,blending:Rs,depthTest:!1,depthWrite:!1})}function C0(){return new Xi({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:_m(),fragmentShader:` + + precision mediump float; + precision mediump int; + + varying vec3 vOutputDirection; + + uniform sampler2D envMap; + + #include + + void main() { + + vec3 outputDirection = normalize( vOutputDirection ); + vec2 uv = equirectUv( outputDirection ); + + gl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 ); + + } + `,blending:Rs,depthTest:!1,depthWrite:!1})}function w0(){return new Xi({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:_m(),fragmentShader:` + + precision mediump float; + precision mediump int; + + uniform float flipEnvMap; + + varying vec3 vOutputDirection; + + uniform samplerCube envMap; + + void main() { + + gl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) ); + + } + `,blending:Rs,depthTest:!1,depthWrite:!1})}function _m(){return` + + precision mediump float; + precision mediump int; + + attribute float faceIndex; + + varying vec3 vOutputDirection; + + // RH coordinate system; PMREM face-indexing convention + vec3 getDirection( vec2 uv, float face ) { + + uv = 2.0 * uv - 1.0; + + vec3 direction = vec3( uv, 1.0 ); + + if ( face == 0.0 ) { + + direction = direction.zyx; // ( 1, v, u ) pos x + + } else if ( face == 1.0 ) { + + direction = direction.xzy; + direction.xz *= -1.0; // ( -u, 1, -v ) pos y + + } else if ( face == 2.0 ) { + + direction.x *= -1.0; // ( -u, v, 1 ) pos z + + } else if ( face == 3.0 ) { + + direction = direction.zyx; + direction.xz *= -1.0; // ( -1, v, -u ) neg x + + } else if ( face == 4.0 ) { + + direction = direction.xzy; + direction.xy *= -1.0; // ( -u, -1, v ) neg y + + } else if ( face == 5.0 ) { + + direction.z *= -1.0; // ( u, v, -1 ) neg z + + } + + return direction; + + } + + void main() { + + vOutputDirection = getDirection( uv, faceIndex ); + gl_Position = vec4( position, 1.0 ); + + } + `}function jA(s){let t=new WeakMap,e=null;function n(c){if(c&&c.isTexture){const h=c.mapping,f=h===bl||h===El,p=h===Ns||h===oa;if(f||p){let m=t.get(c);const g=m!==void 0?m.texture.pmremVersion:0;if(c.isRenderTargetTexture&&c.pmremVersion!==g)return e===null&&(e=new zp(s)),m=f?e.fromEquirectangular(c,m):e.fromCubemap(c,m),m.texture.pmremVersion=c.pmremVersion,t.set(c,m),m.texture;if(m!==void 0)return m.texture;{const _=c.image;return f&&_&&_.height>0||p&&_&&i(_)?(e===null&&(e=new zp(s)),m=f?e.fromEquirectangular(c):e.fromCubemap(c),m.texture.pmremVersion=c.pmremVersion,t.set(c,m),c.addEventListener("dispose",o),m.texture):null}}}return c}function i(c){let h=0;const f=6;for(let p=0;pt.maxTextureSize&&(z=Math.ceil(T/t.maxTextureSize),T=t.maxTextureSize);const D=new Float32Array(T*z*4*m),L=new Ph(D,T,z,m);L.type=Jn,L.needsUpdate=!0;const B=A*4;for(let C=0;C0)return s;const i=t*e;let o=D0[i];if(o===void 0&&(o=new Float32Array(i),D0[i]=o),t!==0){n.toArray(o,0);for(let l=1,c=0;l!==t;++l)c+=e,s[l].toArray(o,c)}return o}function hn(s,t){if(s.length!==t.length)return!1;for(let e=0,n=s.length;e":" "} ${c}: ${e[l]}`)}return n.join(` +`)}const B0=new ue;function jC(s){Se._getMatrix(B0,Se.workingColorSpace,s);const t=`mat3( ${B0.elements.map(e=>e.toFixed(4))} )`;switch(Se.getTransfer(s)){case Wl:return[t,"LinearTransferOETF"];case Be:return[t,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space: ",s),[t,"LinearTransferOETF"]}}function z0(s,t,e){const n=s.getShaderParameter(t,s.COMPILE_STATUS),i=s.getShaderInfoLog(t).trim();if(n&&i==="")return"";const o=/ERROR: 0:(\d+)/.exec(i);if(o){const l=parseInt(o[1]);return e.toUpperCase()+` + +`+i+` + +`+KC(s.getShaderSource(t),l)}else return i}function JC(s,t){const e=jC(t);return[`vec4 ${s}( vec4 value ) {`,` return ${e[1]}( vec4( value.rgb * ${e[0]}, value.a ) );`,"}"].join(` +`)}function QC(s,t){let e;switch(t){case Ny:e="Linear";break;case Ly:e="Reinhard";break;case Py:e="Cineon";break;case em:e="ACESFilmic";break;case Oy:e="AgX";break;case By:e="Neutral";break;case Iy:e="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",t),e="Linear"}return"vec3 "+s+"( vec3 color ) { return "+e+"ToneMapping( color ); }"}const iu=new O;function $C(){Se.getLuminanceCoefficients(iu);const s=iu.x.toFixed(4),t=iu.y.toFixed(4),e=iu.z.toFixed(4);return["float luminance( const in vec3 rgb ) {",` const vec3 weights = vec3( ${s}, ${t}, ${e} );`," return dot( weights, rgb );","}"].join(` +`)}function tw(s){return[s.extensionClipCullDistance?"#extension GL_ANGLE_clip_cull_distance : require":"",s.extensionMultiDraw?"#extension GL_ANGLE_multi_draw : require":""].filter(hl).join(` +`)}function ew(s){const t=[];for(const e in s){const n=s[e];n!==!1&&t.push("#define "+e+" "+n)}return t.join(` +`)}function nw(s,t){const e={},n=s.getProgramParameter(t,s.ACTIVE_ATTRIBUTES);for(let i=0;i/gm;function Fp(s){return s.replace(iw,aw)}const sw=new Map;function aw(s,t){let e=de[t];if(e===void 0){const n=sw.get(t);if(n!==void 0)e=de[n],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',t,n);else throw new Error("Can not resolve #include <"+t+">")}return Fp(e)}const rw=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function V0(s){return s.replace(rw,ow)}function ow(s,t,e,n){let i="";for(let o=parseInt(t);o0&&(S+=` +`),y=["#define SHADER_TYPE "+e.shaderType,"#define SHADER_NAME "+e.shaderName,x].filter(hl).join(` +`),y.length>0&&(y+=` +`)):(S=[G0(e),"#define SHADER_TYPE "+e.shaderType,"#define SHADER_NAME "+e.shaderName,x,e.extensionClipCullDistance?"#define USE_CLIP_DISTANCE":"",e.batching?"#define USE_BATCHING":"",e.batchingColor?"#define USE_BATCHING_COLOR":"",e.instancing?"#define USE_INSTANCING":"",e.instancingColor?"#define USE_INSTANCING_COLOR":"",e.instancingMorph?"#define USE_INSTANCING_MORPH":"",e.useFog&&e.fog?"#define USE_FOG":"",e.useFog&&e.fogExp2?"#define FOG_EXP2":"",e.map?"#define USE_MAP":"",e.envMap?"#define USE_ENVMAP":"",e.envMap?"#define "+p:"",e.lightMap?"#define USE_LIGHTMAP":"",e.aoMap?"#define USE_AOMAP":"",e.bumpMap?"#define USE_BUMPMAP":"",e.normalMap?"#define USE_NORMALMAP":"",e.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",e.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",e.displacementMap?"#define USE_DISPLACEMENTMAP":"",e.emissiveMap?"#define USE_EMISSIVEMAP":"",e.anisotropy?"#define USE_ANISOTROPY":"",e.anisotropyMap?"#define USE_ANISOTROPYMAP":"",e.clearcoatMap?"#define USE_CLEARCOATMAP":"",e.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",e.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",e.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",e.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",e.specularMap?"#define USE_SPECULARMAP":"",e.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",e.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",e.roughnessMap?"#define USE_ROUGHNESSMAP":"",e.metalnessMap?"#define USE_METALNESSMAP":"",e.alphaMap?"#define USE_ALPHAMAP":"",e.alphaHash?"#define USE_ALPHAHASH":"",e.transmission?"#define USE_TRANSMISSION":"",e.transmissionMap?"#define USE_TRANSMISSIONMAP":"",e.thicknessMap?"#define USE_THICKNESSMAP":"",e.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",e.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",e.mapUv?"#define MAP_UV "+e.mapUv:"",e.alphaMapUv?"#define ALPHAMAP_UV "+e.alphaMapUv:"",e.lightMapUv?"#define LIGHTMAP_UV "+e.lightMapUv:"",e.aoMapUv?"#define AOMAP_UV "+e.aoMapUv:"",e.emissiveMapUv?"#define EMISSIVEMAP_UV "+e.emissiveMapUv:"",e.bumpMapUv?"#define BUMPMAP_UV "+e.bumpMapUv:"",e.normalMapUv?"#define NORMALMAP_UV "+e.normalMapUv:"",e.displacementMapUv?"#define DISPLACEMENTMAP_UV "+e.displacementMapUv:"",e.metalnessMapUv?"#define METALNESSMAP_UV "+e.metalnessMapUv:"",e.roughnessMapUv?"#define ROUGHNESSMAP_UV "+e.roughnessMapUv:"",e.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+e.anisotropyMapUv:"",e.clearcoatMapUv?"#define CLEARCOATMAP_UV "+e.clearcoatMapUv:"",e.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+e.clearcoatNormalMapUv:"",e.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+e.clearcoatRoughnessMapUv:"",e.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+e.iridescenceMapUv:"",e.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+e.iridescenceThicknessMapUv:"",e.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+e.sheenColorMapUv:"",e.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+e.sheenRoughnessMapUv:"",e.specularMapUv?"#define SPECULARMAP_UV "+e.specularMapUv:"",e.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+e.specularColorMapUv:"",e.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+e.specularIntensityMapUv:"",e.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+e.transmissionMapUv:"",e.thicknessMapUv?"#define THICKNESSMAP_UV "+e.thicknessMapUv:"",e.vertexTangents&&e.flatShading===!1?"#define USE_TANGENT":"",e.vertexColors?"#define USE_COLOR":"",e.vertexAlphas?"#define USE_COLOR_ALPHA":"",e.vertexUv1s?"#define USE_UV1":"",e.vertexUv2s?"#define USE_UV2":"",e.vertexUv3s?"#define USE_UV3":"",e.pointsUvs?"#define USE_POINTS_UV":"",e.flatShading?"#define FLAT_SHADED":"",e.skinning?"#define USE_SKINNING":"",e.morphTargets?"#define USE_MORPHTARGETS":"",e.morphNormals&&e.flatShading===!1?"#define USE_MORPHNORMALS":"",e.morphColors?"#define USE_MORPHCOLORS":"",e.morphTargetsCount>0?"#define MORPHTARGETS_TEXTURE_STRIDE "+e.morphTextureStride:"",e.morphTargetsCount>0?"#define MORPHTARGETS_COUNT "+e.morphTargetsCount:"",e.doubleSided?"#define DOUBLE_SIDED":"",e.flipSided?"#define FLIP_SIDED":"",e.shadowMapEnabled?"#define USE_SHADOWMAP":"",e.shadowMapEnabled?"#define "+h:"",e.sizeAttenuation?"#define USE_SIZEATTENUATION":"",e.numLightProbes>0?"#define USE_LIGHT_PROBES":"",e.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",e.reverseDepthBuffer?"#define USE_REVERSEDEPTHBUF":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING"," attribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR"," attribute vec3 instanceColor;","#endif","#ifdef USE_INSTANCING_MORPH"," uniform sampler2D morphTexture;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_UV1"," attribute vec2 uv1;","#endif","#ifdef USE_UV2"," attribute vec2 uv2;","#endif","#ifdef USE_UV3"," attribute vec2 uv3;","#endif","#ifdef USE_TANGENT"," attribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )"," attribute vec4 color;","#elif defined( USE_COLOR )"," attribute vec3 color;","#endif","#ifdef USE_SKINNING"," attribute vec4 skinIndex;"," attribute vec4 skinWeight;","#endif",` +`].filter(hl).join(` +`),y=[G0(e),"#define SHADER_TYPE "+e.shaderType,"#define SHADER_NAME "+e.shaderName,x,e.useFog&&e.fog?"#define USE_FOG":"",e.useFog&&e.fogExp2?"#define FOG_EXP2":"",e.alphaToCoverage?"#define ALPHA_TO_COVERAGE":"",e.map?"#define USE_MAP":"",e.matcap?"#define USE_MATCAP":"",e.envMap?"#define USE_ENVMAP":"",e.envMap?"#define "+f:"",e.envMap?"#define "+p:"",e.envMap?"#define "+m:"",g?"#define CUBEUV_TEXEL_WIDTH "+g.texelWidth:"",g?"#define CUBEUV_TEXEL_HEIGHT "+g.texelHeight:"",g?"#define CUBEUV_MAX_MIP "+g.maxMip+".0":"",e.lightMap?"#define USE_LIGHTMAP":"",e.aoMap?"#define USE_AOMAP":"",e.bumpMap?"#define USE_BUMPMAP":"",e.normalMap?"#define USE_NORMALMAP":"",e.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",e.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",e.emissiveMap?"#define USE_EMISSIVEMAP":"",e.anisotropy?"#define USE_ANISOTROPY":"",e.anisotropyMap?"#define USE_ANISOTROPYMAP":"",e.clearcoat?"#define USE_CLEARCOAT":"",e.clearcoatMap?"#define USE_CLEARCOATMAP":"",e.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",e.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",e.dispersion?"#define USE_DISPERSION":"",e.iridescence?"#define USE_IRIDESCENCE":"",e.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",e.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",e.specularMap?"#define USE_SPECULARMAP":"",e.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",e.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",e.roughnessMap?"#define USE_ROUGHNESSMAP":"",e.metalnessMap?"#define USE_METALNESSMAP":"",e.alphaMap?"#define USE_ALPHAMAP":"",e.alphaTest?"#define USE_ALPHATEST":"",e.alphaHash?"#define USE_ALPHAHASH":"",e.sheen?"#define USE_SHEEN":"",e.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",e.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",e.transmission?"#define USE_TRANSMISSION":"",e.transmissionMap?"#define USE_TRANSMISSIONMAP":"",e.thicknessMap?"#define USE_THICKNESSMAP":"",e.vertexTangents&&e.flatShading===!1?"#define USE_TANGENT":"",e.vertexColors||e.instancingColor||e.batchingColor?"#define USE_COLOR":"",e.vertexAlphas?"#define USE_COLOR_ALPHA":"",e.vertexUv1s?"#define USE_UV1":"",e.vertexUv2s?"#define USE_UV2":"",e.vertexUv3s?"#define USE_UV3":"",e.pointsUvs?"#define USE_POINTS_UV":"",e.gradientMap?"#define USE_GRADIENTMAP":"",e.flatShading?"#define FLAT_SHADED":"",e.doubleSided?"#define DOUBLE_SIDED":"",e.flipSided?"#define FLIP_SIDED":"",e.shadowMapEnabled?"#define USE_SHADOWMAP":"",e.shadowMapEnabled?"#define "+h:"",e.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",e.numLightProbes>0?"#define USE_LIGHT_PROBES":"",e.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",e.decodeVideoTextureEmissive?"#define DECODE_VIDEO_TEXTURE_EMISSIVE":"",e.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",e.reverseDepthBuffer?"#define USE_REVERSEDEPTHBUF":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",e.toneMapping!==es?"#define TONE_MAPPING":"",e.toneMapping!==es?de.tonemapping_pars_fragment:"",e.toneMapping!==es?QC("toneMapping",e.toneMapping):"",e.dithering?"#define DITHERING":"",e.opaque?"#define OPAQUE":"",de.colorspace_pars_fragment,JC("linearToOutputTexel",e.outputColorSpace),$C(),e.useDepthPacking?"#define DEPTH_PACKING "+e.depthPacking:"",` +`].filter(hl).join(` +`)),l=Fp(l),l=F0(l,e),l=H0(l,e),c=Fp(c),c=F0(c,e),c=H0(c,e),l=V0(l),c=V0(c),e.isRawShaderMaterial!==!0&&(E=`#version 300 es +`,S=[_,"#define attribute in","#define varying out","#define texture2D texture"].join(` +`)+` +`+S,y=["#define varying in",e.glslVersion===Bp?"":"layout(location = 0) out highp vec4 pc_fragColor;",e.glslVersion===Bp?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join(` +`)+` +`+y);const A=E+S+l,T=E+y+c,z=O0(i,i.VERTEX_SHADER,A),D=O0(i,i.FRAGMENT_SHADER,T);i.attachShader(b,z),i.attachShader(b,D),e.index0AttributeName!==void 0?i.bindAttribLocation(b,0,e.index0AttributeName):e.morphTargets===!0&&i.bindAttribLocation(b,0,"position"),i.linkProgram(b);function L(I){if(s.debug.checkShaderErrors){const Z=i.getProgramInfoLog(b).trim(),K=i.getShaderInfoLog(z).trim(),tt=i.getShaderInfoLog(D).trim();let rt=!0,V=!0;if(i.getProgramParameter(b,i.LINK_STATUS)===!1)if(rt=!1,typeof s.debug.onShaderError=="function")s.debug.onShaderError(i,b,z,D);else{const et=z0(i,z,"vertex"),q=z0(i,D,"fragment");console.error("THREE.WebGLProgram: Shader Error "+i.getError()+" - VALIDATE_STATUS "+i.getProgramParameter(b,i.VALIDATE_STATUS)+` + +Material Name: `+I.name+` +Material Type: `+I.type+` + +Program Info Log: `+Z+` +`+et+` +`+q)}else Z!==""?console.warn("THREE.WebGLProgram: Program Info Log:",Z):(K===""||tt==="")&&(V=!1);V&&(I.diagnostics={runnable:rt,programLog:Z,vertexShader:{log:K,prefix:S},fragmentShader:{log:tt,prefix:y}})}i.deleteShader(z),i.deleteShader(D),B=new Nu(i,b),w=nw(i,b)}let B;this.getUniforms=function(){return B===void 0&&L(this),B};let w;this.getAttributes=function(){return w===void 0&&L(this),w};let C=e.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return C===!1&&(C=i.getProgramParameter(b,YC)),C},this.destroy=function(){n.releaseStatesOfProgram(this),i.deleteProgram(b),this.program=void 0},this.type=e.shaderType,this.name=e.shaderName,this.id=ZC++,this.cacheKey=t,this.usedTimes=1,this.program=b,this.vertexShader=z,this.fragmentShader=D,this}let pw=0;class mw{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(t){const e=t.vertexShader,n=t.fragmentShader,i=this._getShaderStage(e),o=this._getShaderStage(n),l=this._getShaderCacheForMaterial(t);return l.has(i)===!1&&(l.add(i),i.usedTimes++),l.has(o)===!1&&(l.add(o),o.usedTimes++),this}remove(t){const e=this.materialCache.get(t);for(const n of e)n.usedTimes--,n.usedTimes===0&&this.shaderCache.delete(n.code);return this.materialCache.delete(t),this}getVertexShaderID(t){return this._getShaderStage(t.vertexShader).id}getFragmentShaderID(t){return this._getShaderStage(t.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(t){const e=this.materialCache;let n=e.get(t);return n===void 0&&(n=new Set,e.set(t,n)),n}_getShaderStage(t){const e=this.shaderCache;let n=e.get(t);return n===void 0&&(n=new gw(t),e.set(t,n)),n}}class gw{constructor(t){this.id=pw++,this.code=t,this.usedTimes=0}}function vw(s,t,e,n,i,o,l){const c=new mo,h=new mw,f=new Set,p=[],m=i.logarithmicDepthBuffer,g=i.vertexTextures;let _=i.precision;const x={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function b(w){return f.add(w),w===0?"uv":`uv${w}`}function S(w,C,I,Z,K){const tt=Z.fog,rt=K.geometry,V=w.isMeshStandardMaterial?Z.environment:null,et=(w.isMeshStandardMaterial?e:t).get(w.envMap||V),q=et&&et.mapping===_o?et.image.height:null,it=x[w.type];w.precision!==null&&(_=i.getMaxPrecision(w.precision),_!==w.precision&&console.warn("THREE.WebGLProgram.getParameters:",w.precision,"not supported, using",_,"instead."));const ut=rt.morphAttributes.position||rt.morphAttributes.normal||rt.morphAttributes.color,bt=ut!==void 0?ut.length:0;let It=0;rt.morphAttributes.position!==void 0&&(It=1),rt.morphAttributes.normal!==void 0&&(It=2),rt.morphAttributes.color!==void 0&&(It=3);let ne,st,mt,Vt;if(it){const be=Gi[it];ne=be.vertexShader,st=be.fragmentShader}else ne=w.vertexShader,st=w.fragmentShader,h.update(w),mt=h.getVertexShaderID(w),Vt=h.getFragmentShaderID(w);const Mt=s.getRenderTarget(),Yt=s.state.buffers.depth.getReversed(),ie=K.isInstancedMesh===!0,$t=K.isBatchedMesh===!0,me=!!w.map,ht=!!w.matcap,_t=!!et,F=!!w.aoMap,kt=!!w.lightMap,gt=!!w.bumpMap,Dt=!!w.normalMap,Et=!!w.displacementMap,Qt=!!w.emissiveMap,Tt=!!w.metalnessMap,P=!!w.roughnessMap,R=w.anisotropy>0,j=w.clearcoat>0,ot=w.dispersion>0,pt=w.iridescence>0,ct=w.sheen>0,Gt=w.transmission>0,Ct=R&&!!w.anisotropyMap,Ot=j&&!!w.clearcoatMap,ve=j&&!!w.clearcoatNormalMap,vt=j&&!!w.clearcoatRoughnessMap,Ht=pt&&!!w.iridescenceMap,Kt=pt&&!!w.iridescenceThicknessMap,Jt=ct&&!!w.sheenColorMap,Bt=ct&&!!w.sheenRoughnessMap,_e=!!w.specularMap,ae=!!w.specularColorMap,De=!!w.specularIntensityMap,k=Gt&&!!w.transmissionMap,wt=Gt&&!!w.thicknessMap,at=!!w.gradientMap,ft=!!w.alphaMap,Ut=w.alphaTest>0,Nt=!!w.alphaHash,ce=!!w.extensions;let Ge=es;w.toneMapped&&(Mt===null||Mt.isXRRenderTarget===!0)&&(Ge=s.toneMapping);const je={shaderID:it,shaderType:w.type,shaderName:w.name,vertexShader:ne,fragmentShader:st,defines:w.defines,customVertexShaderID:mt,customFragmentShaderID:Vt,isRawShaderMaterial:w.isRawShaderMaterial===!0,glslVersion:w.glslVersion,precision:_,batching:$t,batchingColor:$t&&K._colorsTexture!==null,instancing:ie,instancingColor:ie&&K.instanceColor!==null,instancingMorph:ie&&K.morphTexture!==null,supportsVertexTextures:g,outputColorSpace:Mt===null?s.outputColorSpace:Mt.isXRRenderTarget===!0?Mt.texture.colorSpace:ua,alphaToCoverage:!!w.alphaToCoverage,map:me,matcap:ht,envMap:_t,envMapMode:_t&&et.mapping,envMapCubeUVHeight:q,aoMap:F,lightMap:kt,bumpMap:gt,normalMap:Dt,displacementMap:g&&Et,emissiveMap:Qt,normalMapObjectSpace:Dt&&w.normalMapType===Wy,normalMapTangentSpace:Dt&&w.normalMapType===ca,metalnessMap:Tt,roughnessMap:P,anisotropy:R,anisotropyMap:Ct,clearcoat:j,clearcoatMap:Ot,clearcoatNormalMap:ve,clearcoatRoughnessMap:vt,dispersion:ot,iridescence:pt,iridescenceMap:Ht,iridescenceThicknessMap:Kt,sheen:ct,sheenColorMap:Jt,sheenRoughnessMap:Bt,specularMap:_e,specularColorMap:ae,specularIntensityMap:De,transmission:Gt,transmissionMap:k,thicknessMap:wt,gradientMap:at,opaque:w.transparent===!1&&w.blending===$a&&w.alphaToCoverage===!1,alphaMap:ft,alphaTest:Ut,alphaHash:Nt,combine:w.combine,mapUv:me&&b(w.map.channel),aoMapUv:F&&b(w.aoMap.channel),lightMapUv:kt&&b(w.lightMap.channel),bumpMapUv:gt&&b(w.bumpMap.channel),normalMapUv:Dt&&b(w.normalMap.channel),displacementMapUv:Et&&b(w.displacementMap.channel),emissiveMapUv:Qt&&b(w.emissiveMap.channel),metalnessMapUv:Tt&&b(w.metalnessMap.channel),roughnessMapUv:P&&b(w.roughnessMap.channel),anisotropyMapUv:Ct&&b(w.anisotropyMap.channel),clearcoatMapUv:Ot&&b(w.clearcoatMap.channel),clearcoatNormalMapUv:ve&&b(w.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:vt&&b(w.clearcoatRoughnessMap.channel),iridescenceMapUv:Ht&&b(w.iridescenceMap.channel),iridescenceThicknessMapUv:Kt&&b(w.iridescenceThicknessMap.channel),sheenColorMapUv:Jt&&b(w.sheenColorMap.channel),sheenRoughnessMapUv:Bt&&b(w.sheenRoughnessMap.channel),specularMapUv:_e&&b(w.specularMap.channel),specularColorMapUv:ae&&b(w.specularColorMap.channel),specularIntensityMapUv:De&&b(w.specularIntensityMap.channel),transmissionMapUv:k&&b(w.transmissionMap.channel),thicknessMapUv:wt&&b(w.thicknessMap.channel),alphaMapUv:ft&&b(w.alphaMap.channel),vertexTangents:!!rt.attributes.tangent&&(Dt||R),vertexColors:w.vertexColors,vertexAlphas:w.vertexColors===!0&&!!rt.attributes.color&&rt.attributes.color.itemSize===4,pointsUvs:K.isPoints===!0&&!!rt.attributes.uv&&(me||ft),fog:!!tt,useFog:w.fog===!0,fogExp2:!!tt&&tt.isFogExp2,flatShading:w.flatShading===!0,sizeAttenuation:w.sizeAttenuation===!0,logarithmicDepthBuffer:m,reverseDepthBuffer:Yt,skinning:K.isSkinnedMesh===!0,morphTargets:rt.morphAttributes.position!==void 0,morphNormals:rt.morphAttributes.normal!==void 0,morphColors:rt.morphAttributes.color!==void 0,morphTargetsCount:bt,morphTextureStride:It,numDirLights:C.directional.length,numPointLights:C.point.length,numSpotLights:C.spot.length,numSpotLightMaps:C.spotLightMap.length,numRectAreaLights:C.rectArea.length,numHemiLights:C.hemi.length,numDirLightShadows:C.directionalShadowMap.length,numPointLightShadows:C.pointShadowMap.length,numSpotLightShadows:C.spotShadowMap.length,numSpotLightShadowsWithMaps:C.numSpotLightShadowsWithMaps,numLightProbes:C.numLightProbes,numClippingPlanes:l.numPlanes,numClipIntersection:l.numIntersection,dithering:w.dithering,shadowMapEnabled:s.shadowMap.enabled&&I.length>0,shadowMapType:s.shadowMap.type,toneMapping:Ge,decodeVideoTexture:me&&w.map.isVideoTexture===!0&&Se.getTransfer(w.map.colorSpace)===Be,decodeVideoTextureEmissive:Qt&&w.emissiveMap.isVideoTexture===!0&&Se.getTransfer(w.emissiveMap.colorSpace)===Be,premultipliedAlpha:w.premultipliedAlpha,doubleSided:w.side===Qi,flipSided:w.side===Hn,useDepthPacking:w.depthPacking>=0,depthPacking:w.depthPacking||0,index0AttributeName:w.index0AttributeName,extensionClipCullDistance:ce&&w.extensions.clipCullDistance===!0&&n.has("WEBGL_clip_cull_distance"),extensionMultiDraw:(ce&&w.extensions.multiDraw===!0||$t)&&n.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:n.has("KHR_parallel_shader_compile"),customProgramCacheKey:w.customProgramCacheKey()};return je.vertexUv1s=f.has(1),je.vertexUv2s=f.has(2),je.vertexUv3s=f.has(3),f.clear(),je}function y(w){const C=[];if(w.shaderID?C.push(w.shaderID):(C.push(w.customVertexShaderID),C.push(w.customFragmentShaderID)),w.defines!==void 0)for(const I in w.defines)C.push(I),C.push(w.defines[I]);return w.isRawShaderMaterial===!1&&(E(C,w),A(C,w),C.push(s.outputColorSpace)),C.push(w.customProgramCacheKey),C.join()}function E(w,C){w.push(C.precision),w.push(C.outputColorSpace),w.push(C.envMapMode),w.push(C.envMapCubeUVHeight),w.push(C.mapUv),w.push(C.alphaMapUv),w.push(C.lightMapUv),w.push(C.aoMapUv),w.push(C.bumpMapUv),w.push(C.normalMapUv),w.push(C.displacementMapUv),w.push(C.emissiveMapUv),w.push(C.metalnessMapUv),w.push(C.roughnessMapUv),w.push(C.anisotropyMapUv),w.push(C.clearcoatMapUv),w.push(C.clearcoatNormalMapUv),w.push(C.clearcoatRoughnessMapUv),w.push(C.iridescenceMapUv),w.push(C.iridescenceThicknessMapUv),w.push(C.sheenColorMapUv),w.push(C.sheenRoughnessMapUv),w.push(C.specularMapUv),w.push(C.specularColorMapUv),w.push(C.specularIntensityMapUv),w.push(C.transmissionMapUv),w.push(C.thicknessMapUv),w.push(C.combine),w.push(C.fogExp2),w.push(C.sizeAttenuation),w.push(C.morphTargetsCount),w.push(C.morphAttributeCount),w.push(C.numDirLights),w.push(C.numPointLights),w.push(C.numSpotLights),w.push(C.numSpotLightMaps),w.push(C.numHemiLights),w.push(C.numRectAreaLights),w.push(C.numDirLightShadows),w.push(C.numPointLightShadows),w.push(C.numSpotLightShadows),w.push(C.numSpotLightShadowsWithMaps),w.push(C.numLightProbes),w.push(C.shadowMapType),w.push(C.toneMapping),w.push(C.numClippingPlanes),w.push(C.numClipIntersection),w.push(C.depthPacking)}function A(w,C){c.disableAll(),C.supportsVertexTextures&&c.enable(0),C.instancing&&c.enable(1),C.instancingColor&&c.enable(2),C.instancingMorph&&c.enable(3),C.matcap&&c.enable(4),C.envMap&&c.enable(5),C.normalMapObjectSpace&&c.enable(6),C.normalMapTangentSpace&&c.enable(7),C.clearcoat&&c.enable(8),C.iridescence&&c.enable(9),C.alphaTest&&c.enable(10),C.vertexColors&&c.enable(11),C.vertexAlphas&&c.enable(12),C.vertexUv1s&&c.enable(13),C.vertexUv2s&&c.enable(14),C.vertexUv3s&&c.enable(15),C.vertexTangents&&c.enable(16),C.anisotropy&&c.enable(17),C.alphaHash&&c.enable(18),C.batching&&c.enable(19),C.dispersion&&c.enable(20),C.batchingColor&&c.enable(21),w.push(c.mask),c.disableAll(),C.fog&&c.enable(0),C.useFog&&c.enable(1),C.flatShading&&c.enable(2),C.logarithmicDepthBuffer&&c.enable(3),C.reverseDepthBuffer&&c.enable(4),C.skinning&&c.enable(5),C.morphTargets&&c.enable(6),C.morphNormals&&c.enable(7),C.morphColors&&c.enable(8),C.premultipliedAlpha&&c.enable(9),C.shadowMapEnabled&&c.enable(10),C.doubleSided&&c.enable(11),C.flipSided&&c.enable(12),C.useDepthPacking&&c.enable(13),C.dithering&&c.enable(14),C.transmission&&c.enable(15),C.sheen&&c.enable(16),C.opaque&&c.enable(17),C.pointsUvs&&c.enable(18),C.decodeVideoTexture&&c.enable(19),C.decodeVideoTextureEmissive&&c.enable(20),C.alphaToCoverage&&c.enable(21),w.push(c.mask)}function T(w){const C=x[w.type];let I;if(C){const Z=Gi[C];I=sx.clone(Z.uniforms)}else I=w.uniforms;return I}function z(w,C){let I;for(let Z=0,K=p.length;Z0?n.push(y):_.transparent===!0?i.push(y):e.push(y)}function h(m,g,_,x,b,S){const y=l(m,g,_,x,b,S);_.transmission>0?n.unshift(y):_.transparent===!0?i.unshift(y):e.unshift(y)}function f(m,g){e.length>1&&e.sort(m||yw),n.length>1&&n.sort(g||k0),i.length>1&&i.sort(g||k0)}function p(){for(let m=t,g=s.length;m=o.length?(l=new W0,o.push(l)):l=o[i],l}function e(){s=new WeakMap}return{get:t,dispose:e}}function Sw(){const s={};return{get:function(t){if(s[t.id]!==void 0)return s[t.id];let e;switch(t.type){case"DirectionalLight":e={direction:new O,color:new zt};break;case"SpotLight":e={position:new O,direction:new O,color:new zt,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":e={position:new O,color:new zt,distance:0,decay:0};break;case"HemisphereLight":e={direction:new O,skyColor:new zt,groundColor:new zt};break;case"RectAreaLight":e={color:new zt,position:new O,halfWidth:new O,halfHeight:new O};break}return s[t.id]=e,e}}}function Mw(){const s={};return{get:function(t){if(s[t.id]!==void 0)return s[t.id];let e;switch(t.type){case"DirectionalLight":e={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new dt};break;case"SpotLight":e={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new dt};break;case"PointLight":e={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new dt,shadowCameraNear:1,shadowCameraFar:1e3};break}return s[t.id]=e,e}}}let bw=0;function Ew(s,t){return(t.castShadow?2:0)-(s.castShadow?2:0)+(t.map?1:0)-(s.map?1:0)}function Tw(s){const t=new Sw,e=Mw(),n={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let f=0;f<9;f++)n.probe.push(new O);const i=new O,o=new ee,l=new ee;function c(f){let p=0,m=0,g=0;for(let w=0;w<9;w++)n.probe[w].set(0,0,0);let _=0,x=0,b=0,S=0,y=0,E=0,A=0,T=0,z=0,D=0,L=0;f.sort(Ew);for(let w=0,C=f.length;w0&&(s.has("OES_texture_float_linear")===!0?(n.rectAreaLTC1=At.LTC_FLOAT_1,n.rectAreaLTC2=At.LTC_FLOAT_2):(n.rectAreaLTC1=At.LTC_HALF_1,n.rectAreaLTC2=At.LTC_HALF_2)),n.ambient[0]=p,n.ambient[1]=m,n.ambient[2]=g;const B=n.hash;(B.directionalLength!==_||B.pointLength!==x||B.spotLength!==b||B.rectAreaLength!==S||B.hemiLength!==y||B.numDirectionalShadows!==E||B.numPointShadows!==A||B.numSpotShadows!==T||B.numSpotMaps!==z||B.numLightProbes!==L)&&(n.directional.length=_,n.spot.length=b,n.rectArea.length=S,n.point.length=x,n.hemi.length=y,n.directionalShadow.length=E,n.directionalShadowMap.length=E,n.pointShadow.length=A,n.pointShadowMap.length=A,n.spotShadow.length=T,n.spotShadowMap.length=T,n.directionalShadowMatrix.length=E,n.pointShadowMatrix.length=A,n.spotLightMatrix.length=T+z-D,n.spotLightMap.length=z,n.numSpotLightShadowsWithMaps=D,n.numLightProbes=L,B.directionalLength=_,B.pointLength=x,B.spotLength=b,B.rectAreaLength=S,B.hemiLength=y,B.numDirectionalShadows=E,B.numPointShadows=A,B.numSpotShadows=T,B.numSpotMaps=z,B.numLightProbes=L,n.version=bw++)}function h(f,p){let m=0,g=0,_=0,x=0,b=0;const S=p.matrixWorldInverse;for(let y=0,E=f.length;y=l.length?(c=new X0(s),l.push(c)):c=l[o],c}function n(){t=new WeakMap}return{get:e,dispose:n}}class xm extends Ln{static get type(){return"MeshDepthMaterial"}constructor(t){super(),this.isMeshDepthMaterial=!0,this.depthPacking=Gy,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(t)}copy(t){return super.copy(t),this.depthPacking=t.depthPacking,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this}}class Sm extends Ln{static get type(){return"MeshDistanceMaterial"}constructor(t){super(),this.isMeshDistanceMaterial=!0,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(t)}copy(t){return super.copy(t),this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this}}const Cw=`void main() { + gl_Position = vec4( position, 1.0 ); +}`,ww=`uniform sampler2D shadow_pass; +uniform vec2 resolution; +uniform float radius; +#include +void main() { + const float samples = float( VSM_SAMPLES ); + float mean = 0.0; + float squared_mean = 0.0; + float uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 ); + float uvStart = samples <= 1.0 ? 0.0 : - 1.0; + for ( float i = 0.0; i < samples; i ++ ) { + float uvOffset = uvStart + i * uvStride; + #ifdef HORIZONTAL_PASS + vec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) ); + mean += distribution.x; + squared_mean += distribution.y * distribution.y + distribution.x * distribution.x; + #else + float depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) ); + mean += depth; + squared_mean += depth * depth; + #endif + } + mean = mean / samples; + squared_mean = squared_mean / samples; + float std_dev = sqrt( squared_mean - mean * mean ); + gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) ); +}`;function Rw(s,t,e){let n=new ql;const i=new dt,o=new dt,l=new we,c=new xm({depthPacking:ky}),h=new Sm,f={},p=e.maxTextureSize,m={[Us]:Hn,[Hn]:Us,[Qi]:Qi},g=new Xi({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new dt},radius:{value:4}},vertexShader:Cw,fragmentShader:ww}),_=g.clone();_.defines.HORIZONTAL_PASS=1;const x=new pe;x.setAttribute("position",new Ve(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const b=new ln(x,g),S=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=Th;let y=this.type;this.render=function(D,L,B){if(S.enabled===!1||S.autoUpdate===!1&&S.needsUpdate===!1||D.length===0)return;const w=s.getRenderTarget(),C=s.getActiveCubeFace(),I=s.getActiveMipmapLevel(),Z=s.state;Z.setBlending(Rs),Z.buffers.color.setClear(1,1,1,1),Z.buffers.depth.setTest(!0),Z.setScissorTest(!1);const K=y!==Vi&&this.type===Vi,tt=y===Vi&&this.type!==Vi;for(let rt=0,V=D.length;rtp||i.y>p)&&(i.x>p&&(o.x=Math.floor(p/it.x),i.x=o.x*it.x,q.mapSize.x=o.x),i.y>p&&(o.y=Math.floor(p/it.y),i.y=o.y*it.y,q.mapSize.y=o.y)),q.map===null||K===!0||tt===!0){const bt=this.type!==Vi?{minFilter:Sn,magFilter:Sn}:{};q.map!==null&&q.map.dispose(),q.map=new Wi(i.x,i.y,bt),q.map.texture.name=et.name+".shadowMap",q.camera.updateProjectionMatrix()}s.setRenderTarget(q.map),s.clear();const ut=q.getViewportCount();for(let bt=0;bt0||L.map&&L.alphaTest>0){const Z=C.uuid,K=L.uuid;let tt=f[Z];tt===void 0&&(tt={},f[Z]=tt);let rt=tt[K];rt===void 0&&(rt=C.clone(),tt[K]=rt,L.addEventListener("dispose",z)),C=rt}if(C.visible=L.visible,C.wireframe=L.wireframe,w===Vi?C.side=L.shadowSide!==null?L.shadowSide:L.side:C.side=L.shadowSide!==null?L.shadowSide:m[L.side],C.alphaMap=L.alphaMap,C.alphaTest=L.alphaTest,C.map=L.map,C.clipShadows=L.clipShadows,C.clippingPlanes=L.clippingPlanes,C.clipIntersection=L.clipIntersection,C.displacementMap=L.displacementMap,C.displacementScale=L.displacementScale,C.displacementBias=L.displacementBias,C.wireframeLinewidth=L.wireframeLinewidth,C.linewidth=L.linewidth,B.isPointLight===!0&&C.isMeshDistanceMaterial===!0){const Z=s.properties.get(C);Z.light=B}return C}function T(D,L,B,w,C){if(D.visible===!1)return;if(D.layers.test(L.layers)&&(D.isMesh||D.isLine||D.isPoints)&&(D.castShadow||D.receiveShadow&&C===Vi)&&(!D.frustumCulled||n.intersectsObject(D))){D.modelViewMatrix.multiplyMatrices(B.matrixWorldInverse,D.matrixWorld);const K=t.update(D),tt=D.material;if(Array.isArray(tt)){const rt=K.groups;for(let V=0,et=rt.length;V=1):q.indexOf("OpenGL ES")!==-1&&(et=parseFloat(/^OpenGL ES (\d)/.exec(q)[1]),V=et>=2);let it=null,ut={};const bt=s.getParameter(s.SCISSOR_BOX),It=s.getParameter(s.VIEWPORT),ne=new we().fromArray(bt),st=new we().fromArray(It);function mt(k,wt,at,ft){const Ut=new Uint8Array(4),Nt=s.createTexture();s.bindTexture(k,Nt),s.texParameteri(k,s.TEXTURE_MIN_FILTER,s.NEAREST),s.texParameteri(k,s.TEXTURE_MAG_FILTER,s.NEAREST);for(let ce=0;cet?(s.repeat.x=1,s.repeat.y=e/t,s.offset.x=0,s.offset.y=(1-s.repeat.y)/2):(s.repeat.x=t/e,s.repeat.y=1,s.offset.x=(1-s.repeat.x)/2,s.offset.y=0),s}function Lw(s,t){const e=s.image&&s.image.width?s.image.width/s.image.height:1;return e>t?(s.repeat.x=t/e,s.repeat.y=1,s.offset.x=(1-s.repeat.x)/2,s.offset.y=0):(s.repeat.x=1,s.repeat.y=e/t,s.offset.x=0,s.offset.y=(1-s.repeat.y)/2),s}function Pw(s){return s.repeat.x=1,s.repeat.y=1,s.offset.x=0,s.offset.y=0,s}function Hp(s,t,e,n){const i=Iw(n);switch(e){case rm:return s*t;case lm:return s*t;case cm:return s*t*2;case Dh:return s*t/i.components*i.byteLength;case kl:return s*t/i.components*i.byteLength;case um:return s*t*2/i.components*i.byteLength;case Uh:return s*t*2/i.components*i.byteLength;case om:return s*t*3/i.components*i.byteLength;case Un:return s*t*4/i.components*i.byteLength;case Nh:return s*t*4/i.components*i.byteLength;case pl:case ml:return Math.floor((s+3)/4)*Math.floor((t+3)/4)*8;case gl:case vl:return Math.floor((s+3)/4)*Math.floor((t+3)/4)*16;case Xu:case Yu:return Math.max(s,16)*Math.max(t,8)/4;case Wu:case qu:return Math.max(s,8)*Math.max(t,8)/2;case Zu:case Ku:return Math.floor((s+3)/4)*Math.floor((t+3)/4)*8;case ju:return Math.floor((s+3)/4)*Math.floor((t+3)/4)*16;case Ju:return Math.floor((s+3)/4)*Math.floor((t+3)/4)*16;case Qu:return Math.floor((s+4)/5)*Math.floor((t+3)/4)*16;case $u:return Math.floor((s+4)/5)*Math.floor((t+4)/5)*16;case th:return Math.floor((s+5)/6)*Math.floor((t+4)/5)*16;case eh:return Math.floor((s+5)/6)*Math.floor((t+5)/6)*16;case nh:return Math.floor((s+7)/8)*Math.floor((t+4)/5)*16;case ih:return Math.floor((s+7)/8)*Math.floor((t+5)/6)*16;case sh:return Math.floor((s+7)/8)*Math.floor((t+7)/8)*16;case ah:return Math.floor((s+9)/10)*Math.floor((t+4)/5)*16;case rh:return Math.floor((s+9)/10)*Math.floor((t+5)/6)*16;case oh:return Math.floor((s+9)/10)*Math.floor((t+7)/8)*16;case lh:return Math.floor((s+9)/10)*Math.floor((t+9)/10)*16;case ch:return Math.floor((s+11)/12)*Math.floor((t+9)/10)*16;case uh:return Math.floor((s+11)/12)*Math.floor((t+11)/12)*16;case _l:case hh:case fh:return Math.ceil(s/4)*Math.ceil(t/4)*16;case hm:case dh:return Math.ceil(s/4)*Math.ceil(t/4)*8;case ph:case mh:return Math.ceil(s/4)*Math.ceil(t/4)*16}throw new Error(`Unable to determine texture byte length for ${e} format.`)}function Iw(s){switch(s){case ki:case im:return{byteLength:1,components:1};case fo:case sm:case yo:return{byteLength:2,components:1};case wh:case Rh:return{byteLength:2,components:4};case Ls:case Ch:case Jn:return{byteLength:4,components:1};case am:return{byteLength:4,components:3}}throw new Error(`Unknown texture type ${s}.`)}const Ow={contain:Nw,cover:Lw,fill:Pw,getByteLength:Hp};function Bw(s,t,e,n,i,o,l){const c=t.has("WEBGL_multisampled_render_to_texture")?t.get("WEBGL_multisampled_render_to_texture"):null,h=typeof navigator>"u"?!1:/OculusBrowser/g.test(navigator.userAgent),f=new dt,p=new WeakMap;let m;const g=new WeakMap;let _=!1;try{_=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function x(P,R){return _?new OffscreenCanvas(P,R):Ul("canvas")}function b(P,R,j){let ot=1;const pt=Tt(P);if((pt.width>j||pt.height>j)&&(ot=j/Math.max(pt.width,pt.height)),ot<1)if(typeof HTMLImageElement<"u"&&P instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&P instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&P instanceof ImageBitmap||typeof VideoFrame<"u"&&P instanceof VideoFrame){const ct=Math.floor(ot*pt.width),Gt=Math.floor(ot*pt.height);m===void 0&&(m=x(ct,Gt));const Ct=R?x(ct,Gt):m;return Ct.width=ct,Ct.height=Gt,Ct.getContext("2d").drawImage(P,0,0,ct,Gt),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+pt.width+"x"+pt.height+") to ("+ct+"x"+Gt+")."),Ct}else return"data"in P&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+pt.width+"x"+pt.height+")."),P;return P}function S(P){return P.generateMipmaps}function y(P){s.generateMipmap(P)}function E(P){return P.isWebGLCubeRenderTarget?s.TEXTURE_CUBE_MAP:P.isWebGL3DRenderTarget?s.TEXTURE_3D:P.isWebGLArrayRenderTarget||P.isCompressedArrayTexture?s.TEXTURE_2D_ARRAY:s.TEXTURE_2D}function A(P,R,j,ot,pt=!1){if(P!==null){if(s[P]!==void 0)return s[P];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+P+"'")}let ct=R;if(R===s.RED&&(j===s.FLOAT&&(ct=s.R32F),j===s.HALF_FLOAT&&(ct=s.R16F),j===s.UNSIGNED_BYTE&&(ct=s.R8)),R===s.RED_INTEGER&&(j===s.UNSIGNED_BYTE&&(ct=s.R8UI),j===s.UNSIGNED_SHORT&&(ct=s.R16UI),j===s.UNSIGNED_INT&&(ct=s.R32UI),j===s.BYTE&&(ct=s.R8I),j===s.SHORT&&(ct=s.R16I),j===s.INT&&(ct=s.R32I)),R===s.RG&&(j===s.FLOAT&&(ct=s.RG32F),j===s.HALF_FLOAT&&(ct=s.RG16F),j===s.UNSIGNED_BYTE&&(ct=s.RG8)),R===s.RG_INTEGER&&(j===s.UNSIGNED_BYTE&&(ct=s.RG8UI),j===s.UNSIGNED_SHORT&&(ct=s.RG16UI),j===s.UNSIGNED_INT&&(ct=s.RG32UI),j===s.BYTE&&(ct=s.RG8I),j===s.SHORT&&(ct=s.RG16I),j===s.INT&&(ct=s.RG32I)),R===s.RGB_INTEGER&&(j===s.UNSIGNED_BYTE&&(ct=s.RGB8UI),j===s.UNSIGNED_SHORT&&(ct=s.RGB16UI),j===s.UNSIGNED_INT&&(ct=s.RGB32UI),j===s.BYTE&&(ct=s.RGB8I),j===s.SHORT&&(ct=s.RGB16I),j===s.INT&&(ct=s.RGB32I)),R===s.RGBA_INTEGER&&(j===s.UNSIGNED_BYTE&&(ct=s.RGBA8UI),j===s.UNSIGNED_SHORT&&(ct=s.RGBA16UI),j===s.UNSIGNED_INT&&(ct=s.RGBA32UI),j===s.BYTE&&(ct=s.RGBA8I),j===s.SHORT&&(ct=s.RGBA16I),j===s.INT&&(ct=s.RGBA32I)),R===s.RGB&&j===s.UNSIGNED_INT_5_9_9_9_REV&&(ct=s.RGB9_E5),R===s.RGBA){const Gt=pt?Wl:Se.getTransfer(ot);j===s.FLOAT&&(ct=s.RGBA32F),j===s.HALF_FLOAT&&(ct=s.RGBA16F),j===s.UNSIGNED_BYTE&&(ct=Gt===Be?s.SRGB8_ALPHA8:s.RGBA8),j===s.UNSIGNED_SHORT_4_4_4_4&&(ct=s.RGBA4),j===s.UNSIGNED_SHORT_5_5_5_1&&(ct=s.RGB5_A1)}return(ct===s.R16F||ct===s.R32F||ct===s.RG16F||ct===s.RG32F||ct===s.RGBA16F||ct===s.RGBA32F)&&t.get("EXT_color_buffer_float"),ct}function T(P,R){let j;return P?R===null||R===Ls||R===sr?j=s.DEPTH24_STENCIL8:R===Jn?j=s.DEPTH32F_STENCIL8:R===fo&&(j=s.DEPTH24_STENCIL8,console.warn("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")):R===null||R===Ls||R===sr?j=s.DEPTH_COMPONENT24:R===Jn?j=s.DEPTH_COMPONENT32F:R===fo&&(j=s.DEPTH_COMPONENT16),j}function z(P,R){return S(P)===!0||P.isFramebufferTexture&&P.minFilter!==Sn&&P.minFilter!==un?Math.log2(Math.max(R.width,R.height))+1:P.mipmaps!==void 0&&P.mipmaps.length>0?P.mipmaps.length:P.isCompressedTexture&&Array.isArray(P.image)?R.mipmaps.length:1}function D(P){const R=P.target;R.removeEventListener("dispose",D),B(R),R.isVideoTexture&&p.delete(R)}function L(P){const R=P.target;R.removeEventListener("dispose",L),C(R)}function B(P){const R=n.get(P);if(R.__webglInit===void 0)return;const j=P.source,ot=g.get(j);if(ot){const pt=ot[R.__cacheKey];pt.usedTimes--,pt.usedTimes===0&&w(P),Object.keys(ot).length===0&&g.delete(j)}n.remove(P)}function w(P){const R=n.get(P);s.deleteTexture(R.__webglTexture);const j=P.source,ot=g.get(j);delete ot[R.__cacheKey],l.memory.textures--}function C(P){const R=n.get(P);if(P.depthTexture&&(P.depthTexture.dispose(),n.remove(P.depthTexture)),P.isWebGLCubeRenderTarget)for(let ot=0;ot<6;ot++){if(Array.isArray(R.__webglFramebuffer[ot]))for(let pt=0;pt=i.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+P+" texture units while this GPU supports only "+i.maxTextures),I+=1,P}function tt(P){const R=[];return R.push(P.wrapS),R.push(P.wrapT),R.push(P.wrapR||0),R.push(P.magFilter),R.push(P.minFilter),R.push(P.anisotropy),R.push(P.internalFormat),R.push(P.format),R.push(P.type),R.push(P.generateMipmaps),R.push(P.premultiplyAlpha),R.push(P.flipY),R.push(P.unpackAlignment),R.push(P.colorSpace),R.join()}function rt(P,R){const j=n.get(P);if(P.isVideoTexture&&Et(P),P.isRenderTargetTexture===!1&&P.version>0&&j.__version!==P.version){const ot=P.image;if(ot===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(ot.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{st(j,P,R);return}}e.bindTexture(s.TEXTURE_2D,j.__webglTexture,s.TEXTURE0+R)}function V(P,R){const j=n.get(P);if(P.version>0&&j.__version!==P.version){st(j,P,R);return}e.bindTexture(s.TEXTURE_2D_ARRAY,j.__webglTexture,s.TEXTURE0+R)}function et(P,R){const j=n.get(P);if(P.version>0&&j.__version!==P.version){st(j,P,R);return}e.bindTexture(s.TEXTURE_3D,j.__webglTexture,s.TEXTURE0+R)}function q(P,R){const j=n.get(P);if(P.version>0&&j.__version!==P.version){mt(j,P,R);return}e.bindTexture(s.TEXTURE_CUBE_MAP,j.__webglTexture,s.TEXTURE0+R)}const it={[Tl]:s.REPEAT,[Ri]:s.CLAMP_TO_EDGE,[Al]:s.MIRRORED_REPEAT},ut={[Sn]:s.NEAREST,[nm]:s.NEAREST_MIPMAP_NEAREST,[ro]:s.NEAREST_MIPMAP_LINEAR,[un]:s.LINEAR,[dl]:s.LINEAR_MIPMAP_NEAREST,[$i]:s.LINEAR_MIPMAP_LINEAR},bt={[Xy]:s.NEVER,[Jy]:s.ALWAYS,[qy]:s.LESS,[dm]:s.LEQUAL,[Yy]:s.EQUAL,[jy]:s.GEQUAL,[Zy]:s.GREATER,[Ky]:s.NOTEQUAL};function It(P,R){if(R.type===Jn&&t.has("OES_texture_float_linear")===!1&&(R.magFilter===un||R.magFilter===dl||R.magFilter===ro||R.magFilter===$i||R.minFilter===un||R.minFilter===dl||R.minFilter===ro||R.minFilter===$i)&&console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),s.texParameteri(P,s.TEXTURE_WRAP_S,it[R.wrapS]),s.texParameteri(P,s.TEXTURE_WRAP_T,it[R.wrapT]),(P===s.TEXTURE_3D||P===s.TEXTURE_2D_ARRAY)&&s.texParameteri(P,s.TEXTURE_WRAP_R,it[R.wrapR]),s.texParameteri(P,s.TEXTURE_MAG_FILTER,ut[R.magFilter]),s.texParameteri(P,s.TEXTURE_MIN_FILTER,ut[R.minFilter]),R.compareFunction&&(s.texParameteri(P,s.TEXTURE_COMPARE_MODE,s.COMPARE_REF_TO_TEXTURE),s.texParameteri(P,s.TEXTURE_COMPARE_FUNC,bt[R.compareFunction])),t.has("EXT_texture_filter_anisotropic")===!0){if(R.magFilter===Sn||R.minFilter!==ro&&R.minFilter!==$i||R.type===Jn&&t.has("OES_texture_float_linear")===!1)return;if(R.anisotropy>1||n.get(R).__currentAnisotropy){const j=t.get("EXT_texture_filter_anisotropic");s.texParameterf(P,j.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(R.anisotropy,i.getMaxAnisotropy())),n.get(R).__currentAnisotropy=R.anisotropy}}}function ne(P,R){let j=!1;P.__webglInit===void 0&&(P.__webglInit=!0,R.addEventListener("dispose",D));const ot=R.source;let pt=g.get(ot);pt===void 0&&(pt={},g.set(ot,pt));const ct=tt(R);if(ct!==P.__cacheKey){pt[ct]===void 0&&(pt[ct]={texture:s.createTexture(),usedTimes:0},l.memory.textures++,j=!0),pt[ct].usedTimes++;const Gt=pt[P.__cacheKey];Gt!==void 0&&(pt[P.__cacheKey].usedTimes--,Gt.usedTimes===0&&w(R)),P.__cacheKey=ct,P.__webglTexture=pt[ct].texture}return j}function st(P,R,j){let ot=s.TEXTURE_2D;(R.isDataArrayTexture||R.isCompressedArrayTexture)&&(ot=s.TEXTURE_2D_ARRAY),R.isData3DTexture&&(ot=s.TEXTURE_3D);const pt=ne(P,R),ct=R.source;e.bindTexture(ot,P.__webglTexture,s.TEXTURE0+j);const Gt=n.get(ct);if(ct.version!==Gt.__version||pt===!0){e.activeTexture(s.TEXTURE0+j);const Ct=Se.getPrimaries(Se.workingColorSpace),Ot=R.colorSpace===Ts?null:Se.getPrimaries(R.colorSpace),ve=R.colorSpace===Ts||Ct===Ot?s.NONE:s.BROWSER_DEFAULT_WEBGL;s.pixelStorei(s.UNPACK_FLIP_Y_WEBGL,R.flipY),s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,R.premultiplyAlpha),s.pixelStorei(s.UNPACK_ALIGNMENT,R.unpackAlignment),s.pixelStorei(s.UNPACK_COLORSPACE_CONVERSION_WEBGL,ve);let vt=b(R.image,!1,i.maxTextureSize);vt=Qt(R,vt);const Ht=o.convert(R.format,R.colorSpace),Kt=o.convert(R.type);let Jt=A(R.internalFormat,Ht,Kt,R.colorSpace,R.isVideoTexture);It(ot,R);let Bt;const _e=R.mipmaps,ae=R.isVideoTexture!==!0,De=Gt.__version===void 0||pt===!0,k=ct.dataReady,wt=z(R,vt);if(R.isDepthTexture)Jt=T(R.format===ar,R.type),De&&(ae?e.texStorage2D(s.TEXTURE_2D,1,Jt,vt.width,vt.height):e.texImage2D(s.TEXTURE_2D,0,Jt,vt.width,vt.height,0,Ht,Kt,null));else if(R.isDataTexture)if(_e.length>0){ae&&De&&e.texStorage2D(s.TEXTURE_2D,wt,Jt,_e[0].width,_e[0].height);for(let at=0,ft=_e.length;at0){const Ut=Hp(Bt.width,Bt.height,R.format,R.type);for(const Nt of R.layerUpdates){const ce=Bt.data.subarray(Nt*Ut/Bt.data.BYTES_PER_ELEMENT,(Nt+1)*Ut/Bt.data.BYTES_PER_ELEMENT);e.compressedTexSubImage3D(s.TEXTURE_2D_ARRAY,at,0,0,Nt,Bt.width,Bt.height,1,Ht,ce)}R.clearLayerUpdates()}else e.compressedTexSubImage3D(s.TEXTURE_2D_ARRAY,at,0,0,0,Bt.width,Bt.height,vt.depth,Ht,Bt.data)}else e.compressedTexImage3D(s.TEXTURE_2D_ARRAY,at,Jt,Bt.width,Bt.height,vt.depth,0,Bt.data,0,0);else console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");else ae?k&&e.texSubImage3D(s.TEXTURE_2D_ARRAY,at,0,0,0,Bt.width,Bt.height,vt.depth,Ht,Kt,Bt.data):e.texImage3D(s.TEXTURE_2D_ARRAY,at,Jt,Bt.width,Bt.height,vt.depth,0,Ht,Kt,Bt.data)}else{ae&&De&&e.texStorage2D(s.TEXTURE_2D,wt,Jt,_e[0].width,_e[0].height);for(let at=0,ft=_e.length;at0){const at=Hp(vt.width,vt.height,R.format,R.type);for(const ft of R.layerUpdates){const Ut=vt.data.subarray(ft*at/vt.data.BYTES_PER_ELEMENT,(ft+1)*at/vt.data.BYTES_PER_ELEMENT);e.texSubImage3D(s.TEXTURE_2D_ARRAY,0,0,0,ft,vt.width,vt.height,1,Ht,Kt,Ut)}R.clearLayerUpdates()}else e.texSubImage3D(s.TEXTURE_2D_ARRAY,0,0,0,0,vt.width,vt.height,vt.depth,Ht,Kt,vt.data)}else e.texImage3D(s.TEXTURE_2D_ARRAY,0,Jt,vt.width,vt.height,vt.depth,0,Ht,Kt,vt.data);else if(R.isData3DTexture)ae?(De&&e.texStorage3D(s.TEXTURE_3D,wt,Jt,vt.width,vt.height,vt.depth),k&&e.texSubImage3D(s.TEXTURE_3D,0,0,0,0,vt.width,vt.height,vt.depth,Ht,Kt,vt.data)):e.texImage3D(s.TEXTURE_3D,0,Jt,vt.width,vt.height,vt.depth,0,Ht,Kt,vt.data);else if(R.isFramebufferTexture){if(De)if(ae)e.texStorage2D(s.TEXTURE_2D,wt,Jt,vt.width,vt.height);else{let at=vt.width,ft=vt.height;for(let Ut=0;Ut>=1,ft>>=1}}else if(_e.length>0){if(ae&&De){const at=Tt(_e[0]);e.texStorage2D(s.TEXTURE_2D,wt,Jt,at.width,at.height)}for(let at=0,ft=_e.length;at0&&wt++;const ft=Tt(Ht[0]);e.texStorage2D(s.TEXTURE_CUBE_MAP,wt,_e,ft.width,ft.height)}for(let ft=0;ft<6;ft++)if(vt){ae?k&&e.texSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+ft,0,0,0,Ht[ft].width,Ht[ft].height,Jt,Bt,Ht[ft].data):e.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+ft,0,_e,Ht[ft].width,Ht[ft].height,0,Jt,Bt,Ht[ft].data);for(let Ut=0;Ut>ct),Kt=Math.max(1,R.height>>ct);pt===s.TEXTURE_3D||pt===s.TEXTURE_2D_ARRAY?e.texImage3D(pt,ct,Ot,Ht,Kt,R.depth,0,Gt,Ct,null):e.texImage2D(pt,ct,Ot,Ht,Kt,0,Gt,Ct,null)}e.bindFramebuffer(s.FRAMEBUFFER,P),Dt(R)?c.framebufferTexture2DMultisampleEXT(s.FRAMEBUFFER,ot,pt,vt.__webglTexture,0,gt(R)):(pt===s.TEXTURE_2D||pt>=s.TEXTURE_CUBE_MAP_POSITIVE_X&&pt<=s.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&s.framebufferTexture2D(s.FRAMEBUFFER,ot,pt,vt.__webglTexture,ct),e.bindFramebuffer(s.FRAMEBUFFER,null)}function Mt(P,R,j){if(s.bindRenderbuffer(s.RENDERBUFFER,P),R.depthBuffer){const ot=R.depthTexture,pt=ot&&ot.isDepthTexture?ot.type:null,ct=T(R.stencilBuffer,pt),Gt=R.stencilBuffer?s.DEPTH_STENCIL_ATTACHMENT:s.DEPTH_ATTACHMENT,Ct=gt(R);Dt(R)?c.renderbufferStorageMultisampleEXT(s.RENDERBUFFER,Ct,ct,R.width,R.height):j?s.renderbufferStorageMultisample(s.RENDERBUFFER,Ct,ct,R.width,R.height):s.renderbufferStorage(s.RENDERBUFFER,ct,R.width,R.height),s.framebufferRenderbuffer(s.FRAMEBUFFER,Gt,s.RENDERBUFFER,P)}else{const ot=R.textures;for(let pt=0;pt{delete R.__boundDepthTexture,delete R.__depthDisposeCallback,ot.removeEventListener("dispose",pt)};ot.addEventListener("dispose",pt),R.__depthDisposeCallback=pt}R.__boundDepthTexture=ot}if(P.depthTexture&&!R.__autoAllocateDepthBuffer){if(j)throw new Error("target.depthTexture not supported in Cube render targets");Yt(R.__webglFramebuffer,P)}else if(j){R.__webglDepthbuffer=[];for(let ot=0;ot<6;ot++)if(e.bindFramebuffer(s.FRAMEBUFFER,R.__webglFramebuffer[ot]),R.__webglDepthbuffer[ot]===void 0)R.__webglDepthbuffer[ot]=s.createRenderbuffer(),Mt(R.__webglDepthbuffer[ot],P,!1);else{const pt=P.stencilBuffer?s.DEPTH_STENCIL_ATTACHMENT:s.DEPTH_ATTACHMENT,ct=R.__webglDepthbuffer[ot];s.bindRenderbuffer(s.RENDERBUFFER,ct),s.framebufferRenderbuffer(s.FRAMEBUFFER,pt,s.RENDERBUFFER,ct)}}else if(e.bindFramebuffer(s.FRAMEBUFFER,R.__webglFramebuffer),R.__webglDepthbuffer===void 0)R.__webglDepthbuffer=s.createRenderbuffer(),Mt(R.__webglDepthbuffer,P,!1);else{const ot=P.stencilBuffer?s.DEPTH_STENCIL_ATTACHMENT:s.DEPTH_ATTACHMENT,pt=R.__webglDepthbuffer;s.bindRenderbuffer(s.RENDERBUFFER,pt),s.framebufferRenderbuffer(s.FRAMEBUFFER,ot,s.RENDERBUFFER,pt)}e.bindFramebuffer(s.FRAMEBUFFER,null)}function $t(P,R,j){const ot=n.get(P);R!==void 0&&Vt(ot.__webglFramebuffer,P,P.texture,s.COLOR_ATTACHMENT0,s.TEXTURE_2D,0),j!==void 0&&ie(P)}function me(P){const R=P.texture,j=n.get(P),ot=n.get(R);P.addEventListener("dispose",L);const pt=P.textures,ct=P.isWebGLCubeRenderTarget===!0,Gt=pt.length>1;if(Gt||(ot.__webglTexture===void 0&&(ot.__webglTexture=s.createTexture()),ot.__version=R.version,l.memory.textures++),ct){j.__webglFramebuffer=[];for(let Ct=0;Ct<6;Ct++)if(R.mipmaps&&R.mipmaps.length>0){j.__webglFramebuffer[Ct]=[];for(let Ot=0;Ot0){j.__webglFramebuffer=[];for(let Ct=0;Ct0&&Dt(P)===!1){j.__webglMultisampledFramebuffer=s.createFramebuffer(),j.__webglColorRenderbuffer=[],e.bindFramebuffer(s.FRAMEBUFFER,j.__webglMultisampledFramebuffer);for(let Ct=0;Ct0)for(let Ot=0;Ot0)for(let Ot=0;Ot0){if(Dt(P)===!1){const R=P.textures,j=P.width,ot=P.height;let pt=s.COLOR_BUFFER_BIT;const ct=P.stencilBuffer?s.DEPTH_STENCIL_ATTACHMENT:s.DEPTH_ATTACHMENT,Gt=n.get(P),Ct=R.length>1;if(Ct)for(let Ot=0;Ot0&&t.has("WEBGL_multisampled_render_to_texture")===!0&&R.__useRenderToTexture!==!1}function Et(P){const R=l.render.frame;p.get(P)!==R&&(p.set(P,R),P.update())}function Qt(P,R){const j=P.colorSpace,ot=P.format,pt=P.type;return P.isCompressedTexture===!0||P.isVideoTexture===!0||j!==ua&&j!==Ts&&(Se.getTransfer(j)===Be?(ot!==Un||pt!==ki)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",j)),R}function Tt(P){return typeof HTMLImageElement<"u"&&P instanceof HTMLImageElement?(f.width=P.naturalWidth||P.width,f.height=P.naturalHeight||P.height):typeof VideoFrame<"u"&&P instanceof VideoFrame?(f.width=P.displayWidth,f.height=P.displayHeight):(f.width=P.width,f.height=P.height),f}this.allocateTextureUnit=K,this.resetTextureUnits=Z,this.setTexture2D=rt,this.setTexture2DArray=V,this.setTexture3D=et,this.setTextureCube=q,this.rebindTextures=$t,this.setupRenderTarget=me,this.updateRenderTargetMipmap=ht,this.updateMultisampleRenderTarget=kt,this.setupDepthRenderbuffer=ie,this.setupFrameBufferTexture=Vt,this.useMultisampledRTT=Dt}function fx(s,t){function e(n,i=Ts){let o;const l=Se.getTransfer(i);if(n===ki)return s.UNSIGNED_BYTE;if(n===wh)return s.UNSIGNED_SHORT_4_4_4_4;if(n===Rh)return s.UNSIGNED_SHORT_5_5_5_1;if(n===am)return s.UNSIGNED_INT_5_9_9_9_REV;if(n===im)return s.BYTE;if(n===sm)return s.SHORT;if(n===fo)return s.UNSIGNED_SHORT;if(n===Ch)return s.INT;if(n===Ls)return s.UNSIGNED_INT;if(n===Jn)return s.FLOAT;if(n===yo)return s.HALF_FLOAT;if(n===rm)return s.ALPHA;if(n===om)return s.RGB;if(n===Un)return s.RGBA;if(n===lm)return s.LUMINANCE;if(n===cm)return s.LUMINANCE_ALPHA;if(n===tr)return s.DEPTH_COMPONENT;if(n===ar)return s.DEPTH_STENCIL;if(n===Dh)return s.RED;if(n===kl)return s.RED_INTEGER;if(n===um)return s.RG;if(n===Uh)return s.RG_INTEGER;if(n===Nh)return s.RGBA_INTEGER;if(n===pl||n===ml||n===gl||n===vl)if(l===Be)if(o=t.get("WEBGL_compressed_texture_s3tc_srgb"),o!==null){if(n===pl)return o.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(n===ml)return o.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(n===gl)return o.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(n===vl)return o.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(o=t.get("WEBGL_compressed_texture_s3tc"),o!==null){if(n===pl)return o.COMPRESSED_RGB_S3TC_DXT1_EXT;if(n===ml)return o.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(n===gl)return o.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(n===vl)return o.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(n===Wu||n===Xu||n===qu||n===Yu)if(o=t.get("WEBGL_compressed_texture_pvrtc"),o!==null){if(n===Wu)return o.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(n===Xu)return o.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(n===qu)return o.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(n===Yu)return o.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(n===Zu||n===Ku||n===ju)if(o=t.get("WEBGL_compressed_texture_etc"),o!==null){if(n===Zu||n===Ku)return l===Be?o.COMPRESSED_SRGB8_ETC2:o.COMPRESSED_RGB8_ETC2;if(n===ju)return l===Be?o.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:o.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(n===Ju||n===Qu||n===$u||n===th||n===eh||n===nh||n===ih||n===sh||n===ah||n===rh||n===oh||n===lh||n===ch||n===uh)if(o=t.get("WEBGL_compressed_texture_astc"),o!==null){if(n===Ju)return l===Be?o.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:o.COMPRESSED_RGBA_ASTC_4x4_KHR;if(n===Qu)return l===Be?o.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:o.COMPRESSED_RGBA_ASTC_5x4_KHR;if(n===$u)return l===Be?o.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:o.COMPRESSED_RGBA_ASTC_5x5_KHR;if(n===th)return l===Be?o.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:o.COMPRESSED_RGBA_ASTC_6x5_KHR;if(n===eh)return l===Be?o.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:o.COMPRESSED_RGBA_ASTC_6x6_KHR;if(n===nh)return l===Be?o.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:o.COMPRESSED_RGBA_ASTC_8x5_KHR;if(n===ih)return l===Be?o.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:o.COMPRESSED_RGBA_ASTC_8x6_KHR;if(n===sh)return l===Be?o.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:o.COMPRESSED_RGBA_ASTC_8x8_KHR;if(n===ah)return l===Be?o.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:o.COMPRESSED_RGBA_ASTC_10x5_KHR;if(n===rh)return l===Be?o.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:o.COMPRESSED_RGBA_ASTC_10x6_KHR;if(n===oh)return l===Be?o.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:o.COMPRESSED_RGBA_ASTC_10x8_KHR;if(n===lh)return l===Be?o.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:o.COMPRESSED_RGBA_ASTC_10x10_KHR;if(n===ch)return l===Be?o.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:o.COMPRESSED_RGBA_ASTC_12x10_KHR;if(n===uh)return l===Be?o.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:o.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(n===_l||n===hh||n===fh)if(o=t.get("EXT_texture_compression_bptc"),o!==null){if(n===_l)return l===Be?o.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:o.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(n===hh)return o.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(n===fh)return o.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(n===hm||n===dh||n===ph||n===mh)if(o=t.get("EXT_texture_compression_rgtc"),o!==null){if(n===_l)return o.COMPRESSED_RED_RGTC1_EXT;if(n===dh)return o.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(n===ph)return o.COMPRESSED_RED_GREEN_RGTC2_EXT;if(n===mh)return o.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return n===sr?s.UNSIGNED_INT_24_8:s[n]!==void 0?s[n]:null}return{convert:e}}class dx extends vn{constructor(t=[]){super(),this.isArrayCamera=!0,this.cameras=t}}class co extends Re{constructor(){super(),this.isGroup=!0,this.type="Group"}}const zw={type:"move"};class Qd{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new co,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null&&(this._targetRay=new co,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new O,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new O),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new co,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new O,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new O),this._grip}dispatchEvent(t){return this._targetRay!==null&&this._targetRay.dispatchEvent(t),this._grip!==null&&this._grip.dispatchEvent(t),this._hand!==null&&this._hand.dispatchEvent(t),this}connect(t){if(t&&t.hand){const e=this._hand;if(e)for(const n of t.hand.values())this._getHandJoint(e,n)}return this.dispatchEvent({type:"connected",data:t}),this}disconnect(t){return this.dispatchEvent({type:"disconnected",data:t}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(t,e,n){let i=null,o=null,l=null;const c=this._targetRay,h=this._grip,f=this._hand;if(t&&e.session.visibilityState!=="visible-blurred"){if(f&&t.hand){l=!0;for(const b of t.hand.values()){const S=e.getJointPose(b,n),y=this._getHandJoint(f,b);S!==null&&(y.matrix.fromArray(S.transform.matrix),y.matrix.decompose(y.position,y.rotation,y.scale),y.matrixWorldNeedsUpdate=!0,y.jointRadius=S.radius),y.visible=S!==null}const p=f.joints["index-finger-tip"],m=f.joints["thumb-tip"],g=p.position.distanceTo(m.position),_=.02,x=.005;f.inputState.pinching&&g>_+x?(f.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:t.handedness,target:this})):!f.inputState.pinching&&g<=_-x&&(f.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:t.handedness,target:this}))}else h!==null&&t.gripSpace&&(o=e.getPose(t.gripSpace,n),o!==null&&(h.matrix.fromArray(o.transform.matrix),h.matrix.decompose(h.position,h.rotation,h.scale),h.matrixWorldNeedsUpdate=!0,o.linearVelocity?(h.hasLinearVelocity=!0,h.linearVelocity.copy(o.linearVelocity)):h.hasLinearVelocity=!1,o.angularVelocity?(h.hasAngularVelocity=!0,h.angularVelocity.copy(o.angularVelocity)):h.hasAngularVelocity=!1));c!==null&&(i=e.getPose(t.targetRaySpace,n),i===null&&o!==null&&(i=o),i!==null&&(c.matrix.fromArray(i.transform.matrix),c.matrix.decompose(c.position,c.rotation,c.scale),c.matrixWorldNeedsUpdate=!0,i.linearVelocity?(c.hasLinearVelocity=!0,c.linearVelocity.copy(i.linearVelocity)):c.hasLinearVelocity=!1,i.angularVelocity?(c.hasAngularVelocity=!0,c.angularVelocity.copy(i.angularVelocity)):c.hasAngularVelocity=!1,this.dispatchEvent(zw)))}return c!==null&&(c.visible=i!==null),h!==null&&(h.visible=o!==null),f!==null&&(f.visible=l!==null),this}_getHandJoint(t,e){if(t.joints[e.jointName]===void 0){const n=new co;n.matrixAutoUpdate=!1,n.visible=!1,t.joints[e.jointName]=n,t.add(n)}return t.joints[e.jointName]}}const Fw=` +void main() { + + gl_Position = vec4( position, 1.0 ); + +}`,Hw=` +uniform sampler2DArray depthColor; +uniform float depthWidth; +uniform float depthHeight; + +void main() { + + vec2 coord = vec2( gl_FragCoord.x / depthWidth, gl_FragCoord.y / depthHeight ); + + if ( coord.x >= 1.0 ) { + + gl_FragDepth = texture( depthColor, vec3( coord.x - 1.0, coord.y, 1 ) ).r; + + } else { + + gl_FragDepth = texture( depthColor, vec3( coord.x, coord.y, 0 ) ).r; + + } + +}`;class Vw{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(t,e,n){if(this.texture===null){const i=new nn,o=t.properties.get(i);o.__webglTexture=e.texture,(e.depthNear!=n.depthNear||e.depthFar!=n.depthFar)&&(this.depthNear=e.depthNear,this.depthFar=e.depthFar),this.texture=i}}getMesh(t){if(this.texture!==null&&this.mesh===null){const e=t.cameras[0].viewport,n=new Xi({vertexShader:Fw,fragmentShader:Hw,uniforms:{depthColor:{value:this.texture},depthWidth:{value:e.z},depthHeight:{value:e.w}}});this.mesh=new ln(new So(20,20),n)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}}class Gw extends ss{constructor(t,e){super();const n=this;let i=null,o=1,l=null,c="local-floor",h=1,f=null,p=null,m=null,g=null,_=null,x=null;const b=new Vw,S=e.getContextAttributes();let y=null,E=null;const A=[],T=[],z=new dt;let D=null;const L=new vn;L.viewport=new we;const B=new vn;B.viewport=new we;const w=[L,B],C=new dx;let I=null,Z=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(st){let mt=A[st];return mt===void 0&&(mt=new Qd,A[st]=mt),mt.getTargetRaySpace()},this.getControllerGrip=function(st){let mt=A[st];return mt===void 0&&(mt=new Qd,A[st]=mt),mt.getGripSpace()},this.getHand=function(st){let mt=A[st];return mt===void 0&&(mt=new Qd,A[st]=mt),mt.getHandSpace()};function K(st){const mt=T.indexOf(st.inputSource);if(mt===-1)return;const Vt=A[mt];Vt!==void 0&&(Vt.update(st.inputSource,st.frame,f||l),Vt.dispatchEvent({type:st.type,data:st.inputSource}))}function tt(){i.removeEventListener("select",K),i.removeEventListener("selectstart",K),i.removeEventListener("selectend",K),i.removeEventListener("squeeze",K),i.removeEventListener("squeezestart",K),i.removeEventListener("squeezeend",K),i.removeEventListener("end",tt),i.removeEventListener("inputsourceschange",rt);for(let st=0;st=0&&(T[Mt]=null,A[Mt].disconnect(Vt))}for(let mt=0;mt=T.length){T.push(Vt),Mt=ie;break}else if(T[ie]===null){T[ie]=Vt,Mt=ie;break}if(Mt===-1)break}const Yt=A[Mt];Yt&&Yt.connect(Vt)}}const V=new O,et=new O;function q(st,mt,Vt){V.setFromMatrixPosition(mt.matrixWorld),et.setFromMatrixPosition(Vt.matrixWorld);const Mt=V.distanceTo(et),Yt=mt.projectionMatrix.elements,ie=Vt.projectionMatrix.elements,$t=Yt[14]/(Yt[10]-1),me=Yt[14]/(Yt[10]+1),ht=(Yt[9]+1)/Yt[5],_t=(Yt[9]-1)/Yt[5],F=(Yt[8]-1)/Yt[0],kt=(ie[8]+1)/ie[0],gt=$t*F,Dt=$t*kt,Et=Mt/(-F+kt),Qt=Et*-F;if(mt.matrixWorld.decompose(st.position,st.quaternion,st.scale),st.translateX(Qt),st.translateZ(Et),st.matrixWorld.compose(st.position,st.quaternion,st.scale),st.matrixWorldInverse.copy(st.matrixWorld).invert(),Yt[10]===-1)st.projectionMatrix.copy(mt.projectionMatrix),st.projectionMatrixInverse.copy(mt.projectionMatrixInverse);else{const Tt=$t+Et,P=me+Et,R=gt-Qt,j=Dt+(Mt-Qt),ot=ht*me/P*Tt,pt=_t*me/P*Tt;st.projectionMatrix.makePerspective(R,j,ot,pt,Tt,P),st.projectionMatrixInverse.copy(st.projectionMatrix).invert()}}function it(st,mt){mt===null?st.matrixWorld.copy(st.matrix):st.matrixWorld.multiplyMatrices(mt.matrixWorld,st.matrix),st.matrixWorldInverse.copy(st.matrixWorld).invert()}this.updateCamera=function(st){if(i===null)return;let mt=st.near,Vt=st.far;b.texture!==null&&(b.depthNear>0&&(mt=b.depthNear),b.depthFar>0&&(Vt=b.depthFar)),C.near=B.near=L.near=mt,C.far=B.far=L.far=Vt,(I!==C.near||Z!==C.far)&&(i.updateRenderState({depthNear:C.near,depthFar:C.far}),I=C.near,Z=C.far),L.layers.mask=st.layers.mask|2,B.layers.mask=st.layers.mask|4,C.layers.mask=L.layers.mask|B.layers.mask;const Mt=st.parent,Yt=C.cameras;it(C,Mt);for(let ie=0;ie0&&(S.alphaTest.value=y.alphaTest);const E=t.get(y),A=E.envMap,T=E.envMapRotation;A&&(S.envMap.value=A,za.copy(T),za.x*=-1,za.y*=-1,za.z*=-1,A.isCubeTexture&&A.isRenderTargetTexture===!1&&(za.y*=-1,za.z*=-1),S.envMapRotation.value.setFromMatrix4(kw.makeRotationFromEuler(za)),S.flipEnvMap.value=A.isCubeTexture&&A.isRenderTargetTexture===!1?-1:1,S.reflectivity.value=y.reflectivity,S.ior.value=y.ior,S.refractionRatio.value=y.refractionRatio),y.lightMap&&(S.lightMap.value=y.lightMap,S.lightMapIntensity.value=y.lightMapIntensity,e(y.lightMap,S.lightMapTransform)),y.aoMap&&(S.aoMap.value=y.aoMap,S.aoMapIntensity.value=y.aoMapIntensity,e(y.aoMap,S.aoMapTransform))}function l(S,y){S.diffuse.value.copy(y.color),S.opacity.value=y.opacity,y.map&&(S.map.value=y.map,e(y.map,S.mapTransform))}function c(S,y){S.dashSize.value=y.dashSize,S.totalSize.value=y.dashSize+y.gapSize,S.scale.value=y.scale}function h(S,y,E,A){S.diffuse.value.copy(y.color),S.opacity.value=y.opacity,S.size.value=y.size*E,S.scale.value=A*.5,y.map&&(S.map.value=y.map,e(y.map,S.uvTransform)),y.alphaMap&&(S.alphaMap.value=y.alphaMap,e(y.alphaMap,S.alphaMapTransform)),y.alphaTest>0&&(S.alphaTest.value=y.alphaTest)}function f(S,y){S.diffuse.value.copy(y.color),S.opacity.value=y.opacity,S.rotation.value=y.rotation,y.map&&(S.map.value=y.map,e(y.map,S.mapTransform)),y.alphaMap&&(S.alphaMap.value=y.alphaMap,e(y.alphaMap,S.alphaMapTransform)),y.alphaTest>0&&(S.alphaTest.value=y.alphaTest)}function p(S,y){S.specular.value.copy(y.specular),S.shininess.value=Math.max(y.shininess,1e-4)}function m(S,y){y.gradientMap&&(S.gradientMap.value=y.gradientMap)}function g(S,y){S.metalness.value=y.metalness,y.metalnessMap&&(S.metalnessMap.value=y.metalnessMap,e(y.metalnessMap,S.metalnessMapTransform)),S.roughness.value=y.roughness,y.roughnessMap&&(S.roughnessMap.value=y.roughnessMap,e(y.roughnessMap,S.roughnessMapTransform)),y.envMap&&(S.envMapIntensity.value=y.envMapIntensity)}function _(S,y,E){S.ior.value=y.ior,y.sheen>0&&(S.sheenColor.value.copy(y.sheenColor).multiplyScalar(y.sheen),S.sheenRoughness.value=y.sheenRoughness,y.sheenColorMap&&(S.sheenColorMap.value=y.sheenColorMap,e(y.sheenColorMap,S.sheenColorMapTransform)),y.sheenRoughnessMap&&(S.sheenRoughnessMap.value=y.sheenRoughnessMap,e(y.sheenRoughnessMap,S.sheenRoughnessMapTransform))),y.clearcoat>0&&(S.clearcoat.value=y.clearcoat,S.clearcoatRoughness.value=y.clearcoatRoughness,y.clearcoatMap&&(S.clearcoatMap.value=y.clearcoatMap,e(y.clearcoatMap,S.clearcoatMapTransform)),y.clearcoatRoughnessMap&&(S.clearcoatRoughnessMap.value=y.clearcoatRoughnessMap,e(y.clearcoatRoughnessMap,S.clearcoatRoughnessMapTransform)),y.clearcoatNormalMap&&(S.clearcoatNormalMap.value=y.clearcoatNormalMap,e(y.clearcoatNormalMap,S.clearcoatNormalMapTransform),S.clearcoatNormalScale.value.copy(y.clearcoatNormalScale),y.side===Hn&&S.clearcoatNormalScale.value.negate())),y.dispersion>0&&(S.dispersion.value=y.dispersion),y.iridescence>0&&(S.iridescence.value=y.iridescence,S.iridescenceIOR.value=y.iridescenceIOR,S.iridescenceThicknessMinimum.value=y.iridescenceThicknessRange[0],S.iridescenceThicknessMaximum.value=y.iridescenceThicknessRange[1],y.iridescenceMap&&(S.iridescenceMap.value=y.iridescenceMap,e(y.iridescenceMap,S.iridescenceMapTransform)),y.iridescenceThicknessMap&&(S.iridescenceThicknessMap.value=y.iridescenceThicknessMap,e(y.iridescenceThicknessMap,S.iridescenceThicknessMapTransform))),y.transmission>0&&(S.transmission.value=y.transmission,S.transmissionSamplerMap.value=E.texture,S.transmissionSamplerSize.value.set(E.width,E.height),y.transmissionMap&&(S.transmissionMap.value=y.transmissionMap,e(y.transmissionMap,S.transmissionMapTransform)),S.thickness.value=y.thickness,y.thicknessMap&&(S.thicknessMap.value=y.thicknessMap,e(y.thicknessMap,S.thicknessMapTransform)),S.attenuationDistance.value=y.attenuationDistance,S.attenuationColor.value.copy(y.attenuationColor)),y.anisotropy>0&&(S.anisotropyVector.value.set(y.anisotropy*Math.cos(y.anisotropyRotation),y.anisotropy*Math.sin(y.anisotropyRotation)),y.anisotropyMap&&(S.anisotropyMap.value=y.anisotropyMap,e(y.anisotropyMap,S.anisotropyMapTransform))),S.specularIntensity.value=y.specularIntensity,S.specularColor.value.copy(y.specularColor),y.specularColorMap&&(S.specularColorMap.value=y.specularColorMap,e(y.specularColorMap,S.specularColorMapTransform)),y.specularIntensityMap&&(S.specularIntensityMap.value=y.specularIntensityMap,e(y.specularIntensityMap,S.specularIntensityMapTransform))}function x(S,y){y.matcap&&(S.matcap.value=y.matcap)}function b(S,y){const E=t.get(y).light;S.referencePosition.value.setFromMatrixPosition(E.matrixWorld),S.nearDistance.value=E.shadow.camera.near,S.farDistance.value=E.shadow.camera.far}return{refreshFogUniforms:n,refreshMaterialUniforms:i}}function Xw(s,t,e,n){let i={},o={},l=[];const c=s.getParameter(s.MAX_UNIFORM_BUFFER_BINDINGS);function h(E,A){const T=A.program;n.uniformBlockBinding(E,T)}function f(E,A){let T=i[E.id];T===void 0&&(x(E),T=p(E),i[E.id]=T,E.addEventListener("dispose",S));const z=A.program;n.updateUBOMapping(E,z);const D=t.render.frame;o[E.id]!==D&&(g(E),o[E.id]=D)}function p(E){const A=m();E.__bindingPointIndex=A;const T=s.createBuffer(),z=E.__size,D=E.usage;return s.bindBuffer(s.UNIFORM_BUFFER,T),s.bufferData(s.UNIFORM_BUFFER,z,D),s.bindBuffer(s.UNIFORM_BUFFER,null),s.bindBufferBase(s.UNIFORM_BUFFER,A,T),T}function m(){for(let E=0;E0&&(T+=z-D),E.__size=T,E.__cache={},this}function b(E){const A={boundary:0,storage:0};return typeof E=="number"||typeof E=="boolean"?(A.boundary=4,A.storage=4):E.isVector2?(A.boundary=8,A.storage=8):E.isVector3||E.isColor?(A.boundary=16,A.storage=12):E.isVector4?(A.boundary=16,A.storage=16):E.isMatrix3?(A.boundary=48,A.storage=48):E.isMatrix4?(A.boundary=64,A.storage=64):E.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",E),A}function S(E){const A=E.target;A.removeEventListener("dispose",S);const T=l.indexOf(A.__bindingPointIndex);l.splice(T,1),s.deleteBuffer(i[A.id]),delete i[A.id],delete o[A.id]}function y(){for(const E in i)s.deleteBuffer(i[E]);l=[],i={},o={}}return{bind:h,update:f,dispose:y}}class px{constructor(t={}){const{canvas:e=$y(),context:n=null,depth:i=!0,stencil:o=!1,alpha:l=!1,antialias:c=!1,premultipliedAlpha:h=!0,preserveDrawingBuffer:f=!1,powerPreference:p="default",failIfMajorPerformanceCaveat:m=!1,reverseDepthBuffer:g=!1}=t;this.isWebGLRenderer=!0;let _;if(n!==null){if(typeof WebGLRenderingContext<"u"&&n instanceof WebGLRenderingContext)throw new Error("THREE.WebGLRenderer: WebGL 1 is not supported since r163.");_=n.getContextAttributes().alpha}else _=l;const x=new Uint32Array(4),b=new Int32Array(4);let S=null,y=null;const E=[],A=[];this.domElement=e,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this._outputColorSpace=Dn,this.toneMapping=es,this.toneMappingExposure=1;const T=this;let z=!1,D=0,L=0,B=null,w=-1,C=null;const I=new we,Z=new we;let K=null;const tt=new zt(0);let rt=0,V=e.width,et=e.height,q=1,it=null,ut=null;const bt=new we(0,0,V,et),It=new we(0,0,V,et);let ne=!1;const st=new ql;let mt=!1,Vt=!1;const Mt=new ee,Yt=new ee,ie=new O,$t=new we,me={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};let ht=!1;function _t(){return B===null?q:1}let F=n;function kt(N,W){return e.getContext(N,W)}try{const N={alpha:!0,depth:i,stencil:o,antialias:c,premultipliedAlpha:h,preserveDrawingBuffer:f,powerPreference:p,failIfMajorPerformanceCaveat:m};if("setAttribute"in e&&e.setAttribute("data-engine",`three.js r${Eh}`),e.addEventListener("webglcontextlost",ft,!1),e.addEventListener("webglcontextrestored",Ut,!1),e.addEventListener("webglcontextcreationerror",Nt,!1),F===null){const W="webgl2";if(F=kt(W,N),F===null)throw kt(W)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}}catch(N){throw console.error("THREE.WebGLRenderer: "+N.message),N}let gt,Dt,Et,Qt,Tt,P,R,j,ot,pt,ct,Gt,Ct,Ot,ve,vt,Ht,Kt,Jt,Bt,_e,ae,De,k;function wt(){gt=new JA(F),gt.init(),ae=new fx(F,gt),Dt=new XA(F,gt,t,ae),Et=new Uw(F,gt),Dt.reverseDepthBuffer&&g&&Et.buffers.depth.setReversed(!0),Qt=new tC(F),Tt=new _w,P=new Bw(F,gt,Et,Tt,Dt,ae,Qt),R=new YA(T),j=new jA(T),ot=new o1(F),De=new kA(F,ot),pt=new QA(F,ot,Qt,De),ct=new nC(F,pt,ot,Qt),Jt=new eC(F,Dt,P),vt=new qA(Tt),Gt=new vw(T,R,j,gt,Dt,De,vt),Ct=new Ww(T,Tt),Ot=new xw,ve=new Aw(gt),Kt=new GA(T,R,j,Et,ct,_,h),Ht=new Rw(T,ct,Dt),k=new Xw(F,Qt,Dt,Et),Bt=new WA(F,gt,Qt),_e=new $A(F,gt,Qt),Qt.programs=Gt.programs,T.capabilities=Dt,T.extensions=gt,T.properties=Tt,T.renderLists=Ot,T.shadowMap=Ht,T.state=Et,T.info=Qt}wt();const at=new Gw(T,F);this.xr=at,this.getContext=function(){return F},this.getContextAttributes=function(){return F.getContextAttributes()},this.forceContextLoss=function(){const N=gt.get("WEBGL_lose_context");N&&N.loseContext()},this.forceContextRestore=function(){const N=gt.get("WEBGL_lose_context");N&&N.restoreContext()},this.getPixelRatio=function(){return q},this.setPixelRatio=function(N){N!==void 0&&(q=N,this.setSize(V,et,!1))},this.getSize=function(N){return N.set(V,et)},this.setSize=function(N,W,$=!0){if(at.isPresenting){console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting.");return}V=N,et=W,e.width=Math.floor(N*q),e.height=Math.floor(W*q),$===!0&&(e.style.width=N+"px",e.style.height=W+"px"),this.setViewport(0,0,N,W)},this.getDrawingBufferSize=function(N){return N.set(V*q,et*q).floor()},this.setDrawingBufferSize=function(N,W,$){V=N,et=W,q=$,e.width=Math.floor(N*$),e.height=Math.floor(W*$),this.setViewport(0,0,N,W)},this.getCurrentViewport=function(N){return N.copy(I)},this.getViewport=function(N){return N.copy(bt)},this.setViewport=function(N,W,$,J){N.isVector4?bt.set(N.x,N.y,N.z,N.w):bt.set(N,W,$,J),Et.viewport(I.copy(bt).multiplyScalar(q).round())},this.getScissor=function(N){return N.copy(It)},this.setScissor=function(N,W,$,J){N.isVector4?It.set(N.x,N.y,N.z,N.w):It.set(N,W,$,J),Et.scissor(Z.copy(It).multiplyScalar(q).round())},this.getScissorTest=function(){return ne},this.setScissorTest=function(N){Et.setScissorTest(ne=N)},this.setOpaqueSort=function(N){it=N},this.setTransparentSort=function(N){ut=N},this.getClearColor=function(N){return N.copy(Kt.getClearColor())},this.setClearColor=function(){Kt.setClearColor.apply(Kt,arguments)},this.getClearAlpha=function(){return Kt.getClearAlpha()},this.setClearAlpha=function(){Kt.setClearAlpha.apply(Kt,arguments)},this.clear=function(N=!0,W=!0,$=!0){let J=0;if(N){let G=!1;if(B!==null){const xt=B.texture.format;G=xt===Nh||xt===Uh||xt===kl}if(G){const xt=B.texture.type,Rt=xt===ki||xt===Ls||xt===fo||xt===sr||xt===wh||xt===Rh,Wt=Kt.getClearColor(),Ft=Kt.getClearAlpha(),te=Wt.r,re=Wt.g,Xt=Wt.b;Rt?(x[0]=te,x[1]=re,x[2]=Xt,x[3]=Ft,F.clearBufferuiv(F.COLOR,0,x)):(b[0]=te,b[1]=re,b[2]=Xt,b[3]=Ft,F.clearBufferiv(F.COLOR,0,b))}else J|=F.COLOR_BUFFER_BIT}W&&(J|=F.DEPTH_BUFFER_BIT),$&&(J|=F.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),F.clear(J)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.dispose=function(){e.removeEventListener("webglcontextlost",ft,!1),e.removeEventListener("webglcontextrestored",Ut,!1),e.removeEventListener("webglcontextcreationerror",Nt,!1),Ot.dispose(),ve.dispose(),Tt.dispose(),R.dispose(),j.dispose(),ct.dispose(),De.dispose(),k.dispose(),Gt.dispose(),at.dispose(),at.removeEventListener("sessionstart",To),at.removeEventListener("sessionend",fr),Di.stop()};function ft(N){N.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),z=!0}function Ut(){console.log("THREE.WebGLRenderer: Context Restored."),z=!1;const N=Qt.autoReset,W=Ht.enabled,$=Ht.autoUpdate,J=Ht.needsUpdate,G=Ht.type;wt(),Qt.autoReset=N,Ht.enabled=W,Ht.autoUpdate=$,Ht.needsUpdate=J,Ht.type=G}function Nt(N){console.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ",N.statusMessage)}function ce(N){const W=N.target;W.removeEventListener("dispose",ce),Ge(W)}function Ge(N){je(N),Tt.remove(N)}function je(N){const W=Tt.get(N).programs;W!==void 0&&(W.forEach(function($){Gt.releaseProgram($)}),N.isShaderMaterial&&Gt.releaseShaderCache(N))}this.renderBufferDirect=function(N,W,$,J,G,xt){W===null&&(W=me);const Rt=G.isMesh&&G.matrixWorld.determinant()<0,Wt=tc(N,W,$,J,G);Et.setMaterial(J,Rt);let Ft=$.index,te=1;if(J.wireframe===!0){if(Ft=pt.getWireframeAttribute($),Ft===void 0)return;te=2}const re=$.drawRange,Xt=$.attributes.position;let Me=re.start*te,Pe=(re.start+re.count)*te;xt!==null&&(Me=Math.max(Me,xt.start*te),Pe=Math.min(Pe,(xt.start+xt.count)*te)),Ft!==null?(Me=Math.max(Me,0),Pe=Math.min(Pe,Ft.count)):Xt!=null&&(Me=Math.max(Me,0),Pe=Math.min(Pe,Xt.count));const ze=Pe-Me;if(ze<0||ze===1/0)return;De.setup(G,J,Wt,$,Ft);let _n,Te=Bt;if(Ft!==null&&(_n=ot.get(Ft),Te=_e,Te.setIndex(_n)),G.isMesh)J.wireframe===!0?(Et.setLineWidth(J.wireframeLinewidth*_t()),Te.setMode(F.LINES)):Te.setMode(F.TRIANGLES);else if(G.isLine){let Zt=J.linewidth;Zt===void 0&&(Zt=1),Et.setLineWidth(Zt*_t()),G.isLineSegments?Te.setMode(F.LINES):G.isLineLoop?Te.setMode(F.LINE_LOOP):Te.setMode(F.LINE_STRIP)}else G.isPoints?Te.setMode(F.POINTS):G.isSprite&&Te.setMode(F.TRIANGLES);if(G.isBatchedMesh)if(G._multiDrawInstances!==null)Te.renderMultiDrawInstances(G._multiDrawStarts,G._multiDrawCounts,G._multiDrawCount,G._multiDrawInstances);else if(gt.get("WEBGL_multi_draw"))Te.renderMultiDraw(G._multiDrawStarts,G._multiDrawCounts,G._multiDrawCount);else{const Zt=G._multiDrawStarts,ti=G._multiDrawCounts,Ae=G._multiDrawCount,ei=Ft?ot.get(Ft).bytesPerElement:1,rs=Tt.get(J).currentProgram.getUniforms();for(let Mn=0;Mn{function xt(){if(J.forEach(function(Rt){Tt.get(Rt).currentProgram.isReady()&&J.delete(Rt)}),J.size===0){G(N);return}setTimeout(xt,10)}gt.get("KHR_parallel_shader_compile")!==null?xt():setTimeout(xt,10)})};let kn=null;function _i(N){kn&&kn(N)}function To(){Di.stop()}function fr(){Di.start()}const Di=new ox;Di.setAnimationLoop(_i),typeof self<"u"&&Di.setContext(self),this.setAnimationLoop=function(N){kn=N,at.setAnimationLoop(N),N===null?Di.stop():Di.start()},at.addEventListener("sessionstart",To),at.addEventListener("sessionend",fr),this.render=function(N,W){if(W!==void 0&&W.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(z===!0)return;if(N.matrixWorldAutoUpdate===!0&&N.updateMatrixWorld(),W.parent===null&&W.matrixWorldAutoUpdate===!0&&W.updateMatrixWorld(),at.enabled===!0&&at.isPresenting===!0&&(at.cameraAutoUpdate===!0&&at.updateCamera(W),W=at.getCamera()),N.isScene===!0&&N.onBeforeRender(T,N,W,B),y=ve.get(N,A.length),y.init(W),A.push(y),Yt.multiplyMatrices(W.projectionMatrix,W.matrixWorldInverse),st.setFromProjectionMatrix(Yt),Vt=this.localClippingEnabled,mt=vt.init(this.clippingPlanes,Vt),S=Ot.get(N,E.length),S.init(),E.push(S),at.enabled===!0&&at.isPresenting===!0){const xt=T.xr.getDepthSensingMesh();xt!==null&&yi(xt,W,-1/0,T.sortObjects)}yi(N,W,0,T.sortObjects),S.finish(),T.sortObjects===!0&&S.sort(it,ut),ht=at.enabled===!1||at.isPresenting===!1||at.hasDepthSensing()===!1,ht&&Kt.addToRenderList(S,N),this.info.render.frame++,mt===!0&&vt.beginShadows();const $=y.state.shadowsArray;Ht.render($,N,W),mt===!0&&vt.endShadows(),this.info.autoReset===!0&&this.info.reset();const J=S.opaque,G=S.transmissive;if(y.setupLights(),W.isArrayCamera){const xt=W.cameras;if(G.length>0)for(let Rt=0,Wt=xt.length;Rt0&&Ui(J,G,N,W),ht&&Kt.render(N),Ao(S,N,W);B!==null&&(P.updateMultisampleRenderTarget(B),P.updateRenderTargetMipmap(B)),N.isScene===!0&&N.onAfterRender(T,N,W),De.resetDefaultState(),w=-1,C=null,A.pop(),A.length>0?(y=A[A.length-1],mt===!0&&vt.setGlobalState(T.clippingPlanes,y.state.camera)):y=null,E.pop(),E.length>0?S=E[E.length-1]:S=null};function yi(N,W,$,J){if(N.visible===!1)return;if(N.layers.test(W.layers)){if(N.isGroup)$=N.renderOrder;else if(N.isLOD)N.autoUpdate===!0&&N.update(W);else if(N.isLight)y.pushLight(N),N.castShadow&&y.pushShadow(N);else if(N.isSprite){if(!N.frustumCulled||st.intersectsSprite(N)){J&&$t.setFromMatrixPosition(N.matrixWorld).applyMatrix4(Yt);const Rt=ct.update(N),Wt=N.material;Wt.visible&&S.push(N,Rt,Wt,$,$t.z,null)}}else if((N.isMesh||N.isLine||N.isPoints)&&(!N.frustumCulled||st.intersectsObject(N))){const Rt=ct.update(N),Wt=N.material;if(J&&(N.boundingSphere!==void 0?(N.boundingSphere===null&&N.computeBoundingSphere(),$t.copy(N.boundingSphere.center)):(Rt.boundingSphere===null&&Rt.computeBoundingSphere(),$t.copy(Rt.boundingSphere.center)),$t.applyMatrix4(N.matrixWorld).applyMatrix4(Yt)),Array.isArray(Wt)){const Ft=Rt.groups;for(let te=0,re=Ft.length;te0&&Wn(G,W,$),xt.length>0&&Wn(xt,W,$),Rt.length>0&&Wn(Rt,W,$),Et.buffers.depth.setTest(!0),Et.buffers.depth.setMask(!0),Et.buffers.color.setMask(!0),Et.setPolygonOffset(!1)}function Ui(N,W,$,J){if(($.isScene===!0?$.overrideMaterial:null)!==null)return;y.state.transmissionRenderTarget[J.id]===void 0&&(y.state.transmissionRenderTarget[J.id]=new Wi(1,1,{generateMipmaps:!0,type:gt.has("EXT_color_buffer_half_float")||gt.has("EXT_color_buffer_float")?yo:ki,minFilter:$i,samples:4,stencilBuffer:o,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:Se.workingColorSpace}));const xt=y.state.transmissionRenderTarget[J.id],Rt=J.viewport||I;xt.setSize(Rt.z,Rt.w);const Wt=T.getRenderTarget();T.setRenderTarget(xt),T.getClearColor(tt),rt=T.getClearAlpha(),rt<1&&T.setClearColor(16777215,.5),T.clear(),ht&&Kt.render($);const Ft=T.toneMapping;T.toneMapping=es;const te=J.viewport;if(J.viewport!==void 0&&(J.viewport=void 0),y.setupLightsView(J),mt===!0&&vt.setGlobalState(T.clippingPlanes,J),Wn(N,$,J),P.updateMultisampleRenderTarget(xt),P.updateRenderTargetMipmap(xt),gt.has("WEBGL_multisampled_render_to_texture")===!1){let re=!1;for(let Xt=0,Me=W.length;Xt0),Xt=!!$.morphAttributes.position,Me=!!$.morphAttributes.normal,Pe=!!$.morphAttributes.color;let ze=es;J.toneMapped&&(B===null||B.isXRRenderTarget===!0)&&(ze=T.toneMapping);const _n=$.morphAttributes.position||$.morphAttributes.normal||$.morphAttributes.color,Te=_n!==void 0?_n.length:0,Zt=Tt.get(J),ti=y.state.lights;if(mt===!0&&(Vt===!0||N!==C)){const Pn=N===C&&J.id===w;vt.setState(J,N,Pn)}let Ae=!1;J.version===Zt.__version?(Zt.needsLights&&Zt.lightsStateVersion!==ti.state.version||Zt.outputColorSpace!==Wt||G.isBatchedMesh&&Zt.batching===!1||!G.isBatchedMesh&&Zt.batching===!0||G.isBatchedMesh&&Zt.batchingColor===!0&&G.colorTexture===null||G.isBatchedMesh&&Zt.batchingColor===!1&&G.colorTexture!==null||G.isInstancedMesh&&Zt.instancing===!1||!G.isInstancedMesh&&Zt.instancing===!0||G.isSkinnedMesh&&Zt.skinning===!1||!G.isSkinnedMesh&&Zt.skinning===!0||G.isInstancedMesh&&Zt.instancingColor===!0&&G.instanceColor===null||G.isInstancedMesh&&Zt.instancingColor===!1&&G.instanceColor!==null||G.isInstancedMesh&&Zt.instancingMorph===!0&&G.morphTexture===null||G.isInstancedMesh&&Zt.instancingMorph===!1&&G.morphTexture!==null||Zt.envMap!==Ft||J.fog===!0&&Zt.fog!==xt||Zt.numClippingPlanes!==void 0&&(Zt.numClippingPlanes!==vt.numPlanes||Zt.numIntersection!==vt.numIntersection)||Zt.vertexAlphas!==te||Zt.vertexTangents!==re||Zt.morphTargets!==Xt||Zt.morphNormals!==Me||Zt.morphColors!==Pe||Zt.toneMapping!==ze||Zt.morphTargetsCount!==Te)&&(Ae=!0):(Ae=!0,Zt.__version=J.version);let ei=Zt.currentProgram;Ae===!0&&(ei=ke(J,W,G));let rs=!1,Mn=!1,Is=!1;const Ie=ei.getUniforms(),ni=Zt.uniforms;if(Et.useProgram(ei.program)&&(rs=!0,Mn=!0,Is=!0),J.id!==w&&(w=J.id,Mn=!0),rs||C!==N){Et.buffers.depth.getReversed()?(Mt.copy(N.projectionMatrix),NE(Mt),LE(Mt),Ie.setValue(F,"projectionMatrix",Mt)):Ie.setValue(F,"projectionMatrix",N.projectionMatrix),Ie.setValue(F,"viewMatrix",N.matrixWorldInverse);const Ni=Ie.map.cameraPosition;Ni!==void 0&&Ni.setValue(F,ie.setFromMatrixPosition(N.matrixWorld)),Dt.logarithmicDepthBuffer&&Ie.setValue(F,"logDepthBufFC",2/(Math.log(N.far+1)/Math.LN2)),(J.isMeshPhongMaterial||J.isMeshToonMaterial||J.isMeshLambertMaterial||J.isMeshBasicMaterial||J.isMeshStandardMaterial||J.isShaderMaterial)&&Ie.setValue(F,"isOrthographic",N.isOrthographicCamera===!0),C!==N&&(C=N,Mn=!0,Is=!0)}if(G.isSkinnedMesh){Ie.setOptional(F,G,"bindMatrix"),Ie.setOptional(F,G,"bindMatrixInverse");const Pn=G.skeleton;Pn&&(Pn.boneTexture===null&&Pn.computeBoneTexture(),Ie.setValue(F,"boneTexture",Pn.boneTexture,P))}G.isBatchedMesh&&(Ie.setOptional(F,G,"batchingTexture"),Ie.setValue(F,"batchingTexture",G._matricesTexture,P),Ie.setOptional(F,G,"batchingIdTexture"),Ie.setValue(F,"batchingIdTexture",G._indirectTexture,P),Ie.setOptional(F,G,"batchingColorTexture"),G._colorsTexture!==null&&Ie.setValue(F,"batchingColorTexture",G._colorsTexture,P));const Os=$.morphAttributes;if((Os.position!==void 0||Os.normal!==void 0||Os.color!==void 0)&&Jt.update(G,$,ei),(Mn||Zt.receiveShadow!==G.receiveShadow)&&(Zt.receiveShadow=G.receiveShadow,Ie.setValue(F,"receiveShadow",G.receiveShadow)),J.isMeshGouraudMaterial&&J.envMap!==null&&(ni.envMap.value=Ft,ni.flipEnvMap.value=Ft.isCubeTexture&&Ft.isRenderTargetTexture===!1?-1:1),J.isMeshStandardMaterial&&J.envMap===null&&W.environment!==null&&(ni.envMapIntensity.value=W.environmentIntensity),Mn&&(Ie.setValue(F,"toneMappingExposure",T.toneMappingExposure),Zt.needsLights&&ec(ni,Is),xt&&J.fog===!0&&Ct.refreshFogUniforms(ni,xt),Ct.refreshMaterialUniforms(ni,J,q,et,y.state.transmissionRenderTarget[N.id]),Nu.upload(F,dr(Zt),ni,P)),J.isShaderMaterial&&J.uniformsNeedUpdate===!0&&(Nu.upload(F,dr(Zt),ni,P),J.uniformsNeedUpdate=!1),J.isSpriteMaterial&&Ie.setValue(F,"center",G.center),Ie.setValue(F,"modelViewMatrix",G.modelViewMatrix),Ie.setValue(F,"normalMatrix",G.normalMatrix),Ie.setValue(F,"modelMatrix",G.matrixWorld),J.isShaderMaterial||J.isRawShaderMaterial){const Pn=J.uniformsGroups;for(let Ni=0,Li=Pn.length;Ni0&&P.useMultisampledRTT(N)===!1?G=Tt.get(N).__webglMultisampledFramebuffer:Array.isArray(re)?G=re[$]:G=re,I.copy(N.viewport),Z.copy(N.scissor),K=N.scissorTest}else I.copy(bt).multiplyScalar(q).floor(),Z.copy(It).multiplyScalar(q).floor(),K=ne;if(Et.bindFramebuffer(F.FRAMEBUFFER,G)&&J&&Et.drawBuffers(N,G),Et.viewport(I),Et.scissor(Z),Et.setScissorTest(K),xt){const Ft=Tt.get(N.texture);F.framebufferTexture2D(F.FRAMEBUFFER,F.COLOR_ATTACHMENT0,F.TEXTURE_CUBE_MAP_POSITIVE_X+W,Ft.__webglTexture,$)}else if(Rt){const Ft=Tt.get(N.texture),te=W||0;F.framebufferTextureLayer(F.FRAMEBUFFER,F.COLOR_ATTACHMENT0,Ft.__webglTexture,$||0,te)}w=-1},this.readRenderTargetPixels=function(N,W,$,J,G,xt,Rt){if(!(N&&N.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let Wt=Tt.get(N).__webglFramebuffer;if(N.isWebGLCubeRenderTarget&&Rt!==void 0&&(Wt=Wt[Rt]),Wt){Et.bindFramebuffer(F.FRAMEBUFFER,Wt);try{const Ft=N.texture,te=Ft.format,re=Ft.type;if(!Dt.textureFormatReadable(te)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}if(!Dt.textureTypeReadable(re)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}W>=0&&W<=N.width-J&&$>=0&&$<=N.height-G&&F.readPixels(W,$,J,G,ae.convert(te),ae.convert(re),xt)}finally{const Ft=B!==null?Tt.get(B).__webglFramebuffer:null;Et.bindFramebuffer(F.FRAMEBUFFER,Ft)}}},this.readRenderTargetPixelsAsync=async function(N,W,$,J,G,xt,Rt){if(!(N&&N.isWebGLRenderTarget))throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let Wt=Tt.get(N).__webglFramebuffer;if(N.isWebGLCubeRenderTarget&&Rt!==void 0&&(Wt=Wt[Rt]),Wt){const Ft=N.texture,te=Ft.format,re=Ft.type;if(!Dt.textureFormatReadable(te))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!Dt.textureTypeReadable(re))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");if(W>=0&&W<=N.width-J&&$>=0&&$<=N.height-G){Et.bindFramebuffer(F.FRAMEBUFFER,Wt);const Xt=F.createBuffer();F.bindBuffer(F.PIXEL_PACK_BUFFER,Xt),F.bufferData(F.PIXEL_PACK_BUFFER,xt.byteLength,F.STREAM_READ),F.readPixels(W,$,J,G,ae.convert(te),ae.convert(re),0);const Me=B!==null?Tt.get(B).__webglFramebuffer:null;Et.bindFramebuffer(F.FRAMEBUFFER,Me);const Pe=F.fenceSync(F.SYNC_GPU_COMMANDS_COMPLETE,0);return F.flush(),await UE(F,Pe,4),F.bindBuffer(F.PIXEL_PACK_BUFFER,Xt),F.getBufferSubData(F.PIXEL_PACK_BUFFER,0,xt),F.deleteBuffer(Xt),F.deleteSync(Pe),xt}else throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: requested read bounds are out of range.")}},this.copyFramebufferToTexture=function(N,W=null,$=0){N.isTexture!==!0&&(cl("WebGLRenderer: copyFramebufferToTexture function signature has changed."),W=arguments[0]||null,N=arguments[1]);const J=Math.pow(2,-$),G=Math.floor(N.image.width*J),xt=Math.floor(N.image.height*J),Rt=W!==null?W.x:0,Wt=W!==null?W.y:0;P.setTexture2D(N,0),F.copyTexSubImage2D(F.TEXTURE_2D,$,0,0,Rt,Wt,G,xt),Et.unbindTexture()},this.copyTextureToTexture=function(N,W,$=null,J=null,G=0){N.isTexture!==!0&&(cl("WebGLRenderer: copyTextureToTexture function signature has changed."),J=arguments[0]||null,N=arguments[1],W=arguments[2],G=arguments[3]||0,$=null);let xt,Rt,Wt,Ft,te,re,Xt,Me,Pe;const ze=N.isCompressedTexture?N.mipmaps[G]:N.image;$!==null?(xt=$.max.x-$.min.x,Rt=$.max.y-$.min.y,Wt=$.isBox3?$.max.z-$.min.z:1,Ft=$.min.x,te=$.min.y,re=$.isBox3?$.min.z:0):(xt=ze.width,Rt=ze.height,Wt=ze.depth||1,Ft=0,te=0,re=0),J!==null?(Xt=J.x,Me=J.y,Pe=J.z):(Xt=0,Me=0,Pe=0);const _n=ae.convert(W.format),Te=ae.convert(W.type);let Zt;W.isData3DTexture?(P.setTexture3D(W,0),Zt=F.TEXTURE_3D):W.isDataArrayTexture||W.isCompressedArrayTexture?(P.setTexture2DArray(W,0),Zt=F.TEXTURE_2D_ARRAY):(P.setTexture2D(W,0),Zt=F.TEXTURE_2D),F.pixelStorei(F.UNPACK_FLIP_Y_WEBGL,W.flipY),F.pixelStorei(F.UNPACK_PREMULTIPLY_ALPHA_WEBGL,W.premultiplyAlpha),F.pixelStorei(F.UNPACK_ALIGNMENT,W.unpackAlignment);const ti=F.getParameter(F.UNPACK_ROW_LENGTH),Ae=F.getParameter(F.UNPACK_IMAGE_HEIGHT),ei=F.getParameter(F.UNPACK_SKIP_PIXELS),rs=F.getParameter(F.UNPACK_SKIP_ROWS),Mn=F.getParameter(F.UNPACK_SKIP_IMAGES);F.pixelStorei(F.UNPACK_ROW_LENGTH,ze.width),F.pixelStorei(F.UNPACK_IMAGE_HEIGHT,ze.height),F.pixelStorei(F.UNPACK_SKIP_PIXELS,Ft),F.pixelStorei(F.UNPACK_SKIP_ROWS,te),F.pixelStorei(F.UNPACK_SKIP_IMAGES,re);const Is=N.isDataArrayTexture||N.isData3DTexture,Ie=W.isDataArrayTexture||W.isData3DTexture;if(N.isRenderTargetTexture||N.isDepthTexture){const ni=Tt.get(N),Os=Tt.get(W),Pn=Tt.get(ni.__renderTarget),Ni=Tt.get(Os.__renderTarget);Et.bindFramebuffer(F.READ_FRAMEBUFFER,Pn.__webglFramebuffer),Et.bindFramebuffer(F.DRAW_FRAMEBUFFER,Ni.__webglFramebuffer);for(let Li=0;Li0&&(e.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(e.object.backgroundIntensity=this.backgroundIntensity),e.object.backgroundRotation=this.backgroundRotation.toArray(),this.environmentIntensity!==1&&(e.object.environmentIntensity=this.environmentIntensity),e.object.environmentRotation=this.environmentRotation.toArray(),e}}class Fh{constructor(t,e){this.isInterleavedBuffer=!0,this.array=t,this.stride=e,this.count=t!==void 0?t.length/e:0,this.usage=Rl,this.updateRanges=[],this.version=0,this.uuid=gi()}onUploadCallback(){}set needsUpdate(t){t===!0&&this.version++}setUsage(t){return this.usage=t,this}addUpdateRange(t,e){this.updateRanges.push({start:t,count:e})}clearUpdateRanges(){this.updateRanges.length=0}copy(t){return this.array=new t.array.constructor(t.array),this.count=t.count,this.stride=t.stride,this.usage=t.usage,this}copyAt(t,e,n){t*=this.stride,n*=e.stride;for(let i=0,o=this.stride;it.far||e.push({distance:h,point:tl.clone(),uv:jn.getInterpolation(tl,su,nl,au,q0,$d,Y0,new dt),face:null,object:this})}copy(t,e){return super.copy(t,e),t.center!==void 0&&this.center.copy(t.center),this.material=t.material,this}}function ru(s,t,e,n,i,o){no.subVectors(s,e).addScalar(.5).multiply(n),i!==void 0?(el.x=o*no.x-i*no.y,el.y=i*no.x+o*no.y):el.copy(no),s.copy(t),s.x+=el.x,s.y+=el.y,s.applyMatrix4(mx)}const ou=new O,Z0=new O;class vx extends Re{constructor(){super(),this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]},isLOD:{value:!0}}),this.autoUpdate=!0}copy(t){super.copy(t,!1);const e=t.levels;for(let n=0,i=e.length;n0){let n,i;for(n=1,i=e.length;n0){ou.setFromMatrixPosition(this.matrixWorld);const i=t.ray.origin.distanceTo(ou);this.getObjectForDistance(i).raycast(t,e)}}update(t){const e=this.levels;if(e.length>1){ou.setFromMatrixPosition(t.matrixWorld),Z0.setFromMatrixPosition(this.matrixWorld);const n=ou.distanceTo(Z0)/t.zoom;e[0].object.visible=!0;let i,o;for(i=1,o=e.length;i=l)e[i-1].object.visible=!1,e[i].object.visible=!0;else break}for(this._currentLevel=i-1;i=o.length&&o.push({start:-1,count:-1,z:-1,index:-1});const c=o[this.index];l.push(c),this.index++,c.start=t,c.count=e,c.z=n,c.index=i}reset(){this.list.length=0,this.index=0}}const Yn=new ee,Qw=new zt(1,1,1),ip=new ql,uu=new Vn,Fa=new Nn,al=new O,i_=new O,$w=new O,sp=new Jw,Rn=new ln,hu=[];function tR(s,t,e=0){const n=t.itemSize;if(s.isInterleavedBufferAttribute||s.array.constructor!==t.array.constructor){const i=s.count;for(let o=0;o65535?new Uint32Array(i):new Uint16Array(i);e.setIndex(new Ve(o,1))}this._geometryInitialized=!0}}_validateGeometry(t){const e=this.geometry;if(!!t.getIndex()!=!!e.getIndex())throw new Error('BatchedMesh: All geometries must consistently have "index".');for(const n in e.attributes){if(!t.hasAttribute(n))throw new Error(`BatchedMesh: Added geometry missing "${n}". All geometries must have consistent attributes.`);const i=t.getAttribute(n),o=e.getAttribute(n);if(i.itemSize!==o.itemSize||i.normalized!==o.normalized)throw new Error("BatchedMesh: All attributes must have a consistent itemSize and normalized value.")}}setCustomSort(t){return this.customSort=t,this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new Vn);const t=this.boundingBox,e=this._instanceInfo;t.makeEmpty();for(let n=0,i=e.length;n=this.maxInstanceCount&&this._availableInstanceIds.length===0)throw new Error("BatchedMesh: Maximum item count reached.");const n={visible:!0,active:!0,geometryIndex:t};let i=null;this._availableInstanceIds.length>0?(this._availableInstanceIds.sort(np),i=this._availableInstanceIds.shift(),this._instanceInfo[i]=n):(i=this._instanceInfo.length,this._instanceInfo.push(n));const o=this._matricesTexture;Yn.identity().toArray(o.image.data,i*16),o.needsUpdate=!0;const l=this._colorsTexture;return l&&(Qw.toArray(l.image.data,i*4),l.needsUpdate=!0),this._visibilityChanged=!0,i}addGeometry(t,e=-1,n=-1){this._initializeGeometry(t),this._validateGeometry(t);const i={vertexStart:-1,vertexCount:-1,reservedVertexCount:-1,indexStart:-1,indexCount:-1,reservedIndexCount:-1,start:-1,count:-1,boundingBox:null,boundingSphere:null,active:!0},o=this._geometryInfo;i.vertexStart=this._nextVertexStart,i.reservedVertexCount=e===-1?t.getAttribute("position").count:e;const l=t.getIndex();if(l!==null&&(i.indexStart=this._nextIndexStart,i.reservedIndexCount=n===-1?l.count:n),i.indexStart!==-1&&i.indexStart+i.reservedIndexCount>this._maxIndexCount||i.vertexStart+i.reservedVertexCount>this._maxVertexCount)throw new Error("BatchedMesh: Reserved space request exceeds the maximum buffer size.");let h;return this._availableGeometryIds.length>0?(this._availableGeometryIds.sort(np),h=this._availableGeometryIds.shift(),o[h]=i):(h=this._geometryCount,this._geometryCount++,o.push(i)),this.setGeometryAt(h,t),this._nextIndexStart=i.indexStart+i.reservedIndexCount,this._nextVertexStart=i.vertexStart+i.reservedVertexCount,h}setGeometryAt(t,e){if(t>=this._geometryCount)throw new Error("BatchedMesh: Maximum geometry count reached.");this._validateGeometry(e);const n=this.geometry,i=n.getIndex()!==null,o=n.getIndex(),l=e.getIndex(),c=this._geometryInfo[t];if(i&&l.count>c.reservedIndexCount||e.attributes.position.count>c.reservedVertexCount)throw new Error("BatchedMesh: Reserved space not large enough for provided geometry.");const h=c.vertexStart,f=c.reservedVertexCount;c.vertexCount=e.getAttribute("position").count;for(const p in n.attributes){const m=e.getAttribute(p),g=n.getAttribute(p);tR(m,g,h);const _=m.itemSize;for(let x=m.count,b=f;x=e.length||e[t].active===!1)return this;const n=this._instanceInfo;for(let i=0,o=n.length;i=e.length||e[t].active===!1?this:(e[t].active=!1,this._availableInstanceIds.push(t),this._visibilityChanged=!0,this)}optimize(){let t=0,e=0;const n=this._geometryInfo,i=n.map((l,c)=>c).sort((l,c)=>n[l].vertexStart-n[c].vertexStart),o=this.geometry;for(let l=0,c=n.length;l=this._geometryCount)return null;const n=this.geometry,i=this._geometryInfo[t];if(i.boundingBox===null){const o=new Vn,l=n.index,c=n.attributes.position;for(let h=i.start,f=i.start+i.count;h=this._geometryCount)return null;const n=this.geometry,i=this._geometryInfo[t];if(i.boundingSphere===null){const o=new Nn;this.getBoundingBoxAt(t,uu),uu.getCenter(o.center);const l=n.index,c=n.attributes.position;let h=0;for(let f=i.start,p=i.start+i.count;f=n.length||n[t].active===!1?this:(e.toArray(o,t*16),i.needsUpdate=!0,this)}getMatrixAt(t,e){const n=this._instanceInfo,i=this._matricesTexture.image.data;return t>=n.length||n[t].active===!1?null:e.fromArray(i,t*16)}setColorAt(t,e){this._colorsTexture===null&&this._initColorsTexture();const n=this._colorsTexture,i=this._colorsTexture.image.data,o=this._instanceInfo;return t>=o.length||o[t].active===!1?this:(e.toArray(i,t*4),n.needsUpdate=!0,this)}getColorAt(t,e){const n=this._colorsTexture.image.data,i=this._instanceInfo;return t>=i.length||i[t].active===!1?null:e.fromArray(n,t*4)}setVisibleAt(t,e){const n=this._instanceInfo;return t>=n.length||n[t].active===!1||n[t].visible===e?this:(n[t].visible=e,this._visibilityChanged=!0,this)}getVisibleAt(t){const e=this._instanceInfo;return t>=e.length||e[t].active===!1?!1:e[t].visible}setGeometryIdAt(t,e){const n=this._instanceInfo,i=this._geometryInfo;return t>=n.length||n[t].active===!1||e>=i.length||i[e].active===!1?null:(n[t].geometryIndex=e,this)}getGeometryIdAt(t){const e=this._instanceInfo;return t>=e.length||e[t].active===!1?-1:e[t].geometryIndex}getGeometryRangeAt(t,e={}){if(t<0||t>=this._geometryCount)return null;const n=this._geometryInfo[t];return e.vertexStart=n.vertexStart,e.vertexCount=n.vertexCount,e.reservedVertexCount=n.reservedVertexCount,e.indexStart=n.indexStart,e.indexCount=n.indexCount,e.reservedIndexCount=n.reservedIndexCount,e.start=n.start,e.count=n.count,e}setInstanceCount(t){const e=this._availableInstanceIds,n=this._instanceInfo;for(e.sort(np);e[e.length-1]===n.length;)n.pop(),e.pop();if(tc.active);if(Math.max(...n.map(c=>c.vertexStart+c.reservedVertexCount))>t)throw new Error(`BatchedMesh: Geometry vertex values are being used outside the range ${e}. Cannot shrink further.`);if(this.geometry.index&&Math.max(...n.map(h=>h.indexStart+h.reservedIndexCount))>e)throw new Error(`BatchedMesh: Geometry index values are being used outside the range ${e}. Cannot shrink further.`);const o=this.geometry;o.dispose(),this._maxVertexCount=t,this._maxIndexCount=e,this._geometryInitialized&&(this._geometryInitialized=!1,this.geometry=new pe,this._initializeGeometry(o));const l=this.geometry;o.index&&Ha(o.index.array,l.index.array);for(const c in o.attributes)Ha(o.attributes[c].array,l.attributes[c].array)}raycast(t,e){const n=this._instanceInfo,i=this._geometryInfo,o=this.matrixWorld,l=this.geometry;Rn.material=this.material,Rn.geometry.index=l.index,Rn.geometry.attributes=l.attributes,Rn.geometry.boundingBox===null&&(Rn.geometry.boundingBox=new Vn),Rn.geometry.boundingSphere===null&&(Rn.geometry.boundingSphere=new Nn);for(let c=0,h=n.length;c({...e,boundingBox:e.boundingBox!==null?e.boundingBox.clone():null,boundingSphere:e.boundingSphere!==null?e.boundingSphere.clone():null})),this._instanceInfo=t._instanceInfo.map(e=>({...e})),this._maxInstanceCount=t._maxInstanceCount,this._maxVertexCount=t._maxVertexCount,this._maxIndexCount=t._maxIndexCount,this._geometryInitialized=t._geometryInitialized,this._geometryCount=t._geometryCount,this._multiDrawCounts=t._multiDrawCounts.slice(),this._multiDrawStarts=t._multiDrawStarts.slice(),this._matricesTexture=t._matricesTexture.clone(),this._matricesTexture.image.data=this._matricesTexture.image.data.slice(),this._colorsTexture!==null&&(this._colorsTexture=t._colorsTexture.clone(),this._colorsTexture.image.data=this._colorsTexture.image.data.slice()),this}dispose(){return this.geometry.dispose(),this._matricesTexture.dispose(),this._matricesTexture=null,this._indirectTexture.dispose(),this._indirectTexture=null,this._colorsTexture!==null&&(this._colorsTexture.dispose(),this._colorsTexture=null),this}onBeforeRender(t,e,n,i,o){if(!this._visibilityChanged&&!this.perObjectFrustumCulled&&!this.sortObjects)return;const l=i.getIndex(),c=l===null?1:l.array.BYTES_PER_ELEMENT,h=this._instanceInfo,f=this._multiDrawStarts,p=this._multiDrawCounts,m=this._geometryInfo,g=this.perObjectFrustumCulled,_=this._indirectTexture,x=_.image.data;g&&(Yn.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse).multiply(this.matrixWorld),ip.setFromProjectionMatrix(Yn,t.coordinateSystem));let b=0;if(this.sortObjects){Yn.copy(this.matrixWorld).invert(),al.setFromMatrixPosition(n.matrixWorld).applyMatrix4(Yn),i_.set(0,0,-1).transformDirection(n.matrixWorld).transformDirection(Yn);for(let E=0,A=h.length;E0){const i=e[n[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,l=i.length;on)return;ap.applyMatrix4(s.matrixWorld);const h=t.ray.origin.distanceTo(ap);if(!(ht.far))return{distance:h,point:a_.clone().applyMatrix4(s.matrixWorld),index:i,face:null,faceIndex:null,barycoord:null,object:s}}const r_=new O,o_=new O;class as extends la{constructor(t,e){super(t,e),this.isLineSegments=!0,this.type="LineSegments"}computeLineDistances(){const t=this.geometry;if(t.index===null){const e=t.attributes.position,n=[];for(let i=0,o=e.count;i0){const i=e[n[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,l=i.length;oi.far)return;o.push({distance:f,distanceToRay:Math.sqrt(c),point:h,index:t,face:null,faceIndex:null,barycoord:null,object:l})}}class eR extends nn{constructor(t,e,n,i,o,l,c,h,f){super(t,e,n,i,o,l,c,h,f),this.isVideoTexture=!0,this.minFilter=l!==void 0?l:un,this.magFilter=o!==void 0?o:un,this.generateMipmaps=!1;const p=this;function m(){p.needsUpdate=!0,t.requestVideoFrameCallback(m)}"requestVideoFrameCallback"in t&&t.requestVideoFrameCallback(m)}clone(){return new this.constructor(this.image).copy(this)}update(){const t=this.image;"requestVideoFrameCallback"in t===!1&&t.readyState>=t.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}class nR extends nn{constructor(t,e){super({width:t,height:e}),this.isFramebufferTexture=!0,this.magFilter=Sn,this.minFilter=Sn,this.generateMipmaps=!1,this.needsUpdate=!0}}class Vh extends nn{constructor(t,e,n,i,o,l,c,h,f,p,m,g){super(null,l,c,h,f,p,i,o,m,g),this.isCompressedTexture=!0,this.image={width:e,height:n},this.mipmaps=t,this.flipY=!1,this.generateMipmaps=!1}}class iR extends Vh{constructor(t,e,n,i,o,l){super(t,e,n,o,l),this.isCompressedArrayTexture=!0,this.image.depth=i,this.wrapR=Ri,this.layerUpdates=new Set}addLayerUpdate(t){this.layerUpdates.add(t)}clearLayerUpdates(){this.layerUpdates.clear()}}class sR extends Vh{constructor(t,e,n){super(void 0,t[0].width,t[0].height,e,n,Ns),this.isCompressedCubeTexture=!0,this.isCubeTexture=!0,this.image=t}}class aR extends nn{constructor(t,e,n,i,o,l,c,h,f){super(t,e,n,i,o,l,c,h,f),this.isCanvasTexture=!0,this.needsUpdate=!0}}class qi{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}getPointAt(t,e){const n=this.getUtoTmapping(t);return this.getPoint(n,e)}getPoints(t=5){const e=[];for(let n=0;n<=t;n++)e.push(this.getPoint(n/t));return e}getSpacedPoints(t=5){const e=[];for(let n=0;n<=t;n++)e.push(this.getPointAt(n/t));return e}getLength(){const t=this.getLengths();return t[t.length-1]}getLengths(t=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const e=[];let n,i=this.getPoint(0),o=0;e.push(0);for(let l=1;l<=t;l++)n=this.getPoint(l/t),o+=n.distanceTo(i),e.push(o),i=n;return this.cacheArcLengths=e,e}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(t,e){const n=this.getLengths();let i=0;const o=n.length;let l;e?l=e:l=t*n[o-1];let c=0,h=o-1,f;for(;c<=h;)if(i=Math.floor(c+(h-c)/2),f=n[i]-l,f<0)c=i+1;else if(f>0)h=i-1;else{h=i;break}if(i=h,n[i]===l)return i/(o-1);const p=n[i],g=n[i+1]-p,_=(l-p)/g;return(i+_)/(o-1)}getTangent(t,e){let i=t-1e-4,o=t+1e-4;i<0&&(i=0),o>1&&(o=1);const l=this.getPoint(i),c=this.getPoint(o),h=e||(l.isVector2?new dt:new O);return h.copy(c).sub(l).normalize(),h}getTangentAt(t,e){const n=this.getUtoTmapping(t);return this.getTangent(n,e)}computeFrenetFrames(t,e){const n=new O,i=[],o=[],l=[],c=new O,h=new ee;for(let _=0;_<=t;_++){const x=_/t;i[_]=this.getTangentAt(x,new O)}o[0]=new O,l[0]=new O;let f=Number.MAX_VALUE;const p=Math.abs(i[0].x),m=Math.abs(i[0].y),g=Math.abs(i[0].z);p<=f&&(f=p,n.set(1,0,0)),m<=f&&(f=m,n.set(0,1,0)),g<=f&&n.set(0,0,1),c.crossVectors(i[0],n).normalize(),o[0].crossVectors(i[0],c),l[0].crossVectors(i[0],o[0]);for(let _=1;_<=t;_++){if(o[_]=o[_-1].clone(),l[_]=l[_-1].clone(),c.crossVectors(i[_-1],i[_]),c.length()>Number.EPSILON){c.normalize();const x=Math.acos(en(i[_-1].dot(i[_]),-1,1));o[_].applyMatrix4(h.makeRotationAxis(c,x))}l[_].crossVectors(i[_],o[_])}if(e===!0){let _=Math.acos(en(o[0].dot(o[t]),-1,1));_/=t,i[0].dot(c.crossVectors(o[0],o[t]))>0&&(_=-_);for(let x=1;x<=t;x++)o[x].applyMatrix4(h.makeRotationAxis(i[x],_*x)),l[x].crossVectors(i[x],o[x])}return{tangents:i,normals:o,binormals:l}}clone(){return new this.constructor().copy(this)}copy(t){return this.arcLengthDivisions=t.arcLengthDivisions,this}toJSON(){const t={metadata:{version:4.6,type:"Curve",generator:"Curve.toJSON"}};return t.arcLengthDivisions=this.arcLengthDivisions,t.type=this.type,t}fromJSON(t){return this.arcLengthDivisions=t.arcLengthDivisions,this}}class Gh extends qi{constructor(t=0,e=0,n=1,i=1,o=0,l=Math.PI*2,c=!1,h=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=t,this.aY=e,this.xRadius=n,this.yRadius=i,this.aStartAngle=o,this.aEndAngle=l,this.aClockwise=c,this.aRotation=h}getPoint(t,e=new dt){const n=e,i=Math.PI*2;let o=this.aEndAngle-this.aStartAngle;const l=Math.abs(o)i;)o-=i;o0?0:(Math.floor(Math.abs(c)/o)+1)*o:h===0&&c===o-1&&(c=o-2,h=1);let f,p;this.closed||c>0?f=i[(c-1)%o]:(gu.subVectors(i[0],i[1]).add(i[0]),f=gu);const m=i[c%o],g=i[(c+1)%o];if(this.closed||c+2i.length-2?i.length-1:l+1],m=i[l>i.length-3?i.length-1:l+2];return n.set(u_(c,h.x,f.x,p.x,m.x),u_(c,h.y,f.y,p.y,m.y)),n}copy(t){super.copy(t),this.points=[];for(let e=0,n=t.points.length;e=n){const l=i[o]-n,c=this.curves[o],h=c.getLength(),f=h===0?0:1-l/h;return c.getPointAt(f,e)}o++}return null}getLength(){const t=this.getCurveLengths();return t[t.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;const t=[];let e=0;for(let n=0,i=this.curves.length;n1&&!e[e.length-1].equals(e[0])&&e.push(e[0]),e}copy(t){super.copy(t),this.curves=[];for(let e=0,n=t.curves.length;e0){const m=f.getPoint(0);m.equals(this.currentPoint)||this.lineTo(m.x,m.y)}this.curves.push(f);const p=f.getPoint(1);return this.currentPoint.copy(p),this}copy(t){return super.copy(t),this.currentPoint.copy(t.currentPoint),this}toJSON(){const t=super.toJSON();return t.currentPoint=this.currentPoint.toArray(),t}fromJSON(t){return super.fromJSON(t),this.currentPoint.fromArray(t.currentPoint),this}}class Zl extends pe{constructor(t=[new dt(0,-.5),new dt(.5,0),new dt(0,.5)],e=12,n=0,i=Math.PI*2){super(),this.type="LatheGeometry",this.parameters={points:t,segments:e,phiStart:n,phiLength:i},e=Math.floor(e),i=en(i,0,Math.PI*2);const o=[],l=[],c=[],h=[],f=[],p=1/e,m=new O,g=new dt,_=new O,x=new O,b=new O;let S=0,y=0;for(let E=0;E<=t.length-1;E++)switch(E){case 0:S=t[E+1].x-t[E].x,y=t[E+1].y-t[E].y,_.x=y*1,_.y=-S,_.z=y*0,b.copy(_),_.normalize(),h.push(_.x,_.y,_.z);break;case t.length-1:h.push(b.x,b.y,b.z);break;default:S=t[E+1].x-t[E].x,y=t[E+1].y-t[E].y,_.x=y*1,_.y=-S,_.z=y*0,x.copy(_),_.x+=b.x,_.y+=b.y,_.z+=b.z,_.normalize(),h.push(_.x,_.y,_.z),b.copy(x)}for(let E=0;E<=e;E++){const A=n+E*p*i,T=Math.sin(A),z=Math.cos(A);for(let D=0;D<=t.length-1;D++){m.x=t[D].x*T,m.y=t[D].y,m.z=t[D].x*z,l.push(m.x,m.y,m.z),g.x=E/e,g.y=D/(t.length-1),c.push(g.x,g.y);const L=h[3*D+0]*T,B=h[3*D+1],w=h[3*D+0]*z;f.push(L,B,w)}}for(let E=0;E0&&A(!0),e>0&&A(!1)),this.setIndex(p),this.setAttribute("position",new qt(m,3)),this.setAttribute("normal",new qt(g,3)),this.setAttribute("uv",new qt(_,2));function E(){const T=new O,z=new O;let D=0;const L=(e-t)/n;for(let B=0;B<=o;B++){const w=[],C=B/o,I=C*(e-t)+t;for(let Z=0;Z<=i;Z++){const K=Z/i,tt=K*h+c,rt=Math.sin(tt),V=Math.cos(tt);z.x=I*rt,z.y=-C*n+S,z.z=I*V,m.push(z.x,z.y,z.z),T.set(rt,L,V).normalize(),g.push(T.x,T.y,T.z),_.push(K,1-C),w.push(x++)}b.push(w)}for(let B=0;B0||w!==0)&&(p.push(C,I,K),D+=3),(e>0||w!==o-1)&&(p.push(I,Z,K),D+=3)}f.addGroup(y,D,0),y+=D}function A(T){const z=x,D=new dt,L=new O;let B=0;const w=T===!0?t:e,C=T===!0?1:-1;for(let Z=1;Z<=i;Z++)m.push(0,S*C,0),g.push(0,C,0),_.push(.5,.5),x++;const I=x;for(let Z=0;Z<=i;Z++){const tt=Z/i*h+c,rt=Math.cos(tt),V=Math.sin(tt);L.x=w*V,L.y=S*C,L.z=w*rt,m.push(L.x,L.y,L.z),g.push(0,C,0),D.x=rt*.5+.5,D.y=V*.5*C+.5,_.push(D.x,D.y),x++}for(let Z=0;Z.9&&L<.1&&(A<.2&&(l[E+0]+=1),T<.2&&(l[E+2]+=1),z<.2&&(l[E+4]+=1))}}function g(E){o.push(E.x,E.y,E.z)}function _(E,A){const T=E*3;A.x=t[T+0],A.y=t[T+1],A.z=t[T+2]}function x(){const E=new O,A=new O,T=new O,z=new O,D=new dt,L=new dt,B=new dt;for(let w=0,C=0;w80*e){c=f=s[0],h=p=s[1];for(let x=e;xf&&(f=m),g>p&&(p=g);_=Math.max(f-c,p-h),_=_!==0?32767/_:0}return Ll(o,l,e,c,h,_,0),l}};function Rx(s,t,e,n,i){let o,l;if(i===RR(s,t,e,n)>0)for(o=t;o=t;o-=n)l=h_(o,s[o],s[o+1],l);return l&&Yh(l,l.next)&&(Il(l),l=l.next),l}function or(s,t){if(!s)return s;t||(t=s);let e=s,n;do if(n=!1,!e.steiner&&(Yh(e,e.next)||Ke(e.prev,e,e.next)===0)){if(Il(e),e=t=e.prev,e===e.next)break;n=!0}else e=e.next;while(n||e!==t);return t}function Ll(s,t,e,n,i,o,l){if(!s)return;!l&&o&&bR(s,n,i,o);let c=s,h,f;for(;s.prev!==s.next;){if(h=s.prev,f=s.next,o?mR(s,n,i,o):pR(s)){t.push(h.i/e|0),t.push(s.i/e|0),t.push(f.i/e|0),Il(s),s=f.next,c=f.next;continue}if(s=f,s===c){l?l===1?(s=gR(or(s),t,e),Ll(s,t,e,n,i,o,2)):l===2&&vR(s,t,e,n,i,o):Ll(or(s),t,e,n,i,o,1);break}}}function pR(s){const t=s.prev,e=s,n=s.next;if(Ke(t,e,n)>=0)return!1;const i=t.x,o=e.x,l=n.x,c=t.y,h=e.y,f=n.y,p=io?i>l?i:l:o>l?o:l,_=c>h?c>f?c:f:h>f?h:f;let x=n.next;for(;x!==t;){if(x.x>=p&&x.x<=g&&x.y>=m&&x.y<=_&&uo(i,c,o,h,l,f,x.x,x.y)&&Ke(x.prev,x,x.next)>=0)return!1;x=x.next}return!0}function mR(s,t,e,n){const i=s.prev,o=s,l=s.next;if(Ke(i,o,l)>=0)return!1;const c=i.x,h=o.x,f=l.x,p=i.y,m=o.y,g=l.y,_=ch?c>f?c:f:h>f?h:f,S=p>m?p>g?p:g:m>g?m:g,y=Gp(_,x,t,e,n),E=Gp(b,S,t,e,n);let A=s.prevZ,T=s.nextZ;for(;A&&A.z>=y&&T&&T.z<=E;){if(A.x>=_&&A.x<=b&&A.y>=x&&A.y<=S&&A!==i&&A!==l&&uo(c,p,h,m,f,g,A.x,A.y)&&Ke(A.prev,A,A.next)>=0||(A=A.prevZ,T.x>=_&&T.x<=b&&T.y>=x&&T.y<=S&&T!==i&&T!==l&&uo(c,p,h,m,f,g,T.x,T.y)&&Ke(T.prev,T,T.next)>=0))return!1;T=T.nextZ}for(;A&&A.z>=y;){if(A.x>=_&&A.x<=b&&A.y>=x&&A.y<=S&&A!==i&&A!==l&&uo(c,p,h,m,f,g,A.x,A.y)&&Ke(A.prev,A,A.next)>=0)return!1;A=A.prevZ}for(;T&&T.z<=E;){if(T.x>=_&&T.x<=b&&T.y>=x&&T.y<=S&&T!==i&&T!==l&&uo(c,p,h,m,f,g,T.x,T.y)&&Ke(T.prev,T,T.next)>=0)return!1;T=T.nextZ}return!0}function gR(s,t,e){let n=s;do{const i=n.prev,o=n.next.next;!Yh(i,o)&&Dx(i,n,n.next,o)&&Pl(i,o)&&Pl(o,i)&&(t.push(i.i/e|0),t.push(n.i/e|0),t.push(o.i/e|0),Il(n),Il(n.next),n=s=o),n=n.next}while(n!==s);return or(n)}function vR(s,t,e,n,i,o){let l=s;do{let c=l.next.next;for(;c!==l.prev;){if(l.i!==c.i&&AR(l,c)){let h=Ux(l,c);l=or(l,l.next),h=or(h,h.next),Ll(l,t,e,n,i,o,0),Ll(h,t,e,n,i,o,0);return}c=c.next}l=l.next}while(l!==s)}function _R(s,t,e,n){const i=[];let o,l,c,h,f;for(o=0,l=t.length;o=e.next.y&&e.next.y!==e.y){const g=e.x+(l-e.y)*(e.next.x-e.x)/(e.next.y-e.y);if(g<=o&&g>n&&(n=g,i=e.x=e.x&&e.x>=h&&o!==e.x&&uo(li.x||e.x===i.x&&MR(i,e)))&&(i=e,p=m)),e=e.next;while(e!==c);return i}function MR(s,t){return Ke(s.prev,s,t.prev)<0&&Ke(t.next,s,s.next)<0}function bR(s,t,e,n){let i=s;do i.z===0&&(i.z=Gp(i.x,i.y,t,e,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;while(i!==s);i.prevZ.nextZ=null,i.prevZ=null,ER(i)}function ER(s){let t,e,n,i,o,l,c,h,f=1;do{for(e=s,s=null,o=null,l=0;e;){for(l++,n=e,c=0,t=0;t0||h>0&&n;)c!==0&&(h===0||!n||e.z<=n.z)?(i=e,e=e.nextZ,c--):(i=n,n=n.nextZ,h--),o?o.nextZ=i:s=i,i.prevZ=o,o=i;e=n}o.nextZ=null,f*=2}while(l>1);return s}function Gp(s,t,e,n,i){return s=(s-e)*i|0,t=(t-n)*i|0,s=(s|s<<8)&16711935,s=(s|s<<4)&252645135,s=(s|s<<2)&858993459,s=(s|s<<1)&1431655765,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,s|t<<1}function TR(s){let t=s,e=s;do(t.x=(s-l)*(o-c)&&(s-l)*(n-c)>=(e-l)*(t-c)&&(e-l)*(o-c)>=(i-l)*(n-c)}function AR(s,t){return s.next.i!==t.i&&s.prev.i!==t.i&&!CR(s,t)&&(Pl(s,t)&&Pl(t,s)&&wR(s,t)&&(Ke(s.prev,s,t.prev)||Ke(s,t.prev,t))||Yh(s,t)&&Ke(s.prev,s,s.next)>0&&Ke(t.prev,t,t.next)>0)}function Ke(s,t,e){return(t.y-s.y)*(e.x-t.x)-(t.x-s.x)*(e.y-t.y)}function Yh(s,t){return s.x===t.x&&s.y===t.y}function Dx(s,t,e,n){const i=Su(Ke(s,t,e)),o=Su(Ke(s,t,n)),l=Su(Ke(e,n,s)),c=Su(Ke(e,n,t));return!!(i!==o&&l!==c||i===0&&xu(s,e,t)||o===0&&xu(s,n,t)||l===0&&xu(e,s,n)||c===0&&xu(e,t,n))}function xu(s,t,e){return t.x<=Math.max(s.x,e.x)&&t.x>=Math.min(s.x,e.x)&&t.y<=Math.max(s.y,e.y)&&t.y>=Math.min(s.y,e.y)}function Su(s){return s>0?1:s<0?-1:0}function CR(s,t){let e=s;do{if(e.i!==s.i&&e.next.i!==s.i&&e.i!==t.i&&e.next.i!==t.i&&Dx(e,e.next,s,t))return!0;e=e.next}while(e!==s);return!1}function Pl(s,t){return Ke(s.prev,s,s.next)<0?Ke(s,t,s.next)>=0&&Ke(s,s.prev,t)>=0:Ke(s,t,s.prev)<0||Ke(s,s.next,t)<0}function wR(s,t){let e=s,n=!1;const i=(s.x+t.x)/2,o=(s.y+t.y)/2;do e.y>o!=e.next.y>o&&e.next.y!==e.y&&i<(e.next.x-e.x)*(o-e.y)/(e.next.y-e.y)+e.x&&(n=!n),e=e.next;while(e!==s);return n}function Ux(s,t){const e=new kp(s.i,s.x,s.y),n=new kp(t.i,t.x,t.y),i=s.next,o=t.prev;return s.next=t,t.prev=s,e.next=i,i.prev=e,n.next=e,e.prev=n,o.next=n,n.prev=o,n}function h_(s,t,e,n){const i=new kp(s,t,e);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function Il(s){s.next.prev=s.prev,s.prev.next=s.next,s.prevZ&&(s.prevZ.nextZ=s.nextZ),s.nextZ&&(s.nextZ.prevZ=s.prevZ)}function kp(s,t,e){this.i=s,this.x=t,this.y=e,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function RR(s,t,e,n){let i=0;for(let o=t,l=e-n;o2&&s[t-1].equals(s[0])&&s.pop()}function d_(s,t){for(let e=0;eNumber.EPSILON){const ot=Math.sqrt(R),pt=Math.sqrt(Tt*Tt+P*P),ct=_t.x-Qt/ot,Gt=_t.y+Et/ot,Ct=F.x-P/pt,Ot=F.y+Tt/pt,ve=((Ct-ct)*P-(Ot-Gt)*Tt)/(Et*P-Qt*Tt);kt=ct+Et*ve-ht.x,gt=Gt+Qt*ve-ht.y;const vt=kt*kt+gt*gt;if(vt<=2)return new dt(kt,gt);Dt=Math.sqrt(vt/2)}else{let ot=!1;Et>Number.EPSILON?Tt>Number.EPSILON&&(ot=!0):Et<-Number.EPSILON?Tt<-Number.EPSILON&&(ot=!0):Math.sign(Qt)===Math.sign(P)&&(ot=!0),ot?(kt=-Qt,gt=Et,Dt=Math.sqrt(R)):(kt=Et,gt=Qt,Dt=Math.sqrt(R/2))}return new dt(kt/Dt,gt/Dt)}const it=[];for(let ht=0,_t=tt.length,F=_t-1,kt=ht+1;ht<_t;ht++,F++,kt++)F===_t&&(F=0),kt===_t&&(kt=0),it[ht]=q(tt[ht],tt[F],tt[kt]);const ut=[];let bt,It=it.concat();for(let ht=0,_t=I.length;ht<_t;ht++){const F=I[ht];bt=[];for(let kt=0,gt=F.length,Dt=gt-1,Et=kt+1;kt=0;ht--){const _t=ht/S,F=_*Math.cos(_t*Math.PI/2),kt=x*Math.sin(_t*Math.PI/2)+b;for(let gt=0,Dt=tt.length;gt=0;){const kt=F;let gt=F-1;gt<0&&(gt=ht.length-1);for(let Dt=0,Et=p+S*2;Dt0)&&_.push(A,T,D),(y!==n-1||h0!=t>0&&this.version++,this._anisotropy=t}get clearcoat(){return this._clearcoat}set clearcoat(t){this._clearcoat>0!=t>0&&this.version++,this._clearcoat=t}get iridescence(){return this._iridescence}set iridescence(t){this._iridescence>0!=t>0&&this.version++,this._iridescence=t}get dispersion(){return this._dispersion}set dispersion(t){this._dispersion>0!=t>0&&this.version++,this._dispersion=t}get sheen(){return this._sheen}set sheen(t){this._sheen>0!=t>0&&this.version++,this._sheen=t}get transmission(){return this._transmission}set transmission(t){this._transmission>0!=t>0&&this.version++,this._transmission=t}copy(t){return super.copy(t),this.defines={STANDARD:"",PHYSICAL:""},this.anisotropy=t.anisotropy,this.anisotropyRotation=t.anisotropyRotation,this.anisotropyMap=t.anisotropyMap,this.clearcoat=t.clearcoat,this.clearcoatMap=t.clearcoatMap,this.clearcoatRoughness=t.clearcoatRoughness,this.clearcoatRoughnessMap=t.clearcoatRoughnessMap,this.clearcoatNormalMap=t.clearcoatNormalMap,this.clearcoatNormalScale.copy(t.clearcoatNormalScale),this.dispersion=t.dispersion,this.ior=t.ior,this.iridescence=t.iridescence,this.iridescenceMap=t.iridescenceMap,this.iridescenceIOR=t.iridescenceIOR,this.iridescenceThicknessRange=[...t.iridescenceThicknessRange],this.iridescenceThicknessMap=t.iridescenceThicknessMap,this.sheen=t.sheen,this.sheenColor.copy(t.sheenColor),this.sheenColorMap=t.sheenColorMap,this.sheenRoughness=t.sheenRoughness,this.sheenRoughnessMap=t.sheenRoughnessMap,this.transmission=t.transmission,this.transmissionMap=t.transmissionMap,this.thickness=t.thickness,this.thicknessMap=t.thicknessMap,this.attenuationDistance=t.attenuationDistance,this.attenuationColor.copy(t.attenuationColor),this.specularIntensity=t.specularIntensity,this.specularIntensityMap=t.specularIntensityMap,this.specularColor.copy(t.specularColor),this.specularColorMap=t.specularColorMap,this}}class Ox extends Ln{static get type(){return"MeshPhongMaterial"}constructor(t){super(),this.isMeshPhongMaterial=!0,this.color=new zt(16777215),this.specular=new zt(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new zt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=ca,this.normalScale=new dt(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new vi,this.combine=Gl,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.specular.copy(t.specular),this.shininess=t.shininess,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.envMapRotation.copy(t.envMapRotation),this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.flatShading=t.flatShading,this.fog=t.fog,this}}class Bx extends Ln{static get type(){return"MeshToonMaterial"}constructor(t){super(),this.isMeshToonMaterial=!0,this.defines={TOON:""},this.color=new zt(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new zt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=ca,this.normalScale=new dt(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.gradientMap=t.gradientMap,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.alphaMap=t.alphaMap,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.fog=t.fog,this}}class zx extends Ln{static get type(){return"MeshNormalMaterial"}constructor(t){super(),this.isMeshNormalMaterial=!0,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=ca,this.normalScale=new dt(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.flatShading=!1,this.setValues(t)}copy(t){return super.copy(t),this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.flatShading=t.flatShading,this}}class Fx extends Ln{static get type(){return"MeshLambertMaterial"}constructor(t){super(),this.isMeshLambertMaterial=!0,this.color=new zt(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new zt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=ca,this.normalScale=new dt(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new vi,this.combine=Gl,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.envMapRotation.copy(t.envMapRotation),this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.flatShading=t.flatShading,this.fog=t.fog,this}}class Hx extends Ln{static get type(){return"MeshMatcapMaterial"}constructor(t){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:""},this.color=new zt(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=ca,this.normalScale=new dt(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.flatShading=!1,this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.defines={MATCAP:""},this.color.copy(t.color),this.matcap=t.matcap,this.map=t.map,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.alphaMap=t.alphaMap,this.flatShading=t.flatShading,this.fog=t.fog,this}}class Vx extends Gn{static get type(){return"LineDashedMaterial"}constructor(t){super(),this.isLineDashedMaterial=!0,this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(t)}copy(t){return super.copy(t),this.scale=t.scale,this.dashSize=t.dashSize,this.gapSize=t.gapSize,this}}function Qa(s,t,e){return!s||!e&&s.constructor===t?s:typeof t.BYTES_PER_ELEMENT=="number"?new t(s):Array.prototype.slice.call(s)}function Gx(s){return ArrayBuffer.isView(s)&&!(s instanceof DataView)}function kx(s){function t(i,o){return s[i]-s[o]}const e=s.length,n=new Array(e);for(let i=0;i!==e;++i)n[i]=i;return n.sort(t),n}function Wp(s,t,e){const n=s.length,i=new s.constructor(n);for(let o=0,l=0;l!==n;++o){const c=e[o]*t;for(let h=0;h!==t;++h)i[l++]=s[c+h]}return i}function Lm(s,t,e,n){let i=1,o=s[0];for(;o!==void 0&&o[n]===void 0;)o=s[i++];if(o===void 0)return;let l=o[n];if(l!==void 0)if(Array.isArray(l))do l=o[n],l!==void 0&&(t.push(o.time),e.push.apply(e,l)),o=s[i++];while(o!==void 0);else if(l.toArray!==void 0)do l=o[n],l!==void 0&&(t.push(o.time),l.toArray(e,e.length)),o=s[i++];while(o!==void 0);else do l=o[n],l!==void 0&&(t.push(o.time),e.push(l)),o=s[i++];while(o!==void 0)}function LR(s,t,e,n,i=30){const o=s.clone();o.name=t;const l=[];for(let h=0;h=n)){m.push(f.times[_]);for(let b=0;bo.tracks[h].times[0]&&(c=o.tracks[h].times[0]);for(let h=0;h=c.times[x]){const y=x*m+p,E=y+m-p;b=c.values.slice(y,E)}else{const y=c.createInterpolant(),E=p,A=m-p;y.evaluate(o),b=y.resultBuffer.slice(E,A)}h==="quaternion"&&new Qn().fromArray(b).normalize().conjugate().toArray(b);const S=f.times.length;for(let y=0;y=o)){const c=e[1];t=o)break e}l=n,n=0;break n}break t}for(;n>>1;te;)--l;if(++l,o!==0||l!==i){o>=l&&(l=Math.max(l,1),o=l-1);const c=this.getValueSize();this.times=n.slice(o,l),this.values=this.values.slice(o*c,l*c)}return this}validate(){let t=!0;const e=this.getValueSize();e-Math.floor(e)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),t=!1);const n=this.times,i=this.values,o=n.length;o===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),t=!1);let l=null;for(let c=0;c!==o;c++){const h=n[c];if(typeof h=="number"&&isNaN(h)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,c,h),t=!1;break}if(l!==null&&l>h){console.error("THREE.KeyframeTrack: Out of order keys.",this,c,h,l),t=!1;break}l=h}if(i!==void 0&&Gx(i))for(let c=0,h=i.length;c!==h;++c){const f=i[c];if(isNaN(f)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,c,f),t=!1;break}}return t}optimize(){const t=this.times.slice(),e=this.values.slice(),n=this.getValueSize(),i=this.getInterpolation()===Uu,o=t.length-1;let l=1;for(let c=1;c0){t[l]=t[o];for(let c=o*n,h=l*n,f=0;f!==n;++f)e[h+f]=e[c+f];++l}return l!==t.length?(this.times=t.slice(0,l),this.values=e.slice(0,l*n)):(this.times=t,this.values=e),this}clone(){const t=this.times.slice(),e=this.values.slice(),n=this.constructor,i=new n(this.name,t,e);return i.createInterpolant=this.createInterpolant,i}}Yi.prototype.TimeBufferType=Float32Array;Yi.prototype.ValueBufferType=Float32Array;Yi.prototype.DefaultInterpolation=gh;class ur extends Yi{constructor(t,e,n){super(t,e,n)}}ur.prototype.ValueTypeName="bool";ur.prototype.ValueBufferType=Array;ur.prototype.DefaultInterpolation=Cl;ur.prototype.InterpolantFactoryMethodLinear=void 0;ur.prototype.InterpolantFactoryMethodSmooth=void 0;class Im extends Yi{}Im.prototype.ValueTypeName="color";class Ol extends Yi{}Ol.prototype.ValueTypeName="number";class qx extends Jl{constructor(t,e,n,i){super(t,e,n,i)}interpolate_(t,e,n,i){const o=this.resultBuffer,l=this.sampleValues,c=this.valueSize,h=(n-e)/(i-e);let f=t*c;for(let p=f+c;f!==p;f+=4)Qn.slerpFlat(o,0,l,f-c,l,f,h);return o}}class Ql extends Yi{InterpolantFactoryMethodLinear(t){return new qx(this.times,this.values,this.getValueSize(),t)}}Ql.prototype.ValueTypeName="quaternion";Ql.prototype.InterpolantFactoryMethodSmooth=void 0;class hr extends Yi{constructor(t,e,n){super(t,e,n)}}hr.prototype.ValueTypeName="string";hr.prototype.ValueBufferType=Array;hr.prototype.DefaultInterpolation=Cl;hr.prototype.InterpolantFactoryMethodLinear=void 0;hr.prototype.InterpolantFactoryMethodSmooth=void 0;class Bl extends Yi{}Bl.prototype.ValueTypeName="vector";class zl{constructor(t="",e=-1,n=[],i=Lh){this.name=t,this.tracks=n,this.duration=e,this.blendMode=i,this.uuid=gi(),this.duration<0&&this.resetDuration()}static parse(t){const e=[],n=t.tracks,i=1/(t.fps||1);for(let l=0,c=n.length;l!==c;++l)e.push(BR(n[l]).scale(i));const o=new this(t.name,t.duration,e,t.blendMode);return o.uuid=t.uuid,o}static toJSON(t){const e=[],n=t.tracks,i={name:t.name,duration:t.duration,tracks:e,uuid:t.uuid,blendMode:t.blendMode};for(let o=0,l=n.length;o!==l;++o)e.push(Yi.toJSON(n[o]));return i}static CreateFromMorphTargetSequence(t,e,n,i){const o=e.length,l=[];for(let c=0;c1){const m=p[1];let g=i[m];g||(i[m]=g=[]),g.push(f)}}const l=[];for(const c in i)l.push(this.CreateFromMorphTargetSequence(c,i[c],e,n));return l}static parseAnimation(t,e){if(!t)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const n=function(m,g,_,x,b){if(_.length!==0){const S=[],y=[];Lm(_,S,y,x),S.length!==0&&b.push(new m(g,S,y))}},i=[],o=t.name||"default",l=t.fps||30,c=t.blendMode;let h=t.length||-1;const f=t.hierarchy||[];for(let m=0;m{e&&e(o),this.manager.itemEnd(t)},0),o;if(bs[t]!==void 0){bs[t].push({onLoad:e,onProgress:n,onError:i});return}bs[t]=[],bs[t].push({onLoad:e,onProgress:n,onError:i});const l=new Request(t,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),c=this.mimeType,h=this.responseType;fetch(l).then(f=>{if(f.status===200||f.status===0){if(f.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||f.body===void 0||f.body.getReader===void 0)return f;const p=bs[t],m=f.body.getReader(),g=f.headers.get("X-File-Size")||f.headers.get("Content-Length"),_=g?parseInt(g):0,x=_!==0;let b=0;const S=new ReadableStream({start(y){E();function E(){m.read().then(({done:A,value:T})=>{if(A)y.close();else{b+=T.byteLength;const z=new ProgressEvent("progress",{lengthComputable:x,loaded:b,total:_});for(let D=0,L=p.length;D{y.error(A)})}}});return new Response(S)}else throw new zR(`fetch for "${f.url}" responded with ${f.status}: ${f.statusText}`,f)}).then(f=>{switch(h){case"arraybuffer":return f.arrayBuffer();case"blob":return f.blob();case"document":return f.text().then(p=>new DOMParser().parseFromString(p,c));case"json":return f.json();default:if(c===void 0)return f.text();{const m=/charset="?([^;"\s]*)"?/i.exec(c),g=m&&m[1]?m[1].toLowerCase():void 0,_=new TextDecoder(g);return f.arrayBuffer().then(x=>_.decode(x))}}}).then(f=>{ws.add(t,f);const p=bs[t];delete bs[t];for(let m=0,g=p.length;m{const p=bs[t];if(p===void 0)throw this.manager.itemError(t),f;delete bs[t];for(let m=0,g=p.length;m{this.manager.itemEnd(t)}),this.manager.itemStart(t)}setResponseType(t){return this.responseType=t,this}setMimeType(t){return this.mimeType=t,this}}class FR extends $n{constructor(t){super(t)}load(t,e,n,i){const o=this,l=new Ps(this.manager);l.setPath(this.path),l.setRequestHeader(this.requestHeader),l.setWithCredentials(this.withCredentials),l.load(t,function(c){try{e(o.parse(JSON.parse(c)))}catch(h){i?i(h):console.error(h),o.manager.itemError(t)}},n,i)}parse(t){const e=[];for(let n=0;n0:i.vertexColors=t.vertexColors),t.uniforms!==void 0)for(const o in t.uniforms){const l=t.uniforms[o];switch(i.uniforms[o]={},l.type){case"t":i.uniforms[o].value=n(l.value);break;case"c":i.uniforms[o].value=new zt().setHex(l.value);break;case"v2":i.uniforms[o].value=new dt().fromArray(l.value);break;case"v3":i.uniforms[o].value=new O().fromArray(l.value);break;case"v4":i.uniforms[o].value=new we().fromArray(l.value);break;case"m3":i.uniforms[o].value=new ue().fromArray(l.value);break;case"m4":i.uniforms[o].value=new ee().fromArray(l.value);break;default:i.uniforms[o].value=l.value}}if(t.defines!==void 0&&(i.defines=t.defines),t.vertexShader!==void 0&&(i.vertexShader=t.vertexShader),t.fragmentShader!==void 0&&(i.fragmentShader=t.fragmentShader),t.glslVersion!==void 0&&(i.glslVersion=t.glslVersion),t.extensions!==void 0)for(const o in t.extensions)i.extensions[o]=t.extensions[o];if(t.lights!==void 0&&(i.lights=t.lights),t.clipping!==void 0&&(i.clipping=t.clipping),t.size!==void 0&&(i.size=t.size),t.sizeAttenuation!==void 0&&(i.sizeAttenuation=t.sizeAttenuation),t.map!==void 0&&(i.map=n(t.map)),t.matcap!==void 0&&(i.matcap=n(t.matcap)),t.alphaMap!==void 0&&(i.alphaMap=n(t.alphaMap)),t.bumpMap!==void 0&&(i.bumpMap=n(t.bumpMap)),t.bumpScale!==void 0&&(i.bumpScale=t.bumpScale),t.normalMap!==void 0&&(i.normalMap=n(t.normalMap)),t.normalMapType!==void 0&&(i.normalMapType=t.normalMapType),t.normalScale!==void 0){let o=t.normalScale;Array.isArray(o)===!1&&(o=[o,o]),i.normalScale=new dt().fromArray(o)}return t.displacementMap!==void 0&&(i.displacementMap=n(t.displacementMap)),t.displacementScale!==void 0&&(i.displacementScale=t.displacementScale),t.displacementBias!==void 0&&(i.displacementBias=t.displacementBias),t.roughnessMap!==void 0&&(i.roughnessMap=n(t.roughnessMap)),t.metalnessMap!==void 0&&(i.metalnessMap=n(t.metalnessMap)),t.emissiveMap!==void 0&&(i.emissiveMap=n(t.emissiveMap)),t.emissiveIntensity!==void 0&&(i.emissiveIntensity=t.emissiveIntensity),t.specularMap!==void 0&&(i.specularMap=n(t.specularMap)),t.specularIntensityMap!==void 0&&(i.specularIntensityMap=n(t.specularIntensityMap)),t.specularColorMap!==void 0&&(i.specularColorMap=n(t.specularColorMap)),t.envMap!==void 0&&(i.envMap=n(t.envMap)),t.envMapRotation!==void 0&&i.envMapRotation.fromArray(t.envMapRotation),t.envMapIntensity!==void 0&&(i.envMapIntensity=t.envMapIntensity),t.reflectivity!==void 0&&(i.reflectivity=t.reflectivity),t.refractionRatio!==void 0&&(i.refractionRatio=t.refractionRatio),t.lightMap!==void 0&&(i.lightMap=n(t.lightMap)),t.lightMapIntensity!==void 0&&(i.lightMapIntensity=t.lightMapIntensity),t.aoMap!==void 0&&(i.aoMap=n(t.aoMap)),t.aoMapIntensity!==void 0&&(i.aoMapIntensity=t.aoMapIntensity),t.gradientMap!==void 0&&(i.gradientMap=n(t.gradientMap)),t.clearcoatMap!==void 0&&(i.clearcoatMap=n(t.clearcoatMap)),t.clearcoatRoughnessMap!==void 0&&(i.clearcoatRoughnessMap=n(t.clearcoatRoughnessMap)),t.clearcoatNormalMap!==void 0&&(i.clearcoatNormalMap=n(t.clearcoatNormalMap)),t.clearcoatNormalScale!==void 0&&(i.clearcoatNormalScale=new dt().fromArray(t.clearcoatNormalScale)),t.iridescenceMap!==void 0&&(i.iridescenceMap=n(t.iridescenceMap)),t.iridescenceThicknessMap!==void 0&&(i.iridescenceThicknessMap=n(t.iridescenceThicknessMap)),t.transmissionMap!==void 0&&(i.transmissionMap=n(t.transmissionMap)),t.thicknessMap!==void 0&&(i.thicknessMap=n(t.thicknessMap)),t.anisotropyMap!==void 0&&(i.anisotropyMap=n(t.anisotropyMap)),t.sheenColorMap!==void 0&&(i.sheenColorMap=n(t.sheenColorMap)),t.sheenRoughnessMap!==void 0&&(i.sheenRoughnessMap=n(t.sheenRoughnessMap)),i}setTextures(t){return this.textures=t,this}createMaterialFromType(t){return nf.createMaterialFromType(t)}static createMaterialFromType(t){const e={ShadowMaterial:Lx,SpriteMaterial:bm,RawShaderMaterial:Px,ShaderMaterial:Xi,PointsMaterial:Tm,MeshPhysicalMaterial:Ix,MeshStandardMaterial:Nm,MeshPhongMaterial:Ox,MeshToonMaterial:Bx,MeshNormalMaterial:zx,MeshLambertMaterial:Fx,MeshDepthMaterial:xm,MeshDistanceMaterial:Sm,MeshBasicMaterial:ha,MeshMatcapMaterial:Hx,LineDashedMaterial:Vx,LineBasicMaterial:Gn,Material:Ln};return new e[t]}}class Xp{static decodeText(t){if(console.warn("THREE.LoaderUtils: decodeText() has been deprecated with r165 and will be removed with r175. Use TextDecoder instead."),typeof TextDecoder<"u")return new TextDecoder().decode(t);let e="";for(let n=0,i=t.length;n0){const h=new Om(e);o=new Fl(h),o.setCrossOrigin(this.crossOrigin);for(let f=0,p=t.length;f0){i=new Fl(this.manager),i.setCrossOrigin(this.crossOrigin);for(let l=0,c=t.length;l{const S=new Vn;S.min.fromArray(b.boxMin),S.max.fromArray(b.boxMax);const y=new Nn;return y.radius=b.sphereRadius,y.center.fromArray(b.sphereCenter),{boxInitialized:b.boxInitialized,box:S,sphereInitialized:b.sphereInitialized,sphere:y}}),l._maxInstanceCount=t.maxInstanceCount,l._maxVertexCount=t.maxVertexCount,l._maxIndexCount=t.maxIndexCount,l._geometryInitialized=t.geometryInitialized,l._geometryCount=t.geometryCount,l._matricesTexture=f(t.matricesTexture.uuid),t.colorsTexture!==void 0&&(l._colorsTexture=f(t.colorsTexture.uuid));break;case"LOD":l=new vx;break;case"Line":l=new la(c(t.geometry),h(t.material));break;case"LineLoop":l=new Sx(c(t.geometry),h(t.material));break;case"LineSegments":l=new as(c(t.geometry),h(t.material));break;case"PointCloud":case"Points":l=new Mx(c(t.geometry),h(t.material));break;case"Sprite":l=new gx(h(t.material));break;case"Group":l=new co;break;case"Bone":l=new Em;break;default:l=new Re}if(l.uuid=t.uuid,t.name!==void 0&&(l.name=t.name),t.matrix!==void 0?(l.matrix.fromArray(t.matrix),t.matrixAutoUpdate!==void 0&&(l.matrixAutoUpdate=t.matrixAutoUpdate),l.matrixAutoUpdate&&l.matrix.decompose(l.position,l.quaternion,l.scale)):(t.position!==void 0&&l.position.fromArray(t.position),t.rotation!==void 0&&l.rotation.fromArray(t.rotation),t.quaternion!==void 0&&l.quaternion.fromArray(t.quaternion),t.scale!==void 0&&l.scale.fromArray(t.scale)),t.up!==void 0&&l.up.fromArray(t.up),t.castShadow!==void 0&&(l.castShadow=t.castShadow),t.receiveShadow!==void 0&&(l.receiveShadow=t.receiveShadow),t.shadow&&(t.shadow.intensity!==void 0&&(l.shadow.intensity=t.shadow.intensity),t.shadow.bias!==void 0&&(l.shadow.bias=t.shadow.bias),t.shadow.normalBias!==void 0&&(l.shadow.normalBias=t.shadow.normalBias),t.shadow.radius!==void 0&&(l.shadow.radius=t.shadow.radius),t.shadow.mapSize!==void 0&&l.shadow.mapSize.fromArray(t.shadow.mapSize),t.shadow.camera!==void 0&&(l.shadow.camera=this.parseObject(t.shadow.camera))),t.visible!==void 0&&(l.visible=t.visible),t.frustumCulled!==void 0&&(l.frustumCulled=t.frustumCulled),t.renderOrder!==void 0&&(l.renderOrder=t.renderOrder),t.userData!==void 0&&(l.userData=t.userData),t.layers!==void 0&&(l.layers.mask=t.layers),t.children!==void 0){const g=t.children;for(let _=0;_"u"&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch>"u"&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"}}setOptions(t){return this.options=t,this}load(t,e,n,i){t===void 0&&(t=""),this.path!==void 0&&(t=this.path+t),t=this.manager.resolveURL(t);const o=this,l=ws.get(t);if(l!==void 0){if(o.manager.itemStart(t),l.then){l.then(f=>{e&&e(f),o.manager.itemEnd(t)}).catch(f=>{i&&i(f)});return}return setTimeout(function(){e&&e(l),o.manager.itemEnd(t)},0),l}const c={};c.credentials=this.crossOrigin==="anonymous"?"same-origin":"include",c.headers=this.requestHeader;const h=fetch(t,c).then(function(f){return f.blob()}).then(function(f){return createImageBitmap(f,Object.assign(o.options,{colorSpaceConversion:"none"}))}).then(function(f){return ws.add(t,f),e&&e(f),o.manager.itemEnd(t),f}).catch(function(f){i&&i(f),ws.remove(t),o.manager.itemError(t),o.manager.itemEnd(t)});ws.add(t,h),o.manager.itemStart(t)}}let Mu;class zm{static getContext(){return Mu===void 0&&(Mu=new(window.AudioContext||window.webkitAudioContext)),Mu}static setContext(t){Mu=t}}class jR extends $n{constructor(t){super(t)}load(t,e,n,i){const o=this,l=new Ps(this.manager);l.setResponseType("arraybuffer"),l.setPath(this.path),l.setRequestHeader(this.requestHeader),l.setWithCredentials(this.withCredentials),l.load(t,function(h){try{const f=h.slice(0);zm.getContext().decodeAudioData(f,function(m){e(m)}).catch(c)}catch(f){c(f)}},n,i);function c(h){i?i(h):console.error(h),o.manager.itemError(t)}}}const S_=new ee,M_=new ee,Va=new ee;class JR{constructor(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new vn,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new vn,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1,this._cache={focus:null,fov:null,aspect:null,near:null,far:null,zoom:null,eyeSep:null}}update(t){const e=this._cache;if(e.focus!==t.focus||e.fov!==t.fov||e.aspect!==t.aspect*this.aspect||e.near!==t.near||e.far!==t.far||e.zoom!==t.zoom||e.eyeSep!==this.eyeSep){e.focus=t.focus,e.fov=t.fov,e.aspect=t.aspect*this.aspect,e.near=t.near,e.far=t.far,e.zoom=t.zoom,e.eyeSep=this.eyeSep,Va.copy(t.projectionMatrix);const i=e.eyeSep/2,o=i*e.near/e.focus,l=e.near*Math.tan(er*e.fov*.5)/e.zoom;let c,h;M_.elements[12]=-i,S_.elements[12]=i,c=-l*e.aspect+o,h=l*e.aspect+o,Va.elements[0]=2*e.near/(h-c),Va.elements[8]=(h+c)/(h-c),this.cameraL.projectionMatrix.copy(Va),c=-l*e.aspect-o,h=l*e.aspect-o,Va.elements[0]=2*e.near/(h-c),Va.elements[8]=(h+c)/(h-c),this.cameraR.projectionMatrix.copy(Va)}this.cameraL.matrixWorld.copy(t.matrixWorld).multiply(M_),this.cameraR.matrixWorld.copy(t.matrixWorld).multiply(S_)}}class Fm{constructor(t=!0){this.autoStart=t,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=b_(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let t=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const e=b_();t=(e-this.oldTime)/1e3,this.oldTime=e,this.elapsedTime+=t}return t}}function b_(){return performance.now()}const Ga=new O,E_=new Qn,QR=new O,ka=new O;class $R extends Re{constructor(){super(),this.type="AudioListener",this.context=zm.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new Fm}getInput(){return this.gain}removeFilter(){return this.filter!==null&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null),this}getFilter(){return this.filter}setFilter(t){return this.filter!==null?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=t,this.gain.connect(this.filter),this.filter.connect(this.context.destination),this}getMasterVolume(){return this.gain.gain.value}setMasterVolume(t){return this.gain.gain.setTargetAtTime(t,this.context.currentTime,.01),this}updateMatrixWorld(t){super.updateMatrixWorld(t);const e=this.context.listener,n=this.up;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(Ga,E_,QR),ka.set(0,0,-1).applyQuaternion(E_),e.positionX){const i=this.context.currentTime+this.timeDelta;e.positionX.linearRampToValueAtTime(Ga.x,i),e.positionY.linearRampToValueAtTime(Ga.y,i),e.positionZ.linearRampToValueAtTime(Ga.z,i),e.forwardX.linearRampToValueAtTime(ka.x,i),e.forwardY.linearRampToValueAtTime(ka.y,i),e.forwardZ.linearRampToValueAtTime(ka.z,i),e.upX.linearRampToValueAtTime(n.x,i),e.upY.linearRampToValueAtTime(n.y,i),e.upZ.linearRampToValueAtTime(n.z,i)}else e.setPosition(Ga.x,Ga.y,Ga.z),e.setOrientation(ka.x,ka.y,ka.z,n.x,n.y,n.z)}}class sS extends Re{constructor(t){super(),this.type="Audio",this.listener=t,this.context=t.context,this.gain=this.context.createGain(),this.gain.connect(t.getInput()),this.autoplay=!1,this.buffer=null,this.detune=0,this.loop=!1,this.loopStart=0,this.loopEnd=0,this.offset=0,this.duration=void 0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.source=null,this.sourceType="empty",this._startedAt=0,this._progress=0,this._connected=!1,this.filters=[]}getOutput(){return this.gain}setNodeSource(t){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=t,this.connect(),this}setMediaElementSource(t){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(t),this.connect(),this}setMediaStreamSource(t){return this.hasPlaybackControl=!1,this.sourceType="mediaStreamNode",this.source=this.context.createMediaStreamSource(t),this.connect(),this}setBuffer(t){return this.buffer=t,this.sourceType="buffer",this.autoplay&&this.play(),this}play(t=0){if(this.isPlaying===!0){console.warn("THREE.Audio: Audio is already playing.");return}if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}this._startedAt=this.context.currentTime+t;const e=this.context.createBufferSource();return e.buffer=this.buffer,e.loop=this.loop,e.loopStart=this.loopStart,e.loopEnd=this.loopEnd,e.onended=this.onEnded.bind(this),e.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=e,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}pause(){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this.isPlaying===!0&&(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,this.loop===!0&&(this._progress=this._progress%(this.duration||this.buffer.duration)),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this}stop(t=0){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this._progress=0,this.source!==null&&(this.source.stop(this.context.currentTime+t),this.source.onended=null),this.isPlaying=!1,this}connect(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(let t=1,e=this.filters.length;t0){this.source.disconnect(this.filters[0]);for(let t=1,e=this.filters.length;t0&&this._mixBufferRegionAdditive(n,i,this._addIndex*e,1,e);for(let h=e,f=e+e;h!==f;++h)if(n[h]!==n[h+e]){c.setValue(n,i);break}}saveOriginalState(){const t=this.binding,e=this.buffer,n=this.valueSize,i=n*this._origIndex;t.getValue(e,i);for(let o=n,l=i;o!==l;++o)e[o]=e[i+o%n];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){const t=this.valueSize*3;this.binding.setValue(this.buffer,t)}_setAdditiveIdentityNumeric(){const t=this._addIndex*this.valueSize,e=t+this.valueSize;for(let n=t;n=.5)for(let l=0;l!==o;++l)t[e+l]=t[n+l]}_slerp(t,e,n,i){Qn.slerpFlat(t,e,t,e,t,n,i)}_slerpAdditive(t,e,n,i,o){const l=this._workIndex*o;Qn.multiplyQuaternionsFlat(t,l,t,e,t,n),Qn.slerpFlat(t,e,t,e,t,l,i)}_lerp(t,e,n,i,o){const l=1-i;for(let c=0;c!==o;++c){const h=e+c;t[h]=t[h]*l+t[n+c]*i}}_lerpAdditive(t,e,n,i,o){for(let l=0;l!==o;++l){const c=e+l;t[c]=t[c]+t[n+l]*i}}}const Hm="\\[\\]\\.:\\/",i2=new RegExp("["+Hm+"]","g"),Vm="[^"+Hm+"]",s2="[^"+Hm.replace("\\.","")+"]",a2=/((?:WC+[\/:])*)/.source.replace("WC",Vm),r2=/(WCOD+)?/.source.replace("WCOD",s2),o2=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",Vm),l2=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",Vm),c2=new RegExp("^"+a2+r2+o2+l2+"$"),u2=["material","materials","bones","map"];class h2{constructor(t,e,n){const i=n||Ce.parseTrackName(e);this._targetGroup=t,this._bindings=t.subscribe_(e,i)}getValue(t,e){this.bind();const n=this._targetGroup.nCachedObjects_,i=this._bindings[n];i!==void 0&&i.getValue(t,e)}setValue(t,e){const n=this._bindings;for(let i=this._targetGroup.nCachedObjects_,o=n.length;i!==o;++i)n[i].setValue(t,e)}bind(){const t=this._bindings;for(let e=this._targetGroup.nCachedObjects_,n=t.length;e!==n;++e)t[e].bind()}unbind(){const t=this._bindings;for(let e=this._targetGroup.nCachedObjects_,n=t.length;e!==n;++e)t[e].unbind()}}class Ce{constructor(t,e,n){this.path=e,this.parsedPath=n||Ce.parseTrackName(e),this.node=Ce.findNode(t,this.parsedPath.nodeName),this.rootNode=t,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(t,e,n){return t&&t.isAnimationObjectGroup?new Ce.Composite(t,e,n):new Ce(t,e,n)}static sanitizeNodeName(t){return t.replace(/\s/g,"_").replace(i2,"")}static parseTrackName(t){const e=c2.exec(t);if(e===null)throw new Error("PropertyBinding: Cannot parse trackName: "+t);const n={nodeName:e[2],objectName:e[3],objectIndex:e[4],propertyName:e[5],propertyIndex:e[6]},i=n.nodeName&&n.nodeName.lastIndexOf(".");if(i!==void 0&&i!==-1){const o=n.nodeName.substring(i+1);u2.indexOf(o)!==-1&&(n.nodeName=n.nodeName.substring(0,i),n.objectName=o)}if(n.propertyName===null||n.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+t);return n}static findNode(t,e){if(e===void 0||e===""||e==="."||e===-1||e===t.name||e===t.uuid)return t;if(t.skeleton){const n=t.skeleton.getBoneByName(e);if(n!==void 0)return n}if(t.children){const n=function(o){for(let l=0;l=o){const m=o++,g=t[m];e[g.uuid]=p,t[p]=g,e[f]=m,t[m]=h;for(let _=0,x=i;_!==x;++_){const b=n[_],S=b[m],y=b[p];b[p]=S,b[m]=y}}}this.nCachedObjects_=o}uncache(){const t=this._objects,e=this._indicesByUUID,n=this._bindings,i=n.length;let o=this.nCachedObjects_,l=t.length;for(let c=0,h=arguments.length;c!==h;++c){const f=arguments[c],p=f.uuid,m=e[p];if(m!==void 0)if(delete e[p],m0&&(e[_.uuid]=m),t[m]=_,t.pop();for(let x=0,b=i;x!==b;++x){const S=n[x];S[m]=S[g],S.pop()}}}this.nCachedObjects_=o}subscribe_(t,e){const n=this._bindingsIndicesByPath;let i=n[t];const o=this._bindings;if(i!==void 0)return o[i];const l=this._paths,c=this._parsedPaths,h=this._objects,f=h.length,p=this.nCachedObjects_,m=new Array(f);i=o.length,n[t]=i,l.push(t),c.push(e),o.push(m);for(let g=p,_=h.length;g!==_;++g){const x=h[g];m[g]=new Ce(x,t,e)}return m}unsubscribe_(t){const e=this._bindingsIndicesByPath,n=e[t];if(n!==void 0){const i=this._paths,o=this._parsedPaths,l=this._bindings,c=l.length-1,h=l[c],f=t[c];e[f]=n,l[n]=h,l.pop(),o[n]=o[c],o.pop(),i[n]=i[c],i.pop()}}}class rS{constructor(t,e,n=null,i=e.blendMode){this._mixer=t,this._clip=e,this._localRoot=n,this.blendMode=i;const o=e.tracks,l=o.length,c=new Array(l),h={endingStart:Ka,endingEnd:Ka};for(let f=0;f!==l;++f){const p=o[f].createInterpolant(null);c[f]=p,p.settings=h}this._interpolantSettings=h,this._interpolants=c,this._propertyBindings=new Array(l),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=Hy,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}play(){return this._mixer._activateAction(this),this}stop(){return this._mixer._deactivateAction(this),this.reset()}reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&this.timeScale!==0&&this._startTime===null&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(t){return this._startTime=t,this}setLoop(t,e){return this.loop=t,this.repetitions=e,this}setEffectiveWeight(t){return this.weight=t,this._effectiveWeight=this.enabled?t:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(t){return this._scheduleFading(t,0,1)}fadeOut(t){return this._scheduleFading(t,1,0)}crossFadeFrom(t,e,n){if(t.fadeOut(e),this.fadeIn(e),n){const i=this._clip.duration,o=t._clip.duration,l=o/i,c=i/o;t.warp(1,l,e),this.warp(c,1,e)}return this}crossFadeTo(t,e,n){return t.crossFadeFrom(this,e,n)}stopFading(){const t=this._weightInterpolant;return t!==null&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this}setEffectiveTimeScale(t){return this.timeScale=t,this._effectiveTimeScale=this.paused?0:t,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(t){return this.timeScale=this._clip.duration/t,this.stopWarping()}syncWith(t){return this.time=t.time,this.timeScale=t.timeScale,this.stopWarping()}halt(t){return this.warp(this._effectiveTimeScale,0,t)}warp(t,e,n){const i=this._mixer,o=i.time,l=this.timeScale;let c=this._timeScaleInterpolant;c===null&&(c=i._lendControlInterpolant(),this._timeScaleInterpolant=c);const h=c.parameterPositions,f=c.sampleValues;return h[0]=o,h[1]=o+n,f[0]=t/l,f[1]=e/l,this}stopWarping(){const t=this._timeScaleInterpolant;return t!==null&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(t,e,n,i){if(!this.enabled){this._updateWeight(t);return}const o=this._startTime;if(o!==null){const h=(t-o)*n;h<0||n===0?e=0:(this._startTime=null,e=n*h)}e*=this._updateTimeScale(t);const l=this._updateTime(e),c=this._updateWeight(t);if(c>0){const h=this._interpolants,f=this._propertyBindings;switch(this.blendMode){case fm:for(let p=0,m=h.length;p!==m;++p)h[p].evaluate(l),f[p].accumulateAdditive(c);break;case Lh:default:for(let p=0,m=h.length;p!==m;++p)h[p].evaluate(l),f[p].accumulate(i,c)}}}_updateWeight(t){let e=0;if(this.enabled){e=this.weight;const n=this._weightInterpolant;if(n!==null){const i=n.evaluate(t)[0];e*=i,t>n.parameterPositions[1]&&(this.stopFading(),i===0&&(this.enabled=!1))}}return this._effectiveWeight=e,e}_updateTimeScale(t){let e=0;if(!this.paused){e=this.timeScale;const n=this._timeScaleInterpolant;if(n!==null){const i=n.evaluate(t)[0];e*=i,t>n.parameterPositions[1]&&(this.stopWarping(),e===0?this.paused=!0:this.timeScale=e)}}return this._effectiveTimeScale=e,e}_updateTime(t){const e=this._clip.duration,n=this.loop;let i=this.time+t,o=this._loopCount;const l=n===Vy;if(t===0)return o===-1?i:l&&(o&1)===1?e-i:i;if(n===Fy){o===-1&&(this._loopCount=0,this._setEndings(!0,!0,!1));t:{if(i>=e)i=e;else if(i<0)i=0;else{this.time=i;break t}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=i,this._mixer.dispatchEvent({type:"finished",action:this,direction:t<0?-1:1})}}else{if(o===-1&&(t>=0?(o=0,this._setEndings(!0,this.repetitions===0,l)):this._setEndings(this.repetitions===0,!0,l)),i>=e||i<0){const c=Math.floor(i/e);i-=e*c,o+=Math.abs(c);const h=this.repetitions-o;if(h<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,i=t>0?e:0,this.time=i,this._mixer.dispatchEvent({type:"finished",action:this,direction:t>0?1:-1});else{if(h===1){const f=t<0;this._setEndings(f,!f,l)}else this._setEndings(!1,!1,l);this._loopCount=o,this.time=i,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:c})}}else this.time=i;if(l&&(o&1)===1)return e-i}return i}_setEndings(t,e,n){const i=this._interpolantSettings;n?(i.endingStart=ja,i.endingEnd=ja):(t?i.endingStart=this.zeroSlopeAtStart?ja:Ka:i.endingStart=wl,e?i.endingEnd=this.zeroSlopeAtEnd?ja:Ka:i.endingEnd=wl)}_scheduleFading(t,e,n){const i=this._mixer,o=i.time;let l=this._weightInterpolant;l===null&&(l=i._lendControlInterpolant(),this._weightInterpolant=l);const c=l.parameterPositions,h=l.sampleValues;return c[0]=o,h[0]=e,c[1]=o+t,h[1]=n,this}}const d2=new Float32Array(1);class p2 extends ss{constructor(t){super(),this._root=t,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(t,e){const n=t._localRoot||this._root,i=t._clip.tracks,o=i.length,l=t._propertyBindings,c=t._interpolants,h=n.uuid,f=this._bindingsByRootAndName;let p=f[h];p===void 0&&(p={},f[h]=p);for(let m=0;m!==o;++m){const g=i[m],_=g.name;let x=p[_];if(x!==void 0)++x.referenceCount,l[m]=x;else{if(x=l[m],x!==void 0){x._cacheIndex===null&&(++x.referenceCount,this._addInactiveBinding(x,h,_));continue}const b=e&&e._propertyBindings[m].binding.parsedPath;x=new aS(Ce.create(n,_,b),g.ValueTypeName,g.getValueSize()),++x.referenceCount,this._addInactiveBinding(x,h,_),l[m]=x}c[m].resultBuffer=x.buffer}}_activateAction(t){if(!this._isActiveAction(t)){if(t._cacheIndex===null){const n=(t._localRoot||this._root).uuid,i=t._clip.uuid,o=this._actionsByClip[i];this._bindAction(t,o&&o.knownActions[0]),this._addInactiveAction(t,i,n)}const e=t._propertyBindings;for(let n=0,i=e.length;n!==i;++n){const o=e[n];o.useCount++===0&&(this._lendBinding(o),o.saveOriginalState())}this._lendAction(t)}}_deactivateAction(t){if(this._isActiveAction(t)){const e=t._propertyBindings;for(let n=0,i=e.length;n!==i;++n){const o=e[n];--o.useCount===0&&(o.restoreOriginalState(),this._takeBackBinding(o))}this._takeBackAction(t)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;const t=this;this.stats={actions:{get total(){return t._actions.length},get inUse(){return t._nActiveActions}},bindings:{get total(){return t._bindings.length},get inUse(){return t._nActiveBindings}},controlInterpolants:{get total(){return t._controlInterpolants.length},get inUse(){return t._nActiveControlInterpolants}}}}_isActiveAction(t){const e=t._cacheIndex;return e!==null&&e=0;--n)t[n].stop();return this}update(t){t*=this.timeScale;const e=this._actions,n=this._nActiveActions,i=this.time+=t,o=Math.sign(t),l=this._accuIndex^=1;for(let f=0;f!==n;++f)e[f]._update(i,t,o,l);const c=this._bindings,h=this._nActiveBindings;for(let f=0;f!==h;++f)c[f].apply(l);return this}setTime(t){this.time=0;for(let e=0;e=this.min.x&&t.x<=this.max.x&&t.y>=this.min.y&&t.y<=this.max.y}containsBox(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y}getParameter(t,e){return e.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(t){return t.max.x>=this.min.x&&t.min.x<=this.max.x&&t.max.y>=this.min.y&&t.min.y<=this.max.y}clampPoint(t,e){return e.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return this.clampPoint(t,w_).distanceTo(t)}intersect(t){return this.min.max(t.min),this.max.min(t.max),this.isEmpty()&&this.makeEmpty(),this}union(t){return this.min.min(t.min),this.max.max(t.max),this}translate(t){return this.min.add(t),this.max.add(t),this}equals(t){return t.min.equals(this.min)&&t.max.equals(this.max)}}const R_=new O,bu=new O;class M2{constructor(t=new O,e=new O){this.start=t,this.end=e}set(t,e){return this.start.copy(t),this.end.copy(e),this}copy(t){return this.start.copy(t.start),this.end.copy(t.end),this}getCenter(t){return t.addVectors(this.start,this.end).multiplyScalar(.5)}delta(t){return t.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(t,e){return this.delta(e).multiplyScalar(t).add(this.start)}closestPointToPointParameter(t,e){R_.subVectors(t,this.start),bu.subVectors(this.end,this.start);const n=bu.dot(bu);let o=bu.dot(R_)/n;return e&&(o=en(o,0,1)),o}closestPointToPoint(t,e,n){const i=this.closestPointToPointParameter(t,e);return this.delta(n).multiplyScalar(i).add(this.start)}applyMatrix4(t){return this.start.applyMatrix4(t),this.end.applyMatrix4(t),this}equals(t){return t.start.equals(this.start)&&t.end.equals(this.end)}clone(){return new this.constructor().copy(this)}}const D_=new O;class b2 extends Re{constructor(t,e){super(),this.light=t,this.matrixAutoUpdate=!1,this.color=e,this.type="SpotLightHelper";const n=new pe,i=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(let l=0,c=1,h=32;l1)for(let m=0;m.99999)this.quaternion.set(0,0,0,1);else if(t.y<-.99999)this.quaternion.set(1,0,0,0);else{I_.set(t.z,0,-t.x).normalize();const e=Math.acos(t.y);this.quaternion.setFromAxisAngle(I_,e)}}setLength(t,e=t*.2,n=e*.2){this.line.scale.set(1,Math.max(1e-4,t-e),1),this.line.updateMatrix(),this.cone.scale.set(n,e,n),this.cone.position.y=t,this.cone.updateMatrix()}setColor(t){this.line.material.color.set(t),this.cone.material.color.set(t)}copy(t){return super.copy(t,!1),this.line.copy(t.line),this.cone.copy(t.cone),this}dispose(){this.line.geometry.dispose(),this.line.material.dispose(),this.cone.geometry.dispose(),this.cone.material.dispose()}}class O2 extends as{constructor(t=1){const e=[0,0,0,t,0,0,0,0,0,0,t,0,0,0,0,0,0,t],n=[1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],i=new pe;i.setAttribute("position",new qt(e,3)),i.setAttribute("color",new qt(n,3));const o=new Gn({vertexColors:!0,toneMapped:!1});super(i,o),this.type="AxesHelper"}setColors(t,e,n){const i=new zt,o=this.geometry.attributes.color.array;return i.set(t),i.toArray(o,0),i.toArray(o,3),i.set(e),i.toArray(o,6),i.toArray(o,9),i.set(n),i.toArray(o,12),i.toArray(o,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}}class B2{constructor(){this.type="ShapePath",this.color=new zt,this.subPaths=[],this.currentPath=null}moveTo(t,e){return this.currentPath=new Nl,this.subPaths.push(this.currentPath),this.currentPath.moveTo(t,e),this}lineTo(t,e){return this.currentPath.lineTo(t,e),this}quadraticCurveTo(t,e,n,i){return this.currentPath.quadraticCurveTo(t,e,n,i),this}bezierCurveTo(t,e,n,i,o,l){return this.currentPath.bezierCurveTo(t,e,n,i,o,l),this}splineThru(t){return this.currentPath.splineThru(t),this}toShapes(t){function e(y){const E=[];for(let A=0,T=y.length;ANumber.EPSILON){if(C<0&&(L=E[D],w=-w,B=E[z],C=-C),y.yB.y)continue;if(y.y===L.y){if(y.x===L.x)return!0}else{const I=C*(y.x-L.x)-w*(y.y-L.y);if(I===0)return!0;if(I<0)continue;T=!T}}else{if(y.y!==L.y)continue;if(B.x<=y.x&&y.x<=L.x||L.x<=y.x&&y.x<=B.x)return!0}}return T}const i=is.isClockWise,o=this.subPaths;if(o.length===0)return[];let l,c,h;const f=[];if(o.length===1)return c=o[0],h=new nr,h.curves=c.curves,f.push(h),f;let p=!i(o[0].getPoints());p=t?!p:p;const m=[],g=[];let _=[],x=0,b;g[x]=void 0,_[x]=[];for(let y=0,E=o.length;y1){let y=!1,E=0;for(let A=0,T=g.length;A0&&y===!1&&(_=m)}let S;for(let y=0,E=g.length;y"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:c;return _p.useSyncExternalStore=s.useSyncExternalStore!==void 0?s.useSyncExternalStore:p,_p}var F_;function W2(){return F_||(F_=1,vp.exports=k2()),vp.exports}/** + * @license React + * use-sync-external-store-shim/with-selector.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var H_;function X2(){if(H_)return gp;H_=1;var s=$p(),t=W2();function e(f,p){return f===p&&(f!==0||1/f===1/p)||f!==f&&p!==p}var n=typeof Object.is=="function"?Object.is:e,i=t.useSyncExternalStore,o=s.useRef,l=s.useEffect,c=s.useMemo,h=s.useDebugValue;return gp.useSyncExternalStoreWithSelector=function(f,p,m,g,_){var x=o(null);if(x.current===null){var b={hasValue:!1,value:null};x.current=b}else b=x.current;x=c(function(){function y(D){if(!E){if(E=!0,A=D,D=g(D),_!==void 0&&b.hasValue){var L=b.value;if(_(L,D))return T=L}return T=D}if(L=T,n(A,D))return L;var B=g(D);return _!==void 0&&_(L,B)?(A=D,L):(A=D,T=B)}var E=!1,A,T,z=m===void 0?null:m;return[function(){return y(p())},z===null?void 0:function(){return y(z())}]},[p,m,g,_]);var S=i(f,x[0],x[1]);return l(function(){b.hasValue=!0,b.value=S},[S]),h(S),S},gp}var V_;function q2(){return V_||(V_=1,mp.exports=X2()),mp.exports}var Y2=q2();const Z2=tm(Y2),K2={},G_=s=>{let t;const e=new Set,n=(p,m)=>{const g=typeof p=="function"?p(t):p;if(!Object.is(g,t)){const _=t;t=m??(typeof g!="object"||g===null)?g:Object.assign({},t,g),e.forEach(x=>x(t,_))}},i=()=>t,h={setState:n,getState:i,getInitialState:()=>f,subscribe:p=>(e.add(p),()=>e.delete(p)),destroy:()=>{(K2?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),e.clear()}},f=t=s(n,i,h);return h},j2=s=>s?G_(s):G_,{useDebugValue:J2}=Db,{useSyncExternalStoreWithSelector:Q2}=Z2,$2=s=>s;function t3(s,t=$2,e){const n=Q2(s.subscribe,s.getState,s.getServerState||s.getInitialState,t,e);return J2(n),n}const k_=(s,t)=>{const e=j2(s),n=(i,o=t)=>t3(e,i,o);return Object.assign(n,e),n},e3=(s,t)=>s?k_(s,t):k_;var yp={exports:{}},xp={exports:{}},Sp={exports:{}},Mp={};/** + * @license React + * scheduler.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var W_;function n3(){return W_||(W_=1,(function(s){function t(V,et){var q=V.length;V.push(et);t:for(;0>>1,ut=V[it];if(0>>1;iti(ne,q))sti(mt,ne)?(V[it]=mt,V[st]=q,it=st):(V[it]=ne,V[It]=q,it=It);else if(sti(mt,q))V[it]=mt,V[st]=q,it=st;else break t}}return et}function i(V,et){var q=V.sortIndex-et.sortIndex;return q!==0?q:V.id-et.id}if(s.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;s.unstable_now=function(){return o.now()}}else{var l=Date,c=l.now();s.unstable_now=function(){return l.now()-c}}var h=[],f=[],p=1,m=null,g=3,_=!1,x=!1,b=!1,S=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,E=typeof setImmediate<"u"?setImmediate:null;function A(V){for(var et=e(f);et!==null;){if(et.callback===null)n(f);else if(et.startTime<=V)n(f),et.sortIndex=et.expirationTime,t(h,et);else break;et=e(f)}}function T(V){if(b=!1,A(V),!x)if(e(h)!==null)x=!0,tt();else{var et=e(f);et!==null&&rt(T,et.startTime-V)}}var z=!1,D=-1,L=5,B=-1;function w(){return!(s.unstable_now()-BV&&w());){var it=m.callback;if(typeof it=="function"){m.callback=null,g=m.priorityLevel;var ut=it(m.expirationTime<=V);if(V=s.unstable_now(),typeof ut=="function"){m.callback=ut,A(V),et=!0;break e}m===e(h)&&n(h),A(V)}else n(h);m=e(h)}if(m!==null)et=!0;else{var bt=e(f);bt!==null&&rt(T,bt.startTime-V),et=!1}}break t}finally{m=null,g=q,_=!1}et=void 0}}finally{et?I():z=!1}}}var I;if(typeof E=="function")I=function(){E(C)};else if(typeof MessageChannel<"u"){var Z=new MessageChannel,K=Z.port2;Z.port1.onmessage=C,I=function(){K.postMessage(null)}}else I=function(){S(C,0)};function tt(){z||(z=!0,I())}function rt(V,et){D=S(function(){V(s.unstable_now())},et)}s.unstable_IdlePriority=5,s.unstable_ImmediatePriority=1,s.unstable_LowPriority=4,s.unstable_NormalPriority=3,s.unstable_Profiling=null,s.unstable_UserBlockingPriority=2,s.unstable_cancelCallback=function(V){V.callback=null},s.unstable_continueExecution=function(){x||_||(x=!0,tt())},s.unstable_forceFrameRate=function(V){0>V||125it?(V.sortIndex=q,t(f,V),e(h)===null&&V===e(f)&&(b?(y(D),D=-1):b=!0,rt(T,q-it))):(V.sortIndex=ut,t(h,V),x||_||(x=!0,tt())),V},s.unstable_shouldYield=w,s.unstable_wrapCallback=function(V){var et=g;return function(){var q=g;g=et;try{return V.apply(this,arguments)}finally{g=q}}}})(Mp)),Mp}var X_;function cS(){return X_||(X_=1,Sp.exports=n3()),Sp.exports}/** + * @license React + * react-reconciler.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var q_;function i3(){return q_||(q_=1,(function(s){s.exports=function(t){function e(a,r,u,d){return new YS(a,r,u,d)}function n(){}function i(a){var r="https://react.dev/errors/"+a;if(1)":-1v||Y[d]!==lt[v]){var St=` +`+Y[d].replace(" at new "," at ");return a.displayName&&St.includes("")&&(St=St.replace("",a.displayName)),St}while(1<=d&&0<=v);break}}}finally{$f=!1,Error.prepareStackTrace=u}return(u=a?a.displayName||a.name:"")?c(u):""}function f(a){switch(a.tag){case 26:case 27:case 5:return c(a.type);case 16:return c("Lazy");case 13:return c("Suspense");case 19:return c("SuspenseList");case 0:case 15:return a=h(a.type,!1),a;case 11:return a=h(a.type.render,!1),a;case 1:return a=h(a.type,!0),a;default:return""}}function p(a){try{var r="";do r+=f(a),a=a.return;while(a);return r}catch(u){return` +Error generating stack: `+u.message+` +`+u.stack}}function m(a){var r=a,u=a;if(a.alternate)for(;r.return;)r=r.return;else{a=r;do r=a,(r.flags&4098)!==0&&(u=r.return),a=r.return;while(a)}return r.tag===3?u:null}function g(a){if(m(a)!==a)throw Error(i(188))}function _(a){var r=a.alternate;if(!r){if(r=m(a),r===null)throw Error(i(188));return r!==a?null:a}for(var u=a,d=r;;){var v=u.return;if(v===null)break;var M=v.alternate;if(M===null){if(d=v.return,d!==null){u=d;continue}break}if(v.child===M.child){for(M=v.child;M;){if(M===u)return g(v),a;if(M===d)return g(v),r;M=M.sibling}throw Error(i(188))}if(u.return!==d.return)u=v,d=M;else{for(var U=!1,H=v.child;H;){if(H===u){U=!0,u=v,d=M;break}if(H===d){U=!0,d=v,u=M;break}H=H.sibling}if(!U){for(H=M.child;H;){if(H===u){U=!0,u=M,d=v;break}if(H===d){U=!0,d=M,u=v;break}H=H.sibling}if(!U)throw Error(i(189))}}if(u.alternate!==d)throw Error(i(190))}if(u.tag!==3)throw Error(i(188));return u.stateNode.current===u?a:r}function x(a){var r=a.tag;if(r===5||r===26||r===27||r===6)return a;for(a=a.child;a!==null;){if(r=x(a),r!==null)return r;a=a.sibling}return null}function b(a){var r=a.tag;if(r===5||r===26||r===27||r===6)return a;for(a=a.child;a!==null;){if(a.tag!==4&&(r=b(a),r!==null))return r;a=a.sibling}return null}function S(a){return{current:a}}function y(a){0>br||(a.current=ad[br],ad[br]=null,br--)}function E(a,r){br++,ad[br]=a.current,a.current=r}function A(a){return a>>>=0,a===0?32:31-(pb(a)/mb|0)|0}function T(a){var r=a&42;if(r!==0)return r;switch(a&-a){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:return 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 a&4194176;case 4194304:case 8388608:case 16777216:case 33554432:return a&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return a}}function z(a,r){var u=a.pendingLanes;if(u===0)return 0;var d=0,v=a.suspendedLanes,M=a.pingedLanes,U=a.warmLanes;a=a.finishedLanes!==0;var H=u&134217727;return H!==0?(u=H&~v,u!==0?d=T(u):(M&=H,M!==0?d=T(M):a||(U=H&~U,U!==0&&(d=T(U))))):(H=u&~v,H!==0?d=T(H):M!==0?d=T(M):a||(U=u&~U,U!==0&&(d=T(U)))),d===0?0:r!==0&&r!==d&&(r&v)===0&&(v=d&-d,U=r&-r,v>=U||v===32&&(U&4194176)!==0)?r:d}function D(a,r){return(a.pendingLanes&~(a.suspendedLanes&~a.pingedLanes)&r)===0}function L(a,r){switch(a){case 1:case 2:case 4:case 8:return r+250;case 16:case 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 r+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function B(){var a=_c;return _c<<=1,(_c&4194176)===0&&(_c=128),a}function w(){var a=yc;return yc<<=1,(yc&62914560)===0&&(yc=4194304),a}function C(a){for(var r=[],u=0;31>u;u++)r.push(a);return r}function I(a,r){a.pendingLanes|=r,r!==268435456&&(a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0)}function Z(a,r,u,d,v,M){var U=a.pendingLanes;a.pendingLanes=u,a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0,a.expiredLanes&=u,a.entangledLanes&=u,a.errorRecoveryDisabledLanes&=u,a.shellSuspendCounter=0;var H=a.entanglements,Y=a.expirationTimes,lt=a.hiddenUpdates;for(u=U&~u;0>=U,v-=U,fs=1<<32-li(r)+v|u<Ne?(mn=se,se=null):mn=se.sibling;var Le=Pt(Q,se,nt[Ne],yt);if(Le===null){se===null&&(se=mn);break}a&&se&&Le.alternate===null&&r(Q,se),X=M(Le,X,Ne),Ye===null?jt=Le:Ye.sibling=Le,Ye=Le,se=mn}if(Ne===nt.length)return u(Q,se),Ue&&ut(Q,Ne),jt;if(se===null){for(;NeNe?(mn=se,se=null):mn=se.sibling;var Js=Pt(Q,se,Le.value,yt);if(Js===null){se===null&&(se=mn);break}a&&se&&Js.alternate===null&&r(Q,se),X=M(Js,X,Ne),Ye===null?jt=Js:Ye.sibling=Js,Ye=Js,se=mn}if(Le.done)return u(Q,se),Ue&&ut(Q,Ne),jt;if(se===null){for(;!Le.done;Ne++,Le=nt.next())Le=Lt(Q,Le.value,yt),Le!==null&&(X=M(Le,X,Ne),Ye===null?jt=Le:Ye.sibling=Le,Ye=Le);return Ue&&ut(Q,Ne),jt}for(se=d(se);!Le.done;Ne++,Le=nt.next())Le=he(se,Q,Ne,Le.value,yt),Le!==null&&(a&&Le.alternate!==null&&se.delete(Le.key===null?Ne:Le.key),X=M(Le,X,Ne),Ye===null?jt=Le:Ye.sibling=Le,Ye=Le);return a&&se.forEach(function(Rb){return r(Q,Rb)}),Ue&&ut(Q,Ne),jt}function Na(Q,X,nt,yt){if(typeof nt=="object"&&nt!==null&&nt.type===Sr&&nt.key===null&&(nt=nt.props.children),typeof nt=="object"&&nt!==null){switch(nt.$$typeof){case mc:t:{for(var jt=nt.key;X!==null;){if(X.key===jt){if(jt=nt.type,jt===Sr){if(X.tag===7){u(Q,X.sibling),yt=v(X,nt.props.children),yt.return=Q,Q=yt;break t}}else if(X.elementType===jt||typeof jt=="object"&&jt!==null&&jt.$$typeof===ks&&kn(jt)===X.type){u(Q,X.sibling),yt=v(X,nt.props),je(yt,nt),yt.return=Q,Q=yt;break t}u(Q,X);break}else r(Q,X);X=X.sibling}nt.type===Sr?(yt=xa(nt.props.children,Q.mode,yt,nt.key),yt.return=Q,Q=yt):(yt=pc(nt.type,nt.key,nt.props,null,Q.mode,yt),je(yt,nt),yt.return=Q,Q=yt)}return U(Q);case xr:t:{for(jt=nt.key;X!==null;){if(X.key===jt)if(X.tag===4&&X.stateNode.containerInfo===nt.containerInfo&&X.stateNode.implementation===nt.implementation){u(Q,X.sibling),yt=v(X,nt.children||[]),yt.return=Q,Q=yt;break t}else{u(Q,X);break}else r(Q,X);X=X.sibling}yt=Wf(nt,Q.mode,yt),yt.return=Q,Q=yt}return U(Q);case ks:return jt=nt._init,nt=jt(nt._payload),Na(Q,X,nt,yt)}if(gc(nt))return Ci(Q,X,nt,yt);if(o(nt)){if(jt=o(nt),typeof jt!="function")throw Error(i(150));return nt=jt.call(nt),Ko(Q,X,nt,yt)}if(typeof nt.then=="function")return Na(Q,X,Ge(nt),yt);if(nt.$$typeof===Gs)return Na(Q,X,lc(Q,nt),yt);be(Q,nt)}return typeof nt=="string"&&nt!==""||typeof nt=="number"||typeof nt=="bigint"?(nt=""+nt,X!==null&&X.tag===6?(u(Q,X.sibling),yt=v(X,nt),yt.return=Q,Q=yt):(u(Q,X),yt=kf(nt,Q.mode,yt),yt.return=Q,Q=yt),U(Q)):u(Q,X)}return function(Q,X,nt,yt){try{Go=0;var jt=Na(Q,X,nt,yt);return Lr=null,jt}catch(se){if(se===Vo)throw se;var Ye=e(29,se,null,Q.mode);return Ye.lanes=yt,Ye.return=Q,Ye}finally{}}}function To(a,r){a=vs,E(Cc,a),E(Pr,r),vs=a|r.baseLanes}function fr(){E(Cc,vs),E(Pr,Pr.current)}function Di(){vs=Cc.current,y(Pr),y(Cc)}function yi(a){var r=a.alternate;E(cn,cn.current&1),E(Ti,a),Ki===null&&(r===null||Pr.current!==null||r.memoizedState!==null)&&(Ki=a)}function Ao(a){if(a.tag===22){if(E(cn,cn.current),E(Ti,a),Ki===null){var r=a.alternate;r!==null&&r.memoizedState!==null&&(Ki=a)}}else Ui()}function Ui(){E(cn,cn.current),E(Ti,Ti.current)}function Wn(a){y(Ti),Ki===a&&(Ki=null),y(cn)}function pa(a){for(var r=a;r!==null;){if(r.tag===13){var u=r.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||nd(u)||id(u)))return r}else if(r.tag===19&&r.memoizedProps.revealOrder!==void 0){if((r.flags&128)!==0)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===a)break;for(;r.sibling===null;){if(r.return===null||r.return===a)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}function ke(){throw Error(i(321))}function dr(a,r){if(r===null)return!1;for(var u=0;uM?M:8);var U=oe.T,H={};oe.T=H,cf(a,!1,r,u);try{var Y=v(),lt=oe.S;if(lt!==null&<(H,Y),Y!==null&&typeof Y=="object"&&typeof Y.then=="function"){var St=ve(Y,d);Co(a,r,St,ri(a))}else Co(a,r,d,ri(a))}catch(Lt){Co(a,r,{then:function(){},status:"rejected",reason:Lt},ri())}finally{qn(M),oe.T=U}}function sg(a){var r=a.memoizedState;if(r!==null)return r;r={memoizedState:Mr,baseState:Mr,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ft,lastRenderedState:Mr},next:null};var u={};return r.next={memoizedState:u,baseState:u,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ft,lastRenderedState:u},next:null},a.memoizedState=r,a=a.alternate,a!==null&&(a.memoizedState=r),r}function lf(){return bn(Ma)}function ag(){return G().memoizedState}function rg(){return G().memoizedState}function DS(a){for(var r=a.return;r!==null;){switch(r.tag){case 24:case 3:var u=ri();a=Kt(u);var d=Jt(r,a,u);d!==null&&(In(d,r,u),Bt(d,r,u)),r={cache:Mf()},a.payload=r;return}r=r.return}}function US(a,r,u){var d=ri();u={lane:d,revertLane:0,action:u,hasEagerState:!1,eagerState:null,next:null},ac(a)?lg(r,u):(u=gt(a,r,u,d),u!==null&&(In(u,a,d),cg(u,r,d)))}function og(a,r,u){var d=ri();Co(a,r,u,d)}function Co(a,r,u,d){var v={lane:d,revertLane:0,action:u,hasEagerState:!1,eagerState:null,next:null};if(ac(a))lg(r,v);else{var M=a.alternate;if(a.lanes===0&&(M===null||M.lanes===0)&&(M=r.lastRenderedReducer,M!==null))try{var U=r.lastRenderedState,H=M(U,u);if(v.hasEagerState=!0,v.eagerState=H,ui(H,U))return kt(a,r,v,0),We===null&&F(),!1}catch{}finally{}if(u=gt(a,r,v,d),u!==null)return In(u,a,d),cg(u,r,d),!0}return!1}function cf(a,r,u,d){if(d={lane:2,revertLane:Gt(),action:d,hasEagerState:!1,eagerState:null,next:null},ac(a)){if(r)throw Error(i(479))}else r=gt(a,u,d,2),r!==null&&In(r,a,2)}function ac(a){var r=a.alternate;return a===ge||r!==null&&r===ge}function lg(a,r){Ir=wc=!0;var u=a.pending;u===null?r.next=r:(r.next=u.next,u.next=r),a.pending=r}function cg(a,r,u){if((u&4194176)!==0){var d=r.lanes;d&=a.pendingLanes,u|=d,r.lanes=u,tt(a,u)}}function uf(a,r,u,d){r=a.memoizedState,u=u(d,r),u=u==null?r:qf({},r,u),a.memoizedState=u,a.lanes===0&&(a.updateQueue.baseState=u)}function ug(a,r,u,d,v,M,U){return a=a.stateNode,typeof a.shouldComponentUpdate=="function"?a.shouldComponentUpdate(d,M,U):r.prototype&&r.prototype.isPureReactComponent?!at(u,d)||!at(v,M):!0}function hg(a,r,u,d){a=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(u,d),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(u,d),r.state!==a&&gd.enqueueReplaceState(r,r.state,null)}function ma(a,r){var u=r;if("ref"in r){u={};for(var d in r)d!=="ref"&&(u[d]=r[d])}if(a=a.defaultProps){u===r&&(u=qf({},u));for(var v in a)u[v]===void 0&&(u[v]=a[v])}return u}function rc(a,r){try{var u=a.onUncaughtError;u(r.value,{componentStack:r.stack})}catch(d){setTimeout(function(){throw d})}}function fg(a,r,u){try{var d=a.onCaughtError;d(u.value,{componentStack:u.stack,errorBoundary:r.tag===1?r.stateNode:null})}catch(v){setTimeout(function(){throw v})}}function hf(a,r,u){return u=Kt(u),u.tag=3,u.payload={element:null},u.callback=function(){rc(a,r)},u}function dg(a){return a=Kt(a),a.tag=3,a}function pg(a,r,u,d){var v=u.type.getDerivedStateFromError;if(typeof v=="function"){var M=d.value;a.payload=function(){return v(M)},a.callback=function(){fg(r,u,d)}}var U=u.stateNode;U!==null&&typeof U.componentDidCatch=="function"&&(a.callback=function(){fg(r,u,d),typeof v!="function"&&(js===null?js=new Set([this]):js.add(this));var H=d.stack;this.componentDidCatch(d.value,{componentStack:H!==null?H:""})})}function NS(a,r,u,d,v){if(u.flags|=32768,d!==null&&typeof d=="object"&&typeof d.then=="function"){if(r=u.alternate,r!==null&&Ro(r,u,v,!0),u=Ti.current,u!==null){switch(u.tag){case 13:return Ki===null?Ff():u.alternate===null&&$e===0&&($e=3),u.flags&=-257,u.flags|=65536,u.lanes=v,d===Ac?u.flags|=16384:(r=u.updateQueue,r===null?u.updateQueue=new Set([d]):r.add(d),Vf(a,d,v)),!1;case 22:return u.flags|=65536,d===Ac?u.flags|=16384:(r=u.updateQueue,r===null?(r={transitions:null,markerInstances:null,retryQueue:new Set([d])},u.updateQueue=r):(u=r.retryQueue,u===null?r.retryQueue=new Set([d]):u.add(d)),Vf(a,d,v)),!1}throw Error(i(435,u.tag))}return Vf(a,d,v),Ff(),!1}if(Ue)return r=Ti.current,r!==null?((r.flags&65536)===0&&(r.flags|=256),r.flags|=65536,r.lanes=v,d!==ld&&(a=Error(i(422),{cause:d}),_t(it(a,u)))):(d!==ld&&(r=Error(i(423),{cause:d}),_t(it(r,u))),a=a.current.alternate,a.flags|=65536,v&=-v,a.lanes|=v,d=it(d,u),v=hf(a.stateNode,d,v),_e(a,v),$e!==4&&($e=2)),!1;var M=Error(i(520),{cause:d});if(M=it(M,u),Xo===null?Xo=[M]:Xo.push(M),$e!==4&&($e=2),r===null)return!0;d=it(d,u),u=r;do{switch(u.tag){case 3:return u.flags|=65536,a=v&-v,u.lanes|=a,a=hf(u.stateNode,d,a),_e(u,a),!1;case 1:if(r=u.type,M=u.stateNode,(u.flags&128)===0&&(typeof r.getDerivedStateFromError=="function"||M!==null&&typeof M.componentDidCatch=="function"&&(js===null||!js.has(M))))return u.flags|=65536,v&=-v,u.lanes|=v,v=dg(v),pg(v,a,u,d),_e(u,v),!1}u=u.return}while(u!==null);return!1}function yn(a,r,u,d){r.child=a===null?jv(r,null,u,d):Ea(r,a.child,u,d)}function mg(a,r,u,d,v){u=u.render;var M=r.ref;if("ref"in d){var U={};for(var H in d)H!=="ref"&&(U[H]=d[H])}else U=d;return ga(r),d=pr(a,r,u,U,M,v),H=N(),a!==null&&!dn?(W(a,r,v),os(a,r,v)):(Ue&&H&&It(r),r.flags|=1,yn(a,r,d,v),r.child)}function gg(a,r,u,d,v){if(a===null){var M=u.type;return typeof M=="function"&&!Gf(M)&&M.defaultProps===void 0&&u.compare===null?(r.tag=15,r.type=M,vg(a,r,M,d,v)):(a=pc(u.type,null,d,r,r.mode,v),a.ref=r.ref,a.return=r,r.child=a)}if(M=a.child,!yf(a,v)){var U=M.memoizedProps;if(u=u.compare,u=u!==null?u:at,u(U,d)&&a.ref===r.ref)return os(a,r,v)}return r.flags|=1,a=Vs(M,d),a.ref=r.ref,a.return=r,r.child=a}function vg(a,r,u,d,v){if(a!==null){var M=a.memoizedProps;if(at(M,d)&&a.ref===r.ref)if(dn=!1,r.pendingProps=d=M,yf(a,v))(a.flags&131072)!==0&&(dn=!0);else return r.lanes=a.lanes,os(a,r,v)}return ff(a,r,u,d,v)}function _g(a,r,u){var d=r.pendingProps,v=d.children,M=(r.stateNode._pendingVisibility&2)!==0,U=a!==null?a.memoizedState:null;if(wo(a,r),d.mode==="hidden"||M){if((r.flags&128)!==0){if(d=U!==null?U.baseLanes|u:u,a!==null){for(v=r.child=a.child,M=0;v!==null;)M=M|v.lanes|v.childLanes,v=v.sibling;r.childLanes=M&~d}else r.childLanes=0,r.child=null;return yg(a,r,d,u)}if((u&536870912)!==0)r.memoizedState={baseLanes:0,cachePool:null},a!==null&&cc(r,U!==null?U.cachePool:null),U!==null?To(r,U):fr(),Ao(r);else return r.lanes=r.childLanes=536870912,yg(a,r,U!==null?U.baseLanes|u:u,u)}else U!==null?(cc(r,U.cachePool),To(r,U),Ui(),r.memoizedState=null):(a!==null&&cc(r,null),fr(),Ui());return yn(a,r,v,u),r.child}function yg(a,r,u,d){var v=bf();return v=v===null?null:{parent:hs?Je._currentValue:Je._currentValue2,pool:v},r.memoizedState={baseLanes:u,cachePool:v},a!==null&&cc(r,null),fr(),Ao(r),a!==null&&Ro(a,r,d,!0),null}function wo(a,r){var u=r.ref;if(u===null)a!==null&&a.ref!==null&&(r.flags|=2097664);else{if(typeof u!="function"&&typeof u!="object")throw Error(i(284));(a===null||a.ref!==u)&&(r.flags|=2097664)}}function ff(a,r,u,d,v){return ga(r),u=pr(a,r,u,d,void 0,v),d=N(),a!==null&&!dn?(W(a,r,v),os(a,r,v)):(Ue&&d&&It(r),r.flags|=1,yn(a,r,u,v),r.child)}function xg(a,r,u,d,v,M){return ga(r),r.updateQueue=null,u=ec(r,d,u,v),tc(a),d=N(),a!==null&&!dn?(W(a,r,M),os(a,r,M)):(Ue&&d&&It(r),r.flags|=1,yn(a,r,u,M),r.child)}function Sg(a,r,u,d,v){if(ga(r),r.stateNode===null){var M=Er,U=u.contextType;typeof U=="object"&&U!==null&&(M=bn(U)),M=new u(d,M),r.memoizedState=M.state!==null&&M.state!==void 0?M.state:null,M.updater=gd,r.stateNode=M,M._reactInternals=r,M=r.stateNode,M.props=d,M.state=r.memoizedState,M.refs={},vt(r),U=u.contextType,M.context=typeof U=="object"&&U!==null?bn(U):Er,M.state=r.memoizedState,U=u.getDerivedStateFromProps,typeof U=="function"&&(uf(r,u,U,d),M.state=r.memoizedState),typeof u.getDerivedStateFromProps=="function"||typeof M.getSnapshotBeforeUpdate=="function"||typeof M.UNSAFE_componentWillMount!="function"&&typeof M.componentWillMount!="function"||(U=M.state,typeof M.componentWillMount=="function"&&M.componentWillMount(),typeof M.UNSAFE_componentWillMount=="function"&&M.UNSAFE_componentWillMount(),U!==M.state&&gd.enqueueReplaceState(M,M.state,null),De(r,d,M,v),ae(),M.state=r.memoizedState),typeof M.componentDidMount=="function"&&(r.flags|=4194308),d=!0}else if(a===null){M=r.stateNode;var H=r.memoizedProps,Y=ma(u,H);M.props=Y;var lt=M.context,St=u.contextType;U=Er,typeof St=="object"&&St!==null&&(U=bn(St));var Lt=u.getDerivedStateFromProps;St=typeof Lt=="function"||typeof M.getSnapshotBeforeUpdate=="function",H=r.pendingProps!==H,St||typeof M.UNSAFE_componentWillReceiveProps!="function"&&typeof M.componentWillReceiveProps!="function"||(H||lt!==U)&&hg(r,M,d,U),qs=!1;var Pt=r.memoizedState;M.state=Pt,De(r,d,M,v),ae(),lt=r.memoizedState,H||Pt!==lt||qs?(typeof Lt=="function"&&(uf(r,u,Lt,d),lt=r.memoizedState),(Y=qs||ug(r,u,Y,d,Pt,lt,U))?(St||typeof M.UNSAFE_componentWillMount!="function"&&typeof M.componentWillMount!="function"||(typeof M.componentWillMount=="function"&&M.componentWillMount(),typeof M.UNSAFE_componentWillMount=="function"&&M.UNSAFE_componentWillMount()),typeof M.componentDidMount=="function"&&(r.flags|=4194308)):(typeof M.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=d,r.memoizedState=lt),M.props=d,M.state=lt,M.context=U,d=Y):(typeof M.componentDidMount=="function"&&(r.flags|=4194308),d=!1)}else{M=r.stateNode,Ht(a,r),U=r.memoizedProps,St=ma(u,U),M.props=St,Lt=r.pendingProps,Pt=M.context,lt=u.contextType,Y=Er,typeof lt=="object"&<!==null&&(Y=bn(lt)),H=u.getDerivedStateFromProps,(lt=typeof H=="function"||typeof M.getSnapshotBeforeUpdate=="function")||typeof M.UNSAFE_componentWillReceiveProps!="function"&&typeof M.componentWillReceiveProps!="function"||(U!==Lt||Pt!==Y)&&hg(r,M,d,Y),qs=!1,Pt=r.memoizedState,M.state=Pt,De(r,d,M,v),ae();var he=r.memoizedState;U!==Lt||Pt!==he||qs||a!==null&&a.dependencies!==null&&oc(a.dependencies)?(typeof H=="function"&&(uf(r,u,H,d),he=r.memoizedState),(St=qs||ug(r,u,St,d,Pt,he,Y)||a!==null&&a.dependencies!==null&&oc(a.dependencies))?(lt||typeof M.UNSAFE_componentWillUpdate!="function"&&typeof M.componentWillUpdate!="function"||(typeof M.componentWillUpdate=="function"&&M.componentWillUpdate(d,he,Y),typeof M.UNSAFE_componentWillUpdate=="function"&&M.UNSAFE_componentWillUpdate(d,he,Y)),typeof M.componentDidUpdate=="function"&&(r.flags|=4),typeof M.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof M.componentDidUpdate!="function"||U===a.memoizedProps&&Pt===a.memoizedState||(r.flags|=4),typeof M.getSnapshotBeforeUpdate!="function"||U===a.memoizedProps&&Pt===a.memoizedState||(r.flags|=1024),r.memoizedProps=d,r.memoizedState=he),M.props=d,M.state=he,M.context=Y,d=St):(typeof M.componentDidUpdate!="function"||U===a.memoizedProps&&Pt===a.memoizedState||(r.flags|=4),typeof M.getSnapshotBeforeUpdate!="function"||U===a.memoizedProps&&Pt===a.memoizedState||(r.flags|=1024),d=!1)}return M=d,wo(a,r),d=(r.flags&128)!==0,M||d?(M=r.stateNode,u=d&&typeof u.getDerivedStateFromError!="function"?null:M.render(),r.flags|=1,a!==null&&d?(r.child=Ea(r,a.child,null,v),r.child=Ea(r,null,u,v)):yn(a,r,u,v),r.memoizedState=M.state,a=r.child):a=os(a,r,v),a}function Mg(a,r,u,d){return ht(),r.flags|=256,yn(a,r,u,d),r.child}function df(a){return{baseLanes:a,cachePool:wg()}}function pf(a,r,u){return a=a!==null?a.childLanes&~u:0,r&&(a|=Ai),a}function bg(a,r,u){var d=r.pendingProps,v=!1,M=(r.flags&128)!==0,U;if((U=M)||(U=a!==null&&a.memoizedState===null?!1:(cn.current&2)!==0),U&&(v=!0,r.flags&=-129),U=(r.flags&32)!==0,r.flags&=-33,a===null){if(Ue){if(v?yi(r):Ui(),Ue){var H=An,Y;(Y=H)&&(H=KM(H,Zi),H!==null?(r.memoizedState={dehydrated:H,treeContext:ba!==null?{id:fs,overflow:ds}:null,retryLane:536870912},Y=e(18,null,null,0),Y.stateNode=H,Y.return=r,r.child=Y,On=r,An=null,Y=!0):Y=!1),Y||Yt(r)}if(H=r.memoizedState,H!==null&&(H=H.dehydrated,H!==null))return id(H)?r.lanes=16:r.lanes=536870912,null;Wn(r)}return H=d.children,d=d.fallback,v?(Ui(),v=r.mode,H=gf({mode:"hidden",children:H},v),d=xa(d,v,u,null),H.return=r,d.return=r,H.sibling=d,r.child=H,v=r.child,v.memoizedState=df(u),v.childLanes=pf(a,U,u),r.memoizedState=vd,d):(yi(r),mf(r,H))}if(Y=a.memoizedState,Y!==null&&(H=Y.dehydrated,H!==null)){if(M)r.flags&256?(yi(r),r.flags&=-257,r=vf(a,r,u)):r.memoizedState!==null?(Ui(),r.child=a.child,r.flags|=128,r=null):(Ui(),v=d.fallback,H=r.mode,d=gf({mode:"visible",children:d.children},H),v=xa(v,H,u,null),v.flags|=2,d.return=r,v.return=r,d.sibling=v,r.child=d,Ea(r,a.child,null,u),d=r.child,d.memoizedState=df(u),d.childLanes=pf(a,U,u),r.memoizedState=vd,r=v);else if(yi(r),id(H))U=VM(H).digest,d=Error(i(419)),d.stack="",d.digest=U,_t({value:d,source:null,stack:null}),r=vf(a,r,u);else if(dn||Ro(a,r,u,!1),U=(u&a.childLanes)!==0,dn||U){if(U=We,U!==null){if(d=u&-u,(d&42)!==0)d=1;else switch(d){case 2:d=1;break;case 8:d=4;break;case 32:d=16;break;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:case 4194304:case 8388608:case 16777216:case 33554432:d=64;break;case 268435456:d=134217728;break;default:d=0}if(d=(d&(U.suspendedLanes|u))!==0?0:d,d!==0&&d!==Y.retryLane)throw Y.retryLane=d,Dt(a,d),In(U,a,d),Qv}nd(H)||Ff(),r=vf(a,r,u)}else nd(H)?(r.flags|=128,r.child=a.child,r=WS.bind(null,a),GM(H,r),r=null):(a=Y.treeContext,xi&&(An=qM(H),On=r,Ue=!0,Oi=null,Zi=!1,a!==null&&(Mi[bi++]=fs,Mi[bi++]=ds,Mi[bi++]=ba,fs=a.id,ds=a.overflow,ba=r)),r=mf(r,d.children),r.flags|=4096);return r}return v?(Ui(),v=d.fallback,H=r.mode,Y=a.child,M=Y.sibling,d=Vs(Y,{mode:"hidden",children:d.children}),d.subtreeFlags=Y.subtreeFlags&31457280,M!==null?v=Vs(M,v):(v=xa(v,H,u,null),v.flags|=2),v.return=r,d.return=r,d.sibling=v,r.child=d,d=v,v=r.child,H=a.child.memoizedState,H===null?H=df(u):(Y=H.cachePool,Y!==null?(M=hs?Je._currentValue:Je._currentValue2,Y=Y.parent!==M?{parent:M,pool:M}:Y):Y=wg(),H={baseLanes:H.baseLanes|u,cachePool:Y}),v.memoizedState=H,v.childLanes=pf(a,U,u),r.memoizedState=vd,d):(yi(r),u=a.child,a=u.sibling,u=Vs(u,{mode:"visible",children:d.children}),u.return=r,u.sibling=null,a!==null&&(U=r.deletions,U===null?(r.deletions=[a],r.flags|=16):U.push(a)),r.child=u,r.memoizedState=null,u)}function mf(a,r){return r=gf({mode:"visible",children:r},a.mode),r.return=a,a.child=r}function gf(a,r){return dv(a,r,0,null)}function vf(a,r,u){return Ea(r,a.child,null,u),a=mf(r,r.pendingProps.children),a.flags|=2,r.memoizedState=null,a}function Eg(a,r,u){a.lanes|=r;var d=a.alternate;d!==null&&(d.lanes|=r),xf(a.return,r,u)}function _f(a,r,u,d,v){var M=a.memoizedState;M===null?a.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:d,tail:u,tailMode:v}:(M.isBackwards=r,M.rendering=null,M.renderingStartTime=0,M.last=d,M.tail=u,M.tailMode=v)}function Tg(a,r,u){var d=r.pendingProps,v=d.revealOrder,M=d.tail;if(yn(a,r,d.children,u),d=cn.current,(d&2)!==0)d=d&1|2,r.flags|=128;else{if(a!==null&&(a.flags&128)!==0)t:for(a=r.child;a!==null;){if(a.tag===13)a.memoizedState!==null&&Eg(a,u,r);else if(a.tag===19)Eg(a,u,r);else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===r)break t;for(;a.sibling===null;){if(a.return===null||a.return===r)break t;a=a.return}a.sibling.return=a.return,a=a.sibling}d&=1}switch(E(cn,d),v){case"forwards":for(u=r.child,v=null;u!==null;)a=u.alternate,a!==null&&pa(a)===null&&(v=u),u=u.sibling;u=v,u===null?(v=r.child,r.child=null):(v=u.sibling,u.sibling=null),_f(r,!1,v,u,M);break;case"backwards":for(u=null,v=r.child,r.child=null;v!==null;){if(a=v.alternate,a!==null&&pa(a)===null){r.child=v;break}a=v.sibling,v.sibling=u,u=v,v=a}_f(r,!0,u,null,M);break;case"together":_f(r,!1,null,null,void 0);break;default:r.memoizedState=null}return r.child}function os(a,r,u){if(a!==null&&(r.dependencies=a.dependencies),Ks|=r.lanes,(u&r.childLanes)===0)if(a!==null){if(Ro(a,r,u,!1),(u&r.childLanes)===0)return null}else return null;if(a!==null&&r.child!==a.child)throw Error(i(153));if(r.child!==null){for(a=r.child,u=Vs(a,a.pendingProps),r.child=u,u.return=r;a.sibling!==null;)a=a.sibling,u=u.sibling=Vs(a,a.pendingProps),u.return=r;u.sibling=null}return r.child}function yf(a,r){return(a.lanes&r)!==0?!0:(a=a.dependencies,!!(a!==null&&oc(a)))}function LS(a,r,u){switch(r.tag){case 3:st(r,r.stateNode.containerInfo),Bs(r,Je,a.memoizedState.cache),ht();break;case 27:case 5:Vt(r);break;case 4:st(r,r.stateNode.containerInfo);break;case 10:Bs(r,r.type,r.memoizedProps.value);break;case 13:var d=r.memoizedState;if(d!==null)return d.dehydrated!==null?(yi(r),r.flags|=128,null):(u&r.child.childLanes)!==0?bg(a,r,u):(yi(r),a=os(a,r,u),a!==null?a.sibling:null);yi(r);break;case 19:var v=(a.flags&128)!==0;if(d=(u&r.childLanes)!==0,d||(Ro(a,r,u,!1),d=(u&r.childLanes)!==0),v){if(d)return Tg(a,r,u);r.flags|=128}if(v=r.memoizedState,v!==null&&(v.rendering=null,v.tail=null,v.lastEffect=null),E(cn,cn.current),d)break;return null;case 22:case 23:return r.lanes=0,_g(a,r,u);case 24:Bs(r,Je,a.memoizedState.cache)}return os(a,r,u)}function Ag(a,r,u){if(a!==null)if(a.memoizedProps!==r.pendingProps)dn=!0;else{if(!yf(a,u)&&(r.flags&128)===0)return dn=!1,LS(a,r,u);dn=(a.flags&131072)!==0}else dn=!1,Ue&&(r.flags&1048576)!==0&&bt(r,Mc,r.index);switch(r.lanes=0,r.tag){case 16:t:{a=r.pendingProps;var d=r.elementType,v=d._init;if(d=v(d._payload),r.type=d,typeof d=="function")Gf(d)?(a=ma(d,a),r.tag=1,r=Sg(null,r,d,a,u)):(r.tag=0,r=ff(null,r,d,a,u));else{if(d!=null){if(v=d.$$typeof,v===Zf){r.tag=11,r=mg(null,r,d,a,u);break t}else if(v===Jf){r.tag=14,r=gg(null,r,d,a,u);break t}}throw r=l(d)||d,Error(i(306,r,""))}}return r;case 0:return ff(a,r,r.type,r.pendingProps,u);case 1:return d=r.type,v=ma(d,r.pendingProps),Sg(a,r,d,v,u);case 3:t:{if(st(r,r.stateNode.containerInfo),a===null)throw Error(i(387));var M=r.pendingProps;v=r.memoizedState,d=v.element,Ht(a,r),De(r,M,null,u);var U=r.memoizedState;if(M=U.cache,Bs(r,Je,M),M!==v.cache&&Sf(r,[Je],u,!0),ae(),M=U.element,xi&&v.isDehydrated)if(v={element:M,isDehydrated:!1,cache:U.cache},r.updateQueue.baseState=v,r.memoizedState=v,r.flags&256){r=Mg(a,r,M,u);break t}else if(M!==d){d=it(Error(i(424)),r),_t(d),r=Mg(a,r,M,u);break t}else for(xi&&(An=XM(r.stateNode.containerInfo),On=r,Ue=!0,Oi=null,Zi=!0),u=jv(r,null,M,u),r.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling;else{if(ht(),M===d){r=os(a,r,u);break t}yn(a,r,M,u)}r=r.child}return r;case 26:if(Si)return wo(a,r),a===null?(u=Hv(r.type,null,r.pendingProps,null))?r.memoizedState=u:Ue||(r.stateNode=ob(r.type,r.pendingProps,Xs.current,r)):r.memoizedState=Hv(r.type,a.memoizedProps,r.pendingProps,a.memoizedState),null;case 27:if(Tn)return Vt(r),a===null&&Tn&&Ue&&(d=r.stateNode=qv(r.type,r.pendingProps,Xs.current,xn.current,!1),On=r,Zi=!0,An=Bv(d)),d=r.pendingProps.children,a!==null||Ue?yn(a,r,d,u):r.child=Ea(r,null,d,u),wo(a,r),r.child;case 5:return a===null&&Ue&&(sb(r.type,r.pendingProps,xn.current),(v=d=An)&&(d=YM(d,r.type,r.pendingProps,Zi),d!==null?(r.stateNode=d,On=r,An=Bv(d),Zi=!1,v=!0):v=!1),v||Yt(r)),Vt(r),v=r.type,M=r.pendingProps,U=a!==null?a.memoizedProps:null,d=M.children,vc(v,M)?d=null:U!==null&&vc(v,U)&&(r.flags|=32),r.memoizedState!==null&&(v=pr(a,r,sf,null,null,u),hs?Ma._currentValue=v:Ma._currentValue2=v),wo(a,r),yn(a,r,d,u),r.child;case 6:return a===null&&Ue&&(ab(r.pendingProps,xn.current),(a=u=An)&&(u=ZM(u,r.pendingProps,Zi),u!==null?(r.stateNode=u,On=r,An=null,a=!0):a=!1),a||Yt(r)),null;case 13:return bg(a,r,u);case 4:return st(r,r.stateNode.containerInfo),d=r.pendingProps,a===null?r.child=Ea(r,null,d,u):yn(a,r,d,u),r.child;case 11:return mg(a,r,r.type,r.pendingProps,u);case 7:return yn(a,r,r.pendingProps,u),r.child;case 8:return yn(a,r,r.pendingProps.children,u),r.child;case 12:return yn(a,r,r.pendingProps.children,u),r.child;case 10:return d=r.pendingProps,Bs(r,r.type,d.value),yn(a,r,d.children,u),r.child;case 9:return v=r.type._context,d=r.pendingProps.children,ga(r),v=bn(v),d=d(v),r.flags|=1,yn(a,r,d,u),r.child;case 14:return gg(a,r,r.type,r.pendingProps,u);case 15:return vg(a,r,r.type,r.pendingProps,u);case 19:return Tg(a,r,u);case 22:return _g(a,r,u);case 24:return ga(r),d=bn(Je),a===null?(v=bf(),v===null&&(v=We,M=Mf(),v.pooledCache=M,M.refCount++,M!==null&&(v.pooledCacheLanes|=u),v=M),r.memoizedState={parent:d,cache:v},vt(r),Bs(r,Je,v)):((a.lanes&u)!==0&&(Ht(a,r),De(r,null,null,u),ae()),v=a.memoizedState,M=r.memoizedState,v.parent!==d?(v={parent:d,cache:d},r.memoizedState=v,r.lanes===0&&(r.memoizedState=r.updateQueue.baseState=v),Bs(r,Je,d)):(d=M.cache,Bs(r,Je,d),d!==v.cache&&Sf(r,[Je],u,!0))),yn(a,r,r.pendingProps.children,u),r.child;case 29:throw r.pendingProps}throw Error(i(156,r.tag))}function Bs(a,r,u){hs?(E(Dc,r._currentValue),r._currentValue=u):(E(Dc,r._currentValue2),r._currentValue2=u)}function ls(a){var r=Dc.current;hs?a._currentValue=r:a._currentValue2=r,y(Dc)}function xf(a,r,u){for(;a!==null;){var d=a.alternate;if((a.childLanes&r)!==r?(a.childLanes|=r,d!==null&&(d.childLanes|=r)):d!==null&&(d.childLanes&r)!==r&&(d.childLanes|=r),a===u)break;a=a.return}}function Sf(a,r,u,d){var v=a.child;for(v!==null&&(v.return=a);v!==null;){var M=v.dependencies;if(M!==null){var U=v.child;M=M.firstContext;t:for(;M!==null;){var H=M;M=v;for(var Y=0;Yqo&&(r.flags|=128,d=!0,Uo(v,!1),r.lanes=4194304)}else{if(!d)if(a=pa(M),a!==null){if(r.flags|=128,d=!0,a=a.updateQueue,r.updateQueue=a,uc(r,a),Uo(v,!0),v.tail===null&&v.tailMode==="hidden"&&!M.alternate&&!Ue)return Ze(r),null}else 2*Ii()-v.renderingStartTime>qo&&u!==536870912&&(r.flags|=128,d=!0,Uo(v,!1),r.lanes=4194304);v.isBackwards?(M.sibling=r.child,r.child=M):(a=v.last,a!==null?a.sibling=M:r.child=M,v.last=M)}return v.tail!==null?(r=v.tail,v.rendering=r,v.tail=r.sibling,v.renderingStartTime=Ii(),r.sibling=null,a=cn.current,E(cn,d?a&1|2:a&1),r):(Ze(r),null);case 22:case 23:return Wn(r),Di(),d=r.memoizedState!==null,a!==null?a.memoizedState!==null!==d&&(r.flags|=8192):d&&(r.flags|=8192),d?(u&536870912)!==0&&(r.flags&128)===0&&(Ze(r),r.subtreeFlags&6&&(r.flags|=8192)):Ze(r),u=r.updateQueue,u!==null&&uc(r,u.retryQueue),u=null,a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(u=a.memoizedState.cachePool.pool),d=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(d=r.memoizedState.cachePool.pool),d!==u&&(r.flags|=2048),a!==null&&y(Ra),null;case 24:return u=null,a!==null&&(u=a.memoizedState.cache),r.memoizedState.cache!==u&&(r.flags|=2048),ls(Je),Ze(r),null;case 25:return null}throw Error(i(156,r.tag))}function IS(a,r){switch(ne(r),r.tag){case 1:return a=r.flags,a&65536?(r.flags=a&-65537|128,r):null;case 3:return ls(Je),mt(),a=r.flags,(a&65536)!==0&&(a&128)===0?(r.flags=a&-65537|128,r):null;case 26:case 27:case 5:return Mt(r),null;case 13:if(Wn(r),a=r.memoizedState,a!==null&&a.dehydrated!==null){if(r.alternate===null)throw Error(i(340));ht()}return a=r.flags,a&65536?(r.flags=a&-65537|128,r):null;case 19:return y(cn),null;case 4:return mt(),null;case 10:return ls(r.type),null;case 22:case 23:return Wn(r),Di(),a!==null&&y(Ra),a=r.flags,a&65536?(r.flags=a&-65537|128,r):null;case 24:return ls(Je),null;case 25:return null;default:return null}}function Lg(a,r){switch(ne(r),r.tag){case 3:ls(Je),mt();break;case 26:case 27:case 5:Mt(r);break;case 4:mt();break;case 13:Wn(r);break;case 19:y(cn);break;case 10:ls(r.type);break;case 22:case 23:Wn(r),Di(),a!==null&&y(Ra);break;case 24:ls(Je)}}function No(a,r){try{var u=r.updateQueue,d=u!==null?u.lastEffect:null;if(d!==null){var v=d.next;u=v;do{if((u.tag&a)===a){d=void 0;var M=u.create,U=u.inst;d=M(),U.destroy=d}u=u.next}while(u!==v)}}catch(H){Oe(r,r.return,H)}}function zs(a,r,u){try{var d=r.updateQueue,v=d!==null?d.lastEffect:null;if(v!==null){var M=v.next;d=M;do{if((d.tag&a)===a){var U=d.inst,H=U.destroy;if(H!==void 0){U.destroy=void 0,v=r;var Y=u;try{H()}catch(lt){Oe(v,Y,lt)}}}d=d.next}while(d!==M)}}catch(lt){Oe(r,r.return,lt)}}function Pg(a){var r=a.updateQueue;if(r!==null){var u=a.stateNode;try{wt(r,u)}catch(d){Oe(a,a.return,d)}}}function Ig(a,r,u){u.props=ma(a.type,a.memoizedProps),u.state=a.memoizedState;try{u.componentWillUnmount()}catch(d){Oe(a,r,d)}}function va(a,r){try{var u=a.ref;if(u!==null){var d=a.stateNode;switch(a.tag){case 26:case 27:case 5:var v=Io(d);break;default:v=d}typeof u=="function"?a.refCleanup=u(v):u.current=v}}catch(M){Oe(a,r,M)}}function si(a,r){var u=a.ref,d=a.refCleanup;if(u!==null)if(typeof d=="function")try{d()}catch(v){Oe(a,r,v)}finally{a.refCleanup=null,a=a.alternate,a!=null&&(a.refCleanup=null)}else if(typeof u=="function")try{u(null)}catch(v){Oe(a,r,v)}else u.current=null}function Og(a){var r=a.type,u=a.memoizedProps,d=a.stateNode;try{wM(d,r,u,a)}catch(v){Oe(a,a.return,v)}}function Bg(a,r,u){try{RM(a.stateNode,a.type,u,r,a)}catch(d){Oe(a,a.return,d)}}function zg(a){return a.tag===5||a.tag===3||(Si?a.tag===26:!1)||(Tn?a.tag===27:!1)||a.tag===4}function Cf(a){t:for(;;){for(;a.sibling===null;){if(a.return===null||zg(a.return))return null;a=a.return}for(a.sibling.return=a.return,a=a.sibling;a.tag!==5&&a.tag!==6&&(!Tn||a.tag!==27)&&a.tag!==18;){if(a.flags&2||a.child===null||a.tag===4)continue t;a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}function wf(a,r,u){var d=a.tag;if(d===5||d===6)a=a.stateNode,r?UM(u,a,r):AM(u,a);else if(!(d===4||Tn&&d===27)&&(a=a.child,a!==null))for(wf(a,r,u),a=a.sibling;a!==null;)wf(a,r,u),a=a.sibling}function hc(a,r,u){var d=a.tag;if(d===5||d===6)a=a.stateNode,r?DM(u,a,r):TM(u,a);else if(!(d===4||Tn&&d===27)&&(a=a.child,a!==null))for(hc(a,r,u),a=a.sibling;a!==null;)hc(a,r,u),a=a.sibling}function Fg(a,r,u){a=a.containerInfo;try{Lv(a,u)}catch(d){Oe(r,r.return,d)}}function OS(a,r){for(sM(a.containerInfo),pn=r;pn!==null;)if(a=pn,r=a.child,(a.subtreeFlags&1028)!==0&&r!==null)r.return=a,pn=r;else for(;pn!==null;){a=pn;var u=a.alternate;switch(r=a.flags,a.tag){case 0:break;case 11:case 15:break;case 1:if((r&1024)!==0&&u!==null){r=void 0;var d=a,v=u.memoizedProps;u=u.memoizedState;var M=d.stateNode;try{var U=ma(d.type,v,d.elementType===d.type);r=M.getSnapshotBeforeUpdate(U,u),M.__reactInternalSnapshotBeforeUpdate=r}catch(H){Oe(d,d.return,H)}}break;case 3:(r&1024)!==0&&En&&zM(a.stateNode.containerInfo);break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((r&1024)!==0)throw Error(i(163))}if(r=a.sibling,r!==null){r.return=a.return,pn=r;break}pn=a.return}return U=e0,e0=!1,U}function Hg(a,r,u){var d=u.flags;switch(u.tag){case 0:case 11:case 15:cs(a,u),d&4&&No(5,u);break;case 1:if(cs(a,u),d&4)if(a=u.stateNode,r===null)try{a.componentDidMount()}catch(H){Oe(u,u.return,H)}else{var v=ma(u.type,r.memoizedProps);r=r.memoizedState;try{a.componentDidUpdate(v,r,a.__reactInternalSnapshotBeforeUpdate)}catch(H){Oe(u,u.return,H)}}d&64&&Pg(u),d&512&&va(u,u.return);break;case 3:if(cs(a,u),d&64&&(d=u.updateQueue,d!==null)){if(a=null,u.child!==null)switch(u.child.tag){case 27:case 5:a=Io(u.child.stateNode);break;case 1:a=u.child.stateNode}try{wt(d,a)}catch(H){Oe(u,u.return,H)}}break;case 26:if(Si){cs(a,u),d&512&&va(u,u.return);break}case 27:case 5:cs(a,u),r===null&&d&4&&Og(u),d&512&&va(u,u.return);break;case 12:cs(a,u);break;case 13:cs(a,u),d&4&&Gg(a,u);break;case 22:if(v=u.memoizedState!==null||ms,!v){r=r!==null&&r.memoizedState!==null||Qe;var M=ms,U=Qe;ms=v,(Qe=r)&&!U?Fs(a,u,(u.subtreeFlags&8772)!==0):cs(a,u),ms=M,Qe=U}d&512&&(u.memoizedProps.mode==="manual"?va(u,u.return):si(u,u.return));break;default:cs(a,u)}}function Vg(a){var r=a.alternate;r!==null&&(a.alternate=null,Vg(r)),a.child=null,a.deletions=null,a.sibling=null,a.tag===5&&(r=a.stateNode,r!==null&&fM(r)),a.stateNode=null,a.return=null,a.dependencies=null,a.memoizedProps=null,a.memoizedState=null,a.pendingProps=null,a.stateNode=null,a.updateQueue=null}function Pi(a,r,u){for(u=u.child;u!==null;)Rf(a,r,u),u=u.sibling}function Rf(a,r,u){if(ci&&typeof ci.onCommitFiberUnmount=="function")try{ci.onCommitFiberUnmount(zo,u)}catch{}switch(u.tag){case 26:if(Si){Qe||si(u,r),Pi(a,r,u),u.memoizedState?Gv(u.memoizedState):u.stateNode&&Wv(u.stateNode);break}case 27:if(Tn){Qe||si(u,r);var d=rn,v=hi;rn=u.stateNode,Pi(a,r,u),db(u.stateNode),rn=d,hi=v;break}case 5:Qe||si(u,r);case 6:if(En){if(d=rn,v=hi,rn=null,Pi(a,r,u),rn=d,hi=v,rn!==null)if(hi)try{LM(rn,u.stateNode)}catch(M){Oe(u,r,M)}else try{NM(rn,u.stateNode)}catch(M){Oe(u,r,M)}}else Pi(a,r,u);break;case 18:En&&rn!==null&&(hi?ib(rn,u.stateNode):nb(rn,u.stateNode));break;case 4:En?(d=rn,v=hi,rn=u.stateNode.containerInfo,hi=!0,Pi(a,r,u),rn=d,hi=v):(Ws&&Fg(u.stateNode,u,Uv()),Pi(a,r,u));break;case 0:case 11:case 14:case 15:Qe||zs(2,u,r),Qe||zs(4,u,r),Pi(a,r,u);break;case 1:Qe||(si(u,r),d=u.stateNode,typeof d.componentWillUnmount=="function"&&Ig(u,r,d)),Pi(a,r,u);break;case 21:Pi(a,r,u);break;case 22:Qe||si(u,r),Qe=(d=Qe)||u.memoizedState!==null,Pi(a,r,u),Qe=d;break;default:Pi(a,r,u)}}function Gg(a,r){if(xi&&r.memoizedState===null&&(a=r.alternate,a!==null&&(a=a.memoizedState,a!==null&&(a=a.dehydrated,a!==null))))try{eb(a)}catch(u){Oe(r,r.return,u)}}function BS(a){switch(a.tag){case 13:case 19:var r=a.stateNode;return r===null&&(r=a.stateNode=new t0),r;case 22:return a=a.stateNode,r=a._retryCache,r===null&&(r=a._retryCache=new t0),r;default:throw Error(i(435,a.tag))}}function Df(a,r){var u=BS(a);r.forEach(function(d){var v=XS.bind(null,a,d);u.has(d)||(u.add(d),d.then(v,v))})}function Xn(a,r){var u=r.deletions;if(u!==null)for(var d=0;d";case Nc:return":has("+(If(a)||"")+")";case Lc:return'[role="'+a.value+'"]';case Ic:return'"'+a.value+'"';case Pc:return'[data-testname="'+a.value+'"]';default:throw Error(i(365))}}function jg(a,r){var u=[];a=[a,0];for(var d=0;du?32:u;u=oe.T;var v=Sa();try{if(qn(d),oe.T=null,Ua===null)var M=!1;else{d=Ed,Ed=null;var U=Ua,H=Yo;if(Ua=null,Yo=0,(He&6)!==0)throw Error(i(331));var Y=He;if(He|=4,Zg(U.current),Xg(U,U.current,H,d),He=Y,P(0,!1),ci&&typeof ci.onPostCommitFiberRoot=="function")try{ci.onPostCommitFiberRoot(zo,U)}catch{}M=!0}return M}finally{qn(v),oe.T=u,cv(a,r)}}return!1}function uv(a,r,u){r=it(u,r),r=hf(a.stateNode,r,2),a=Jt(a,r,2),a!==null&&(I(a,2),Tt(a))}function Oe(a,r,u){if(a.tag===3)uv(a,a,u);else for(;r!==null;){if(r.tag===3){uv(r,a,u);break}else if(r.tag===1){var d=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof d.componentDidCatch=="function"&&(js===null||!js.has(d))){a=it(u,a),u=dg(2),d=Jt(r,u,2),d!==null&&(pg(u,d,r,a),I(d,2),Tt(d));break}}r=r.return}}function Vf(a,r,u){var d=a.pingCache;if(d===null){d=a.pingCache=new wb;var v=new Set;d.set(r,v)}else v=d.get(r),v===void 0&&(v=new Set,d.set(r,v));v.has(u)||(yd=!0,v.add(u),a=kS.bind(null,a,r,u),r.then(a,a))}function kS(a,r,u){var d=a.pingCache;d!==null&&d.delete(r),a.pingedLanes|=a.suspendedLanes&u,a.warmLanes&=~u,We===a&&(Ee&u)===u&&($e===4||$e===3&&(Ee&62914560)===Ee&&300>Ii()-Md?(He&2)===0&&_r(a,0):xd|=u,Fr===Ee&&(Fr=0)),Tt(a)}function hv(a,r){r===0&&(r=w()),a=Dt(a,r),a!==null&&(I(a,r),Tt(a))}function WS(a){var r=a.memoizedState,u=0;r!==null&&(u=r.retryLane),hv(a,u)}function XS(a,r){var u=0;switch(a.tag){case 13:var d=a.stateNode,v=a.memoizedState;v!==null&&(u=v.retryLane);break;case 19:d=a.stateNode;break;case 22:d=a.stateNode._retryCache;break;default:throw Error(i(314))}d!==null&&d.delete(r),hv(a,u)}function qS(a,r){return xc(a,r)}function YS(a,r,u,d){this.tag=a,this.key=u,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=d,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Gf(a){return a=a.prototype,!(!a||!a.isReactComponent)}function Vs(a,r){var u=a.alternate;return u===null?(u=e(a.tag,r,a.key,a.mode),u.elementType=a.elementType,u.type=a.type,u.stateNode=a.stateNode,u.alternate=a,a.alternate=u):(u.pendingProps=r,u.type=a.type,u.flags=0,u.subtreeFlags=0,u.deletions=null),u.flags=a.flags&31457280,u.childLanes=a.childLanes,u.lanes=a.lanes,u.child=a.child,u.memoizedProps=a.memoizedProps,u.memoizedState=a.memoizedState,u.updateQueue=a.updateQueue,r=a.dependencies,u.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},u.sibling=a.sibling,u.index=a.index,u.ref=a.ref,u.refCleanup=a.refCleanup,u}function fv(a,r){a.flags&=31457282;var u=a.alternate;return u===null?(a.childLanes=0,a.lanes=r,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=u.childLanes,a.lanes=u.lanes,a.child=u.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=u.memoizedProps,a.memoizedState=u.memoizedState,a.updateQueue=u.updateQueue,a.type=u.type,r=u.dependencies,a.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),a}function pc(a,r,u,d,v,M){var U=0;if(d=a,typeof a=="function")Gf(a)&&(U=1);else if(typeof a=="string")U=Si&&Tn?Fv(a,u,xn.current)?26:Yv(a)?27:5:Si?Fv(a,u,xn.current)?26:5:Tn&&Yv(a)?27:5;else t:switch(a){case Sr:return xa(u.children,v,M,r);case yv:U=8,v|=24;break;case Yf:return a=e(12,u,r,v|2),a.elementType=Yf,a.lanes=M,a;case Kf:return a=e(13,u,r,v),a.elementType=Kf,a.lanes=M,a;case jf:return a=e(19,u,r,v),a.elementType=jf,a.lanes=M,a;case Sv:return dv(u,v,M,r);default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case JS:case Gs:U=10;break t;case xv:U=9;break t;case Zf:U=11;break t;case Jf:U=14;break t;case ks:U=16,d=null;break t}U=29,u=Error(i(130,a===null?"null":typeof a,"")),d=null}return r=e(U,u,r,v),r.elementType=a,r.type=d,r.lanes=M,r}function xa(a,r,u,d){return a=e(7,a,d,r),a.lanes=u,a}function dv(a,r,u,d){a=e(22,a,d,r),a.elementType=Sv,a.lanes=u;var v={_visibility:1,_pendingVisibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null,_current:null,detach:function(){var M=v._current;if(M===null)throw Error(i(456));if((v._pendingVisibility&2)===0){var U=Dt(M,2);U!==null&&(v._pendingVisibility|=2,In(U,M,2))}},attach:function(){var M=v._current;if(M===null)throw Error(i(456));if((v._pendingVisibility&2)!==0){var U=Dt(M,2);U!==null&&(v._pendingVisibility&=-3,In(U,M,2))}}};return a.stateNode=v,a}function kf(a,r,u){return a=e(6,a,null,r),a.lanes=u,a}function Wf(a,r,u){return r=e(4,a.children!==null?a.children:[],a.key,r),r.lanes=u,r.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation},r}function ZS(a,r,u,d,v,M,U,H){this.tag=1,this.containerInfo=a,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=ed,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=C(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.finishedLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=C(0),this.hiddenUpdates=C(null),this.identifierPrefix=d,this.onUncaughtError=v,this.onCaughtError=M,this.onRecoverableError=U,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=H,this.incompleteTransitions=new Map}function pv(a,r,u,d,v,M,U,H,Y,lt,St,Lt){return a=new ZS(a,r,u,U,H,Y,lt,Lt),r=1,M===!0&&(r|=24),M=e(3,null,null,r),a.current=M,M.stateNode=a,r=Mf(),r.refCount++,a.pooledCache=r,r.refCount++,M.memoizedState={element:d,isDehydrated:u,cache:r},vt(M),a}function mv(a){return a?(a=Er,a):Er}function gv(a){var r=a._reactInternals;if(r===void 0)throw typeof a.render=="function"?Error(i(188)):(a=Object.keys(a).join(","),Error(i(268,a)));return a=_(r),a=a!==null?x(a):null,a===null?null:Io(a.stateNode)}function vv(a,r,u,d,v,M){v=mv(v),d.context===null?d.context=v:d.pendingContext=v,d=Kt(r),d.payload={element:u},M=M===void 0?null:M,M!==null&&(d.callback=M),u=Jt(a,d,r),u!==null&&(In(u,a,r),Bt(u,a,r))}function _v(a,r){if(a=a.memoizedState,a!==null&&a.dehydrated!==null){var u=a.retryLane;a.retryLane=u!==0&&u=lt&&M>=Lt&&v<=St&&U<=Pt){a.splice(r,1);break}else if(d!==lt||u.width!==Y.width||PtU){if(!(M!==Lt||u.height!==Y.height||Stv)){lt>d&&(Y.width+=lt-d,Y.x=d),StM&&(Y.height+=Lt-M,Y.y=M),Ptu&&(u=H)),H ")+` + +No matching component was found for: + `)+a.join(" > ")}return null},ye.getPublicRootInstance=function(a){if(a=a.current,!a.child)return null;switch(a.child.tag){case 27:case 5:return Io(a.child.stateNode);default:return a.child.stateNode}},ye.injectIntoDevTools=function(){var a={bundleType:0,version:tM,rendererPackageName:eM,currentDispatcherRef:oe,findFiberByHostInstance:Cv,reconcilerVersion:"19.0.0"};if(Ev!==null&&(a.rendererConfig=Ev),typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")a=!1;else{var r=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(r.isDisabled||!r.supportsFiber)a=!0;else{try{zo=r.inject(a),ci=r}catch{}a=!!r.checkDCE}}return a},ye.isAlreadyRendering=function(){return!1},ye.observeVisibleRects=function(a,r,u,d){if(!Oo)throw Error(i(363));a=Of(a,r);var v=EM(a,u,d).disconnect;return{disconnect:function(){v()}}},ye.shouldError=function(){return null},ye.shouldSuspend=function(){return!1},ye.startHostTransition=function(a,r,u,d){if(a.tag!==5)throw Error(i(476));var v=sg(a).queue;ig(a,v,r,Mr,u===null?n:function(){var M=sg(a).next.queue;return Co(a,M,{},ri()),u(d)})},ye.updateContainer=function(a,r,u,d){var v=r.current,M=ri();return vv(v,M,a,r,u,d),M},ye.updateContainerSync=function(a,r,u,d){return r.tag===0&&ya(),vv(r.current,2,a,r,u,d),2},ye},s.exports.default=s.exports,Object.defineProperty(s.exports,"__esModule",{value:!0})})(xp)),xp.exports}var Y_;function s3(){return Y_||(Y_=1,yp.exports=i3()),yp.exports}var a3=s3();const r3=tm(a3);var Z_=cS(),o3=Object.defineProperty,l3=Object.defineProperties,c3=Object.getOwnPropertyDescriptors,K_=Object.getOwnPropertySymbols,u3=Object.prototype.hasOwnProperty,h3=Object.prototype.propertyIsEnumerable,j_=(s,t,e)=>t in s?o3(s,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[t]=e,J_=(s,t)=>{for(var e in t||(t={}))u3.call(t,e)&&j_(s,e,t[e]);if(K_)for(var e of K_(t))h3.call(t,e)&&j_(s,e,t[e]);return s},f3=(s,t)=>l3(s,c3(t)),Q_,$_;typeof window<"u"&&((Q_=window.document)!=null&&Q_.createElement||(($_=window.navigator)==null?void 0:$_.product)==="ReactNative")?le.useLayoutEffect:le.useEffect;function Wm(s,t,e){if(!s)return;if(e(s)===!0)return s;let n=t?s.return:s.child;for(;n;){const i=Wm(n,t,e);if(i)return i;n=t?null:n.sibling}}function uS(s){try{return Object.defineProperties(s,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return s}}const ty=console.error;console.error=function(){const s=[...arguments].join("");if(s!=null&&s.startsWith("Warning:")&&s.includes("useContext")){console.error=ty;return}return ty.apply(this,arguments)};const Xm=uS(le.createContext(null));class hS extends le.Component{render(){return le.createElement(Xm.Provider,{value:this._reactInternals},this.props.children)}}function fS(){const s=le.useContext(Xm);if(s===null)throw new Error("its-fine: useFiber must be called within a !");const t=le.useId();return le.useMemo(()=>{for(const n of[s,s==null?void 0:s.alternate]){if(!n)continue;const i=Wm(n,!1,o=>{let l=o.memoizedState;for(;l;){if(l.memoizedState===t)return!0;l=l.next}});if(i)return i}},[s,t])}function d3(){const s=fS(),[t]=le.useState(()=>new Map);t.clear();let e=s;for(;e;){if(e.type&&typeof e.type=="object"){const i=e.type._context===void 0&&e.type.Provider===e.type?e.type:e.type._context;i&&i!==Xm&&!t.has(i)&&t.set(i,le.useContext(uS(i)))}e=e.return}return t}function p3(){const s=d3();return le.useMemo(()=>Array.from(s.keys()).reduce((t,e)=>n=>le.createElement(t,null,le.createElement(e.Provider,f3(J_({},n),{value:s.get(e)}))),t=>le.createElement(hS,J_({},t))),[s])}function dS(s){let t=s.root;for(;t.getState().previousRoot;)t=t.getState().previousRoot;return t}const pS=s=>s&&s.isOrthographicCamera,m3=s=>s&&s.hasOwnProperty("current"),$l=((s,t)=>typeof window<"u"&&(((s=window.document)==null?void 0:s.createElement)||((t=window.navigator)==null?void 0:t.product)==="ReactNative"))()?le.useLayoutEffect:le.useEffect;function mS(s){const t=le.useRef(s);return $l(()=>void(t.current=s),[s]),t}function g3(){const s=fS(),t=p3();return le.useMemo(()=>({children:e})=>{const i=!!Wm(s,!0,o=>o.type===le.StrictMode)?le.StrictMode:le.Fragment;return mi.jsx(i,{children:mi.jsx(t,{children:e})})},[s,t])}function v3({set:s}){return $l(()=>(s(new Promise(()=>null)),()=>s(!1)),[s]),null}const _3=(s=>(s=class extends le.Component{constructor(...e){super(...e),this.state={error:!1}}componentDidCatch(e){this.props.set(e)}render(){return this.state.error?null:this.props.children}},s.getDerivedStateFromError=()=>({error:!0}),s))();function gS(s){var t;const e=typeof window<"u"?(t=window.devicePixelRatio)!=null?t:2:1;return Array.isArray(s)?Math.min(Math.max(s[0],e),s[1]):s}function ll(s){var t;return(t=s.__r3f)==null?void 0:t.root.getState()}const qe={obj:s=>s===Object(s)&&!qe.arr(s)&&typeof s!="function",fun:s=>typeof s=="function",str:s=>typeof s=="string",num:s=>typeof s=="number",boo:s=>typeof s=="boolean",und:s=>s===void 0,nul:s=>s===null,arr:s=>Array.isArray(s),equ(s,t,{arrays:e="shallow",objects:n="reference",strict:i=!0}={}){if(typeof s!=typeof t||!!s!=!!t)return!1;if(qe.str(s)||qe.num(s)||qe.boo(s))return s===t;const o=qe.obj(s);if(o&&n==="reference")return s===t;const l=qe.arr(s);if(l&&e==="reference")return s===t;if((l||o)&&s===t)return!0;let c;for(c in s)if(!(c in t))return!1;if(o&&e==="shallow"&&n==="shallow"){for(c in i?t:s)if(!qe.equ(s[c],t[c],{strict:i,objects:"reference"}))return!1}else for(c in i?t:s)if(s[c]!==t[c])return!1;if(qe.und(c)){if(l&&s.length===0&&t.length===0||o&&Object.keys(s).length===0&&Object.keys(t).length===0)return!0;if(s!==t)return!1}return!0}};function y3(s){s.type!=="Scene"&&(s.dispose==null||s.dispose());for(const t in s){const e=s[t];(e==null?void 0:e.type)!=="Scene"&&(e==null||e.dispose==null||e.dispose())}}const vS=["children","key","ref"];function x3(s){const t={};for(const e in s)vS.includes(e)||(t[e]=s[e]);return t}function xh(s,t,e,n){const i=s;let o=i==null?void 0:i.__r3f;return o||(o={root:t,type:e,parent:null,children:[],props:x3(n),object:i,eventCount:0,handlers:{},isHidden:!1},i&&(i.__r3f=o,e&&Cs(i,o.props))),o}function Hl(s,t){var e;let n=s[t];if(!t.includes("-"))return{root:s,key:t,target:n};const i=t.split("-");return n=i.reduce((o,l)=>o[l],s),t=i.pop(),(e=n)!=null&&e.set||(s=i.reduce((o,l)=>o[l],s)),{root:s,key:t,target:n}}const ey=/-\d+$/;function Sh(s,t){if(qe.str(t.props.attach)){if(ey.test(t.props.attach)){const i=t.props.attach.replace(ey,""),{root:o,key:l}=Hl(s.object,i);Array.isArray(o[l])||(o[l]=[])}const{root:e,key:n}=Hl(s.object,t.props.attach);t.previousAttach=e[n],e[n]=t.object}else qe.fun(t.props.attach)&&(t.previousAttach=t.props.attach(s.object,t.object))}function Mh(s,t){if(qe.str(t.props.attach)){const{root:e,key:n}=Hl(s.object,t.props.attach),i=t.previousAttach;i===void 0?delete e[n]:e[n]=i}else t.previousAttach==null||t.previousAttach(s.object,t.object);delete t.previousAttach}const Yp=[...vS,"args","dispose","attach","object","onUpdate","dispose"],ny=new Map;function _S(s){let t=ny.get(s.constructor);try{t||(t=new s.constructor,ny.set(s.constructor,t))}catch{}return t}function S3(s,t){const e={};for(const n in t)if(!Yp.includes(n)&&!qe.equ(t[n],s.props[n])){e[n]=t[n];for(const i in t)i.startsWith(`${n}-`)&&(e[i]=t[i])}for(const n in s.props){if(Yp.includes(n)||t.hasOwnProperty(n))continue;const{root:i,key:o}=Hl(s.object,n);if(i.constructor&&i.constructor.length===0){const l=_S(i);qe.und(l)||(e[o]=l[o])}else e[o]=0}return e}const M3=["map","emissiveMap","sheenColorMap","specularColorMap","envMap"],b3=/^on(Pointer|Click|DoubleClick|ContextMenu|Wheel)/;function Cs(s,t){var e;const n=s.__r3f,i=n&&dS(n).getState(),o=n==null?void 0:n.eventCount;for(const c in t){let h=t[c];if(Yp.includes(c)||(n&&b3.test(c)&&(typeof h=="function"?n.handlers[c]=h:delete n.handlers[c],n.eventCount=Object.keys(n.handlers).length),h===void 0))continue;let{root:f,key:p,target:m}=Hl(s,c);if(m!=null&&m.copy&&h!=null&&h.constructor&&m.constructor===h.constructor){const g=_S(f);!qe.und(g)&&(qe.und(g[p])||qe.nul(g[p]))?f[p]=h:m.copy(h)}else if(m instanceof mo&&h instanceof mo)m.mask=h.mask;else if(m!=null&&m.set&&Array.isArray(h))m.fromArray?m.fromArray(h):m.set(...h);else if(m!=null&&m.set&&typeof h!="object")!(m==null?void 0:m.isColor)&&m.setScalar&&typeof h=="number"?m.setScalar(h):m.set(h);else{var l;f[p]=h,i&&!i.linear&&M3.includes(p)&&(l=f[p])!=null&&l.isTexture&&f[p].format===Un&&f[p].type===ki&&(f[p].colorSpace=Dn)}}if(n!=null&&n.parent&&i!=null&&i.internal&&(e=n.object)!=null&&e.isObject3D&&o!==n.eventCount){const c=n.object,h=i.internal.interaction.indexOf(c);h>-1&&i.internal.interaction.splice(h,1),n.eventCount&&c.raycast!==null&&i.internal.interaction.push(c)}return n&&n.props.attach===void 0&&(n.object.isBufferGeometry?n.props.attach="geometry":n.object.isMaterial&&(n.props.attach="material")),n&&Eo(n),s}function Eo(s){var t;if(!s.parent)return;s.props.onUpdate==null||s.props.onUpdate(s.object);const e=(t=s.root)==null||t.getState==null?void 0:t.getState();e&&e.internal.frames===0&&e.invalidate()}function E3(s,t){s.manual||(pS(s)?(s.left=t.width/-2,s.right=t.width/2,s.top=t.height/2,s.bottom=t.height/-2):s.aspect=t.width/t.height,s.updateProjectionMatrix())}const Kn=s=>s==null?void 0:s.isObject3D;function Ru(s){return(s.eventObject||s.object).uuid+"/"+s.index+s.instanceId}function yS(s,t,e,n){const i=e.get(t);i&&(e.delete(t),e.size===0&&(s.delete(n),i.target.releasePointerCapture(n)))}function T3(s,t){const{internal:e}=s.getState();e.interaction=e.interaction.filter(n=>n!==t),e.initialHits=e.initialHits.filter(n=>n!==t),e.hovered.forEach((n,i)=>{(n.eventObject===t||n.object===t)&&e.hovered.delete(i)}),e.capturedMap.forEach((n,i)=>{yS(e.capturedMap,t,n,i)})}function A3(s){function t(h){const{internal:f}=s.getState(),p=h.offsetX-f.initialClick[0],m=h.offsetY-f.initialClick[1];return Math.round(Math.sqrt(p*p+m*m))}function e(h){return h.filter(f=>["Move","Over","Enter","Out","Leave"].some(p=>{var m;return(m=f.__r3f)==null?void 0:m.handlers["onPointer"+p]}))}function n(h,f){const p=s.getState(),m=new Set,g=[],_=f?f(p.internal.interaction):p.internal.interaction;for(let y=0;y<_.length;y++){const E=ll(_[y]);E&&(E.raycaster.camera=void 0)}p.previousRoot||p.events.compute==null||p.events.compute(h,p);function x(y){const E=ll(y);if(!E||!E.events.enabled||E.raycaster.camera===null)return[];if(E.raycaster.camera===void 0){var A;E.events.compute==null||E.events.compute(h,E,(A=E.previousRoot)==null?void 0:A.getState()),E.raycaster.camera===void 0&&(E.raycaster.camera=null)}return E.raycaster.camera?E.raycaster.intersectObject(y,!0):[]}let b=_.flatMap(x).sort((y,E)=>{const A=ll(y.object),T=ll(E.object);return!A||!T?y.distance-E.distance:T.events.priority-A.events.priority||y.distance-E.distance}).filter(y=>{const E=Ru(y);return m.has(E)?!1:(m.add(E),!0)});p.events.filter&&(b=p.events.filter(b,p));for(const y of b){let E=y.object;for(;E;){var S;(S=E.__r3f)!=null&&S.eventCount&&g.push({...y,eventObject:E}),E=E.parent}}if("pointerId"in h&&p.internal.capturedMap.has(h.pointerId))for(let y of p.internal.capturedMap.get(h.pointerId).values())m.has(Ru(y.intersection))||g.push(y.intersection);return g}function i(h,f,p,m){if(h.length){const g={stopped:!1};for(const _ of h){const x=ll(_.object);if(x){const{raycaster:b,pointer:S,camera:y,internal:E}=x,A=new O(S.x,S.y,0).unproject(y),T=w=>{var C,I;return(C=(I=E.capturedMap.get(w))==null?void 0:I.has(_.eventObject))!=null?C:!1},z=w=>{const C={intersection:_,target:f.target};E.capturedMap.has(w)?E.capturedMap.get(w).set(_.eventObject,C):E.capturedMap.set(w,new Map([[_.eventObject,C]])),f.target.setPointerCapture(w)},D=w=>{const C=E.capturedMap.get(w);C&&yS(E.capturedMap,_.eventObject,C,w)};let L={};for(let w in f){let C=f[w];typeof C!="function"&&(L[w]=C)}let B={..._,...L,pointer:S,intersections:h,stopped:g.stopped,delta:p,unprojectedPoint:A,ray:b.ray,camera:y,stopPropagation(){const w="pointerId"in f&&E.capturedMap.get(f.pointerId);if((!w||w.has(_.eventObject))&&(B.stopped=g.stopped=!0,E.hovered.size&&Array.from(E.hovered.values()).find(C=>C.eventObject===_.eventObject))){const C=h.slice(0,h.indexOf(_));o([...C,_])}},target:{hasPointerCapture:T,setPointerCapture:z,releasePointerCapture:D},currentTarget:{hasPointerCapture:T,setPointerCapture:z,releasePointerCapture:D},nativeEvent:f};if(m(B),g.stopped===!0)break}}}return h}function o(h){const{internal:f}=s.getState();for(const p of f.hovered.values())if(!h.length||!h.find(m=>m.object===p.object&&m.index===p.index&&m.instanceId===p.instanceId)){const g=p.eventObject.__r3f;if(f.hovered.delete(Ru(p)),g!=null&&g.eventCount){const _=g.handlers,x={...p,intersections:h};_.onPointerOut==null||_.onPointerOut(x),_.onPointerLeave==null||_.onPointerLeave(x)}}}function l(h,f){for(let p=0;po([]);case"onLostPointerCapture":return f=>{const{internal:p}=s.getState();"pointerId"in f&&p.capturedMap.has(f.pointerId)&&requestAnimationFrame(()=>{p.capturedMap.has(f.pointerId)&&(p.capturedMap.delete(f.pointerId),o([]))})}}return function(p){const{onPointerMissed:m,internal:g}=s.getState();g.lastEvent.current=p;const _=h==="onPointerMove",x=h==="onClick"||h==="onContextMenu"||h==="onDoubleClick",S=n(p,_?e:void 0),y=x?t(p):0;h==="onPointerDown"&&(g.initialClick=[p.offsetX,p.offsetY],g.initialHits=S.map(A=>A.eventObject)),x&&!S.length&&y<=2&&(l(p,g.interaction),m&&m(p)),_&&o(S);function E(A){const T=A.eventObject,z=T.__r3f;if(!(z!=null&&z.eventCount))return;const D=z.handlers;if(_){if(D.onPointerOver||D.onPointerEnter||D.onPointerOut||D.onPointerLeave){const L=Ru(A),B=g.hovered.get(L);B?B.stopped&&A.stopPropagation():(g.hovered.set(L,A),D.onPointerOver==null||D.onPointerOver(A),D.onPointerEnter==null||D.onPointerEnter(A))}D.onPointerMove==null||D.onPointerMove(A)}else{const L=D[h];L?(!x||g.initialHits.includes(T))&&(l(p,g.interaction.filter(B=>!g.initialHits.includes(B))),L(A)):x&&g.initialHits.includes(T)&&l(p,g.interaction.filter(B=>!g.initialHits.includes(B)))}}i(S,p,y,E)}}return{handlePointer:c}}const xS=s=>!!(s!=null&&s.render),SS=le.createContext(null),C3=(s,t)=>{const e=e3((c,h)=>{const f=new O,p=new O,m=new O;function g(y=h().camera,E=p,A=h().size){const{width:T,height:z,top:D,left:L}=A,B=T/z;E.isVector3?m.copy(E):m.set(...E);const w=y.getWorldPosition(f).distanceTo(m);if(pS(y))return{width:T/y.zoom,height:z/y.zoom,top:D,left:L,factor:1,distance:w,aspect:B};{const C=y.fov*Math.PI/180,I=2*Math.tan(C/2)*w,Z=I*(T/z);return{width:Z,height:I,top:D,left:L,factor:T/Z,distance:w,aspect:B}}}let _;const x=y=>c(E=>({performance:{...E.performance,current:y}})),b=new dt;return{set:c,get:h,gl:null,camera:null,raycaster:null,events:{priority:1,enabled:!0,connected:!1},scene:null,xr:null,invalidate:(y=1)=>s(h(),y),advance:(y,E)=>t(y,E,h()),legacy:!1,linear:!1,flat:!1,controls:null,clock:new Fm,pointer:b,mouse:b,frameloop:"always",onPointerMissed:void 0,performance:{current:1,min:.5,max:1,debounce:200,regress:()=>{const y=h();_&&clearTimeout(_),y.performance.current!==y.performance.min&&x(y.performance.min),_=setTimeout(()=>x(h().performance.max),y.performance.debounce)}},size:{width:0,height:0,top:0,left:0},viewport:{initialDpr:0,dpr:0,width:0,height:0,top:0,left:0,aspect:0,distance:0,factor:0,getCurrentViewport:g},setEvents:y=>c(E=>({...E,events:{...E.events,...y}})),setSize:(y,E,A=0,T=0)=>{const z=h().camera,D={width:y,height:E,top:A,left:T};c(L=>({size:D,viewport:{...L.viewport,...g(z,p,D)}}))},setDpr:y=>c(E=>{const A=gS(y);return{viewport:{...E.viewport,dpr:A,initialDpr:E.viewport.initialDpr||A}}}),setFrameloop:(y="always")=>{const E=h().clock;E.stop(),E.elapsedTime=0,y!=="never"&&(E.start(),E.elapsedTime=0),c(()=>({frameloop:y}))},previousRoot:void 0,internal:{interaction:[],hovered:new Map,subscribers:[],initialClick:[0,0],initialHits:[],capturedMap:new Map,lastEvent:le.createRef(),active:!1,frames:0,priority:0,subscribe:(y,E,A)=>{const T=h().internal;return T.priority=T.priority+(E>0?1:0),T.subscribers.push({ref:y,priority:E,store:A}),T.subscribers=T.subscribers.sort((z,D)=>z.priority-D.priority),()=>{const z=h().internal;z!=null&&z.subscribers&&(z.priority=z.priority-(E>0?1:0),z.subscribers=z.subscribers.filter(D=>D.ref!==y))}}}}}),n=e.getState();let i=n.size,o=n.viewport.dpr,l=n.camera;return e.subscribe(()=>{const{camera:c,size:h,viewport:f,gl:p,set:m}=e.getState();if(h.width!==i.width||h.height!==i.height||f.dpr!==o){i=h,o=f.dpr,E3(c,h),f.dpr>0&&p.setPixelRatio(f.dpr);const g=typeof HTMLCanvasElement<"u"&&p.domElement instanceof HTMLCanvasElement;p.setSize(h.width,h.height,g)}c!==l&&(l=c,m(g=>({viewport:{...g.viewport,...g.viewport.getCurrentViewport(c)}})))}),e.subscribe(c=>s(c)),e};function MS(){const s=le.useContext(SS);if(!s)throw new Error("R3F: Hooks can only be used within the Canvas component!");return s}function nD(s=e=>e,t){return MS()(s,t)}function iD(s,t=0){const e=MS(),n=e.getState().internal.subscribe,i=mS(s);return $l(()=>n(i,t,e),[t,n,e]),null}function w3(s){const t=r3(s);return t.injectIntoDevTools({bundleType:0,rendererPackageName:"@react-three/fiber",version:le.version}),t}const bS=0,Vl={};let R3=0;const D3=s=>typeof s=="function";function U3(s){if(D3(s)){const t=`${R3++}`;return Vl[t]=s,t}else Object.assign(Vl,s)}function ES(s,t){const e=`${s[0].toUpperCase()}${s.slice(1)}`,n=Vl[e];if(s!=="primitive"&&!n)throw new Error(`R3F: ${e} is not part of the THREE namespace! Did you forget to extend? See: https://docs.pmnd.rs/react-three-fiber/api/objects#using-3rd-party-objects-declaratively`);if(s==="primitive"&&!t.object)throw new Error("R3F: Primitives without 'object' are invalid!");if(t.args!==void 0&&!Array.isArray(t.args))throw new Error("R3F: The args prop must be an array!")}function N3(s,t,e){var n;return ES(s,t),s==="primitive"&&(n=t.object)!=null&&n.__r3f&&delete t.object.__r3f,xh(t.object,e,s,t)}function L3(s){if(!s.isHidden){var t;s.props.attach&&(t=s.parent)!=null&&t.object?Mh(s.parent,s):Kn(s.object)&&(s.object.visible=!1),s.isHidden=!0,Eo(s)}}function TS(s){if(s.isHidden){var t;s.props.attach&&(t=s.parent)!=null&&t.object?Sh(s.parent,s):Kn(s.object)&&s.props.visible!==!1&&(s.object.visible=!0),s.isHidden=!1,Eo(s)}}function qm(s,t,e){const n=t.root.getState();if(!(!s.parent&&s.object!==n.scene)){if(!t.object){var i,o;const l=`${t.type[0].toUpperCase()}${t.type.slice(1)}`,c=Vl[l];t.object=(i=t.props.object)!=null?i:new c(...(o=t.props.args)!=null?o:[]),t.object.__r3f=t,Cs(t.object,t.props)}if(t.props.attach)Sh(s,t);else if(Kn(t.object)&&Kn(s.object)){const l=s.object.children.indexOf(e==null?void 0:e.object);e&&l!==-1?(t.object.parent=s.object,s.object.children.splice(l,0,t.object),t.object.dispatchEvent({type:"added"}),s.object.dispatchEvent({type:"childadded",child:t.object})):s.object.add(t.object)}for(const l of t.children)qm(t,l);Eo(t)}}function bp(s,t){t&&(t.parent=s,s.children.push(t),qm(s,t))}function iy(s,t,e){if(!t||!e)return;t.parent=s;const n=s.children.indexOf(e);n!==-1?s.children.splice(n,0,t):s.children.push(t),qm(s,t,e)}function AS(s){if(typeof s.dispose=="function"){const t=()=>{try{s.dispose()}catch{}};typeof IS_REACT_ACT_ENVIRONMENT<"u"?t():Z_.unstable_scheduleCallback(Z_.unstable_IdlePriority,t)}}function Zp(s,t,e){if(!t)return;t.parent=null;const n=s.children.indexOf(t);n!==-1&&s.children.splice(n,1),t.props.attach?Mh(s,t):Kn(t.object)&&Kn(s.object)&&(s.object.remove(t.object),T3(dS(t),t.object));const i=t.props.dispose!==null&&e!==!1;for(let o=t.children.length-1;o>=0;o--){const l=t.children[o];Zp(t,l,i)}t.children.length=0,delete t.object.__r3f,i&&t.type!=="primitive"&&t.object.type!=="Scene"&&AS(t.object),e===void 0&&Eo(t)}function P3(s,t){for(const e of[s,s.alternate])if(e!==null)if(typeof e.ref=="function"){e.refCleanup==null||e.refCleanup();const n=e.ref(t);typeof n=="function"&&(e.refCleanup=n)}else e.ref&&(e.ref.current=t)}const Pu=[];function I3(){for(const[e]of Pu){const n=e.parent;if(n){e.props.attach?Mh(n,e):Kn(e.object)&&Kn(n.object)&&n.object.remove(e.object);for(const i of e.children)i.props.attach?Mh(e,i):Kn(i.object)&&Kn(e.object)&&e.object.remove(i.object)}e.isHidden&&TS(e),e.object.__r3f&&delete e.object.__r3f,e.type!=="primitive"&&AS(e.object)}for(const[e,n,i]of Pu){e.props=n;const o=e.parent;if(o){var s,t;const l=`${e.type[0].toUpperCase()}${e.type.slice(1)}`,c=Vl[l];e.object=(s=e.props.object)!=null?s:new c(...(t=e.props.args)!=null?t:[]),e.object.__r3f=e,P3(i,e.object),Cs(e.object,e.props),e.props.attach?Sh(o,e):Kn(e.object)&&Kn(o.object)&&o.object.add(e.object);for(const h of e.children)h.props.attach?Sh(e,h):Kn(h.object)&&Kn(e.object)&&e.object.add(h.object);Eo(e)}}Pu.length=0}const Ep=()=>{},sy={};let Du=bS;const O3=0,B3=4,Kp=w3({isPrimaryRenderer:!1,warnsIfNotActing:!1,supportsMutation:!0,supportsPersistence:!1,supportsHydration:!1,createInstance:N3,removeChild:Zp,appendChild:bp,appendInitialChild:bp,insertBefore:iy,appendChildToContainer(s,t){const e=s.getState().scene.__r3f;!t||!e||bp(e,t)},removeChildFromContainer(s,t){const e=s.getState().scene.__r3f;!t||!e||Zp(e,t)},insertInContainerBefore(s,t,e){const n=s.getState().scene.__r3f;!t||!e||!n||iy(n,t,e)},getRootHostContext:()=>sy,getChildHostContext:()=>sy,commitUpdate(s,t,e,n,i){var o,l,c;ES(t,n);let h=!1;if((s.type==="primitive"&&e.object!==n.object||((o=n.args)==null?void 0:o.length)!==((l=e.args)==null?void 0:l.length)||(c=n.args)!=null&&c.some((p,m)=>{var g;return p!==((g=e.args)==null?void 0:g[m])}))&&(h=!0),h)Pu.push([s,{...n},i]);else{const p=S3(s,n);Object.keys(p).length&&(Object.assign(s.props,p),Cs(s.object,p))}(i.sibling===null||(i.flags&B3)===O3)&&I3()},finalizeInitialChildren:()=>!1,commitMount(){},getPublicInstance:s=>s==null?void 0:s.object,prepareForCommit:()=>null,preparePortalMount:s=>xh(s.getState().scene,s,"",{}),resetAfterCommit:()=>{},shouldSetTextContent:()=>!1,clearContainer:()=>!1,hideInstance:L3,unhideInstance:TS,createTextInstance:Ep,hideTextInstance:Ep,unhideTextInstance:Ep,scheduleTimeout:typeof setTimeout=="function"?setTimeout:void 0,cancelTimeout:typeof clearTimeout=="function"?clearTimeout:void 0,noTimeout:-1,getInstanceFromNode:()=>null,beforeActiveInstanceBlur(){},afterActiveInstanceBlur(){},detachDeletedInstance(){},prepareScopeUpdate(){},getInstanceFromScope:()=>null,shouldAttemptEagerTransition:()=>!1,trackSchedulerEvent:()=>{},resolveEventType:()=>null,resolveEventTimeStamp:()=>-1.1,requestPostPaintCallback(){},maySuspendCommit:()=>!1,preloadInstance:()=>!0,startSuspendingCommit(){},suspendInstance(){},waitForCommitToBeReady:()=>null,NotPendingTransition:null,HostTransitionContext:le.createContext(null),setCurrentUpdatePriority(s){Du=s},getCurrentUpdatePriority(){return Du},resolveUpdatePriority(){var s;if(Du!==bS)return Du;switch(typeof window<"u"&&((s=window.event)==null?void 0:s.type)){case"click":case"contextmenu":case"dblclick":case"pointercancel":case"pointerdown":case"pointerup":return Lu.DiscreteEventPriority;case"pointermove":case"pointerout":case"pointerover":case"pointerenter":case"pointerleave":case"wheel":return Lu.ContinuousEventPriority;default:return Lu.DefaultEventPriority}},resetFormInstance(){}}),lr=new Map,so={objects:"shallow",strict:!1};async function z3(s,t){const e={canvas:t,powerPreference:"high-performance",antialias:!0,alpha:!0},n=typeof s=="function"?await s(e):s;return xS(n)?n:new px({...e,...s})}function F3(s,t){if(!t&&typeof HTMLCanvasElement<"u"&&s instanceof HTMLCanvasElement&&s.parentElement){const{width:e,height:n,top:i,left:o}=s.parentElement.getBoundingClientRect();return{width:e,height:n,top:i,left:o}}else if(!t&&typeof OffscreenCanvas<"u"&&s instanceof OffscreenCanvas)return{width:s.width,height:s.height,top:0,left:0};return{width:0,height:0,top:0,left:0,...t}}function H3(s){const t=lr.get(s),e=t==null?void 0:t.fiber,n=t==null?void 0:t.store;t&&console.warn("R3F.createRoot should only be called once!");const i=typeof reportError=="function"?reportError:console.error,o=n||C3(Qp,ry),l=e||Kp.createContainer(o,Lu.ConcurrentRoot,null,!1,null,"",i,i,i,null);t||lr.set(s,{fiber:l,store:o});let c,h=!1,f;return{async configure(p={}){let{gl:m,size:g,scene:_,events:x,onCreated:b,shadows:S=!1,linear:y=!1,flat:E=!1,legacy:A=!1,orthographic:T=!1,frameloop:z="always",dpr:D=[1,2],performance:L,raycaster:B,camera:w,onPointerMissed:C}=p,I=o.getState(),Z=I.gl;I.gl||I.set({gl:Z=await z3(m,s)});let K=I.raycaster;K||I.set({raycaster:K=new oS});const{params:tt,...rt}=B||{};if(qe.equ(rt,K,so)||Cs(K,{...rt}),qe.equ(tt,K.params,so)||Cs(K,{params:{...K.params,...tt}}),!I.camera||I.camera===f&&!qe.equ(f,w,so)){f=w;const it=w==null?void 0:w.isCamera,ut=it?w:T?new Yl(0,0,0,0,.1,1e3):new vn(75,0,.1,1e3);it||(ut.position.z=5,w&&(Cs(ut,w),ut.manual||("aspect"in w||"left"in w||"right"in w||"bottom"in w||"top"in w)&&(ut.manual=!0,ut.updateProjectionMatrix())),!I.camera&&!(w!=null&&w.rotation)&&ut.lookAt(0,0,0)),I.set({camera:ut}),K.camera=ut}if(!I.scene){let it;_!=null&&_.isScene?(it=_,xh(it,o,"",{})):(it=new Mm,xh(it,o,"",{}),_&&Cs(it,_)),I.set({scene:it})}x&&!I.events.handlers&&I.set({events:x(o)});const V=F3(s,g);if(qe.equ(V,I.size,so)||I.setSize(V.width,V.height,V.top,V.left),D&&I.viewport.dpr!==gS(D)&&I.setDpr(D),I.frameloop!==z&&I.setFrameloop(z),I.onPointerMissed||I.set({onPointerMissed:C}),L&&!qe.equ(L,I.performance,so)&&I.set(it=>({performance:{...it.performance,...L}})),!I.xr){var et;const it=(It,ne)=>{const st=o.getState();st.frameloop!=="never"&&ry(It,!0,st,ne)},ut=()=>{const It=o.getState();It.gl.xr.enabled=It.gl.xr.isPresenting,It.gl.xr.setAnimationLoop(It.gl.xr.isPresenting?it:null),It.gl.xr.isPresenting||Qp(It)},bt={connect(){const It=o.getState().gl;It.xr.addEventListener("sessionstart",ut),It.xr.addEventListener("sessionend",ut)},disconnect(){const It=o.getState().gl;It.xr.removeEventListener("sessionstart",ut),It.xr.removeEventListener("sessionend",ut)}};typeof((et=Z.xr)==null?void 0:et.addEventListener)=="function"&&bt.connect(),I.set({xr:bt})}if(Z.shadowMap){const it=Z.shadowMap.enabled,ut=Z.shadowMap.type;if(Z.shadowMap.enabled=!!S,qe.boo(S))Z.shadowMap.type=fl;else if(qe.str(S)){var q;const bt={basic:hy,percentage:Th,soft:fl,variance:Vi};Z.shadowMap.type=(q=bt[S])!=null?q:fl}else qe.obj(S)&&Object.assign(Z.shadowMap,S);(it!==Z.shadowMap.enabled||ut!==Z.shadowMap.type)&&(Z.shadowMap.needsUpdate=!0)}return Se.enabled=!A,h||(Z.outputColorSpace=y?ua:Dn,Z.toneMapping=E?es:em),I.legacy!==A&&I.set(()=>({legacy:A})),I.linear!==y&&I.set(()=>({linear:y})),I.flat!==E&&I.set(()=>({flat:E})),m&&!qe.fun(m)&&!xS(m)&&!qe.equ(m,Z,so)&&Cs(Z,m),c=b,h=!0,this},render(p){if(!h)throw"The root has to be configured before it can be rendered, call 'configure' first!";return Kp.updateContainer(mi.jsx(V3,{store:o,children:p,onCreated:c,rootElement:s}),l,null,()=>{}),o},unmount(){CS(s)}}}function V3({store:s,children:t,onCreated:e,rootElement:n}){return $l(()=>{const i=s.getState();i.set(o=>({internal:{...o.internal,active:!0}})),e&&e(i),s.getState().events.connected||i.events.connect==null||i.events.connect(n)},[]),mi.jsx(SS.Provider,{value:s,children:t})}function CS(s,t){const e=lr.get(s),n=e==null?void 0:e.fiber;if(n){const i=e==null?void 0:e.store.getState();i&&(i.internal.active=!1),Kp.updateContainer(null,n,null,()=>{i&&setTimeout(()=>{try{var o,l,c,h;i.events.disconnect==null||i.events.disconnect(),(o=i.gl)==null||(l=o.renderLists)==null||l.dispose==null||l.dispose(),(c=i.gl)==null||c.forceContextLoss==null||c.forceContextLoss(),(h=i.gl)!=null&&h.xr&&i.xr.disconnect(),y3(i.scene),lr.delete(s)}catch{}},500)})}}const G3=new Set,k3=new Set,W3=new Set;function Tp(s,t){if(s.size)for(const{callback:e}of s.values())e(t)}function Ml(s,t){switch(s){case"before":return Tp(G3,t);case"after":return Tp(k3,t);case"tail":return Tp(W3,t)}}let Ap,Cp;function jp(s,t,e){let n=t.clock.getDelta();t.frameloop==="never"&&typeof s=="number"&&(n=s-t.clock.elapsedTime,t.clock.oldTime=t.clock.elapsedTime,t.clock.elapsedTime=s),Ap=t.internal.subscribers;for(let i=0;i0)&&!((t=ao.gl.xr)!=null&&t.isPresenting)&&(wp+=jp(s,ao))}if(Jp=!0,Ml("after",s),wp===0)return Ml("tail",s),bh=!1,cancelAnimationFrame(ay)}function Qp(s,t=1){var e;if(!s)return lr.forEach(n=>Qp(n.store.getState(),t));(e=s.gl.xr)!=null&&e.isPresenting||!s.internal.active||s.frameloop==="never"||(t>1?s.internal.frames=Math.min(60,s.internal.frames+t):Jp?s.internal.frames=2:s.internal.frames=1,bh||(bh=!0,requestAnimationFrame(wS)))}function ry(s,t=!0,e,n){if(t&&Ml("before",s),e)jp(s,e,n);else for(const i of lr.values())jp(s,i.store.getState());t&&Ml("after",s)}const Rp={onClick:["click",!1],onContextMenu:["contextmenu",!1],onDoubleClick:["dblclick",!1],onWheel:["wheel",!0],onPointerDown:["pointerdown",!0],onPointerUp:["pointerup",!0],onPointerLeave:["pointerleave",!0],onPointerMove:["pointermove",!0],onPointerCancel:["pointercancel",!0],onLostPointerCapture:["lostpointercapture",!0]};function X3(s){const{handlePointer:t}=A3(s);return{priority:1,enabled:!0,compute(e,n,i){n.pointer.set(e.offsetX/n.size.width*2-1,-(e.offsetY/n.size.height)*2+1),n.raycaster.setFromCamera(n.pointer,n.camera)},connected:void 0,handlers:Object.keys(Rp).reduce((e,n)=>({...e,[n]:t(n)}),{}),update:()=>{var e;const{events:n,internal:i}=s.getState();(e=i.lastEvent)!=null&&e.current&&n.handlers&&n.handlers.onPointerMove(i.lastEvent.current)},connect:e=>{const{set:n,events:i}=s.getState();if(i.disconnect==null||i.disconnect(),n(o=>({events:{...o.events,connected:e}})),i.handlers)for(const o in i.handlers){const l=i.handlers[o],[c,h]=Rp[o];e.addEventListener(c,l,{passive:h})}},disconnect:()=>{const{set:e,events:n}=s.getState();if(n.connected){if(n.handlers)for(const i in n.handlers){const o=n.handlers[i],[l]=Rp[i];n.connected.removeEventListener(l,o)}e(i=>({events:{...i.events,connected:void 0}}))}}}}var Dp,oy;function q3(){if(oy)return Dp;oy=1;function s(t,e,n){var i,o,l,c,h;e==null&&(e=100);function f(){var m=Date.now()-c;m=0?i=setTimeout(f,e-m):(i=null,n||(h=t.apply(l,o),l=o=null))}var p=function(){l=this,o=arguments,c=Date.now();var m=n&&!i;return i||(i=setTimeout(f,e)),m&&(h=t.apply(l,o),l=o=null),h};return p.clear=function(){i&&(clearTimeout(i),i=null)},p.flush=function(){i&&(h=t.apply(l,o),l=o=null,clearTimeout(i),i=null)},p}return s.debounce=s,Dp=s,Dp}var Y3=q3();const ly=tm(Y3);function Z3({debounce:s,scroll:t,polyfill:e,offsetSize:n}={debounce:0,scroll:!1,offsetSize:!1}){const i=e||typeof window<"u"&&window.ResizeObserver,[o,l]=le.useState({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0});if(!i)return o.width=1280,o.height=800,[()=>{},o,()=>{}];const c=le.useRef({element:null,scrollContainers:null,resizeObserver:null,lastBounds:o,orientationHandler:null}),h=s?typeof s=="number"?s:s.scroll:null,f=s?typeof s=="number"?s:s.resize:null,p=le.useRef(!1);le.useEffect(()=>(p.current=!0,()=>void(p.current=!1)));const[m,g,_]=le.useMemo(()=>{const y=()=>{if(!c.current.element)return;const{left:E,top:A,width:T,height:z,bottom:D,right:L,x:B,y:w}=c.current.element.getBoundingClientRect(),C={left:E,top:A,width:T,height:z,bottom:D,right:L,x:B,y:w};c.current.element instanceof HTMLElement&&n&&(C.height=c.current.element.offsetHeight,C.width=c.current.element.offsetWidth),Object.freeze(C),p.current&&!Q3(c.current.lastBounds,C)&&l(c.current.lastBounds=C)};return[y,f?ly(y,f):y,h?ly(y,h):y]},[l,n,h,f]);function x(){c.current.scrollContainers&&(c.current.scrollContainers.forEach(y=>y.removeEventListener("scroll",_,!0)),c.current.scrollContainers=null),c.current.resizeObserver&&(c.current.resizeObserver.disconnect(),c.current.resizeObserver=null),c.current.orientationHandler&&("orientation"in screen&&"removeEventListener"in screen.orientation?screen.orientation.removeEventListener("change",c.current.orientationHandler):"onorientationchange"in window&&window.removeEventListener("orientationchange",c.current.orientationHandler))}function b(){var y;c.current.element&&(c.current.resizeObserver=new i(g),(y=c.current.resizeObserver)==null||y.observe(c.current.element),t&&c.current.scrollContainers&&c.current.scrollContainers.forEach(E=>E.addEventListener("scroll",_,{capture:!0,passive:!0})),c.current.orientationHandler=()=>{_()},"orientation"in screen&&"addEventListener"in screen.orientation?screen.orientation.addEventListener("change",c.current.orientationHandler):"onorientationchange"in window&&window.addEventListener("orientationchange",c.current.orientationHandler))}const S=y=>{!y||y===c.current.element||(x(),c.current.element=y,c.current.scrollContainers=RS(y),b())};return j3(_,!!t),K3(g),le.useEffect(()=>{x(),b()},[t,_,g]),le.useEffect(()=>x,[]),[S,o,m]}function K3(s){le.useEffect(()=>{const t=s;return window.addEventListener("resize",t),()=>void window.removeEventListener("resize",t)},[s])}function j3(s,t){le.useEffect(()=>{if(t){const e=s;return window.addEventListener("scroll",e,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",e,!0)}},[s,t])}function RS(s){const t=[];if(!s||s===document.body)return t;const{overflow:e,overflowX:n,overflowY:i}=window.getComputedStyle(s);return[e,n,i].some(o=>o==="auto"||o==="scroll")&&t.push(s),[...t,...RS(s.parentElement)]}const J3=["x","y","top","bottom","left","right","width","height"],Q3=(s,t)=>J3.every(e=>s[e]===t[e]);function $3({ref:s,children:t,fallback:e,resize:n,style:i,gl:o,events:l=X3,eventSource:c,eventPrefix:h,shadows:f,linear:p,flat:m,legacy:g,orthographic:_,frameloop:x,dpr:b,performance:S,raycaster:y,camera:E,scene:A,onPointerMissed:T,onCreated:z,...D}){le.useMemo(()=>U3(H2),[]);const L=g3(),[B,w]=Z3({scroll:!0,debounce:{scroll:50,resize:0},...n}),C=le.useRef(null),I=le.useRef(null);le.useImperativeHandle(s,()=>C.current);const Z=mS(T),[K,tt]=le.useState(!1),[rt,V]=le.useState(!1);if(K)throw K;if(rt)throw rt;const et=le.useRef(null);$l(()=>{const it=C.current;if(w.width>0&&w.height>0&&it){et.current||(et.current=H3(it));async function ut(){await et.current.configure({gl:o,scene:A,events:l,shadows:f,linear:p,flat:m,legacy:g,orthographic:_,frameloop:x,dpr:b,performance:S,raycaster:y,camera:E,size:w,onPointerMissed:(...bt)=>Z.current==null?void 0:Z.current(...bt),onCreated:bt=>{bt.events.connect==null||bt.events.connect(c?m3(c)?c.current:c:I.current),h&&bt.setEvents({compute:(It,ne)=>{const st=It[h+"X"],mt=It[h+"Y"];ne.pointer.set(st/ne.size.width*2-1,-(mt/ne.size.height)*2+1),ne.raycaster.setFromCamera(ne.pointer,ne.camera)}}),z==null||z(bt)}}),et.current.render(mi.jsx(L,{children:mi.jsx(_3,{set:V,children:mi.jsx(le.Suspense,{fallback:mi.jsx(v3,{set:tt}),children:t})})}))}ut()}}),le.useEffect(()=>{const it=C.current;if(it)return()=>CS(it)},[]);const q=c?"none":"auto";return mi.jsx("div",{ref:I,style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",pointerEvents:q,...i},...D,children:mi.jsx("div",{ref:B,style:{width:"100%",height:"100%"},children:mi.jsx("canvas",{ref:C,style:{display:"block"},children:e})})})}function sD(s){return mi.jsx(hS,{children:mi.jsx($3,{...s})})}export{Np as A,Vn as B,sD as C,Qi as D,nn as E,qt as F,un as G,ue as H,nS as I,pe as J,Ve as K,Zl as L,RE as M,Re as O,So as P,Qn as Q,xo as R,y2 as S,Nb as T,sx as U,O as V,Nx as W,zt as a,Xi as b,dt as c,Yl as d,vn as e,Ub as f,aa as g,nD as h,Eh as i,v2 as j,rr as k,Nn as l,At as m,ln as n,we as o,M2 as p,ee as q,U3 as r,Hn as s,Sm as t,iD as u,xm as v,ky as w,de as x,ha as y,vo as z}; diff --git a/site/assets/refresh-ccw-DTX90cW0.js b/site/assets/refresh-ccw-DTX90cW0.js new file mode 100644 index 0000000..981769f --- /dev/null +++ b/site/assets/refresh-ccw-DTX90cW0.js @@ -0,0 +1,6 @@ +import{c as e}from"./index-DJrAq1Rk.js";/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const c=[["path",{d:"M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"14sxne"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16",key:"1hlbsb"}],["path",{d:"M16 16h5v5",key:"ccwih5"}]],a=e("refresh-ccw",c);export{a as R}; diff --git a/site/assets/scan-BEuCCSbY.js b/site/assets/scan-BEuCCSbY.js new file mode 100644 index 0000000..84d8c9b --- /dev/null +++ b/site/assets/scan-BEuCCSbY.js @@ -0,0 +1,6 @@ +import{c as a}from"./index-DJrAq1Rk.js";/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const c=[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}]],e=a("scan",c);export{e as S}; diff --git a/site/assets/settings-2-BYyATKYL.js b/site/assets/settings-2-BYyATKYL.js new file mode 100644 index 0000000..eb23909 --- /dev/null +++ b/site/assets/settings-2-BYyATKYL.js @@ -0,0 +1,6 @@ +import{c}from"./index-DJrAq1Rk.js";/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const e=[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]],i=c("settings-2",e);export{i as S}; diff --git a/site/assets/triangle-alert-7X0SgA5l.js b/site/assets/triangle-alert-7X0SgA5l.js new file mode 100644 index 0000000..62a482a --- /dev/null +++ b/site/assets/triangle-alert-7X0SgA5l.js @@ -0,0 +1,6 @@ +import{c as e}from"./index-DJrAq1Rk.js";/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const a=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],o=e("triangle-alert",a);export{o as T}; diff --git a/site/assets/zap-Bss3mUov.js b/site/assets/zap-Bss3mUov.js new file mode 100644 index 0000000..e9af0ef --- /dev/null +++ b/site/assets/zap-Bss3mUov.js @@ -0,0 +1,6 @@ +import{c as a}from"./index-DJrAq1Rk.js";/** + * @license lucide-react v0.554.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const o=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],e=a("zap",o);export{e as Z}; diff --git a/site/index.html b/site/index.html new file mode 100644 index 0000000..e6c1ac0 --- /dev/null +++ b/site/index.html @@ -0,0 +1,174 @@ + + + + + + + + + + + Inmerson โ€ข Personal Math & Biotech Lab + + + + + + + + + + + + + + +
+ + \ No newline at end of file diff --git a/tailwind.config.js b/tailwind.config.js new file mode 100644 index 0000000..8f726d1 --- /dev/null +++ b/tailwind.config.js @@ -0,0 +1,28 @@ +/** @type {import('tailwindcss').Config} */ +export default { + content: [ + "./index.html", + "./src/**/*.{js,ts,jsx,tsx}", + "./components/**/*.{js,ts,jsx,tsx}", + "./views/**/*.{js,ts,jsx,tsx}", + "./*.{js,ts,jsx,tsx}" + ], + theme: { + extend: { + fontFamily: { + sans: ['Inter', 'sans-serif'], + mono: ['JetBrains Mono', 'monospace'], + }, + colors: { + slate: { + 850: '#151e2e', + 950: '#020617', + } + }, + backgroundImage: { + 'noise': "url('https://grainy-gradients.vercel.app/noise.svg')", + } + }, + }, + plugins: [], +} diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..d9e514d --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,35 @@ +{ + "compilerOptions": { + "target": "ES2022", + "experimentalDecorators": true, + "useDefineForClassFields": false, + "module": "ESNext", + "lib": [ + "ES2022", + "DOM", + "DOM.Iterable" + ], + "skipLibCheck": true, + "types": [ + "node" + ], + "moduleResolution": "bundler", + "isolatedModules": true, + "moduleDetection": "force", + "allowJs": true, + "jsx": "react-jsx", + "paths": { + "@/*": [ + "./*" + ] + }, + "allowImportingTsExtensions": true, + "noEmit": true + }, + "exclude": [ + "android", + "dist", + "server", + "site" + ] +} diff --git a/types.ts b/types.ts new file mode 100644 index 0000000..8599709 --- /dev/null +++ b/types.ts @@ -0,0 +1,129 @@ + +import React from 'react'; + +export type MatrixData = number[][]; + +export enum ModuleType { + HOME = 'HOME', + MATRIX = 'MATRIX', + SEQUENCES = 'SEQUENCES', + FUNCTIONS = 'FUNCTIONS', + LIMITS = 'LIMITS', + DERIVATIVES = 'DERIVATIVES', + INTEGRALS = 'INTEGRALS', + DIFF_EQ = 'DIFF_EQ', + EXAMS = 'EXAMS' +} + +export enum ViewMode { + // Matrix Module + BASICS = 'BASICS', + OPERATIONS = 'OPERATIONS', + DETERMINANT = 'DETERMINANT', + INVERSE = 'INVERSE', + SYSTEMS = 'SYSTEMS', // Cramer's Rule + GAUSSIAN = 'GAUSSIAN', + EIGENVALUES = 'EIGENVALUES', + VECTOR_3D = 'VECTOR_3D', + VECTOR_OPS_3D = 'VECTOR_OPS_3D', + + // Sequence Module + SEQUENCES = 'SEQUENCES', // Includes Recursive & Monotonicity Check + SERIES = 'SERIES', + COBWEB = 'COBWEB', + SEQUENCES_3D = 'SEQUENCES_3D', + + // Function Module + FUNCTIONS = 'FUNCTIONS', // Graphing, Domain, Range + TRANSFORMATIONS = 'TRANSFORMATIONS', + NEWTON = 'NEWTON', + FUNCTIONS_3D = 'FUNCTIONS_3D', + + // Limits Module + LIMITS = 'LIMITS', + CONTINUITY = 'CONTINUITY', // Holes & Jumps + LIMITS_3D = 'LIMITS_3D', + + // Derivatives Module + DERIVATIVE_RULES = 'DERIVATIVE_RULES', + FUNCTION_ANALYSIS = 'FUNCTION_ANALYSIS', // Extrema & Monotonicity Intervals + TAYLOR = 'TAYLOR', + DERIVATIVES_3D = 'DERIVATIVES_3D', + + // Integrals Module + INTEGRAL_BASICS = 'INTEGRAL_BASICS', + INTEGRAL_RULES = 'INTEGRAL_RULES', + AREA_UNDER_CURVE = 'AREA_UNDER_CURVE', + INTEGRALS_3D = 'INTEGRALS_3D', + + // Differential Equations Module + DIFF_BASICS = 'DIFF_BASICS', + POPULATION_MODELS = 'POPULATION_MODELS', // Malthus & Verhulst + RADIOACTIVE_DECAY = 'RADIOACTIVE_DECAY', + DIFF_EQ_3D = 'DIFF_EQ_3D', + + // Exams Module + CLASS_EXAM_1 = 'CLASS_EXAM_1', + CLASS_EXAM_2 = 'CLASS_EXAM_2', + CLASS_EXAM_3 = 'CLASS_EXAM_3', + FULL_EXAM = 'FULL_EXAM', + EXAM_ANALYSIS = 'EXAM_ANALYSIS', + + // Shared/Tools + CHEAT_SHEET = 'CHEAT_SHEET', + HOMEWORK = 'HOMEWORK', // Renamed from EXERCISES + FINAL_EXAM = 'FINAL_EXAM', + AI_CHAT = 'AI_CHAT' +} + +export interface MatrixProps { + data: MatrixData; + label?: string; + editable?: boolean; + onChange?: (newData: MatrixData) => void; + highlightRow?: number | null; + highlightCol?: number | null; + color?: 'blue' | 'green' | 'purple' | 'orange' | 'pink' | 'red' | 'cyan'; +} + +export enum OperationType { + ADD = 'ADD', + SUBTRACT = 'SUBTRACT', + MULTIPLY = 'MULTIPLY', + SCALAR = 'SCALAR' +} + +// Common definition for Three Fiber elements +interface ThreeElements { + ambientLight: any; + pointLight: any; + directionalLight: any; + spotLight: any; + hemisphereLight: any; + group: any; + mesh: any; + meshStandardMaterial: any; + meshBasicMaterial: any; + meshPhongMaterial: any; + sphereGeometry: any; + cylinderGeometry: any; + planeGeometry: any; + boxGeometry: any; + latheGeometry: any; + bufferGeometry: any; + arrowHelper: any; + axesHelper: any; + gridHelper: any; + color: any; + fog: any; + primitive: any; + line: any; + [elemName: string]: any; +} + +// Augment global JSX.IntrinsicElements for React Three Fiber components +declare global { + namespace JSX { + interface IntrinsicElements extends ThreeElements {} + } +} diff --git a/utils/examStorage.ts b/utils/examStorage.ts new file mode 100644 index 0000000..aaf0a54 --- /dev/null +++ b/utils/examStorage.ts @@ -0,0 +1,51 @@ + +export interface QuestionStats { + correct: number; + incorrect: number; + lastAttempt: number; // timestamp +} + +export type ExamPerformance = Record; + +const STORAGE_KEY = 'math_biotech_exam_perf_v1'; + +export const getExamPerformance = (): ExamPerformance => { + try { + if (typeof window === 'undefined') return {}; + const item = window.localStorage.getItem(STORAGE_KEY); + return item ? JSON.parse(item) : {}; + } catch { + return {}; + } +}; + +export const saveQuestionResult = (questionId: number, isCorrect: boolean) => { + try { + const perf = getExamPerformance(); + const stats = perf[questionId] || { correct: 0, incorrect: 0, lastAttempt: 0 }; + + if (isCorrect) stats.correct++; + else stats.incorrect++; + + stats.lastAttempt = Date.now(); + perf[questionId] = stats; + + window.localStorage.setItem(STORAGE_KEY, JSON.stringify(perf)); + } catch (e) { + console.warn("Failed to save exam result", e); + } +}; + +export const getQuestionStatus = (stats?: QuestionStats): 'UNSEEN' | 'MASTERED' | 'LEARNING' => { + if (!stats) return 'UNSEEN'; + const total = stats.correct + stats.incorrect; + if (total === 0) return 'UNSEEN'; + + // Mastered: at least 3 correct answers AND > 80% accuracy + if (stats.correct >= 3 && (stats.correct / total) >= 0.8) return 'MASTERED'; + return 'LEARNING'; +}; + +export const resetExamData = () => { + window.localStorage.removeItem(STORAGE_KEY); +}; diff --git a/utils/gaussianSteps.ts b/utils/gaussianSteps.ts new file mode 100644 index 0000000..249fcbf --- /dev/null +++ b/utils/gaussianSteps.ts @@ -0,0 +1,94 @@ +import { MatrixData } from '../types'; + +export interface GaussianStep { + title: string; + data: MatrixData; + desc: string; + highlightRow?: number; + pivotRow?: number; + formula?: string; + isSwap?: boolean; +} + +// Robust Gaussian Elimination with Partial Pivoting +export const getSteps = (m: MatrixData): GaussianStep[] => { + const steps: GaussianStep[] = []; + + let current = m.map(r => [...r]); + const rows = current.length; + const cols = current[0].length; + + steps.push({ + title: "System Initialization", + data: current.map(r => [...r]), + desc: "Starting Augmented Matrix [A|b]. Goal: Upper Triangular Form.", + formula: "Start" + }); + + let pivotRow = 0; + let pivotCol = 0; + + while (pivotRow < rows && pivotCol < cols - 1) { + let maxRow = pivotRow; + let maxVal = Math.abs(current[pivotRow][pivotCol]); + + for (let i = pivotRow + 1; i < rows; i++) { + if (Math.abs(current[i][pivotCol]) > maxVal) { + maxVal = Math.abs(current[i][pivotCol]); + maxRow = i; + } + } + + if (maxRow !== pivotRow) { + const temp = current[pivotRow]; + current[pivotRow] = current[maxRow]; + current[maxRow] = temp; + + steps.push({ + title: "Pivot Swap", + data: current.map(r => [...r]), + desc: `Swapping Row ${pivotRow + 1} with Row ${maxRow + 1} to place the largest value (${current[pivotRow][pivotCol].toFixed(1)}) on the diagonal for stability.`, + highlightRow: maxRow, + pivotRow: pivotRow, + formula: `R${pivotRow + 1} โ†” R${maxRow + 1}`, + isSwap: true + }); + } + + if (Math.abs(current[pivotRow][pivotCol]) < 0.000001) { + pivotCol++; + continue; + } + + for (let i = pivotRow + 1; i < rows; i++) { + const valToEliminate = current[i][pivotCol]; + if (Math.abs(valToEliminate) > 0.000001) { + const pivotVal = current[pivotRow][pivotCol]; + const factor = valToEliminate / pivotVal; + + const newRow = current[i].map((val, idx) => val - factor * current[pivotRow][idx]); + current[i] = newRow; + + steps.push({ + title: "Elimination", + data: current.map(r => [...r]), + desc: `Eliminating term in R${i + 1} using pivot from R${pivotRow + 1}.`, + highlightRow: i, + pivotRow: pivotRow, + formula: `R${i + 1} โ† R${i + 1} - (${factor.toFixed(2)})ยทR${pivotRow + 1}` + }); + } + } + pivotRow++; + pivotCol++; + } + + steps.push({ + title: "Row Echelon Form", + data: current.map(r => [...r]), + desc: "Matrix is now in Upper Triangular Form. Back-substitution can now solve for variables.", + formula: "Done" + }); + + return steps; +}; diff --git a/utils/matrixMath.ts b/utils/matrixMath.ts new file mode 100644 index 0000000..01be813 --- /dev/null +++ b/utils/matrixMath.ts @@ -0,0 +1,185 @@ + +import { MatrixData } from '../types'; + +export const createMatrix = (rows: number, cols: number, initialValue = 0): MatrixData => { + return Array(rows).fill(0).map(() => Array(cols).fill(initialValue)); +}; + +export const addMatrices = (a: MatrixData, b: MatrixData): MatrixData | null => { + if (a.length !== b.length || a[0].length !== b[0].length) return null; + return a.map((row, i) => row.map((val, j) => val + b[i][j])); +}; + +export const subtractMatrices = (a: MatrixData, b: MatrixData): MatrixData | null => { + if (a.length !== b.length || a[0].length !== b[0].length) return null; + return a.map((row, i) => row.map((val, j) => val - b[i][j])); +}; + +export const multiplyMatrixByScalar = (a: MatrixData, k: number): MatrixData => { + return a.map(row => row.map(val => val * k)); +}; + +export const multiplyMatrices = (a: MatrixData, b: MatrixData): MatrixData | null => { + const r1 = a.length; + const c1 = a[0].length; + const r2 = b.length; + const c2 = b[0].length; + + if (c1 !== r2) return null; + + const result = createMatrix(r1, c2); + for (let i = 0; i < r1; i++) { + for (let j = 0; j < c2; j++) { + let sum = 0; + for (let k = 0; k < c1; k++) { + sum += a[i][k] * b[k][j]; + } + result[i][j] = sum; + } + } + return result; +}; + +export const transposeMatrix = (a: MatrixData): MatrixData => { + return a[0].map((_, colIndex) => a.map(row => row[colIndex])); +}; + +export const getDeterminant = (m: MatrixData): number | null => { + if (m.length !== m[0].length) return null; + const n = m.length; + if (n === 1) return m[0][0]; + if (n === 2) return m[0][0] * m[1][1] - m[0][1] * m[1][0]; + + // Gaussian elimination (O(N^3)) + // Clone to avoid mutation + const temp = m.map(row => [...row]); + let det = 1; + + for (let i = 0; i < n; i++) { + // Find pivot + let pivotRow = i; + for (let j = i + 1; j < n; j++) { + if (Math.abs(temp[j][i]) > Math.abs(temp[pivotRow][i])) { + pivotRow = j; + } + } + + // Check if singular (pivot is effectively zero) + if (Math.abs(temp[pivotRow][i]) < 1e-10) return 0; + + // Swap rows + if (i !== pivotRow) { + [temp[i], temp[pivotRow]] = [temp[pivotRow], temp[i]]; + det *= -1; + } + + det *= temp[i][i]; + + // Eliminate other rows + for (let j = i + 1; j < n; j++) { + const factor = temp[j][i] / temp[i][i]; + for (let k = i; k < n; k++) { + temp[j][k] -= factor * temp[i][k]; + } + } + } + + return det; +}; + +export const getMinor = (m: MatrixData, row: number, col: number): MatrixData => { + return m + .filter((_, i) => i !== row) + .map(r => r.filter((_, j) => j !== col)); +}; + +export const getInverse = (m: MatrixData): MatrixData | null => { + const n = m.length; + if (n !== m[0].length) return null; + + // Create augmented matrix [A | I] + const augmented: number[][] = m.map(row => [...row, ...Array(n).fill(0)]); + for (let i = 0; i < n; i++) { + augmented[i][n + i] = 1; + } + + // Gaussian elimination + for (let i = 0; i < n; i++) { + // Find pivot + let pivotRow = i; + for (let j = i + 1; j < n; j++) { + if (Math.abs(augmented[j][i]) > Math.abs(augmented[pivotRow][i])) { + pivotRow = j; + } + } + + // Check if singular + if (Math.abs(augmented[pivotRow][i]) < 1e-10) return null; + + // Swap rows + [augmented[i], augmented[pivotRow]] = [augmented[pivotRow], augmented[i]]; + + // Normalize pivot row + const pivot = augmented[i][i]; + for (let j = i; j < 2 * n; j++) { + augmented[i][j] /= pivot; + } + + // Eliminate other rows + for (let j = 0; j < n; j++) { + if (i !== j) { + const factor = augmented[j][i]; + for (let k = i; k < 2 * n; k++) { + augmented[j][k] -= factor * augmented[i][k]; + } + } + } + } + + // Extract inverse matrix + const inverse = createMatrix(n, n); + for (let i = 0; i < n; i++) { + for (let j = 0; j < n; j++) { + inverse[i][j] = augmented[i][n + j]; + } + } + + return inverse; +}; + +export const replaceColumn = (matrix: MatrixData, colIndex: number, columnVector: number[]): MatrixData => { + return matrix.map((row, i) => { + const newRow = [...row]; + newRow[colIndex] = columnVector[i]; + return newRow; + }); +}; + +export const getTrace = (m: MatrixData): number | null => { + if (m.length !== m[0].length) return null; + let trace = 0; + for(let i=0; i { + if (m.length !== 2 || m[0].length !== 2) return null; + + const tr = getTrace(m); + const det = getDeterminant(m); + + if (tr === null || det === null) return null; + + const delta = tr * tr - 4 * det; + if (delta < 0) return null; // Complex roots + + const sqrtDelta = Math.sqrt(delta); + return { + l1: (tr + sqrtDelta) / 2, + l2: (tr - sqrtDelta) / 2 + }; +}; + +export const fmt = (n: number) => Math.round(n * 100) / 100; diff --git a/utils/usePersistedState.ts b/utils/usePersistedState.ts new file mode 100644 index 0000000..792048c --- /dev/null +++ b/utils/usePersistedState.ts @@ -0,0 +1,31 @@ + +import { useState, useEffect, Dispatch, SetStateAction } from 'react'; + +export function usePersistedState(key: string, initialValue: T): [T, Dispatch>] { + // Lazy initialization to read from localStorage once on mount + const [state, setState] = useState(() => { + try { + if (typeof window === 'undefined') { + return initialValue; + } + const item = window.localStorage.getItem(key); + return item ? JSON.parse(item) : initialValue; + } catch (error) { + console.warn(`Error reading localStorage key "${key}":`, error); + return initialValue; + } + }); + + // Sync changes to localStorage whenever state or key changes + useEffect(() => { + try { + if (typeof window !== 'undefined') { + window.localStorage.setItem(key, JSON.stringify(state)); + } + } catch (error) { + console.warn(`Error writing localStorage key "${key}":`, error); + } + }, [key, state]); + + return [state, setState]; +} diff --git a/verify_gaussian.py b/verify_gaussian.py new file mode 100644 index 0000000..52f1688 --- /dev/null +++ b/verify_gaussian.py @@ -0,0 +1,40 @@ +from playwright.sync_api import Page, expect, sync_playwright + +def verify_gaussian_view(page: Page): + # 1. Arrange: Go to the homepage. + print("Navigating to home page...") + page.goto("http://localhost:3000/Math-Biotech-Project/") + + # 2. Act: Select Matrix Module + print("Clicking Matrix module...") + # Using 'Matrix' text which is in the button + matrix_card = page.get_by_text("Matrix", exact=True).first + matrix_card.click() + + # 3. Act: Select Gaussian Elimination + print("Clicking Gaussian Elimination...") + gaussian_btn = page.get_by_role("button", name="Gaussian Elimination") + gaussian_btn.click() + + # 4. Assert: Check if Gaussian View is loaded + print("Verifying page content...") + heading = page.get_by_role("heading", name="Gaussian Elimination") + expect(heading).to_be_visible() + + # 5. Screenshot + print("Taking screenshot...") + page.screenshot(path="/home/jules/verification/gaussian_view.png") + print("Screenshot saved.") + +if __name__ == "__main__": + with sync_playwright() as p: + browser = p.chromium.launch(headless=True) + page = browser.new_page() + try: + verify_gaussian_view(page) + except Exception as e: + print(f"Error: {e}") + page.screenshot(path="/home/jules/verification/error.png") + raise e + finally: + browser.close() diff --git a/views/AIChatView.tsx b/views/AIChatView.tsx new file mode 100644 index 0000000..6931738 --- /dev/null +++ b/views/AIChatView.tsx @@ -0,0 +1,188 @@ + +import React, { useState, useRef, useEffect } from 'react'; +import ReactMarkdown from 'react-markdown'; +import { Send, Settings, Sparkles, Key, AlertTriangle, Bot } from 'lucide-react'; +import { GoogleGenAI } from "@google/genai"; +import { BRAND_SHORT_NAME } from '../data/branding'; + +interface Message { + id: string; + role: 'user' | 'model'; + text: string; +} + +const STORAGE_KEY = 'inmersion_ai_key'; + +export const AIChatView: React.FC = () => { + const [apiKey, setApiKey] = useState(() => localStorage.getItem(STORAGE_KEY) || ''); + const [input, setInput] = useState(''); + const [showSettings, setShowSettings] = useState(() => !localStorage.getItem(STORAGE_KEY)); + const [messages, setMessages] = useState([ + { id: '1', role: 'model', text: `Hello! I am your ${BRAND_SHORT_NAME} Assistant. ๐Ÿงฌ\n\nI can solve math problems or explain biological concepts. How can I help you today?` } + ]); + const [isLoading, setIsLoading] = useState(false); + const messagesEndRef = useRef(null); + + const saveApiKey = () => { + if (apiKey.trim().startsWith('AIza')) { + localStorage.setItem(STORAGE_KEY, apiKey.trim()); + setShowSettings(false); + } else { + alert("Please enter a valid Google Gemini API Key (starts with AIza...)."); + } + }; + + const handleSend = async () => { + if (!input.trim() || isLoading) return; + if (!apiKey) { setShowSettings(true); return; } + + const userMsg = input; + setInput(''); + setMessages(prev => [...prev, { id: Date.now().toString(), role: 'user', text: userMsg }]); + setIsLoading(true); + + try { + const ai = new GoogleGenAI({ apiKey }); + const response = await ai.models.generateContent({ + model: "gemini-1.5-flash", + contents: [ + { role: 'user', parts: [{ text: `You are an expert in Mathematics and Biotechnology. Explain questions step-by-step with formulas and biological examples where applicable.\n\nQuestion: ${userMsg}` }] } + ] + }); + + const text = response.text; + + if (!text) { + throw new Error("No response generated."); + } + setMessages(prev => [...prev, { id: Date.now().toString(), role: 'model', text: text }]); + + } catch (error: any) { + console.error("AI Error:", error); + let errorMessage = error.message || "An error occurred."; + if (errorMessage.includes("403")) errorMessage = "Invalid API Key or quota exceeded."; + setMessages(prev => [...prev, { id: Date.now().toString(), role: 'model', text: `โš ๏ธ Error: ${errorMessage}` }]); + } finally { + setIsLoading(false); + } + }; + + useEffect(() => { + messagesEndRef.current?.scrollIntoView({ behavior: 'smooth' }); + }, [messages]); + + return ( +
+ + {/* Header */} +
+
+
+ +
+
+

AI Assistant

+

Powered by Gemini

+
+
+ +
+ + {/* Settings Panel */} + {showSettings && ( +
+

+ + API Key Setup +

+

+ To use AI features, please enter your own Google Gemini API Key. + Your key is stored locally in your browser. +

+
+ setApiKey(e.target.value)} + placeholder="AIzaSy..." + className="flex-1 bg-slate-950 border border-slate-800 rounded-xl px-4 py-3 text-white placeholder-slate-600 outline-none focus:ring-2 focus:ring-cyan-500/50 transition-all font-mono text-sm" + /> + +
+

+ + Please keep your API key secure. +

+
+ )} + + {/* Chat Area */} +
+
+ {messages.map((msg) => ( +
+
+ {msg.role === 'model' ? ( +
+ {msg.text} +
+ ) : ( +

{msg.text}

+ )} +
+
+ ))} + {isLoading && ( +
+
+ + Thinking... +
+
+ )} +
+
+ + {/* Input Area */} +
+
+
+
+ setInput(e.target.value)} + onKeyDown={(e) => e.key === 'Enter' && handleSend()} + aria-label="Ask a math question" + placeholder="Ask a math question or topic..." + className="flex-1 bg-transparent text-white placeholder-slate-500 outline-none text-sm font-medium" + disabled={isLoading} + /> + +
+
+
+
+
+ ); +}; \ No newline at end of file diff --git a/views/AreaUnderCurveView.tsx b/views/AreaUnderCurveView.tsx new file mode 100644 index 0000000..31014b7 --- /dev/null +++ b/views/AreaUnderCurveView.tsx @@ -0,0 +1,193 @@ + +import React, { useState } from 'react'; +import { motion } from 'framer-motion'; +import { MathRenderer } from '../components/MathRenderer'; +import { AreaChart, Sigma, ArrowLeftRight } from 'lucide-react'; + +export const AreaUnderCurveView: React.FC = () => { + const [a, setA] = useState(-1); + const [b, setB] = useState(1); + const [mode, setMode] = useState<'single' | 'between'>('between'); + + const width = 600; + const height = 400; + const domain = { x: [-3, 3], y: [-5, 5] }; + + const scaleX = (x: number) => ((x - domain.x[0]) / (domain.x[1] - domain.x[0])) * width; + const scaleY = (y: number) => height - ((y - domain.y[0]) / (domain.y[1] - domain.y[0])) * height; + + // Functions from PDF Page 7 + const f = (x: number) => x * x; // f(x) = x^2 + const g = (x: number) => 2 * x - x * x; // g(x) = 2x - x^2 + + const generatePath = (fn: (x: number) => number) => { + let path = ""; + const step = 0.05; + for (let x = domain.x[0]; x <= domain.x[1]; x += step) { + const y = fn(x); + const sx = scaleX(x); + const sy = scaleY(y); + if (x === domain.x[0]) path += `M ${sx} ${sy}`; + else path += ` L ${sx} ${sy}`; + } + return path; + }; + + const generateAreaPath = () => { + let path = ""; + const step = 0.05; + + // Start at x=a + const startX = Math.max(a, domain.x[0]); + const endX = Math.min(b, domain.x[1]); + + if (startX >= endX) return ""; + + if (mode === 'single') { + // Area under f(x) + path = `M ${scaleX(startX)} ${scaleY(0)}`; + for(let x = startX; x <= endX; x += step) { + path += ` L ${scaleX(x)} ${scaleY(f(x))}`; + } + path += ` L ${scaleX(endX)} ${scaleY(0)} Z`; + } else { + // Area between f(x) and g(x) + // Trace top curve g(x) L to R + path = `M ${scaleX(startX)} ${scaleY(g(startX))}`; + for(let x = startX; x <= endX; x += step) { + path += ` L ${scaleX(x)} ${scaleY(g(x))}`; + } + // Trace bottom curve f(x) R to L + for(let x = endX; x >= startX; x -= step) { + path += ` L ${scaleX(x)} ${scaleY(f(x))}`; + } + path += " Z"; + } + return path; + }; + + // Calculations + const F_f = (x: number) => (Math.pow(x, 3) / 3); + const F_g = (x: number) => (x * x - Math.pow(x, 3) / 3); + + const areaValue = mode === 'single' + ? F_f(b) - F_f(a) + : (F_g(b) - F_f(b)) - (F_g(a) - F_f(a)); // Int(g - f) + + return ( +
+
+
+

Definite Integral & Area

+

+ The definite integral represents the signed area under the curve. +

+
+
+ + +
+
+ +
+ + {/* Controls */} +
+
+

Integration Limits

+ +
+
+
+ Lower Limit (a) + {a.toFixed(2)} +
+ setA(parseFloat(e.target.value))} className="w-full h-2 bg-slate-700 rounded-lg appearance-none cursor-pointer accent-cyan-500"/> +
+
+
+ Upper Limit (b) + {b.toFixed(2)} +
+ setB(parseFloat(e.target.value))} className="w-full h-2 bg-slate-700 rounded-lg appearance-none cursor-pointer accent-purple-500"/> +
+
+
+ +
+

+ Calculation (FTC) +

+ +
+
{areaValue.toFixed(4)}
+
Calculated Area
+
+ +
+ {mode === 'single' ? ( + <> +
Function:
+
Primitive F(x):
+
F(b) - F(a): {F_f(b).toFixed(2)} - {F_f(a).toFixed(2)}
+ + ) : ( + <> +
Top Curve:
+
Bottom Curve:
+
Integrand:
+ + )} +
+
+
+ + {/* Graph */} +
+
+ +
+
+
+ f(x) = xยฒ +
+ {mode === 'between' && ( +
+
+ g(x) = 2x - xยฒ +
+ )} +
+ + + {/* Grid */} + + + + {/* Shaded Area */} + + + {/* Functions */} + + {mode === 'between' && ( + + )} + + {/* Limit Lines */} + + + + {/* Labels */} + a + b + +
+ +
+
+ ); +}; diff --git a/views/BasicsView.tsx b/views/BasicsView.tsx new file mode 100644 index 0000000..19c681e --- /dev/null +++ b/views/BasicsView.tsx @@ -0,0 +1,256 @@ +import React, { useState } from 'react'; +import { MatrixInput } from '../components/MatrixInput'; +import { motion, AnimatePresence } from 'framer-motion'; +import { Database, Scan, Box, Maximize, ArrowRightLeft, Target, Settings2, Info, BookOpen } from 'lucide-react'; +import { WolframHelper } from '../components/WolframHelper'; +import { MathRenderer } from '../components/MathRenderer'; + +export const BasicsView: React.FC = () => { + const [rows, setRows] = useState(3); + const [cols, setCols] = useState(3); + const [hoveredRow, setHoveredRow] = useState(null); + const [hoveredCol, setHoveredCol] = useState(null); + const [hoveredCell, setHoveredCell] = useState<{r: number, c: number} | null>(null); + + // Demo matrix with sequential numbers + const matrixData = Array(rows).fill(0).map((_, i) => + Array(cols).fill(0).map((_, j) => (i * cols) + j + 1) + ); + + // Dynamic Properties + const isSquare = rows === cols; + const isRowVector = rows === 1; + const isColVector = cols === 1; + const elementCount = rows * cols; + + const getEducationalContext = () => { + if (hoveredCell) { + const {r, c} = hoveredCell; + const isDiagonal = r === c; + return { + title: `Element a_{${r+1}${c+1}}`, + desc: `This element is located at Row ${r+1} and Column ${c+1}.`, + math: `a_{${r+1},${c+1}} \\in \\mathbb{R}`, + extra: isDiagonal ? "This element lies on the Main Diagonal (i=j)." : "Off-diagonal element (iโ‰ j)." + }; + } + if (isSquare) return { + title: "Square Matrix", + desc: "A matrix with equal number of rows and columns (n = m). Only square matrices have determinants, eigenvalues, and inverses.", + math: "A \\in \\mathbb{R}^{n \\times n}" + }; + if (isRowVector) return { + title: "Row Vector", + desc: "A matrix with a single row. Often represents a coordinate or a linear equation.", + math: "v \\in \\mathbb{R}^{1 \\times m}" + }; + if (isColVector) return { + title: "Column Vector", + desc: "A matrix with a single column. Standard representation for vectors in linear systems Ax=b.", + math: "v \\in \\mathbb{R}^{n \\times 1}" + }; + return { + title: "Rectangular Matrix", + desc: "A general system of numbers where rows โ‰  columns. It represents a linear transformation between spaces of different dimensions.", + math: "A \\in \\mathbb{R}^{n \\times m}" + }; + }; + + const eduContent = getEducationalContext(); + + return ( +
+
+
+

Matrix Anatomy

+

+ Understanding the structural properties of linear arrays. + Indices i (row) and j (column) define the address of every element. +

+
+
+ + {/* Main Layout */} +
+ + {/* Left: Controls & Structure */} +
+ {/* Dimension Controller */} +
+
+ +
+ +

+ Dimensions Setup +

+ +
+
+
+ + {rows} +
+ setRows(parseInt(e.target.value))} + className="w-full h-1.5 bg-slate-800 rounded-lg appearance-none cursor-pointer accent-cyan-500 hover:accent-cyan-400 transition-all" + /> +
+
+
+ + {cols} +
+ setCols(parseInt(e.target.value))} + className="w-full h-1.5 bg-slate-800 rounded-lg appearance-none cursor-pointer accent-purple-500 hover:accent-purple-400 transition-all" + /> +
+
+
+ + {/* Educational Context Card */} + +
+ +

Concept Guide

+
+

{eduContent.title}

+
+ +
+

+ {eduContent.desc} +

+ {eduContent.extra && ( +
+ {eduContent.extra} +
+ )} +
+
+ + {/* Right: Visualization */} +
+ {/* Visualizer */} +
+ {/* Background Grid */} +
+ + {/* Index Indicators */} +
+
Row Index
+
Col Index
+
+ +
setHoveredCell(null)}> + + + {/* Hover Overlay triggers */} +
+ {/* We don't render interactive layer here to avoid complex overlay logic with Framer Motion layout, + instead relying on the MatrixInput hover effects or enhancing MatrixInput itself would be better, + but for this "Concept" focus, we use the bottom HUD mainly. + + However, let's simulate cell hover detection for the educational card. + */} +
+
+ + {/* Bottom HUD - Dynamic Inspection */} +
+
+ {hoveredRow !== null ? ( +
+
+
+
Row Scan
+
Inspecting Row {hoveredRow + 1} (index i={hoveredRow+1})
+
+
+ ) : hoveredCol !== null ? ( +
+
+
+
Column Scan
+
Inspecting Column {hoveredCol + 1} (index j={hoveredCol+1})
+
+
+ ) : ( +
+
+
+
Inspector Ready
+
Hover over controls to analyze structure
+
+
+ )} + +
+
+ Total Elements + {elementCount} +
+
+ Shape + {isSquare ? 'Square' : 'Rect'} +
+
+
+
+
+ + {/* Quick Actions */} +
+ + +
+
+ +
+ + +
+ ); +}; \ No newline at end of file diff --git a/views/CheatSheetView.tsx b/views/CheatSheetView.tsx new file mode 100644 index 0000000..895b0ed --- /dev/null +++ b/views/CheatSheetView.tsx @@ -0,0 +1,409 @@ + + +import React from 'react'; +import { ModuleType } from '../types'; +import { motion } from 'framer-motion'; +import { FileText, Sigma, Divide, TrendingUp, Activity, Grid3X3, Infinity, Calculator, PenTool, Braces, AreaChart, Layers } from 'lucide-react'; +import { MathRenderer } from '../components/MathRenderer'; + +interface CheatSheetSection { + title: string; + items: { + label: string; + formula: string; + note?: string; + }[]; +} + +export const CheatSheetView: React.FC<{ module: ModuleType }> = ({ module }) => { + + const getModuleData = (): { color: string; icon: any; sections: CheatSheetSection[] } => { + switch (module) { + case ModuleType.MATRIX: + return { + color: 'text-orange-400', + icon: Grid3X3, + sections: [ + { + title: 'Basic Definitions', + items: [ + { label: 'Matrix Dimensions', formula: 'A_{m \\times n}', note: 'm rows, n columns' }, + { label: 'Square Matrix', formula: 'm = n', note: 'Essential for det(A) & Aโปยน' }, + { label: 'Identity Matrix (I)', formula: 'I = \\text{diag}(1,1,\\dots,1)', note: 'A \\cdot I = A' }, + { label: 'Zero Matrix (0)', formula: 'O_{ij} = 0', note: 'A + O = A' }, + { label: 'Transpose', formula: '(A^T)_{ij} = A_{ji}', note: 'Rows become columns' }, + { label: 'Symmetric Matrix', formula: 'A = A^T', note: 'Must be square' }, + { label: 'Skew-Symmetric', formula: 'A^T = -A', note: 'Diag elements must be 0' } + ] + }, + { + title: 'Operations', + items: [ + { label: 'Addition', formula: 'C_{ij} = a_{ij} + b_{ij}', note: 'Dims must match exactly' }, + { label: 'Scalar Mult', formula: '(kA)_{ij} = k \\cdot a_{ij}', note: 'Multiply every element' }, + { label: 'Matrix Mult', formula: 'C_{ij} = \\sum_k a_{ik}b_{kj}', note: 'Cols(A) must equal Rows(B)' }, + { label: 'Properties', formula: 'AB \\neq BA', note: 'Generally not commutative' }, + { label: 'Transpose Prop', formula: '(AB)^T = B^T A^T', note: 'Order reverses!' }, + { label: 'Trace', formula: '\\text{Tr}(A) = \\sum a_{ii}', note: 'Sum of main diagonal' } + ] + }, + { + title: 'Determinants (Det)', + items: [ + { label: '2x2 Formula', formula: 'ad - bc', note: 'For [[a,b],[c,d]]' }, + { label: 'Sarrus Rule (3x3)', formula: '\\text{diag sum} - \\text{anti-diag sum}', note: 'Only for 3x3 matrices' }, + { label: 'Laplace Expansion', formula: '\\det A = \\sum (-1)^{i+j} a_{ij} M_{ij}', note: 'Expansion by any row/col' }, + { label: 'Product Rule', formula: '\\det(AB) = \\det(A)\\det(B)', note: '' }, + { label: 'Transpose Rule', formula: '\\det(A^T) = \\det(A)', note: '' }, + { label: 'Inverse Rule', formula: '\\det(A^{-1}) = 1/\\det(A)', note: '' }, + { label: 'Scalar Rule', formula: '\\det(kA) = k^n \\det(A)', note: 'n is dimension size' } + ] + }, + { + title: 'Inverse Matrix', + items: [ + { label: 'Condition', formula: '\\det(A) \\neq 0', note: 'Matrix is Non-Singular' }, + { label: 'Adjugate Formula', formula: 'A^{-1} = \\frac{1}{\\det A} (C_{ij})^T', note: 'Transpose of cofactor matrix' }, + { label: '2x2 Shortcut', formula: '\\frac{1}{ad-bc} \\begin{bmatrix} d & -b \\\\ -c & a \\end{bmatrix}', note: 'Swap diag, negate off-diag' }, + { label: 'Product Inverse', formula: '(AB)^{-1} = B^{-1}A^{-1}', note: 'Order reverses!' } + ] + }, + { + title: 'Systems of Equations', + items: [ + { label: 'Matrix Form', formula: 'AX = B', note: '' }, + { label: 'Cramer\'s Rule', formula: 'x_i = \\frac{\\det(A_i)}{\\det(A)}', note: 'Valid if det(A) โ‰  0' }, + { label: 'Rouche-Capelli', formula: '\\text{rank}(A) = \\text{rank}(A|B)', note: 'Condition for consistency' }, + { label: 'Unique Solution', formula: '\\text{rank}(A) = \\text{rank}(A|B) = n', note: 'n = variables' }, + { label: 'Infinite Solutions', formula: '\\text{rank}(A) = \\text{rank}(A|B) < n', note: 'Free parameters exist' } + ] + } + ] + }; + case ModuleType.SEQUENCES: + return { + color: 'text-amber-400', + icon: TrendingUp, + sections: [ + { + title: 'Definitions', + items: [ + { label: 'General Term', formula: 'a_n = f(n)', note: 'n โˆˆ โ„•' }, + { label: 'Monotonicity', formula: 'a_{n+1} - a_n', note: '>0 increasing, <0 decreasing' }, + { label: 'Convergence', formula: '\\lim_{n\\to\\infty} a_n = g', note: 'g is finite number' }, + { label: 'Boundedness', formula: '|a_n| \\le M', note: 'For all n' } + ] + }, + { + title: 'Arithmetic Progression', + items: [ + { label: 'Definition', formula: 'a_{n+1} - a_n = r', note: 'r is const difference' }, + { label: 'N-th Term', formula: 'a_n = a_1 + (n-1)r', note: '' }, + { label: 'Sum S_n', formula: '\\frac{a_1 + a_n}{2} \\cdot n', note: '' }, + { label: 'Monotonicity', formula: 'r > 0 \\implies \\nearrow', note: 'r < 0 implies decreasing' } + ] + }, + { + title: 'Geometric Progression', + items: [ + { label: 'Definition', formula: 'a_{n+1} / a_n = q', note: 'q is const ratio' }, + { label: 'N-th Term', formula: 'a_n = a_1 \\cdot q^{n-1}', note: '' }, + { label: 'Sum S_n (qโ‰ 1)', formula: 'a_1 \\frac{1-q^n}{1-q}', note: '' }, + { label: 'Infinite Sum', formula: 'S = \\frac{a_1}{1-q}', note: 'Converges if |q| < 1' } + ] + }, + { + title: 'Key Limits', + items: [ + { label: 'Reciprocal', formula: '\\lim \\frac{1}{n} = 0', note: '' }, + { label: 'Polynomials', formula: '\\lim \\frac{P(n)}{Q(n)}', note: 'Compare highest degrees' }, + { label: 'Euler Number', formula: '\\lim (1 + \\frac{1}{n})^n = e', note: '' }, + { label: 'Root Test', formula: '\\lim \\sqrt[n]{n} = 1', note: '' }, + { label: 'Constant Root', formula: '\\lim \\sqrt[n]{A} = 1', note: 'For A > 0' }, + { label: 'Geometric', formula: '\\lim q^n = 0', note: 'If |q| < 1' } + ] + }, + { + title: 'Theorems', + items: [ + { label: 'Squeeze Theorem', formula: 'a_n \\le b_n \\le c_n', note: 'If lim a = lim c, then lim b is same' }, + { label: 'Weierstrass', formula: 'Bounded & Monotonic', note: 'Implies Convergence' }, + { label: 'Arithmetic Ops', formula: '\\lim(a_n \\pm b_n) = A \\pm B', note: 'Only for finite limits' } + ] + } + ] + }; + case ModuleType.FUNCTIONS: + return { + color: 'text-rose-400', + icon: Activity, + sections: [ + { + title: 'Function Basics', + items: [ + { label: 'Domain (D)', formula: 'x \\text{ values}', note: 'Where f(x) exists' }, + { label: 'Range (R)', formula: 'y \\text{ values}', note: 'Output set' }, + { label: 'Roots', formula: 'f(x) = 0', note: 'x-intercepts' }, + { label: 'Injection (1-to-1)', formula: 'f(x_1)=f(x_2) \\implies x_1=x_2', note: 'Horizontal line test' }, + { label: 'Inverse', formula: 'y=f(x) \\iff x=f^{-1}(y)', note: 'Requires Injection' } + ] + }, + { + title: 'Domain Constraints', + items: [ + { label: 'Denominator', formula: '\\text{denom} \\neq 0', note: 'Division by zero' }, + { label: 'Even Roots', formula: '\\text{inside} \\ge 0', note: 'sqrt(x), x^(1/4)' }, + { label: 'Logarithms', formula: '\\text{argument} > 0', note: 'ln(x)' }, + { label: 'Arcsin/Arccos', formula: '-1 \\le x \\le 1', note: 'Domain restricted' } + ] + }, + { + title: 'Parity & Symmetry', + items: [ + { label: 'Even Function', formula: 'f(-x) = f(x)', note: 'Symmetric to Y-axis (e.g., xยฒ, cos x)' }, + { label: 'Odd Function', formula: 'f(-x) = -f(x)', note: 'Symmetric to Origin (e.g., xยณ, sin x)' }, + { label: 'Periodic', formula: 'f(x+T) = f(x)', note: 'Trig functions' } + ] + }, + { + title: 'Elementary Functions', + items: [ + { label: 'Linear', formula: 'y = ax+b', note: 'Slope a, intercept b' }, + { label: 'Quadratic', formula: 'y = ax^2+bx+c', note: 'Vertex x = -b/2a' }, + { label: 'Exponential', formula: 'y = a^x', note: 'Always > 0 (if a>0)' }, + { label: 'Logarithm', formula: 'y = \\log_a x', note: 'Inverse of exp' } + ] + }, + { + title: 'Trigonometry', + items: [ + { label: 'Pythagorean', formula: '\\sin^2 x + \\cos^2 x = 1', note: '' }, + { label: 'Double Angle (sin)', formula: '\\sin 2x = 2\\sin x \\cos x', note: '' }, + { label: 'Double Angle (cos)', formula: '\\cos 2x = \\cos^2 x - \\sin^2 x', note: '' } + ] + } + ] + }; + case ModuleType.LIMITS: + return { + color: 'text-pink-400', + icon: Infinity, + sections: [ + { + title: 'Rules of Calculation', + items: [ + { label: 'Const Mult', formula: '\\lim k f(x) = k \\lim f(x)', note: '' }, + { label: 'Sum/Diff', formula: '\\lim (f \\pm g) = \\lim f \\pm \\lim g', note: '' }, + { label: 'Product', formula: '\\lim (f \\cdot g) = \\lim f \\cdot \\lim g', note: '' }, + { label: 'Quotient', formula: '\\lim (f/g) = (\\lim f)/(\\lim g)', note: 'If lim g โ‰  0' }, + { label: 'Power', formula: '\\lim f(x)^{g(x)} = (\\lim f)^{\\lim g}', note: '' } + ] + }, + { + title: 'Important Limits', + items: [ + { label: 'Sinc Limit', formula: '\\lim_{x\\to 0} \\frac{\\sin x}{x} = 1', note: 'Very common' }, + { label: 'Euler Limit', formula: '\\lim_{x\\to 0} (1+x)^{1/x} = e', note: '' }, + { label: 'Log Growth', formula: '\\lim_{x\\to 0} \\frac{\\ln(1+x)}{x} = 1', note: '' }, + { label: 'Exp Growth', formula: '\\lim_{x\\to 0} \\frac{e^x - 1}{x} = 1', note: '' }, + { label: 'Infinity Ratio', formula: '\\frac{x^n}{e^x} \\to 0', note: 'As x โ†’ โˆž' } + ] + }, + { + title: 'Continuity & Asymptotes', + items: [ + { label: 'Continuity Def', formula: '\\lim_{x\\to c} f(x) = f(c)', note: 'No holes, no jumps' }, + { label: 'Vertical Asym', formula: '\\lim_{x\\to c} f(x) = \\pm \\infty', note: 'Line x = c' }, + { label: 'Horizontal Asym', formula: '\\lim_{x\\to \\infty} f(x) = L', note: 'Line y = L' }, + { label: 'Oblique Asym', formula: 'y = ax+b', note: 'a = lim f(x)/x' } + ] + }, + { + title: 'Indeterminate Forms', + items: [ + { label: 'Types', formula: '\\frac{0}{0}, \\frac{\\infty}{\\infty}, 0 \\cdot \\infty, \\infty - \\infty', note: 'Requires work' }, + { label: 'Exponential', formula: '1^\\infty, \\infty^0, 0^0', note: 'Use ln() transform' }, + { label: 'Strategy', formula: 'Factor, Conjugate, L\'Hospital', note: '' } + ] + } + ] + }; + case ModuleType.DERIVATIVES: + return { + color: 'text-cyan-400', + icon: Divide, + sections: [ + { + title: 'Definition', + items: [ + { label: 'Limit Def', formula: 'f\'(x) = \\lim_{h\\to 0} \\frac{f(x+h)-f(x)}{h}', note: '' }, + { label: 'Tangent Slope', formula: 'm = f\'(x_0)', note: '' }, + { label: 'Tangent Line', formula: 'y - y_0 = f\'(x_0)(x - x_0)', note: '' }, + { label: 'Normal Line', formula: 'y - y_0 = -\\frac{1}{f\'(x_0)}(x - x_0)', note: 'Perpendicular' } + ] + }, + { + title: 'Differentiation Rules', + items: [ + { label: 'Power Rule', formula: '(x^n)\' = nx^{n-1}', note: '' }, + { label: 'Product Rule', formula: '(uv)\' = u\'v + uv\'', note: '' }, + { label: 'Quotient Rule', formula: '(\\frac{u}{v})\' = \\frac{u\'v - uv\'}{v^2}', note: '' }, + { label: 'Chain Rule', formula: '(f(g(x)))\' = f\'(g) \\cdot g\'(x)', note: 'Outer\' ยท Inner\'' }, + { label: 'Inverse Func', formula: '(f^{-1})\'(y) = \\frac{1}{f\'(x)}', note: '' } + ] + }, + { + title: 'Standard Derivatives', + items: [ + { label: 'Trig', formula: '(\\sin)\'=\\cos, (\\cos)\'=-\\sin', note: '' }, + { label: 'Tan/Cot', formula: '(\\tan)\'=\\frac{1}{\\cos^2}, (\\cot)\'=\\frac{-1}{\\sin^2}', note: '' }, + { label: 'Exponentials', formula: '(e^x)\' = e^x, (a^x)\' = a^x \\ln a', note: '' }, + { label: 'Logarithms', formula: '(\\ln x)\' = \\frac{1}{x}, (\\log_a x)\' = \\frac{1}{x \\ln a}', note: '' }, + { label: 'Inverse Trig', formula: '(\\arctan x)\' = \\frac{1}{1+x^2}', note: '' }, + { label: 'Arcsin', formula: '(\\arcsin x)\' = \\frac{1}{\\sqrt{1-x^2}}', note: '' } + ] + }, + { + title: 'Applications (Analysis)', + items: [ + { label: 'Monotonicity', formula: 'f\' > 0 \\implies \\nearrow', note: 'f\' < 0 implies decreasing' }, + { label: 'Extrema', formula: 'f\'(c)=0 \\text{ & sign change}', note: 'Local Max/Min' }, + { label: 'Convexity', formula: 'f\'\' > 0 \\implies \\cup', note: 'Concave Up (Convex)' }, + { label: 'Concavity', formula: 'f\'\' < 0 \\implies \\cap', note: 'Concave Down' }, + { label: 'Inflection Pt', formula: 'f\'\'(c)=0 \\text{ & sign change}', note: 'Change in curvature' }, + { label: 'L\'Hospital', formula: '\\lim \\frac{f}{g} = \\lim \\frac{f\'}{g\'}', note: 'For 0/0 or โˆž/โˆž' } + ] + } + ] + }; + case ModuleType.INTEGRALS: + return { + color: 'text-emerald-400', + icon: AreaChart, + sections: [ + { + title: 'Indefinite Integrals', + items: [ + { label: 'Power Rule', formula: '\\int x^a dx = \\frac{x^{a+1}}{a+1} + C', note: 'a โ‰  -1' }, + { label: 'Log Rule', formula: '\\int \\frac{1}{x} dx = \\ln|x| + C', note: '' }, + { label: 'Exponential', formula: '\\int e^x dx = e^x + C', note: '' }, + { label: 'General Exp', formula: '\\int a^x dx = \\frac{a^x}{\\ln a} + C', note: '' } + ] + }, + { + title: 'Definite Integrals', + items: [ + { label: 'Newton-Leibniz', formula: '\\int_a^b f(x)dx = F(b) - F(a)', note: 'F is antiderivative' }, + { label: 'Additivity', formula: '\\int_a^c = \\int_a^b + \\int_b^c', note: '' }, + { label: 'Linearity', formula: '\\int (af + bg) = a\\int f + b\\int g', note: '' } + ] + }, + { + title: 'Area Calculation', + items: [ + { label: 'Under Curve', formula: 'S = \\int_a^b f(x)dx', note: 'If f(x) โ‰ฅ 0' }, + { label: 'Between Curves', formula: 'S = \\int_a^b (f(x) - g(x))dx', note: 'If f(x) โ‰ฅ g(x)' } + ] + } + ] + }; + case ModuleType.DIFF_EQ: + return { + color: 'text-indigo-400', + icon: Layers, + sections: [ + { + title: 'First Order ODEs', + items: [ + { label: 'Separable', formula: '\\frac{dy}{dx} = g(x)h(y) \\implies \\int \\frac{dy}{h(y)} = \\int g(x)dx', note: '' }, + { label: 'Linear', formula: '\\frac{dy}{dx} + P(x)y = Q(x)', note: 'Use Integrating Factor' }, + { label: 'Integrating Factor', formula: 'I(x) = e^{\\int P(x)dx}', note: 'Multiply eq by I(x)' }, + { label: 'Solution (Linear)', formula: 'y = \\frac{1}{I(x)} \\int I(x)Q(x)dx', note: '' } + ] + }, + { + title: 'Second Order Linear', + items: [ + { label: 'Homogeneous', formula: 'ay\'\' + by\' + cy = 0', note: 'Const coeffs' }, + { label: 'Characteristic Eq', formula: 'ar^2 + br + c = 0', note: 'Find roots r1, r2' }, + { label: 'Distinct Roots', formula: 'y = C_1 e^{r_1 x} + C_2 e^{r_2 x}', note: 'ฮ” > 0' }, + { label: 'Repeated Roots', formula: 'y = C_1 e^{rx} + C_2 x e^{rx}', note: 'ฮ” = 0' }, + { label: 'Complex Roots', formula: 'y = e^{\\alpha x}(C_1 \\cos \\beta x + C_2 \\sin \\beta x)', note: 'r = ฮฑ ยฑ iฮฒ' } + ] + }, + { + title: 'Modeling', + items: [ + { label: 'Exponential Growth', formula: '\\frac{dP}{dt} = kP \\implies P(t) = P_0 e^{kt}', note: 'k > 0' }, + { label: 'Decay', formula: '\\frac{dN}{dt} = -\\lambda N \\implies N(t) = N_0 e^{-\\lambda t}', note: 'Half-life relation' }, + { label: 'Logistic Growth', formula: '\\frac{dP}{dt} = rP(1 - \\frac{P}{K})', note: 'K is carrying capacity' } + ] + } + ] + }; + default: + return { color: 'text-slate-400', icon: FileText, sections: [] }; + } + }; + + const data = getModuleData(); + const Icon = data.icon; + + return ( +
+
+
+ +
+
+

Exam Cheat Sheet

+

+ Complete revision guide for {module}. Contains essential definitions, formulas, and theorems required for final exams. +

+
+
+ +
+ {data.sections.map((section, idx) => ( + +
+

+ {idx === 0 ? : idx === 1 ? : } + {section.title} +

+ + SEC {idx + 1} + +
+ +
+ {section.items.map((item, i) => ( +
+
+ {item.label} + {item.note && {item.note}} +
+
+ +
+
+ ))} +
+
+ ))} +
+ +
+

+ PRO TIP: Practice applying these formulas in the Homework section before the exam. +

+
+
+ ); +}; \ No newline at end of file diff --git a/views/CobwebView.tsx b/views/CobwebView.tsx new file mode 100644 index 0000000..222c207 --- /dev/null +++ b/views/CobwebView.tsx @@ -0,0 +1,122 @@ +import React, { useState, useEffect } from 'react'; +import { motion } from 'framer-motion'; + +export const CobwebView: React.FC = () => { + const [r, setR] = useState(2.8); // Growth rate + const [x0, setX0] = useState(0.1); // Initial population + + // Logistic Map: x_{n+1} = r * x_n * (1 - x_n) + const f = (x: number) => r * x * (1 - x); + + const iterations = 50; + const width = 600; + const height = 600; + const scale = width; // domain [0,1] maps to [0, width] + + const getCobwebPath = () => { + let path = `M ${x0 * scale} ${height}`; // Start at bottom + let cx = x0; + + for(let i=0; i (cx, cy) + path += ` L ${cx * scale} ${height - cy * scale}`; + + // Horizontal line to y=x: (cx, cy) -> (cy, cy) + path += ` L ${cy * scale} ${height - cy * scale}`; + + cx = cy; + } + return path; + }; + + return ( +
+
+
+

Logistic Map (Chaos Theory)

+

+ Modeling iterative system limits with Cobweb plots: xโ‚™โ‚Šโ‚ = r ยท xโ‚™(1 - xโ‚™) +

+
+
+ +
+
+

Parameters

+ +
+
+ + setR(parseFloat(e.target.value))} + className="w-full h-2 bg-slate-700 rounded-lg appearance-none cursor-pointer accent-cyan-500" + /> +
+ Divergence + Stable + Chaos (r > 3.57) +
+
+ +
+ + setX0(parseFloat(e.target.value))} + className="w-full h-2 bg-slate-700 rounded-lg appearance-none cursor-pointer accent-pink-500" + /> +
+ +
+

Cobweb Plot: Visualizes the behavior of the sequence iteratively.

+

If lines spiral inward, the system stabilizes (Convergence).

+

If lines fill the box randomly, the system is Chaotic.

+
+
+
+ +
+
+ + {/* y = x Line */} + + + {/* The Parabola Curve */} + + + {/* Cobweb Path */} + + +
+ +
+ Domain [0, 1] +
+
+
+
+ ); +}; \ No newline at end of file diff --git a/views/ContinuityView.tsx b/views/ContinuityView.tsx new file mode 100644 index 0000000..22fc81a --- /dev/null +++ b/views/ContinuityView.tsx @@ -0,0 +1,204 @@ +import React, { useState } from 'react'; +import { motion, AnimatePresence } from 'framer-motion'; +import { Unplug, CheckCircle2, AlertOctagon, ArrowRight, Lightbulb, Ruler } from 'lucide-react'; +import { WolframHelper } from '../components/WolframHelper'; +import { MathRenderer } from '../components/MathRenderer'; + +interface ContinuityRule { + id: string; + name: string; + condition: string; + desc: string; + analogy: string; + interactiveMode: 'HOLE' | 'JUMP' | 'CONTINUOUS'; +} + +const continuityRules: ContinuityRule[] = [ + { + id: 'rule1', + name: '1. Point Exists', + condition: 'f(c) \\text{ is defined}', + desc: 'The function must actually have a value at x = c. There cannot be a hole with no filled point.', + analogy: "Like a bridge having a specific plank to step on at the center. If the plank is missing, you can't cross.", + interactiveMode: 'HOLE' + }, + { + id: 'rule2', + name: '2. Limit Exists', + condition: '\\lim_{x \\to c} f(x) \\text{ exists}', + desc: 'The left-hand path and the right-hand path must meet at the same location. No jumps allowed.', + analogy: "Two road crews building a bridge from opposite sides must meet at the same height.", + interactiveMode: 'JUMP' + }, + { + id: 'rule3', + name: '3. Agreement', + condition: '\\lim_{x \\to c} f(x) = f(c)', + desc: 'The value of the limit must equal the actual function value. The "bridge plank" must be exactly where the road ends, not floating above.', + analogy: "The pothole (limit) must be perfectly filled by the asphalt patch (point).", + interactiveMode: 'CONTINUOUS' + } +]; + +export const ContinuityView: React.FC = () => { + const [activeRuleId, setActiveRuleId] = useState('rule3'); + const [pointY, setPointY] = useState(2); // Initial broken state + + const activeRule = continuityRules.find(r => r.id === activeRuleId) || continuityRules[0]; + + // Simulation Constants + const holeX = 2; + const limitVal = 4; + const width = 600; + const height = 300; + const scaleX = (x: number) => ((x + 2) / 8) * width; + const scaleY = (y: number) => height - ((y) / 8) * height; + + // Visual States based on Interactive Mode + // If Mode is JUMP, we offset the right line + const rightLineOffset = activeRule.interactiveMode === 'JUMP' ? 2 : 0; + + const lineLeft = `M ${scaleX(-2)} ${scaleY(0)} L ${scaleX(holeX - 0.1)} ${scaleY(limitVal - 0.1)}`; + const lineRight = `M ${scaleX(holeX + 0.1)} ${scaleY(limitVal - 0.1 + rightLineOffset)} L ${scaleX(6)} ${scaleY(8 + rightLineOffset)}`; + + // Status Checks + const pointExists = true; // In this sim, we always draw the point + const limitExists = activeRule.interactiveMode !== 'JUMP'; + const match = Math.abs(pointY - limitVal) < 0.2; + + const isCurrentlyContinuous = pointExists && limitExists && match; + + return ( +
+
+

Continuity & Limits

+

+ The three fundamental laws that determine if a function is continuous at a point x = c. +

+
+ +
+ + {/* Left: Rules List */} +
+ {continuityRules.map((rule) => ( + + ))} +
+ + {/* Right: Detail View */} +
+ + +
+ + {/* Top: Definition */} +
+ +

+ {activeRule.desc} +

+
+ + {/* Middle: Analogy */} +
+
+ +
+
+

Real World Analogy

+

"{activeRule.analogy}"

+
+
+ + {/* Bottom: Interactive Repair Lab */} +
+
+

+ Repair Lab +

+
+ {isCurrentlyContinuous ? : } + {isCurrentlyContinuous ? 'Function Continuous' : 'Discontinuity Detected'} +
+
+ +
+ + {/* Grid Lines */} + + + + {/* Curve Segments */} + + + + {/* The Hole (Limit Location) */} + {limitExists && ( + + )} + + {/* The Point (User Controlled) */} + + + +
+ f(2) = {pointY.toFixed(1)} +
+
+ +
+ Adjust f(2): + setPointY(parseFloat(e.target.value))} + className="flex-1 h-1.5 bg-slate-700 rounded-lg appearance-none cursor-pointer accent-cyan-500" + /> +
+
+ +
+
+
+
+ +
+ ); +}; \ No newline at end of file diff --git a/views/DashboardView.tsx b/views/DashboardView.tsx new file mode 100644 index 0000000..4e910fa --- /dev/null +++ b/views/DashboardView.tsx @@ -0,0 +1,304 @@ +import React, { useEffect, useMemo, useRef, useState } from 'react'; +import { + motion, + useMotionValue, + useReducedMotion, + useSpring, + useTransform, +} from 'framer-motion'; +import { ModuleType } from '../types'; +import { + Activity, + AreaChart, + ArrowRight, + Command, + Divide, + Dna, + GraduationCap, + Grid3X3, + Infinity as InfinityIcon, + Layers, + Play, + Search, + TrendingUp, +} from 'lucide-react'; +import { + getLearningDestination, + LearningDestination, + LearningDestinationRef, + searchLearningDestinations, +} from '../data/learningCatalog'; +import { + BRAND_DESCRIPTION, + BRAND_NAME, + BRAND_TAGLINE, +} from '../data/branding'; + +interface ModuleConfig { + id: ModuleType; + title: string; + subtitle: string; + icon: React.ComponentType<{ size?: number; className?: string }>; + color: string; + gradient: string; + desc: string; +} + +const modules: ModuleConfig[] = [ + { id: ModuleType.MATRIX, title: 'Matrix', subtitle: 'Linear Algebra', icon: Grid3X3, color: 'text-accent-cyan', gradient: 'from-accent-cyan/20 to-accent-blue/20', desc: 'Systems, determinants and vector spaces.' }, + { id: ModuleType.SEQUENCES, title: 'Sequences', subtitle: 'Discrete Math', icon: TrendingUp, color: 'text-accent-purple', gradient: 'from-accent-purple/20 to-accent-pink/20', desc: 'Limits, convergence and infinite series.' }, + { id: ModuleType.FUNCTIONS, title: 'Functions', subtitle: 'Analysis I', icon: Activity, color: 'text-accent-pink', gradient: 'from-accent-pink/20 to-red-600/20', desc: 'Domains, ranges, graphs and transformations.' }, + { id: ModuleType.LIMITS, title: 'Limits', subtitle: 'Foundations', icon: InfinityIcon, color: 'text-orange-400', gradient: 'from-orange-500/20 to-amber-600/20', desc: 'Continuity, asymptotes and local behavior.' }, + { id: ModuleType.DERIVATIVES, title: 'Derivatives', subtitle: 'Calculus I', icon: Divide, color: 'text-teal-400', gradient: 'from-teal-500/20 to-emerald-600/20', desc: 'Rates of change, approximation and optimization.' }, + { id: ModuleType.INTEGRALS, title: 'Integrals', subtitle: 'Calculus II', icon: AreaChart, color: 'text-emerald-400', gradient: 'from-emerald-500/20 to-green-600/20', desc: 'Area, volume and accumulated change.' }, + { id: ModuleType.DIFF_EQ, title: 'Diff Eq', subtitle: 'Modeling', icon: Layers, color: 'text-indigo-400', gradient: 'from-indigo-500/20 to-violet-600/20', desc: 'Growth, decay and biological dynamics.' }, + { id: ModuleType.EXAMS, title: 'Exams', subtitle: 'Assessment', icon: GraduationCap, color: 'text-white', gradient: 'from-slate-700/50 to-slate-800/50', desc: 'Practice, evaluate and review your performance.' }, +]; + +interface CardProps { + module: ModuleConfig; + onSelect: (module: ModuleType) => void; + index: number; +} + +const CompactCard: React.FC = ({ module, onSelect, index }) => { + const Icon = module.icon; + const shouldReduceMotion = useReducedMotion(); + + return ( + onSelect(module.id)} + className="relative overflow-hidden rounded-2xl p-4 text-left glass-card hover:bg-white/5 transition-colors group min-h-[140px] flex flex-col justify-between" + aria-label={`Open ${module.title} module`} + > +
+
+
+ +
+
+
+

{module.title}

+

{module.subtitle}

+
+ + ); +}; + +const DesktopCard: React.FC = ({ module, onSelect, index }) => { + const Icon = module.icon; + const ref = useRef(null); + const shouldReduceMotion = useReducedMotion(); + const x = useMotionValue(0); + const y = useMotionValue(0); + const mouseX = useSpring(x, { stiffness: 500, damping: 100 }); + const mouseY = useSpring(y, { stiffness: 500, damping: 100 }); + const rotateX = useTransform(mouseY, [-0.5, 0.5], ['17.5deg', '-17.5deg']); + const rotateY = useTransform(mouseX, [-0.5, 0.5], ['-17.5deg', '17.5deg']); + + const handleMouseMove = (event: React.MouseEvent) => { + if (!ref.current || shouldReduceMotion) return; + const rect = ref.current.getBoundingClientRect(); + x.set((event.clientX - rect.left) / rect.width - 0.5); + y.set((event.clientY - rect.top) / rect.height - 0.5); + }; + + const resetTilt = () => { + x.set(0); + y.set(0); + }; + + return ( + onSelect(module.id)} + onMouseMove={handleMouseMove} + onMouseLeave={resetTilt} + onBlur={resetTilt} + style={shouldReduceMotion ? undefined : { rotateX, rotateY, transformStyle: 'preserve-3d' }} + className="group relative h-full w-full rounded-[2rem] border border-white/10 bg-slate-900/20 backdrop-blur-sm p-8 text-left transition-colors hover:border-white/20 hover:bg-slate-900/40 perspective-1000" + aria-label={`Open ${module.title} module`} + > +
+
+
+
+ +
+

{module.title}

+

{module.subtitle}

+
+
+

{module.desc}

+
+ +
+
+
+ + ); +}; + +interface LearningSearchProps { + onNavigate: (destination: LearningDestinationRef) => void; +} + +const LearningSearch: React.FC = ({ onNavigate }) => { + const [query, setQuery] = useState(''); + const inputRef = useRef(null); + const results = useMemo(() => searchLearningDestinations(query), [query]); + const showResults = query.trim().length > 0; + + useEffect(() => { + const handleShortcut = (event: KeyboardEvent) => { + const target = event.target as HTMLElement | null; + const isTyping = target?.tagName === 'INPUT' || target?.tagName === 'TEXTAREA' || target?.isContentEditable; + + if (event.key === '/' && !isTyping) { + event.preventDefault(); + inputRef.current?.focus(); + } + + if (event.key === 'Escape' && document.activeElement === inputRef.current) { + setQuery(''); + inputRef.current?.blur(); + } + }; + + window.addEventListener('keydown', handleShortcut); + return () => window.removeEventListener('keydown', handleShortcut); + }, []); + + const selectResult = (destination: LearningDestination) => { + setQuery(''); + onNavigate(destination); + }; + + return ( +
+ +
+
+ + {showResults && ( +
+ {results.length > 0 ? results.map((result) => ( + + )) : ( +
+

No matching learning topic

+

Try a concept, method or biological application.

+
+ )} +
+ )} +
+ ); +}; + +interface DashboardProps { + onSelectModule: (module: ModuleType) => void; + onNavigate: (destination: LearningDestinationRef) => void; + lastDestination: LearningDestinationRef | null; +} + +export const DashboardView: React.FC = ({ onSelectModule, onNavigate, lastDestination }) => { + const shouldReduceMotion = useReducedMotion(); + const resumeDestination = getLearningDestination(lastDestination); + + return ( +
+
+ +
+
+ + +
+
+

{BRAND_TAGLINE}

+

{BRAND_NAME}

+
+
+

+ {BRAND_DESCRIPTION} Search a concept or enter a module to learn through careful observation and interaction. +

+
+ +
+ + {resumeDestination ? ( + + ) : ( +
Your most recently opened topic will appear here.
+ )} +
+ +
+ {modules.map((module, index) => )} +
+ +
+ {modules.map((module, index) => )} +
+
+
+ ); +}; diff --git a/views/DerivativesRulesView.tsx b/views/DerivativesRulesView.tsx new file mode 100644 index 0000000..d2e9a27 --- /dev/null +++ b/views/DerivativesRulesView.tsx @@ -0,0 +1,212 @@ +import React, { useState } from 'react'; +import { motion, AnimatePresence } from 'framer-motion'; +import { Divide, Zap, BookOpen, ArrowRight, Lightbulb, Activity, Layers } from 'lucide-react'; +import { WolframHelper } from '../components/WolframHelper'; +import { MathRenderer } from '../components/MathRenderer'; + +interface Rule { + id: string; + name: string; + formula: string; + desc: string; + analogy: string; + breakdown: { term: string, meaning: string, color: string }[]; + example: { problem: string, solution: string }; +} + +const rules: Rule[] = [ + { + id: 'def', + name: "Definition of Derivative", + formula: "f'(x) = \\lim_{\\Delta x \\to 0} \\frac{f(x + \\Delta x) - f(x)}{\\Delta x}", + desc: "The fundamental measure of instantaneous change. Geometrically, it represents the slope of the tangent line at a specific point.", + analogy: "Like a speedometer in a car. It tells you your exact speed at a specific instant, not just the average speed over the whole trip.", + breakdown: [ + { term: "f(x + \\Delta x) - f(x)", meaning: "Change in Output (Rise)", color: "text-cyan-400" }, + { term: "\\Delta x", meaning: "Change in Input (Run)", color: "text-purple-400" }, + { term: "\\lim", meaning: "Approaching Zero Interval", color: "text-emerald-400" } + ], + example: { problem: "f(x) = x^2", solution: "2x" } + }, + { + id: 'power', + name: "Power Rule", + formula: "\\frac{d}{dx}(x^n) = n \\cdot x^{n-1}", + desc: "Used for polynomials. You bring the exponent down as a multiplier and subtract one from the power.", + analogy: "Think of it as 'demoting' the power. A cubic function becomes quadratic, a quadratic becomes linear.", + breakdown: [ + { term: "n", meaning: "Original Exponent becomes Multiplier", color: "text-pink-400" }, + { term: "n-1", meaning: "Power reduces by one degree", color: "text-orange-400" } + ], + example: { problem: "\\frac{d}{dx}(x^4)", solution: "4x^3" } + }, + { + id: 'product', + name: "Product Rule", + formula: "(f \\cdot g)' = f'g + fg'", + desc: "Derivative of two multiplied functions. It's NOT just f' times g'. It's the 'first times derivative of second plus second times derivative of first'.", + analogy: "Imagine tracking the growth of a rectangular garden where both Length (f) and Width (g) are expanding simultaneously.", + breakdown: [ + { term: "f'g", meaning: "Growth due to change in first function", color: "text-cyan-400" }, + { term: "fg'", meaning: "Growth due to change in second function", color: "text-purple-400" } + ], + example: { problem: "(x^2)(\\sin x)", solution: "2x\\sin x + x^2\\cos x" } + }, + { + id: 'chain', + name: "Chain Rule", + formula: "\\frac{d}{dx}f(g(x)) = f'(g(x)) \\cdot g'(x)", + desc: "Used for composition functions (functions inside functions). Differentiate the outer layer, keep inner same, multiply by derivative of inner.", + analogy: "Like peeling an onion. You have to peel the outer layer (f) before you can deal with the inner layer (g).", + breakdown: [ + { term: "f'(g(x))", meaning: "Outer Derivative (Inner unchanged)", color: "text-emerald-400" }, + { term: "g'(x)", meaning: "Inner Derivative (Chain)", color: "text-rose-400" } + ], + example: { problem: "\\sin(x^3)", solution: "\\cos(x^3) \\cdot 3x^2" } + }, + { + id: 'quotient', + name: "Quotient Rule", + formula: "\\left(\\frac{f}{g}\\right)' = \\frac{f'g - fg'}{g^2}", + desc: "Derivative of division. Mnemonic: 'Low d-High minus High d-Low, over Low Low'.", + analogy: "Measuring the rate of change of a ratio, like population density (People / Area) where both change over time.", + breakdown: [ + { term: "f'g - fg'", meaning: "Opposing rates of change", color: "text-cyan-400" }, + { term: "g^2", meaning: "Normalization factor", color: "text-slate-400" } + ], + example: { problem: "\\frac{x}{e^x}", solution: "\\frac{1\\cdot e^x - x\\cdot e^x}{(e^x)^2}" } + } +]; + +export const DerivativesRulesView: React.FC = () => { + const [activeRule, setActiveRule] = useState(rules[0]); + + return ( +
+
+

Differentiation Codex

+

+ The fundamental laws of Calculus. Select a rule to explore its mechanism, geometric meaning, and application. +

+
+ +
+ + {/* Left: Rule Selector */} +
+ {rules.map((rule) => ( + + ))} +
+ + {/* Right: Active Rule Lab */} +
+ + + {/* Background Noise */} +
+ + {/* Formula Display */} +
+
+ LaTeX +
+ +
+ + {/* Breakdown & Analogy Grid */} +
+ + {/* Anatomy */} +
+

+ Formula Anatomy +

+
+ {activeRule.breakdown.map((item, idx) => ( +
+
+
+
+ +
+

{item.meaning}

+
+
+ ))} +
+
+ + {/* Intuition */} +
+

+ Intuition & Analogy +

+
+ "{activeRule.analogy}" +
+

+ {activeRule.desc} +

+
+
+ + {/* Live Example */} +
+

+ Worked Example +

+
+
+ Problem: +
+ +
+
+ +
+
+
+ +
+
+
+
+ + +
+ ); +}; \ No newline at end of file diff --git a/views/DeterminantView.tsx b/views/DeterminantView.tsx new file mode 100644 index 0000000..6677608 --- /dev/null +++ b/views/DeterminantView.tsx @@ -0,0 +1,231 @@ + +import React, { useState, useMemo } from 'react'; +import { MatrixInput } from '../components/MatrixInput'; +import { createMatrix, getDeterminant, fmt } from '../utils/matrixMath'; +import { motion, AnimatePresence } from 'framer-motion'; +import { WolframHelper } from '../components/WolframHelper'; +import { Grid3X3, Play, Activity, Scan, HelpCircle, Layers, X, Plus, MoveDownRight, MoveUpRight } from 'lucide-react'; +import { usePersistedState } from '../utils/usePersistedState'; + +export const DeterminantView: React.FC = () => { + const [matrix, setMatrix] = usePersistedState('det_matrix', [ + [5, 3, -1], + [2, 0, 4], + [-3, 6, 2] + ]); + + const [hoveredDiagonal, setHoveredDiagonal] = useState<'main1' | 'main2' | 'main3' | 'anti1' | 'anti2' | 'anti3' | null>(null); + + const det = useMemo(() => getDeterminant(matrix), [matrix]); + + // Sarrus Diagonals Logic (Only valid for 3x3) + const is3x3 = matrix.length === 3 && matrix[0].length === 3; + + // Helper to determine if a cell is in a diagonal + const isInDiagonal = (r: number, c: number, type: string | null) => { + if (!is3x3 || !type) return false; + // Extended indices logic for visual wrap-around could be complex, + // but let's stick to standard Sarrus indices: + // Main 1: (0,0), (1,1), (2,2) + // Main 2: (0,1), (1,2), (2,0) (Wrapped) + // Main 3: (0,2), (1,0), (2,1) (Wrapped) + + const indices: Record = { + 'main1': ['0-0', '1-1', '2-2'], + 'main2': ['0-1', '1-2', '2-0'], + 'main3': ['0-2', '1-0', '2-1'], + 'anti1': ['0-2', '1-1', '2-0'], + 'anti2': ['0-0', '1-2', '2-1'], + 'anti3': ['0-1', '1-0', '2-2'], + }; + + return indices[type]?.includes(`${r}-${c}`); + }; + + return ( +
+
+
+

Determinant Analysis

+

+ The geometric scaling factor of a linear transformation.
+ det(A) = 0 implies dimension loss (singular matrix). +

+
+
+ + Status: {det === 0 ? 'Singular' : 'Invertible'} +
+
+ +
+ + {/* Left: Input & Sarrus Visualizer */} +
+
+ + {/* Background Grid Pattern */} +
+ +
+
+ Matrix A Input +
+ + {/* Interactive Matrix Wrapper */} +
+ {/* SVG Overlay for Lines */} + {is3x3 && hoveredDiagonal && ( + + {/* Simple predefined paths based on standard matrix visual size - conceptual */} + {/* This is a visual enhancement, precise coordinates depend on DOM, so we use CSS highlights on cells instead for robustness */} + + )} + + {/* Render Custom Matrix Input with Highlights */} +
+ {matrix.map((row, r) => ( + row.map((val, c) => { + const isActive = isInDiagonal(r, c, hoveredDiagonal); + const isMain = hoveredDiagonal?.startsWith('main'); + return ( +
+ { + const v = parseFloat(e.target.value); + if (!isNaN(v) || e.target.value === '' || e.target.value === '-') { + const m = [...matrix]; + m[r][c] = isNaN(v) ? 0 : v; // Simple handler + setMatrix(m); + } + }} + /> +
+ ); + }) + ))} +
+
+ + {/* Sarrus Controls */} + {is3x3 ? ( +
+
Sarrus Rule Visualizer
+
+
+
Positive Diagonals
+
+ {['main1', 'main2', 'main3'].map((d, i) => ( + + ))} +
+
+
-
+
+
Negative Diagonals
+
+ {['anti1', 'anti2', 'anti3'].map((d, i) => ( + + ))} +
+
+
+
+ ) : ( +
+ Sarrus visualization available for 3x3 matrices. +
+ )} + +
+
+
+ + {/* Right: Result & Meaning */} +
+ + {/* Result Card */} +
+
+ +

Computed Determinant

+ + +
+ {det !== null ? fmt(det) : "Err"} +
+
+ +
+ {det === 0 ? ( + + Volume Collapsed (Singular) + + ) : ( + + Volume Preserved (Invertible) + + )} +
+
+ + {/* Concepts */} +
+
+

+ + Geometric Interpretation +

+

+ The determinant represents the signed volume of the parallelepiped formed by the column vectors of the matrix. +

+
+ +
+

+ + Laplace Expansion +

+

+ Recursive method: det(A) = ฮฃ (-1)โฑโบสฒ ยท aแตขโฑผ ยท Mแตขโฑผ. + Useful for matrices larger than 3x3. +

+
+
+ +
+ +
+ + +
+ ); +}; diff --git a/views/DiffEq3DView.tsx b/views/DiffEq3DView.tsx new file mode 100644 index 0000000..efaa854 --- /dev/null +++ b/views/DiffEq3DView.tsx @@ -0,0 +1,69 @@ + +import React, { useMemo, useRef } from 'react'; +import { Canvas, useFrame } from '@react-three/fiber'; +import { OrbitControls, Line } from '@react-three/drei'; +import * as THREE from 'three'; +import { Globe } from 'lucide-react'; + +const LorenzSystem = () => { + const lineRef = useRef(null); + + // Lorenz Parameters + const sigma = 10; + const rho = 28; + const beta = 8/3; + const dt = 0.01; + + // Precompute trajectory + const points = useMemo(() => { + const pts = []; + let x = 0.1, y = 0, z = 0; + for(let i=0; i<3000; i++) { + const dx = sigma * (y - x); + const dy = x * (rho - z) - y; + const dz = x * y - beta * z; + x += dx * dt; + y += dy * dt; + z += dz * dt; + pts.push(new THREE.Vector3(x, y, z)); + } + return pts; + }, []); + + useFrame((state) => { + if (lineRef.current) { + lineRef.current.rotation.y += 0.002; + } + }); + + return ( + + + + ); +} + +export const DiffEq3DView: React.FC = () => { + return ( +
+
+
+

+ Lorenz Attractor +

+

+ A chaotic system of differential equations. Small changes in initial conditions lead to vastly different trajectories (Butterfly Effect). +

+
+
+ +
+ + + + + +
+
+ ); +}; diff --git a/views/DiffEqBasicsView.tsx b/views/DiffEqBasicsView.tsx new file mode 100644 index 0000000..8d03a32 --- /dev/null +++ b/views/DiffEqBasicsView.tsx @@ -0,0 +1,182 @@ +import React, { useState } from 'react'; +import { motion } from 'framer-motion'; +import { MathRenderer } from '../components/MathRenderer'; +import { Microscope, ArrowRight, Lightbulb } from 'lucide-react'; + +export const DiffEqBasicsView: React.FC = () => { + const [C, setC] = useState(0); + const [x0, setX0] = useState(0); + const [y0, setY0] = useState(4); // Match PDF example y(0)=4 + + const width = 600; + const height = 400; + const domain = { x: [-2, 2], y: [-2, 20] }; + + const scaleX = (x: number) => ((x - domain.x[0]) / (domain.x[1] - domain.x[0])) * width; + const scaleY = (y: number) => height - ((y - domain.y[0]) / (domain.y[1] - domain.y[0])) * height; + + // Example from PDF: y' = 2y => y = C * e^(2x) + const f = (x: number, constant: number) => constant * Math.exp(2 * x); + + // Calculate C based on point (x0, y0) -> y0 = C * e^(2*x0) -> C = y0 / e^(2*x0) + const solvedC = y0 / Math.exp(2 * x0); + + const generatePath = (constant: number) => { + let path = ""; + const step = 0.05; + for (let x = domain.x[0]; x <= domain.x[1]; x += step) { + const y = f(x, constant); + const sx = scaleX(x); + const sy = scaleY(y); + // Clamp for drawing + if (y > domain.y[1] || y < domain.y[0]) { + if (path === "") { path += `M ${sx} ${Math.max(0, Math.min(height, sy))}`; } + continue; + } + if (path === "") path += `M ${sx} ${sy}`; + else path += ` L ${sx} ${sy}`; + } + return path; + }; + + return ( +
+
+

First-Order Differential Equations

+

+ An equation relating a function to its derivative . +
+ General Solution represents a family of curves. Particular Solution passes through a specific point. +

+
+ +
+ + {/* Concepts */} +
+
+

+ The Problem +

+
+ +

Find a function that grows at twice its current size.

+
+

+ By rearranging to and integrating both sides: +

+
+
โˆซ (1/y) dy = โˆซ 2 dx
+
ln|y| = 2x + C
+
y = C ยท e^{"2x"}
+
+
+ +
+

+ Initial Conditions +

+

+ To find the specific curve (Particular Solution), we need a point . +

+
+
+ Condition + y({x0}) = {y0} +
+
+ Result C + {y0} = Cยทe^{2(0)} โ†’ C = {solvedC.toFixed(2)} +
+
+
+
+ + {/* Visualizer */} +
+
+ +
+ Solution Family +
+ y = Cยทe^{2x} +
+
+ +
+ + {/* Axes */} + + + + {/* Ghost Curves (Family) */} + {[-2, -1, 0.5, 1, 3, 5].map((cVal, i) => ( + + ))} + + {/* Active General Solution (Manual Slider) */} + + + {/* Particular Solution (Calculated) */} + + + {/* The Point */} + + +
+ +
+
+ + setC(parseFloat(e.target.value))} + className="w-full h-2 bg-slate-800 rounded-lg appearance-none cursor-pointer accent-cyan-500" + /> +
+ +
+
+ + setY0(parseFloat(e.target.value))} + className="w-full bg-slate-800 border border-slate-700 rounded p-2 text-white font-mono focus:border-purple-500 outline-none" + /> +
+
+ + Particular Solution: y = {solvedC.toFixed(2)}e^{2x} + +
+
+
+
+ +
+
+ ); +}; \ No newline at end of file diff --git a/views/EigenView.tsx b/views/EigenView.tsx new file mode 100644 index 0000000..80d8705 --- /dev/null +++ b/views/EigenView.tsx @@ -0,0 +1,130 @@ +import React, { useState, useMemo } from 'react'; +import { MatrixInput } from '../components/MatrixInput'; +import { getDeterminant, getTrace, getEigenvalues2x2, fmt } from '../utils/matrixMath'; +import { motion } from 'framer-motion'; +import { Network, Scaling } from 'lucide-react'; + +export const EigenView: React.FC = () => { + // Default matrix that yields nice integer eigenvalues (4 and 1) + const [matrix, setMatrix] = useState([ + [4, 1], + [2, 3] + ]); + + const tr = useMemo(() => getTrace(matrix), [matrix]); + const det = useMemo(() => getDeterminant(matrix), [matrix]); + const eigens = useMemo(() => getEigenvalues2x2(matrix), [matrix]); + + // Characteristic Equation parts + const b = tr !== null ? -tr : 0; + const c = det !== null ? det : 0; + + return ( +
+
+

Eigenvalues (Stability)

+

+ Eigenvalues (ฮป) are the "scaling factors" of the matrix. They determine whether a dynamic system grows, decays, or rotates. +
Calculated via characteristic equation: det(A - ฮปI) = 0. +

+
+ +
+ +
+
+
INPUT A
+ +
+ +
+
+ Trace (Tr) +
{tr !== null ? fmt(tr) : '-'}
+
+
+ Determinant +
{det !== null ? fmt(det) : '-'}
+
+
+
+ +
+ {/* Educational Insight Card */} +
+
+ +
+
+

Geometric Meaning

+

+ When Matrix A acts on a vector, it usually rotates and stretches it. + Eigenvectors are the special directions that do not rotateโ€”they only get stretched by the factor ฮป (Eigenvalue). +

+
+
+ + +

+ + Characteristic Equation +

+
+ ฮปยฒ {b >= 0 ? '+' : '-'} {Math.abs(b).toFixed(2)}ฮป {c >= 0 ? '+' : '-'} {Math.abs(c).toFixed(2)} = 0 +
+

Derived from: ฮปยฒ - Tr(A)ฮป + det(A) = 0

+
+ + +

+ + Results (Roots) +

+ + {eigens ? ( +
+
+
ฮปโ‚
+
{fmt(eigens.l1)}
+
+
+
+
ฮปโ‚‚
+
{fmt(eigens.l2)}
+
+
+ ) : ( +
+ Complex roots (Rotation without scaling on real axes). +
+ )} +
+ +
+

Stability Interpretation

+

+ {eigens && Math.abs(Math.max(Math.abs(eigens.l1), Math.abs(eigens.l2))) > 1 + ? "The dominant eigenvalue magnitude is > 1. The system is expanding and may become unstable." + : "The dominant eigenvalue magnitude is < 1. The system will decay towards zero or stabilize."} +

+
+
+ +
+
+ ); +}; \ No newline at end of file diff --git a/views/ExamAnalysisView.tsx b/views/ExamAnalysisView.tsx new file mode 100644 index 0000000..e2b5d51 --- /dev/null +++ b/views/ExamAnalysisView.tsx @@ -0,0 +1,294 @@ + +import React, { useMemo } from 'react'; +import { motion } from 'framer-motion'; +import { PieChart, CheckCircle2, AlertTriangle, BookOpen, Brain, Activity, Clock, Trash2, Trophy } from 'lucide-react'; +import { getExamPerformance, getQuestionStatus, resetExamData } from '../utils/examStorage'; +import { questionBank, examTopics } from '../data/examQuestions'; +import { ModuleType } from '../types'; + +export const ExamAnalysisView: React.FC = () => { + const performance = getExamPerformance(); + + // Calculate aggregated statistics + const stats = useMemo(() => { + let totalAttempts = 0; + let totalCorrect = 0; + let totalIncorrect = 0; + let masteredCount = 0; + let learningCount = 0; + let unseenCount = 0; + let totalQuestions = 0; + + // Topic stats + const topicStats: Record = {}; + + examTopics.forEach(t => { + topicStats[t.id] = { total: 0, attempted: 0, correct: 0, mastered: 0 }; + }); + + // Iterate by module to ensure correct topic attribution + Object.entries(questionBank).forEach(([moduleId, questions]) => { + if (!questions) return; + const topicId = moduleId as ModuleType; + + questions.forEach(q => { + totalQuestions++; + const qStats = performance[q.id]; + const status = getQuestionStatus(qStats); + + // Populate total count for topic + if (topicStats[topicId]) { + topicStats[topicId].total++; + } + + if (status === 'UNSEEN') { + unseenCount++; + } else if (qStats) { + learningCount += (status === 'LEARNING' ? 1 : 0); + masteredCount += (status === 'MASTERED' ? 1 : 0); + + totalAttempts += (qStats.correct + qStats.incorrect); + totalCorrect += qStats.correct; + totalIncorrect += qStats.incorrect; + + if (topicStats[topicId]) { + topicStats[topicId].attempted++; + topicStats[topicId].correct += qStats.correct; + if (status === 'MASTERED') topicStats[topicId].mastered++; + } + } + }); + }); + + const masteryPercentage = totalQuestions > 0 ? Math.round((masteredCount / totalQuestions) * 100) : 0; + const learningPercentage = totalQuestions > 0 ? Math.round((learningCount / totalQuestions) * 100) : 0; + + // Identify weakest topic (lowest mastery percentage among attempted) + let weakestTopic = null; + let minMastery = 101; + + Object.entries(topicStats).forEach(([tid, val]) => { + // Explicitly cast to ensure type safety in environment where Object.entries returns unknown values + const tStat = val as { total: number, attempted: number, correct: number, mastered: number }; + if (tStat.attempted > 0) { + const mastery = (tStat.mastered / tStat.total) * 100; + if (mastery < minMastery) { + minMastery = mastery; + weakestTopic = examTopics.find(t => t.id === tid); + } + } + }); + + return { + totalQuestions, + masteredCount, + learningCount, + unseenCount, + masteryPercentage, + learningPercentage, + topicStats, + weakestTopic, + totalAttempts + }; + }, [performance]); + + const handleReset = () => { + if (window.confirm("Are you sure you want to reset all progress? This cannot be undone.")) { + resetExamData(); + window.location.reload(); + } + }; + + return ( +
+
+
+

+ Performance Analysis +

+

+ Long-term tracking of your mastery across all modules. Based on correct answer streaks and error rates. +

+
+ +
+ + {/* Overview Cards */} +
+ {/* Mastery Card - Enhanced Visuals */} + +
+ +
+ Global Mastery +
+ +
+ + + + = 80 ? "#10b981" : stats.masteryPercentage >= 50 ? "#3b82f6" : "#f59e0b"} /> + = 80 ? "#34d399" : stats.masteryPercentage >= 50 ? "#60a5fa" : "#fbbf24"} /> + + + + {/* Track Background */} + + + + {/* Progress Indicator */} + + + +
+ + {stats.masteryPercentage}% + +
+
+ +
+ +
+ {stats.masteredCount} Mastered + + +
+ {stats.learningCount} Learning + +
+ + + {/* Activity Card */} + +
+
+ Activity Log +
+
+
+ Total Attempts + {stats.totalAttempts} +
+
+ Questions Exposed +
+ + {stats.totalQuestions - stats.unseenCount} + + + OUT OF {stats.totalQuestions} + +
+
+
+
+
+
0 ? ((stats.totalQuestions - stats.unseenCount)/stats.totalQuestions)*100 : 0}%` }} /> +
+ + + {/* Insight Card */} + +
+ Focus Area +
+ {stats.weakestTopic ? ( +
+
+
{stats.weakestTopic.label}
+
+

+ This topic has the lowest mastery rate among those you've attempted. +

+
+
+ Recommendation: Review Concept Drills or check the Cheat Sheet. +
+
+ ) : ( +
+
+ +
+ Start solving questions to generate insights. +
+ )} +
+
+ + {/* Topic Breakdown */} +
+ {Object.entries(stats.topicStats).map(([tid, val], idx) => { + const topicInfo = examTopics.find(t => t.id === tid); + // Cast to correct type as iterator value might be inferred as unknown + const tStat = val as { total: number, attempted: number, correct: number, mastered: number }; + + if (!topicInfo) return null; + const pct = tStat.total > 0 ? Math.round((tStat.mastered / tStat.total) * 100) : 0; + + return ( + +
+ +
+
+
+

{topicInfo.label}

+ = 80 ? 'text-emerald-400' : pct >= 50 ? 'text-blue-400' : 'text-slate-400'}`}>{pct}% +
+
+ = 80 ? 'bg-emerald-500' : pct >= 50 ? 'bg-blue-500' : 'bg-slate-600'}`} + /> +
+
+ {tStat.mastered}/{tStat.total} Mastered + {tStat.attempted} Attempted +
+
+
+ ); + })} +
+
+ ); +}; diff --git a/views/ExercisesView.tsx b/views/ExercisesView.tsx new file mode 100644 index 0000000..83a6b81 --- /dev/null +++ b/views/ExercisesView.tsx @@ -0,0 +1,571 @@ + +import React, { useState } from 'react'; +import { ChevronDown, ChevronUp, Lightbulb } from 'lucide-react'; +import { motion, AnimatePresence } from 'framer-motion'; +import { ModuleType } from '../types'; +import { MathRenderer } from '../components/MathRenderer'; + +interface HomeworkViewProps { + module?: ModuleType; +} + +interface QuestionItem { + id: string | number; + text: string; + options?: string[]; // Added options support for multiple choice style + correctAnswer?: string; + solutionSteps: string[]; +} + +interface QuestionCategory { + category: string; + items: QuestionItem[]; +} + +export const HomeworkView: React.FC = ({ module }) => { + const [expandedId, setExpandedId] = useState(null); + + const toggleSolution = (id: string | number) => { + setExpandedId(expandedId === id ? null : id); + }; + + // --- DATA --- + + const matrixQuestions: QuestionCategory[] = [ + { + category: "Definitions & Dimensions", + items: [ + { + id: 'm_1', + text: "1. What is a matrix?", + options: ["A) Any sequence of numbers", "B) A rectangular array of numbers arranged in rows and columns", "C) A graph of a function"], + correctAnswer: "B", + solutionSteps: ["A matrix is defined as a rectangular array of numbers (or symbols/expressions) arranged in rows and columns."] + }, + { + id: 'm_2', + text: "2. The dimension of matrix Anร—m means:", + options: ["A) n columns and m rows", "B) n rows and m columns", "C) m rows and n columns"], + correctAnswer: "B", + solutionSteps: ["Convention: Rows ร— Columns (n ร— m)."] + }, + { + id: 'm_3', + text: "3. A square matrix is a matrix in which:", + options: ["A) n โ‰  m", "B) all elements are zeros", "C) n = m"], + correctAnswer: "C", + solutionSteps: ["Square implies equal sides, so number of rows (n) equals number of columns (m)."] + }, + { + id: 'm_4', + text: "4. The identity matrix is:", + options: ["A) a matrix with ones on the main diagonal and zeros elsewhere", "B) a matrix with all elements equal to 1", "C) the zero matrix"], + correctAnswer: "A", + solutionSteps: ["Identity matrix I has 1s on diagonal, 0s elsewhere. AI = IA = A."] + }, + { + id: 'm_6', + text: "6. A diagonal matrix is:", + options: ["A) non-zero elements only on the main diagonal", "B) ones on the diagonal", "C) zeros in the columns"], + correctAnswer: "A", + solutionSteps: ["A diagonal matrix has entries outside the main diagonal equal to zero."] + } + ] + }, + { + category: "Operations & Properties", + items: [ + { + id: 'm_7', + text: "7. To add two matrices, they must have:", + options: ["A) the same number of rows", "B) the same number of columns", "C) identical dimensions"], + correctAnswer: "C", + solutionSteps: ["Matrix addition is element-wise, so dimensions (rows and columns) must match."] + }, + { + id: 'm_8', + text: "8. The transposition of a matrix means:", + options: ["A) reversing the order of columns", "B) swapping rows and columns", "C) squaring the matrix"], + correctAnswer: "B", + solutionSteps: ["Transpose A^T swaps indices ij to ji, effectively turning rows into columns."] + }, + { + id: 'm_10', + text: "10. The product A(nร—m) * B(pร—q) exists when:", + options: ["A) n = q", "B) m = p", "C) n = p"], + correctAnswer: "B", + solutionSteps: ["Inner dimensions must match. (nร—m) * (mร—q) yields (nร—q)."] + }, + { + id: 'm_12', + text: "12. The transposition rule of a matrix product is:", + options: ["A) (AB)^T = A^T B^T", "B) (AB)^T = B^T A^T", "C) (AB)^T = AB"], + correctAnswer: "B", + solutionSteps: ["The transpose of a product is the product of transposes in reverse order."] + }, + { + id: 'm_14', + text: "14. A symmetric matrix satisfies:", + options: ["A) A = -A^T", "B) A = A^T", "C) A^T = 0"], + correctAnswer: "B", + solutionSteps: ["Symmetry means the matrix is equal to its transpose."] + } + ] + }, + { + category: "Determinants & Inverse", + items: [ + { + id: 'm_17', + text: "17. A matrix is singular when:", + options: ["A) detA โ‰  0", "B) detA = 0", "C) A^-1 exists"], + correctAnswer: "B", + solutionSteps: ["A singular matrix has a determinant of zero and no inverse."] + }, + { + id: 'm_18', + text: "18. For a 2ร—2 matrix, |A| equals:", + options: ["A) a+b+c+d", "B) ad - bc", "C) ab - cd"], + correctAnswer: "B", + solutionSteps: ["Standard formula for 2x2 determinant."] + }, + { + id: 'm_25', + text: "25. The inverse matrix exists only when:", + options: ["A) detA โ‰  0", "B) detA = 0", "C) A is rectangular"], + correctAnswer: "A", + solutionSteps: ["A non-zero determinant is required to calculate the inverse (1/detA)."] + }, + { + id: 'm_28', + text: "28. The product of determinants satisfies:", + options: ["A) det(AB) = detA + detB", "B) det(AB) = detA * detB", "C) det(AB) = 0"], + correctAnswer: "B", + solutionSteps: ["The determinant of a product is the product of the determinants."] + } + ] + }, + { + category: "Systems of Equations", + items: [ + { + id: 'm_31', + text: "31. The matrix form of a system of equations is:", + options: ["A) A + X = B", "B) A * X = B", "C) X = A + B"], + correctAnswer: "B", + solutionSteps: ["Coefficient Matrix (A) * Variable Vector (X) = Constant Vector (B)."] + }, + { + id: 'm_33', + text: "33. A Cramer's system has a solution when:", + options: ["A) detA = 0", "B) detA โ‰  0", "C) A is rectangular"], + correctAnswer: "B", + solutionSteps: ["Cramer's rule requires dividing by the main determinant W (detA), so it must be non-zero."] + }, + { + id: 'm_36', + text: "36. If W=0 and at least one Wiโ‰ 0, the system:", + options: ["A) is inconsistent (no solution)", "B) has one solution", "C) has many solutions"], + correctAnswer: "A", + solutionSteps: ["This represents a contradiction (0 * x = non-zero), so no solution exists."] + } + ] + } + ]; + + const sequenceQuestions: QuestionCategory[] = [ + { + category: "Fundamentals", + items: [ + { + id: 's_1', + text: "1. A number sequence is:", + options: ["A) a real function of two variables", "B) an assignment of one real number to each natural number", "C) an arbitrary set"], + correctAnswer: "B", + solutionSteps: ["A sequence is essentially a function f: N -> R."] + }, + { + id: 's_3', + text: "3. A sequence that has a finite limit is called:", + options: ["A) divergent", "B) convergent", "C) monotonic"], + correctAnswer: "B", + solutionSteps: ["Convergence is defined as approaching a finite limit g."] + }, + { + id: 's_8', + text: "8. An arithmetic sequence satisfies:", + options: ["A) a_{n+1} = a_n + r", "B) a_{n+1} = a_n * q", "C) a_{n+1} = a_n^2 + r"], + correctAnswer: "A", + solutionSteps: ["Terms change by adding a constant difference r."] + }, + { + id: 's_9', + text: "9. A geometric sequence satisfies:", + options: ["A) a_{n+1} = a_n + q", "B) a_{n+1} = a_n * q", "C) a_{n+1} = a_n / q"], + correctAnswer: "B", + solutionSteps: ["Terms change by multiplying by a constant ratio q."] + } + ] + }, + { + category: "Limits & Properties", + items: [ + { + id: 's_13', + text: "13. The number e (Euler's number) is the limit of:", + options: ["A) (1 + 1/n)^n", "B) 1/n", "C) sqrt(n)"], + correctAnswer: "A", + solutionSteps: ["Standard definition of e."] + }, + { + id: 's_14', + text: "14. The sequence a_n = q^n converges to zero when:", + options: ["A) |q| > 1", "B) -1 < q < 1", "C) q = 1"], + correctAnswer: "B", + solutionSteps: ["Geometric sequence converges to 0 if the absolute value of the ratio is less than 1."] + }, + { + id: 's_15', + text: "15. The theorem of three sequences (Squeeze Theorem) states that:", + options: ["A) if a_n <= b_n <= c_n and lim a_n = lim c_n = g, then lim b_n = g", "B) if a_n = b_n + c_n...", "C) if a_n > b_n..."], + correctAnswer: "A", + solutionSteps: ["If a sequence is squeezed between two others converging to the same limit, it must also converge to that limit."] + } + ] + } + ]; + + const functionQuestions: QuestionCategory[] = [ + { + category: "Domain & Properties", + items: [ + { + id: 'f_15', + text: "15. The domain of ln(x) is:", + options: ["A) (-โˆž, โˆž)", "B) (0, โˆž)", "C) (1, โˆž)"], + correctAnswer: "B", + solutionSteps: ["Logarithm is only defined for positive numbers."] + }, + { + id: 'f_42', + text: "42. The function 1/x is undefined for:", + options: ["A) x = 1", "B) x < 0", "C) x = 0"], + correctAnswer: "C", + solutionSteps: ["Division by zero is undefined."] + }, + { + id: 'f_46', + text: "46. The function e^x is:", + options: ["A) A parabola", "B) Decreasing", "C) Increasing on its entire domain"], + correctAnswer: "C", + solutionSteps: ["Exponential functions with base > 1 are strictly increasing."] + } + ] + }, + { + category: "Limits & Asymptotes", + items: [ + { + id: 'f_12', + text: "12. A vertical asymptote means:", + options: ["A) The limit equals 0", "B) The limit exists", "C) The limit tends to โˆž or -โˆž"], + correctAnswer: "C", + solutionSteps: ["Function grows unbounded near the asymptote."] + }, + { + id: 'f_34', + text: "34. A function is continuous at a point when:", + options: ["A) It has no asymptotes", "B) It is differentiable", "C) The limit equals the function value"], + correctAnswer: "C", + solutionSteps: ["Definition of continuity: lim(x->c) f(x) = f(c)."] + }, + { + id: 'f_39', + text: "39. A horizontal asymptote exists when:", + options: ["A) The derivative changes sign", "B) There is a square in denominator", "C) The limit at ยฑโˆž is finite"], + correctAnswer: "C", + solutionSteps: ["If lim(x->inf) f(x) = L, then y=L is a horizontal asymptote."] + } + ] + } + ]; + + const derivativeQuestions: QuestionCategory[] = [ + { + category: "Basic Rules", + items: [ + { + id: 'd_1', + text: "1. The derivative of a constant function equals:", + options: ["A) A positive constant", "B) The same constant", "C) 0"], + correctAnswer: "C", + solutionSteps: ["Rate of change of a constant is zero."] + }, + { + id: 'd_2', + text: "2. The derivative of x^a (for a โˆˆ R) equals:", + options: ["A) x^{a+1}", "B) ax^{a+1}", "C) ax^{a-1}"], + correctAnswer: "C", + solutionSteps: ["Power Rule: nx^{n-1}."] + }, + { + id: 'd_8', + text: "8. The derivative of a multiplication is:", + options: ["A) f'g + fg'", "B) f'g' - fg'", "C) f'g + fg'"], + correctAnswer: "A", + solutionSteps: ["Product Rule: (uv)' = u'v + uv'."] + }, + { + id: 'd_10', + text: "10. The derivative of the composition f(g(x)) is:", + options: ["A) f(x)g(x)", "B) f'g + fg'", "C) f'(g(x))g'(x)"], + correctAnswer: "C", + solutionSteps: ["Chain Rule: Outer derivative times inner derivative."] + } + ] + }, + { + category: "Analysis & Geometry", + items: [ + { + id: 'd_5', + text: "5. A necessary condition for a local extremum is:", + options: ["A) f(x)=0", "B) The function is increasing", "C) f'(x)=0"], + correctAnswer: "C", + solutionSteps: ["Fermat's Theorem: If f has a local extremum and is differentiable, f'(x)=0."] + }, + { + id: 'd_6', + text: "6. If f'(x) > 0, the function is:", + options: ["A) Constant", "B) Decreasing", "C) Increasing"], + correctAnswer: "C", + solutionSteps: ["Positive derivative implies growth."] + }, + { + id: 'd_33', + text: "33. The derivative describes:", + options: ["A) The area under the graph", "B) The limit of a function", "C) The rate of change"], + correctAnswer: "C", + solutionSteps: ["Instantaneous rate of change or slope."] + } + ] + } + ]; + + const integralQuestions: QuestionCategory[] = [ + { + category: "Indefinite Integrals", + items: [ + { + id: 'i_1', + text: "1. An antiderivative of the function f(x) is a function:", + options: ["A) continuous", "B) whose derivative equals f(x)", "C) increasing"], + correctAnswer: "B", + solutionSteps: ["F'(x) = f(x)."] + }, + { + id: 'i_3', + text: "3. The integral โˆซ x^a dx for aโ‰ โˆ’1 equals:", + options: ["A) ln|x|+C", "B) x^{a+1}+C", "C) 1/(a+1) * x^{a+1} + C"], + correctAnswer: "C", + solutionSteps: ["Power Rule for integration."] + }, + { + id: 'i_4', + text: "4. The integral โˆซ 1/x dx equals:", + options: ["A) 1/x + C", "B) ln|x| + C", "C) x + C"], + correctAnswer: "B", + solutionSteps: ["Special case of power rule where n=-1."] + }, + { + id: 'i_20', + text: "20. Integration by parts is based on the formula:", + options: ["A) (uv)'=u'v'", "B) d(uv)=udv+vdu", "C) (u+v)'=u'v'"], + correctAnswer: "B", + solutionSteps: ["Derived from the product rule of differentiation."] + } + ] + }, + { + category: "Definite Integrals", + items: [ + { + id: 'i_35', + text: "35. A definite integral is a number:", + options: ["A) always positive", "B) dependent on constant C", "C) dependent on limits of integration"], + correctAnswer: "C", + solutionSteps: ["It evaluates to a value determined by the function and the interval [a, b]."] + }, + { + id: 'i_36', + text: "36. If F'(x)=f(x), then โˆซ_a^b f(x)dx equals:", + options: ["A) F(a)-F(b)", "B) F(b)-F(a)", "C) C"], + correctAnswer: "B", + solutionSteps: ["Newton-Leibniz formula (Fundamental Theorem of Calculus)."] + }, + { + id: 'i_37', + text: "37. The area under the graph of a positive function:", + options: ["A) is equal to the definite integral", "B) is indefinite", "C) has no interpretation"], + correctAnswer: "A", + solutionSteps: ["Geometric interpretation of the definite integral."] + } + ] + } + ]; + + const diffEqQuestions: QuestionCategory[] = [ + { + category: "Differential Equations", + items: [ + { + id: 'de_62', + text: "62. A first-order differential equation is:", + options: ["A) an algebraic equation", "B) an equation containing a first derivative", "C) a quadratic equation"], + correctAnswer: "B", + solutionSteps: ["Order is determined by the highest derivative present."] + }, + { + id: 'de_65', + text: "65. The equation y'=2y is:", + options: ["A) linear/separable", "B) separable", "C) second-order"], + correctAnswer: "B", + solutionSteps: ["Can be written as dy/y = 2dx."] + }, + { + id: 'de_66', + text: "66. The method of separation of variables consists of:", + options: ["A) changing variable", "B) separating y and x onto opposite sides", "C) integration by parts"], + correctAnswer: "B", + solutionSteps: ["Group all y terms with dy and x terms with dx."] + }, + { + id: 'de_69', + text: "69. The Malthus model describes:", + options: ["A) limited growth", "B) exponential population growth", "C) decline"], + correctAnswer: "B", + solutionSteps: ["Unconstrained growth proportional to population size (y' = ky)."] + }, + { + id: 'de_71', + text: "71. The Verhulst model accounts for:", + options: ["A) reproduction only", "B) limited environmental resources", "C) mortality only"], + correctAnswer: "B", + solutionSteps: ["Logistic growth model that introduces a carrying capacity K."] + } + ] + } + ]; + + // --- LOGIC --- + + const getQuestions = () => { + switch (module) { + case ModuleType.MATRIX: return matrixQuestions; + case ModuleType.SEQUENCES: return sequenceQuestions; + case ModuleType.FUNCTIONS: return functionQuestions; + case ModuleType.LIMITS: return functionQuestions.filter(q => q.category.includes("Limits")); + case ModuleType.DERIVATIVES: return derivativeQuestions; + case ModuleType.INTEGRALS: return integralQuestions; + case ModuleType.DIFF_EQ: return diffEqQuestions; + default: return [...matrixQuestions, ...sequenceQuestions]; + } + }; + + const currentQuestions = getQuestions(); + const moduleName = module ? module.charAt(0).toUpperCase() + module.slice(1).toLowerCase().replace('_', ' ') : 'General'; + + return ( +
+
+

{moduleName} Homework

+

+ Practice problems from the lecture material. Click to reveal step-by-step solutions. +

+
+ + {currentQuestions.length === 0 ? ( +
+

No exercises available for this specific module view.

+
+ ) : ( +
+ {currentQuestions.map((section, idx) => ( +
+

+ {section.category} +

+
+ {section.items.map((item) => { + const isExpanded = expandedId === item.id; + return ( + +
toggleSolution(item.id)} + > +
+
+

{item.text}

+ + {item.options && ( +
+ {item.options.map((opt, i) => ( +
+ {opt} +
+ ))} +
+ )} +
+
+ +
+ {isExpanded ? : } +
+
+ + + {isExpanded && ( + +
+
+ Correct Answer: {item.correctAnswer} +
+
+ {item.solutionSteps.map((step, i) => ( +
+ +
+ ))} +
+
+
+ )} +
+
+ ); + })} +
+
+ ))} +
+ )} +
+ ); +}; diff --git a/views/FinalExamView.tsx b/views/FinalExamView.tsx new file mode 100644 index 0000000..79ae262 --- /dev/null +++ b/views/FinalExamView.tsx @@ -0,0 +1,579 @@ + +import React, { useState, useMemo } from 'react'; +import { ModuleType } from '../types'; +import { motion, AnimatePresence } from 'framer-motion'; +import { CheckCircle, XCircle, ChevronRight, RefreshCcw, Brain, ArrowRight, BookOpen, AlertTriangle, Trophy, BarChart2, Timer, Lock, Clock, Layers, Star, Zap, Activity, ArrowLeft } from 'lucide-react'; +import { Canvas } from '@react-three/fiber'; +import { Float, Stars, Icosahedron } from '@react-three/drei'; +import { MathRenderer } from '../components/MathRenderer'; +import { questionBank, examTopics, Question } from '../data/examQuestions'; +import { saveQuestionResult, getExamPerformance, getQuestionStatus } from '../utils/examStorage'; + +// --- 3D Result Component --- +const ResultScene: React.FC<{ score: number, total: number }> = ({ score, total }) => { + const percentage = total > 0 ? Math.round((score / total) * 100) : 0; + const color = percentage >= 80 ? "#10b981" : percentage >= 50 ? "#fbbf24" : "#ef4444"; + + return ( +
+ + + + + + + + + + + + + + + +
+
+ {percentage}% +
+
+ {score} / {total} Correct +
+
+
+ ); +}; + +// --- Main View --- + +export const FinalExamView: React.FC<{ module?: ModuleType, examMode?: string }> = ({ module, examMode }) => { + const [mode, setMode] = useState<'MENU' | 'PLAY' | 'RESULT'>('MENU'); + const [selectedTopicName, setSelectedTopicName] = useState("Full Exam"); + const [activeQuestions, setActiveQuestions] = useState([]); + + const [currentQIndex, setCurrentQIndex] = useState(0); + const [score, setScore] = useState(0); + const [selectedOption, setSelectedOption] = useState(null); + const [isAnswered, setIsAnswered] = useState(false); + const [mistakes, setMistakes] = useState([]); + + // Statistics State + const [startTime, setStartTime] = useState(0); + const [endTime, setEndTime] = useState(0); + + // Dynamic Mistake Calculation + const mistakeQuestions = useMemo(() => { + const perf = getExamPerformance(); + const allQuestions: Question[] = []; + Object.values(questionBank).forEach(qs => { + if (qs) allQuestions.push(...qs); + }); + + return allQuestions.filter(q => { + const stats = perf[q.id]; + if (!stats) return false; + const status = getQuestionStatus(stats); + // Include if strictly has errors and not yet mastered + return stats.incorrect > 0 && status !== 'MASTERED'; + }); + }, [mode]); // Re-calculate when returning to menu + + const startExam = (topicId: ModuleType | 'ALL' | 'MISTAKES') => { + let questions: Question[] = []; + const now = Date.now(); + setStartTime(now); + setEndTime(0); + + if (topicId === 'MISTAKES') { + questions = [...mistakeQuestions].sort(() => Math.random() - 0.5); + if (questions.length === 0) return; // Guard + setSelectedTopicName("Mistake Clinic"); + } else if (topicId === 'ALL') { + // Flatten all questions and inject topic + Object.entries(questionBank).forEach(([mod, qs]) => { + if (qs) { + const qsWithTopic = qs.map(q => ({ ...q, topic: mod as ModuleType })); + questions = [...questions, ...qsWithTopic]; + } + }); + // Shuffle + questions = questions.sort(() => Math.random() - 0.5); + setSelectedTopicName("Full Exam"); + } else { + const qs = questionBank[topicId] || []; + // Inject topic + questions = qs.map(q => ({ ...q, topic: topicId })); + questions = [...questions].sort(() => Math.random() - 0.5); + + const topicLabel = examTopics.find(t => t.id === topicId)?.label || "Topic"; + setSelectedTopicName(`${topicLabel} Exam`); + } + + if (questions.length === 0) { + console.log("No questions available in this module yet."); + return; + } + + setActiveQuestions(questions); + setScore(0); + setCurrentQIndex(0); + setMistakes([]); + setSelectedOption(null); + setIsAnswered(false); + setMode('PLAY'); + }; + + const handleAnswer = (key: string) => { + if (isAnswered) return; + + setSelectedOption(key); + setIsAnswered(true); + + const currentQ = activeQuestions[currentQIndex]; + const isCorrect = key === currentQ.correct; + + if (isCorrect) { + setScore(s => s + 1); + } else { + setMistakes(m => [...m, currentQ.id]); + } + + // Save result to persistent storage for analysis + saveQuestionResult(currentQ.id, isCorrect); + }; + + const handleNext = () => { + if (currentQIndex < activeQuestions.length - 1) { + setCurrentQIndex(prev => prev + 1); + setIsAnswered(false); + setSelectedOption(null); + } else { + setEndTime(Date.now()); + setMode('RESULT'); + } + }; + + // Calculate progress + const progress = activeQuestions.length > 0 ? ((currentQIndex + (isAnswered ? 1 : 0)) / activeQuestions.length) * 100 : 0; + const currentQ = activeQuestions[currentQIndex]; + const correctCount = score; + const wrongCount = mistakes.length; + + const renderMixedText = (text: string) => { + if (!text) return null; + const parts = text.split('$'); + return ( + + {parts.map((part, i) => { + if (i % 2 === 1) { + return ; + } + return ; + })} + + ); + }; + + // --- Statistics Calculations --- + const durationMs = endTime - startTime; + const minutes = Math.floor(durationMs / 60000); + const seconds = Math.floor((durationMs % 60000) / 1000); + const timeStr = `${minutes}m ${seconds}s`; + const avgTimePerQ = activeQuestions.length > 0 ? (durationMs / activeQuestions.length / 1000).toFixed(1) : '0'; + + // Grading + const percentage = activeQuestions.length > 0 ? (score / activeQuestions.length) * 100 : 0; + let grade = 'F'; + let gradeColor = 'text-red-500'; + if (percentage >= 90) { grade = 'S'; gradeColor = 'text-transparent bg-clip-text bg-gradient-to-r from-cyan-400 to-purple-400'; } + else if (percentage >= 80) { grade = 'A'; gradeColor = 'text-emerald-400'; } + else if (percentage >= 70) { grade = 'B'; gradeColor = 'text-blue-400'; } + else if (percentage >= 60) { grade = 'C'; gradeColor = 'text-orange-400'; } + + // Topic Breakdown + const topicStats: Record = {}; + activeQuestions.forEach(q => { + const t = q.topic || 'General'; + if (!topicStats[t]) topicStats[t] = { total: 0, correct: 0 }; + topicStats[t].total++; + if (!mistakes.includes(q.id)) { + topicStats[t].correct++; + } + }); + + return ( +
+ + + {mode === 'MENU' && ( + + {/* Header Section */} +
+
+ +
+

Examination Hall

+

+ Choose your challenge level. Regular practice adapts to your performance. +

+
+ + {/* Main Cards Grid */} +
+ + {/* Comprehensive Assessment Card */} + + + {/* Mistake Clinic Card (Adaptive) */} + + +
+ + {/* Topic Drills Section */} +
+
+ + Topic Drills +
+ +
+ {examTopics.map((topic) => ( + + ))} +
+
+
+ )} + + {mode === 'PLAY' && currentQ && ( + + {/* Mobile Exit Button */} +
+ +
+ + {/* Game HUD Header */} +
+
+
+
{selectedTopicName}
+
+ + {(currentQIndex + 1).toString().padStart(2, '0')} + + / {activeQuestions.length} +
+
+ + {/* HUD Stats Pill */} +
+
+ + {correctCount} +
+
+ + {wrongCount} +
+
+
+ + {/* Enhanced Progress Bar */} +
+ +
+ +
+
+ + {/* Scrollable Question & Options */} +
+
+ {/* Question Bubble - Aesthetic Refresh */} +
+
+
+ +

+ {renderMixedText(currentQ.text)} +

+
+ + {/* Options Grid/Stack */} +
+ {currentQ.options.map((opt) => { + const isSelected = selectedOption === opt.key; + const isCorrect = opt.key === currentQ.correct; + const showResult = isAnswered; + + let style = "bg-slate-900/40 border-slate-800 text-slate-400 hover:bg-slate-800 hover:border-slate-600 hover:text-slate-200"; // Default + let icon = null; + + if (showResult) { + if (isCorrect) { + style = "bg-emerald-500/10 border-emerald-500/50 text-emerald-100 shadow-[0_0_15px_rgba(16,185,129,0.1)]"; + icon = ; + } else if (isSelected && !isCorrect) { + style = "bg-red-500/10 border-red-500/50 text-red-100 shadow-[0_0_15px_rgba(239,68,68,0.1)]"; + icon = ; + } else { + style = "opacity-40 grayscale border-transparent bg-transparent"; + } + } else if (isSelected) { + style = "bg-cyan-600 border-cyan-500 text-white shadow-lg shadow-cyan-500/30 scale-[1.02]"; + } + + return ( + + ); + })} +
+
+
+ + {/* Sticky Footer for Mobile (Inline for desktop) */} + + {isAnswered && ( + +
+
+
+
+ +
+
+
+
+ Logic Breakdown +
+

+ {renderMixedText(currentQ.explanation || '')} +

+
+
+ + +
+
+ )} +
+ + )} + + {mode === 'RESULT' && ( + +

Examination Report

+ + + + {/* Stats Grid */} +
+
+
Grade
+
{grade}
+
+
+
Time
+
{timeStr}
+
+
+
Pace
+
{avgTimePerQ}s/q
+
+
+ + {/* Topic Breakdown */} +
+

+ Performance by Topic +

+
+ {Object.entries(topicStats).map(([topic, stats]) => { + const pct = Math.round((stats.correct / stats.total) * 100); + const topicName = topic.charAt(0).toUpperCase() + topic.slice(1).toLowerCase().replace('_', ' '); + return ( +
+
+ {topicName} +
+ {stats.correct}/{stats.total} + 70 ? 'text-emerald-400' : pct > 40 ? 'text-amber-400' : 'text-red-400'}>{pct}% +
+
+
+ 70 ? 'bg-emerald-500' : pct > 40 ? 'bg-amber-500' : 'bg-red-500'}`} + /> +
+
+ ) + })} +
+
+ + {mistakes.length > 0 && ( +
+

+ Review Mistakes ({mistakes.length}) +

+
+ {mistakes.map(id => { + const q = activeQuestions.find(q => q.id === id); + if(!q) return null; + return ( +
+
{renderMixedText(q.text)}
+
+ + Correct: {renderMixedText(q.options.find(o => o.key === q.correct)?.text || '')} +
+
+ ) + })} +
+
+ )} + +
+ +
+
+ )} + +
+ ); +}; diff --git a/views/FunctionAnalysisView.tsx b/views/FunctionAnalysisView.tsx new file mode 100644 index 0000000..2ce216b --- /dev/null +++ b/views/FunctionAnalysisView.tsx @@ -0,0 +1,366 @@ +import React, { useState, useRef, useEffect, useMemo } from 'react'; +import { motion } from 'framer-motion'; +import { TrendingUp, ArrowDownRight, ArrowUpRight, Move, ZoomIn } from 'lucide-react'; +import { WolframHelper } from '../components/WolframHelper'; +import * as math from 'mathjs'; +import { usePersistedState } from '../utils/usePersistedState'; + +export const FunctionAnalysisView: React.FC = () => { + const [inputStr, setInputStr] = usePersistedState('analysis_input', 'x^3 + 3x^2 - 9x - 2'); + const [mousePos, setMousePos] = useState<{x: number, y: number} | null>(null); + const svgRef = useRef(null); + const [compiledData, setCompiledData] = useState<{ f: any, df: any, dfStr: string, error: boolean }>({ f: null, df: null, dfStr: '', error: false }); + + // Zoom & Pan State - Persisted + const [domain, setDomain] = usePersistedState<{ x: [number, number], y: [number, number] }>('analysis_domain', { x: [-10, 10], y: [-20, 20] }); + const [isDragging, setIsDragging] = useState(false); + const dragStart = useRef<{ x: number, y: number }>({ x: 0, y: 0 }); + const initialDomain = useRef<{ x: [number, number], y: [number, number] }>({ x: [-10, 10], y: [-20, 20] }); + + const width = 800; + const height = 400; + const padding = 0; // Full bleed + + const scaleX = (x: number) => ((x - domain.x[0]) / (domain.x[1] - domain.x[0])) * width; + const scaleY = (y: number) => height - ((y - domain.y[0]) / (domain.y[1] - domain.y[0])) * height; + const inverseScaleX = (svgX: number) => domain.x[0] + (svgX / width) * (domain.x[1] - domain.x[0]); + const inverseScaleY = (svgY: number) => domain.y[0] + ((height - svgY) / height) * (domain.y[1] - domain.y[0]); + + // Compile function and derivative on input change + useEffect(() => { + try { + const node = math.parse(inputStr); + const compiledF = node.compile(); + + const derivNode = math.derivative(node, 'x'); + const compiledDF = derivNode.compile(); + + setCompiledData({ + f: compiledF, + df: compiledDF, + dfStr: derivNode.toString(), + error: false + }); + } catch (e) { + setCompiledData(prev => ({ ...prev, error: true })); + } + }, [inputStr]); + + const f = (x: number) => { + try { return compiledData.f ? compiledData.f.evaluate({x}) : 0; } catch { return 0; } + }; + + const df = (x: number) => { + try { return compiledData.df ? compiledData.df.evaluate({x}) : 0; } catch { return 0; } + }; + + // Find Critical Points (Simple Scan) + const criticalPoints = useMemo(() => { + if (compiledData.error || !compiledData.df) return []; + const points: { x: number, type: 'max' | 'min' | 'inflection', y: number }[] = []; + // Adjust scan step based on zoom level + const range = domain.x[1] - domain.x[0]; + const step = range / 500; + let prevSlope = df(domain.x[0]); + + for (let x = domain.x[0]; x <= domain.x[1]; x += step) { + const slope = df(x); + // Check for sign change + if ((prevSlope > 0 && slope < 0) || (prevSlope < 0 && slope > 0)) { + // Refine x + const rootX = x - step/2; + const val = f(rootX); + points.push({ + x: rootX, + y: val, + type: prevSlope > 0 ? 'max' : 'min' + }); + } + prevSlope = slope; + } + return points; + }, [compiledData, domain.x]); + + const generatePath = () => { + if (compiledData.error) return ""; + let path = ""; + const range = domain.x[1] - domain.x[0]; + const step = range / 800; // One point per pixel roughly + let isDrawing = false; + + // Render slightly outside view to ensure continuity + const startX = domain.x[0] - range * 0.1; + const endX = domain.x[1] + range * 0.1; + + for (let x = startX; x <= endX; x += step) { + const y = f(x); + + // Skip discontinuities or extreme values for drawing stability + if (isNaN(y) || Math.abs(y) > Math.max(Math.abs(domain.y[0]), Math.abs(domain.y[1])) * 10) { + isDrawing = false; + continue; + } + + const sx = scaleX(x); + const sy = scaleY(y); + + if (!isDrawing) { + path += `M ${sx} ${sy}`; + isDrawing = true; + } else { + path += ` L ${sx} ${sy}`; + } + } + return path; + }; + + // --- Interaction Handlers --- + + const handleWheel = (e: React.WheelEvent) => { + e.preventDefault(); + const zoomFactor = e.deltaY > 0 ? 1.1 : 0.9; + const rangeX = domain.x[1] - domain.x[0]; + const rangeY = domain.y[1] - domain.y[0]; + + // Zoom towards center for simplicity + const centerX = (domain.x[0] + domain.x[1]) / 2; + const centerY = (domain.y[0] + domain.y[1]) / 2; + + setDomain({ + x: [centerX - (rangeX * zoomFactor) / 2, centerX + (rangeX * zoomFactor) / 2], + y: [centerY - (rangeY * zoomFactor) / 2, centerY + (rangeY * zoomFactor) / 2] + }); + }; + + const handleMouseDown = (e: React.MouseEvent) => { + setIsDragging(true); + dragStart.current = { x: e.clientX, y: e.clientY }; + initialDomain.current = domain; + }; + + const handleMouseMove = (e: React.MouseEvent) => { + // Handle Dragging (Pan) + if (isDragging) { + const dxPixels = e.clientX - dragStart.current.x; + const dyPixels = e.clientY - dragStart.current.y; + + const rangeX = initialDomain.current.x[1] - initialDomain.current.x[0]; + const rangeY = initialDomain.current.y[1] - initialDomain.current.y[0]; + + const dxMath = -(dxPixels / width) * rangeX; + const dyMath = (dyPixels / height) * rangeY; // Invert Y for screen coords + + setDomain({ + x: [initialDomain.current.x[0] + dxMath, initialDomain.current.x[1] + dxMath], + y: [initialDomain.current.y[0] + dyMath, initialDomain.current.y[1] + dyMath] + }); + return; + } + + // Handle Hover (Trace) + if (!svgRef.current) return; + const rect = svgRef.current.getBoundingClientRect(); + const x = e.clientX - rect.left; + const mathX = inverseScaleX(x); + setMousePos({ x: mathX, y: f(mathX) }); + }; + + const handleMouseUp = () => { + setIsDragging(false); + }; + + const getTangentLine = () => { + if (!mousePos) return null; + const slope = df(mousePos.x); + const xRange = domain.x[1] - domain.x[0]; + const length = xRange * 0.15; + + const x1 = mousePos.x - length; + const y1 = mousePos.y - slope * length; + + const x2 = mousePos.x + length; + const y2 = mousePos.y + slope * length; + + return ( + + ); + }; + + return ( +
+
+

Function Analysis

+

+ Interactive graph. Scroll to zoom, drag to pan. Analyze extrema and derivatives. +

+
+ +
+ + {/* Graph Area */} +
+
+ +
+
+ f(x) = + setInputStr(e.target.value)} + className="bg-slate-950 border border-slate-700 text-white px-3 py-1 rounded-lg font-mono text-sm focus:border-cyan-500 outline-none w-full sm:w-64" + /> +
+
+
Curve +
Tangent + Drag + Scroll +
+
+ +
{ setMousePos(null); setIsDragging(false); }} + > + + {/* Axes */} + {domain.y[0] < 0 && domain.y[1] > 0 && ( + + )} + {domain.x[0] < 0 && domain.x[1] > 0 && ( + + )} + + {/* Grid Ticks (Simple) */} + {[Math.round(domain.x[0]), 0, Math.round(domain.x[1])].map(x => ( + {x} + ))} + {[Math.round(domain.y[0]), 0, Math.round(domain.y[1])].map(y => ( + {y} + ))} + + {/* Function Curve */} + + + {/* Interactive Elements */} + {mousePos && !isDragging && ( + <> + {getTangentLine()} + + + )} + + {/* Critical Points Markers */} + {criticalPoints.map((pt, i) => ( + + + + ))} + + + {/* Tooltip Overlay */} + {mousePos && !isDragging && ( +
+
x: {mousePos.x.toFixed(2)}
+
y: {mousePos.y.toFixed(2)}
+
m: {df(mousePos.x).toFixed(2)}
+
+ )} +
+
+ + {/* Analysis Panel (Right Side) */} +
+ + {/* Derivative Info */} +
+

Derivative Calculation

+
+
f'(x) = d/dx[{inputStr}]
+
+ {compiledData.dfStr || "Computing..."} +
+
+ + {mousePos ? ( +
+
+ Slope at x={mousePos.x.toFixed(1)} + 0 ? 'text-green-400' : 'text-red-400'}`}> + {df(mousePos.x).toFixed(3)} + +
+
+ {df(mousePos.x) > 0 ? "Function is Increasing" : "Function is Decreasing"} +
+
+ ) : ( +
+ Hover over graph to evaluate +
+ )} +
+ + {/* Monotonicity Table */} +
+

Detected Extrema in View

+ + {criticalPoints.length > 0 ? ( +
+ {criticalPoints.map((pt, i) => ( +
+
+
+ {pt.type === 'max' ? : } +
+
+
{pt.type}imum
+
at x โ‰ˆ {pt.x.toFixed(2)}
+
+
+
+ {pt.y.toFixed(2)} +
+
+ ))} +
+ ) : ( +
+ No critical points found in view range. +
+ )} +
+ +
+ Powered by MathJS Symbolic Differentiation +
+ +
+
+ +
+ ); +}; \ No newline at end of file diff --git a/views/FunctionsView.tsx b/views/FunctionsView.tsx new file mode 100644 index 0000000..4aab6b7 --- /dev/null +++ b/views/FunctionsView.tsx @@ -0,0 +1,397 @@ +import React, { useState, useEffect, useRef } from 'react'; +import { motion, AnimatePresence } from 'framer-motion'; +import { Activity, Calculator, LineChart, Move, Table2, MousePointer2 } from 'lucide-react'; +import { WolframHelper } from '../components/WolframHelper'; +import * as math from 'mathjs'; +import { usePersistedState } from '../utils/usePersistedState'; + +export const FunctionsView: React.FC = () => { + const [funcInput, setFuncInput] = usePersistedState('func_input', '1/x'); + const [limitPoint, setLimitPoint] = usePersistedState('func_limit_pt', '0'); + const [error, setError] = useState(null); + const [showTable, setShowTable] = useState(false); + + // Viewport State + const [domain, setDomain] = usePersistedState<{ x: [number, number], y: [number, number] }>('func_domain', { x: [-8, 8], y: [-6, 6] }); + const [isDragging, setIsDragging] = useState(false); + const dragStart = useRef<{ x: number, y: number }>({ x: 0, y: 0 }); + const initialDomain = useRef<{ x: [number, number], y: [number, number] }>({ x: [-8, 8], y: [-6, 6] }); + const svgRef = useRef(null); + const [hoverPoint, setHoverPoint] = useState<{x: number, y: number} | null>(null); + + const presets = [ + { label: 'Rational', expr: '(x - 1) / (x^2 - 4)' }, + { label: 'Semi-circle', expr: '2 * sqrt(1 - x^2)' }, + { label: 'Polynomial', expr: 'x^2 - 1' }, + { label: 'Trig', expr: 'sin(x) + cos(2x)' } + ]; + + let compiledFunc: any = null; + try { + compiledFunc = math.compile(funcInput); + } catch (e) { + // Error handled via effect + } + + const evaluateFn = (x: number) => { + try { + if (!compiledFunc) return NaN; + const result = compiledFunc.evaluate({ x }); + return typeof result === 'number' ? result : NaN; + } catch (e) { + return NaN; + } + }; + + const width = 800; + const height = 500; + + const scaleX = (x: number) => ((x - domain.x[0]) / (domain.x[1] - domain.x[0])) * width; + const scaleY = (y: number) => height - ((y - domain.y[0]) / (domain.y[1] - domain.y[0])) * height; + const inverseScaleX = (svgX: number) => domain.x[0] + (svgX / width) * (domain.x[1] - domain.x[0]); + + const generatePaths = () => { + if (!compiledFunc) return []; + const paths: string[] = []; + let currentPath = ""; + const range = domain.x[1] - domain.x[0]; + const stepSize = range / 1000; + let isDrawing = false; + let prevY = NaN; + + const startX = domain.x[0] - range * 0.1; + const endX = domain.x[1] + range * 0.1; + + for(let x = startX; x <= endX; x += stepSize) { + const y = evaluateFn(x); + const isInvalid = isNaN(y) || !isFinite(y); + const rangeY = domain.y[1] - domain.y[0]; + // Check for vertical asymptotes (large jumps) + const isJump = !isNaN(prevY) && Math.abs(y - prevY) > (rangeY * 1.5); + + if (isInvalid || isJump) { + if (isDrawing) { + paths.push(currentPath); + currentPath = ""; + isDrawing = false; + } + prevY = y; + continue; + } + + const svgX = scaleX(x); + // Clamp for SVG stability + const clampedY = Math.max(Math.min(y, domain.y[1] * 5), domain.y[0] * 5); + const svgY = scaleY(clampedY); + + if (!isDrawing) { + currentPath = `M ${svgX} ${svgY} `; + isDrawing = true; + } else { + currentPath += `L ${svgX} ${svgY} `; + } + prevY = y; + } + if (currentPath) paths.push(currentPath); + return paths; + }; + + const paths = generatePaths(); + + const getLimit = (targetStr: string, dir: 'left' | 'right') => { + try { + const target = parseFloat(targetStr); + if (isNaN(target)) return "N/A"; + const h = 0.0001; + const x = dir === 'left' ? target - h : target + h; + const y = evaluateFn(x); + + if (y > 1000) return '+โˆž'; + if (y < -1000) return '-โˆž'; + if (isNaN(y)) return "Undef"; + if (Math.abs(y) < 0.001) return "0"; + + return y.toFixed(3); + } catch { + return "Err"; + } + }; + + // Interaction Handlers + const handleWheel = (e: React.WheelEvent) => { + e.preventDefault(); + const zoomFactor = e.deltaY > 0 ? 1.1 : 0.9; + const rangeX = domain.x[1] - domain.x[0]; + const rangeY = domain.y[1] - domain.y[0]; + const centerX = (domain.x[0] + domain.x[1]) / 2; + const centerY = (domain.y[0] + domain.y[1]) / 2; + + setDomain({ + x: [centerX - (rangeX * zoomFactor) / 2, centerX + (rangeX * zoomFactor) / 2], + y: [centerY - (rangeY * zoomFactor) / 2, centerY + (rangeY * zoomFactor) / 2] + }); + }; + + const handleMouseDown = (e: React.MouseEvent) => { + setIsDragging(true); + dragStart.current = { x: e.clientX, y: e.clientY }; + initialDomain.current = domain; + }; + + const handleMouseMove = (e: React.MouseEvent) => { + if (isDragging) { + const dxPixels = e.clientX - dragStart.current.x; + const dyPixels = e.clientY - dragStart.current.y; + const rangeX = initialDomain.current.x[1] - initialDomain.current.x[0]; + const rangeY = initialDomain.current.y[1] - initialDomain.current.y[0]; + const dxMath = -(dxPixels / width) * rangeX; + const dyMath = (dyPixels / height) * rangeY; + + setDomain({ + x: [initialDomain.current.x[0] + dxMath, initialDomain.current.x[1] + dxMath], + y: [initialDomain.current.y[0] + dyMath, initialDomain.current.y[1] + dyMath] + }); + } else { + // Hover + if (svgRef.current) { + const rect = svgRef.current.getBoundingClientRect(); + const x = e.clientX - rect.left; + const mathX = inverseScaleX(x); + const mathY = evaluateFn(mathX); + setHoverPoint({ x: mathX, y: mathY }); + } + } + }; + + useEffect(() => { + try { + math.compile(funcInput); + setError(null); + } catch (e) { + setError("Invalid Syntax"); + } + }, [funcInput]); + + return ( +
+
+
+

Function Grapher

+

+ Visualize y = f(x) with automatic asymptote detection and limit analysis. +

+
+
+ Math.js Engine +
+
+ +
+ + {/* Left Controls */} +
+
+

+ Expression +

+ +
+
f(x) =
+ setFuncInput(e.target.value)} + className={`w-full bg-slate-950 border ${error ? 'border-pink-500 shadow-pink-500/20 shadow-lg' : 'border-slate-800'} rounded-2xl py-4 pl-16 pr-4 text-white focus:border-cyan-500 outline-none font-mono text-base transition-all`} + placeholder="e.g. x^2 + 2x" + /> + {error && {error}} +
+ +
+ {presets.map((p) => ( + + ))} +
+
+ +
+

+ Limit Scanner +

+ +
+
+

Target Point (a)

+ setLimitPoint(e.target.value)} + className="w-20 bg-slate-900 border border-slate-700 rounded-lg px-3 py-1 text-right font-mono text-white focus:border-pink-500 outline-none" + /> +
+ +
+
+
Left Limit (xโ†’aโป)
+
{getLimit(limitPoint, 'left')}
+
+
+
Right Limit (xโ†’aโบ)
+
{getLimit(limitPoint, 'right')}
+
+
+
+
+
+ + {/* Right Graph */} +
+
+
+ + {/* Toolbar */} +
+ + + y = {funcInput} + +
+ +
+ {isDragging ? 'Panning' : 'Trace'} + Scroll Zoom +
+
+ +
+
setIsDragging(false)} + onMouseLeave={() => { setIsDragging(false); setHoverPoint(null); }} + > + + {/* Axes */} + {domain.y[0] < 0 && domain.y[1] > 0 && ( + + )} + {domain.x[0] < 0 && domain.x[1] > 0 && ( + + )} + + {/* Grid Numbers */} + {[Math.ceil(domain.x[0]), 0, Math.floor(domain.x[1])].map(x => ( + {x} + ))} + {[Math.ceil(domain.y[0]), 0, Math.floor(domain.y[1])].map(y => ( + {y} + ))} + + {/* Limit Line */} + {!isNaN(parseFloat(limitPoint)) && ( + + )} + + {/* Graph Line */} + {paths.map((d, idx) => ( + + ))} + + {/* Trace Point */} + {hoverPoint && !isDragging && !isNaN(hoverPoint.y) && Math.abs(hoverPoint.y) < Math.max(...domain.y.map(Math.abs)) * 2 && ( + + + {/* Dynamic Crosshair */} + + + + )} + + + {/* Floating Tooltip */} + {hoverPoint && !isDragging && ( +
+
x: {hoverPoint.x.toFixed(2)}
+
y: {hoverPoint.y.toFixed(2)}
+
+ )} +
+ + {/* Data Table Slide-out */} + + {showTable && ( + +
Data Points
+
+ + + + + + {Array.from({length: 20}).map((_, i) => { + // Sample points around center of view + const x = (domain.x[0] + domain.x[1])/2 + (i - 10) * ((domain.x[1]-domain.x[0])/20); + const y = evaluateFn(x); + return ( + + + + + ) + })} + +
xy
{x.toFixed(1)}{y.toFixed(2)}
+
+
+ )} +
+
+
+
+
+ +
+ ); +}; \ No newline at end of file diff --git a/views/GaussianView.tsx b/views/GaussianView.tsx new file mode 100644 index 0000000..48b3925 --- /dev/null +++ b/views/GaussianView.tsx @@ -0,0 +1,194 @@ +import React, { useState, useEffect, useMemo } from 'react'; +import { MatrixInput } from '../components/MatrixInput'; +import { MatrixData } from '../types'; +import { getSteps } from '../utils/gaussianSteps'; +import { RotateCcw, Play, Pause, ChevronLeft, ChevronRight, Layers, ArrowDownUp, FastForward } from 'lucide-react'; +import { motion, AnimatePresence } from 'framer-motion'; + +export const GaussianView: React.FC = () => { + const [matrix, setMatrix] = useState([ + [0, 1, -1, 8], + [-3, -1, 2, -11], + [-2, 1, 2, -3] + ]); + + const [currentStepIndex, setCurrentStepIndex] = useState(0); + const [isPlaying, setIsPlaying] = useState(false); + const [playbackSpeed, setPlaybackSpeed] = useState(1500); // ms + + const steps = useMemo(() => getSteps(matrix), [matrix]); + const currentStep = steps[currentStepIndex]; + + useEffect(() => { + let interval: any; + if (isPlaying) { + interval = setInterval(() => { + setCurrentStepIndex(prev => { + if (prev < steps.length - 1) return prev + 1; + setIsPlaying(false); + return prev; + }); + }, playbackSpeed); + } + return () => clearInterval(interval); + }, [isPlaying, steps.length, playbackSpeed]); + + const handleMatrixChange = (newData: MatrixData) => { + setMatrix(newData); + setCurrentStepIndex(0); + setIsPlaying(false); + }; + + return ( +
+
+
+

Gaussian Elimination

+

+ Algorithmic visualization of row reduction with Partial Pivoting strategy. +

+
+
+ Algorithm: Gauss-Jordan +
+
+ +
+ + {/* Input Side */} +
+
+
+
+

Input System

+

Edit the Augmented Matrix [A|b] below.

+
+ +
+ +
+

+ Step Logic +

+
+
+
+

1. Pivot Selection

+

Locate largest absolute value in current column to minimize error.

+
+
+
+

2. Row Swap

+

Move best pivot to diagonal position.

+
+
+
+

3. Elimination

+

Subtract multiples of pivot row to create zeros below.

+
+
+
+
+ + {/* Playback Side */} +
+ + {/* Main Visualizer */} +
+ + {/* Header Bar */} +
+ +
+ Live Process + + + Step {currentStepIndex + 1} / {steps.length} + +
+ +
+ + + r.map(v => { + const clean = parseFloat(v.toFixed(2)); // Round for display + return Object.is(clean, -0) ? 0 : clean; + }))} + color={currentStep.isSwap ? 'purple' : (currentStepIndex === steps.length - 1 ? 'green' : 'orange')} + highlightRow={currentStep.highlightRow} + highlightCol={null} + /> + + + + {/* Visual Indicators */} + {currentStep.pivotRow !== undefined && ( +
+
+ Pivot R{currentStep.pivotRow + 1} +
+
+ {currentStep.isSwap ? `Swap R${currentStep.highlightRow! + 1}` : `Target R${currentStep.highlightRow! + 1}`} +
+
+ )} +
+
+ + {/* Control Deck */} +
+
+
+

+ {currentStep.isSwap && } + {currentStep.title} +

+

{currentStep.desc}

+
+ {currentStep.formula && ( +
+ {currentStep.formula} +
+ )} +
+ +
+ {/* Playback Controls */} + + + + + + +
+ + {/* Speed Control */} +
+ {[2000, 1000, 500].map((speed) => ( + + ))} +
+
+
+
+
+ ); +}; \ No newline at end of file diff --git a/views/IntegralBasicsView.tsx b/views/IntegralBasicsView.tsx new file mode 100644 index 0000000..0472f46 --- /dev/null +++ b/views/IntegralBasicsView.tsx @@ -0,0 +1,136 @@ + +import React, { useState } from 'react'; +import { motion } from 'framer-motion'; +import { MathRenderer } from '../components/MathRenderer'; +import { History, ChevronsUp, Layers } from 'lucide-react'; + +export const IntegralBasicsView: React.FC = () => { + const [constantC, setConstantC] = useState(0); + + const width = 600; + const height = 400; + const domain = { x: [-3, 3], y: [-5, 10] }; + + const scaleX = (x: number) => ((x - domain.x[0]) / (domain.x[1] - domain.x[0])) * width; + const scaleY = (y: number) => height - ((y - domain.y[0]) / (domain.y[1] - domain.y[0])) * height; + + const generatePath = (fn: (x: number) => number) => { + let path = ""; + const step = 0.1; + for (let x = domain.x[0]; x <= domain.x[1]; x += step) { + const y = fn(x); + const sx = scaleX(x); + const sy = scaleY(y); + if (x === domain.x[0]) path += `M ${sx} ${sy}`; + else path += ` L ${sx} ${sy}`; + } + return path; + }; + + // Example: derivative is f(x) = 3x^2, primitive is F(x) = x^3 + C + const f = (x: number) => 3 * x * x; + const F = (x: number) => x * x * x + constantC; + + return ( +
+
+

The Antiderivative

+

+ Integration is the inverse operation of differentiation. The indefinite integral represents the family of functions F(x) + C whose derivative is f(x). +

+
+ +
+ + {/* Concept Card */} +
+
+

+ Definition +

+

+ The prime function is any function whose derivative equals . +

+
+ +

+ if +

+
+
+ +
+

+ The Constant C +

+

+ Two functions with the same derivative differ only by a vertical shift. +

+ Example: If , then can be: +

+
    +
  • +
  • +
  • +
  • Generally:
  • +
+
+
+ + {/* Visualizer */} +
+
+ +
+ Family of Curves +
+ F(x) = xยณ + {constantC.toFixed(1)} + f(x) = 3xยฒ +
+
+ +
+ + {/* Axes */} + + + + {/* Derivative (Ghost) - Scaled down to fit */} + f(x)/3)} fill="none" stroke="#a855f7" strokeWidth="2" strokeDasharray="4 4" opacity="0.5" /> + + {/* Primitive Function */} + + + + {/* Vertical Shift Indicator */} + +
+ +
+ + setConstantC(parseFloat(e.target.value))} + className="w-full h-2 bg-slate-800 rounded-lg appearance-none cursor-pointer accent-cyan-500" + /> +
+
+ +
+
+ ); +}; diff --git a/views/IntegralRulesView.tsx b/views/IntegralRulesView.tsx new file mode 100644 index 0000000..32d3ec0 --- /dev/null +++ b/views/IntegralRulesView.tsx @@ -0,0 +1,108 @@ + +import React from 'react'; +import { MathRenderer } from '../components/MathRenderer'; +import { Variable, CheckCircle2 } from 'lucide-react'; + +const formulas = [ + { + name: "Power Rule", + latex: "\\int x^a dx = \\frac{1}{a+1}x^{a+1} + C", + cond: "a \\neq -1", + ex: "\\int x^2 dx = \\frac{x^3}{3} + C" + }, + { + name: "Constant Rule", + latex: "\\int dx = x + C", + cond: "", + ex: "\\int 5 dx = 5x + C" + }, + { + name: "Reciprocal Rule", + latex: "\\int \\frac{1}{x} dx = \\ln|x| + C", + cond: "x \\neq 0", + ex: "" + }, + { + name: "Exponential Rule", + latex: "\\int e^x dx = e^x + C", + cond: "", + ex: "" + }, + { + name: "General Exponential", + latex: "\\int a^x dx = \\frac{a^x}{\\ln a} + C", + cond: "a > 0, a \\neq 1", + ex: "\\int 2^x dx = \\frac{2^x}{\\ln 2} + C" + }, + { + name: "Root Rule", + latex: "\\int \\frac{1}{\\sqrt{x}} dx = 2\\sqrt{x} + C", + cond: "x > 0", + ex: "\\text{Derived from } x^{-1/2}" + } +]; + +const properties = [ + { + name: "Sum/Difference", + latex: "\\int (f(x) \\pm g(x)) dx = \\int f(x) dx \\pm \\int g(x) dx" + }, + { + name: "Constant Multiple", + latex: "\\int k f(x) dx = k \\int f(x) dx" + } +]; + +export const IntegralRulesView: React.FC = () => { + return ( +
+
+

Integration Rules

+

Essential formulas and properties for solving indefinite integrals.

+
+ +
+ {/* Properties */} +
+

+ Properties +

+
+ {properties.map((prop, idx) => ( +
+ {prop.name} + +
+ ))} +
+
+ + {/* Formulas */} +
+

+ Basic Formulas +

+
+ {formulas.map((rule, idx) => ( +
+
+

{rule.name}

+ {rule.cond && {rule.cond}} +
+
+ +
+ {rule.ex && ( +
+ Ex: + +
+ )} +
+ ))} +
+
+
+
+ ); +}; diff --git a/views/Integrals3DView.tsx b/views/Integrals3DView.tsx new file mode 100644 index 0000000..4a3fc9c --- /dev/null +++ b/views/Integrals3DView.tsx @@ -0,0 +1,184 @@ + +import React, { useMemo, useState } from 'react'; +import { Canvas } from '@react-three/fiber'; +import { OrbitControls, Grid, Stage, Float } from '@react-three/drei'; +import * as THREE from 'three'; +import { Cylinder, Rotate3d, Maximize, Eye } from 'lucide-react'; + +export const Integrals3DView: React.FC = () => { + const [segments, setSegments] = useState(32); + const [activeFuncId, setActiveFuncId] = useState('parabola'); + const [heightRange, setHeightRange] = useState(6); + const [showWireframe, setShowWireframe] = useState(false); + + const functions = { + parabola: { + label: 'Parabola', + fn: (x: number) => 0.15 * x * x + 1, + desc: 'f(x) = 0.15xยฒ + 1' + }, + sine: { + label: 'Sine Vase', + fn: (x: number) => Math.sin(x) * 0.5 + 1.5, + desc: 'f(x) = sin(x)*0.5 + 1.5' + }, + funnel: { + label: 'Trumpet', + fn: (x: number) => 2 / (Math.abs(x) + 1), + desc: 'f(x) = 2/(|x|+1)' + }, + cone: { + label: 'Linear', + fn: (x: number) => 0.4 * Math.abs(x) + 0.5, + desc: 'f(x) = 0.4|x| + 0.5' + } + }; + + const activeFunc = functions[activeFuncId as keyof typeof functions]; + + const geometry = useMemo(() => { + const points = []; + const steps = 100; + const start = -heightRange / 2; + const end = heightRange / 2; + + for (let i = 0; i <= steps; i++) { + const y = start + (i / steps) * heightRange; // Vertical axis in lathe logic + const radius = activeFunc.fn(y); + // Three.js Lathe rotates around Y axis. Vector2(radius, y) + points.push(new THREE.Vector2(Math.max(0.01, radius), y)); + } + return new THREE.LatheGeometry(points, segments); + }, [activeFunc, heightRange, segments]); + + return ( +
+
+
+

+ Solid of Revolution +

+

+ Generate 3D volumes by rotating a function f(x) around the central axis. + This visualizes the method of disks/washers used in integral calculus. +

+
+
+ +
+ + {/* Controls Overlay */} +
+
+

+ Generating Function +

+
+ {Object.entries(functions).map(([id, f]) => ( + + ))} +
+
+ {activeFunc.desc} +
+
+ +
+

+ Dimensions +

+
+
+
+ Height Range + {heightRange}u +
+ setHeightRange(parseFloat(e.target.value))} + className="w-full h-1.5 bg-slate-700 rounded-lg appearance-none cursor-pointer accent-emerald-500" + /> +
+
+
+ Resolution (Segments) + {segments} +
+ setSegments(parseInt(e.target.value))} + className="w-full h-1.5 bg-slate-700 rounded-lg appearance-none cursor-pointer accent-emerald-500" + /> +
+
+
+ +
+ +
+
+ + {/* 3D Canvas */} +
+
+ + + + + + + + + + + + + + + + + + {/* Outline / Edge Highlight if not wireframe */} + {!showWireframe && ( + + + + )} + + {/* Central Axis Line */} + + + + + + + + + +
+ Left Click: Rotate โ€ข Scroll: Zoom โ€ข Right Click: Pan +
+
+
+
+ ); +}; diff --git a/views/InverseView.tsx b/views/InverseView.tsx new file mode 100644 index 0000000..fd08e2b --- /dev/null +++ b/views/InverseView.tsx @@ -0,0 +1,156 @@ + +import React, { useState, useMemo } from 'react'; +import { MatrixInput } from '../components/MatrixInput'; +import { createMatrix, getDeterminant, getInverse, getMinor, fmt } from '../utils/matrixMath'; +import { WolframHelper } from '../components/WolframHelper'; +import { GitGraph, ArrowRight, AlertTriangle, CheckCircle2, Factory, Grid, RefreshCw } from 'lucide-react'; +import { motion, AnimatePresence } from 'framer-motion'; + +export const InverseView: React.FC = () => { + const [matrix, setMatrix] = useState([ + [2, 1, 1], + [3, 2, 1], + [2, 1, 2] + ]); + + const det = useMemo(() => getDeterminant(matrix), [matrix]); + + // Calculate intermediate steps for educational display + const cofactorMatrix = useMemo(() => { + if (!det) return null; + return matrix.map((row, i) => row.map((_, j) => { + const minorDet = getDeterminant(getMinor(matrix, i, j)) || 0; + const sign = (i + j) % 2 === 0 ? 1 : -1; + return sign * minorDet; + })); + }, [matrix, det]); + + const adjugateMatrix = useMemo(() => { + if (!cofactorMatrix) return null; + // Transpose of cofactor + return cofactorMatrix[0].map((_, colIndex) => cofactorMatrix.map(row => row[colIndex])); + }, [cofactorMatrix]); + + const inverse = useMemo(() => { + if (!adjugateMatrix || !det) return null; + return adjugateMatrix.map(row => row.map(val => val / det)); + }, [adjugateMatrix, det]); + + return ( +
+
+
+

Inversion Factory

+

+ Visualizing the 4-stage pipeline to transform A into Aโปยน. +

+
+
+ + +
+
+ + {/* The Pipeline */} +
+ {/* Visual connector line (Desktop only) */} +
+ + {/* Stage 1: Input & Det */} + +
+ Stage 1: Input +
+ {det ? : } Det: {det !== null ? fmt(det) : '-'} +
+
+
+ +
+
+ + {/* Stage 2: Cofactors */} + +
+ Stage 2: Cofactors + +
+
+ {cofactorMatrix ? ( + <> + +

Applied (+ - +) checkerboard to Minors.

+ + ) : ( +
Waiting for valid input...
+ )} +
+
+ + {/* Stage 3: Adjugate (Transpose) */} + +
+ Stage 3: Adjugate + +
+
+ {adjugateMatrix ? ( + <> + +

Transposed rows to columns.

+ + ) : ( +
...
+ )} +
+
+ + {/* Stage 4: Final Inverse */} + +
+ Stage 4: Output + +
+
+ {inverse ? ( + <> + r.map(v => parseFloat(v.toFixed(2))))} color="green" label="" /> +

Divided Adjugate by Det ({fmt(det!)}).

+ + ) : ( +
+ Cannot invert singular matrix. +
+ )} +
+
+ +
+ + {/* Formula Reference */} +
+
Master Formula
+
+ Aโปยน = 1/det(A) ยท adj(A) +
+

+ The adjugate matrix adj(A) is the transpose of the cofactor matrix. This formula works for any square non-singular matrix. +

+
+ + +
+ ); +}; diff --git a/views/LinearTransformation3DView.tsx b/views/LinearTransformation3DView.tsx new file mode 100644 index 0000000..4931c53 --- /dev/null +++ b/views/LinearTransformation3DView.tsx @@ -0,0 +1,280 @@ + +import React, { useState, useMemo, useEffect } from 'react'; +import { Canvas } from '@react-three/fiber'; +import { OrbitControls, Line, Text, Plane, Grid } from '@react-three/drei'; +import * as THREE from 'three'; +import { MatrixInput } from '../components/MatrixInput'; +import { getDeterminant, fmt } from '../utils/matrixMath'; +import { Box, RefreshCcw, Variable, MousePointer2, Layers } from 'lucide-react'; + +// --- Math Helpers --- + +const interpolateMatrix = (m1: number[][], m2: number[][], t: number) => { + return m1.map((row, r) => + row.map((val, c) => val + (m2[r][c] - val) * t) + ); +}; + +const multiplyVector = (m: number[][], v: {x: number, y: number, z: number}) => { + return { + x: m[0][0]*v.x + m[0][1]*v.y + m[0][2]*v.z, + y: m[1][0]*v.x + m[1][1]*v.y + m[1][2]*v.z, + z: m[2][0]*v.x + m[2][1]*v.y + m[2][2]*v.z, + }; +}; + +// --- 3D Components --- + +const VectorArrow: React.FC<{ start?: THREE.Vector3; end: THREE.Vector3; color: string; label?: string; }> = ({ start = new THREE.Vector3(0,0,0), end, color, label }) => { + const dir = new THREE.Vector3().subVectors(end, start).normalize(); + const length = start.distanceTo(end); + + if (length < 0.01) return null; + + return ( + + + {label && ( + + {label} + + )} + + ); +}; + +const WarpedPlane: React.FC<{ matrix: number[][] }> = ({ matrix }) => { + // A 10x10 plane that gets transformed by the matrix + const geometry = useMemo(() => { + const geo = new THREE.PlaneGeometry(10, 10, 20, 20); + const posAttribute = geo.attributes.position; + const vertex = new THREE.Vector3(); + + for (let i = 0; i < posAttribute.count; i++) { + vertex.fromBufferAttribute(posAttribute, i); + // Apply transformation manually to vertices + const res = multiplyVector(matrix, {x: vertex.x, y: vertex.y, z: vertex.z}); // Plane is XY by default (z=0) + posAttribute.setXYZ(i, res.x, res.y, res.z); + } + + geo.computeVertexNormals(); + return geo; + }, [matrix]); + + return ( + + + + + + + + + ); +}; + +// --- Main View --- + +export const LinearTransformation3DView: React.FC = () => { + const [targetMatrix, setTargetMatrix] = useState([ + [1, 0, 0], + [0, 1, 0], + [0, 0, 1] + ]); + + const [t, setT] = useState(1); + const [isAnimating, setIsAnimating] = useState(false); + const [testVec, setTestVec] = useState({ x: 1, y: 1, z: 1 }); + + const identityMatrix = [ + [1, 0, 0], + [0, 1, 0], + [0, 0, 1] + ]; + + const currentMatrix = useMemo(() => + interpolateMatrix(identityMatrix, targetMatrix, t) + , [targetMatrix, t]); + + const det = useMemo(() => getDeterminant(currentMatrix), [currentMatrix]); + + // Transformed Basis Vectors + const iHat = new THREE.Vector3(currentMatrix[0][0], currentMatrix[1][0], currentMatrix[2][0]); + const jHat = new THREE.Vector3(currentMatrix[0][1], currentMatrix[1][1], currentMatrix[2][1]); + const kHat = new THREE.Vector3(currentMatrix[0][2], currentMatrix[1][2], currentMatrix[2][2]); + + const outputVec = multiplyVector(currentMatrix, testVec); + const outputVec3 = new THREE.Vector3(outputVec.x, outputVec.y, outputVec.z); + const inputVec3 = new THREE.Vector3(testVec.x, testVec.y, testVec.z); + + useEffect(() => { + let raf: number; + if (isAnimating) { + const animate = () => { + setT(prev => { + if (prev >= 1) { + setIsAnimating(false); + return 1; + } + return prev + 0.02; + }); + raf = requestAnimationFrame(animate); + }; + raf = requestAnimationFrame(animate); + } + return () => cancelAnimationFrame(raf); + }, [isAnimating]); + + const handlePreset = (type: string) => { + setT(0); + setTimeout(() => setIsAnimating(true), 100); + + switch(type) { + case 'identity': setTargetMatrix([[1,0,0],[0,1,0],[0,0,1]]); break; + case 'scale': setTargetMatrix([[2,0,0],[0,0.5,0],[0,0,1]]); break; + case 'shear': setTargetMatrix([[1,1,0],[0,1,0],[0,0,1]]); break; + case 'rotateZ': + const rad = Math.PI / 4; + setTargetMatrix([[Math.cos(rad), -Math.sin(rad), 0],[Math.sin(rad), Math.cos(rad), 0],[0, 0, 1]]); + break; + case 'projection': setTargetMatrix([[1,0,0],[0,1,0],[0,0,0]]); break; + case 'random': + setTargetMatrix([ + [(Math.random()-0.5)*3, (Math.random()-0.5)*3, (Math.random()-0.5)*3], + [(Math.random()-0.5)*3, (Math.random()-0.5)*3, (Math.random()-0.5)*3], + [(Math.random()-0.5)*3, (Math.random()-0.5)*3, (Math.random()-0.5)*3], + ]); + break; + } + }; + + return ( +
+
+
+

+ Matrix Space Warper +

+

+ Visualize how a linear transformation T(x) = Ax deforms the entire fabric of space. + The blue grid represents the XY plane being transformed. +

+
+
+
+
Progress
+
+ setT(parseFloat(e.target.value))} + className="w-24 h-1.5 bg-slate-700 rounded-lg appearance-none cursor-pointer accent-cyan-500" + /> +
+
+
+
Volume Scaling
+
+ {det !== null ? fmt(det) : 'Err'} +
+
+
+
+ +
+ + {/* Controls Sidebar */} +
+
+ {[ + {id: 'identity', label: 'Reset', icon: RefreshCcw}, + {id: 'scale', label: 'Scale', icon: Layers}, + {id: 'shear', label: 'Shear', icon: Variable}, + {id: 'rotateZ', label: 'Rot Z', icon: RefreshCcw}, + {id: 'projection', label: 'Flat', icon: Box}, + {id: 'random', label: 'Chaos', icon: Variable}, + ].map(p => ( + + ))} +
+ +
+
+

Transformation Matrix A

+
+ {setTargetMatrix(m); setT(1);}} editable color="blue" /> +
+ +
+

+ Test Vector v +

+ +
+ {['x', 'y', 'z'].map((axis) => ( +
+ + setTestVec(prev => ({...prev, [axis]: parseFloat(e.target.value)}))} + className="w-full bg-slate-950 border border-slate-700 rounded px-2 py-1 text-center text-sm font-mono text-amber-100 focus:border-amber-500 outline-none" + /> +
+ ))} +
+
+
+ + {/* 3D Canvas */} +
+ + + + + + + + + + + + {/* Axes */} + + + + + + + {/* The Warping Plane */} + + + {/* Transformed Basis Vectors */} + + + + + {/* Test Vector */} + + + + {/* Connection Line */} + + + + +
+ Left Click: Rotate โ€ข Scroll: Zoom +
+
+ +
+
+ ); +}; diff --git a/views/NewtonView.tsx b/views/NewtonView.tsx new file mode 100644 index 0000000..d0dbaac --- /dev/null +++ b/views/NewtonView.tsx @@ -0,0 +1,226 @@ +import React, { useState } from 'react'; +import { motion } from 'framer-motion'; +import { Activity, Play, RotateCcw, Target } from 'lucide-react'; +import { WolframHelper } from '../components/WolframHelper'; + +export const NewtonView: React.FC = () => { + // Solve x^3 - x - 1 = 0 + const [startX, setStartX] = useState(1.5); + const [stepIndex, setStepIndex] = useState(0); // For visualizing specific step + + const f = (x: number) => x*x*x - x - 1; + const df = (x: number) => 3*x*x - 1; + + const getSteps = () => { + const steps = []; + let x = startX; + for(let i=0; i<6; i++) { + const y = f(x); + const slope = df(x); + const nextX = slope !== 0 ? x - y/slope : x; + steps.push({ i, x, y, slope, nextX }); + if (slope === 0) break; + x = nextX; + } + return steps; + } + + const steps = getSteps(); + const currentStep = steps[Math.min(stepIndex, steps.length - 1)]; + + // --- Graphing Config --- + const width = 600; + const height = 400; + const xDomain = [0, 2.5]; + const yDomain = [-2, 8]; + + const scaleX = (x: number) => ((x - xDomain[0]) / (xDomain[1] - xDomain[0])) * width; + const scaleY = (y: number) => height - ((y - yDomain[0]) / (yDomain[1] - yDomain[0])) * height; + + const generateFunctionPath = () => { + let path = ""; + const step = 0.05; + for (let x = xDomain[0]; x <= xDomain[1]; x += step) { + const y = f(x); + const sx = scaleX(x); + const sy = scaleY(y); + if (x === xDomain[0]) path += `M ${sx} ${sy}`; + else path += ` L ${sx} ${sy}`; + } + return path; + }; + + const getTangentLine = () => { + // Line equation: y - y0 = m(x - x0) => y = m(x - x0) + y0 + // We want to draw from (x0, y0) down to (nextX, 0) + const x0 = currentStep.x; + const y0 = currentStep.y; + const x1 = currentStep.nextX; + const y1 = 0; + + return { + x1: scaleX(x0), + y1: scaleY(y0), + x2: scaleX(x1), + y2: scaleY(y1) + }; + }; + + const tangent = getTangentLine(); + + return ( +
+
+

Newton-Raphson Visualizer

+

+ See how the algorithm "surfs" down the tangent lines to find where the curve crosses zero. +
Formula: xโ‚™โ‚Šโ‚ = xโ‚™ - f(xโ‚™)/f'(xโ‚™) +

+
+ +
+ + {/* Left: Controls & Table */} +
+
+ +
+ { setStartX(parseFloat(e.target.value)); setStepIndex(0); }} + className="flex-1 h-2 bg-slate-600 rounded-lg appearance-none accent-pink-500 cursor-pointer" + /> + {startX} +
+

+ Changing the start point affects the path to the root. +

+ + +
+ +
+ Iteration {currentStep.i} +
+ +
+
+ +
+ + + + + + + + + + + {steps.map((step, idx) => ( + setStepIndex(idx)} + className={`text-xs font-mono cursor-pointer transition-colors ${stepIndex === idx ? 'bg-cyan-500/10 text-cyan-300' : 'text-slate-400 hover:bg-white/5'}`} + > + + + + + + ))} + +
nxโ‚™f(xโ‚™)xโ‚™โ‚Šโ‚
{step.i}{step.x.toFixed(4)}{step.y.toFixed(4)}{step.nextX.toFixed(4)}
+
+
+ + {/* Right: Visualization */} +
+
+
+ {/* Graph Grid/Axes */} + + {/* X-Axis */} + + x + + {/* Function Curve */} + + + {/* Current Point on Curve */} + + + (x{currentStep.i}, y{currentStep.i}) + + + {/* Vertical Dashed Line from Axis to Curve */} + + + {/* Tangent Line */} + + + {/* Next Guess Point (Intersection) */} + + + x{currentStep.i + 1} + + + + {/* Overlay Info */} +
+
+
+ Curve: $x^3 - x - 1$ +
+
+
+ Tangent Line +
+
+ Slope $f'(x)$ = {currentStep.slope.toFixed(3)} +
+
+
+
+ +
+ +
+

Educational Insight

+

+ Notice how the tangent line at x{currentStep.i} acts as a linear approximation of the curve. + By following this straight line down to zero, we get x{currentStep.i+1}, which is (usually) closer to the true root than where we started. +

+
+
+
+ +
+ + +
+ ); +}; \ No newline at end of file diff --git a/views/OperationsView.tsx b/views/OperationsView.tsx new file mode 100644 index 0000000..f68746d --- /dev/null +++ b/views/OperationsView.tsx @@ -0,0 +1,234 @@ +import React, { useState, useEffect } from 'react'; +import { MatrixInput } from '../components/MatrixInput'; +import { createMatrix, addMatrices, subtractMatrices, multiplyMatrices, multiplyMatrixByScalar } from '../utils/matrixMath'; +import { MatrixData, OperationType } from '../types'; +import { Plus, Minus, X, ArrowRight, Settings, Sliders, Hash, Calculator, GraduationCap, Eye } from 'lucide-react'; +import { motion, AnimatePresence } from 'framer-motion'; +import { WolframHelper } from '../components/WolframHelper'; +import { usePersistedState } from '../utils/usePersistedState'; + +export const OperationsView: React.FC = () => { + const [op, setOp] = usePersistedState('ops_type', OperationType.ADD); + const [matrixA, setMatrixA] = usePersistedState('ops_matA', createMatrix(2, 2, 1)); + const [matrixB, setMatrixB] = usePersistedState('ops_matB', createMatrix(2, 2, 2)); + const [scalarK, setScalarK] = usePersistedState('ops_scalar', 2); + const [result, setResult] = useState(null); + const [showLogic, setShowLogic] = useState(false); + + useEffect(() => { + switch (op) { + case OperationType.ADD: setResult(addMatrices(matrixA, matrixB)); break; + case OperationType.SUBTRACT: setResult(subtractMatrices(matrixA, matrixB)); break; + case OperationType.MULTIPLY: setResult(multiplyMatrices(matrixA, matrixB)); break; + case OperationType.SCALAR: setResult(multiplyMatrixByScalar(matrixA, scalarK)); break; + } + }, [matrixA, matrixB, op, scalarK]); + + const resizeMatrices = (r: number, c: number) => { + setMatrixA(createMatrix(r, c, 1)); + if (op !== OperationType.MULTIPLY) { + setMatrixB(createMatrix(r, c, 2)); + } else { + setMatrixB(createMatrix(c, r, 2)); + } + }; + + const getLogicExplanation = () => { + if (!result) return null; + if (op === OperationType.MULTIPLY) { + // Show dot product example for C_11 + const row = matrixA[0]; + const col = matrixB.map(r => r[0]); + const calculation = row.map((val, k) => `(${val} ยท ${col[k]})`).join(' + '); + const numeric = row.reduce((acc, val, k) => acc + val * col[k], 0); + return ( +
+
Dot Product Logic (Row ยท Column)
+
+ c1,1 = (Row 1 of A) ยท (Col 1 of B) +
+
+ {calculation} = {numeric} +
+
+ Each element c_ij is the sum of products of the i-th row of A and j-th column of B. +
+
+ ); + } + if (op === OperationType.ADD) { + return ( +
+
Element-wise Addition
+
+ ci,j = ai,j + bi,j +
+
+ {matrixA[0][0]} + {matrixB[0][0]} = {result[0][0]} (example for pos 1,1) +
+
+ ) + } + return null; + }; + + return ( +
+
+
+

Matrix Arithmetic

+

+ Real-time computation engine with deep logic inspection. +

+
+ + {/* Operation Selector - Segmented Control */} +
+ {[ + { type: OperationType.ADD, icon: Plus, label: 'Add' }, + { type: OperationType.SUBTRACT, icon: Minus, label: 'Sub' }, + { type: OperationType.MULTIPLY, icon: X, label: 'Mult' }, + { type: OperationType.SCALAR, icon: Hash, label: 'Scale' }, + ].map((item) => ( + + ))} +
+
+ +
+ {/* Left Config Panel */} +
+
+

+ Quick Size +

+ +
+ + +
+
+ + {/* Educational Toggle */} + + + {/* Logic Panel (Conditional) */} + + {showLogic && result && ( + + {getLogicExplanation()} + + )} + +
+ + {/* Right Calculation Pipeline */} +
+
+
+ + {/* Visual Pipeline Track */} +
+ +
+ + {/* Input A */} +
+
Operand A
+ + {showLogic && op===OperationType.MULTIPLY &&
Use Rows
} +
+ + {/* Operator Badge */} +
+ + {op === OperationType.ADD && } + {op === OperationType.SUBTRACT && } + {op === OperationType.MULTIPLY && } + {op === OperationType.SCALAR && } + +
+ + {/* Input B (or Scalar Visual) */} + {op !== OperationType.SCALAR ? ( +
+
Operand B
+ + {showLogic && op===OperationType.MULTIPLY &&
Use Columns
} +
+ ) : ( +
+ {scalarK} + Scalar +
+ )} + + {/* Equals Arrow */} + +
+ + {/* Result */} + + +
Result
+ {result ? ( + + ) : ( +
+ Dimension Mismatch +
+ )} +
+
+
+
+
+
+ + +
+ ); +}; \ No newline at end of file diff --git a/views/PopulationModelsView.tsx b/views/PopulationModelsView.tsx new file mode 100644 index 0000000..87ac8de --- /dev/null +++ b/views/PopulationModelsView.tsx @@ -0,0 +1,204 @@ + +import React, { useState } from 'react'; +import { motion } from 'framer-motion'; +import { MathRenderer } from '../components/MathRenderer'; +import { Sprout, AlertTriangle, ArrowRight } from 'lucide-react'; + +export const PopulationModelsView: React.FC = () => { + const [model, setModel] = useState<'malthus' | 'verhulst'>('verhulst'); + const [N0, setN0] = useState(10); // Initial Pop + const [r, setR] = useState(0.5); // Growth Rate + const [K, setK] = useState(100); // Capacity + + const width = 600; + const height = 400; + const timeEnd = 15; + + // Malthus: N(t) = N0 * e^(rt) + const calcMalthus = (t: number) => N0 * Math.exp(r * t); + + // Verhulst: N(t) = K / (1 + ((K - N0)/N0) * e^(-rt)) + const calcVerhulst = (t: number) => K / (1 + ((K - N0)/N0) * Math.exp(-r * t)); + + const activeFunc = model === 'malthus' ? calcMalthus : calcVerhulst; + + // Graph Scales + const maxPop = model === 'malthus' ? calcMalthus(timeEnd/2) : K * 1.2; // Zoom differently + const scaleX = (t: number) => (t / timeEnd) * width; + const scaleY = (pop: number) => height - (pop / maxPop) * height; + + const generatePath = (fn: (t: number) => number) => { + let path = ""; + const step = 0.1; + for (let t = 0; t <= timeEnd; t += step) { + const pop = fn(t); + const sx = scaleX(t); + const sy = scaleY(pop); + + if (sy < 0) { // Clip top + if(path !== "") path += ` L ${sx} 0`; + break; + } + + if (t === 0) path += `M ${sx} ${sy}`; + else path += ` L ${sx} ${sy}`; + } + return path; + }; + + return ( +
+
+
+

Population Dynamics

+

+ Modeling biological growth. Unlimited resources lead to Malthusian explosion. + Real-world limits create Verhulst (Logistic) equilibrium. +

+
+
+ + +
+
+ +
+ + {/* Controls */} +
+
+

Environment Params

+ +
+
+
+ Initial Population (Nโ‚€) + {N0} +
+ setN0(parseFloat(e.target.value))} className="w-full h-2 bg-slate-700 rounded-lg appearance-none cursor-pointer accent-cyan-500"/> +
+
+
+ Growth Rate (r) + {r.toFixed(2)} +
+ setR(parseFloat(e.target.value))} className="w-full h-2 bg-slate-700 rounded-lg appearance-none cursor-pointer accent-purple-500"/> +
+ + {model === 'verhulst' && ( + +
+ Carrying Capacity (K) + {K} +
+ setK(parseFloat(e.target.value))} className="w-full h-2 bg-slate-700 rounded-lg appearance-none cursor-pointer accent-emerald-500"/> +
+ )} +
+
+ +
+

+ Differential Equation +

+ + {model === 'malthus' ? ( +
+ +

+ Growth is proportional only to current size. +
Result: +

+
+ Unbounded growth (Unrealistic long-term) +
+
+ ) : ( +
+ +

+ Growth slows as approaches capacity . +
Result: Sigmoid Curve. +

+
+ Stabilizes at K (Sustainable) +
+
+ )} +
+
+ + {/* Graph */} +
+
+ +
+
+
+ Population N(t) +
+ {model === 'verhulst' && ( +
+
+ Capacity K +
+ )} +
+ + + {/* Grid */} + + + + {/* Capacity Line */} + {model === 'verhulst' && ( + + )} + + {/* Curve */} + + + {/* Labels */} + t=0 + t={timeEnd} + {model === 'verhulst' && ( + K={K} + )} + + + {/* Bio Simulation Overlay (Particles) */} +
+
Bio-Sim Preview
+
+ {/* Simple dot representation of population density */} + {Array.from({length: Math.min(Math.floor(activeFunc(timeEnd/2)), 100)}).map((_, i) => ( +
+ ))} +
+
+
+ +
+
+ ); +}; diff --git a/views/RadioactiveDecayView.tsx b/views/RadioactiveDecayView.tsx new file mode 100644 index 0000000..0712564 --- /dev/null +++ b/views/RadioactiveDecayView.tsx @@ -0,0 +1,144 @@ + +import React, { useState } from 'react'; +import { motion } from 'framer-motion'; +import { MathRenderer } from '../components/MathRenderer'; +import { Timer, Atom } from 'lucide-react'; + +export const RadioactiveDecayView: React.FC = () => { + const [N0, setN0] = useState(100); // Initial Nuclei + const [lambda, setLambda] = useState(0.5); // Decay constant + + const width = 600; + const height = 400; + const timeEnd = 10; + + // Decay: N(t) = N0 * e^(-lambda * t) + const calcDecay = (t: number) => N0 * Math.exp(-lambda * t); + const halfLife = Math.log(2) / lambda; + + const scaleX = (t: number) => (t / timeEnd) * width; + const scaleY = (pop: number) => height - (pop / N0) * (height * 0.8) - 20; // Padding + + const generatePath = () => { + let path = ""; + const step = 0.1; + for (let t = 0; t <= timeEnd; t += step) { + const pop = calcDecay(t); + const sx = scaleX(t); + const sy = scaleY(pop); + + if (t === 0) path += `M ${sx} ${sy}`; + else path += ` L ${sx} ${sy}`; + } + return path; + }; + + return ( +
+
+

Radioactive Decay

+

+ The probability of decay per time unit is constant. This leads to an exponential decrease in the number of active nuclei. +

+
+ +
+ +
+
+

+ Isotope Properties +

+ +
+
+
+ Initial Nuclei (Nโ‚€) + {N0} +
+ setN0(parseFloat(e.target.value))} className="w-full h-2 bg-slate-700 rounded-lg appearance-none cursor-pointer accent-cyan-500"/> +
+
+
+ Decay Constant (ฮป) + {lambda.toFixed(2)} +
+ setLambda(parseFloat(e.target.value))} className="w-full h-2 bg-slate-700 rounded-lg appearance-none cursor-pointer accent-purple-500"/> +
+
+
+ +
+
Equation
+ + +
+ +
+
Half-Life (T 1/2)
+
{halfLife.toFixed(2)}s
+

Time to reach {N0/2} nuclei

+
+
+ +
+
+ +
+
+
+ Nuclei Count +
+
+ + + {/* Grid */} + + + + {/* Half Life Marker */} + + Nโ‚€/2 + + {/* Curve */} + + + {/* Atoms Visualization */} + + {Array.from({length: 50}).map((_, i) => { + const t = i * (timeEnd / 50); + const remaining = calcDecay(t); + const decayed = N0 - remaining; + const percentDecayed = decayed / N0; + + // Simplified visual: Show atoms changing state over time + return ( + percentDecayed ? "#fbbf24" : "#334155"} + /> + ) + })} + + +
+ +
+
+ ); +}; diff --git a/views/Sequences3DView.tsx b/views/Sequences3DView.tsx new file mode 100644 index 0000000..f5ab946 --- /dev/null +++ b/views/Sequences3DView.tsx @@ -0,0 +1,128 @@ + +import React, { useState } from 'react'; +import { Canvas } from '@react-three/fiber'; +import { OrbitControls, Float, Stars } from '@react-three/drei'; +import { Dna, Settings2, Activity, Play } from 'lucide-react'; +import { DNAStrand } from '../components/DNAStrand'; + +export const Sequences3DView: React.FC = () => { + const [radius, setRadius] = useState(2); + const [climb, setClimb] = useState(0.4); + const [frequency, setFrequency] = useState(0.6); + const [showBonds, setShowBonds] = useState(true); + const [autoRotate, setAutoRotate] = useState(true); + + return ( +
+
+
+

+ Bio-Sequences +

+

+ Modeling biological structures using interleaved mathematical sequences. + a_n and b_n form the double helix backbone. +

+
+
+ +
+ + {/* Controls Overlay */} +
+
+

+ Helix Parameters +

+ +
+
+
+ Radius (Amplitude) + {radius}u +
+ setRadius(parseFloat(e.target.value))} + className="w-full h-1.5 bg-slate-700 rounded-lg appearance-none cursor-pointer accent-cyan-500" + /> +
+
+
+ Base Pair Spacing (Climb) + {climb}u +
+ setClimb(parseFloat(e.target.value))} + className="w-full h-1.5 bg-slate-700 rounded-lg appearance-none cursor-pointer accent-purple-500" + /> +
+
+
+ Twist Rate (Frequency) + {frequency} rad +
+ setFrequency(parseFloat(e.target.value))} + className="w-full h-1.5 bg-slate-700 rounded-lg appearance-none cursor-pointer accent-pink-500" + /> +
+
+
+ +
+ + +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
+

Sequence Model

+
+ x = r ยท cos(nฮธ)
+ z = r ยท sin(nฮธ) +
+
+
+
+
+ ); +}; diff --git a/views/SequencesView.tsx b/views/SequencesView.tsx new file mode 100644 index 0000000..49a8407 --- /dev/null +++ b/views/SequencesView.tsx @@ -0,0 +1,321 @@ + +import React, { useState } from 'react'; +import { motion, AnimatePresence } from 'framer-motion'; +import { TrendingUp, Activity, ArrowRight, Lightbulb, Settings2, Hash, Play, RotateCcw } from 'lucide-react'; +import { MathRenderer } from '../components/MathRenderer'; +import { WolframHelper } from '../components/WolframHelper'; + +interface SequenceArchetype { + id: string; + name: string; + formula: string; + desc: string; + analogy: string; + breakdown: { term: string, meaning: string, color: string }[]; + type: 'EXPLICIT' | 'RECURSIVE'; + params: { key: string; label: string; min: number; max: number; step: number; default: number }[]; + generate: (n: number, params: Record) => number; +} + +const archetypes: SequenceArchetype[] = [ + { + id: 'arithmetic', + name: 'Arithmetic Sequence', + formula: 'a_n = a_1 + (n-1)d', + desc: 'A sequence with a constant difference between consecutive terms. It represents linear growth or decay.', + analogy: "Like walking up a staircase. Each step rises by the exact same height (d), regardless of how high you are.", + breakdown: [ + { term: "a_1", meaning: "Starting Position", color: "text-cyan-400" }, + { term: "(n-1)", meaning: "Number of steps taken", color: "text-purple-400" }, + { term: "d", meaning: "Step Size (Common Difference)", color: "text-emerald-400" } + ], + type: 'EXPLICIT', + params: [ + { key: 'a1', label: 'Start (aโ‚)', min: -10, max: 10, step: 1, default: 0 }, + { key: 'd', label: 'Difference (d)', min: -5, max: 5, step: 0.5, default: 1 } + ], + generate: (n, p) => p.a1 + (n - 1) * p.d + }, + { + id: 'geometric', + name: 'Geometric Sequence', + formula: 'a_n = a_1 \\cdot r^{n-1}', + desc: 'A sequence where each term is multiplied by a constant ratio. Represents exponential growth or decay.', + analogy: "Like a colony of bacteria doubling every hour, or a bouncing ball reaching half its previous height.", + breakdown: [ + { term: "a_1", meaning: "Initial Amount", color: "text-cyan-400" }, + { term: "r", meaning: "Growth Multiplier (Ratio)", color: "text-pink-400" }, + { term: "n-1", meaning: "Time steps elapsed", color: "text-slate-400" } + ], + type: 'EXPLICIT', + params: [ + { key: 'a1', label: 'Start (aโ‚)', min: 1, max: 10, step: 1, default: 2 }, + { key: 'r', label: 'Ratio (r)', min: -2, max: 2, step: 0.1, default: 0.8 } + ], + generate: (n, p) => p.a1 * Math.pow(p.r, n - 1) + }, + { + id: 'fibonacci', + name: 'Fibonacci (Recursive)', + formula: 'F_n = F_{n-1} + F_{n-2}', + desc: 'Each term is the sum of the two preceding ones. Famous for appearing in nature (sunflowers, shells).', + analogy: "Like adding the last two generations of rabbits to determine the current population size.", + breakdown: [ + { term: "F_{n-1}", meaning: "Previous Term", color: "text-cyan-400" }, + { term: "F_{n-2}", meaning: "Term before previous", color: "text-purple-400" } + ], + type: 'RECURSIVE', + params: [ + { key: 'f0', label: 'First (Fโ‚€)', min: 0, max: 5, step: 1, default: 0 }, + { key: 'f1', label: 'Second (Fโ‚)', min: 1, max: 5, step: 1, default: 1 } + ], + generate: (n, p) => { + // This allows random access for graph, though inefficient for large n without memo + if (n === 1) return p.f0; + if (n === 2) return p.f1; + let a = p.f0, b = p.f1; + for (let i = 3; i <= n; i++) { + let temp = a + b; + a = b; + b = temp; + } + return b; + } + }, + { + id: 'alternating', + name: 'Harmonic Alternating', + formula: 'a_n = \\frac{(-1)^{n+1}}{n}', + desc: 'A sequence that oscillates between positive and negative values while shrinking towards zero.', + analogy: "Like a pendulum swinging back and forth, but with friction causing each swing to be shorter than the last.", + breakdown: [ + { term: "(-1)^{n+1}", meaning: "Sign Flipper", color: "text-yellow-400" }, + { term: "1/n", meaning: "Damping Factor", color: "text-emerald-400" } + ], + type: 'EXPLICIT', + params: [], // No params for this specific classic example + generate: (n, p) => Math.pow(-1, n + 1) / n + } +]; + +export const SequencesView: React.FC = () => { + const [activeId, setActiveId] = useState('arithmetic'); + const activeSeq = archetypes.find(a => a.id === activeId) || archetypes[0]; + + // Param State Management + const [params, setParams] = useState>(() => { + const initial: Record = {}; + archetypes.forEach(a => a.params.forEach(p => initial[`${a.id}_${p.key}`] = p.default)); + return initial; + }); + + const updateParam = (key: string, val: number) => { + setParams(prev => ({ ...prev, [`${activeId}_${key}`]: val })); + }; + + const getParam = (key: string) => params[`${activeId}_${key}`] ?? 0; + + // Generate Data + const nTerms = 20; + const dataPoints = Array.from({ length: nTerms }, (_, i) => { + const n = i + 1; + const currentParams: Record = {}; + activeSeq.params.forEach(p => currentParams[p.key] = getParam(p.key)); + return { n, val: activeSeq.generate(n, currentParams) }; + }); + + // Graph Scaling + const maxVal = Math.max(...dataPoints.map(d => d.val), 0.1); + const minVal = Math.min(...dataPoints.map(d => d.val), 0); + const range = maxVal - minVal || 1; + const padding = range * 0.1; + + const getY = (val: number) => { + const normalized = (val - (minVal - padding)) / (range + 2 * padding); + return 300 - (normalized * 300); // SVG Height 300 + }; + + return ( +
+
+

Sequence Archetypes

+

+ Explore the behavior of discrete mathematical patterns. + Configure parameters to observe convergence, divergence, and oscillation. +

+
+ +
+ + {/* Left: Selector */} +
+ {archetypes.map((seq) => ( + + ))} +
+ + {/* Right: Master Detail */} +
+ + +
+ + {/* Concept Header */} +
+ + {/* Definition Card */} +
+
General Formula
+ + +
+ {activeSeq.breakdown.map((item, idx) => ( +
+
+ +
+

{item.meaning}

+
+ ))} +
+
+ + {/* Intuition Card */} +
+
+

+ Intuition +

+

"{activeSeq.analogy}"

+
+

+ {activeSeq.desc} +

+
+
+ + {/* Interactive Lab */} +
+
+

+ Interactive Lab +

+ + {/* Controls */} + {activeSeq.params.length > 0 && ( +
+ {activeSeq.params.map(p => ( +
+ + updateParam(p.key, parseFloat(e.target.value))} + className="w-16 bg-slate-900 border border-slate-700 rounded px-2 py-1 text-xs text-white text-center focus:border-cyan-500 outline-none" + /> +
+ ))} +
+ )} +
+ + {/* Graph */} +
+
+ {/* X Axis Labels */} + {/* Simplified, not rendering all */} +
+ + {/* Zero Line */} + {minVal < 0 && maxVal > 0 && ( +
+ )} + + + + + + + + + + {/* Trend Line */} + { + const x = (i / (nTerms - 1)) * 100; + return `${x}%,${getY(d.val)}`; + }).join(' ')} + fill="none" + stroke="url(#seqGradient)" + strokeWidth="2" + strokeDasharray="4 4" + initial={{ pathLength: 0 }} + animate={{ pathLength: 1 }} + transition={{ duration: 1 }} + /> + + {/* Points */} + {dataPoints.map((d, i) => { + const x = (i / (nTerms - 1)) * 100; + return ( + + n={d.n}, a_n={d.val.toFixed(2)} + + ); + })} + +
+ +
+ n=1 + n={nTerms} +
+
+ + + +
+
+ + +
+ ); +}; diff --git a/views/SeriesView.tsx b/views/SeriesView.tsx new file mode 100644 index 0000000..11d7409 --- /dev/null +++ b/views/SeriesView.tsx @@ -0,0 +1,271 @@ +import React, { useState } from 'react'; +import { motion, AnimatePresence } from 'framer-motion'; +import { Layers, Sigma, AlertTriangle, CheckCircle2, BarChart3, Lightbulb, ArrowRight, LayoutList } from 'lucide-react'; +import { MathRenderer } from '../components/MathRenderer'; + +interface SeriesRule { + id: string; + name: string; + formula: string; + desc: string; + analogy: string; + breakdown: { term: string, meaning: string, color: string }[]; + convergenceCondition: string; + interactive: boolean; +} + +const seriesRules: SeriesRule[] = [ + { + id: 'geometric', + name: 'Geometric Series', + formula: '\\sum_{n=0}^{\\infty} a \\cdot r^n', + desc: 'A series where each term is found by multiplying the previous term by a fixed, non-zero number called the common ratio.', + analogy: "Like a bouncing ball that rebounds to a fraction of its previous height. Even though it bounces infinitely many times, the total distance traveled is finite.", + breakdown: [ + { term: "a", meaning: "First Term (Starting Value)", color: "text-cyan-400" }, + { term: "r", meaning: "Common Ratio (Multiplier)", color: "text-purple-400" }, + { term: "\\sum", meaning: "Summation of infinite terms", color: "text-slate-400" } + ], + convergenceCondition: "|r| < 1", + interactive: true + }, + { + id: 'harmonic', + name: 'Harmonic Series', + formula: '\\sum_{n=1}^{\\infty} \\frac{1}{n}', + desc: 'The sum of reciprocals of integers. It is the classic example of a series whose terms go to zero, yet the sum still grows to infinity.', + analogy: "Imagine stacking blocks that get slightly smaller. You can actually stack them infinitely high, even if the blocks become microscopic.", + breakdown: [ + { term: "1", meaning: "Constant Numerator", color: "text-emerald-400" }, + { term: "n", meaning: "Index (Denom increases linearly)", color: "text-pink-400" } + ], + convergenceCondition: "Diverges (Always)", + interactive: true + }, + { + id: 'pseries', + name: 'p-Series Test', + formula: '\\sum_{n=1}^{\\infty} \\frac{1}{n^p}', + desc: 'A generalization of the harmonic series. The exponent "p" determines the "speed" at which terms shrink.', + analogy: "The 'Speed Limit' of convergence. If p > 1, the terms shrink fast enough to create a finite sum. If p โ‰ค 1, they are too slow.", + breakdown: [ + { term: "n", meaning: "Base Index", color: "text-cyan-400" }, + { term: "p", meaning: "Power Parameter", color: "text-orange-400" } + ], + convergenceCondition: "p > 1", + interactive: false + }, + { + id: 'alternating', + name: 'Alternating Series', + formula: '\\sum_{n=1}^{\\infty} (-1)^{n+1} b_n', + desc: 'A series where terms switch signs (+, -, +, -). These are much more likely to converge due to cancellation.', + analogy: "Taking 2 steps forward, 1 step back, 0.5 forward, 0.25 back... You eventually settle on a specific spot.", + breakdown: [ + { term: "(-1)^{n+1}", meaning: "Sign Flipper (+1, -1...)", color: "text-yellow-400" }, + { term: "b_n", meaning: "Positive magnitude part", color: "text-slate-300" } + ], + convergenceCondition: "\\lim b_n = 0 \\text{ and } b_{n+1} \\le b_n", + interactive: true + } +]; + +export const SeriesView: React.FC = () => { + const [activeId, setActiveId] = useState('geometric'); + const [nTerms, setNTerms] = useState(15); + + // Geometric Params + const [geoA, setGeoA] = useState(1); + const [geoR, setGeoR] = useState(0.5); + + const activeRule = seriesRules.find(r => r.id === activeId) || seriesRules[0]; + + // Logic for Interactive Graph + const getData = () => { + const data = []; + let sum = 0; + for(let n=1; n<=nTerms; n++) { + let term = 0; + if (activeId === 'geometric') { + // Form: a * r^(n-1) to match index 1 visual + term = geoA * Math.pow(geoR, n-1); + } else if (activeId === 'harmonic') { + term = 1/n; + } else if (activeId === 'alternating') { + // Alt Harmonic: (-1)^(n+1) / n + term = Math.pow(-1, n+1) / n; + } + sum += term; + data.push({ n, term, sum }); + } + return data; + }; + + const graphData = getData(); + const maxSum = Math.max(...graphData.map(d => Math.abs(d.sum)), 0.1) * 1.2; + const isConvergent = + (activeId === 'geometric' && Math.abs(geoR) < 1) || + (activeId === 'alternating') || + (activeId === 'pseries'); // p=2 assumed for static pseries example + + return ( +
+
+

Infinite Series Codex

+

+ Understanding the summation of infinite sequences. Analyze convergence tests, formulas, and behaviors. +

+
+ +
+ + {/* Left: Rule Selector */} +
+ {seriesRules.map((rule) => ( + + ))} +
+ + {/* Right: Master Detail */} +
+ + +
+ + {/* Top: Formula & Breakdown */} +
+
+
Standard Form
+ + +
+ {isConvergent ? : } + {isConvergent ? 'Converges' : 'Diverges'} Condition: +
+
+ +
+

+ Anatomy +

+
+ {activeRule.breakdown.map((item, idx) => ( +
+
+ +
+

{item.meaning}

+
+ ))} +
+
+
+ + {/* Middle: Intuition */} +
+
+

+ Intuition +

+

+ "{activeRule.analogy}" +

+

+ {activeRule.desc} +

+
+
+ + {/* Bottom: Interactive Lab */} + {activeRule.interactive ? ( +
+
+

+ Interactive Lab +

+ + {activeId === 'geometric' && ( +
+ + +
+ )} +
+ +
+ {/* Zero Line */} +
+ +
+ {graphData.map((d, i) => { + const heightPercent = (d.sum / maxSum) * 50; // Scale to fit + return ( +
+ = 0 ? 'bg-cyan-500 mb-[50%]' : 'bg-pink-500 mt-[50%]'}`} + style={{ transformOrigin: d.sum >= 0 ? 'bottom' : 'top' }} + /> + {/* Point */} +
=0 ? 'mb-[50%]' : 'mt-[50%]'}`} style={{ bottom: d.sum >= 0 ? `calc(50% + ${Math.abs(heightPercent)}% - 4px)` : 'auto', top: d.sum < 0 ? `calc(50% + ${Math.abs(heightPercent)}% - 4px)` : 'auto' }} /> +
+ ) + })} +
+
+
+ n=1 + n={nTerms} +
+
+ Current Partial Sum S_{nTerms} = {graphData[graphData.length-1].sum.toFixed(5)} +
+
+ ) : ( +
+ Interactive lab not available for this general test type. +
+ )} + + +
+ +
+
+ ); +}; \ No newline at end of file diff --git a/views/Surface3DView.tsx b/views/Surface3DView.tsx new file mode 100644 index 0000000..d34867c --- /dev/null +++ b/views/Surface3DView.tsx @@ -0,0 +1,97 @@ + +import React, { useMemo, useState } from 'react'; +import { Canvas } from '@react-three/fiber'; +import { OrbitControls, Text, Grid } from '@react-three/drei'; +import * as THREE from 'three'; +import { Box, Layers, MousePointer2 } from 'lucide-react'; + +interface Surface3DViewProps { + mode: 'function' | 'limit' | 'derivative'; +} + +const SurfacePlot: React.FC<{ mode: 'function' | 'limit' | 'derivative' }> = ({ mode }) => { + const geometry = useMemo(() => { + const geo = new THREE.PlaneGeometry(10, 10, 64, 64); + const count = geo.attributes.position.count; + for (let i = 0; i < count; i++) { + const x = geo.attributes.position.getX(i); + const y = geo.attributes.position.getY(i); // Plane is XY, we displace Z + + let z = 0; + if (mode === 'limit') { + // Sinc function for limits + const r = Math.sqrt(x*x + y*y); + z = r === 0 ? 1 : Math.sin(r * 2) / (r * 2); + z *= 2; // Scale height + } else { + // Standard function f(x,y) = sin(x) + cos(y) + z = Math.sin(x) + Math.cos(y); + } + + geo.attributes.position.setZ(i, z); + } + geo.computeVertexNormals(); + return geo; + }, [mode]); + + return ( + + + + + + + + + {mode === 'derivative' && ( + // Tangent Plane Visual at (0,0) + + + + + )} + + {mode === 'limit' && ( + + + + + )} + + ); +}; + +export const Surface3DView: React.FC = ({ mode }) => { + const title = mode === 'function' ? 'Multivariable Surface' : mode === 'limit' ? '3D Limit (Sinc)' : 'Tangent Plane'; + const color = mode === 'function' ? 'text-cyan-400' : mode === 'limit' ? 'text-pink-400' : 'text-amber-400'; + + return ( +
+
+
+

+ {title} +

+

+ {mode === 'limit' + ? 'Visualizing lim(x,yโ†’0) of sin(r)/r. Note the peak at the origin.' + : mode === 'derivative' + ? 'The tangent plane represents the local linear approximation of the surface.' + : 'Exploring z = f(x,y) in 3D space.'} +

+
+
+ +
+ + + + + + + + +
+
+ ); +}; diff --git a/views/SystemsView.tsx b/views/SystemsView.tsx new file mode 100644 index 0000000..bf441c6 --- /dev/null +++ b/views/SystemsView.tsx @@ -0,0 +1,267 @@ + +import React, { useState, useMemo } from 'react'; +import { MatrixInput } from '../components/MatrixInput'; +import { MatrixData } from '../types'; +import { createMatrix, getDeterminant, replaceColumn, fmt } from '../utils/matrixMath'; +import { Database, ArrowRight, AlertTriangle, CheckCircle2, Layers, BookOpen, Calculator, Scan } from 'lucide-react'; +import { motion, AnimatePresence } from 'framer-motion'; +import { WolframHelper } from '../components/WolframHelper'; +import { MathRenderer } from '../components/MathRenderer'; + +interface Concept { + id: string; + title: string; + icon: any; + desc: string; + math: string; + anatomy: { term: string, meaning: string, color: string }[]; +} + +const concepts: Concept[] = [ + { + id: 'system', + title: 'System Matrix Form', + icon: Database, + desc: "Any system of linear equations can be expressed as a single matrix equation AX = B. This encapsulates the entire problem into a compact geometric form.", + math: "A \\cdot \\mathbf{x} = \\mathbf{b}", + anatomy: [ + { term: "A", meaning: "Coefficient Matrix (nxn)", color: "text-blue-400" }, + { term: "\\mathbf{x}", meaning: "Vector of Variables", color: "text-purple-400" }, + { term: "\\mathbf{b}", meaning: "Constant Vector", color: "text-orange-400" } + ] + }, + { + id: 'determinant', + title: 'The Determinant (W)', + icon: Scan, + desc: "The 'Main Determinant' W determines if the system has a unique solution. Geometrically, it measures how the matrix A scales volume.", + math: "W = \\det(A) \\neq 0", + anatomy: [ + { term: "W", meaning: "Main Determinant", color: "text-emerald-400" }, + { term: "\\neq 0", meaning: "Condition for Uniqueness", color: "text-red-400" } + ] + }, + { + id: 'cramer', + title: "Cramer's Formula", + icon: Calculator, + desc: "A direct method to solve for each variable individually by replacing columns in the main matrix with the constant vector B.", + math: "x_i = \\frac{W_i}{W} = \\frac{\\det(A_i)}{\\det(A)}", + anatomy: [ + { term: "x_i", meaning: "i-th Variable (x, y, z...)", color: "text-white" }, + { term: "W_i", meaning: "Det after replacing col i with b", color: "text-cyan-400" }, + { term: "W", meaning: "Original Determinant", color: "text-slate-400" } + ] + } +]; + +export const SystemsView: React.FC = () => { + const [activeConcept, setActiveConcept] = useState(concepts[0]); + const [dim, setDim] = useState(3); + const [matrixA, setMatrixA] = useState([[1, -2, 1],[0, 2, -8],[-4, 5, 9]]); + const [matrixB, setMatrixB] = useState([[0],[8],[-9]]); + + const resize = (n: number) => { + setDim(n); + setMatrixA(createMatrix(n, n, 1)); + setMatrixB(createMatrix(n, 1, 1)); + }; + + const { detA, cramerResults, solutionStatus } = useMemo(() => { + const det = getDeterminant(matrixA); + const b = matrixB.map(r => r[0]); + const results = []; + let status = "UNIQUE"; + + if (det !== null) { + if (Math.abs(det) < 0.00001) { + let allZero = true; + for(let i=0; i 0.0001) allZero = false; + } + status = allZero ? "INFINITE" : "INCONSISTENT"; + } else { + for(let i=0; i +
+
+

Linear Systems Theory

+

+ Mastering AX = B via Cramer's Rule. Understand the geometry of linear intersections. +

+
+
+ + +
+
+ +
+ + {/* Left: Concept Selector */} +
+ {concepts.map((concept) => ( + + ))} +
+ + {/* Right: Master Detail */} +
+ + +
+ + {/* Concept Header */} +
+
+

{activeConcept.title}

+

{activeConcept.desc}

+
+
+ +
+
+ + {/* Anatomy */} +
+

+ Formula Anatomy +

+
+ {activeConcept.anatomy.map((item, idx) => ( +
+
+ +
+

{item.meaning}

+
+ ))} +
+
+ + {/* Interactive Lab */} +
+
+

+ Interactive System Lab +

+
+ Status: {solutionStatus} +
+
+ +
+ {/* Matrix Inputs */} +
+
+
A
+ +
+
ร—
+
+
X
+
+ {['x','y','z'].slice(0,dim).map(v =>
{v}
)} +
+
+
=
+
+
B
+ +
+
+ + {/* Dynamic Results based on Concept */} +
+ {activeConcept.id === 'system' && ( +
+ Input the coefficients (A) and constants (B) to define your system. +
+ )} + {activeConcept.id === 'determinant' && ( +
+
Main Determinant (W)
+
+ {detA !== null ? fmt(detA) : '-'} +
+
+ {detA === 0 ? "System is Singular (No unique solution)" : "System is Non-Singular (Unique solution exists)"} +
+
+ )} + {activeConcept.id === 'cramer' && solutionStatus === 'UNIQUE' && ( +
+ {cramerResults.map((res, i) => ( +
+
+ {res.var} + = + W_{res.var}/W +
+
+ {fmt(res.det||0)} / {fmt(detA||0)} = {fmt(res.val)} +
+
+ ))} +
+ )} +
+
+
+ +
+
+
+
+ +
+ ); +}; \ No newline at end of file diff --git a/views/TaylorSeriesView.tsx b/views/TaylorSeriesView.tsx new file mode 100644 index 0000000..048f76c --- /dev/null +++ b/views/TaylorSeriesView.tsx @@ -0,0 +1,181 @@ +import React, { useState } from 'react'; +import { motion } from 'framer-motion'; +import { Waves } from 'lucide-react'; + +export const TaylorSeriesView: React.FC = () => { + const [degree, setDegree] = useState(1); + const [func, setFunc] = useState('cos'); + + const width = 600; + const height = 400; + const range = 8; // -8 to 8 + + const scaleX = (x: number) => (x + range) / (2 * range) * width; + const scaleY = (y: number) => height/2 - (y / range) * height; // Centered vertically + + // Factorial helper + const fact = (n: number): number => n <= 1 ? 1 : n * fact(n - 1); + + const functions = { + cos: { + label: 'cos(x)', + eval: (x: number) => Math.cos(x), + taylor: (x: number, n: number) => { + let sum = 0; + for(let i=0; i<=n; i++) { + // cos: (-1)^i * x^(2i) / (2i)! + const term = Math.pow(-1, i) * Math.pow(x, 2*i) / fact(2*i); + sum += term; + } + return sum; + }, + color: '#f472b6' + }, + exp: { + label: 'eหฃ', + eval: (x: number) => Math.exp(x), + taylor: (x: number, n: number) => { + let sum = 0; + for(let i=0; i<=n; i++) { + // exp: x^i / i! + const term = Math.pow(x, i) / fact(i); + sum += term; + } + return sum; + }, + color: '#22d3ee' + }, + sin: { + label: 'sin(x)', + eval: (x: number) => Math.sin(x), + taylor: (x: number, n: number) => { + let sum = 0; + for(let i=0; i<=n; i++) { + // sin: (-1)^i * x^(2i+1) / (2i+1)! + const term = Math.pow(-1, i) * Math.pow(x, 2*i+1) / fact(2*i+1); + sum += term; + } + return sum; + }, + color: '#a78bfa' + } + }; + + const activeFunc = functions[func as keyof typeof functions]; + + const generatePath = (isApproximation: boolean) => { + let path = ""; + const step = 0.1; + for(let x = -range; x <= range; x += step) { + let y; + if (isApproximation) { + y = activeFunc.taylor(x, degree); + } else { + y = activeFunc.eval(x); + } + + // Soft clamp + if (y > range/2) y = range/2; + if (y < -range/2) y = -range/2; + + const sx = scaleX(x); + const sy = scaleY(y); + + if (x === -range) path += `M ${sx} ${sy}`; + else path += ` L ${sx} ${sy}`; + } + return path; + }; + + return ( +
+
+

Taylor Series Expansion

+

+ Approximating functions using polynomials centered at a=0 (Maclaurin Series). +

+
+ +
+
+
+

Function

+
+ {Object.entries(functions).map(([key, f]) => ( + + ))} +
+ +

Approximation Degree (n)

+
+ setDegree(parseInt(e.target.value))} + className="flex-1 h-2 bg-slate-700 rounded-lg appearance-none cursor-pointer accent-cyan-500" + /> + {degree} +
+

+ Higher degrees hug the curve tighter further from the center. +

+
+ +
+
Polynomial Pโ‚™(x):
+
+ {/* Simple dynamic string based on function */} + {func === 'exp' && `1 + x + xยฒ/2! + xยณ/3! + ...`} + {func === 'cos' && `1 - xยฒ/2! + xโด/4! - ...`} + {func === 'sin' && `x - xยณ/3! + xโต/5! - ...`} +
+
+
+ +
+
+

+ Approximation Visualizer +

+
+
Exact f(x)
+
Approx Pโ‚™(x)
+
+
+ +
+ + {/* Grid */} + + + + {/* Exact Function (Ghost) */} + + + {/* Taylor Polynomial */} + + +
+
+
+
+ ); +}; \ No newline at end of file diff --git a/views/TransformationsView.tsx b/views/TransformationsView.tsx new file mode 100644 index 0000000..aa098c5 --- /dev/null +++ b/views/TransformationsView.tsx @@ -0,0 +1,173 @@ +import React, { useState } from 'react'; +import { motion } from 'framer-motion'; +import { Move, Maximize, Minimize, ArrowLeftRight, ArrowUpDown } from 'lucide-react'; + +export const TransformationsView: React.FC = () => { + // Params for A * f(B(x - C)) + D + const [a, setA] = useState(1); // Vertical Stretch/Flip + const [b, setB] = useState(1); // Horizontal Stretch/Flip + const [c, setC] = useState(0); // Horizontal Shift + const [d, setD] = useState(0); // Vertical Shift + const [funcType, setFuncType] = useState('quadratic'); + + const functions = { + quadratic: { + label: 'xยฒ', + fn: (x: number) => x*x, + latex: 'x^2' + }, + sine: { + label: 'sin(x)', + fn: (x: number) => Math.sin(x), + latex: '\\sin(x)' + }, + abs: { + label: '|x|', + fn: (x: number) => Math.abs(x), + latex: '|x|' + }, + exp: { + label: 'eหฃ', + fn: (x: number) => Math.exp(x), + latex: 'e^x' + } + }; + + const baseFunc = functions[funcType as keyof typeof functions]; + + const width = 600; + const height = 400; + const range = 10; // -10 to 10 + + const scaleX = (x: number) => (x + range) / (2 * range) * width; + const scaleY = (y: number) => height - (y + range) / (2 * range) * height; + + const generatePath = (transform: boolean) => { + let path = ""; + const step = 0.1; + for(let x = -range; x <= range; x += step) { + let y; + if (!transform) { + y = baseFunc.fn(x); + } else { + // y = a * f(b(x-c)) + d + y = a * baseFunc.fn(b * (x - c)) + d; + } + + // Clamp for drawing + if (y > range * 2) y = range * 2; + if (y < -range * 2) y = -range * 2; + + const sx = scaleX(x); + const sy = scaleY(y); + + if (x === -range) path += `M ${sx} ${sy}`; + else path += ` L ${sx} ${sy}`; + } + return path; + }; + + const reset = () => { + setA(1); setB(1); setC(0); setD(0); + }; + + return ( +
+
+

Function Transformations

+

+ Interactive manipulation of g(x) = Aยทf(B(x - C)) + D +

+
+ +
+ {/* Controls */} +
+
+ {Object.entries(functions).map(([key, f]) => ( + + ))} +
+ +
+
+
+ + {d.toFixed(1)} +
+ setD(parseFloat(e.target.value))} className="w-full h-1 bg-slate-700 rounded-lg appearance-none accent-cyan-500"/> +
+ +
+
+ + {c.toFixed(1)} +
+ setC(parseFloat(e.target.value))} className="w-full h-1 bg-slate-700 rounded-lg appearance-none accent-cyan-500"/> +
+ +
+
+ + {a.toFixed(1)} +
+ setA(parseFloat(e.target.value))} className="w-full h-1 bg-slate-700 rounded-lg appearance-none accent-purple-500"/> +
+ +
+
+ + {b.toFixed(1)} +
+ setB(parseFloat(e.target.value))} className="w-full h-1 bg-slate-700 rounded-lg appearance-none accent-purple-500"/> +
+
+ + +
+ + {/* Graph */} +
+
+ +
+
+ g(x) = {a !== 1 && a} + f( + {b !== 1 && b} + (x {c < 0 ? '+' : '-'} {Math.abs(c)}) + ) {d >= 0 ? '+' : '-'} {Math.abs(d)} +
+
+ +
+ + {/* Grid */} + + + + {/* Base Function (Ghost) */} + + + {/* Transformed Function */} + + +
+
+
+
+ ); +}; \ No newline at end of file diff --git a/views/VectorOperations3DView.tsx b/views/VectorOperations3DView.tsx new file mode 100644 index 0000000..fe7e420 --- /dev/null +++ b/views/VectorOperations3DView.tsx @@ -0,0 +1,209 @@ +import React, { useState, useMemo } from 'react'; +import { Canvas } from '@react-three/fiber'; +import { OrbitControls, Grid, Text, Float } from '@react-three/drei'; +import * as THREE from 'three'; +import { ArrowUpRight, Maximize2, Move3d, Variable } from 'lucide-react'; +import { MathRenderer } from '../components/MathRenderer'; + +// Reuse VectorArrow component +const VectorArrow: React.FC<{ start?: THREE.Vector3; end: THREE.Vector3; color: string; label?: string; scale?: number }> = ({ start = new THREE.Vector3(0,0,0), end, color, label, scale = 1 }) => { + const dir = new THREE.Vector3().subVectors(end, start).normalize(); + const length = start.distanceTo(end); + + if (length < 0.01) return null; + + return ( + + + {label && ( + + {label} + + )} + + ); +}; + +const PlaneSpan: React.FC<{ v1: THREE.Vector3, v2: THREE.Vector3 }> = ({ v1, v2 }) => { + const geometry = useMemo(() => { + const geo = new THREE.BufferGeometry(); + // Create a parallelogram from origin, v1, v1+v2, v2 + const vertices = new Float32Array([ + 0, 0, 0, + v1.x, v1.y, v1.z, + v2.x, v2.y, v2.z, + + v1.x, v1.y, v1.z, + v1.x + v2.x, v1.y + v2.y, v1.z + v2.z, + v2.x, v2.y, v2.z + ]); + geo.setAttribute('position', new THREE.BufferAttribute(vertices, 3)); + geo.computeVertexNormals(); + return geo; + }, [v1, v2]); + + return ( + + + + ); +}; + +export const VectorOperations3DView: React.FC = () => { + const [u, setU] = useState({ x: 3, y: 0, z: 0 }); + const [v, setV] = useState({ x: 0, y: 3, z: 2 }); + const [showAdd, setShowAdd] = useState(true); + const [showCross, setShowCross] = useState(true); + const [showPlane, setShowPlane] = useState(true); + + const vecU = new THREE.Vector3(u.x, u.y, u.z); + const vecV = new THREE.Vector3(v.x, v.y, v.z); + + const vecAdd = new THREE.Vector3().addVectors(vecU, vecV); + const vecCross = new THREE.Vector3().crossVectors(vecU, vecV); + const dotProd = vecU.dot(vecV); + + return ( +
+
+
+

+ Vector Operations 3D +

+

+ Interactive laboratory for visualizing Addition, Dot Product, and Cross Product in 3D space. +

+
+
+
+
Dot Product
+
{dotProd.toFixed(1)}
+
+
+
+
Cross Mag
+
{vecCross.length().toFixed(1)}
+
+
+
+ +
+ + {/* Controls */} +
+ + {/* Vector U Controls */} +
+

+ Vector u +

+
+ {['x', 'y', 'z'].map((axis) => ( +
+
+ {axis}-axis + {u[axis as keyof typeof u]} +
+ setU(p => ({...p, [axis]: parseFloat(e.target.value)}))} + className="w-full h-1.5 bg-slate-700 rounded-lg appearance-none cursor-pointer accent-cyan-500" + /> +
+ ))} +
+
+ + {/* Vector V Controls */} +
+

+ Vector v +

+
+ {['x', 'y', 'z'].map((axis) => ( +
+
+ {axis}-axis + {v[axis as keyof typeof v]} +
+ setV(p => ({...p, [axis]: parseFloat(e.target.value)}))} + className="w-full h-1.5 bg-slate-700 rounded-lg appearance-none cursor-pointer accent-purple-500" + /> +
+ ))} +
+
+ + {/* Toggles */} +
+ + + +
+ + {/* Legend */} +
+
Vector u
+
Vector v
+
Sum (u+v)
+
Cross (uร—v)
+
+
+ + {/* 3D Viewport */} +
+ + + + + + + + + + {/* Axes */} + + + {/* Vectors */} + + + + {/* Addition Parallelogram visual */} + {showAdd && ( + <> + + + + + )} + + {/* Cross Product */} + {showCross && ( + + )} + + {/* Plane */} + {showPlane && } + + +
+ Drag to Rotate โ€ข Scroll to Zoom +
+
+
+
+ ); +}; \ No newline at end of file diff --git a/views/__tests__/AIChatView.test.tsx b/views/__tests__/AIChatView.test.tsx new file mode 100644 index 0000000..bdb909e --- /dev/null +++ b/views/__tests__/AIChatView.test.tsx @@ -0,0 +1,46 @@ +import React from 'react'; +import { render, screen, fireEvent } from '@testing-library/react'; +import { describe, it, expect, vi, beforeEach } from 'vitest'; +import { AIChatView } from '../AIChatView'; + +const localStorageMock = (() => { + let store: Record = {}; + + return { + getItem: vi.fn((key: string) => store[key] || null), + setItem: vi.fn((key: string, value: string) => { + store[key] = value.toString(); + }), + clear: vi.fn(() => { + store = {}; + }), + removeItem: vi.fn((key: string) => { + delete store[key]; + }), + }; +})(); + +Object.defineProperty(window, 'localStorage', { + value: localStorageMock, +}); + +describe('AIChatView performance', () => { + beforeEach(() => { + vi.clearAllMocks(); + localStorageMock.clear(); + }); + + it('does not reread localStorage when the user types a message', () => { + render(); + + const initialCalls = localStorageMock.getItem.mock.calls.length; + expect(initialCalls).toBeGreaterThan(0); + + const input = screen.getByRole('textbox', { + name: /ask a math question/i, + }); + fireEvent.change(input, { target: { value: 'test' } }); + + expect(localStorageMock.getItem.mock.calls.length).toBe(initialCalls); + }); +}); diff --git a/vite.config.ts b/vite.config.ts new file mode 100644 index 0000000..4010c8f --- /dev/null +++ b/vite.config.ts @@ -0,0 +1,30 @@ +/// +import path from 'path'; +import { defineConfig, loadEnv } from 'vite'; +import react from '@vitejs/plugin-react'; + +export default defineConfig(({ mode }) => { + const env = loadEnv(mode, '.', ''); + return { + server: { + port: 3000, + host: '0.0.0.0', + }, + base: '/Math-Biotech-Project/', + plugins: [react()], + test: { + globals: true, + environment: 'jsdom', + setupFiles: './vitest.setup.ts', + }, + define: { + 'process.env.API_KEY': JSON.stringify(env.GEMINI_API_KEY), + 'process.env.GEMINI_API_KEY': JSON.stringify(env.GEMINI_API_KEY) + }, + resolve: { + alias: { + '@': path.resolve(__dirname, '.'), + } + } + }; +}); diff --git a/vitest.setup.ts b/vitest.setup.ts new file mode 100644 index 0000000..a6b245d --- /dev/null +++ b/vitest.setup.ts @@ -0,0 +1,4 @@ +import '@testing-library/jest-dom'; + +// Mock scrollIntoView for JSDOM +window.HTMLElement.prototype.scrollIntoView = function() {}; From acd14c1d52b94f8725b6686aedcc4c0ece5984b6 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 6 Aug 2026 06:36:57 +0000 Subject: [PATCH 2/9] feat: establish Math-CS foundation --- .pages-release | 4 +- README.md | 171 +-- data/branding.test.ts | 28 +- data/branding.ts | 8 +- data/courseCatalog.test.ts | 34 + data/courseCatalog.ts | 40 + data/courses/linearAlgebraGeometry.ts | 22 + data/courses/mathAnalysis.ts | 21 + data/courses/topicFactory.ts | 86 ++ .../plans/2026-08-06-math-cs-review-notes.md | 14 + docs/superpowers/plans/2026-08-06-math-cs.md | 1093 +++++++++++++++++ domain/curriculum.ts | 74 ++ index.html | 2 +- manifest.json | 32 +- metadata.json | 7 +- package-lock.json | 62 +- package.json | 4 +- utils/mathCsStorage.test.ts | 27 + utils/mathCsStorage.ts | 73 ++ utils/progress.test.ts | 28 + utils/progress.ts | 58 + vite.config.ts | 2 +- 22 files changed, 1670 insertions(+), 220 deletions(-) create mode 100644 data/courseCatalog.test.ts create mode 100644 data/courseCatalog.ts create mode 100644 data/courses/linearAlgebraGeometry.ts create mode 100644 data/courses/mathAnalysis.ts create mode 100644 data/courses/topicFactory.ts create mode 100644 docs/superpowers/plans/2026-08-06-math-cs-review-notes.md create mode 100644 docs/superpowers/plans/2026-08-06-math-cs.md create mode 100644 domain/curriculum.ts create mode 100644 utils/mathCsStorage.test.ts create mode 100644 utils/mathCsStorage.ts create mode 100644 utils/progress.test.ts create mode 100644 utils/progress.ts diff --git a/.pages-release b/.pages-release index 0f83862..2ad1636 100644 --- a/.pages-release +++ b/.pages-release @@ -1,3 +1 @@ -Math Biotech GitHub Pages release -Deployed: 2026-08-06T00:18:30+02:00 -Site path: /Math-Biotech-Project/site/ +Generated GitHub Pages output for Inmerson/Math-CS from main. diff --git a/README.md b/README.md index bebb579..96c9cf3 100644 --- a/README.md +++ b/README.md @@ -1,174 +1,25 @@ -# Inmerson โ€ข Personal Math & Biotech Lab +# Inmerson Math-CS -A personal mathematics and biotechnology learning laboratory by Inmerson, designed to be published as a responsive web app, an installable PWA and native mobile packages from one shared codebase. +**Interactive Mathematics for Computer Science** -The project combines interactive mathematical learning, biotechnology-oriented examples, three-dimensional visualizations and a REST API for deterministic calculations and study records. +A Computational Notebook-style learning workspace aligned with the first mathematics sequence in PJATK Computer Science: -## Project status +- **Math I โ€” Mathematical Analysis:** functions, sequences, limits, continuity, derivatives, integrals, and Taylor series. +- **Math II โ€” Linear Algebra & Geometry:** vectors, matrices, linear systems, determinants, inverses, vector spaces, transformations, eigenvalues, and analytic geometry. -**Active development โ€” public transition repository** +The application combines concise theory, KaTeX formulas, worked examples, computer-science connections, bounded interactive laboratories, deterministic practice, mock exams, and local progress tracking. The three principal laboratories are Function Explorer, Matrix Lab, and Vector & Geometry Lab. -The source is publicly visible, but a final open-source license has not yet been selected. Until a `LICENSE` file is added, public visibility alone does not grant general reuse rights. - -## Current capabilities - -- Biotechnology-oriented mathematical lessons and examples -- Matrix addition, multiplication, determinant and inverse workflows -- Exam-performance tracking and statistics -- Formula rendering with KaTeX -- Interactive 3D content through Three.js -- AI-assisted explanations -- Installable PWA support -- Android packaging through Capacitor -- REST API for calculations and study integrations - -## Technology - -### Client - -- React 19 and TypeScript -- Vite and Tailwind CSS -- Math.js and KaTeX -- Three.js, React Three Fiber and Drei -- Framer Motion -- Vite PWA -- Capacitor for Android -- Vitest and Testing Library - -### Backend - -- Node.js and Express -- TypeScript -- Environment-based server configuration - -## Architecture - -```text -Web / PWA / Capacitor mobile client - โ”‚ - โ–ผ - Versioned REST API - โ”‚ - โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” - โ–ผ โ–ผ -Deterministic math Study records and -operations controlled AI gateway -``` - -The web, PWA and mobile builds should share the same course logic. Platform-specific capabilities belong behind explicit adapters rather than in separate copies of the application. - -## Web development - -Install dependencies and start the client: +## Development ```bash -npm install +npm ci --include=optional npm run dev ``` -Create and preview a production build: - -```bash -npm run build -npm run preview -``` - -## Backend development - -```bash -cd server -npm install -npm run dev -``` - -The development API is available by default at: - -```text -http://localhost:5000 -``` - -Build and start the compiled backend: - -```bash -npm run build -npm start -``` - -Backend details are available in [`server/README.md`](server/README.md). - -## Mobile development - -The repository contains Capacitor Android support. After a successful web build, synchronize the native project and open it in Android Studio: +Run the complete quality gate with: ```bash -npm run build -npx cap sync android -npx cap open android +npm run verify ``` -Native releases should be generated from tagged commits through CI. Downloadable APK files should include release notes and checksums. - -## AI security transition - -The current AI interface includes a bring-your-own-key browser flow. Browser-persisted API keys are not an acceptable production design and must be removed before an official hosted release. - -The target design is an authenticated backend AI gateway with: - -- No provider credential in the web or mobile bundle -- No API key stored in `localStorage` -- Per-user authorization -- Input-size and rate limits -- Usage quotas and cost monitoring -- Provider timeout handling -- Explicit response schemas -- Safe Markdown rendering -- Minimal logs that exclude private learning content - -AI explanations must remain secondary to deterministic mathematical verification. - -## Testing priorities - -- Matrix and numerical calculations -- Invalid and boundary inputs -- Formula parsing and rendering -- Exam scoring and progress calculations -- API request validation -- AI response-schema handling -- Consistency between web and mobile builds - -Run the existing client tests with: - -```bash -npx vitest run -``` - -Run the current backend API check from `server/`: - -```bash -npm test -``` - -## Open-source release requirements - -Before declaring the project fully open source: - -- [ ] Select and add an open-source license. -- [ ] Audit the current tree and full Git history for credentials and private files. -- [ ] Remove browser-persisted API-key handling. -- [ ] Route production AI calls through the backend. -- [ ] Consolidate the roles of `Math-Biotech-App` and `Math-Biotech-Project`. -- [ ] Add CI for tests, builds, dependency review and secret scanning. -- [ ] Add `CONTRIBUTING.md`, `SECURITY.md` and a code of conduct. -- [ ] Document the license and source of course content and visual assets. -- [ ] Publish reproducible web and Android release procedures. -- [ ] Add privacy, export and account-deletion documentation where user data is stored. - -The shared strategy for Math, Botany and Organic Chemistry is documented in the private Inmerse workspace roadmap. - -## Scientific and educational responsibility - -Mathematical results and AI-generated explanations should be independently checked before academic, laboratory, clinical or professional use. Simplified models should be identified as models rather than complete representations of living systems. - -## Author - -Developed by [Halil Ibrahim Ozturk](https://github.com/Inmerson). +The application uses React, TypeScript, Vite, Vitest, Tailwind CSS, Framer Motion, KaTeX, Math.js, React Three Fiber, and Capacitor. diff --git a/data/branding.test.ts b/data/branding.test.ts index 8bc8d0c..b865890 100644 --- a/data/branding.test.ts +++ b/data/branding.test.ts @@ -7,24 +7,14 @@ import { BRAND_TAGLINE, } from './branding'; -describe('personal branding', () => { - it('uses the approved Inmerson identity', () => { - expect(BRAND_NAME).toBe('Inmerson'); - expect(BRAND_TAGLINE).toBe('Personal Math & Biotech Lab'); - expect(BRAND_FULL_NAME).toBe('Inmerson โ€ข Personal Math & Biotech Lab'); - expect(BRAND_SHORT_NAME).toBe('Inmerson Lab'); - }); - - it('contains no university attribution', () => { - const branding = [ - BRAND_NAME, - BRAND_TAGLINE, - BRAND_FULL_NAME, - BRAND_SHORT_NAME, - BRAND_DESCRIPTION, - ].join(' '); - - expect(branding).not.toContain('Warsaw University of Life Sciences'); - expect(branding).not.toContain('SGGW'); +describe('Math-CS branding', () => { + it('uses the approved identity', () => { + expect(BRAND_NAME).toBe('Inmerson Math-CS'); + expect(BRAND_TAGLINE).toBe('Interactive Mathematics for Computer Science'); + expect(BRAND_FULL_NAME).toBe('Inmerson Math-CS โ€ข Interactive Mathematics for Computer Science'); + expect(BRAND_SHORT_NAME).toBe('Math-CS'); + expect(BRAND_DESCRIPTION).toContain('Mathematical Analysis'); + expect(BRAND_DESCRIPTION).toContain('Linear Algebra'); + expect(BRAND_DESCRIPTION).not.toMatch(/biotech|biology|DNA/i); }); }); diff --git a/data/branding.ts b/data/branding.ts index 757d9d5..a017c03 100644 --- a/data/branding.ts +++ b/data/branding.ts @@ -1,5 +1,5 @@ -export const BRAND_NAME = 'Inmerson'; -export const BRAND_TAGLINE = 'Personal Math & Biotech Lab'; +export const BRAND_NAME = 'Inmerson Math-CS'; +export const BRAND_TAGLINE = 'Interactive Mathematics for Computer Science'; export const BRAND_FULL_NAME = `${BRAND_NAME} โ€ข ${BRAND_TAGLINE}`; -export const BRAND_SHORT_NAME = 'Inmerson Lab'; -export const BRAND_DESCRIPTION = 'A personal interactive laboratory for mathematical modeling, biotechnology, observation and learning.'; +export const BRAND_SHORT_NAME = 'Math-CS'; +export const BRAND_DESCRIPTION = 'A focused interactive workspace for Mathematical Analysis and Linear Algebra & Geometry in computer science.'; diff --git a/data/courseCatalog.test.ts b/data/courseCatalog.test.ts new file mode 100644 index 0000000..70b506a --- /dev/null +++ b/data/courseCatalog.test.ts @@ -0,0 +1,34 @@ +import { describe, expect, it } from 'vitest'; +import { COURSES, getTopic, searchTopics } from './courseCatalog'; + +describe('Math-CS course catalog', () => { + it('contains exactly the two approved courses and complete topic paths', () => { + expect(COURSES.map((course) => course.id)).toEqual([ + 'math-analysis', + 'linear-algebra-geometry', + ]); + expect(COURSES.every((course) => course.topics.length >= 8)).toBe(true); + expect(getTopic('math-analysis', 'limits')?.title).toBe('Limits'); + expect(getTopic('linear-algebra-geometry', 'matrices')?.title).toBe('Matrices and Matrix Operations'); + }); + + it('contains complete learning material and no excluded domains', () => { + for (const course of COURSES) { + for (const topic of course.topics) { + expect(topic.learningObjectives.length).toBeGreaterThan(0); + expect(topic.sections.length).toBeGreaterThan(0); + expect(topic.workedExamples.length).toBeGreaterThan(0); + expect(topic.csConnections.length).toBeGreaterThan(0); + expect(topic.practiceQuestions.length).toBeGreaterThanOrEqual(2); + expect(topic.quiz.questions.length).toBeGreaterThanOrEqual(3); + } + } + expect(JSON.stringify(COURSES)).not.toMatch(/biotech|biology|DNA|population|radioactive|discrete mathematics/i); + }); + + it('searches topics without accents or mutation', () => { + expect(searchTopics('eigen', 5)[0]?.topic.id).toBe('eigenvalues-eigenvectors'); + expect(searchTopics('analiza', 5).length).toBeGreaterThan(0); + expect(COURSES[0].id).toBe('math-analysis'); + }); +}); diff --git a/data/courseCatalog.ts b/data/courseCatalog.ts new file mode 100644 index 0000000..803ef0c --- /dev/null +++ b/data/courseCatalog.ts @@ -0,0 +1,40 @@ +import { CourseDefinition, CourseId, TopicDefinition, TopicId } from '../domain/curriculum'; +import { linearAlgebraGeometryCourse } from './courses/linearAlgebraGeometry'; +import { mathAnalysisCourse } from './courses/mathAnalysis'; + +export const COURSES: readonly CourseDefinition[] = Object.freeze([ + mathAnalysisCourse, + linearAlgebraGeometryCourse, +]); + +const normalize = (value: string): string => value + .normalize('NFD') + .replace(/[\u0300-\u036f]/g, '') + .toLowerCase() + .trim(); + +export const getCourse = (courseId: CourseId): CourseDefinition | undefined => + COURSES.find((course) => course.id === courseId); + +export const getTopic = (courseId: CourseId, topicId: TopicId): TopicDefinition | undefined => + getCourse(courseId)?.topics.find((topic) => topic.id === topicId); + +export const searchTopics = ( + query: string, + limit = 6, +): { course: CourseDefinition; topic: TopicDefinition }[] => { + const tokens = normalize(query).split(/\s+/).filter(Boolean); + if (tokens.length === 0) return []; + return COURSES.flatMap((course) => course.topics.map((topic) => ({ course, topic }))) + .filter(({ course, topic }) => { + const text = normalize(`${course.title} ${course.officialTitle} ${topic.title} ${topic.description} ${topic.learningObjectives.join(' ')}`); + return tokens.every((token) => text.includes(token)); + }) + .sort((a, b) => { + const aTitle = normalize(a.topic.title); + const bTitle = normalize(b.topic.title); + const q = normalize(query); + return Number(!aTitle.startsWith(q)) - Number(!bTitle.startsWith(q)) || aTitle.localeCompare(bTitle); + }) + .slice(0, limit); +}; diff --git a/data/courses/linearAlgebraGeometry.ts b/data/courses/linearAlgebraGeometry.ts new file mode 100644 index 0000000..03995cf --- /dev/null +++ b/data/courses/linearAlgebraGeometry.ts @@ -0,0 +1,22 @@ +import { CourseDefinition } from '../../domain/curriculum'; +import { createTopic } from './topicFactory'; + +export const linearAlgebraGeometryCourse: CourseDefinition = { + id: 'linear-algebra-geometry', + title: 'Linear Algebra & Geometry', + officialTitle: 'Algebra liniowa i geometria', + shortTitle: 'Math II', + description: 'Vectors, matrices, transformations, systems, and geometric structure in two and three dimensions.', + order: 2, + topics: [ + createTopic({ id: 'vectors', courseId: 'linear-algebra-geometry', title: 'Vectors', description: 'Represent magnitude and direction and perform vector operations.', objective: 'Compute vector sums, scalar multiples, norms, and dot products.', theory: 'A vector is an ordered coordinate object that supports addition and scalar multiplication.', formulaLabel: 'Dot product', formulaLatex: '\\mathbf{u}\\cdot\\mathbf{v}=\\sum_i u_i v_i', formulaExplanation: 'The dot product measures alignment and supports angle calculations.', visualization: 'vector-geometry-lab', example: ['Take u=(1,2) and v=(3,4).', 'Multiply corresponding coordinates.', 'Add to obtain 11.'], csTitle: 'Graphics and embeddings', csExplanation: 'Vectors encode positions, colours, features, and learned representations.', checkPrompt: 'Which vector operation measures alignment?', checkAnswer: 'Dot product', numericPrompt: 'What is (1,2)ยท(3,4)?', numericAnswer: 11, difficulty: 1 }), + createTopic({ id: 'matrices', courseId: 'linear-algebra-geometry', title: 'Matrices and Matrix Operations', description: 'Organize linear data and compute addition, multiplication, and transpose operations.', prerequisites: ['vectors'], objective: 'Perform compatible matrix operations.', theory: 'A matrix represents a linear map or a structured rectangular table of coefficients.', formulaLabel: 'Matrix product', formulaLatex: '(AB)_{ij}=\\sum_k a_{ik}b_{kj}', formulaExplanation: 'Rows of A combine with columns of B.', visualization: 'matrix-lab', example: ['Use a 1ร—2 row and 2ร—1 column.', 'Multiply matching entries.', 'Add the products.'], csTitle: 'Data and transformations', csExplanation: 'Matrices drive graphics pipelines, data processing, and machine-learning layers.', checkPrompt: 'What compatibility is required for AB?', checkAnswer: 'Columns of A equal rows of B', numericPrompt: 'What is [1 2] times [3;4]?', numericAnswer: 11, difficulty: 1 }), + createTopic({ id: 'linear-systems', courseId: 'linear-algebra-geometry', title: 'Systems of Linear Equations', description: 'Solve simultaneous linear constraints with elimination and row reduction.', prerequisites: ['matrices'], objective: 'Classify and solve linear systems.', theory: 'A linear system can have one solution, no solution, or infinitely many solutions.', formulaLabel: 'Matrix form', formulaLatex: 'A\\mathbf{x}=\\mathbf{b}', formulaExplanation: 'The coefficient matrix acts on the unknown vector.', visualization: 'matrix-lab', example: ['Write the augmented matrix.', 'Apply elementary row operations.', 'Read the solution from row-echelon form.'], csTitle: 'Constraint solving', csExplanation: 'Linear systems appear in rendering, optimization, networks, and numerical models.', checkPrompt: 'Which method systematically reduces an augmented matrix?', checkAnswer: 'Gaussian elimination', numericPrompt: 'Solve x+y=3 and x-y=1 for x.', numericAnswer: 2 }), + createTopic({ id: 'determinants', courseId: 'linear-algebra-geometry', title: 'Determinants', description: 'Measure oriented scaling and detect invertibility of square matrices.', prerequisites: ['matrices'], objective: 'Compute and interpret determinants.', theory: 'The determinant records area or volume scaling and vanishes when dimensions collapse.', formulaLabel: '2ร—2 determinant', formulaLatex: '\\det\\begin{pmatrix}a&b\\\\c&d\\end{pmatrix}=ad-bc', formulaExplanation: 'The determinant compares diagonal products.', visualization: 'matrix-lab', example: ['Use [[1,2],[3,4]].', 'Compute 1ยท4-2ยท3.', 'The determinant is -2.'], csTitle: 'Invertibility checks', csExplanation: 'Determinants help diagnose singular transformations and degenerate geometry.', checkPrompt: 'What determinant value signals a singular matrix?', checkAnswer: 'Zero', numericPrompt: 'What is det [[1,2],[3,4]]?', numericAnswer: -2 }), + createTopic({ id: 'matrix-inverses', courseId: 'linear-algebra-geometry', title: 'Matrix Inverses', description: 'Reverse invertible linear transformations and solve matrix equations.', prerequisites: ['determinants'], objective: 'Find inverses with row reduction.', theory: 'An inverse exists exactly when a square matrix is nonsingular.', formulaLabel: 'Inverse identity', formulaLatex: 'AA^{-1}=A^{-1}A=I', formulaExplanation: 'The inverse undoes the action of A.', visualization: 'matrix-lab', example: ['Augment A with I.', 'Row reduce A to I.', 'The transformed right block is A^{-1}.'], csTitle: 'Undoing transforms', csExplanation: 'Inverse matrices reverse coordinate, camera, and calibration transformations.', checkPrompt: 'What condition guarantees a square matrix has an inverse?', checkAnswer: 'Its determinant is nonzero', numericPrompt: 'What is the inverse scalar of 4?', numericAnswer: 0.25 }), + createTopic({ id: 'vector-spaces', courseId: 'linear-algebra-geometry', title: 'Vector Spaces', description: 'Study spans, subspaces, linear independence, bases, and dimension.', prerequisites: ['vectors', 'linear-systems'], objective: 'Determine whether vectors form a basis.', theory: 'A vector space is closed under addition and scalar multiplication and contains a zero vector.', formulaLabel: 'Linear combination', formulaLatex: '\\sum_i c_i\\mathbf{v}_i', formulaExplanation: 'The span consists of all such combinations.', visualization: 'vector-geometry-lab', example: ['Take e1 and e2 in Rยฒ.', 'Show they are independent.', 'Their span is all of Rยฒ.'], csTitle: 'Feature spaces', csExplanation: 'Vector spaces formalize coordinates, signals, codewords, and feature representations.', checkPrompt: 'What is a minimal independent spanning set called?', checkAnswer: 'A basis', numericPrompt: 'What is the dimension of Rยณ?', numericAnswer: 3 }), + createTopic({ id: 'linear-transformations', courseId: 'linear-algebra-geometry', title: 'Linear Transformations', description: 'Map vectors while preserving addition and scalar multiplication.', prerequisites: ['matrices', 'vector-spaces'], objective: 'Represent and interpret linear maps with matrices.', theory: 'A linear transformation preserves vector-space structure and is determined by its action on a basis.', formulaLabel: 'Linearity', formulaLatex: 'T(a\\mathbf{u}+b\\mathbf{v})=aT(\\mathbf{u})+bT(\\mathbf{v})', formulaExplanation: 'Linear maps preserve combinations.', visualization: 'vector-geometry-lab', example: ['Choose a scaling matrix.', 'Apply it to basis vectors.', 'Infer the transformation of any vector.'], csTitle: 'Rendering pipelines', csExplanation: 'Linear transforms scale, rotate, project, and change coordinates in graphics.', checkPrompt: 'What structure must a linear transformation preserve?', checkAnswer: 'Linear combinations', numericPrompt: 'Scaling (2,3) by 2 gives x-coordinate?', numericAnswer: 4 }), + createTopic({ id: 'eigenvalues-eigenvectors', courseId: 'linear-algebra-geometry', title: 'Eigenvalues and Eigenvectors', description: 'Find invariant directions and their scaling factors under a linear map.', prerequisites: ['determinants', 'linear-transformations'], objective: 'Compute eigenvalues of simple matrices.', theory: 'An eigenvector keeps its direction under a linear transformation while its magnitude is scaled.', formulaLabel: 'Eigen equation', formulaLatex: 'A\\mathbf{v}=\\lambda\\mathbf{v}', formulaExplanation: 'The nonzero vector v is scaled by ฮป.', visualization: 'matrix-lab', example: ['Use a diagonal matrix.', 'Apply it to a coordinate basis vector.', 'Read the matching diagonal eigenvalue.'], csTitle: 'Principal structure', csExplanation: 'Eigenvectors support dimensionality reduction, ranking, stability, and spectral algorithms.', checkPrompt: 'What remains unchanged for an eigenvector?', checkAnswer: 'Its direction', numericPrompt: 'What is an eigenvalue of diag(2,3) for e1?', numericAnswer: 2 }), + createTopic({ id: 'analytic-geometry', courseId: 'linear-algebra-geometry', title: 'Analytic Geometry in 2D and 3D', description: 'Describe lines, planes, distances, intersections, and angles with coordinates.', prerequisites: ['vectors', 'linear-systems'], objective: 'Form equations of lines and planes.', theory: 'Coordinate equations translate geometric incidence and distance into vector and algebraic calculations.', formulaLabel: 'Plane equation', formulaLatex: '\\mathbf{n}\\cdot(\\mathbf{x}-\\mathbf{x}_0)=0', formulaExplanation: 'Every displacement in the plane is orthogonal to its normal vector.', visualization: 'vector-geometry-lab', example: ['Choose point x0 and normal n.', 'Insert a general point x.', 'Expand the dot product to obtain the plane equation.'], csTitle: 'Computational geometry', csExplanation: 'Lines and planes support ray tracing, collision tests, robotics, and spatial indexing.', checkPrompt: 'Which vector is perpendicular to a plane?', checkAnswer: 'Its normal vector', numericPrompt: 'Distance from (0,0) to (3,4)?', numericAnswer: 5 }), + ], +}; diff --git a/data/courses/mathAnalysis.ts b/data/courses/mathAnalysis.ts new file mode 100644 index 0000000..94a0176 --- /dev/null +++ b/data/courses/mathAnalysis.ts @@ -0,0 +1,21 @@ +import { CourseDefinition } from '../../domain/curriculum'; +import { createTopic } from './topicFactory'; + +export const mathAnalysisCourse: CourseDefinition = { + id: 'math-analysis', + title: 'Mathematical Analysis', + officialTitle: 'Analiza matematyczna', + shortTitle: 'Math I', + description: 'Continuous change, approximation, accumulation, and the behaviour of functions.', + order: 1, + topics: [ + createTopic({ id: 'functions-graphs', courseId: 'math-analysis', title: 'Functions and Graphs', description: 'Represent input-output relationships through notation, domains, ranges, and graphs.', objective: 'Interpret a function algebraically and visually.', theory: 'A function assigns each admissible input exactly one output. Its graph makes domain, range, intercepts, and transformations observable.', formulaLabel: 'Function value', formulaLatex: 'y=f(x)', formulaExplanation: 'The output y is determined by applying f to x.', visualization: 'function-explorer', example: ['Choose f(x)=x^2.', 'Evaluate f(2)=4.', 'Plot symmetric points around the y-axis.'], csTitle: 'Program behaviour', csExplanation: 'Functions model deterministic transformations in programs and data pipelines.', checkPrompt: 'What must a mathematical function assign to each valid input?', checkAnswer: 'Exactly one output', numericPrompt: 'For f(x)=x^2, what is f(3)?', numericAnswer: 9, difficulty: 1 }), + createTopic({ id: 'sequences', courseId: 'math-analysis', title: 'Sequences', description: 'Study ordered numerical values, monotonicity, bounds, and convergence.', prerequisites: ['functions-graphs'], objective: 'Determine whether a sequence approaches a finite limit.', theory: 'A sequence is a function on the natural numbers. Convergence describes stable long-run behaviour as the index grows.', formulaLabel: 'Sequence limit', formulaLatex: '\\lim_{n\\to\\infty}a_n=L', formulaExplanation: 'Terms become arbitrarily close to L for sufficiently large n.', visualization: 'function-explorer', example: ['Let a_n=1/n.', 'Compute early terms.', 'Observe that values approach 0.'], csTitle: 'Iterative algorithms', csExplanation: 'Sequences describe error reduction and convergence in iterative numerical methods.', checkPrompt: 'What property describes terms approaching a fixed value?', checkAnswer: 'Convergence', numericPrompt: 'What is a_4 for a_n=1/n?', numericAnswer: 0.25, difficulty: 1 }), + createTopic({ id: 'limits', courseId: 'math-analysis', title: 'Limits', description: 'Describe the value approached by a function near a point or at infinity.', prerequisites: ['sequences'], objective: 'Evaluate standard one-sided and two-sided limits.', theory: 'A limit concerns nearby behaviour and can exist even when the function value at the point is absent or different.', formulaLabel: 'Function limit', formulaLatex: '\\lim_{x\\to a}f(x)=L', formulaExplanation: 'Function values approach L as x approaches a.', visualization: 'function-explorer', example: ['Factor (x^2-1)/(x-1).', 'Cancel x-1 for x not equal to 1.', 'The limit at 1 is 2.'], csTitle: 'Numerical stability', csExplanation: 'Limit reasoning explains approximation error and asymptotic behaviour of computations.', checkPrompt: 'A limit primarily describes which behaviour?', checkAnswer: 'Nearby behaviour', numericPrompt: 'What is lim xโ†’1 of (x^2-1)/(x-1)?', numericAnswer: 2 }), + createTopic({ id: 'continuity', courseId: 'math-analysis', title: 'Continuity', description: 'Connect limits and function values to classify smooth and broken behaviour.', prerequisites: ['limits'], objective: 'Classify removable, jump, and infinite discontinuities.', theory: 'Continuity at a requires the limit to exist and equal the defined value f(a).', formulaLabel: 'Continuity condition', formulaLatex: '\\lim_{x\\to a}f(x)=f(a)', formulaExplanation: 'The approached value and actual value agree.', visualization: 'function-explorer', example: ['Check the left limit.', 'Check the right limit.', 'Compare the common limit with f(a).'], csTitle: 'Continuous models', csExplanation: 'Continuous models support interpolation, animation, and physical simulation.', checkPrompt: 'Which equality is required for continuity at a?', checkAnswer: 'The limit equals the function value', numericPrompt: 'For f(x)=x+1, what is f(2)?', numericAnswer: 3 }), + createTopic({ id: 'derivatives', courseId: 'math-analysis', title: 'Derivatives', description: 'Measure instantaneous change through tangent slopes and differentiation rules.', prerequisites: ['continuity'], objective: 'Differentiate elementary and composite functions.', theory: 'The derivative is the limit of average rates of change over shrinking intervals.', formulaLabel: 'Derivative definition', formulaLatex: "f'(x)=\\lim_{h\\to0}\\frac{f(x+h)-f(x)}{h}", formulaExplanation: 'The difference quotient approaches the tangent slope.', visualization: 'function-explorer', example: ['Use f(x)=x^2.', 'Expand (x+h)^2-x^2.', 'Divide by h and take hโ†’0 to obtain 2x.'], csTitle: 'Optimization', csExplanation: 'Derivatives guide gradient-based optimization and performance tuning.', checkPrompt: 'What geometric quantity does a derivative represent?', checkAnswer: 'Tangent slope', numericPrompt: "For f(x)=x^2, what is f'(3)?", numericAnswer: 6 }), + createTopic({ id: 'derivative-applications', courseId: 'math-analysis', title: 'Applications of Derivatives', description: 'Use derivatives to find extrema, monotonicity, concavity, and local approximations.', prerequisites: ['derivatives'], objective: 'Solve optimization problems with critical points.', theory: 'Critical points and derivative signs reveal where a differentiable function rises, falls, or reaches local extrema.', formulaLabel: 'Critical-point condition', formulaLatex: "f'(x)=0", formulaExplanation: 'Interior differentiable extrema can occur where the derivative vanishes.', visualization: 'function-explorer', example: ['Differentiate f(x)=x^2-4x.', 'Solve 2x-4=0.', 'Verify the minimum occurs at x=2.'], csTitle: 'Algorithm tuning', csExplanation: 'Optimization balances latency, memory, error, and model parameters.', checkPrompt: 'Which points are candidates for differentiable interior extrema?', checkAnswer: 'Points where the derivative is zero', numericPrompt: 'At which x is x^2-4x minimized?', numericAnswer: 2 }), + createTopic({ id: 'integrals', courseId: 'math-analysis', title: 'Integrals', description: 'Model accumulation, antiderivatives, signed area, and the Fundamental Theorem of Calculus.', prerequisites: ['derivatives'], objective: 'Compute basic definite and indefinite integrals.', theory: 'Integration combines infinitesimal contributions and reverses differentiation under appropriate conditions.', formulaLabel: 'Fundamental theorem', formulaLatex: '\\int_a^b f(x)\\,dx=F(b)-F(a)', formulaExplanation: 'A definite integral is evaluated with an antiderivative F.', visualization: 'function-explorer', example: ['Choose f(x)=x.', 'Use F(x)=x^2/2.', 'From 0 to 2, the area is 2.'], csTitle: 'Accumulation and probability', csExplanation: 'Integrals appear in probability, graphics, signal energy, and continuous simulation.', checkPrompt: 'Which operation reverses differentiation?', checkAnswer: 'Integration', numericPrompt: 'What is โˆซ from 0 to 2 of x dx?', numericAnswer: 2 }), + createTopic({ id: 'taylor-series', courseId: 'math-analysis', title: 'Taylor Polynomials and Series', description: 'Approximate smooth functions locally with derivatives and polynomials.', prerequisites: ['derivatives'], objective: 'Construct low-order Taylor approximations.', theory: 'Taylor polynomials encode local derivative information in a computationally convenient polynomial.', formulaLabel: 'Taylor polynomial', formulaLatex: 'T_n(x)=\\sum_{k=0}^{n}\\frac{f^{(k)}(a)}{k!}(x-a)^k', formulaExplanation: 'Successive derivatives determine polynomial coefficients around a.', visualization: 'function-explorer', example: ['For e^x around 0, all derivatives equal 1.', 'Use 1+x+x^2/2.', 'Compare the approximation near 0.'], csTitle: 'Fast approximation', csExplanation: 'Polynomial approximations enable fast implementations of transcendental functions.', checkPrompt: 'What information determines Taylor coefficients?', checkAnswer: 'Derivatives at the expansion point', numericPrompt: 'Using 1+x, approximate e^0.1.', numericAnswer: 1.1 }), + ], +}; diff --git a/data/courses/topicFactory.ts b/data/courses/topicFactory.ts new file mode 100644 index 0000000..0981a81 --- /dev/null +++ b/data/courses/topicFactory.ts @@ -0,0 +1,86 @@ +import { + CourseId, + TopicDefinition, + TopicId, + VisualizationKind, +} from '../../domain/curriculum'; + +interface TopicSeed { + id: TopicId; + courseId: CourseId; + title: string; + description: string; + prerequisites?: TopicId[]; + objective: string; + theory: string; + formulaLabel: string; + formulaLatex: string; + formulaExplanation: string; + visualization: VisualizationKind; + example: string[]; + csTitle: string; + csExplanation: string; + checkPrompt: string; + checkAnswer: string; + numericPrompt: string; + numericAnswer: number; + difficulty?: 1 | 2 | 3; +} + +export const createTopic = (seed: TopicSeed): TopicDefinition => { + const practiceQuestions = [ + { + id: `${seed.id}-concept`, + kind: 'multiple-choice' as const, + prompt: seed.checkPrompt, + choices: [seed.checkAnswer, 'None of these', 'The expression is undefined', 'Only by numerical simulation'], + answer: seed.checkAnswer, + explanation: `The defining idea is: ${seed.checkAnswer}.`, + }, + { + id: `${seed.id}-numeric`, + kind: 'numeric' as const, + prompt: seed.numericPrompt, + answer: seed.numericAnswer, + tolerance: 0.001, + explanation: `The expected numerical result is ${seed.numericAnswer}.`, + }, + ]; + + return { + id: seed.id, + courseId: seed.courseId, + title: seed.title, + description: seed.description, + prerequisites: seed.prerequisites ?? [], + learningObjectives: [seed.objective], + sections: [{ id: `${seed.id}-theory`, title: 'Core idea', markdown: seed.theory }], + formulas: [{ + id: `${seed.id}-formula`, + label: seed.formulaLabel, + latex: seed.formulaLatex, + explanation: seed.formulaExplanation, + }], + visualization: { kind: seed.visualization, presetId: seed.id }, + workedExamples: [{ id: `${seed.id}-example`, title: 'Worked example', steps: seed.example }], + csConnections: [{ title: seed.csTitle, explanation: seed.csExplanation }], + practiceQuestions, + quiz: { + id: `${seed.id}-quiz`, + title: `${seed.title} checkpoint`, + questions: [ + ...practiceQuestions, + { + id: `${seed.id}-reflection`, + kind: 'multiple-choice', + prompt: `Which statement best summarizes ${seed.title}?`, + choices: [seed.description, 'It is unrelated to computation', 'It applies only to one coordinate system', 'It is unrelated to the current course'], + answer: seed.description, + explanation: seed.description, + }, + ], + }, + difficulty: seed.difficulty ?? 2, + estimatedStudyMinutes: 45, + }; +}; diff --git a/docs/superpowers/plans/2026-08-06-math-cs-review-notes.md b/docs/superpowers/plans/2026-08-06-math-cs-review-notes.md new file mode 100644 index 0000000..c4fe5f3 --- /dev/null +++ b/docs/superpowers/plans/2026-08-06-math-cs-review-notes.md @@ -0,0 +1,14 @@ +# Math-CS Plan Self-Review Notes + +**Reviewed plan:** `docs/superpowers/plans/2026-08-06-math-cs.md` +**Review date:** 2026-08-06 + +The plan contains no `TODO`, `TBD`, placeholder, or "implement later" markers. Its scope matches the approved design: two courses, three bounded mathematics labs, namespaced local progress, Computational Notebook UI, deterministic assessments, platform renaming, domain cleanup, and deployment verification. + +## Normative dependency correction + +In **Task 6, Step 5**, the sentence saying that the Quiz stage delegates to `QuizRunner` "after Task 10" must be read as: + +> The Quiz stage delegates to `QuizRunner` after **Task 11**; until then it presents the quiz title and a typed disabled-start callback so the build stays valid. + +Task 10 implements the Vector & Geometry Lab. Task 11 creates `QuizRunner`, grading utilities, Practice, and Exams. This review note is normative if that cross-reference conflicts with the main plan. diff --git a/docs/superpowers/plans/2026-08-06-math-cs.md b/docs/superpowers/plans/2026-08-06-math-cs.md new file mode 100644 index 0000000..3f995cd --- /dev/null +++ b/docs/superpowers/plans/2026-08-06-math-cs.md @@ -0,0 +1,1093 @@ +# Inmerson Math-CS Implementation Plan + +> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking. + +**Goal:** Create a separate public `Inmerson/Math-CS` application from the pinned Math-Biotech codebase, then convert it into a polished PJATK Computer Science mathematics workspace for Mathematical Analysis and Linear Algebra & Geometry. + +**Architecture:** Preserve the React/Vite/TypeScript/Capacitor foundation and domain-neutral mathematics components. Replace module-enum-driven biotechnology navigation with a typed two-course curriculum catalog, generic course and lesson workspaces, namespaced local progress, and three bounded interactive mathematics labs. Deliver the conversion in independently testable stages so the target application remains buildable after every commit. + +**Tech Stack:** React 19, TypeScript 5.8, Vite 6.4, Vitest 4, Testing Library, Tailwind CSS 4, Framer Motion 12, KaTeX 0.16, Math.js 12, React Three Fiber 9 RC, Capacitor 6, Node.js 22. + +## Global Constraints + +- Source repository is exactly `Inmerson/Math-Biotech-Project`. +- Source commit is pinned to `e9a70f360b72b85a6eaadcd1c44b469dddb3d97e`. +- Target repository is exactly `Inmerson/Math-CS` and must be public with default branch `main`. +- Product name is exactly `Inmerson Math-CS`. +- Tagline is exactly `Interactive Mathematics for Computer Science`. +- The first release contains exactly two courses: `Math I โ€” Mathematical Analysis` and `Math II โ€” Linear Algebra & Geometry`. +- Discrete Mathematics, Statistical Data Analysis, biotechnology, biology, DNA imagery, population models, radioactive-decay lessons, and differential-equation modules are outside the first release. +- Existing useful mathematics behavior is adapted rather than rewritten without cause. +- Curriculum copy is stored in structured data outside React presentation components. +- Local persistence keys begin with `math-cs:v1:` and must not collide with Math-Biotech keys. +- Function input is curriculum-bounded; the application is not an unrestricted computer algebra system. +- Mathematical meaning must not depend on color alone. +- Desktop and mobile navigation must remain usable with keyboard, touch, reduced motion, and browser zoom. +- Every task ends with `npm run verify` passing unless its RED step explicitly expects failure. +- No credentials, generated secrets, or private user data are committed. + +## Execution Prerequisite + +The currently connected GitHub actions can modify existing repositories but cannot create a new repository. Before Task 1 execution, create an empty public repository with owner `Inmerson`, name `Math-CS`, default branch `main`, and no generated README, license, or `.gitignore`. This is the only repository-creation prerequisite; all application changes belong in the target repository. + +## File Map + +### Create + +- `MIGRATION_SOURCE.md` โ€” records the pinned source and copy method. +- `domain/curriculum.ts` โ€” stable curriculum, lesson, formula, visualization, and assessment types. +- `data/courseCatalog.ts` โ€” indexed access to the two courses and topics. +- `data/courseCatalog.test.ts` โ€” validates course count, IDs, topic coverage, and forbidden domains. +- `data/courses/mathAnalysis.ts` โ€” structured Math I curriculum. +- `data/courses/linearAlgebraGeometry.ts` โ€” structured Math II curriculum. +- `utils/mathCsStorage.ts` and `utils/mathCsStorage.test.ts` โ€” namespaced persistence and corruption recovery. +- `utils/progress.ts` and `utils/progress.test.ts` โ€” pure progress calculations and updates. +- `utils/quizGrading.ts` and `utils/quizGrading.test.ts` โ€” deterministic assessment grading. +- `utils/functionSampling.ts` and `utils/functionSampling.test.ts` โ€” bounded plotting samples. +- `utils/vectorMath.ts` and `utils/vectorMath.test.ts` โ€” vector and transformation calculations. +- `components/layout/BottomNavigation.tsx` โ€” compact mobile navigation. +- `components/course/CourseCard.tsx` โ€” reusable course summary card. +- `components/course/TopicList.tsx` โ€” prerequisite-aware topic list. +- `components/course/LearningFlow.tsx` โ€” Learn/Visualize/Practice/CS Connection/Quiz sections. +- `components/labs/FunctionExplorer.tsx` โ€” bounded function visualization. +- `components/labs/MatrixLab.tsx` โ€” matrix operations and educational output. +- `components/labs/VectorGeometryLab.tsx` โ€” vector, line, plane, and transformation exploration. +- `components/quiz/QuizRunner.tsx` โ€” reusable quiz UI. +- `views/CourseHubView.tsx` โ€” one courseโ€™s topic and progress overview. +- `views/LessonWorkspaceView.tsx` โ€” generic data-driven lesson page. +- `views/MathLabView.tsx` โ€” three-lab launcher and active lab host. +- `views/PracticeView.tsx` โ€” course/topic-filtered practice. +- `views/ExamsView.tsx` โ€” two course exams and combined review. +- `views/ProgressView.tsx` โ€” completion and assessment summaries. +- `views/FormulaWorkspaceView.tsx` โ€” saved formulas and local notes. +- `scripts/check-domain-clean.mjs` โ€” repository scan for forbidden learner-facing domain remnants. + +### Modify + +- `package.json`, `package-lock.json`, `vite.config.ts`, `.github/workflows/ci.yml`, `.github/workflows/deploy.yml` +- `data/branding.ts`, `data/branding.test.ts`, `data/learningCatalog.ts`, `data/learningCatalog.test.ts` +- `types.ts`, `App.tsx`, `index.css`, `tailwind.config.js` +- `components/AnimatedBackground.tsx`, `components/Sidebar.tsx`, `components/Sidebar.test.tsx` +- `views/DashboardView.tsx`, `views/AIChatView.tsx`, `views/__tests__/AIChatView.test.tsx` +- `views/ExercisesView.tsx`, `views/FinalExamView.tsx`, `views/ExamAnalysisView.tsx`, `views/CheatSheetView.tsx` +- `utils/examStorage.ts`, `utils/usePersistedState.ts` +- `index.html`, `manifest.json`, `metadata.json`, `README.md`, `.pages-release` +- `capacitor.config.ts`, `android/app/build.gradle`, `android/app/src/main/AndroidManifest.xml`, `android/app/src/main/res/values/strings.xml` +- `server/src/index.ts`, `server/README.md`, `server/QUICKSTART.md` + +### Remove after replacement + +- `components/DNAStrand.tsx` +- `views/DiffEqBasicsView.tsx` +- `views/PopulationModelsView.tsx` +- `views/RadioactiveDecayView.tsx` +- `views/DiffEq3DView.tsx` +- Old generated `site/**` output before regeneration + +--- + +### Task 1: Establish the standalone target repository from the pinned commit + +**Files:** +- Create in target: `MIGRATION_SOURCE.md` +- Preserve initially: all files from source commit `e9a70f360b72b85a6eaadcd1c44b469dddb3d97e` + +**Interfaces:** +- Produces: a public `Inmerson/Math-CS` `main` branch whose first imported tree exactly matches the pinned source tree. +- Produces: documented source provenance for later audits. + +- [ ] **Step 1: Clone and pin the source** + +```bash +git clone https://github.com/Inmerson/Math-Biotech-Project.git Math-CS +cd Math-CS +git checkout e9a70f360b72b85a6eaadcd1c44b469dddb3d97e +git switch -C main +git remote rename origin source +git remote add origin git@github.com:Inmerson/Math-CS.git +``` + +- [ ] **Step 2: Verify the pinned tree before pushing** + +```bash +test "$(git rev-parse HEAD)" = "e9a70f360b72b85a6eaadcd1c44b469dddb3d97e" +git status --short +``` + +Expected: the SHA comparison succeeds and `git status --short` prints nothing. + +- [ ] **Step 3: Push the copied history to the empty target** + +```bash +git push -u origin main +``` + +Expected: `origin/main` is created in `Inmerson/Math-CS` and the target repository is public. + +- [ ] **Step 4: Record migration provenance** + +Create `MIGRATION_SOURCE.md` with exactly: + +```markdown +# Migration Source + +Inmerson Math-CS was initialized from `Inmerson/Math-Biotech-Project` at commit `e9a70f360b72b85a6eaadcd1c44b469dddb3d97e` on 2026-08-06. + +The source repository remains the biotechnology-focused product. This repository is the independent computer-science mathematics product. +``` + +- [ ] **Step 5: Install and verify the untouched baseline** + +```bash +npm ci --include=optional +npm run verify +``` + +Expected: TypeScript, existing Vitest tests, and the Vite production build pass before conversion starts. + +- [ ] **Step 6: Commit provenance** + +```bash +git add MIGRATION_SOURCE.md +git commit -m "docs: record Math-CS migration source" +git push +``` + +--- + +### Task 2: Replace repository, web, and product identity + +**Files:** +- Modify: `data/branding.test.ts` +- Modify: `data/branding.ts` +- Modify: `package.json` +- Modify: `package-lock.json` +- Modify: `vite.config.ts` +- Modify: `index.html` +- Modify: `manifest.json` +- Modify: `metadata.json` +- Modify: `.github/workflows/deploy.yml` +- Modify: `.pages-release` +- Modify: `README.md` + +**Interfaces:** +- Produces: `BRAND_NAME`, `BRAND_TAGLINE`, `BRAND_FULL_NAME`, `BRAND_SHORT_NAME`, and `BRAND_DESCRIPTION`. +- Produces: Vite base `/Math-CS/` and Pages output in `site/`. + +- [ ] **Step 1: Write the failing brand test** + +Replace the approved-value assertions in `data/branding.test.ts` with: + +```ts +expect(BRAND_NAME).toBe('Inmerson Math-CS'); +expect(BRAND_TAGLINE).toBe('Interactive Mathematics for Computer Science'); +expect(BRAND_FULL_NAME).toBe('Inmerson Math-CS โ€ข Interactive Mathematics for Computer Science'); +expect(BRAND_SHORT_NAME).toBe('Math-CS'); +expect(BRAND_DESCRIPTION).toContain('Mathematical Analysis'); +expect(BRAND_DESCRIPTION).toContain('Linear Algebra'); +expect(BRAND_DESCRIPTION).not.toMatch(/biotech|biology|DNA/i); +``` + +- [ ] **Step 2: Run the focused test and confirm RED** + +```bash +npm test -- data/branding.test.ts +``` + +Expected: FAIL because the old Math-Biotech identity is still exported. + +- [ ] **Step 3: Replace the branding module** + +Use exactly: + +```ts +export const BRAND_NAME = 'Inmerson Math-CS'; +export const BRAND_TAGLINE = 'Interactive Mathematics for Computer Science'; +export const BRAND_FULL_NAME = `${BRAND_NAME} โ€ข ${BRAND_TAGLINE}`; +export const BRAND_SHORT_NAME = 'Math-CS'; +export const BRAND_DESCRIPTION = 'A focused interactive workspace for Mathematical Analysis and Linear Algebra & Geometry in computer science.'; +``` + +- [ ] **Step 4: Update package and Vite identity** + +Set `package.json` name to `inmerson-math-cs`. Set: + +```json +"build:pages": "vite build --base=/Math-CS/ --outDir site --emptyOutDir" +``` + +Set `vite.config.ts` `base` to `/Math-CS/`. Run `npm install --package-lock-only` so `package-lock.json` uses the same package name. + +- [ ] **Step 5: Update static metadata** + +Use the exact product name and tagline in `index.html`, `manifest.json`, and `metadata.json`. Set the PWA short name to `Math-CS`. Remove biotechnology descriptions, keywords, and icons from learner-facing metadata. + +- [ ] **Step 6: Update deployment naming** + +Rename the workflow artifact to `math-cs-pages-site`. Update `.pages-release` to state that `site/` is generated for `Inmerson/Math-CS` from `main`. + +- [ ] **Step 7: Replace the README introduction** + +The first section must identify the two courses, the Computational Notebook design, local progress, the three bounded labs, installation commands, and `npm run verify`. Source-repository attribution belongs only in `MIGRATION_SOURCE.md`. + +- [ ] **Step 8: Verify and commit** + +```bash +npm run verify +git add data/branding.ts data/branding.test.ts package.json package-lock.json vite.config.ts index.html manifest.json metadata.json .github/workflows/deploy.yml .pages-release README.md +git commit -m "chore: establish Inmerson Math-CS identity" +``` + +--- + +### Task 3: Introduce the typed two-course curriculum model + +**Files:** +- Create: `domain/curriculum.ts` +- Create: `data/courses/mathAnalysis.ts` +- Create: `data/courses/linearAlgebraGeometry.ts` +- Create: `data/courseCatalog.ts` +- Create: `data/courseCatalog.test.ts` + +**Interfaces:** +- Produces: `CourseId`, `TopicId`, `LearningStage`, `CourseDefinition`, `TopicDefinition`, `FormulaDefinition`, `PracticeQuestion`, and `QuizDefinition`. +- Produces: `COURSES`, `getCourse(courseId)`, `getTopic(courseId, topicId)`, and `searchTopics(query, limit)`. + +- [ ] **Step 1: Write failing catalog tests** + +Create `data/courseCatalog.test.ts` with tests that assert: + +```ts +expect(COURSES.map((course) => course.id)).toEqual([ + 'math-analysis', + 'linear-algebra-geometry', +]); +expect(COURSES.every((course) => course.topics.length >= 8)).toBe(true); +expect(getTopic('math-analysis', 'limits')?.title).toBe('Limits'); +expect(getTopic('linear-algebra-geometry', 'matrices')?.title).toBe('Matrices and Matrix Operations'); +expect(JSON.stringify(COURSES)).not.toMatch(/biotech|biology|DNA|population|radioactive|discrete mathematics/i); +expect(searchTopics('eigen', 5)[0]?.topic.id).toBe('eigenvalues-eigenvectors'); +``` + +- [ ] **Step 2: Run the test and confirm RED** + +```bash +npm test -- data/courseCatalog.test.ts +``` + +Expected: FAIL because the curriculum files do not exist. + +- [ ] **Step 3: Define stable domain types** + +Create `domain/curriculum.ts` with these unions and interfaces: + +```ts +export type CourseId = 'math-analysis' | 'linear-algebra-geometry'; +export type TopicId = + | 'functions-graphs' + | 'sequences' + | 'limits' + | 'continuity' + | 'derivatives' + | 'derivative-applications' + | 'integrals' + | 'taylor-series' + | 'vectors' + | 'matrices' + | 'linear-systems' + | 'determinants' + | 'matrix-inverses' + | 'vector-spaces' + | 'linear-transformations' + | 'eigenvalues-eigenvectors' + | 'analytic-geometry'; + +export type LearningStage = 'learn' | 'visualize' | 'practice' | 'cs-connection' | 'quiz'; +export type VisualizationKind = 'function-explorer' | 'matrix-lab' | 'vector-geometry-lab' | 'none'; +export type QuestionKind = 'multiple-choice' | 'numeric' | 'ordered-steps' | 'matrix' | 'vector'; + +export interface FormulaDefinition { + id: string; + label: string; + latex: string; + explanation: string; +} + +export interface PracticeQuestion { + id: string; + kind: QuestionKind; + prompt: string; + choices?: string[]; + answer: string | number | number[] | number[][]; + tolerance?: number; + explanation: string; +} + +export interface QuizDefinition { + id: string; + title: string; + questions: PracticeQuestion[]; +} + +export interface TopicDefinition { + id: TopicId; + courseId: CourseId; + title: string; + description: string; + prerequisites: TopicId[]; + learningObjectives: string[]; + sections: { id: string; title: string; markdown: string }[]; + formulas: FormulaDefinition[]; + visualization: { kind: VisualizationKind; presetId?: string }; + workedExamples: { id: string; title: string; steps: string[] }[]; + csConnections: { title: string; explanation: string }[]; + practiceQuestions: PracticeQuestion[]; + quiz: QuizDefinition; + difficulty: 1 | 2 | 3; + estimatedStudyMinutes: number; +} + +export interface CourseDefinition { + id: CourseId; + title: string; + officialTitle: string; + shortTitle: 'Math I' | 'Math II'; + description: string; + order: 1 | 2; + topics: TopicDefinition[]; +} +``` + +- [ ] **Step 4: Populate both course definitions** + +`mathAnalysis.ts` contains the eight approved analysis topics. `linearAlgebraGeometry.ts` contains the nine approved algebra/geometry topics. Every topic receives non-empty objectives, at least one theory section, one formula or explicit empty formula array, one worked example, one CS connection, two practice questions, and a quiz of at least three questions. + +- [ ] **Step 5: Add indexed catalog access** + +Implement `COURSES` as a frozen ordered array. Implement `getCourse`, `getTopic`, and accent-insensitive `searchTopics` without mutating curriculum data. + +- [ ] **Step 6: Verify and commit** + +```bash +npm test -- data/courseCatalog.test.ts +npm run verify +git add domain data/courseCatalog.ts data/courseCatalog.test.ts data/courses +git commit -m "feat: add typed Math-CS curriculum catalog" +``` + +--- + +### Task 4: Add namespaced progress, formula, and assessment persistence + +**Files:** +- Create: `utils/mathCsStorage.ts` +- Create: `utils/mathCsStorage.test.ts` +- Create: `utils/progress.ts` +- Create: `utils/progress.test.ts` +- Modify: `utils/usePersistedState.ts` +- Modify: `utils/examStorage.ts` + +**Interfaces:** +- Produces: `MATH_CS_STORAGE_PREFIX`, `MathCsState`, `loadMathCsState()`, `saveMathCsState(state)`, and `clearMathCsState()`. +- Produces: `markTopicComplete`, `recordQuizResult`, `saveFormula`, `removeFormula`, `saveFormulaNote`, `getCourseProgress`, and `getRecommendedTopic`. + +- [ ] **Step 1: Write corruption and collision tests** + +Test that `loadMathCsState()` returns a clean default when JSON is malformed, ignores keys such as `app_module`, and writes only to `math-cs:v1:state`. + +- [ ] **Step 2: Write pure progress tests** + +Cover these exact outcomes: + +```ts +expect(getCourseProgress(emptyState, mathAnalysisCourse)).toBe(0); +expect(getCourseProgress(stateWithFourOfEightTopics, mathAnalysisCourse)).toBe(50); +expect(recordQuizResult(emptyState, 'math-analysis', 'limits', 4, 5).quizResults[0].percentage).toBe(80); +expect(getRecommendedTopic(stateWithFunctionsComplete, mathAnalysisCourse)?.id).toBe('sequences'); +``` + +- [ ] **Step 3: Run focused tests and confirm RED** + +```bash +npm test -- utils/mathCsStorage.test.ts utils/progress.test.ts +``` + +- [ ] **Step 4: Implement versioned state** + +Use this shape: + +```ts +export interface MathCsState { + version: 1; + completedTopicIds: TopicId[]; + lastDestination: { section: string; courseId?: CourseId; topicId?: TopicId } | null; + quizResults: { courseId: CourseId; topicId: TopicId; score: number; total: number; percentage: number; completedAt: string }[]; + savedFormulas: { formulaId: string; courseId: CourseId; topicId: TopicId; note: string }[]; +} +``` + +Deduplicate topic IDs and formula IDs. Preserve the best quiz percentage per topic while retaining its most recent completion timestamp. + +- [ ] **Step 5: Make legacy hooks accept an explicit namespace** + +Update `usePersistedState` so callers pass a complete key. New Math-CS calls use `math-cs:v1:` keys. Remove Math-Biotech default navigation keys from new app flow. Adapt `examStorage.ts` to the new quiz-result model or leave it as a compatibility adapter that delegates to `mathCsStorage`. + +- [ ] **Step 6: Verify and commit** + +```bash +npm test -- utils/mathCsStorage.test.ts utils/progress.test.ts +npm run verify +git add utils/mathCsStorage.ts utils/mathCsStorage.test.ts utils/progress.ts utils/progress.test.ts utils/usePersistedState.ts utils/examStorage.ts +git commit -m "feat: add namespaced Math-CS progress storage" +``` + +--- + +### Task 5: Replace module navigation with the approved application shell + +**Files:** +- Modify: `types.ts` +- Modify: `App.tsx` +- Modify: `components/Sidebar.tsx` +- Modify: `components/Sidebar.test.tsx` +- Create: `components/layout/BottomNavigation.tsx` +- Create: `components/layout/BottomNavigation.test.tsx` +- Modify: `data/learningCatalog.ts` +- Modify: `data/learningCatalog.test.ts` + +**Interfaces:** +- Produces: `AppSection = 'dashboard' | 'course' | 'lesson' | 'math-lab' | 'practice' | 'exams' | 'progress' | 'formulas' | 'assistant'`. +- Produces: `AppDestination` with optional `courseId`, `topicId`, and `labId`. +- Consumes: `COURSES`, namespaced `lastDestination`, and course/topic search. + +- [ ] **Step 1: Replace sidebar expectations** + +Update tests to assert visible links for Dashboard, Math I, Math II, Math Lab, Practice, Exams, and Progress. Assert that Differential Equations, Population Models, and biotechnology text are absent. + +- [ ] **Step 2: Add mobile-navigation tests** + +Assert that the mobile bar exposes Dashboard, Math I, Math II, Lab, and More with accessible button names and an active state expressed through `aria-current="page"`. + +- [ ] **Step 3: Run the navigation tests and confirm RED** + +```bash +npm test -- components/Sidebar.test.tsx components/layout/BottomNavigation.test.tsx data/learningCatalog.test.ts +``` + +- [ ] **Step 4: Define destination types and a single navigation function** + +Replace the old `ModuleType`/`ViewMode` app-navigation dependency with `AppDestination`. Keep `MatrixData` and mathematics operation types in `types.ts`. `App.tsx` owns one `destination` state and calls `navigate(destination)`; it does not keep separate module and view states. + +- [ ] **Step 5: Rebuild desktop and mobile navigation** + +The sidebar has the exact primary order from the design. Math I and Math II open their course hubs. Secondary entries for Formulas and Assistant may appear below the primary list. The bottom navigation remains compact and opens a labelled More drawer for secondary destinations. + +- [ ] **Step 6: Convert learning search** + +`data/learningCatalog.ts` indexes course and topic records from `COURSES`; it no longer contains a manual list of old views. Search results return an `AppDestination` pointing to the matching lesson. + +- [ ] **Step 7: Add safe destination recovery** + +When a stored course/topic ID cannot be resolved, render a recovery view with Dashboard, Math I, and Math II buttons and reset the stored destination after the learner chooses one. + +- [ ] **Step 8: Verify and commit** + +```bash +npm test -- components/Sidebar.test.tsx components/layout/BottomNavigation.test.tsx data/learningCatalog.test.ts +npm run verify +git add types.ts App.tsx components/Sidebar.tsx components/Sidebar.test.tsx components/layout data/learningCatalog.ts data/learningCatalog.test.ts +git commit -m "feat: add Math-CS application navigation" +``` + +--- + +### Task 6: Build the two-course dashboard, course hubs, and generic lesson workspace + +**Files:** +- Create: `components/course/CourseCard.tsx` +- Create: `components/course/CourseCard.test.tsx` +- Create: `components/course/TopicList.tsx` +- Create: `components/course/LearningFlow.tsx` +- Create: `views/CourseHubView.tsx` +- Create: `views/CourseHubView.test.tsx` +- Create: `views/LessonWorkspaceView.tsx` +- Create: `views/LessonWorkspaceView.test.tsx` +- Modify: `views/DashboardView.tsx` +- Create: `views/DashboardView.test.tsx` + +**Interfaces:** +- `CourseCard` consumes `CourseDefinition`, progress percentage, completed count, and recommended topic. +- `CourseHubView` consumes `courseId`, `MathCsState`, and `onNavigate`. +- `LessonWorkspaceView` consumes `courseId`, `topicId`, `MathCsState`, and update callbacks. + +- [ ] **Step 1: Write dashboard and hub tests** + +Assert exactly two course cards. Assert the official Polish titles are visible as secondary text. Assert completion percentages and recommended next topics derive from the progress utilities. + +- [ ] **Step 2: Write learning-flow tests** + +For the Limits topic, assert the stage labels appear in this order: Learn, Visualize, Practice, CS Connection, Quiz. Assert its formulas, worked example, and computer-science connection come from topic data rather than literals in the component test fixture. + +- [ ] **Step 3: Run the focused tests and confirm RED** + +```bash +npm test -- views/DashboardView.test.tsx views/CourseHubView.test.tsx views/LessonWorkspaceView.test.tsx +``` + +- [ ] **Step 4: Implement reusable course surfaces** + +`CourseCard` shows course name, official title, progress, completed/total topics, recommended next topic, and latest quiz result. `TopicList` marks prerequisites and completion semantically; locked styling never removes topic titles from assistive technology. + +- [ ] **Step 5: Implement the standard learning flow** + +`LearningFlow` renders five labelled sections in the approved order. The Visualize stage delegates to a lab link or embedded preset. The Quiz stage delegates to `QuizRunner` after Task 10; until then it presents the quiz title and a typed disabled-start callback so the build stays valid. + +- [ ] **Step 6: Replace the dashboard** + +Remove the eight module cards, DNA icon, biotechnology search copy, and extreme 3D tilt. Keep restrained Framer Motion entry transitions with `useReducedMotion`. Add quick access to last lesson, Math Lab, saved formulas, and current assessment status. + +- [ ] **Step 7: Verify and commit** + +```bash +npm test -- views/DashboardView.test.tsx views/CourseHubView.test.tsx views/LessonWorkspaceView.test.tsx +npm run verify +git add components/course views/DashboardView.tsx views/DashboardView.test.tsx views/CourseHubView.tsx views/CourseHubView.test.tsx views/LessonWorkspaceView.tsx views/LessonWorkspaceView.test.tsx +git commit -m "feat: add Math-CS course and lesson experience" +``` + +--- + +### Task 7: Apply the Computational Notebook design system and accessibility baseline + +**Files:** +- Modify: `index.css` +- Modify: `tailwind.config.js` +- Modify: `components/AnimatedBackground.tsx` +- Remove: `components/DNAStrand.tsx` +- Modify: `App.tsx` +- Modify: all new shell/course components touched in Tasks 5โ€“6 + +**Interfaces:** +- Produces: shared classes/tokens for `notebook-panel`, `formula-panel`, `code-panel`, `focus-ring`, and `coordinate-grid`. +- Preserves: reduced-motion behavior and semantic page hierarchy. + +- [ ] **Step 1: Add an accessibility regression test** + +Render the app shell at Dashboard and assert one `
`, one level-one heading, labelled navigation, visible focusable course actions, and no decorative background element exposed to the accessibility tree. + +- [ ] **Step 2: Run the test and confirm RED** + +```bash +npm test -- App.test.tsx +``` + +- [ ] **Step 3: Define restrained notebook tokens** + +Use CSS variables for navy/graphite surfaces, warm off-white text, cyan/amber accents, borders, radii, and focus outline. Keep all text/background pairs at WCAG AA contrast. Use the coordinate grid at low opacity and remove star-field/nebula language from component comments and visual identity. + +- [ ] **Step 4: Simplify the animated background** + +Render only a dark tonal gradient, subtle coordinate grid, and one slow ambient light field. Mark the entire background `aria-hidden="true"`. Disable ambient animation under `prefers-reduced-motion: reduce`. + +- [ ] **Step 5: Standardize desktop and mobile layout** + +Desktop uses persistent left navigation, central content, and optional right context panel. Mobile uses a compact header and bottom navigation without horizontal page overflow at 320 CSS pixels. Formula/code panels wrap or scroll internally. + +- [ ] **Step 6: Verify keyboard and zoom behavior** + +Manually test Tab/Shift+Tab, Enter/Space activation, Escape for drawers, 200% browser zoom, and reduced-motion mode. Record the results in the commit body. + +- [ ] **Step 7: Verify and commit** + +```bash +npm run verify +git add index.css tailwind.config.js components/AnimatedBackground.tsx App.tsx components/course components/layout views/DashboardView.tsx views/CourseHubView.tsx views/LessonWorkspaceView.tsx +git rm components/DNAStrand.tsx +git commit -m "style: apply Computational Notebook design" +``` + +--- + +### Task 8: Implement the bounded Function Explorer + +**Files:** +- Create: `utils/functionSampling.ts` +- Create: `utils/functionSampling.test.ts` +- Create: `components/labs/FunctionExplorer.tsx` +- Create: `components/labs/FunctionExplorer.test.tsx` +- Create: `views/MathLabView.tsx` +- Create: `views/MathLabView.test.tsx` +- Modify: `views/FunctionsView.tsx`, `views/ContinuityView.tsx`, `views/FunctionAnalysisView.tsx`, `views/AreaUnderCurveView.tsx`, `views/TaylorSeriesView.tsx` only where logic is extracted or reused. + +**Interfaces:** +- Produces: `FunctionPreset`, `PlotPoint`, `samplePreset(preset, parameters)`, and `getFunctionPreset(id)`. +- `FunctionExplorer` consumes a curriculum-approved preset ID and optional lesson mode. + +- [ ] **Step 1: Write pure sampling tests** + +Cover a linear function, a removable discontinuity, derivative tangent data, integral area interval, and Taylor approximation. Assert non-finite samples are represented as gaps rather than thrown errors. + +- [ ] **Step 2: Write component error tests** + +Assert that an unknown preset displays `Unsupported function preset`, preserves navigation, and does not write progress. Assert parameter controls expose numeric labels and bounded min/max values. + +- [ ] **Step 3: Run focused tests and confirm RED** + +```bash +npm test -- utils/functionSampling.test.ts components/labs/FunctionExplorer.test.tsx views/MathLabView.test.tsx +``` + +- [ ] **Step 4: Implement curriculum-bounded presets** + +Include explicit presets for linear/quadratic graphs, sequence convergence, one-sided limits, continuity, tangent/derivative, definite integral area, Newton iteration, and Taylor approximation. Parameter changes are clamped to each presetโ€™s declared bounds. + +- [ ] **Step 5: Implement the explorer UI** + +Provide formula, graph, parameter controls, reset button, current interpretation, and a static explanatory fallback. Do not expose an arbitrary JavaScript or Math.js expression evaluator. + +- [ ] **Step 6: Integrate the Math Lab host** + +`MathLabView` presents Function Explorer, Matrix Lab, and Vector & Geometry Lab cards. Until Tasks 9 and 10, the unfinished lab cards remain labelled and disabled rather than routing to missing pages. + +- [ ] **Step 7: Verify and commit** + +```bash +npm test -- utils/functionSampling.test.ts components/labs/FunctionExplorer.test.tsx views/MathLabView.test.tsx +npm run verify +git add utils/functionSampling.ts utils/functionSampling.test.ts components/labs/FunctionExplorer.tsx components/labs/FunctionExplorer.test.tsx views/MathLabView.tsx views/MathLabView.test.tsx views/FunctionsView.tsx views/ContinuityView.tsx views/FunctionAnalysisView.tsx views/AreaUnderCurveView.tsx views/TaylorSeriesView.tsx +git commit -m "feat: add bounded Function Explorer" +``` + +--- + +### Task 9: Consolidate the Matrix Lab with deterministic educational output + +**Files:** +- Modify: `utils/matrixMath.ts` +- Create: `utils/matrixMath.test.ts` +- Modify: `utils/gaussianSteps.ts` +- Create: `components/labs/MatrixLab.tsx` +- Create: `components/labs/MatrixLab.test.tsx` +- Modify: `components/MatrixInput.tsx`, `components/MatrixInput.test.tsx` +- Adapt: `views/BasicsView.tsx`, `views/OperationsView.tsx`, `views/DeterminantView.tsx`, `views/InverseView.tsx`, `views/SystemsView.tsx`, `views/GaussianView.tsx`, `views/EigenView.tsx` + +**Interfaces:** +- Produces: validated operations returning `{ ok: true, value, steps }` or `{ ok: false, error }`. +- Supports: addition, multiplication, determinant, inverse, row reduction, supported linear systems, and real 2ร—2 eigenvalues. + +- [ ] **Step 1: Add validation-first unit tests** + +Test empty matrices, ragged rows, incompatible multiplication, non-square determinants, singular inverse, a solvable 3ร—3 system, and a 2ร—2 matrix with complex eigenvalues. Existing successful-operation cases must remain green. + +- [ ] **Step 2: Run focused tests and confirm RED where validation is missing** + +```bash +npm test -- utils/matrixMath.test.ts components/MatrixInput.test.tsx +``` + +- [ ] **Step 3: Add a shared matrix validator** + +Implement `validateMatrix(value, constraints)` before indexing `matrix[0]`. Return specific learner-facing errors such as `Enter at least one row`, `All rows must have the same length`, `This operation requires a square matrix`, and `A singular matrix has no inverse`. + +- [ ] **Step 4: Implement the Matrix Lab tabs** + +Use one matrix-input system and operation selector. Show result, determinant interpretation, row-operation steps, and geometric meaning in notebook panels. Preserve the existing optimized determinant and inverse algorithms unless a failing test proves a defect. + +- [ ] **Step 5: Convert old matrix views into lesson adapters** + +Move reusable interactive logic into `MatrixLab`. Existing view files either become thin preset wrappers used by lesson visualizations or are removed only after no imports remain. + +- [ ] **Step 6: Enable Matrix Lab in `MathLabView`** + +Add direct navigation and lesson deep links using `labId: 'matrix'`. + +- [ ] **Step 7: Verify and commit** + +```bash +npm test -- utils/matrixMath.test.ts components/MatrixInput.test.tsx components/labs/MatrixLab.test.tsx +npm run verify +git add utils/matrixMath.ts utils/matrixMath.test.ts utils/gaussianSteps.ts components/MatrixInput.tsx components/MatrixInput.test.tsx components/labs/MatrixLab.tsx components/labs/MatrixLab.test.tsx views/BasicsView.tsx views/OperationsView.tsx views/DeterminantView.tsx views/InverseView.tsx views/SystemsView.tsx views/GaussianView.tsx views/EigenView.tsx views/MathLabView.tsx +git commit -m "feat: consolidate educational Matrix Lab" +``` + +--- + +### Task 10: Add the Vector & Geometry Lab + +**Files:** +- Create: `utils/vectorMath.ts` +- Create: `utils/vectorMath.test.ts` +- Create: `components/labs/VectorGeometryLab.tsx` +- Create: `components/labs/VectorGeometryLab.test.tsx` +- Adapt: `views/VectorOperations3DView.tsx`, `views/LinearTransformation3DView.tsx`, `views/TransformationsView.tsx` +- Modify: `views/MathLabView.tsx` + +**Interfaces:** +- Produces: `Vector2`, `Vector3`, `dot`, `magnitude`, `normalize`, `addVectors`, `scaleVector`, `applyMatrix2`, `lineFromPointDirection`, and `planeFromPointNormal`. +- `VectorGeometryLab` supports `vectors`, `lines-planes`, and `transformations` modes. + +- [ ] **Step 1: Write vector-math tests** + +Assert dot product, magnitude, zero-vector normalization error, 2D matrix transformation, line equation output, and point-normal plane equation output using deterministic numeric values. + +- [ ] **Step 2: Write component accessibility tests** + +Assert coordinate inputs have labels, changes are announced in a text interpretation, the canvas/3D visualization has an equivalent description, and no result depends on color alone. + +- [ ] **Step 3: Run focused tests and confirm RED** + +```bash +npm test -- utils/vectorMath.test.ts components/labs/VectorGeometryLab.test.tsx +``` + +- [ ] **Step 4: Implement pure vector utilities** + +Reject zero-length normalization and non-finite coordinates with typed error results. Round display values only at the presentation boundary. + +- [ ] **Step 5: Implement controlled 2D and selected 3D views** + +Default to a clear 2D coordinate plane. Reuse React Three Fiber only for selected three-dimensional views and keep a textual result panel synchronized with every visual transformation. + +- [ ] **Step 6: Enable the final Math Lab card** + +Add `labId: 'vector-geometry'` navigation and deep links from Vectors, Linear Transformations, and Analytic Geometry topics. + +- [ ] **Step 7: Verify and commit** + +```bash +npm test -- utils/vectorMath.test.ts components/labs/VectorGeometryLab.test.tsx +npm run verify +git add utils/vectorMath.ts utils/vectorMath.test.ts components/labs/VectorGeometryLab.tsx components/labs/VectorGeometryLab.test.tsx views/VectorOperations3DView.tsx views/LinearTransformation3DView.tsx views/TransformationsView.tsx views/MathLabView.tsx +git commit -m "feat: add Vector and Geometry Lab" +``` + +--- + +### Task 11: Implement reusable grading, practice, and exams + +**Files:** +- Create: `utils/quizGrading.ts` +- Create: `utils/quizGrading.test.ts` +- Create: `components/quiz/QuizRunner.tsx` +- Create: `components/quiz/QuizRunner.test.tsx` +- Create: `views/PracticeView.tsx` +- Create: `views/PracticeView.test.tsx` +- Create: `views/ExamsView.tsx` +- Create: `views/ExamsView.test.tsx` +- Modify: `data/examQuestions.ts` +- Adapt: `views/ExercisesView.tsx`, `views/FinalExamView.tsx`, `views/ExamAnalysisView.tsx` +- Modify: `components/course/LearningFlow.tsx` + +**Interfaces:** +- Produces: `gradeQuestion(question, response)` and `gradeQuiz(quiz, responses)`. +- Numeric questions use declared tolerance; matrix/vector questions verify dimensions and per-entry tolerance. +- `QuizRunner` emits one immutable result to `recordQuizResult` after submission. + +- [ ] **Step 1: Write grading tests for every supported question kind** + +Cover multiple choice, numeric tolerance at the boundary, wrong ordered steps, matrix dimension mismatch, vector tolerance, unanswered questions, and percentage calculation. + +- [ ] **Step 2: Write submission tests** + +Assert a quiz cannot submit twice, feedback includes the configured explanation, keyboard users can select and submit, and the recorded result contains course/topic IDs. + +- [ ] **Step 3: Run focused tests and confirm RED** + +```bash +npm test -- utils/quizGrading.test.ts components/quiz/QuizRunner.test.tsx views/PracticeView.test.tsx views/ExamsView.test.tsx +``` + +- [ ] **Step 4: Implement deterministic grading** + +No answer key or correctness logic belongs in JSX. `gradeQuestion` returns `{ correct, earned, possible, feedback }`; `gradeQuiz` returns per-question outcomes plus totals and integer percentage. + +- [ ] **Step 5: Build Practice and Exams from curriculum data** + +Practice filters by course, topic, and difficulty. Exams provide one Math I exam, one Math II exam, and one combined review generated from fixed question IDs in `data/examQuestions.ts`. Randomization, when used, shuffles display order only and keeps stable question IDs. + +- [ ] **Step 6: Replace legacy assessment views** + +Convert `ExercisesView`, `FinalExamView`, and `ExamAnalysisView` to thin compatibility exports or remove them after `App.tsx` imports the new views. Remove biotechnology and differential-equation questions from `data/examQuestions.ts`. + +- [ ] **Step 7: Connect lesson quizzes** + +Replace the disabled quiz handoff in `LearningFlow` with `QuizRunner` and record completed topic/quiz progress after successful submission. + +- [ ] **Step 8: Verify and commit** + +```bash +npm test -- utils/quizGrading.test.ts components/quiz/QuizRunner.test.tsx views/PracticeView.test.tsx views/ExamsView.test.tsx +npm run verify +git add utils/quizGrading.ts utils/quizGrading.test.ts components/quiz components/course/LearningFlow.tsx views/PracticeView.tsx views/PracticeView.test.tsx views/ExamsView.tsx views/ExamsView.test.tsx views/ExercisesView.tsx views/FinalExamView.tsx views/ExamAnalysisView.tsx data/examQuestions.ts App.tsx +git commit -m "feat: add Math-CS practice and exams" +``` + +--- + +### Task 12: Add formula workspace, progress analytics, and scoped assistant + +**Files:** +- Create: `views/FormulaWorkspaceView.tsx` +- Create: `views/FormulaWorkspaceView.test.tsx` +- Create: `views/ProgressView.tsx` +- Create: `views/ProgressView.test.tsx` +- Modify: `views/CheatSheetView.tsx` +- Modify: `views/AIChatView.tsx` +- Modify: `views/__tests__/AIChatView.test.tsx` +- Modify: `services/geminiService.ts` +- Modify: `App.tsx` + +**Interfaces:** +- Formula workspace consumes curriculum formulas plus saved formula records and local notes. +- Progress view consumes only pure progress selectors and stored quiz results. +- Assistant search/navigation responses resolve only to the two approved course catalogs. + +- [ ] **Step 1: Write formula persistence tests** + +Assert formulas can be saved once, grouped by course/topic, annotated with a short local note, and removed. Assert notes survive reload through `mathCsStorage`. + +- [ ] **Step 2: Write progress tests** + +Render empty, partial, and complete states. Assert both course percentages, latest scores, weak-topic identification, and recommended next topic are deterministic. + +- [ ] **Step 3: Replace assistant tests** + +Assert the introduction says `Math-CS Assistant`, mentions only Mathematical Analysis and Linear Algebra & Geometry, and contains no biotechnology, DNA, population, radioactive, or differential-equation language. + +- [ ] **Step 4: Run focused tests and confirm RED** + +```bash +npm test -- views/FormulaWorkspaceView.test.tsx views/ProgressView.test.tsx views/__tests__/AIChatView.test.tsx +``` + +- [ ] **Step 5: Implement Formula Workspace and Progress** + +Use curriculum IDs as references; do not duplicate formula content into local storage. Notes are plain text, limited to 500 characters, and rendered as text rather than HTML. Progress charts always include textual percentages and labels. + +- [ ] **Step 6: Scope the assistant** + +The assistant system instruction states that it explains only the two approved courses, uses the appโ€™s notation, may suggest an existing topic or lab, and must say when a request is outside scope. It must not generate or silently add curriculum records. Keep API-key absence as a clear local fallback, not a crash. + +- [ ] **Step 7: Retire the old cheat-sheet implementation** + +Make `CheatSheetView` re-export or wrap `FormulaWorkspaceView` during transition, then remove its legacy hard-coded formulas once no route depends on them. + +- [ ] **Step 8: Verify and commit** + +```bash +npm test -- views/FormulaWorkspaceView.test.tsx views/ProgressView.test.tsx views/__tests__/AIChatView.test.tsx +npm run verify +git add views/FormulaWorkspaceView.tsx views/FormulaWorkspaceView.test.tsx views/ProgressView.tsx views/ProgressView.test.tsx views/CheatSheetView.tsx views/AIChatView.tsx views/__tests__/AIChatView.test.tsx services/geminiService.ts App.tsx +git commit -m "feat: add formulas progress and scoped assistant" +``` + +--- + +### Task 13: Remove biotechnology modules and enforce domain cleanliness + +**Files:** +- Create: `scripts/check-domain-clean.mjs` +- Modify: `package.json` +- Modify: `App.tsx`, `types.ts`, `data/learningCatalog.ts` +- Remove: `views/DiffEqBasicsView.tsx` +- Remove: `views/PopulationModelsView.tsx` +- Remove: `views/RadioactiveDecayView.tsx` +- Remove: `views/DiffEq3DView.tsx` +- Remove remaining unused biotechnology assets/imports +- Remove and regenerate: `site/**` + +**Interfaces:** +- Produces: `npm run domain:check`. +- Extends `npm run verify` to run typecheck, tests, production build, and domain scan. + +- [ ] **Step 1: Create a failing domain scan** + +The script scans learner-facing source and metadata extensions (`.ts`, `.tsx`, `.js`, `.json`, `.html`, `.css`, `.md`, `.xml`, `.yml`, `.yaml`) while excluding `.git`, `node_modules`, generated `site`, `docs/superpowers`, and `MIGRATION_SOURCE.md`. It fails on case-insensitive matches for: + +```text +Math-Biotech +biotech +biotechnology +biology +DNA +population model +radioactive decay +differential equations +Warsaw University of Life Sciences +SGGW +``` + +- [ ] **Step 2: Add the scan to verification** + +Set scripts to include: + +```json +"domain:check": "node scripts/check-domain-clean.mjs", +"verify": "npm run typecheck && npm test && npm run build && npm run domain:check" +``` + +- [ ] **Step 3: Run the scan and confirm RED** + +```bash +npm run domain:check +``` + +Expected: failures list exact old files and matching terms. + +- [ ] **Step 4: Remove old modules and references** + +Delete the four differential-equation/biological views. Remove their lazy imports, enum values, search records, sidebar entries, questions, and README/API references. Remove unused DNA imports and files. + +- [ ] **Step 5: Remove generated legacy output** + +```bash +git rm -r site +npm run build:pages +``` + +Expected: fresh `site/` assets contain Math-CS metadata and no filenames for removed biological views. + +- [ ] **Step 6: Run the full clean verification** + +```bash +npm run verify +``` + +Expected: domain scan reports zero forbidden learner-facing matches. + +- [ ] **Step 7: Commit cleanup** + +```bash +git add package.json package-lock.json scripts App.tsx types.ts data components views site +git commit -m "refactor: remove Math-Biotech domain remnants" +``` + +--- + +### Task 14: Rename Capacitor/Android identity and align the reusable server + +**Files:** +- Modify: `capacitor.config.ts` +- Modify: `android/app/build.gradle` +- Modify: `android/app/src/main/AndroidManifest.xml` +- Move: `android/app/src/main/java/com/inmersion/mathbiotech/MainActivity.java` to `android/app/src/main/java/com/inmersion/mathcs/MainActivity.java` +- Modify: `android/app/src/main/res/values/strings.xml` +- Replace: Android launcher and splash assets with Math-CS geometric assets +- Modify: `server/src/index.ts` +- Modify: `server/README.md` +- Modify: `server/QUICKSTART.md` + +**Interfaces:** +- Capacitor `appId` becomes `com.inmersion.mathcs` and `appName` becomes `Inmerson Math-CS`. +- Android `namespace` and `applicationId` become `com.inmersion.mathcs`. +- Existing matrix/exam API route signatures remain unchanged. + +- [ ] **Step 1: Add metadata assertions to the domain scan or a focused test** + +Assert exact Capacitor app ID/name, Android package/name, and server display name. Assert no old package string remains outside migration history. + +- [ ] **Step 2: Run the assertions and confirm RED** + +```bash +npm run domain:check +``` + +- [ ] **Step 3: Rename platform identifiers** + +Update TypeScript config, Gradle namespace/application ID, Java package declaration and directory, manifest references, and visible Android strings. Run: + +```bash +npx cap sync android +``` + +Review generated changes before staging; do not commit local SDK paths or secrets. + +- [ ] **Step 4: Replace mobile imagery** + +Use a geometric coordinate-grid/matrix mark with no DNA motif. Confirm adaptive foreground/background assets and portrait/landscape splash images remain valid at all existing density buckets. + +- [ ] **Step 5: Align server identity without changing endpoints** + +Rename display messages and documentation to `Inmerson Math-CS API`. Preserve matrix and exam routes. Remove biotechnology examples from API documentation. + +- [ ] **Step 6: Verify web and Android builds** + +```bash +npm run verify +cd android +./gradlew test assembleDebug +cd .. +``` + +Expected: web verification passes and Android unit tests/debug APK build succeed. + +- [ ] **Step 7: Commit platform migration** + +```bash +git add capacitor.config.ts android server +git commit -m "chore: rename Math-CS platform identity" +``` + +--- + +### Task 15: Final CI, deployment, and acceptance verification + +**Files:** +- Modify: `.github/workflows/ci.yml` +- Modify: `.github/workflows/deploy.yml` +- Modify: `README.md` +- Generated: `site/**` + +**Interfaces:** +- CI runs `npm ci --include=optional` and `npm run verify` on pushes and pull requests. +- Publish workflow runs verification, `npm run build:pages`, uploads `math-cs-pages-site`, and commits current `site/` output. + +- [ ] **Step 1: Tighten CI commands** + +Ensure Node.js 22, npm cache, optional dependency installation, and `npm run verify` are identical between CI and Pages publication. Add Android build as a separate job only when Android files change. + +- [ ] **Step 2: Run all local verification** + +```bash +npm ci --include=optional +npm run verify +cd android && ./gradlew test assembleDebug && cd .. +``` + +Expected: zero type errors, zero failed tests, successful Vite build, clean domain scan, successful Android tests, and successful debug assembly. + +- [ ] **Step 3: Perform the acceptance smoke test** + +At desktop and mobile widths, verify: + +```text +Dashboard +Math I course hub and a complete lesson flow +Math II course hub and a complete lesson flow +Function Explorer +Matrix Lab +Vector & Geometry Lab +Practice +Exams +Progress +Formula Workspace +Math-CS Assistant fallback and configured mode +``` + +Also verify malformed local-storage JSON recovers safely, a singular inverse shows a specific error, an unsupported function preset recovers safely, quiz scores persist after reload, and all main actions are keyboard reachable. + +- [ ] **Step 4: Open a pull request** + +The PR body lists the pinned source SHA, course scope, removed domain modules, test commands and results, Android result, domain-scan result, and screenshots for desktop/mobile Dashboard, one lesson, and each lab. + +- [ ] **Step 5: Merge only after required checks pass** + +Merge to `main`; confirm the publish workflow commits regenerated `site/` output and its artifact is named `math-cs-pages-site`. + +- [ ] **Step 6: Verify the public deployment** + +Open the deployed `Inmerson/Math-CS` Pages URL. Confirm the document title, manifest, navigation, dynamic chunks, and all smoke-test destinations load from the `/Math-CS/` base without 404 errors. + +- [ ] **Step 7: Record completion** + +Update the README verification section with the successful commands and deployed product scope. Commit only if this documentation changed after the final merge. diff --git a/domain/curriculum.ts b/domain/curriculum.ts new file mode 100644 index 0000000..613525e --- /dev/null +++ b/domain/curriculum.ts @@ -0,0 +1,74 @@ +export type CourseId = 'math-analysis' | 'linear-algebra-geometry'; +export type TopicId = + | 'functions-graphs' + | 'sequences' + | 'limits' + | 'continuity' + | 'derivatives' + | 'derivative-applications' + | 'integrals' + | 'taylor-series' + | 'vectors' + | 'matrices' + | 'linear-systems' + | 'determinants' + | 'matrix-inverses' + | 'vector-spaces' + | 'linear-transformations' + | 'eigenvalues-eigenvectors' + | 'analytic-geometry'; + +export type LearningStage = 'learn' | 'visualize' | 'practice' | 'cs-connection' | 'quiz'; +export type VisualizationKind = 'function-explorer' | 'matrix-lab' | 'vector-geometry-lab' | 'none'; +export type QuestionKind = 'multiple-choice' | 'numeric' | 'ordered-steps' | 'matrix' | 'vector'; + +export interface FormulaDefinition { + id: string; + label: string; + latex: string; + explanation: string; +} + +export interface PracticeQuestion { + id: string; + kind: QuestionKind; + prompt: string; + choices?: string[]; + answer: string | number | number[] | number[][]; + tolerance?: number; + explanation: string; +} + +export interface QuizDefinition { + id: string; + title: string; + questions: PracticeQuestion[]; +} + +export interface TopicDefinition { + id: TopicId; + courseId: CourseId; + title: string; + description: string; + prerequisites: TopicId[]; + learningObjectives: string[]; + sections: { id: string; title: string; markdown: string }[]; + formulas: FormulaDefinition[]; + visualization: { kind: VisualizationKind; presetId?: string }; + workedExamples: { id: string; title: string; steps: string[] }[]; + csConnections: { title: string; explanation: string }[]; + practiceQuestions: PracticeQuestion[]; + quiz: QuizDefinition; + difficulty: 1 | 2 | 3; + estimatedStudyMinutes: number; +} + +export interface CourseDefinition { + id: CourseId; + title: string; + officialTitle: string; + shortTitle: 'Math I' | 'Math II'; + description: string; + order: 1 | 2; + topics: TopicDefinition[]; +} diff --git a/index.html b/index.html index cffc7d5..ee22e98 100644 --- a/index.html +++ b/index.html @@ -8,7 +8,7 @@ - Inmerson โ€ข Personal Math & Biotech Lab + Inmerson Math-CS โ€ข Interactive Mathematics for Computer Science diff --git a/manifest.json b/manifest.json index e7033c6..29d6810 100644 --- a/manifest.json +++ b/manifest.json @@ -1,26 +1,10 @@ { - "name": "Inmerson โ€ข Personal Math & Biotech Lab", - "short_name": "Inmerson Lab", - "start_url": "/", + "name": "Inmerson Math-CS \u2022 Interactive Mathematics for Computer Science", + "short_name": "Math-CS", + "description": "Interactive Mathematical Analysis and Linear Algebra & Geometry for computer science.", + "start_url": "/Math-CS/", "display": "standalone", - "background_color": "#020617", - "theme_color": "#020617", - "orientation": "portrait", - "icons": [ - { - "src": "https://cdn.lucide.dev/icon-library/dna-48.png", - "sizes": "48x48", - "type": "image/png" - }, - { - "src": "https://cdn.lucide.dev/icon-library/dna-192.png", - "sizes": "192x192", - "type": "image/png" - }, - { - "src": "https://cdn.lucide.dev/icon-library/dna-512.png", - "sizes": "512x512", - "type": "image/png" - } - ] -} \ No newline at end of file + "background_color": "#07111f", + "theme_color": "#0f766e", + "icons": [] +} diff --git a/metadata.json b/metadata.json index 9edd721..b5a203b 100644 --- a/metadata.json +++ b/metadata.json @@ -1,5 +1,4 @@ { - "name": "Inmerson โ€ข Personal Math & Biotech Lab", - "description": "A personal interactive laboratory for mathematical modeling, biotechnology, observation and learning.", - "requestFramePermissions": [] -} \ No newline at end of file + "name": "Inmerson Math-CS", + "description": "Interactive Mathematics for Computer Science: Mathematical Analysis and Linear Algebra & Geometry." +} diff --git a/package-lock.json b/package-lock.json index a0f2590..7d079c8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { - "name": "math-biotech", + "name": "inmerson-math-cs", "version": "0.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "math-biotech", + "name": "inmerson-math-cs", "version": "0.0.0", "dependencies": { "@capacitor/android": "^6.2.1", @@ -3570,6 +3570,64 @@ "node": ">=14.0.0" } }, + "node_modules/@tailwindcss/oxide-wasm32-wasi/node_modules/@emnapi/core": { + "version": "1.8.1", + "inBundle": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@emnapi/wasi-threads": "1.1.0", + "tslib": "^2.4.0" + } + }, + "node_modules/@tailwindcss/oxide-wasm32-wasi/node_modules/@emnapi/runtime": { + "version": "1.8.1", + "inBundle": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@tailwindcss/oxide-wasm32-wasi/node_modules/@emnapi/wasi-threads": { + "version": "1.1.0", + "inBundle": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@tailwindcss/oxide-wasm32-wasi/node_modules/@napi-rs/wasm-runtime": { + "version": "1.1.1", + "inBundle": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@emnapi/core": "^1.7.1", + "@emnapi/runtime": "^1.7.1", + "@tybys/wasm-util": "^0.10.1" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Brooooooklyn" + } + }, + "node_modules/@tailwindcss/oxide-wasm32-wasi/node_modules/@tybys/wasm-util": { + "version": "0.10.1", + "inBundle": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@tailwindcss/oxide-wasm32-wasi/node_modules/tslib": { + "version": "2.8.1", + "inBundle": true, + "license": "0BSD", + "optional": true + }, "node_modules/@tailwindcss/oxide-win32-arm64-msvc": { "version": "4.2.4", "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-arm64-msvc/-/oxide-win32-arm64-msvc-4.2.4.tgz", diff --git a/package.json b/package.json index 20846eb..2c38bcb 100644 --- a/package.json +++ b/package.json @@ -1,12 +1,12 @@ { - "name": "math-biotech", + "name": "inmerson-math-cs", "private": true, "version": "0.0.0", "type": "module", "scripts": { "dev": "vite", "build": "vite build", - "build:pages": "vite build --base=/Math-Biotech-Project/site/ --outDir site --emptyOutDir", + "build:pages": "vite build --base=/Math-CS/ --outDir site --emptyOutDir", "preview": "vite preview", "typecheck": "tsc --noEmit", "test": "vitest run", diff --git a/utils/mathCsStorage.test.ts b/utils/mathCsStorage.test.ts new file mode 100644 index 0000000..b6a662c --- /dev/null +++ b/utils/mathCsStorage.test.ts @@ -0,0 +1,27 @@ +import { beforeEach, describe, expect, it } from 'vitest'; +import { + MATH_CS_STORAGE_PREFIX, + clearMathCsState, + createDefaultMathCsState, + loadMathCsState, + saveMathCsState, +} from './mathCsStorage'; + +describe('Math-CS storage', () => { + beforeEach(() => localStorage.clear()); + + it('recovers from malformed JSON and ignores legacy keys', () => { + localStorage.setItem('math-cs:v1:state', '{broken'); + localStorage.setItem('app_module', 'DIFF_EQ'); + expect(loadMathCsState()).toEqual(createDefaultMathCsState()); + }); + + it('writes only to the versioned Math-CS state key', () => { + saveMathCsState(createDefaultMathCsState()); + expect(MATH_CS_STORAGE_PREFIX).toBe('math-cs:v1:'); + expect(localStorage.getItem('math-cs:v1:state')).not.toBeNull(); + expect(localStorage.getItem('app_module')).toBeNull(); + clearMathCsState(); + expect(localStorage.getItem('math-cs:v1:state')).toBeNull(); + }); +}); diff --git a/utils/mathCsStorage.ts b/utils/mathCsStorage.ts new file mode 100644 index 0000000..2a02f95 --- /dev/null +++ b/utils/mathCsStorage.ts @@ -0,0 +1,73 @@ +import { CourseId, TopicId } from '../domain/curriculum'; + +export const MATH_CS_STORAGE_PREFIX = 'math-cs:v1:'; +const STATE_KEY = `${MATH_CS_STORAGE_PREFIX}state`; + +export interface QuizResult { + courseId: CourseId; + topicId: TopicId; + score: number; + total: number; + percentage: number; + completedAt: string; +} + +export interface SavedFormula { + formulaId: string; + courseId: CourseId; + topicId: TopicId; + note: string; +} + +export interface MathCsState { + version: 1; + completedTopicIds: TopicId[]; + lastDestination: { section: string; courseId?: CourseId; topicId?: TopicId } | null; + quizResults: QuizResult[]; + savedFormulas: SavedFormula[]; +} + +export const createDefaultMathCsState = (): MathCsState => ({ + version: 1, + completedTopicIds: [], + lastDestination: null, + quizResults: [], + savedFormulas: [], +}); + +const normalizeState = (value: unknown): MathCsState => { + if (!value || typeof value !== 'object') return createDefaultMathCsState(); + const candidate = value as Partial; + if (candidate.version !== 1) return createDefaultMathCsState(); + return { + version: 1, + completedTopicIds: [...new Set(Array.isArray(candidate.completedTopicIds) ? candidate.completedTopicIds : [])], + lastDestination: candidate.lastDestination && typeof candidate.lastDestination.section === 'string' + ? candidate.lastDestination + : null, + quizResults: Array.isArray(candidate.quizResults) ? candidate.quizResults.filter((item): item is QuizResult => Boolean(item && item.courseId && item.topicId)) : [], + savedFormulas: Array.isArray(candidate.savedFormulas) + ? Array.from(new Map(candidate.savedFormulas.filter(Boolean).map((item) => [item.formulaId, item])).values()) + : [], + }; +}; + +export const loadMathCsState = (): MathCsState => { + if (typeof localStorage === 'undefined') return createDefaultMathCsState(); + try { + const raw = localStorage.getItem(STATE_KEY); + return raw ? normalizeState(JSON.parse(raw)) : createDefaultMathCsState(); + } catch { + return createDefaultMathCsState(); + } +}; + +export const saveMathCsState = (state: MathCsState): void => { + if (typeof localStorage === 'undefined') return; + localStorage.setItem(STATE_KEY, JSON.stringify(normalizeState(state))); +}; + +export const clearMathCsState = (): void => { + if (typeof localStorage === 'undefined') return; + localStorage.removeItem(STATE_KEY); +}; diff --git a/utils/progress.test.ts b/utils/progress.test.ts new file mode 100644 index 0000000..98ac0c9 --- /dev/null +++ b/utils/progress.test.ts @@ -0,0 +1,28 @@ +import { describe, expect, it } from 'vitest'; +import { mathAnalysisCourse } from '../data/courses/mathAnalysis'; +import { createDefaultMathCsState } from './mathCsStorage'; +import { getCourseProgress, getRecommendedTopic, markTopicComplete, recordQuizResult } from './progress'; + +describe('Math-CS progress', () => { + it('calculates completion percentage', () => { + const emptyState = createDefaultMathCsState(); + expect(getCourseProgress(emptyState, mathAnalysisCourse)).toBe(0); + const stateWithFour = mathAnalysisCourse.topics.slice(0, 4) + .reduce((state, topic) => markTopicComplete(state, topic.id), emptyState); + expect(getCourseProgress(stateWithFour, mathAnalysisCourse)).toBe(50); + }); + + it('records deterministic quiz percentages and preserves the best result', () => { + const emptyState = createDefaultMathCsState(); + const first = recordQuizResult(emptyState, 'math-analysis', 'limits', 4, 5, '2026-08-01T00:00:00.000Z'); + expect(first.quizResults[0].percentage).toBe(80); + const lower = recordQuizResult(first, 'math-analysis', 'limits', 2, 5, '2026-08-02T00:00:00.000Z'); + expect(lower.quizResults[0].percentage).toBe(80); + expect(lower.quizResults[0].completedAt).toBe('2026-08-02T00:00:00.000Z'); + }); + + it('recommends the next prerequisite-ready topic', () => { + const state = markTopicComplete(createDefaultMathCsState(), 'functions-graphs'); + expect(getRecommendedTopic(state, mathAnalysisCourse)?.id).toBe('sequences'); + }); +}); diff --git a/utils/progress.ts b/utils/progress.ts new file mode 100644 index 0000000..f4f373e --- /dev/null +++ b/utils/progress.ts @@ -0,0 +1,58 @@ +import { CourseDefinition, CourseId, TopicId } from '../domain/curriculum'; +import { MathCsState, SavedFormula } from './mathCsStorage'; + +export const markTopicComplete = (state: MathCsState, topicId: TopicId): MathCsState => ({ + ...state, + completedTopicIds: [...new Set([...state.completedTopicIds, topicId])], +}); + +export const recordQuizResult = ( + state: MathCsState, + courseId: CourseId, + topicId: TopicId, + score: number, + total: number, + completedAt = new Date().toISOString(), +): MathCsState => { + const percentage = total > 0 ? Math.round((score / total) * 100) : 0; + const existing = state.quizResults.find((result) => result.courseId === courseId && result.topicId === topicId); + const best = existing && existing.percentage > percentage + ? { ...existing, completedAt } + : { courseId, topicId, score, total, percentage, completedAt }; + return { + ...state, + quizResults: [ + ...state.quizResults.filter((result) => result.courseId !== courseId || result.topicId !== topicId), + best, + ], + }; +}; + +export const saveFormula = (state: MathCsState, formula: SavedFormula): MathCsState => ({ + ...state, + savedFormulas: [ + ...state.savedFormulas.filter((item) => item.formulaId !== formula.formulaId), + formula, + ], +}); + +export const removeFormula = (state: MathCsState, formulaId: string): MathCsState => ({ + ...state, + savedFormulas: state.savedFormulas.filter((formula) => formula.formulaId !== formulaId), +}); + +export const saveFormulaNote = (state: MathCsState, formulaId: string, note: string): MathCsState => ({ + ...state, + savedFormulas: state.savedFormulas.map((formula) => formula.formulaId === formulaId ? { ...formula, note } : formula), +}); + +export const getCourseProgress = (state: MathCsState, course: CourseDefinition): number => { + if (course.topics.length === 0) return 0; + const completed = course.topics.filter((topic) => state.completedTopicIds.includes(topic.id)).length; + return Math.round((completed / course.topics.length) * 100); +}; + +export const getRecommendedTopic = (state: MathCsState, course: CourseDefinition) => + course.topics.find((topic) => !state.completedTopicIds.includes(topic.id) + && topic.prerequisites.every((prerequisite) => state.completedTopicIds.includes(prerequisite))) + ?? course.topics.find((topic) => !state.completedTopicIds.includes(topic.id)); diff --git a/vite.config.ts b/vite.config.ts index 4010c8f..2d94d6b 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -10,7 +10,7 @@ export default defineConfig(({ mode }) => { port: 3000, host: '0.0.0.0', }, - base: '/Math-Biotech-Project/', + base: '/Math-CS/', plugins: [react()], test: { globals: true, From 52ed5030e3430c36b76d092b2192d723b0b5fe9f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 6 Aug 2026 06:44:38 +0000 Subject: [PATCH 3/9] feat: add Math-CS navigation and course experience --- App.test.tsx | 4 + App.tsx | 258 +++------------- components/AnimatedBackground.tsx | 39 +-- components/DNAStrand.tsx | 179 ----------- components/Sidebar.test.tsx | 25 +- components/Sidebar.tsx | 322 ++++---------------- components/course/CourseCard.tsx | 28 ++ components/course/LearningFlow.tsx | 17 ++ components/course/TopicList.tsx | 15 + components/layout/BottomNavigation.test.tsx | 11 + components/layout/BottomNavigation.tsx | 36 +++ data/learningCatalog.test.ts | 58 +--- data/learningCatalog.ts | 153 ++-------- index.css | 103 ++----- tailwind.config.js | 28 +- types.ts | 20 ++ views/CourseHubView.test.tsx | 6 + views/CourseHubView.tsx | 16 + views/DashboardView.test.tsx | 5 + views/DashboardView.tsx | 318 +------------------ views/LessonWorkspaceView.test.tsx | 5 + views/LessonWorkspaceView.tsx | 15 + views/Sequences3DView.tsx | 141 +-------- 23 files changed, 369 insertions(+), 1433 deletions(-) create mode 100644 App.test.tsx delete mode 100644 components/DNAStrand.tsx create mode 100644 components/course/CourseCard.tsx create mode 100644 components/course/LearningFlow.tsx create mode 100644 components/course/TopicList.tsx create mode 100644 components/layout/BottomNavigation.test.tsx create mode 100644 components/layout/BottomNavigation.tsx create mode 100644 views/CourseHubView.test.tsx create mode 100644 views/CourseHubView.tsx create mode 100644 views/DashboardView.test.tsx create mode 100644 views/LessonWorkspaceView.test.tsx create mode 100644 views/LessonWorkspaceView.tsx diff --git a/App.test.tsx b/App.test.tsx new file mode 100644 index 0000000..aba6be2 --- /dev/null +++ b/App.test.tsx @@ -0,0 +1,4 @@ +import { render, screen } from '@testing-library/react'; +import { beforeEach, describe, expect, it } from 'vitest'; +import App from './App'; +describe('Math-CS app shell', () => { beforeEach(() => localStorage.clear()); it('provides an accessible notebook shell', () => { render(); expect(screen.getAllByRole('main')).toHaveLength(1); expect(screen.getAllByRole('heading', { level: 1 })).toHaveLength(1); expect(screen.getByLabelText('Primary navigation')).toBeInTheDocument(); expect(screen.getByRole('button', { name: 'Open Math I' })).toBeVisible(); expect(document.querySelector('[aria-hidden="true"]')).not.toBeNull(); }); }); diff --git a/App.tsx b/App.tsx index e940dd9..846b7ac 100644 --- a/App.tsx +++ b/App.tsx @@ -1,228 +1,54 @@ -import React, { lazy, Suspense, useState } from 'react'; +import React, { useState } from 'react'; +import { Menu } from 'lucide-react'; +import { AnimatedBackground } from './components/AnimatedBackground'; import { Sidebar } from './components/Sidebar'; -import { ViewMode, ModuleType } from './types'; +import { BottomNavigation } from './components/layout/BottomNavigation'; import { DashboardView } from './views/DashboardView'; -import { AnimatedBackground } from './components/AnimatedBackground'; -import { motion, AnimatePresence, useReducedMotion } from 'framer-motion'; -import { LoaderCircle, Lock, Menu } from 'lucide-react'; -import { usePersistedState } from './utils/usePersistedState'; -import { - getDefaultViewForModule, - LearningDestinationRef, -} from './data/learningCatalog'; - -const BasicsView = lazy(() => import('./views/BasicsView').then(({ BasicsView }) => ({ default: BasicsView }))); -const OperationsView = lazy(() => import('./views/OperationsView').then(({ OperationsView }) => ({ default: OperationsView }))); -const DeterminantView = lazy(() => import('./views/DeterminantView').then(({ DeterminantView }) => ({ default: DeterminantView }))); -const InverseView = lazy(() => import('./views/InverseView').then(({ InverseView }) => ({ default: InverseView }))); -const HomeworkView = lazy(() => import('./views/ExercisesView').then(({ HomeworkView }) => ({ default: HomeworkView }))); -const SequencesView = lazy(() => import('./views/SequencesView').then(({ SequencesView }) => ({ default: SequencesView }))); -const Sequences3DView = lazy(() => import('./views/Sequences3DView').then(({ Sequences3DView }) => ({ default: Sequences3DView }))); -const FunctionsView = lazy(() => import('./views/FunctionsView').then(({ FunctionsView }) => ({ default: FunctionsView }))); -const Surface3DView = lazy(() => import('./views/Surface3DView').then(({ Surface3DView }) => ({ default: Surface3DView }))); -const FinalExamView = lazy(() => import('./views/FinalExamView').then(({ FinalExamView }) => ({ default: FinalExamView }))); -const ExamAnalysisView = lazy(() => import('./views/ExamAnalysisView').then(({ ExamAnalysisView }) => ({ default: ExamAnalysisView }))); -const DerivativesRulesView = lazy(() => import('./views/DerivativesRulesView').then(({ DerivativesRulesView }) => ({ default: DerivativesRulesView }))); -const FunctionAnalysisView = lazy(() => import('./views/FunctionAnalysisView').then(({ FunctionAnalysisView }) => ({ default: FunctionAnalysisView }))); -const SystemsView = lazy(() => import('./views/SystemsView').then(({ SystemsView }) => ({ default: SystemsView }))); -const ContinuityView = lazy(() => import('./views/ContinuityView').then(({ ContinuityView }) => ({ default: ContinuityView }))); -const GaussianView = lazy(() => import('./views/GaussianView').then(({ GaussianView }) => ({ default: GaussianView }))); -const EigenView = lazy(() => import('./views/EigenView').then(({ EigenView }) => ({ default: EigenView }))); -const CobwebView = lazy(() => import('./views/CobwebView').then(({ CobwebView }) => ({ default: CobwebView }))); -const SeriesView = lazy(() => import('./views/SeriesView').then(({ SeriesView }) => ({ default: SeriesView }))); -const TransformationsView = lazy(() => import('./views/TransformationsView').then(({ TransformationsView }) => ({ default: TransformationsView }))); -const NewtonView = lazy(() => import('./views/NewtonView').then(({ NewtonView }) => ({ default: NewtonView }))); -const TaylorSeriesView = lazy(() => import('./views/TaylorSeriesView').then(({ TaylorSeriesView }) => ({ default: TaylorSeriesView }))); -const IntegralBasicsView = lazy(() => import('./views/IntegralBasicsView').then(({ IntegralBasicsView }) => ({ default: IntegralBasicsView }))); -const IntegralRulesView = lazy(() => import('./views/IntegralRulesView').then(({ IntegralRulesView }) => ({ default: IntegralRulesView }))); -const AreaUnderCurveView = lazy(() => import('./views/AreaUnderCurveView').then(({ AreaUnderCurveView }) => ({ default: AreaUnderCurveView }))); -const Integrals3DView = lazy(() => import('./views/Integrals3DView').then(({ Integrals3DView }) => ({ default: Integrals3DView }))); -const DiffEqBasicsView = lazy(() => import('./views/DiffEqBasicsView').then(({ DiffEqBasicsView }) => ({ default: DiffEqBasicsView }))); -const PopulationModelsView = lazy(() => import('./views/PopulationModelsView').then(({ PopulationModelsView }) => ({ default: PopulationModelsView }))); -const RadioactiveDecayView = lazy(() => import('./views/RadioactiveDecayView').then(({ RadioactiveDecayView }) => ({ default: RadioactiveDecayView }))); -const DiffEq3DView = lazy(() => import('./views/DiffEq3DView').then(({ DiffEq3DView }) => ({ default: DiffEq3DView }))); -const CheatSheetView = lazy(() => import('./views/CheatSheetView').then(({ CheatSheetView }) => ({ default: CheatSheetView }))); -const LinearTransformation3DView = lazy(() => import('./views/LinearTransformation3DView').then(({ LinearTransformation3DView }) => ({ default: LinearTransformation3DView }))); -const VectorOperations3DView = lazy(() => import('./views/VectorOperations3DView').then(({ VectorOperations3DView }) => ({ default: VectorOperations3DView }))); -const AIChatView = lazy(() => import('./views/AIChatView').then(({ AIChatView }) => ({ default: AIChatView }))); - -const EmptyExamView: React.FC<{ title: string }> = ({ title }) => ( -
-
- -
-
-

{title}

-
- STATUS: LOCKED -
-
-

- This examination module is currently unavailable. Please proceed to the Final Exam for comprehensive assessment. -

-
-); +import { CourseHubView } from './views/CourseHubView'; +import { LessonWorkspaceView } from './views/LessonWorkspaceView'; +import { AppDestination } from './types'; +import { getCourse, getTopic } from './data/courseCatalog'; +import { createDefaultMathCsState, loadMathCsState, MathCsState, saveMathCsState } from './utils/mathCsStorage'; +import { markTopicComplete } from './utils/progress'; + +const isValidDestination = (destination: AppDestination): boolean => { + if (destination.section === 'course') return Boolean(destination.courseId && getCourse(destination.courseId)); + if (destination.section === 'lesson') return Boolean(destination.courseId && destination.topicId && getTopic(destination.courseId, destination.topicId)); + return true; +}; -const ViewLoadingFallback: React.FC = () => ( -
-
- -
-
-

Preparing the learning lab

-

Loading only the resources required for this topic.

-
-
-); +const Placeholder: React.FC<{ title: string; description: string }> = ({ title, description }) =>

{title}

{description}

; const App: React.FC = () => { - const [currentModule, setCurrentModule] = usePersistedState('app_module', ModuleType.HOME); - const [view, setView] = usePersistedState('app_view', ViewMode.BASICS); - const [lastDestination, setLastDestination] = usePersistedState( - 'last_learning_destination', - null, - ); - const [isMobileMenuOpen, setIsMobileMenuOpen] = useState(false); - const shouldReduceMotion = useReducedMotion(); - - const navigateTo = (destination: LearningDestinationRef) => { - setCurrentModule(destination.module); - setView(destination.view); - setLastDestination(destination); - setIsMobileMenuOpen(false); - }; - - const handleModuleSelect = (module: ModuleType) => { - navigateTo({ - module, - view: getDefaultViewForModule(module), - }); + const initial = typeof window === 'undefined' ? createDefaultMathCsState() : loadMathCsState(); + const [state, setState] = useState(initial); + const stored = initial.lastDestination as AppDestination | null; + const [destination, setDestination] = useState(stored && isValidDestination(stored) ? stored : { section: 'dashboard' }); + const [menuOpen, setMenuOpen] = useState(false); + + const updateState = (next: MathCsState) => { setState(next); saveMathCsState(next); }; + const navigate = (next: AppDestination) => { + const safe = isValidDestination(next) ? next : { section: 'dashboard' } as AppDestination; + setDestination(safe); + updateState({ ...state, lastDestination: safe }); + setMenuOpen(false); }; - const handleViewSelect = (nextView: ViewMode) => { - setView(nextView); - if (currentModule !== ModuleType.HOME) { - setLastDestination({ - module: currentModule, - view: nextView, - }); + const renderContent = () => { + if (!isValidDestination(destination)) return

Learning path not found

Choose a safe destination to continue.

; + switch (destination.section) { + case 'dashboard': return ; + case 'course': return ; + case 'lesson': return updateState(markTopicComplete(state, topicId))} />; + case 'math-lab': return ; + case 'practice': return ; + case 'exams': return ; + case 'progress': return ; + case 'formulas': return ; + case 'assistant': return ; } }; - const handleGoHome = () => { - setCurrentModule(ModuleType.HOME); - setIsMobileMenuOpen(false); - }; - - const renderView = () => { - switch (view) { - case ViewMode.BASICS: return ; - case ViewMode.OPERATIONS: return ; - case ViewMode.DETERMINANT: return ; - case ViewMode.INVERSE: return ; - case ViewMode.SYSTEMS: return ; - case ViewMode.GAUSSIAN: return ; - case ViewMode.EIGENVALUES: return ; - case ViewMode.VECTOR_3D: return ; - case ViewMode.VECTOR_OPS_3D: return ; - case ViewMode.SEQUENCES: return ; - case ViewMode.SERIES: return ; - case ViewMode.COBWEB: return ; - case ViewMode.SEQUENCES_3D: return ; - case ViewMode.FUNCTIONS: return ; - case ViewMode.TRANSFORMATIONS: return ; - case ViewMode.NEWTON: return ; - case ViewMode.FUNCTIONS_3D: return ; - case ViewMode.LIMITS: return ; - case ViewMode.CONTINUITY: return ; - case ViewMode.LIMITS_3D: return ; - case ViewMode.DERIVATIVE_RULES: return ; - case ViewMode.FUNCTION_ANALYSIS: return ; - case ViewMode.TAYLOR: return ; - case ViewMode.DERIVATIVES_3D: return ; - case ViewMode.INTEGRAL_BASICS: return ; - case ViewMode.INTEGRAL_RULES: return ; - case ViewMode.AREA_UNDER_CURVE: return ; - case ViewMode.INTEGRALS_3D: return ; - case ViewMode.DIFF_BASICS: return ; - case ViewMode.POPULATION_MODELS: return ; - case ViewMode.RADIOACTIVE_DECAY: return ; - case ViewMode.DIFF_EQ_3D: return ; - case ViewMode.CLASS_EXAM_1: return ; - case ViewMode.CLASS_EXAM_2: return ; - case ViewMode.CLASS_EXAM_3: return ; - case ViewMode.FULL_EXAM: return ; - case ViewMode.EXAM_ANALYSIS: return ; - case ViewMode.HOMEWORK: return ; - case ViewMode.FINAL_EXAM: return ; - case ViewMode.CHEAT_SHEET: return ; - case ViewMode.AI_CHAT: return ; - default: return ; - } - }; - - return ( -
- - -
- {currentModule === ModuleType.HOME ? ( - - ) : ( -
- setIsMobileMenuOpen((open) => !open)} - /> - -
-
- - - {currentModule.replace('_', ' ')} - - - -
- - - }> - {renderView()} - - - -
-
-
- )} -
-
- ); + return
setMenuOpen(false)} />
Math-CS
{renderContent()}
; }; - export default App; diff --git a/components/AnimatedBackground.tsx b/components/AnimatedBackground.tsx index 82cd916..1c824b4 100644 --- a/components/AnimatedBackground.tsx +++ b/components/AnimatedBackground.tsx @@ -1,39 +1,2 @@ - import React from 'react'; -import { motion } from 'framer-motion'; - -export const AnimatedBackground: React.FC = () => { - return ( -
- - {/* 1. Deep Space Gradient */} -
- - {/* 2. Stars (CSS implementation for performance) */} -
- - {/* 3. Nebula Orbs (Animated) */} -
-
-
- - {/* 4. Grid Overlay (Perspective) */} -
- - {/* 5. Noise Texture */} -
-
- ); -}; +export const AnimatedBackground: React.FC = () =>