@jjlmoya/utils-science 1.51.0 → 1.53.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/scripts/crystal-lattice-catalog-translations.mjs +1 -0
- package/src/category/i18n/es.ts +3 -4
- package/src/category/i18n/fr.ts +2 -2
- package/src/category/i18n/it.ts +2 -2
- package/src/category/i18n/pt.ts +2 -2
- package/src/category/index.ts +25 -25
- package/src/components/PreviewNavSidebar.astro +1 -1
- package/src/components/PreviewToolbar.astro +1 -1
- package/src/data.ts +1 -1
- package/src/env.d.ts +1 -1
- package/src/layouts/PreviewLayout.astro +1 -1
- package/src/pages/index.astro +1 -1
- package/src/tests/bibliography_wellformed_export.test.ts +46 -0
- package/src/tests/category_seo_quality.test.ts +76 -0
- package/src/tests/faq_count.test.ts +19 -19
- package/src/tests/i18n_coverage.test.ts +36 -36
- package/src/tests/mocks/astro_mock.js +1 -1
- package/src/tests/no_h1_in_components.test.ts +1 -1
- package/src/tests/script_density.test.ts +94 -94
- package/src/tests/seo_length.test.ts +24 -24
- package/src/tests/seo_parity.test.ts +5 -5
- package/src/tests/seo_translation_completeness.test.ts +76 -0
- package/src/tests/seo_wellformed_export.test.ts +65 -0
- package/src/tests/spanish_leakage.test.ts +175 -175
- package/src/tool/asteroid-impact/component.astro +251 -251
- package/src/tool/asteroid-impact/helpers.ts +17 -17
- package/src/tool/asteroid-impact/i18n/de.ts +2 -2
- package/src/tool/asteroid-impact/i18n/en.ts +2 -2
- package/src/tool/asteroid-impact/i18n/es.ts +2 -2
- package/src/tool/asteroid-impact/i18n/fr.ts +2 -2
- package/src/tool/asteroid-impact/i18n/id.ts +2 -2
- package/src/tool/asteroid-impact/i18n/it.ts +2 -2
- package/src/tool/asteroid-impact/i18n/ja.ts +2 -2
- package/src/tool/asteroid-impact/i18n/ko.ts +2 -2
- package/src/tool/asteroid-impact/i18n/nl.ts +2 -2
- package/src/tool/asteroid-impact/i18n/pl.ts +2 -2
- package/src/tool/asteroid-impact/i18n/pt.ts +2 -2
- package/src/tool/asteroid-impact/i18n/ru.ts +2 -2
- package/src/tool/asteroid-impact/i18n/sv.ts +2 -2
- package/src/tool/asteroid-impact/i18n/tr.ts +2 -2
- package/src/tool/asteroid-impact/i18n/zh.ts +2 -2
- package/src/tool/asteroid-impact/script.ts +262 -262
- package/src/tool/asteroid-impact/seo.astro +15 -15
- package/src/tool/asteroid-impact/ui.ts +69 -69
- package/src/tool/black-hole-event-horizon-simulator/i18n/de.ts +249 -241
- package/src/tool/black-hole-event-horizon-simulator/i18n/fr.ts +252 -247
- package/src/tool/black-hole-event-horizon-simulator/i18n/id.ts +259 -259
- package/src/tool/black-hole-event-horizon-simulator/i18n/it.ts +255 -252
- package/src/tool/black-hole-event-horizon-simulator/i18n/ja.ts +254 -252
- package/src/tool/black-hole-event-horizon-simulator/i18n/ko.ts +258 -258
- package/src/tool/black-hole-event-horizon-simulator/i18n/nl.ts +256 -252
- package/src/tool/black-hole-event-horizon-simulator/i18n/pl.ts +258 -258
- package/src/tool/black-hole-event-horizon-simulator/i18n/pt.ts +256 -252
- package/src/tool/black-hole-event-horizon-simulator/i18n/ru.ts +258 -258
- package/src/tool/black-hole-event-horizon-simulator/i18n/sv.ts +257 -252
- package/src/tool/black-hole-event-horizon-simulator/i18n/tr.ts +256 -251
- package/src/tool/black-hole-event-horizon-simulator/i18n/zh.ts +261 -252
- package/src/tool/cellular-renewal/component.astro +126 -126
- package/src/tool/cellular-renewal/i18n/de.ts +1 -1
- package/src/tool/cellular-renewal/i18n/en.ts +1 -1
- package/src/tool/cellular-renewal/i18n/es.ts +1 -1
- package/src/tool/cellular-renewal/i18n/fr.ts +1 -1
- package/src/tool/cellular-renewal/i18n/id.ts +1 -1
- package/src/tool/cellular-renewal/i18n/it.ts +1 -1
- package/src/tool/cellular-renewal/i18n/ja.ts +1 -1
- package/src/tool/cellular-renewal/i18n/ko.ts +1 -1
- package/src/tool/cellular-renewal/i18n/nl.ts +1 -1
- package/src/tool/cellular-renewal/i18n/pl.ts +1 -1
- package/src/tool/cellular-renewal/i18n/pt.ts +1 -1
- package/src/tool/cellular-renewal/i18n/ru.ts +1 -1
- package/src/tool/cellular-renewal/i18n/sv.ts +1 -1
- package/src/tool/cellular-renewal/i18n/tr.ts +1 -1
- package/src/tool/cellular-renewal/i18n/zh.ts +1 -1
- package/src/tool/cellular-renewal/seo.astro +15 -15
- package/src/tool/colony-counter/i18n/de.ts +1 -1
- package/src/tool/colony-counter/i18n/en.ts +1 -1
- package/src/tool/colony-counter/i18n/es.ts +1 -1
- package/src/tool/colony-counter/i18n/fr.ts +1 -1
- package/src/tool/colony-counter/i18n/id.ts +1 -1
- package/src/tool/colony-counter/i18n/it.ts +1 -1
- package/src/tool/colony-counter/i18n/ja.ts +1 -1
- package/src/tool/colony-counter/i18n/ko.ts +1 -1
- package/src/tool/colony-counter/i18n/nl.ts +1 -1
- package/src/tool/colony-counter/i18n/pl.ts +1 -1
- package/src/tool/colony-counter/i18n/pt.ts +1 -1
- package/src/tool/colony-counter/i18n/ru.ts +1 -1
- package/src/tool/colony-counter/i18n/sv.ts +1 -1
- package/src/tool/colony-counter/i18n/tr.ts +1 -1
- package/src/tool/colony-counter/i18n/zh.ts +1 -1
- package/src/tool/colony-counter/seo.astro +15 -15
- package/src/tool/conway-life-rule-lab/component.astro +1 -1
- package/src/tool/conway-life-rule-lab/i18n/de.ts +145 -141
- package/src/tool/conway-life-rule-lab/i18n/es.ts +146 -142
- package/src/tool/conway-life-rule-lab/i18n/fr.ts +146 -142
- package/src/tool/conway-life-rule-lab/i18n/id.ts +146 -145
- package/src/tool/conway-life-rule-lab/i18n/it.ts +146 -145
- package/src/tool/conway-life-rule-lab/i18n/ja.ts +146 -145
- package/src/tool/conway-life-rule-lab/i18n/ko.ts +146 -145
- package/src/tool/conway-life-rule-lab/i18n/nl.ts +147 -145
- package/src/tool/conway-life-rule-lab/i18n/pl.ts +147 -145
- package/src/tool/conway-life-rule-lab/i18n/pt.ts +147 -145
- package/src/tool/conway-life-rule-lab/i18n/ru.ts +147 -145
- package/src/tool/conway-life-rule-lab/i18n/sv.ts +147 -145
- package/src/tool/conway-life-rule-lab/i18n/tr.ts +147 -145
- package/src/tool/conway-life-rule-lab/i18n/zh.ts +147 -145
- package/src/tool/conway-life-rule-lab/logic/LifeLabRuntime.ts +2 -2
- package/src/tool/cosmic-inflation/i18n/ru.ts +105 -105
- package/src/tool/crystal-lattice-structure-finder/i18n/de.ts +217 -217
- package/src/tool/crystal-lattice-structure-finder/i18n/en.ts +1 -1
- package/src/tool/crystal-lattice-structure-finder/i18n/es.ts +217 -217
- package/src/tool/crystal-lattice-structure-finder/i18n/fr.ts +217 -217
- package/src/tool/crystal-lattice-structure-finder/i18n/id.ts +217 -217
- package/src/tool/crystal-lattice-structure-finder/i18n/it.ts +217 -217
- package/src/tool/crystal-lattice-structure-finder/i18n/ja.ts +217 -217
- package/src/tool/crystal-lattice-structure-finder/i18n/ko.ts +217 -217
- package/src/tool/crystal-lattice-structure-finder/i18n/nl.ts +217 -217
- package/src/tool/crystal-lattice-structure-finder/i18n/pl.ts +217 -217
- package/src/tool/crystal-lattice-structure-finder/i18n/pt.ts +217 -217
- package/src/tool/crystal-lattice-structure-finder/i18n/ru.ts +217 -217
- package/src/tool/crystal-lattice-structure-finder/i18n/sv.ts +217 -217
- package/src/tool/crystal-lattice-structure-finder/i18n/tr.ts +217 -217
- package/src/tool/crystal-lattice-structure-finder/i18n/zh.ts +217 -217
- package/src/tool/double-slit-decoherence/i18n/de.ts +181 -181
- package/src/tool/double-slit-decoherence/i18n/fr.ts +180 -180
- package/src/tool/double-slit-decoherence/i18n/id.ts +181 -181
- package/src/tool/double-slit-decoherence/i18n/it.ts +180 -180
- package/src/tool/double-slit-decoherence/i18n/ja.ts +181 -181
- package/src/tool/double-slit-decoherence/i18n/ko.ts +181 -181
- package/src/tool/double-slit-decoherence/i18n/nl.ts +181 -181
- package/src/tool/double-slit-decoherence/i18n/pl.ts +181 -181
- package/src/tool/double-slit-decoherence/i18n/pt.ts +178 -174
- package/src/tool/double-slit-decoherence/i18n/ru.ts +180 -180
- package/src/tool/double-slit-decoherence/i18n/sv.ts +176 -172
- package/src/tool/double-slit-decoherence/i18n/tr.ts +180 -180
- package/src/tool/double-slit-decoherence/i18n/zh.ts +181 -181
- package/src/tool/dyson-sphere-energy-capture/component.astro +253 -253
- package/src/tool/dyson-sphere-energy-capture/i18n/de.ts +194 -194
- package/src/tool/dyson-sphere-energy-capture/i18n/en.ts +6 -6
- package/src/tool/dyson-sphere-energy-capture/i18n/es.ts +6 -6
- package/src/tool/dyson-sphere-energy-capture/i18n/fr.ts +194 -194
- package/src/tool/dyson-sphere-energy-capture/i18n/id.ts +195 -195
- package/src/tool/dyson-sphere-energy-capture/i18n/it.ts +194 -194
- package/src/tool/dyson-sphere-energy-capture/i18n/ja.ts +194 -190
- package/src/tool/dyson-sphere-energy-capture/i18n/ko.ts +194 -193
- package/src/tool/dyson-sphere-energy-capture/i18n/nl.ts +197 -197
- package/src/tool/dyson-sphere-energy-capture/i18n/pl.ts +168 -166
- package/src/tool/dyson-sphere-energy-capture/i18n/pt.ts +194 -193
- package/src/tool/dyson-sphere-energy-capture/i18n/ru.ts +195 -193
- package/src/tool/dyson-sphere-energy-capture/i18n/sv.ts +195 -193
- package/src/tool/dyson-sphere-energy-capture/i18n/tr.ts +168 -166
- package/src/tool/dyson-sphere-energy-capture/i18n/zh.ts +194 -193
- package/src/tool/epidemic-sir-simulator/i18n/de.ts +347 -347
- package/src/tool/epidemic-sir-simulator/i18n/es.ts +347 -347
- package/src/tool/epidemic-sir-simulator/i18n/fr.ts +347 -347
- package/src/tool/epidemic-sir-simulator/i18n/it.ts +346 -346
- package/src/tool/epidemic-sir-simulator/i18n/nl.ts +347 -347
- package/src/tool/epidemic-sir-simulator/i18n/ru.ts +347 -347
- package/src/tool/epidemic-sir-simulator/i18n/sv.ts +347 -347
- package/src/tool/epidemic-sir-simulator/i18n/zh.ts +347 -347
- package/src/tool/exoplanet-biosignature-detector/i18n/de.ts +186 -186
- package/src/tool/exoplanet-biosignature-detector/i18n/en.ts +195 -195
- package/src/tool/exoplanet-biosignature-detector/i18n/es.ts +194 -194
- package/src/tool/exoplanet-biosignature-detector/i18n/fr.ts +183 -183
- package/src/tool/exoplanet-biosignature-detector/i18n/id.ts +193 -193
- package/src/tool/exoplanet-biosignature-detector/i18n/it.ts +194 -194
- package/src/tool/exoplanet-biosignature-detector/i18n/ja.ts +194 -194
- package/src/tool/exoplanet-biosignature-detector/i18n/ko.ts +194 -194
- package/src/tool/exoplanet-biosignature-detector/i18n/nl.ts +194 -194
- package/src/tool/exoplanet-biosignature-detector/i18n/pl.ts +144 -144
- package/src/tool/exoplanet-biosignature-detector/i18n/pt.ts +146 -146
- package/src/tool/exoplanet-biosignature-detector/i18n/ru.ts +143 -143
- package/src/tool/exoplanet-biosignature-detector/i18n/sv.ts +144 -144
- package/src/tool/exoplanet-biosignature-detector/i18n/tr.ts +145 -145
- package/src/tool/exoplanet-biosignature-detector/i18n/zh.ts +194 -194
- package/src/tool/global-albedo-snowball-simulator/component.astro +1 -1
- package/src/tool/global-albedo-snowball-simulator/i18n/de.ts +169 -169
- package/src/tool/global-albedo-snowball-simulator/i18n/fr.ts +169 -169
- package/src/tool/global-albedo-snowball-simulator/i18n/id.ts +169 -169
- package/src/tool/global-albedo-snowball-simulator/i18n/it.ts +87 -87
- package/src/tool/global-albedo-snowball-simulator/i18n/ja.ts +87 -87
- package/src/tool/global-albedo-snowball-simulator/i18n/ko.ts +169 -169
- package/src/tool/global-albedo-snowball-simulator/i18n/nl.ts +169 -169
- package/src/tool/global-albedo-snowball-simulator/i18n/pl.ts +169 -169
- package/src/tool/global-albedo-snowball-simulator/i18n/pt.ts +169 -169
- package/src/tool/global-albedo-snowball-simulator/i18n/ru.ts +165 -161
- package/src/tool/global-albedo-snowball-simulator/i18n/sv.ts +169 -169
- package/src/tool/global-albedo-snowball-simulator/i18n/tr.ts +169 -169
- package/src/tool/global-albedo-snowball-simulator/i18n/zh.ts +169 -169
- package/src/tool/lorenz-attractor/i18n/de.ts +144 -143
- package/src/tool/lorenz-attractor/i18n/fr.ts +144 -144
- package/src/tool/lorenz-attractor/i18n/id.ts +149 -149
- package/src/tool/lorenz-attractor/i18n/it.ts +149 -149
- package/src/tool/lorenz-attractor/i18n/ja.ts +149 -149
- package/src/tool/lorenz-attractor/i18n/ko.ts +149 -149
- package/src/tool/lorenz-attractor/i18n/nl.ts +149 -149
- package/src/tool/lorenz-attractor/i18n/pl.ts +149 -149
- package/src/tool/lorenz-attractor/i18n/pt.ts +142 -141
- package/src/tool/lorenz-attractor/i18n/ru.ts +149 -149
- package/src/tool/lorenz-attractor/i18n/sv.ts +149 -149
- package/src/tool/lorenz-attractor/i18n/tr.ts +149 -149
- package/src/tool/lorenz-attractor/i18n/zh.ts +149 -149
- package/src/tool/mandelbrot-fractal/i18n/de.ts +158 -158
- package/src/tool/mandelbrot-fractal/i18n/fr.ts +158 -158
- package/src/tool/mandelbrot-fractal/i18n/id.ts +159 -159
- package/src/tool/mandelbrot-fractal/i18n/it.ts +155 -151
- package/src/tool/mandelbrot-fractal/i18n/ja.ts +159 -159
- package/src/tool/mandelbrot-fractal/i18n/ko.ts +159 -159
- package/src/tool/mandelbrot-fractal/i18n/nl.ts +159 -159
- package/src/tool/mandelbrot-fractal/i18n/pl.ts +157 -153
- package/src/tool/mandelbrot-fractal/i18n/pt.ts +158 -158
- package/src/tool/mandelbrot-fractal/i18n/ru.ts +159 -159
- package/src/tool/mandelbrot-fractal/i18n/sv.ts +159 -150
- package/src/tool/mandelbrot-fractal/i18n/tr.ts +159 -159
- package/src/tool/mandelbrot-fractal/i18n/zh.ts +159 -159
- package/src/tool/microwave-detector/component.astro +238 -238
- package/src/tool/microwave-detector/i18n/de.ts +1 -1
- package/src/tool/microwave-detector/i18n/en.ts +1 -1
- package/src/tool/microwave-detector/i18n/es.ts +1 -1
- package/src/tool/microwave-detector/i18n/fr.ts +1 -1
- package/src/tool/microwave-detector/i18n/id.ts +1 -1
- package/src/tool/microwave-detector/i18n/it.ts +1 -1
- package/src/tool/microwave-detector/i18n/ja.ts +1 -1
- package/src/tool/microwave-detector/i18n/ko.ts +1 -1
- package/src/tool/microwave-detector/i18n/nl.ts +1 -1
- package/src/tool/microwave-detector/i18n/pl.ts +1 -1
- package/src/tool/microwave-detector/i18n/pt.ts +1 -1
- package/src/tool/microwave-detector/i18n/ru.ts +1 -1
- package/src/tool/microwave-detector/i18n/sv.ts +1 -1
- package/src/tool/microwave-detector/i18n/tr.ts +1 -1
- package/src/tool/microwave-detector/i18n/zh.ts +1 -1
- package/src/tool/microwave-detector/seo.astro +15 -15
- package/src/tool/natural-selection-drift/component.astro +135 -135
- package/src/tool/natural-selection-drift/i18n/de.ts +164 -160
- package/src/tool/natural-selection-drift/i18n/fr.ts +204 -204
- package/src/tool/natural-selection-drift/i18n/id.ts +156 -154
- package/src/tool/natural-selection-drift/i18n/it.ts +197 -193
- package/src/tool/natural-selection-drift/i18n/ja.ts +155 -154
- package/src/tool/natural-selection-drift/i18n/ko.ts +155 -154
- package/src/tool/natural-selection-drift/i18n/nl.ts +164 -163
- package/src/tool/natural-selection-drift/i18n/pl.ts +168 -166
- package/src/tool/natural-selection-drift/i18n/pt.ts +200 -195
- package/src/tool/natural-selection-drift/i18n/ru.ts +186 -184
- package/src/tool/natural-selection-drift/i18n/sv.ts +157 -154
- package/src/tool/natural-selection-drift/i18n/tr.ts +186 -184
- package/src/tool/natural-selection-drift/i18n/zh.ts +160 -154
- package/src/tool/natural-selection-drift/natural-selection-drift.css +563 -563
- package/src/tool/phase-diagram-critical-points/i18n/de.ts +178 -178
- package/src/tool/phase-diagram-critical-points/i18n/fr.ts +178 -178
- package/src/tool/phase-diagram-critical-points/i18n/id.ts +179 -179
- package/src/tool/phase-diagram-critical-points/i18n/it.ts +179 -179
- package/src/tool/phase-diagram-critical-points/i18n/ja.ts +179 -179
- package/src/tool/phase-diagram-critical-points/i18n/ko.ts +179 -179
- package/src/tool/phase-diagram-critical-points/i18n/nl.ts +179 -179
- package/src/tool/phase-diagram-critical-points/i18n/pl.ts +179 -179
- package/src/tool/phase-diagram-critical-points/i18n/pt.ts +179 -179
- package/src/tool/phase-diagram-critical-points/i18n/ru.ts +179 -179
- package/src/tool/phase-diagram-critical-points/i18n/sv.ts +179 -179
- package/src/tool/phase-diagram-critical-points/i18n/tr.ts +179 -179
- package/src/tool/phase-diagram-critical-points/i18n/zh.ts +179 -179
- package/src/tool/planet-atmosphere-survival/i18n/de.ts +255 -255
- package/src/tool/planet-atmosphere-survival/i18n/fr.ts +255 -255
- package/src/tool/planet-atmosphere-survival/i18n/id.ts +255 -255
- package/src/tool/planet-atmosphere-survival/i18n/it.ts +255 -255
- package/src/tool/planet-atmosphere-survival/i18n/ja.ts +255 -255
- package/src/tool/planet-atmosphere-survival/i18n/ko.ts +255 -255
- package/src/tool/planet-atmosphere-survival/i18n/nl.ts +255 -255
- package/src/tool/planet-atmosphere-survival/i18n/pl.ts +255 -255
- package/src/tool/planet-atmosphere-survival/i18n/pt.ts +255 -255
- package/src/tool/planet-atmosphere-survival/i18n/ru.ts +227 -223
- package/src/tool/planet-atmosphere-survival/i18n/sv.ts +255 -255
- package/src/tool/planet-atmosphere-survival/i18n/tr.ts +255 -255
- package/src/tool/planet-atmosphere-survival/i18n/zh.ts +255 -255
- package/src/tool/radioactive-decay/i18n/de.ts +168 -164
- package/src/tool/radioactive-decay/i18n/fr.ts +76 -75
- package/src/tool/radioactive-decay/i18n/id.ts +169 -165
- package/src/tool/radioactive-decay/i18n/it.ts +76 -74
- package/src/tool/radioactive-decay/i18n/ja.ts +168 -167
- package/src/tool/radioactive-decay/i18n/ko.ts +168 -167
- package/src/tool/radioactive-decay/i18n/nl.ts +170 -168
- package/src/tool/radioactive-decay/i18n/pl.ts +170 -168
- package/src/tool/radioactive-decay/i18n/pt.ts +169 -167
- package/src/tool/radioactive-decay/i18n/ru.ts +170 -168
- package/src/tool/radioactive-decay/i18n/sv.ts +170 -168
- package/src/tool/radioactive-decay/i18n/tr.ts +171 -168
- package/src/tool/radioactive-decay/i18n/zh.ts +171 -167
- package/src/tool/roche-limit-satellite-disruption/i18n/de.ts +241 -241
- package/src/tool/roche-limit-satellite-disruption/i18n/fr.ts +241 -241
- package/src/tool/roche-limit-satellite-disruption/i18n/id.ts +241 -241
- package/src/tool/roche-limit-satellite-disruption/i18n/it.ts +241 -241
- package/src/tool/roche-limit-satellite-disruption/i18n/ja.ts +241 -241
- package/src/tool/roche-limit-satellite-disruption/i18n/ko.ts +241 -241
- package/src/tool/roche-limit-satellite-disruption/i18n/nl.ts +241 -241
- package/src/tool/roche-limit-satellite-disruption/i18n/pl.ts +237 -229
- package/src/tool/roche-limit-satellite-disruption/i18n/pt.ts +241 -241
- package/src/tool/roche-limit-satellite-disruption/i18n/ru.ts +241 -241
- package/src/tool/roche-limit-satellite-disruption/i18n/sv.ts +241 -241
- package/src/tool/roche-limit-satellite-disruption/i18n/tr.ts +241 -241
- package/src/tool/roche-limit-satellite-disruption/i18n/zh.ts +241 -241
- package/src/tool/simulation-probability/component.astro +138 -138
- package/src/tool/simulation-probability/i18n/de.ts +1 -1
- package/src/tool/simulation-probability/i18n/en.ts +1 -1
- package/src/tool/simulation-probability/i18n/es.ts +1 -1
- package/src/tool/simulation-probability/i18n/fr.ts +1 -1
- package/src/tool/simulation-probability/i18n/id.ts +1 -1
- package/src/tool/simulation-probability/i18n/it.ts +1 -1
- package/src/tool/simulation-probability/i18n/ja.ts +1 -1
- package/src/tool/simulation-probability/i18n/ko.ts +1 -1
- package/src/tool/simulation-probability/i18n/nl.ts +1 -1
- package/src/tool/simulation-probability/i18n/pl.ts +1 -1
- package/src/tool/simulation-probability/i18n/pt.ts +1 -1
- package/src/tool/simulation-probability/i18n/ru.ts +1 -1
- package/src/tool/simulation-probability/i18n/sv.ts +1 -1
- package/src/tool/simulation-probability/i18n/tr.ts +1 -1
- package/src/tool/simulation-probability/i18n/zh.ts +1 -1
- package/src/tool/simulation-probability/seo.astro +15 -15
- package/src/tool/stellar-habitability-zone/i18n/ru.ts +189 -189
- package/src/tool/temperature-timeline/i18n/de.ts +2 -1
- package/src/tool/temperature-timeline/i18n/fr.ts +177 -177
- package/src/tool/temperature-timeline/i18n/it.ts +142 -141
- package/src/tool/temperature-timeline/i18n/pt.ts +3 -1
- package/src/tool/temperature-timeline/i18n/ru.ts +116 -114
- package/src/tool/three-body-problem/app.ts +4 -4
- package/src/tool/three-body-problem/component.astro +6 -6
- package/src/tool/twin-paradox-visualizer/i18n/de.ts +168 -168
- package/src/tool/twin-paradox-visualizer/i18n/es.ts +165 -165
- package/src/tool/twin-paradox-visualizer/i18n/fr.ts +168 -168
- package/src/tool/twin-paradox-visualizer/i18n/id.ts +168 -168
- package/src/tool/twin-paradox-visualizer/i18n/it.ts +168 -168
- package/src/tool/twin-paradox-visualizer/i18n/ja.ts +168 -168
- package/src/tool/twin-paradox-visualizer/i18n/ko.ts +168 -168
- package/src/tool/twin-paradox-visualizer/i18n/nl.ts +168 -168
- package/src/tool/twin-paradox-visualizer/i18n/pl.ts +168 -168
- package/src/tool/twin-paradox-visualizer/i18n/pt.ts +164 -160
- package/src/tool/twin-paradox-visualizer/i18n/ru.ts +168 -168
- package/src/tool/twin-paradox-visualizer/i18n/sv.ts +168 -168
- package/src/tool/twin-paradox-visualizer/i18n/tr.ts +168 -168
- package/src/tool/twin-paradox-visualizer/i18n/zh.ts +168 -168
- package/src/types.ts +1 -1
|
@@ -1,238 +1,238 @@
|
|
|
1
|
-
---
|
|
2
|
-
import { Icon } from "astro-icon/components";
|
|
3
|
-
|
|
4
|
-
interface Props {
|
|
5
|
-
ui: Record<string, string>;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
const { ui } = Astro.props;
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
<div class="microwave-detector-container" id="microwave-detector-root" data-detecting-interference={ui.detectingInterference}>
|
|
12
|
-
<div class="microwave-modal" id="initial-modal">
|
|
13
|
-
<div class="microwave-modal-content">
|
|
14
|
-
<div class="microwave-modal-icon">
|
|
15
|
-
<Icon name="mdi:wifi-alert" />
|
|
16
|
-
</div>
|
|
17
|
-
<h2>{ui.physicalRequirement}</h2>
|
|
18
|
-
<p set:html={ui.physicalDesc}></p>
|
|
19
|
-
<button id="start-btn" class="microwave-btn-start">
|
|
20
|
-
{ui.understandStart}
|
|
21
|
-
</button>
|
|
22
|
-
</div>
|
|
23
|
-
</div>
|
|
24
|
-
|
|
25
|
-
<div class="microwave-detector-panel">
|
|
26
|
-
<div class="microwave-header">
|
|
27
|
-
<div>
|
|
28
|
-
<span class="microwave-label">{ui.rfInterferenceMonitor}</span>
|
|
29
|
-
<h3 class="microwave-title">{ui.mwLeakDetector}</h3>
|
|
30
|
-
</div>
|
|
31
|
-
<div class="microwave-status-badge">
|
|
32
|
-
<div id="status-dot" class="microwave-status-dot"></div>
|
|
33
|
-
<span id="status-text" class="microwave-status-text">{ui.static}</span>
|
|
34
|
-
</div>
|
|
35
|
-
</div>
|
|
36
|
-
|
|
37
|
-
<div class="microwave-canvas-container">
|
|
38
|
-
<canvas id="interference-canvas"></canvas>
|
|
39
|
-
<div class="microwave-canvas-overlay">
|
|
40
|
-
<div id="big-value-bg" class="microwave-big-value">00</div>
|
|
41
|
-
<div class="microwave-jitter-display">
|
|
42
|
-
<span id="jitter-value" class="microwave-jitter-value">0.0</span>
|
|
43
|
-
<span class="microwave-jitter-unit">{ui.jitterUnit}</span>
|
|
44
|
-
</div>
|
|
45
|
-
</div>
|
|
46
|
-
<div class="microwave-canvas-grid"></div>
|
|
47
|
-
</div>
|
|
48
|
-
|
|
49
|
-
<div class="microwave-content-grid">
|
|
50
|
-
<div>
|
|
51
|
-
<div id="verdict-container" class="microwave-verdict">
|
|
52
|
-
<h4 id="verdict-label" class="microwave-verdict-label">{ui.systemReady}</h4>
|
|
53
|
-
<p id="verdict-description" class="microwave-verdict-desc">
|
|
54
|
-
{ui.connectToAnalyze}
|
|
55
|
-
</p>
|
|
56
|
-
</div>
|
|
57
|
-
<div class="microwave-latency-info">
|
|
58
|
-
<div class="microwave-latency-badge">
|
|
59
|
-
<Icon name="mdi:pulse" />
|
|
60
|
-
LAT: <span id="latency-val">0ms</span>
|
|
61
|
-
</div>
|
|
62
|
-
</div>
|
|
63
|
-
</div>
|
|
64
|
-
|
|
65
|
-
<div class="microwave-audio-section">
|
|
66
|
-
<div class="microwave-audio-label">
|
|
67
|
-
<span>{ui.audioFeedback}</span>
|
|
68
|
-
<span id="audio-status">ON</span>
|
|
69
|
-
</div>
|
|
70
|
-
<button id="toggle-audio-btn" class="microwave-btn-audio">
|
|
71
|
-
<Icon name="mdi:volume-high" />
|
|
72
|
-
{ui.muteUnmute}
|
|
73
|
-
</button>
|
|
74
|
-
</div>
|
|
75
|
-
</div>
|
|
76
|
-
|
|
77
|
-
<div class="microwave-scanline"></div>
|
|
78
|
-
</div>
|
|
79
|
-
</div>
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
<script>
|
|
84
|
-
import { MicrowaveEngine } from './logic/MicrowaveEngine';
|
|
85
|
-
|
|
86
|
-
const root = document.getElementById("microwave-detector-root");
|
|
87
|
-
if (root) {
|
|
88
|
-
const startBtn = document.getElementById("start-btn");
|
|
89
|
-
const modal = document.getElementById("initial-modal");
|
|
90
|
-
const canvas = document.getElementById("interference-canvas") as HTMLCanvasElement | null;
|
|
91
|
-
const ctx = canvas?.getContext("2d");
|
|
92
|
-
|
|
93
|
-
const jitterDisplay = document.getElementById("jitter-value");
|
|
94
|
-
const bigValueBg = document.getElementById("big-value-bg");
|
|
95
|
-
const latencyVal = document.getElementById("latency-val");
|
|
96
|
-
const verdictLabel = document.getElementById("verdict-label");
|
|
97
|
-
const verdictDesc = document.getElementById("verdict-description");
|
|
98
|
-
const verdictContainer = document.getElementById("verdict-container");
|
|
99
|
-
const statusDot = document.getElementById("status-dot");
|
|
100
|
-
const statusText = document.getElementById("status-text");
|
|
101
|
-
const toggleAudioBtn = document.getElementById("toggle-audio-btn");
|
|
102
|
-
|
|
103
|
-
const currentLang = document.documentElement.lang || 'es';
|
|
104
|
-
const engine = new MicrowaveEngine(currentLang);
|
|
105
|
-
let running = false;
|
|
106
|
-
let audioEnabled = true;
|
|
107
|
-
let audioCtx: AudioContext | null = null;
|
|
108
|
-
|
|
109
|
-
const history = new Array(60).fill(0);
|
|
110
|
-
|
|
111
|
-
function resizeCanvas() {
|
|
112
|
-
if (!canvas) return;
|
|
113
|
-
canvas.width = canvas.clientWidth;
|
|
114
|
-
canvas.height = canvas.clientHeight;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
function drawGraph() {
|
|
118
|
-
if (!ctx || !canvas) return;
|
|
119
|
-
ctx.clearRect(0, 0, canvas.width, canvas.height);
|
|
120
|
-
|
|
121
|
-
ctx.beginPath();
|
|
122
|
-
ctx.strokeStyle = "#4f46e5";
|
|
123
|
-
ctx.lineWidth = 3;
|
|
124
|
-
ctx.lineJoin = "round";
|
|
125
|
-
|
|
126
|
-
const step = canvas.width / (history.length - 1);
|
|
127
|
-
const maxHistory = Math.max(...history, 50);
|
|
128
|
-
|
|
129
|
-
history.forEach((val, i) => {
|
|
130
|
-
const x = i * step;
|
|
131
|
-
const y = canvas.height - (val / maxHistory) * canvas.height * 0.8 - 20;
|
|
132
|
-
if (i === 0) ctx.moveTo(x, y);
|
|
133
|
-
else ctx.lineTo(x, y);
|
|
134
|
-
});
|
|
135
|
-
ctx.stroke();
|
|
136
|
-
|
|
137
|
-
const gradient = ctx.createLinearGradient(0, 0, 0, canvas.height);
|
|
138
|
-
gradient.addColorStop(0, "rgba(79, 70, 229, 0.2)");
|
|
139
|
-
gradient.addColorStop(1, "transparent");
|
|
140
|
-
ctx.lineTo(canvas.width, canvas.height);
|
|
141
|
-
ctx.lineTo(0, canvas.height);
|
|
142
|
-
ctx.fillStyle = gradient;
|
|
143
|
-
ctx.fill();
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
async function playClick(_intensity: number) {
|
|
147
|
-
if (!audioEnabled) return;
|
|
148
|
-
if (!audioCtx) {
|
|
149
|
-
const AudioContextClass = window.AudioContext || (window as unknown as { webkitAudioContext: typeof AudioContext }).webkitAudioContext;
|
|
150
|
-
audioCtx = new AudioContextClass();
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
const osc = audioCtx.createOscillator();
|
|
154
|
-
const gain = audioCtx.createGain();
|
|
155
|
-
|
|
156
|
-
osc.type = "square";
|
|
157
|
-
osc.frequency.setValueAtTime(40 + Math.random() * 20, audioCtx.currentTime);
|
|
158
|
-
|
|
159
|
-
gain.gain.setValueAtTime(0.1, audioCtx.currentTime);
|
|
160
|
-
gain.gain.exponentialRampToValueAtTime(0.0001, audioCtx.currentTime + 0.05);
|
|
161
|
-
|
|
162
|
-
osc.connect(gain);
|
|
163
|
-
gain.connect(audioCtx.destination);
|
|
164
|
-
|
|
165
|
-
osc.start();
|
|
166
|
-
osc.stop(audioCtx.currentTime + 0.05);
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
function updateVerdictDisplay(level: { label: string; description: string; color: string }) {
|
|
170
|
-
if (verdictLabel) verdictLabel.textContent = level.label;
|
|
171
|
-
if (verdictDesc) verdictDesc.textContent = level.description;
|
|
172
|
-
|
|
173
|
-
const colorMap = {
|
|
174
|
-
emerald: { bg: "rgba(16, 185, 129, 0.1)", border: "rgba(16, 185, 129, 0.3)", text: "#10b981" },
|
|
175
|
-
yellow: { bg: "rgba(234, 179, 8, 0.1)", border: "rgba(234, 179, 8, 0.3)", text: "#eab308" },
|
|
176
|
-
orange: { bg: "rgba(249, 115, 22, 0.1)", border: "rgba(249, 115, 22, 0.3)", text: "#f97316" },
|
|
177
|
-
red: { bg: "rgba(220, 38, 38, 0.2)", border: "rgba(220, 38, 38, 0.5)", text: "#dc2626" },
|
|
178
|
-
};
|
|
179
|
-
|
|
180
|
-
if (verdictContainer) {
|
|
181
|
-
const colors = colorMap[level.color as keyof typeof colorMap] || colorMap.emerald;
|
|
182
|
-
verdictContainer.style.backgroundColor = colors.bg;
|
|
183
|
-
verdictContainer.style.borderColor = colors.border;
|
|
184
|
-
verdictContainer.style.color = colors.text;
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
if (statusDot) {
|
|
188
|
-
const colorValues = {
|
|
189
|
-
emerald: "#10b981",
|
|
190
|
-
yellow: "#eab308",
|
|
191
|
-
orange: "#f97316",
|
|
192
|
-
red: "#dc2626",
|
|
193
|
-
};
|
|
194
|
-
statusDot.style.backgroundColor = colorValues[level.color as keyof typeof colorValues] || colorValues.emerald;
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
async function scan() {
|
|
199
|
-
if (!running) return;
|
|
200
|
-
|
|
201
|
-
const result = await engine.measurePing();
|
|
202
|
-
history.push(result.jitter);
|
|
203
|
-
history.shift();
|
|
204
|
-
|
|
205
|
-
if (jitterDisplay) jitterDisplay.textContent = result.jitter.toFixed(1);
|
|
206
|
-
if (bigValueBg) bigValueBg.textContent = Math.floor(result.jitter).toString().padStart(2, "0");
|
|
207
|
-
if (latencyVal) latencyVal.textContent = `${Math.floor(result.latency)}ms`;
|
|
208
|
-
|
|
209
|
-
const level = engine.getInterferenceLevel(result.jitter);
|
|
210
|
-
updateVerdictDisplay(level);
|
|
211
|
-
|
|
212
|
-
if (result.jitter > 1) {
|
|
213
|
-
playClick(result.jitter);
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
drawGraph();
|
|
217
|
-
setTimeout(scan, 200 + Math.random() * 100);
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
const detectingInterferenceText = root?.getAttribute('data-detecting-interference') || 'Detectando interferencias...';
|
|
221
|
-
|
|
222
|
-
startBtn?.addEventListener("click", () => {
|
|
223
|
-
if (modal) modal.classList.add("hidden");
|
|
224
|
-
running = true;
|
|
225
|
-
resizeCanvas();
|
|
226
|
-
if (statusText) statusText.textContent = detectingInterferenceText;
|
|
227
|
-
scan();
|
|
228
|
-
});
|
|
229
|
-
|
|
230
|
-
toggleAudioBtn?.addEventListener("click", () => {
|
|
231
|
-
audioEnabled = !audioEnabled;
|
|
232
|
-
const statusLabel = document.getElementById("audio-status");
|
|
233
|
-
if (statusLabel) statusLabel.textContent = audioEnabled ? "ON" : "OFF";
|
|
234
|
-
});
|
|
235
|
-
|
|
236
|
-
window.addEventListener("resize", resizeCanvas);
|
|
237
|
-
}
|
|
238
|
-
</script>
|
|
1
|
+
---
|
|
2
|
+
import { Icon } from "astro-icon/components";
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
ui: Record<string, string>;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
const { ui } = Astro.props;
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
<div class="microwave-detector-container" id="microwave-detector-root" data-detecting-interference={ui.detectingInterference}>
|
|
12
|
+
<div class="microwave-modal" id="initial-modal">
|
|
13
|
+
<div class="microwave-modal-content">
|
|
14
|
+
<div class="microwave-modal-icon">
|
|
15
|
+
<Icon name="mdi:wifi-alert" />
|
|
16
|
+
</div>
|
|
17
|
+
<h2>{ui.physicalRequirement}</h2>
|
|
18
|
+
<p set:html={ui.physicalDesc}></p>
|
|
19
|
+
<button id="start-btn" class="microwave-btn-start">
|
|
20
|
+
{ui.understandStart}
|
|
21
|
+
</button>
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
|
+
|
|
25
|
+
<div class="microwave-detector-panel">
|
|
26
|
+
<div class="microwave-header">
|
|
27
|
+
<div>
|
|
28
|
+
<span class="microwave-label">{ui.rfInterferenceMonitor}</span>
|
|
29
|
+
<h3 class="microwave-title">{ui.mwLeakDetector}</h3>
|
|
30
|
+
</div>
|
|
31
|
+
<div class="microwave-status-badge">
|
|
32
|
+
<div id="status-dot" class="microwave-status-dot"></div>
|
|
33
|
+
<span id="status-text" class="microwave-status-text">{ui.static}</span>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
|
|
37
|
+
<div class="microwave-canvas-container">
|
|
38
|
+
<canvas id="interference-canvas"></canvas>
|
|
39
|
+
<div class="microwave-canvas-overlay">
|
|
40
|
+
<div id="big-value-bg" class="microwave-big-value">00</div>
|
|
41
|
+
<div class="microwave-jitter-display">
|
|
42
|
+
<span id="jitter-value" class="microwave-jitter-value">0.0</span>
|
|
43
|
+
<span class="microwave-jitter-unit">{ui.jitterUnit}</span>
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
46
|
+
<div class="microwave-canvas-grid"></div>
|
|
47
|
+
</div>
|
|
48
|
+
|
|
49
|
+
<div class="microwave-content-grid">
|
|
50
|
+
<div>
|
|
51
|
+
<div id="verdict-container" class="microwave-verdict">
|
|
52
|
+
<h4 id="verdict-label" class="microwave-verdict-label">{ui.systemReady}</h4>
|
|
53
|
+
<p id="verdict-description" class="microwave-verdict-desc">
|
|
54
|
+
{ui.connectToAnalyze}
|
|
55
|
+
</p>
|
|
56
|
+
</div>
|
|
57
|
+
<div class="microwave-latency-info">
|
|
58
|
+
<div class="microwave-latency-badge">
|
|
59
|
+
<Icon name="mdi:pulse" />
|
|
60
|
+
LAT: <span id="latency-val">0ms</span>
|
|
61
|
+
</div>
|
|
62
|
+
</div>
|
|
63
|
+
</div>
|
|
64
|
+
|
|
65
|
+
<div class="microwave-audio-section">
|
|
66
|
+
<div class="microwave-audio-label">
|
|
67
|
+
<span>{ui.audioFeedback}</span>
|
|
68
|
+
<span id="audio-status">ON</span>
|
|
69
|
+
</div>
|
|
70
|
+
<button id="toggle-audio-btn" class="microwave-btn-audio">
|
|
71
|
+
<Icon name="mdi:volume-high" />
|
|
72
|
+
{ui.muteUnmute}
|
|
73
|
+
</button>
|
|
74
|
+
</div>
|
|
75
|
+
</div>
|
|
76
|
+
|
|
77
|
+
<div class="microwave-scanline"></div>
|
|
78
|
+
</div>
|
|
79
|
+
</div>
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
<script>
|
|
84
|
+
import { MicrowaveEngine } from './logic/MicrowaveEngine';
|
|
85
|
+
|
|
86
|
+
const root = document.getElementById("microwave-detector-root");
|
|
87
|
+
if (root) {
|
|
88
|
+
const startBtn = document.getElementById("start-btn");
|
|
89
|
+
const modal = document.getElementById("initial-modal");
|
|
90
|
+
const canvas = document.getElementById("interference-canvas") as HTMLCanvasElement | null;
|
|
91
|
+
const ctx = canvas?.getContext("2d");
|
|
92
|
+
|
|
93
|
+
const jitterDisplay = document.getElementById("jitter-value");
|
|
94
|
+
const bigValueBg = document.getElementById("big-value-bg");
|
|
95
|
+
const latencyVal = document.getElementById("latency-val");
|
|
96
|
+
const verdictLabel = document.getElementById("verdict-label");
|
|
97
|
+
const verdictDesc = document.getElementById("verdict-description");
|
|
98
|
+
const verdictContainer = document.getElementById("verdict-container");
|
|
99
|
+
const statusDot = document.getElementById("status-dot");
|
|
100
|
+
const statusText = document.getElementById("status-text");
|
|
101
|
+
const toggleAudioBtn = document.getElementById("toggle-audio-btn");
|
|
102
|
+
|
|
103
|
+
const currentLang = document.documentElement.lang || 'es';
|
|
104
|
+
const engine = new MicrowaveEngine(currentLang);
|
|
105
|
+
let running = false;
|
|
106
|
+
let audioEnabled = true;
|
|
107
|
+
let audioCtx: AudioContext | null = null;
|
|
108
|
+
|
|
109
|
+
const history = new Array(60).fill(0);
|
|
110
|
+
|
|
111
|
+
function resizeCanvas() {
|
|
112
|
+
if (!canvas) return;
|
|
113
|
+
canvas.width = canvas.clientWidth;
|
|
114
|
+
canvas.height = canvas.clientHeight;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
function drawGraph() {
|
|
118
|
+
if (!ctx || !canvas) return;
|
|
119
|
+
ctx.clearRect(0, 0, canvas.width, canvas.height);
|
|
120
|
+
|
|
121
|
+
ctx.beginPath();
|
|
122
|
+
ctx.strokeStyle = "#4f46e5";
|
|
123
|
+
ctx.lineWidth = 3;
|
|
124
|
+
ctx.lineJoin = "round";
|
|
125
|
+
|
|
126
|
+
const step = canvas.width / (history.length - 1);
|
|
127
|
+
const maxHistory = Math.max(...history, 50);
|
|
128
|
+
|
|
129
|
+
history.forEach((val, i) => {
|
|
130
|
+
const x = i * step;
|
|
131
|
+
const y = canvas.height - (val / maxHistory) * canvas.height * 0.8 - 20;
|
|
132
|
+
if (i === 0) ctx.moveTo(x, y);
|
|
133
|
+
else ctx.lineTo(x, y);
|
|
134
|
+
});
|
|
135
|
+
ctx.stroke();
|
|
136
|
+
|
|
137
|
+
const gradient = ctx.createLinearGradient(0, 0, 0, canvas.height);
|
|
138
|
+
gradient.addColorStop(0, "rgba(79, 70, 229, 0.2)");
|
|
139
|
+
gradient.addColorStop(1, "transparent");
|
|
140
|
+
ctx.lineTo(canvas.width, canvas.height);
|
|
141
|
+
ctx.lineTo(0, canvas.height);
|
|
142
|
+
ctx.fillStyle = gradient;
|
|
143
|
+
ctx.fill();
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
async function playClick(_intensity: number) {
|
|
147
|
+
if (!audioEnabled) return;
|
|
148
|
+
if (!audioCtx) {
|
|
149
|
+
const AudioContextClass = window.AudioContext || (window as unknown as { webkitAudioContext: typeof AudioContext }).webkitAudioContext;
|
|
150
|
+
audioCtx = new AudioContextClass();
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
const osc = audioCtx.createOscillator();
|
|
154
|
+
const gain = audioCtx.createGain();
|
|
155
|
+
|
|
156
|
+
osc.type = "square";
|
|
157
|
+
osc.frequency.setValueAtTime(40 + Math.random() * 20, audioCtx.currentTime);
|
|
158
|
+
|
|
159
|
+
gain.gain.setValueAtTime(0.1, audioCtx.currentTime);
|
|
160
|
+
gain.gain.exponentialRampToValueAtTime(0.0001, audioCtx.currentTime + 0.05);
|
|
161
|
+
|
|
162
|
+
osc.connect(gain);
|
|
163
|
+
gain.connect(audioCtx.destination);
|
|
164
|
+
|
|
165
|
+
osc.start();
|
|
166
|
+
osc.stop(audioCtx.currentTime + 0.05);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
function updateVerdictDisplay(level: { label: string; description: string; color: string }) {
|
|
170
|
+
if (verdictLabel) verdictLabel.textContent = level.label;
|
|
171
|
+
if (verdictDesc) verdictDesc.textContent = level.description;
|
|
172
|
+
|
|
173
|
+
const colorMap = {
|
|
174
|
+
emerald: { bg: "rgba(16, 185, 129, 0.1)", border: "rgba(16, 185, 129, 0.3)", text: "#10b981" },
|
|
175
|
+
yellow: { bg: "rgba(234, 179, 8, 0.1)", border: "rgba(234, 179, 8, 0.3)", text: "#eab308" },
|
|
176
|
+
orange: { bg: "rgba(249, 115, 22, 0.1)", border: "rgba(249, 115, 22, 0.3)", text: "#f97316" },
|
|
177
|
+
red: { bg: "rgba(220, 38, 38, 0.2)", border: "rgba(220, 38, 38, 0.5)", text: "#dc2626" },
|
|
178
|
+
};
|
|
179
|
+
|
|
180
|
+
if (verdictContainer) {
|
|
181
|
+
const colors = colorMap[level.color as keyof typeof colorMap] || colorMap.emerald;
|
|
182
|
+
verdictContainer.style.backgroundColor = colors.bg;
|
|
183
|
+
verdictContainer.style.borderColor = colors.border;
|
|
184
|
+
verdictContainer.style.color = colors.text;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
if (statusDot) {
|
|
188
|
+
const colorValues = {
|
|
189
|
+
emerald: "#10b981",
|
|
190
|
+
yellow: "#eab308",
|
|
191
|
+
orange: "#f97316",
|
|
192
|
+
red: "#dc2626",
|
|
193
|
+
};
|
|
194
|
+
statusDot.style.backgroundColor = colorValues[level.color as keyof typeof colorValues] || colorValues.emerald;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
async function scan() {
|
|
199
|
+
if (!running) return;
|
|
200
|
+
|
|
201
|
+
const result = await engine.measurePing();
|
|
202
|
+
history.push(result.jitter);
|
|
203
|
+
history.shift();
|
|
204
|
+
|
|
205
|
+
if (jitterDisplay) jitterDisplay.textContent = result.jitter.toFixed(1);
|
|
206
|
+
if (bigValueBg) bigValueBg.textContent = Math.floor(result.jitter).toString().padStart(2, "0");
|
|
207
|
+
if (latencyVal) latencyVal.textContent = `${Math.floor(result.latency)}ms`;
|
|
208
|
+
|
|
209
|
+
const level = engine.getInterferenceLevel(result.jitter);
|
|
210
|
+
updateVerdictDisplay(level);
|
|
211
|
+
|
|
212
|
+
if (result.jitter > 1) {
|
|
213
|
+
playClick(result.jitter);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
drawGraph();
|
|
217
|
+
setTimeout(scan, 200 + Math.random() * 100);
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
const detectingInterferenceText = root?.getAttribute('data-detecting-interference') || 'Detectando interferencias...';
|
|
221
|
+
|
|
222
|
+
startBtn?.addEventListener("click", () => {
|
|
223
|
+
if (modal) modal.classList.add("hidden");
|
|
224
|
+
running = true;
|
|
225
|
+
resizeCanvas();
|
|
226
|
+
if (statusText) statusText.textContent = detectingInterferenceText;
|
|
227
|
+
scan();
|
|
228
|
+
});
|
|
229
|
+
|
|
230
|
+
toggleAudioBtn?.addEventListener("click", () => {
|
|
231
|
+
audioEnabled = !audioEnabled;
|
|
232
|
+
const statusLabel = document.getElementById("audio-status");
|
|
233
|
+
if (statusLabel) statusLabel.textContent = audioEnabled ? "ON" : "OFF";
|
|
234
|
+
});
|
|
235
|
+
|
|
236
|
+
window.addEventListener("resize", resizeCanvas);
|
|
237
|
+
}
|
|
238
|
+
</script>
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
---
|
|
2
|
-
import { SEORenderer } from '@jjlmoya/utils-shared';
|
|
3
|
-
import { microwaveDetector } from './index';
|
|
4
|
-
import type { KnownLocale } from '../../types';
|
|
5
|
-
|
|
6
|
-
interface Props {
|
|
7
|
-
locale?: KnownLocale;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
const { locale = 'es' } = Astro.props;
|
|
11
|
-
const content = await microwaveDetector.i18n[locale]?.();
|
|
12
|
-
if (!content) return null;
|
|
13
|
-
---
|
|
14
|
-
|
|
15
|
-
{content.seo?.length > 0 && <SEORenderer content={{ locale, sections: content.seo }} />}
|
|
1
|
+
---
|
|
2
|
+
import { SEORenderer } from '@jjlmoya/utils-shared';
|
|
3
|
+
import { microwaveDetector } from './index';
|
|
4
|
+
import type { KnownLocale } from '../../types';
|
|
5
|
+
|
|
6
|
+
interface Props {
|
|
7
|
+
locale?: KnownLocale;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const { locale = 'es' } = Astro.props;
|
|
11
|
+
const content = await microwaveDetector.i18n[locale]?.();
|
|
12
|
+
if (!content) return null;
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
{content.seo?.length > 0 && <SEORenderer content={{ locale, sections: content.seo }} />}
|