commit 302c94f8e1b9c17ee61b9e2b3b6c15fd17438b25 Author: Pranshul Date: Sat Oct 5 12:51:21 2024 +0530 1.6.4 Updated diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..aa724b770 --- /dev/null +++ b/.gitignore @@ -0,0 +1,15 @@ +*.iml +.gradle +/local.properties +/.idea/caches +/.idea/libraries +/.idea/modules.xml +/.idea/workspace.xml +/.idea/navEditor.xml +/.idea/assetWizardSettings.xml +.DS_Store +/build +/captures +.externalNativeBuild +.cxx +local.properties diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 000000000..26d33521a --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/.idea/.name b/.idea/.name new file mode 100644 index 000000000..c45a931c6 --- /dev/null +++ b/.idea/.name @@ -0,0 +1 @@ +Weather Master \ No newline at end of file diff --git a/.idea/compiler.xml b/.idea/compiler.xml new file mode 100644 index 000000000..b589d56e9 --- /dev/null +++ b/.idea/compiler.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/gradle.xml b/.idea/gradle.xml new file mode 100644 index 000000000..ae388c2a5 --- /dev/null +++ b/.idea/gradle.xml @@ -0,0 +1,20 @@ + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 000000000..0ad17cbd3 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,10 @@ + + + + + + + + + \ No newline at end of file diff --git a/app/.gitignore b/app/.gitignore new file mode 100644 index 000000000..42afabfd2 --- /dev/null +++ b/app/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/app/build.gradle b/app/build.gradle new file mode 100644 index 000000000..bd906c20c --- /dev/null +++ b/app/build.gradle @@ -0,0 +1,44 @@ +plugins { + id 'com.android.application' +} + +android { + namespace 'com.example.weathermaster' + compileSdk 34 + + defaultConfig { + applicationId "com.example.weathermaster" + minSdk 22 + targetSdk 33 + versionCode 56 + versionName "1.6.4 (W)" + + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + } + + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + } + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + dependenciesInfo { + includeInApk = false + includeInBundle = false + } +} + +dependencies { + + implementation 'androidx.appcompat:appcompat:1.7.0' + implementation 'com.google.android.material:material:1.12.0' + implementation 'androidx.constraintlayout:constraintlayout:2.1.4' + testImplementation 'junit:junit:4.13.2' + androidTestImplementation 'androidx.test.ext:junit:1.2.1' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1' +} \ No newline at end of file diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro new file mode 100644 index 000000000..481bb4348 --- /dev/null +++ b/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 \ No newline at end of file diff --git a/app/src/androidTest/java/com/example/weathermaster/ExampleInstrumentedTest.java b/app/src/androidTest/java/com/example/weathermaster/ExampleInstrumentedTest.java new file mode 100644 index 000000000..a82186ee9 --- /dev/null +++ b/app/src/androidTest/java/com/example/weathermaster/ExampleInstrumentedTest.java @@ -0,0 +1,26 @@ +package com.example.weathermaster; + +import android.content.Context; + +import androidx.test.platform.app.InstrumentationRegistry; +import androidx.test.ext.junit.runners.AndroidJUnit4; + +import org.junit.Test; +import org.junit.runner.RunWith; + +import static org.junit.Assert.*; + +/** + * Instrumented test, which will execute on an Android device. + * + * @see Testing documentation + */ +@RunWith(AndroidJUnit4.class) +public class ExampleInstrumentedTest { + @Test + public void useAppContext() { + // Context of the app under test. + Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); + assertEquals("com.example.weathermaster", appContext.getPackageName()); + } +} \ No newline at end of file diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml new file mode 100644 index 000000000..d4fba8488 --- /dev/null +++ b/app/src/main/AndroidManifest.xml @@ -0,0 +1,125 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/assets/air-pop-imgs/fair.png b/app/src/main/assets/air-pop-imgs/fair.png new file mode 100644 index 000000000..bb2b142cb Binary files /dev/null and b/app/src/main/assets/air-pop-imgs/fair.png differ diff --git a/app/src/main/assets/air-pop-imgs/good.png b/app/src/main/assets/air-pop-imgs/good.png new file mode 100644 index 000000000..f02a9062e Binary files /dev/null and b/app/src/main/assets/air-pop-imgs/good.png differ diff --git a/app/src/main/assets/air-pop-imgs/moderate.png b/app/src/main/assets/air-pop-imgs/moderate.png new file mode 100644 index 000000000..c3d3f9db3 Binary files /dev/null and b/app/src/main/assets/air-pop-imgs/moderate.png differ diff --git a/app/src/main/assets/air-pop-imgs/poor.png b/app/src/main/assets/air-pop-imgs/poor.png new file mode 100644 index 000000000..c02976fcb Binary files /dev/null and b/app/src/main/assets/air-pop-imgs/poor.png differ diff --git a/app/src/main/assets/air-pop-imgs/very_poor.png b/app/src/main/assets/air-pop-imgs/very_poor.png new file mode 100644 index 000000000..6cdf10c06 Binary files /dev/null and b/app/src/main/assets/air-pop-imgs/very_poor.png differ diff --git a/app/src/main/assets/app/apiKeysRotation.js b/app/src/main/assets/app/apiKeysRotation.js new file mode 100644 index 000000000..51e244230 --- /dev/null +++ b/app/src/main/assets/app/apiKeysRotation.js @@ -0,0 +1,82 @@ +const apiKeysDaily = [ + 'd94bcd435b62a031771c35633f9f310a', + '3b833dcd6aac36124a8a30e182224427', + 'dd1571a8ad3fd44555e8a5d66db01929', + '82005d27a116c2880c8f0fcb866998a0', + '279b4be6d54c8bf6ea9b12275a567156', + '7a02a834570055b013f9a14fd1b712ed', + '20f7632ffc2c022654e4093c6947b4f4', + '6557810176c36fac5f0db536711a6c52', + 'b190a0605344cc4f3af08d0dd473dd25', + 'b02af426a3fad0d92d3e0b32f9324cf0', + '392345e23d1613d56dad9cba63084b9c', + '6841e5450643e5d4ff59981dbf58944e' + +]; + + +const apiKeysAlerts = [ + 'd94bcd435b62a031771c35633f9f310a', + '3b833dcd6aac36124a8a30e182224427', + 'dd1571a8ad3fd44555e8a5d66db01929', + '82005d27a116c2880c8f0fcb866998a0', + '279b4be6d54c8bf6ea9b12275a567156', + '7a02a834570055b013f9a14fd1b712ed', + '20f7632ffc2c022654e4093c6947b4f4', + '6557810176c36fac5f0db536711a6c52', + 'b190a0605344cc4f3af08d0dd473dd25', + 'b02af426a3fad0d92d3e0b32f9324cf0', + '392345e23d1613d56dad9cba63084b9c', + '6841e5450643e5d4ff59981dbf58944e' +]; + +const apiKeysCityName = [ + '7147cfac7299479da122684c73d9b80a', + '09713ffe266c4dfa99b98157dfd148f9', + '66f9ad95f6704259a376949eaa659e62', + '0c2f2f52e0ac4212b663d878a673328f', + 'd53acf46573c48e3be81683402f2be93', + '37060e56d27b4034933a09fb8413fe74', + 'bb6683ee536649d596878075153d9920', + '02fc5e51bae44471b936ef635e465558', + 'f1330ff150844fe885c8bed5f40ca593', + '9261e72fd39d421bbdad506b1d1611ab' + +]; + +const apiKeysGeo = [ + '7147cfac7299479da122684c73d9b80a', + '09713ffe266c4dfa99b98157dfd148f9', + '66f9ad95f6704259a376949eaa659e62', + '0c2f2f52e0ac4212b663d878a673328f', + 'd53acf46573c48e3be81683402f2be93', + '37060e56d27b4034933a09fb8413fe74', + 'bb6683ee536649d596878075153d9920', + '02fc5e51bae44471b936ef635e465558', + 'f1330ff150844fe885c8bed5f40ca593', + '9261e72fd39d421bbdad506b1d1611ab' +]; + +const apiKeysVisual = [ + 'VGU8JQ9FQKP86FNHZRJEALTLH', + 'XX6JNDK3D97HKE93N9J75BTXU', + '4KMES28T2K3PXBCXTNYZCZFW8', + 'VLK2ZUD6XT4872PBVQT7FCJ92', + 'CZ6BMMP5QEZQTLT45YVM9YJ5D', + '2U6VP2EF5WD6ZXEAA7V5G6H7R', + '7VXHK5K23FZAZEA8QGGPYM6NE', + '8DADTJ5YHGASWH7QFBNVXVUMD' + ]; + + + const astronomyApiKeys = [ + '63a7210d2b104646a1099d5ba223d221', + '4c502232671d48699afaf3b2741db4a4', + '3dba64be2889483880c8534a81b5287e', + 'a44390988cdb4d66a2e73d952cea14de', + '4545085e4d474639ab84961437736aef', + '45138b014170468889660331ec52f156', + '033158c54bf547a58ec44e6b7f5dc1f2', + '8e982325202c43ab8ff4e2434af4b2bc', + '5862f00bef2a49dbb8d96579e4d2bbee' + ]; diff --git a/app/src/main/assets/app/app.js b/app/src/main/assets/app/app.js new file mode 100644 index 000000000..59bf994da --- /dev/null +++ b/app/src/main/assets/app/app.js @@ -0,0 +1,740 @@ + +const DefaultLocation = JSON.parse(localStorage.getItem('DefaultLocation')); + + +let currentApiKeyIndex = 0; + +let currentKeyMoonIndex = 0; +let currentAstronomyKeyIndex = 0; + + +function handleStorageChange(event) { + if (event.key === 'SelectedTempUnit' || + event.key === 'SelectedWindUnit' || + event.key === 'selectedVisibilityUnit' || + event.key === 'selectedTimeMode'|| + event.key === 'selectedPrecipitationUnit' || + event.key === 'DefaultLocation'|| + event.key === 'UseBackgroundAnimations'|| + event.key === 'selectedPressureUnit') { + + setTimeout(()=>{ + window.location.reload(); + }, 1500); + + } +} + +window.addEventListener('storage', handleStorageChange); + + + +let anim = null; + +function ShowError() { + + document.querySelector('.no_internet_error').hidden = false; + + if (anim) { + return; + } + + var animationContainer = document.getElementById('error_img_cat'); + var animationData = 'icons/error-cat.json'; + + anim = bodymovin.loadAnimation({ + container: animationContainer, + renderer: 'svg', + loop: true, + autoplay: true, + path: animationData + }); + +} + + +let currentLocation = null; + +function useAutoCurrentLocation(){ + showLoader(); + if ("geolocation" in navigator) { + navigator.geolocation.getCurrentPosition((position) => { + currentLocation = { + latitude: position.coords.latitude, + longitude: position.coords.longitude + }; + DecodeWeather(currentLocation.latitude, currentLocation.longitude); + + + + + }); +} +} + + +if(DefaultLocation){ +if(DefaultLocation.name === 'CurrentDeviceLocation'){ + useAutoCurrentLocation() + sendThemeToAndroid("ReqLocation") + document.querySelector('.currentLocationdiv').hidden = false; +} else if(DefaultLocation.lat && DefaultLocation.lon){ + DecodeWeather(DefaultLocation.lat, DefaultLocation.lon) + document.querySelector('.currentLocationdiv').hidden = true; +} +} +else{ + useAutoCurrentLocation() + sendThemeToAndroid("ReqLocation") + document.querySelector('.currentLocationdiv').hidden = false; +} + + + + + +function handleGeolocationError(error) { + console.error('Error getting geolocation:', error); + displayErrorMessage('Error getting geolocation. Please enable location services.'); +} + + +document.addEventListener('DOMContentLoaded', () => { + const cityInput = document.getElementById('city-input'); + const cityList = document.getElementById('city-list'); + const cityopen = document.getElementById('city-open'); + const searchContainer = document.getElementById('search-container'); + const closeButton = document.querySelector('.close_search'); + const openMapPicker = document.getElementById('openMapPicker'); + + cityopen.addEventListener("click", () => { + let savedLocations = JSON.parse(localStorage.getItem('savedLocations')) || []; + + + searchContainer.style.display = 'block'; + window.history.pushState({ SearchContainerOpen: true }, ""); + document.querySelector('.header_hold').style.transform = 'scale(1.1)'; + document.querySelector('.header_hold').style.opacity = '0'; + + setTimeout(() => { + document.querySelector('.header_hold').style.transform = ''; + document.querySelector('.header_hold').style.opacity = ''; + + + if (savedLocations.length === 0) { + cityInput.focus() + + + } else { + + + } + + }, 400); + }); + + closeButton.addEventListener('click', () => { + + window.history.back() + }); + + + openMapPicker.addEventListener('click', () => { + document.querySelector('.map_picker').hidden = false; + window.history.pushState({ MapPickerContainerOpen: true }, ""); + + removeMap() + + setTimeout(() => { + RenderSearhMap() + }, 400); + }); + + let debounceTimeout; + + cityInput.addEventListener('input', () => { + const searchTerm = cityInput.value.trim(); + document.querySelector('.currentLocationdiv').hidden = true; + document.querySelector('.savedLocations').hidden = true; + + clearTimeout(debounceTimeout); + + if (searchTerm) { + document.getElementById('cityLoader').hidden = false; + + debounceTimeout = setTimeout(() => { + getCitySuggestions(cityInput.value); + }, 500); + } else { + cityList.innerHTML = ''; + document.getElementById('cityLoader').hidden = true; + document.querySelector('.currentLocationdiv').hidden = false; + document.querySelector('.savedLocations').hidden = false; + + + setTimeout(()=>{ + cityList.innerHTML = ''; + }, 200) + + setTimeout(()=>{ + cityList.innerHTML = ''; + }, 400) + + setTimeout(()=>{ + cityList.innerHTML = ''; + }, 600) + + + let savedLocations = JSON.parse(localStorage.getItem('savedLocations')) || []; + + if (savedLocations.length === 0) { + document.querySelector('.savedLocations').hidden = true; + } else { + document.querySelector('.savedLocations').hidden = false; + + } + + + } + }); + + + cityInput.addEventListener('keypress', (event) => { + const searchTerm = cityInput.value.trim(); + document.querySelector('.currentLocationdiv').hidden = true; + + if (event.key === 'Enter') { + if (searchTerm) { + document.getElementById('cityLoader').hidden = false; + setTimeout(()=>{ + getCitySuggestions(cityInput.value); + }, 500); + } else { + cityList.innerHTML = ''; + document.getElementById('cityLoader').hidden = true; + document.querySelector('.currentLocationdiv').hidden = false; + + + } + } + }); + + +let currentApiKeyGeoIndex = 0; + + async function getCitySuggestions(query) { + const apiKeyGeo = apiKeysGeo[currentApiKeyGeoIndex]; + const url = `https://api.opencagedata.com/geocode/v1/json?q=${query}&key=${apiKeyGeo}&limit=5`; + + try { + const response = await fetch(url); + if (!response.ok) { + throw new Error('Network response was not ok'); + } + const data = await response.json(); + displaySuggestions(data.results); + } catch (error) { + console.error('Error fetching city suggestions:', error); + + if (currentApiKeyGeoIndex < apiKeysGeo.length - 1) { + currentApiKeyGeoIndex++; + console.log(`Switching to API key index ${currentApiKeyGeoIndex} for city suggestions`); + getCitySuggestions(query); + } else { + console.error('All geo API keys failed. Unable to fetch data.'); + + } + } + } + function displaySuggestions(results) { + + const suggestionsContainer = document.getElementById('city-list'); + clearSuggestions() + + const displayedSuggestions = new Set(); + + const savedLocations = JSON.parse(localStorage.getItem('savedLocations')) || []; + const savedLocationsSet = new Set(savedLocations.map(location => location.locationName)); + + + results.forEach(result => { + const city = result.components.city || result.components.town || result.components.village || result.components.hamlet; + const state = result.components.state || result.components.region; + const country = result.components.country; + const countryCode = result.components.country_code; + + const uniqueComponents = [city, state, country].filter((value, index, self) => value && self.indexOf(value) === index); + const suggestionText = uniqueComponents.join(', '); + + + if (!displayedSuggestions.has(suggestionText)) { + displayedSuggestions.add(suggestionText); + + + const suggestionItem = document.createElement('div'); + + const clickLocation = document.createElement('savelocationtouch') + + + const saveBtnLocation = document.createElement('md-text-button'); + + + saveBtnLocation.textContent = 'Save'; + + if (!savedLocationsSet.has(suggestionText)) { + saveBtnLocation.hidden = false; + } else { + saveBtnLocation.hidden = true; + + } + + + const createGap = document.createElement('flex'); + + const countryIcon = document.createElement('span'); + countryIcon.classList.add('fi', 'fis', `fi-${countryCode}`) + + + suggestionItem.classList.add('suggestion-item'); + const suggestRipple = document.createElement('md-ripple'); + suggestRipple.style = '--md-ripple-pressed-opacity: 0.1;' + suggestionItem.textContent = suggestionText; + clickLocation.appendChild(suggestRipple) + suggestionItem.setAttribute('data-lat', result.geometry.lat); + suggestionItem.setAttribute('data-lon', result.geometry.lng); + clickLocation.addEventListener('click', function () { + + DecodeWeather(result.geometry.lat, result.geometry.lng) + + cityList.innerHTML = ''; + cityInput.value = ''; + document.getElementById('city-name').innerHTML = '' + document.querySelector('.focus-input').blur(); + document.getElementById('forecast').scrollLeft = 0; + document.getElementById('weather_wrap').scrollTop = 0; + window.history.back() + + setTimeout(() => { + cityInput.dispatchEvent(new Event('input')); + }, 200); + }); + + saveBtnLocation.addEventListener('click', () => { + + + saveLocationToContainer(suggestionText, result.geometry.lat, result.geometry.lng) + + + + cityList.innerHTML = ''; + cityInput.value = ''; + + setTimeout(() => { + cityInput.dispatchEvent(new Event('input')); + }, 200); + }); + + suggestionItem.appendChild(countryIcon) + suggestionItem.appendChild(clickLocation) + suggestionItem.appendChild(createGap) + suggestionItem.appendChild(saveBtnLocation); + suggestionsContainer.appendChild(suggestionItem); + setTimeout(() => { + document.getElementById('cityLoader').hidden = true; + + }, 400); + } + }); + } + + + function clearSuggestions() { + const suggestionsContainer = document.getElementById('city-list'); + while (suggestionsContainer.firstChild) { + suggestionsContainer.removeChild(suggestionsContainer.firstChild); + } + } + +}); + + +function saveLocationToContainer(locationName, lat, lon) { + let savedLocations = JSON.parse(localStorage.getItem('savedLocations')) || []; + savedLocations.push({ locationName, lat, lon }); + localStorage.setItem('savedLocations', JSON.stringify(savedLocations)); + + const savedLocationsHolder = document.querySelector('savedLocationsHolder'); + + savedLocationsHolder.innerHTML = '' + + + setTimeout(() => { + loadSavedLocations() + }, 200) + +} + + +function loadSavedLocations() { + const savedLocationsHolder = document.querySelector('savedLocationsHolder'); + const savedLocations = JSON.parse(localStorage.getItem('savedLocations')) || []; + + + + if (savedLocations.length === 0) { + document.querySelector('.savedLocations').hidden = true; + } else { + document.querySelector('.savedLocations').hidden = false; + + } + + savedLocations.forEach(location => { + const savedLocationItem = document.createElement('savedLocationItem'); + + savedLocationItem.setAttribute('lat', location.lat); + savedLocationItem.setAttribute('lon', location.lon); + + const savedLocationItemLat = savedLocationItem.getAttribute('lat'); + const savedLocationItemLon = savedLocationItem.getAttribute('lon'); + + + + + + savedLocationItem.innerHTML = ` + + my_location + +
+

${location.locationName}

+
+ + + delete + + `; + + + + + + savedLocationItem.querySelector('.delete-btn').addEventListener('click', () => { + deleteLocation(location.locationName); + savedLocationItem.remove(); + }); + + + + const savelocationtouch = document.createElement('savelocationtouch'); + const md_rippleSaveLocationTouch = document.createElement('md-ripple'); + savelocationtouch.appendChild(md_rippleSaveLocationTouch); + + savelocationtouch.addEventListener('click', () => { + DecodeWeather(savedLocationItemLat, savedLocationItemLon) + document.getElementById('city-name').innerHTML = '' + document.getElementById('forecast').scrollLeft = 0; + document.getElementById('weather_wrap').scrollTop = 0; + window.history.back(); + }); + + + + + + + + + + + + savedLocationsHolder.append(savedLocationItem); + savedLocationItem.appendChild(savelocationtouch); + }); + + +} + +document.addEventListener('DOMContentLoaded', (event) => { + loadSavedLocations(); +}); + +function deleteLocation(locationName) { + let savedLocations = JSON.parse(localStorage.getItem('savedLocations')) || []; + + savedLocations = savedLocations.filter(location => location.locationName !== locationName); + + localStorage.setItem('savedLocations', JSON.stringify(savedLocations)); + + if (savedLocations.length === 0) { + document.querySelector('.savedLocations').hidden = true; + } else { + document.querySelector('.savedLocations').hidden = false; + + } +} + + + +window.addEventListener('popstate', function (event) { + + if (!document.querySelector('.map_picker').hidden) { + document.querySelector('.map_picker').style.opacity = '0'; + document.querySelector('.map_picker').style.transform = 'scale(0.8)'; + + + setTimeout(() => { + document.querySelector('.map_picker').hidden = true; + document.querySelector('.map_picker').style.opacity = ''; + document.querySelector('.map_picker').style.transform = ''; + + }, 300); + } else { + document.getElementById('search-container').style.opacity = '0' + setTimeout(() => { + document.getElementById('modal-content').scrollTop = 0; + document.getElementById('city-input').value = '' + document.getElementById('city-input').dispatchEvent(new Event('input')); + document.getElementById('search-container').style.display = 'none' + document.getElementById('search-container').style.opacity = '1' + + }, 300); + } +}); + +function getCountryName(code) { + return countryNames[code] || "Unknown Country"; +} + + + + + +function getCurrentLocationWeather() { + if (navigator.geolocation) { + navigator.geolocation.getCurrentPosition(position => { + const latitude = position.coords.latitude; + const longitude = position.coords.longitude; + DecodeWeather(latitude, longitude); // Call getWeatherByCoordinates with coordinates + + + }, handleGeolocationError); + } else { + console.error('Geolocation is not supported by this browser.'); + } +} + + + + + +function showLoader() { + const loaderContainer = document.getElementById('loader-container'); + loaderContainer.style.display = 'flex'; + loaderContainer.style.opacity = '1'; + document.querySelector('rainmeterbar').scrollLeft = 0 + +} + +// Hide the loader +function hideLoader() { + const loaderContainer = document.getElementById('loader-container'); + + loaderContainer.style.opacity = '0'; + + setTimeout(() => { + loaderContainer.style.display = 'none'; + + }, 300); + + + let savedLocations = JSON.parse(localStorage.getItem('savedLocations')) || []; + + if (savedLocations.length === 0) { + document.querySelector('.savedLocations').hidden = true; + } else { + document.querySelector('.savedLocations').hidden = false; + + } + + +} + + + + + +function refreshWeather(){ + const latSend = localStorage.getItem('currentLat') + const longSend = localStorage.getItem('currentLong') + + DecodeWeather(latSend, longSend) + + setTimeout(()=>{ + document.querySelector('.refresh_weat').disabled = true; + }, 200); + + setTimeout(()=>{ + document.querySelector('.refresh_weat').disabled = false; + }, 300000); +} + + +function sendThemeToAndroid(theme) { + + AndroidInterface.updateStatusBarColor(theme); + }; +function Toast(toastText, time){ + ToastAndroidShow.ShowToast(toastText, time); +} + + + +// map + +var map; + +function RenderSearhMap() { + const latDif = localStorage.getItem('currentLat'); + const longDif = localStorage.getItem('currentLong'); + + map = window.L.map('map', { + center: [latDif, longDif], + zoom: 13, + zoomControl: false + + }); + + window.L.tileLayer('https://{s}.basemaps.cartocdn.com/rastertiles/dark_all/{z}/{x}/{y}.png', {}).addTo(map); + + var marker = window.L.marker([latDif, longDif]).addTo(map); + + map.on('click', function(e) { + var lat = e.latlng.lat; + var lon = e.latlng.lng; + + marker.setLatLng([lat, lon]); + window.history.back(); + + document.getElementById('search-container').style.opacity = '0' + + setTimeout(() => { + window.history.back(); + + }, 500); + + DecodeWeather(lat, lon); + + document.getElementById('city-name').innerHTML = ''; + document.getElementById('forecast').scrollLeft = 0; + document.getElementById('weather_wrap').scrollTop = 0; + }); +} + +function removeMap() { + if (map) { + map.remove(); + map = null; + } +} + + + + + + + + +function checkNoInternet(){ + if(navigator.onLine){ + document.querySelector('.no_internet_error').hidden = true; + document.getElementById('error_img_cat').innerHTML = '' + + } else{ + ShowError() + } + } + checkNoInternet() + + + + + + document.addEventListener('DOMContentLoaded', async function() { + + const currentVersion = 'v1.6.4'; + const githubRepo = 'PranshulGG/WeatherMaster'; + const releasesUrl = `https://api.github.com/repos/${githubRepo}/releases/latest`; + + try { + const response = await fetch(releasesUrl); + if (!response.ok) throw new Error('Network response was not ok.'); + + const data = await response.json(); + const latestVersion = data.tag_name; + + + + if (latestVersion !== currentVersion) { + + + document.querySelector('.new_ver_download').hidden = false; + + + } else { + document.querySelector('.new_ver_download').hidden = true; + return + } + }catch (error) { + } + }); + + + + + +const scrollView = document.querySelector('.insights'); + + +const scrollIndicators = document.getElementById('scroll-indicators'); + +function createScrollDots(){ + const sections = document.querySelectorAll('.insights_item'); + + +sections.forEach((section, index) => { + const dot = document.createElement('span'); + const dotValue = document.createElement('div'); + dot.classList.add('dot'); + dotValue.classList.add('dotValue') + dot.onclick = () => { + section.scrollIntoView({ behavior: 'smooth' }); + }; + scrollIndicators.appendChild(dot); + dot.appendChild(dotValue) +}); +} + +const updateActiveIndicator = () => { + const scrollPosition = Math.round(scrollView.scrollLeft / scrollView.offsetWidth); + const dotsValue = document.querySelectorAll('.dotValue'); + dotsValue.forEach((dotValue, index) => { + if (index === scrollPosition) { + dotValue.style.transform = 'scale(1)'; + } else { + dotValue.style.transform = 'scale(0)'; + + } + }); +}; + + +scrollView.addEventListener('scroll', updateActiveIndicator); + +document.addEventListener('DOMContentLoaded', ()=>{ +createScrollDots() +updateActiveIndicator(); + +}); + + + diff --git a/app/src/main/assets/app/apply.js b/app/src/main/assets/app/apply.js new file mode 100644 index 000000000..60daf34fb --- /dev/null +++ b/app/src/main/assets/app/apply.js @@ -0,0 +1,3 @@ +const themeStyle = localStorage.getItem('weatherTHEME') + +document.documentElement.setAttribute('iconCodeTheme', themeStyle); diff --git a/app/src/main/assets/app/bg_animations.js b/app/src/main/assets/app/bg_animations.js new file mode 100644 index 000000000..9f96c4498 --- /dev/null +++ b/app/src/main/assets/app/bg_animations.js @@ -0,0 +1,621 @@ + +function createRain() { + const canvas = document.getElementById('bg_animation_rain'); + const ctx = canvas.getContext('2d'); + + function resizeCanvas() { + canvas.width = window.innerWidth; + canvas.height = window.innerHeight; + } + + resizeCanvas(); + window.addEventListener('resize', resizeCanvas); + + let raindrops = []; + let animationFrameId; + + class Raindrop { + constructor(x, y, length, speed) { + this.x = x; + this.y = y; + this.length = length; + this.speed = speed; + } + + fall() { + this.y += this.speed; + if (this.y > canvas.height) { + this.y = 0; + this.x = Math.random() * canvas.width; + } + } + + draw() { + ctx.beginPath(); + ctx.moveTo(this.x, this.y); + ctx.lineTo(this.x, this.y + this.length); + ctx.strokeStyle = 'rgba(174,194,224,0.5)'; + ctx.lineWidth = 1; + ctx.lineCap = 'round'; + ctx.stroke(); + } + } + + function createRaindrops(count) { + for (let i = 0; i < count; i++) { + let x = Math.random() * canvas.width; + let y = Math.random() * canvas.height; + let length = Math.random() * 20 + 50; + let speed = Math.random() * 10 + 15; + raindrops.push(new Raindrop(x, y, length, speed)); + } + } + + function animate() { + ctx.clearRect(0, 0, canvas.width, canvas.height); + raindrops.forEach((raindrop) => { + raindrop.fall(); + raindrop.draw(); + }); + animationFrameId = requestAnimationFrame(animate); + } + + function clearCanvas() { + cancelAnimationFrame(animationFrameId); + raindrops = []; + ctx.clearRect(0, 0, canvas.width, canvas.height); + } + + function startAnimationRain(){ + createRaindrops(100); + animate(); + } + + return { clearCanvas, startAnimationRain }; +} + + + +// -------------------------------- + +function createThunder() { + const canvas = document.getElementById("bg_animation_thunder"); + const context = canvas.getContext('2d'); + const lightningStrikeOffset = 5; + const lightningStrikeLength = 100; + const lightningBoltLength = 5; + const lightningThickness = 4; + const canvasHeight = canvas.height; + const canvasWidth = canvas.width; + + const createVector = function(x, y) { return { x, y } } + + const getRandomFloat = function(min, max) { + const random = Math.random() * (max - min + 1) + min; + return random; + } + + const getRandomInteger = function(min, max) { + return Math.floor(getRandomFloat(min, max)); + } + + const clearCanvasArea = function(x, y, height, width) { + let rectX = x || 0; + let rectY = y || 0; + let rectHeight = height || canvasHeight; + let rectWidth = width || canvasWidth; + context.clearRect(rectX, rectY, rectWidth, rectHeight); + context.beginPath(); + } + + const line = function(start, end, thickness, opacity) { + context.beginPath(); + context.moveTo(start.x, start.y); + context.lineTo(end.x, end.y); + context.lineWidth = thickness; + context.strokeStyle = `rgba(255, 255, 255, ${opacity})`; + context.shadowBlur = 30; + context.shadowColor = "white"; + context.stroke(); + context.closePath(); + } + + class Lightning { + constructor(x1, y1, x2, y2, thickness, opacity) { + this.start = createVector(x1, y1); + this.end = createVector(x2, y2); + this.thickness = thickness; + this.opacity = opacity; + } + draw() { + return line(this.start, this.end, this.thickness, this.opacity); + } + } + + const interval = 2000; + let lightning = []; + let animationFrameId; + let intervalId; + + const createLightning = function() { + lightning = []; + let lightningX1 = getRandomInteger(2, canvasWidth - 2); + let lightningX2 = getRandomInteger(lightningX1 - lightningStrikeOffset, lightningX1 + lightningStrikeOffset); + lightning[0] = new Lightning(lightningX1, 0, lightningX2, lightningBoltLength, lightningThickness, 1); + for (let l = 1; l < lightningStrikeLength; l++) { + let lastBolt = lightning[l - 1]; + let lx1 = lastBolt.end.x; + let lx2 = getRandomInteger(lx1 - lightningStrikeOffset, lx1 + lightningStrikeOffset); + lightning.push(new Lightning( + lx1, + lastBolt.end.y, + lx2, + lastBolt.end.y + lightningBoltLength, + lastBolt.thickness, + lastBolt.opacity + )); + } + } + + const setup = function() { + createLightning(); + for (let i = 0 ; i < lightning.length ; i++) { + lightning[i].draw(); + } + } + + const animate = function() { + clearCanvasArea(); + + for (let i = 0 ; i < lightning.length ; i++) { + lightning[i].opacity -= 0.01; + lightning[i].thickness -= 0.09; + if (lightning[i].thickness <= 2) { + lightning[i].end.y -= 0.09; + } + lightning[i].draw(); + } + + animationFrameId = requestAnimationFrame(animate); + } + + function startAnimation(){ + setup(); + animationFrameId = requestAnimationFrame(animate); + intervalId = setInterval(function() { + createLightning(); + }, interval); + } + function clearCanvas() { + cancelAnimationFrame(animationFrameId); + clearInterval(intervalId); + lightning = []; + clearCanvasArea(); + context.clearRect(0, 0, canvas.width, canvas.height); + } + + return { clearCanvas, startAnimation }; +} + + +// ------------- + +function createClouds() { + const canvas = document.getElementById('bg_animation_clouds'); + const ctx = canvas.getContext('2d'); + + canvas.width = window.innerWidth; + canvas.height = window.innerHeight; + + let cloudArray = []; + const numberOfClouds = 6; + const cloudSpeed = 0.08; + let animationFrameId; + + function drawRoundedCloud(x, y, width, height, radius) { + ctx.beginPath(); + ctx.moveTo(x + radius, y); + ctx.arcTo(x + width, y, x + width, y + height, radius); + ctx.arcTo(x + width, y + height, x, y + height, radius); + ctx.arcTo(x, y + height, x, y, radius); + ctx.arcTo(x, y, x + width, y, radius); + ctx.closePath(); + } + + class Cloud { + constructor() { + this.width = Math.random() * 40 + 60; + this.height = this.width / 0.7; + this.x = Math.random() * canvas.width; + this.y = Math.random() * canvas.height; + this.speed = cloudSpeed + Math.random() * 0.5; + this.borderRadius = Math.random() * 5 + 10; + } + + draw() { + ctx.shadowColor = 'rgba(255, 255, 255, 0.5)'; + ctx.shadowBlur = 20; + ctx.shadowOffsetX = 10; + ctx.shadowOffsetY = 10; + drawRoundedCloud(this.x, this.y, this.width, this.height, this.borderRadius); + ctx.fillStyle = 'rgba(255, 255, 255, 0.1)'; + ctx.fill(); + ctx.shadowColor = 'transparent'; + } + + update() { + this.x += this.speed; + if (this.x > canvas.width + this.width) { + this.x = -this.width; + } + this.draw(); + } + } + + function initClouds() { + cloudArray = []; + for (let i = 0; i < numberOfClouds; i++) { + cloudArray.push(new Cloud()); + } + } + + function animateClouds() { + ctx.clearRect(0, 0, canvas.width, canvas.height); + cloudArray.forEach(cloud => cloud.update()); + animationFrameId = requestAnimationFrame(animateClouds); + } + + window.addEventListener('resize', () => { + canvas.width = window.innerWidth; + canvas.height = window.innerHeight; + initClouds(); + }); + + function startAnimation(){ + initClouds(); + animateClouds(); + } + function clearCanvas() { + cancelAnimationFrame(animationFrameId); + cloudArray = []; + ctx.clearRect(0, 0, canvas.width, canvas.height); + } + + return { clearCanvas, startAnimation }; +} + + +// ------------ + + +function createStars() { + const canvas = document.getElementById('bg_animation_stars'); + const ctx = canvas.getContext('2d'); + + function adjustCanvasSize() { + const devicePixelRatio = window.devicePixelRatio || 1; + canvas.width = window.innerWidth * devicePixelRatio; + canvas.height = window.innerHeight * devicePixelRatio; + canvas.style.width = `${window.innerWidth}px`; + canvas.style.height = `${window.innerHeight}px`; + ctx.scale(devicePixelRatio, devicePixelRatio); + } + + let starsArray = []; + const numberOfStars = 150; + const twinkleInterval = 10000; + let animationFrameId; + + class Star { + constructor(isGolden = false) { + this.x = Math.random() * canvas.width / (window.devicePixelRatio || 1); + this.y = Math.random() * canvas.height / (window.devicePixelRatio || 1); + this.size = isGolden ? Math.random() * 2 + 4 : Math.random() * 2 + 1; + this.color = isGolden ? 'gold' : '#fffbd4'; + this.opacity = Math.random(); + this.isGolden = isGolden; + this.twinkleTime = Math.random() * twinkleInterval; + } + + draw() { + ctx.globalAlpha = this.opacity; + ctx.beginPath(); + ctx.arc(this.x, this.y, this.size, 0, Math.PI * 2); + ctx.fillStyle = this.color; + ctx.fill(); + ctx.globalAlpha = 1; + } + + update(deltaTime) { + this.twinkleTime -= deltaTime; + if (this.twinkleTime <= 0) { + this.opacity = Math.random(); + this.twinkleTime = Math.random() * twinkleInterval; + } + this.draw(); + } + } + + function initStars() { + starsArray = []; + for (let i = 0; i < numberOfStars; i++) { + if (i < 2) { + starsArray.push(new Star(true)); + } else { + starsArray.push(new Star()); + } + } + } + + let lastTime = 0; + function animateStars(timestamp) { + const deltaTime = timestamp - lastTime; + lastTime = timestamp; + + ctx.clearRect(0, 0, canvas.width, canvas.height); + starsArray.forEach(star => star.update(deltaTime)); + animationFrameId = requestAnimationFrame(animateStars); + } + + window.addEventListener('resize', () => { + adjustCanvasSize(); + initStars(); + }); + + function startAnimation(){ + adjustCanvasSize(); + initStars(); + animationFrameId = requestAnimationFrame(animateStars); + } + function clearCanvas() { + cancelAnimationFrame(animationFrameId); + starsArray = []; + ctx.clearRect(0, 0, canvas.width, canvas.height); + } + + return { clearCanvas, startAnimation }; +} + + +// -------------------- + + +function createFog() { + const canvas = document.getElementById('bg_animation_fog'); + const ctx = canvas.getContext('2d'); + + canvas.width = window.innerWidth; + canvas.height = window.innerHeight; + + let cloudArray = []; + const numberOfClouds = 5; + const cloudSpeed = 0.01; + let animationFrameId; + + function drawRoundedCloud(x, y, width, height, radius) { + ctx.beginPath(); + ctx.moveTo(x + radius, y); + ctx.arcTo(x + width, y, x + width, y + height, radius); + ctx.arcTo(x + width, y + height, x, y + height, radius); + ctx.arcTo(x, y + height, x, y, radius); + ctx.arcTo(x, y, x + width, y, radius); + ctx.closePath(); + } + + class Cloud { + constructor() { + this.width = Math.random() * 200 + 100; + this.height = this.width / 2; + this.x = Math.random() * canvas.width; + this.y = Math.random() * canvas.height; + this.speed = cloudSpeed + Math.random() * 0.5; + this.borderRadius = Math.random() * 5 + 10; + } + + draw() { + ctx.shadowColor = '#99885f80'; + ctx.shadowBlur = 20; + ctx.shadowOffsetX = 20; + ctx.shadowOffsetY = 10; + drawRoundedCloud(this.x, this.y, this.width, this.height, this.borderRadius); + ctx.fillStyle = '#99885f1a'; + ctx.fill(); + ctx.shadowColor = 'transparent'; + } + + update() { + this.x += this.speed; + if (this.x > canvas.width + this.width) { + this.x = -this.width; + } + this.draw(); + } + } + + function initClouds() { + cloudArray = []; + for (let i = 0; i < numberOfClouds; i++) { + cloudArray.push(new Cloud()); + } + } + + function animateClouds() { + ctx.clearRect(0, 0, canvas.width, canvas.height); + cloudArray.forEach(cloud => cloud.update()); + animationFrameId = requestAnimationFrame(animateClouds); + } + + window.addEventListener('resize', () => { + canvas.width = window.innerWidth; + canvas.height = window.innerHeight; + initClouds(); + }); + + function startAnimation(){ + initClouds(); + animateClouds(); + } + function clearCanvas() { + cancelAnimationFrame(animationFrameId); + cloudArray = []; + ctx.clearRect(0, 0, canvas.width, canvas.height); + } + + return { clearCanvas, startAnimation }; +} + + +// ------------- + +function createSnow() { + const canvas = document.getElementById('bg_animation_snow'); + const ctx = canvas.getContext('2d'); + + function adjustCanvasSize() { + const devicePixelRatio = window.devicePixelRatio || 1; + canvas.width = window.innerWidth * devicePixelRatio; + canvas.height = window.innerHeight * devicePixelRatio; + canvas.style.width = `${window.innerWidth}px`; + canvas.style.height = `${window.innerHeight}px`; + ctx.scale(devicePixelRatio, devicePixelRatio); + } + + let snowflakesArray = []; + const numberOfSnowflakes = 150; + let animationFrameId; + + class Snowflake { + constructor() { + this.x = Math.random() * canvas.width / (window.devicePixelRatio || 1); + this.y = Math.random() * canvas.height / (window.devicePixelRatio || 1); + this.size = Math.random() * 3 + 2; + this.speedY = Math.random() * 1 + 0.5; + this.speedX = Math.random() * 1 - 0.5; + this.opacity = Math.random() * 0.8 + 0.2; + } + + draw() { + ctx.globalAlpha = this.opacity; + ctx.beginPath(); + ctx.arc(this.x, this.y, this.size, 0, Math.PI * 2); + ctx.fillStyle = 'white'; + ctx.fill(); + ctx.globalAlpha = 1; + } + + update() { + this.y += this.speedY; + this.x += this.speedX; + + if (this.y > canvas.height / (window.devicePixelRatio || 1)) { + this.y = -this.size; + this.x = Math.random() * canvas.width / (window.devicePixelRatio || 1); + } + + if (this.x > canvas.width / (window.devicePixelRatio || 1)) { + this.x = -this.size; + } else if (this.x < -this.size) { + this.x = canvas.width / (window.devicePixelRatio || 1); + } + + this.draw(); + } + } + + function initSnowflakes() { + snowflakesArray = []; + for (let i = 0; i < numberOfSnowflakes; i++) { + snowflakesArray.push(new Snowflake()); + } + } + + function animateSnowflakes() { + ctx.clearRect(0, 0, canvas.width, canvas.height); + snowflakesArray.forEach(snowflake => snowflake.update()); + animationFrameId = requestAnimationFrame(animateSnowflakes); + } + + window.addEventListener('resize', () => { + adjustCanvasSize(); + initSnowflakes(); + }); + + function startAnimation(){ + adjustCanvasSize(); + initSnowflakes(); + animateSnowflakes(); + } + + function clearCanvas() { + cancelAnimationFrame(animationFrameId); + snowflakesArray = []; + ctx.clearRect(0, 0, canvas.width, canvas.height); + } + + return { clearCanvas, startAnimation }; +} + + + +const snowAnimation = createSnow(); +const RainFallAnimation = createRain(); +const cloudsAnimation = createClouds(); +const thunderAnimation = createThunder(); +const starsAnimation = createStars(); +const fogAnimation = createFog(); + + + +// display animations + + +function displayRain(){ + RainFallAnimation.startAnimationRain() +} + +function displaySnow(){ + snowAnimation.startAnimation() +} + +function displayClouds(){ + cloudsAnimation.startAnimation() +} + +function displayStars(){ + starsAnimation.startAnimation() +} + +function displayFog(){ + fogAnimation.startAnimation() +} + +function displayThunder(){ + thunderAnimation.startAnimation() +} + +// remove animations + + +function removeRain(){ + RainFallAnimation.clearCanvas() +} + +function removeSnow(){ + snowAnimation.clearCanvas() +} + +function removeClouds(){ + cloudsAnimation.clearCanvas() +} + +function removeStars(){ + starsAnimation.clearCanvas() +} + +function removeFog(){ + fogAnimation.clearCanvas() +} + +function removeThunder(){ + thunderAnimation.clearCanvas() +} diff --git a/app/src/main/assets/app/country-list.js b/app/src/main/assets/app/country-list.js new file mode 100644 index 000000000..d7b588ac9 --- /dev/null +++ b/app/src/main/assets/app/country-list.js @@ -0,0 +1,252 @@ +const countryNames = { + "BD": "Bangladesh", + "BE": "Belgium", + "BF": "Burkina Faso", + "BG": "Bulgaria", + "BA": "Bosnia and Herzegovina", + "BB": "Barbados", + "WF": "Wallis and Futuna", + "BL": "Saint Barthelemy", + "BM": "Bermuda", + "BN": "Brunei", + "BO": "Bolivia", + "BH": "Bahrain", + "BI": "Burundi", + "BJ": "Benin", + "BT": "Bhutan", + "JM": "Jamaica", + "BV": "Bouvet Island", + "BW": "Botswana", + "WS": "Samoa", + "BQ": "Bonaire, Saint Eustatius and Saba ", + "BR": "Brazil", + "BS": "Bahamas", + "JE": "Jersey", + "BY": "Belarus", + "BZ": "Belize", + "RU": "Russia", + "RW": "Rwanda", + "RS": "Serbia", + "TL": "East Timor", + "RE": "Reunion", + "TM": "Turkmenistan", + "TJ": "Tajikistan", + "RO": "Romania", + "TK": "Tokelau", + "GW": "Guinea-Bissau", + "GU": "Guam", + "GT": "Guatemala", + "GS": "South Georgia and the South Sandwich Islands", + "GR": "Greece", + "GQ": "Equatorial Guinea", + "GP": "Guadeloupe", + "JP": "Japan", + "GY": "Guyana", + "GG": "Guernsey", + "GF": "French Guiana", + "GE": "Georgia", + "GD": "Grenada", + "GB": "United Kingdom", + "GA": "Gabon", + "SV": "El Salvador", + "GN": "Guinea", + "GM": "Gambia", + "GL": "Greenland", + "GI": "Gibraltar", + "GH": "Ghana", + "OM": "Oman", + "TN": "Tunisia", + "JO": "Jordan", + "HR": "Croatia", + "HT": "Haiti", + "HU": "Hungary", + "HK": "Hong Kong", + "HN": "Honduras", + "HM": "Heard Island and McDonald Islands", + "VE": "Venezuela", + "PR": "Puerto Rico", + "PS": "Palestinian Territory", + "PW": "Palau", + "PT": "Portugal", + "SJ": "Svalbard and Jan Mayen", + "PY": "Paraguay", + "IQ": "Iraq", + "PA": "Panama", + "PF": "French Polynesia", + "PG": "Papua New Guinea", + "PE": "Peru", + "PK": "Pakistan", + "PH": "Philippines", + "PN": "Pitcairn", + "PL": "Poland", + "PM": "Saint Pierre and Miquelon", + "ZM": "Zambia", + "EH": "Western Sahara", + "EE": "Estonia", + "EG": "Egypt", + "ZA": "South Africa", + "EC": "Ecuador", + "IT": "Italy", + "VN": "Vietnam", + "SB": "Solomon Islands", + "ET": "Ethiopia", + "SO": "Somalia", + "ZW": "Zimbabwe", + "SA": "Saudi Arabia", + "ES": "Spain", + "ER": "Eritrea", + "ME": "Montenegro", + "MD": "Moldova", + "MG": "Madagascar", + "MF": "Saint Martin", + "MA": "Morocco", + "MC": "Monaco", + "UZ": "Uzbekistan", + "MM": "Myanmar", + "ML": "Mali", + "MO": "Macao", + "MN": "Mongolia", + "MH": "Marshall Islands", + "MK": "Macedonia", + "MU": "Mauritius", + "MT": "Malta", + "MW": "Malawi", + "MV": "Maldives", + "MQ": "Martinique", + "MP": "Northern Mariana Islands", + "MS": "Montserrat", + "MR": "Mauritania", + "IM": "Isle of Man", + "UG": "Uganda", + "TZ": "Tanzania", + "MY": "Malaysia", + "MX": "Mexico", + "IL": "Israel", + "FR": "France", + "IO": "British Indian Ocean Territory", + "SH": "Saint Helena", + "FI": "Finland", + "FJ": "Fiji", + "FK": "Falkland Islands", + "FM": "Micronesia", + "FO": "Faroe Islands", + "NI": "Nicaragua", + "NL": "Netherlands", + "NO": "Norway", + "NA": "Namibia", + "VU": "Vanuatu", + "NC": "New Caledonia", + "NE": "Niger", + "NF": "Norfolk Island", + "NG": "Nigeria", + "NZ": "New Zealand", + "NP": "Nepal", + "NR": "Nauru", + "NU": "Niue", + "CK": "Cook Islands", + "XK": "Kosovo", + "CI": "Ivory Coast", + "CH": "Switzerland", + "CO": "Colombia", + "CN": "China", + "CM": "Cameroon", + "CL": "Chile", + "CC": "Cocos Islands", + "CA": "Canada", + "CG": "Republic of the Congo", + "CF": "Central African Republic", + "CD": "Democratic Republic of the Congo", + "CZ": "Czech Republic", + "CY": "Cyprus", + "CX": "Christmas Island", + "CR": "Costa Rica", + "CW": "Curacao", + "CV": "Cape Verde", + "CU": "Cuba", + "SZ": "Swaziland", + "SY": "Syria", + "SX": "Sint Maarten", + "KG": "Kyrgyzstan", + "KE": "Kenya", + "SS": "South Sudan", + "SR": "Suriname", + "KI": "Kiribati", + "KH": "Cambodia", + "KN": "Saint Kitts and Nevis", + "KM": "Comoros", + "ST": "Sao Tome and Principe", + "SK": "Slovakia", + "KR": "South Korea", + "SI": "Slovenia", + "KP": "North Korea", + "KW": "Kuwait", + "SN": "Senegal", + "SM": "San Marino", + "SL": "Sierra Leone", + "SC": "Seychelles", + "KZ": "Kazakhstan", + "KY": "Cayman Islands", + "SG": "Singapore", + "SE": "Sweden", + "SD": "Sudan", + "DO": "Dominican Republic", + "DM": "Dominica", + "DJ": "Djibouti", + "DK": "Denmark", + "VG": "British Virgin Islands", + "DE": "Germany", + "YE": "Yemen", + "DZ": "Algeria", + "US": "United States", + "UY": "Uruguay", + "YT": "Mayotte", + "UM": "United States Minor Outlying Islands", + "LB": "Lebanon", + "LC": "Saint Lucia", + "LA": "Laos", + "TV": "Tuvalu", + "TW": "Taiwan", + "TT": "Trinidad and Tobago", + "TR": "Turkey", + "LK": "Sri Lanka", + "LI": "Liechtenstein", + "LV": "Latvia", + "TO": "Tonga", + "LT": "Lithuania", + "LU": "Luxembourg", + "LR": "Liberia", + "LS": "Lesotho", + "TH": "Thailand", + "TF": "French Southern Territories", + "TG": "Togo", + "TD": "Chad", + "TC": "Turks and Caicos Islands", + "LY": "Libya", + "VA": "Vatican", + "VC": "Saint Vincent and the Grenadines", + "AE": "United Arab Emirates", + "AD": "Andorra", + "AG": "Antigua and Barbuda", + "AF": "Afghanistan", + "AI": "Anguilla", + "VI": "U.S. Virgin Islands", + "IS": "Iceland", + "IR": "Iran", + "AM": "Armenia", + "AL": "Albania", + "AO": "Angola", + "AQ": "Antarctica", + "AS": "American Samoa", + "AR": "Argentina", + "AU": "Australia", + "AT": "Austria", + "AW": "Aruba", + "IN": "India", + "AX": "Aland Islands", + "AZ": "Azerbaijan", + "IE": "Ireland", + "ID": "Indonesia", + "UA": "Ukraine", + "QA": "Qatar", + "MZ": "Mozambique" +} \ No newline at end of file diff --git a/app/src/main/assets/app/fetch.js b/app/src/main/assets/app/fetch.js new file mode 100644 index 000000000..99f4229bf --- /dev/null +++ b/app/src/main/assets/app/fetch.js @@ -0,0 +1,216 @@ + +function getCountryName(code) { + return countryNames[code] || "Unknown Country"; +} + + +async function DecodeWeather(lat, lon) { + const apiKey = 'J8HTH6P4YTGO'; + const url = `https://api.timezonedb.com/v2.1/get-time-zone?key=${apiKey}&format=json&by=position&lat=${lat}&lng=${lon}`; + + try { + const response = await fetch(url); + const data = await response.json(); + + if (data.status === 'OK') { + FetchWeather(lat, lon, data.zoneName) + } else { + console.error('Error fetching timezone:', data); + DecodeWeather(lat, lon) + return null; + } + } catch (error) { + console.error('Error:', error); + DecodeWeather(lat, lon) + return null; + } +} + + +function FetchWeather(lat, lon, timezone) { + +showLoader(); + + localStorage.setItem('currentLong', lon) + localStorage.setItem('currentLat', lat) + + fetch(`https://api.open-meteo.com/v1/forecast?latitude=${lat}&longitude=${lon}¤t=temperature_2m,is_day,apparent_temperature,pressure_msl,relative_humidity_2m,precipitation,weather_code,cloud_cover,wind_speed_10m,wind_direction_10m,wind_gusts_10m&hourly=wind_speed_10m,wind_direction_10m,relative_humidity_2m,pressure_msl,cloud_cover,temperature_2m,dew_point_2m,apparent_temperature,precipitation_probability,precipitation,weather_code,visibility,uv_index&daily=weather_code,temperature_2m_max,temperature_2m_min,sunrise,sunset,daylight_duration,uv_index_max,precipitation_sum,daylight_duration,precipitation_probability_max,precipitation_hours,wind_speed_10m_max,wind_gusts_10m_max&timezone=${timezone}&forecast_days=14&forecast_hours=24`) + .then(response => response.json()) + .then(data => { + + + + // send hour + + + HourlyWeather(data); + + + // send daily + + + DailyWeather(data.daily) + + // Cache weather for different pages + + localStorage.setItem('DailyWeatherCache', JSON.stringify(data.daily)); + localStorage.setItem('CurrentHourlyCache', JSON.stringify(data.hourly)) + + + // send current + + CurrentWeather(data.current, data.daily.sunrise[0], data.daily.sunset[0]) + + saveCache(lat, lon, timezone) + + // send airquality + + FetchAirQuality(lat, lon, timezone) + + // send uv + + UvIndex(lat, lon) + + // send other data + + MoreDetails(lat, lon) + astronomyData(lat, lon) + FetchAlert(lat, lon) + + // location name + + + + const cityLat = lat + const cityLon = lon + + let currentApiKeyCityNameIndex = 0; + + fetchCityName(cityLat, cityLon) + + document.getElementById('saveLocationCurrent').setAttribute('data-lat', cityLat) + document.getElementById('saveLocationCurrent').setAttribute('data-long', cityLon) + + function fetchCityName(cityLat, cityLon) { + const apiKeyCityName = apiKeysCityName[currentApiKeyCityNameIndex]; + const urlcityName = `https://api.opencagedata.com/geocode/v1/json?q=${cityLat}+${cityLon}&key=${apiKeyCityName}`; + + fetch(urlcityName) + .then(response => { + if (!response.ok) { + fetchCityName(cityLat, cityLon); + throw new Error('Network response was not ok'); + } + return response.json(); + }) + .then(data => { + if (data.results.length > 0) { + const components = data.results[0].components; + const city = components.city || components.town || components.village; + const stateMain = components.state; + const countryNameText = components.country || 'No country' + + if (!city) { + document.getElementById('city-name').innerHTML = `${stateMain}, ${countryNameText}`; + document.getElementById('SelectedLocationText').innerHTML = `${stateMain}, ${countryNameText}`; + localStorage.setItem('CurrentLocationName', `${stateMain}, ${countryNameText}`) + document.getElementById('currentLocationName').textContent = `${stateMain}, ${countryNameText}`; + + document.getElementById('saveLocationCurrent').setAttribute('data-location-text', `${stateMain}, ${countryNameText}`) + + } else if (!stateMain) { + document.getElementById('city-name').innerHTML = `${city}, ${countryNameText}`; + document.getElementById('SelectedLocationText').innerHTML = `${city}, ${countryNameText}`; + localStorage.setItem('CurrentLocationName', `${city}, ${countryNameText}`) + document.getElementById('currentLocationName').textContent = `${city}, ${countryNameText}`; + document.getElementById('saveLocationCurrent').setAttribute('data-location-text', `${city}, ${countryNameText}`) + + } else { + document.getElementById('city-name').innerHTML = `${city}, ${stateMain}, ${countryNameText}`; + document.getElementById('SelectedLocationText').innerHTML = `${city}, ${stateMain}, ${countryNameText}`; + localStorage.setItem('CurrentLocationName', `${city}, ${stateMain}, ${countryNameText}`) + document.getElementById('currentLocationName').textContent = `${city}, ${stateMain}, ${countryNameText}`; + document.getElementById('saveLocationCurrent').setAttribute('data-location-text', `${city}, ${stateMain}, ${countryNameText}`) + } + } else { + console.log('No results found'); + } + }) + .catch(error => { + console.error('Error fetching city name:', error); + + if (currentApiKeyCityNameIndex < apiKeysCityName.length - 1) { + currentApiKeyCityNameIndex++; + console.log(`Switching to API key index ${currentApiKeyCityNameIndex} for city name`); + fetchCityName(cityLat, cityLon, countryNameText); + } else { + console.error('All city name API keys failed. Unable to fetch data.'); + + } + }); + } + + getOpenWeatherMainTemp() + + hideLoader() + }).catch(error =>{ + ShowError() + }) + +} + + +// get airquality + +function FetchAirQuality(lat, lon, timezone) { + + fetch(`https://air-quality-api.open-meteo.com/v1/air-quality?latitude=${lat}&longitude=${lon}¤t=us_aqi,pm10,pm2_5,carbon_monoxide,nitrogen_dioxide,sulphur_dioxide,ozone&timezone=${timezone}&forecast_hours=1`) + .then(response => response.json()) + .then(data => { + + AirQuaility(data) + + }); + +} + + +// selected location toggle + +function seeSelectedLocation(){ + document.querySelector('selectLocationText').hidden = false; + document.querySelector('selectLocationTextOverlay').hidden = false; + + document.querySelector('.header_hold').style.transform = 'scale(1.1)'; + document.querySelector('.header_hold').style.opacity = '0'; + + +} + +function seeSelectedLocationClose(){ + document.querySelector('selectLocationTextOverlay').hidden = true; + document.querySelector('selectLocationText').hidden = true; + document.querySelector('.header_hold').style.transform = ''; + document.querySelector('.header_hold').style.opacity = ''; +} + +document.querySelector('selectLocationTextOverlay').addEventListener('click', ()=>{ + seeSelectedLocationClose() +}); + + + + +function saveCache(lat, lon, timezone) { + + fetch(`https://api.open-meteo.com/v1/forecast?latitude=${lat}&longitude=${lon}&hourly=relative_humidity_2m,pressure_msl,cloud_cover,temperature_2m,dew_point_2m,apparent_temperature,precipitation_probability,precipitation,weather_code,visibility,uv_index&timezone=${timezone}&forecast_days=14`) + .then(response => response.json()) + .then(data => { + + + localStorage.setItem('HourlyWeatherCache', JSON.stringify(data.hourly)); + + }); + + } + \ No newline at end of file diff --git a/app/src/main/assets/app/navigate.js b/app/src/main/assets/app/navigate.js new file mode 100644 index 000000000..c9f1366a8 --- /dev/null +++ b/app/src/main/assets/app/navigate.js @@ -0,0 +1,26 @@ + + + + +window.transitionToPage = function(href) { + + document.querySelector('body').style.opacity = '0'; + + setTimeout(function() { + window.location.href = href + + }, 500); + + +} + + + + + + +document.addEventListener('DOMContentLoaded', function(event) { + + document.querySelector('body').style.opacity = '1'; + +}); diff --git a/app/src/main/assets/app/renderForecastPage.js b/app/src/main/assets/app/renderForecastPage.js new file mode 100644 index 000000000..5a857be6c --- /dev/null +++ b/app/src/main/assets/app/renderForecastPage.js @@ -0,0 +1,652 @@ +const SelectedTempUnit = localStorage.getItem('SelectedTempUnit'); +const SelectedWindUnit = localStorage.getItem('SelectedWindUnit'); +const SelectedPrecipitationUnit = localStorage.getItem('selectedPrecipitationUnit'); +const SelectedPressureUnit = localStorage.getItem('selectedPressureUnit'); +const cachedData = JSON.parse(localStorage.getItem('DailyWeatherCache')); +const cachedDataHourly = JSON.parse(localStorage.getItem('HourlyWeatherCache')); +const timeFormat = localStorage.getItem('selectedTimeMode'); + + +// icons + +function GetWeatherIcon(iconCode, isDay) { + + + if (isDay === 1) { + if (iconCode === 0) { + return '../weather-icons/clear_day.svg'; + } else if (iconCode === 1) { + return '../weather-icons/mostly_clear_day.svg'; + } else if (iconCode === 2) { + return '../weather-icons/partly_cloudy_day.svg'; + + } else if (iconCode === 3) { + return '../weather-icons/cloudy.svg'; + + } else if (iconCode === 45 || iconCode === 48) { + return '../weather-icons/haze_fog_dust_smoke.svg'; + + } else if (iconCode === 51 || iconCode === 53 || iconCode === 55) { + + return '../weather-icons/drizzle.svg'; + + } else if (iconCode === 56 || iconCode === 57) { + + return '../weather-icons/mixed_rain_hail_sleet.svg'; + + } else if (iconCode === 61 || iconCode === 63) { + + return '../weather-icons/showers_rain.svg'; + + } else if (iconCode === 65) { + + return '../weather-icons/heavy_rain.svg'; + + } else if (iconCode === 66 || iconCode === 67) { + + return '../weather-icons/sleet_hail.svg'; + + } else if (iconCode === 71) { + + return '../weather-icons/scattered_snow_showers_day.svg'; + + } else if (iconCode === 73) { + + return '../weather-icons/showers_snow.svg'; + + } else if (iconCode === 75) { + + return '../weather-icons/heavy_snow.svg'; + + } else if (iconCode === 77) { + + return '../weather-icons/flurries.svg'; + + } else if (iconCode === 80 || iconCode === 81) { + + return '../weather-icons/showers_rain.svg'; + + } else if (iconCode === 82) { + + return '../weather-icons/heavy_rain.svg'; + + } else if (iconCode === 85) { + + return '../weather-icons/showers_snow.svg'; + + } else if (iconCode === 86) { + + return '../weather-icons/heavy_snow.svg'; + + } else if (iconCode === 95) { + + return '../weather-icons/isolated_thunderstorms.svg' + + } else if (iconCode === 96 || iconCode === 99) { + + return '../weather-icons/strong_thunderstorms.svg' + + } + } + + return iconCode +} + +// weather label + +function GetWeatherLabel(iconCode, isDay) { + + + if (isDay === 1) { + if (iconCode === 0) { + return 'clear_sky' + + } else if (iconCode === 1) { + return 'mostly_clear' + + } else if (iconCode === 2) { + return 'partly_cloudy' + + } else if (iconCode === 3) { + return 'overcast' + + } else if (iconCode === 45 || iconCode === 48) { + return 'fog' + + } else if (iconCode === 51 || iconCode === 53 || iconCode === 55) { + return 'drizzle' + + } else if (iconCode === 56 || iconCode === 57) { + return 'freezing_drizzle' + + } else if (iconCode === 61 || iconCode === 63) { + return 'moderate_rain' + + } else if (iconCode === 65) { + return 'heavy_intensity_rain' + + } else if (iconCode === 66 || iconCode === 67) { + return 'freezing_rain' + + } else if (iconCode === 71) { + return 'slight_snow' + + } else if (iconCode === 73) { + return 'moderate_snow' + + } else if (iconCode === 75) { + return 'heavy_intensity_snow' + + } else if (iconCode === 77) { + return 'snow_grains' + + } else if (iconCode === 80 || iconCode === 81) { + return 'rain_showers' + + } else if (iconCode === 82) { + return 'heavy_rain_showers' + + } else if (iconCode === 85) { + return 'slight_snow_showers' + + } else if (iconCode === 86) { + return 'heavy_snow_showers' + + } else if (iconCode === 95) { + return 'thunderstorm' + + } else if (iconCode === 96 || iconCode === 99) { + return 'strong_thunderstorm' + + } + } +} + + +function getWeatherLabelInLang(iconCode, isDay, langCode) { + const translationKey = GetWeatherLabel(iconCode, isDay); + + const translatedLabel = getTranslationByLang(langCode, translationKey); + + return translatedLabel || 'Unknown weather'; +} + + + +// change ids same + +const ConditionIcons = { + + WindSockIcon: ' ', + + PrecipitationAmountIcon: ' ', + + PrecipitationChancesIcon: ' ', + + PressureIcon: ' ', + + CloudCoverIcon: ' ', + + HumidityIcon: ' ', + + DewPointIcon: ' ', + + SunriseIcon: ' ', + + SunsetIcon: ' ', + + UVindexIcon: ' ', + + MoonRiseIcon: ' ', + + MoonSetIcon: ' ', +} + + + + + + + +function getDailyForecast() { + if (cachedDataHourly && cachedDataHourly.time && cachedDataHourly.time.length > 0) { + const dailyForecast = aggregateHourlyData(cachedDataHourly); + displayDailyForecast(cachedData, dailyForecast); + } else { + console.error('Hourly data is not available.'); + } +} + +function aggregateHourlyData(hourlyData) { + const dailyData = {}; + hourlyData.time.forEach((time, index) => { + const date = new Date(time).toISOString().split('T')[0]; + + if (hourlyData.temperature_2m && hourlyData.temperature_2m[index] !== undefined) { + if (!dailyData[date]) { + dailyData[date] = { + humidity: 0, + cloudCover: 0, + dewPoint: 0, + pressure: 0, + count: 0 + }; + } + + } + const dayData = dailyData[date]; + dayData.humidity += hourlyData.relative_humidity_2m[index]; + dayData.cloudCover += hourlyData.cloud_cover[index]; + dayData.dewPoint += hourlyData.dew_point_2m[index]; + dayData.pressure += hourlyData.pressure_msl[index]; + dayData.count++; + }); + + + for (const date in dailyData) { + dailyData[date].humidity = Math.round(dailyData[date].humidity / dailyData[date].count); + dailyData[date].cloudCover = Math.round(dailyData[date].cloudCover / dailyData[date].count); + dailyData[date].dewPoint = Math.round(dailyData[date].dewPoint / dailyData[date].count); + dailyData[date].pressure = Math.round(dailyData[date].pressure / dailyData[date].count); + } + + return dailyData; +} + + +function displayDailyForecast(forecast, forecastDaily) { + const forecastContainer = document.getElementById('foreCastList'); + const forecastDateHeader = document.createElement('forecastDateHeader'); + const forecastMainDetails = document.createElement('forecastMainDetails'); + + forecastContainer.innerHTML = ''; + + + const today = new Date(); + const todayString = today.toISOString().split('T')[0]; + const sortedDates = Object.keys(forecastDaily) + .filter(date => date >= todayString) + .sort(); + + + if (sortedDates.length === 0) { + forecastContainer.innerHTML = '

No upcoming forecast data available.

'; + return; + } + + + sortedDates.forEach((date, index) => { + + + + + const dateObj = new Date(date + 'T00:00:00'); + + const isToday = date === todayString; + const weekday = isToday ? 'today' : dateObj.toLocaleDateString('en-US', { weekday: 'short' }).toLowerCase(); + + + const weekdayLang = getTranslationByLang(localStorage.getItem('AppLanguageCode'), weekday); + + + const dailyData = forecastDaily[date]; + + const formattedDate = new Intl.DateTimeFormat('en-US', { day: 'numeric', month: 'short' }).format(dateObj); + + const rainPercentage = Math.round(forecast.precipitation_probability_max[index]) || '0'; + + const convertTo12Hour = (time) => { + const date = new Date(time); + return date.toLocaleTimeString([], { hour: '2-digit', minute: '2-digit', hour12: true }); + }; + + const convertTo24Hour = (time) => { + const date = new Date(time); + return date.toLocaleTimeString([], { hour: '2-digit', minute: '2-digit', hour12: false }); + }; + + let SunriseTime + let SunsetTime + + if (timeFormat === '24 hour') { + SunriseTime = convertTo24Hour(forecast.sunrise[index]) + SunsetTime = convertTo24Hour(forecast.sunset[index]) + } else{ + SunriseTime = convertTo12Hour(forecast.sunrise[index]) + SunsetTime = convertTo12Hour(forecast.sunset[index]) + } + const DailyWeatherCode = forecast.weather_code[index]; + + const cloudCover = dailyData.cloudCover + + const humidity = dailyData.humidity; + + + let WindSpeed; + + if (SelectedWindUnit === 'mile') { + WindSpeed = Math.round(forecast.wind_speed_10m_max[index] / 1.60934) + ' mph'; + } else if (SelectedWindUnit === 'M/s') { + WindSpeed = (forecast.wind_speed_10m_max[index] / 3.6).toFixed(2) + ' m/s'; + } else { + WindSpeed = Math.round(forecast.wind_speed_10m_max[index]) + ' km/h'; + } + + + let TemperatureMax; + + if (SelectedTempUnit === 'fahrenheit') { + TemperatureMax = Math.round(forecast.temperature_2m_max[index] * 9 / 5 + 32); + } else { + TemperatureMax = Math.round(forecast.temperature_2m_max[index]); + } + + let TemperatureMin; + + if (SelectedTempUnit === 'fahrenheit') { + TemperatureMin = Math.round(forecast.temperature_2m_min[index] * 9 / 5 + 32); + } else { + TemperatureMin = Math.round(forecast.temperature_2m_min[index]); + } + + let dewPointTemp; + + + if (SelectedTempUnit === 'fahrenheit') { + dewPointTemp = Math.round(dailyData.dewPoint * 9 / 5 + 32); + } else { + dewPointTemp = Math.round(dailyData.dewPoint); + } + + let rainAmount; + + if (SelectedPrecipitationUnit === 'in') { + rainAmount = forecast.precipitation_sum[index] ? (forecast.precipitation_sum[index] * 0.0393701).toFixed(2) + 'in' : '0.00in'; + + } else { + rainAmount = forecast.precipitation_sum[index] ? forecast.precipitation_sum[index] + ' mm' : '0.0mm'; + } + + + let pressureMain; + let pressureMainUnit; + + if (SelectedPressureUnit === 'inHg') { + pressureMain = (dailyData.pressure * 0.02953).toFixed(2); + pressureMainUnit = 'inHg'; + } else if (SelectedPressureUnit === 'mmHg') { + pressureMain = (dailyData.pressure * 0.750062).toFixed(2); + pressureMainUnit = 'mmHg'; + } else { + pressureMain = dailyData.pressure; + pressureMainUnit = 'hPa'; + } + + const uvIndex = Math.round(forecast.uv_index_max[index]) + + let UVindexText; + + if (uvIndex >= 0 && uvIndex <= 1) { + UVindexText = 'Minimal'; + } else if (uvIndex > 1 && uvIndex <= 2) { + UVindexText = 'Low'; + + } else if (uvIndex > 2 && uvIndex <= 3) { + UVindexText = 'Low'; + + } else if (uvIndex > 3 && uvIndex <= 4) { + UVindexText = 'Moderate'; + + } else if (uvIndex > 4 && uvIndex <= 5) { + UVindexText = 'Moderate'; + + } else if (uvIndex > 5 && uvIndex <= 6) { + UVindexText = 'Moderate'; + + } else if (uvIndex > 6 && uvIndex <= 7) { + UVindexText = 'High'; + + } else if (uvIndex > 7 && uvIndex <= 8) { + UVindexText = 'High'; + + } else if (uvIndex > 8 && uvIndex <= 9) { + UVindexText = 'Very high'; + + } else if (uvIndex > 9 && uvIndex <= 10) { + UVindexText = 'Very high'; + + } else if (uvIndex > 10 && uvIndex <= 11) { + UVindexText = 'Very high'; + + } else if (uvIndex > 11 && uvIndex <= 12) { + UVindexText = 'Extreme'; + + } else if (uvIndex > 12 && uvIndex <= 13) { + UVindexText = 'Extreme'; + + } else if (uvIndex > 13) { + UVindexText = 'Extreme'; + } + + + + + const forecastDateHeaderContent = document.createElement('div'); + forecastDateHeaderContent.classList.add('forecastDateHeaderContent') + forecastDateHeaderContent.dataset.index = index; + + + forecastDateHeaderContent.innerHTML = ` + + ${weekdayLang} + +
+

${TemperatureMax}°/${TemperatureMin}°

+
+ + + + ` + // ------------------------------------------------------ + + + + + + forecastDateHeader.appendChild(forecastDateHeaderContent); + forecastContainer.appendChild(forecastDateHeader) + forecastContainer.appendChild(forecastMainDetails) + + + + function handleSelection(event) { + document.querySelectorAll('.forecastDateHeaderContent').forEach(item => { + item.classList.remove('selected'); + }); + + event.currentTarget.classList.add('selected'); + + forecastMainDetails.innerHTML = ''; + + + const forecastTempConditionMainContent = document.createElement('div'); + forecastTempConditionMainContent.classList.add('forecastTempConditionMainContent') + + const selectedIndex = event.currentTarget.dataset.index; + const selectedForecast = forecast[selectedIndex]; + + forecastTempConditionMainContent.innerHTML = ` + +
+

${weekdayLang}, ${formattedDate}

+
+

${TemperatureMax}°

/${TemperatureMin}°
+ +
+ ${getWeatherLabelInLang(DailyWeatherCode, 1, localStorage.getItem('AppLanguageCode'))} +
+ + +

Daily conditions

+
+
+ +
+

Wind speed

+ + ${ConditionIcons.WindSockIcon} + + ${WindSpeed} +
+ + +
+

Humidity

+ + ${ConditionIcons.HumidityIcon} + + ${humidity}% +
+ + +
+

Precipitation chances

+ + ${ConditionIcons.PrecipitationChancesIcon} + + ${rainPercentage}% +
+ +
+

Precipitation amount

+ + ${ConditionIcons.PrecipitationAmountIcon} + + ${rainAmount} +
+ +
+

Cloud cover

+ + ${ConditionIcons.CloudCoverIcon} + + ${cloudCover}% +
+ +
+

Pressure

+ + ${ConditionIcons.PressureIcon} + + ${pressureMain} ${pressureMainUnit} +
+ +
+

Dew point

+ + ${ConditionIcons.DewPointIcon} + + ${dewPointTemp}° +
+ +
+

UV index

+ + ${ConditionIcons.UVindexIcon} + + ${uvIndex} ${UVindexText} +
+ +
+
+ +

Sunrise & sunset

+
+ +
+

Sunrise

+
+ ${ConditionIcons.SunriseIcon} +
+ ${SunriseTime} +
+ +
+

Sunset

+
+ ${ConditionIcons.SunsetIcon} +
+ ${SunsetTime} +
+ +
+ + ` + + if (!forecastMainDetails.contains(forecastTempConditionMainContent)) { + forecastMainDetails.appendChild(forecastTempConditionMainContent); + } + + const AppLanguageCodeValue = localStorage.getItem('AppLanguageCode'); + if (AppLanguageCodeValue) { + applyTranslations(AppLanguageCodeValue); + + } + + + } + + + forecastDateHeaderContent.addEventListener('click', handleSelection); + const clickedForecastItem = localStorage.getItem('ClickedForecastItem') || '0'; + const selectedForecastIndex = parseInt(clickedForecastItem, 10); + + + if (selectedForecastIndex >= 0 && selectedForecastIndex <= 13 || index === 0) { + if (index === selectedForecastIndex || index === 0) { + forecastDateHeaderContent.classList.add('selected'); + handleSelection({ currentTarget: forecastDateHeaderContent }); + firstForecastIndex = index; + + setTimeout(() => { + forecastDateHeaderContent.scrollIntoView({ behavior: 'smooth', block: 'nearest' }); + }, 500); + } + } + }); +} + + + +setTimeout(() => { + getDailyForecast() +}, 1500); + + +function convertTo12HourFormat(unixTimestamp) { + const date = new Date(unixTimestamp * 1000); + let hours = date.getHours(); + const minutes = date.getMinutes(); + const ampm = hours >= 12 ? 'PM' : 'AM'; + hours = hours % 12; + hours = hours ? hours : 12; + const minutesStr = minutes < 10 ? '0' + minutes : minutes; + return `${hours}:${minutesStr} ${ampm}`; +} + + +setTimeout(() => { + document.querySelector('.loader_holder').style.opacity = '0' +}, 2000); + + +setTimeout(() => { + document.querySelector('.loader_holder').hidden = true +}, 2300); + + + + + + + diff --git a/app/src/main/assets/app/renderWeather.js b/app/src/main/assets/app/renderWeather.js new file mode 100644 index 000000000..28271f657 --- /dev/null +++ b/app/src/main/assets/app/renderWeather.js @@ -0,0 +1,1221 @@ + + +const SelectedTempUnit = localStorage.getItem('SelectedTempUnit'); +const SelectedWindUnit = localStorage.getItem('SelectedWindUnit'); +const SelectedVisibiltyUnit = localStorage.getItem('selectedVisibilityUnit'); +const SelectedPrecipitationUnit = localStorage.getItem('selectedPrecipitationUnit'); +const SelectedPressureUnit = localStorage.getItem('selectedPressureUnit'); +const timeFormat = localStorage.getItem('selectedTimeMode'); + + + +function HourlyWeather(data) { + const forecastContainer = document.getElementById('forecast'); + const RainBarsContainer = document.querySelector('rainMeterBar'); + + forecastContainer.innerHTML = ''; + RainBarsContainer.innerHTML = ''; + if (!data || !data.hourly || !data.hourly.time || !data.hourly.weather_code || !data.hourly.temperature_2m) { + console.error("Hourly forecast data is missing or undefined"); + return; + } + const sunriseTimes = data.daily.sunrise.map(time => new Date(time).getTime()); + const sunsetTimes = data.daily.sunset.map(time => new Date(time).getTime()); + + + + data.hourly.time.forEach((time, index) => { + + const forecastTime = new Date(time).getTime(); + + let hours + let period + + if (timeFormat === '24 hour') { + hours = new Date(time).getHours().toString().padStart(2, '0') + ':'; + period = new Date(time).getMinutes().toString().padStart(2, '0'); + } else { + hours = new Date(time).getHours(); + period = hours >= 12 ? "PM" : "AM"; + hours = hours % 12 || 12; + } + + const HourWeatherCode = data.hourly.weather_code[index]; + + const rainMeterBarItem = document.createElement('rainMeterBarItem'); + + + let PrecAmount; + + if (SelectedPrecipitationUnit === 'in') { + PrecAmount = mmToInches(data.hourly.precipitation[index]).toFixed(2) + ' in'; + } else { + PrecAmount = data.hourly.precipitation[index].toFixed(1) + ' mm'; + } + + const PrecProb = data.hourly.precipitation_probability[index] + + let dayIndex = -1; + for (let i = 0; i < sunriseTimes.length; i++) { + if (forecastTime >= sunriseTimes[i] && forecastTime < (sunriseTimes[i + 1] || Infinity)) { + dayIndex = i; + break; + } + } + let icon; + if (dayIndex !== -1 && forecastTime >= sunriseTimes[dayIndex] && forecastTime < sunsetTimes[dayIndex]) { + icon = GetWeatherIconDay(HourWeatherCode); // Day icon + } else { + icon = GetWeatherIconNight(HourWeatherCode); // Night icon + } + + const maxRain = 2; + const rainAmountPercent = (data.hourly.precipitation[index] / maxRain) * 100; + + + + let barColor; + + if (data.hourly.precipitation[index] < 0.5) { + barColor = '#4c8df6' + } else if (data.hourly.precipitation[index] > 0.5 && data.hourly.precipitation[index] <= 1) { + barColor = 'orange' + } else if (data.hourly.precipitation[index] > 1) { + barColor = 'red' + } + + + let Visibility; + let VisibilityUnit; + + + if (SelectedVisibiltyUnit === 'mileV') { + Visibility = Math.round(data.hourly.visibility[0] / 1609.34); + VisibilityUnit = 'miles' + } else { + Visibility = Math.round(data.hourly.visibility[0] / 1000); + VisibilityUnit = 'km' + + } + + + document.getElementById('unit_visibility').innerHTML = VisibilityUnit + document.getElementById('min-temp').innerHTML = Visibility + + + + let HourTemperature; + let DewPointTemp + + + if (SelectedTempUnit === 'fahrenheit') { + HourTemperature = Math.round(celsiusToFahrenheit(data.hourly.temperature_2m[index])); + DewPointTemp = Math.round(celsiusToFahrenheit(data.hourly.dew_point_2m[0])) + + } else { + HourTemperature = Math.round(data.hourly.temperature_2m[index]); + DewPointTemp = Math.round(data.hourly.dew_point_2m[0]) + + } + + const forecastItem = document.createElement('div'); + forecastItem.classList.add('forecast-item'); + forecastItem.id = "forecast24"; + + forecastItem.innerHTML = ` +

${HourTemperature}°

+ ${index === 0 ? ` + + + ` : ''} + +

${hours}${period}

+

+ + `; + + + rainMeterBarItem.innerHTML = ` + + + + +

${PrecAmount}

+

${data.hourly.precipitation_probability[index]}%

+ ${hours}${period} + + + ` + + forecastItem.addEventListener('click', ()=>{ + ShowSnack(`${getWeatherLabelInLang(HourWeatherCode, 1, localStorage.getItem('AppLanguageCode'))}`, 2000, 3, 'none', ' ', 'no-up') + + + }); + + + document.getElementById('dew_percentage').innerHTML = DewPointTemp + '°' + + RainBarsContainer.append(rainMeterBarItem) + forecastContainer.appendChild(forecastItem); + }); +} + + + + + +// daily + +function DailyWeather(dailyForecast) { + + const forecastContainer = document.getElementById('forecast-5day'); + forecastContainer.innerHTML = ''; + + const today = new Date().toISOString().split('T')[0]; + + + const warmingComments = [ + getTranslationByLang(localStorage.getItem('AppLanguageCode'), 'Warming expected over the next few days.'), + getTranslationByLang(localStorage.getItem('AppLanguageCode'), 'Temperatures will rise soon, get ready for some heat!'), + getTranslationByLang(localStorage.getItem('AppLanguageCode'), "Looks like it's going to get warmer this week."), + getTranslationByLang(localStorage.getItem('AppLanguageCode'), "Prepare for warmer weather ahead."), + ]; + + const coolingComments = [ + getTranslationByLang(localStorage.getItem('AppLanguageCode'), 'Cooling expected over the next few days.'), + getTranslationByLang(localStorage.getItem('AppLanguageCode'), 'Temperatures are dropping soon, stay warm!'), + getTranslationByLang(localStorage.getItem('AppLanguageCode'), "It's going to get cooler in the coming days."), + getTranslationByLang(localStorage.getItem('AppLanguageCode'), "Expect a chilly breeze over the next days."), + ]; + + const stableComments = [ + getTranslationByLang(localStorage.getItem('AppLanguageCode'), 'Stable temperatures expected in the next few days.'), + getTranslationByLang(localStorage.getItem('AppLanguageCode'), 'No big temperature changes ahead, steady weather.'), + getTranslationByLang(localStorage.getItem('AppLanguageCode'), "Temperatures are holding steady for now."), + getTranslationByLang(localStorage.getItem('AppLanguageCode'), "Expect stable weather without much change."), + ]; + + function getRandomComment(commentsArray) { + const randomIndex = Math.floor(Math.random() * commentsArray.length); + return commentsArray[randomIndex]; + } + + const trendDaysArray = [2, 3, 6]; + let trendMessage = ''; + + for (let trendDays of trendDaysArray) { + if (dailyForecast.time.length >= trendDays) { + let tempDifferenceSum = 0; + + for (let i = 0; i < trendDays - 1; i++) { + const currentDayAvgTemp = (dailyForecast.temperature_2m_max[i] + dailyForecast.temperature_2m_min[i]) / 2; + const nextDayAvgTemp = (dailyForecast.temperature_2m_max[i + 1] + dailyForecast.temperature_2m_min[i + 1]) / 2; + tempDifferenceSum += nextDayAvgTemp - currentDayAvgTemp; + } + + if (tempDifferenceSum > 0) { + trendMessage = getRandomComment(warmingComments); + document.getElementById('temp_insight_icon').innerHTML = 'trending_up'; + } else if (tempDifferenceSum < 0) { + trendMessage = getRandomComment(coolingComments); + document.getElementById('temp_insight_icon').innerHTML = 'trending_down'; + } else { + trendMessage = getRandomComment(stableComments); + document.getElementById('temp_insight_icon').innerHTML = 'thermostat'; + } + + break; + } + } + + document.getElementById('temp_insight').innerHTML = trendMessage; + + + dailyForecast.time.forEach((time, index) => { + const [year, month, day] = time.split('-').map(Number); + const dateObj = new Date(year, month - 1, day); + + const today = new Date(); + const isSameDay = dateObj.getFullYear() === today.getFullYear() && + dateObj.getMonth() === today.getMonth() && + dateObj.getDate() === today.getDate(); + + const weekday = isSameDay ? 'today' : dateObj.toLocaleDateString('en-US', { weekday: 'short' }).toLowerCase(); + const weekdayLang = getTranslationByLang(localStorage.getItem('AppLanguageCode'), weekday); + + + + + const rainPercentage = dailyForecast.precipitation_probability_max[index]; + const DailyWeatherCode = dailyForecast.weather_code[index]; + + let TempMin + + if (SelectedTempUnit === 'fahrenheit') { + TempMin = Math.round(celsiusToFahrenheit(dailyForecast.temperature_2m_min[index])) + } else { + TempMin = Math.round(dailyForecast.temperature_2m_min[index]) + } + + let TempMax + + if (SelectedTempUnit === 'fahrenheit') { + TempMax = Math.round(celsiusToFahrenheit(dailyForecast.temperature_2m_max[index])) + } else { + TempMax = Math.round(dailyForecast.temperature_2m_max[index]) + } + + let TempMinCurrent + + if (SelectedTempUnit === 'fahrenheit') { + TempMinCurrent = Math.round(celsiusToFahrenheit(dailyForecast.temperature_2m_min[0])) + } else { + TempMinCurrent = Math.round(dailyForecast.temperature_2m_min[0]) + } + + let TempMaxCurrent + + if (SelectedTempUnit === 'fahrenheit') { + TempMaxCurrent = Math.round(celsiusToFahrenheit(dailyForecast.temperature_2m_max[0])) + } else { + TempMaxCurrent = Math.round(dailyForecast.temperature_2m_max[0]) + } + + document.getElementById('high_temp').innerHTML = TempMaxCurrent + '°'; + document.getElementById('low_temp').innerHTML = TempMinCurrent + '°'; + + + const forecastItem = document.createElement('div'); + forecastItem.classList.add('forecast-item-forecast'); + + forecastItem.setAttribute('onclick', `clickForecastItem(${index}); sendThemeToAndroid("Open8Forecast");`) + + + forecastItem.innerHTML = ` +

${TempMax}° ${TempMin}°

+ + Weather Icon + ${rainPercentage}% +
+

${weekdayLang}

+
+ + ` + const daylightDurationInSeconds = dailyForecast.daylight_duration[0]; + const daylightHours = Math.floor(daylightDurationInSeconds / 3600); + const daylightMinutes = Math.floor((daylightDurationInSeconds % 3600) / 60); + + + document.getElementById('weatherComments').innerHTML = `hourglass_top ${daylightHours} hrs ${daylightMinutes} mins ${getTranslationByLang(localStorage.getItem('AppLanguageCode'), 'day_length')} keyboard_arrow_down` + + + + let TodaysPrecAmount; + + if (SelectedPrecipitationUnit === 'in') { + TodaysPrecAmount = mmToInches(dailyForecast.precipitation_sum[0]).toFixed(2) + ' in'; + } else { + TodaysPrecAmount = dailyForecast.precipitation_sum[0].toFixed(1) + ' mm'; + } + + document.getElementById('AmountRainMM').innerHTML = TodaysPrecAmount + + + document.getElementById('RainHours').innerHTML = dailyForecast.precipitation_hours[0] + ' hrs' + + + forecastContainer.appendChild(forecastItem); + }); + + + +} + + +// current + + +function CurrentWeather(data, sunrise, sunset) { + const CurrentCloudCover = data.cloud_cover; + const CurrentHumidity = Math.round(data.relative_humidity_2m); + const CurrentWeatherCode = data.weather_code; + const CurrentWindDirection = data.wind_direction_10m + const isDay = data.is_day + + + + let CurrentTemperature; + let FeelsLikeTemp; + + if (SelectedTempUnit === 'fahrenheit') { + CurrentTemperature = Math.round(celsiusToFahrenheit(data.temperature_2m)) + FeelsLikeTemp = Math.round(celsiusToFahrenheit(data.apparent_temperature)) + } else { + CurrentTemperature = Math.round(data.temperature_2m) + FeelsLikeTemp = Math.round(data.apparent_temperature) + } + + if (CurrentTemperature < 10 && CurrentTemperature >= 0) { + CurrentTemperature = '0' + CurrentTemperature; + } + + + let CurrentWindGust; + + if (SelectedWindUnit === 'mile') { + CurrentWindGust = Math.round(kmhToMph(data.wind_gusts_10m)) + ' mph'; + } else if (SelectedWindUnit === 'M/s') { + CurrentWindGust = (data.wind_gusts_10m / 3.6).toFixed(2) + ' m/s'; + } else { + CurrentWindGust = Math.round(data.wind_gusts_10m) + ' km/h'; + } + + let CurrentWindSpeed; + + if (SelectedWindUnit === 'mile') { + CurrentWindSpeed = Math.round(kmhToMph(data.wind_speed_10m)) + ' mph'; + } else if (SelectedWindUnit === 'M/s') { + CurrentWindSpeed = (data.wind_speed_10m / 3.6).toFixed(2) + ' m/s'; + } else { + CurrentWindSpeed = Math.round(data.wind_speed_10m) + ' km/h'; + } + + let CurrentPressure; + let pressureMainUnit; + + if (SelectedPressureUnit === 'inHg') { + CurrentPressure = hPaToInHg(data.pressure_msl).toFixed(2); + pressureMainUnit = 'inHg'; + } else if (SelectedPressureUnit === 'mmHg') { + CurrentPressure = hPaToMmHg(data.pressure_msl).toFixed(2); + pressureMainUnit = 'mmHg'; + } else { + CurrentPressure = data.pressure_msl; + pressureMainUnit = 'hPa'; + } + + let CurrentPrecipitation; + + if (SelectedPrecipitationUnit === 'in') { + CurrentPrecipitation = mmToInches(Math.round(data.precipitation)); + } else { + CurrentPrecipitation = Math.round(data.precipitation); + } + + // ------------------------------- + + + document.getElementById('temp').innerHTML = CurrentTemperature + '°'; + document.getElementById('feels_like_now').innerHTML = `${getTranslationByLang(localStorage.getItem('AppLanguageCode'), 'feels_like')} ` + FeelsLikeTemp + '°'; + document.getElementById('weather-icon').src = GetWeatherIcon(CurrentWeatherCode, isDay); + document.getElementById('weather-icon').alt = CurrentWeatherCode + document.getElementById('description').innerHTML = getWeatherLabelInLang(CurrentWeatherCode, isDay, localStorage.getItem('AppLanguageCode')); + document.getElementById('wind-speed').innerHTML = CurrentWindSpeed + document.getElementById('WindGust').innerHTML = CurrentWindGust + document.getElementById('clouds').innerHTML = CurrentCloudCover + '%' + document.getElementById('froggie_imgs').src = GetFroggieIcon(CurrentWeatherCode, isDay) + document.documentElement.setAttribute('iconcodetheme', GetWeatherTheme(CurrentWeatherCode, isDay)) + sendThemeToAndroid(GetWeatherTheme(CurrentWeatherCode, 1)) + + document.getElementById('temPDiscCurrentLocation').innerHTML = `${CurrentTemperature}° • ${getWeatherLabelInLang(CurrentWeatherCode, isDay, localStorage.getItem('AppLanguageCode'))}` + + document.getElementById('currentSearchImg').src = `${GetWeatherIcon(CurrentWeatherCode, isDay)}`; + + + document.getElementById('humidity').innerHTML = CurrentHumidity + '%' + + document.getElementById('pressure_text_main').innerHTML = CurrentPressure; + document.getElementById('pressureMainUnit').innerHTML = pressureMainUnit; + + document.getElementById('windDirectionArrow').style.transform = `rotate(${CurrentWindDirection}deg)`; + + function getWindDirection(degree) { + if (degree >= 0 && degree <= 22.5 || degree > 337.5 && degree <= 360) return 'N'; + if (degree > 22.5 && degree <= 67.5) return 'NE'; + if (degree > 67.5 && degree <= 112.5) return 'E'; + if (degree > 112.5 && degree <= 157.5) return 'SE'; + if (degree > 157.5 && degree <= 202.5) return 'S'; + if (degree > 202.5 && degree <= 247.5) return 'SW'; + if (degree > 247.5 && degree <= 292.5) return 'W'; + if (degree > 292.5 && degree <= 337.5) return 'NW'; + } + + document.getElementById('directionWind').innerHTML = getWindDirection(CurrentWindDirection) + + + const windspeedType = document.getElementById('windtype'); + + if (data.wind_speed_10m < 1) { + windspeedType.innerHTML = getTranslationByLang(localStorage.getItem('AppLanguageCode'), 'calm'); + } else if (data.wind_speed_10m < 5) { + windspeedType.innerHTML = getTranslationByLang(localStorage.getItem('AppLanguageCode'), 'light_air'); + } else if (data.wind_speed_10m < 11) { + windspeedType.innerHTML = getTranslationByLang(localStorage.getItem('AppLanguageCode'), 'light_breeze'); + } else if (data.wind_speed_10m < 19) { + windspeedType.innerHTML = getTranslationByLang(localStorage.getItem('AppLanguageCode'), 'gentle_breeze'); + } else if (data.wind_speed_10m < 28) { + windspeedType.innerHTML = getTranslationByLang(localStorage.getItem('AppLanguageCode'), 'moderate_breeze'); + } else if (data.wind_speed_10m < 38) { + windspeedType.innerHTML = getTranslationByLang(localStorage.getItem('AppLanguageCode'), 'fresh_breeze'); + } else if (data.wind_speed_10m < 49) { + windspeedType.innerHTML = getTranslationByLang(localStorage.getItem('AppLanguageCode'), 'strong_breeze'); + } else if (data.wind_speed_10m < 61) { + windspeedType.innerHTML = getTranslationByLang(localStorage.getItem('AppLanguageCode'), 'high_wind'); + } else if (data.wind_speed_10m < 74) { + windspeedType.innerHTML = getTranslationByLang(localStorage.getItem('AppLanguageCode'), 'gale'); + } else if (data.wind_speed_10m < 88) { + windspeedType.innerHTML = getTranslationByLang(localStorage.getItem('AppLanguageCode'), 'strong_gale'); + } else if (data.wind_speed_10m < 102) { + windspeedType.innerHTML = getTranslationByLang(localStorage.getItem('AppLanguageCode'), 'storm'); + } else if (data.wind_speed_10m < 117) { + windspeedType.innerHTML = getTranslationByLang(localStorage.getItem('AppLanguageCode'), 'violent_storm'); + } else { + windspeedType.innerHTML = getTranslationByLang(localStorage.getItem('AppLanguageCode'), 'hurricane'); + } + + + if (data.pressure_msl < '980') { + document.getElementById('pressure_icon_svg').innerHTML = WidgetsPressure.LowPressure + } else if (data.pressure_msl > '980' && data.pressure_msl <= '1005') { + document.getElementById('pressure_icon_svg').innerHTML = WidgetsPressure.LowMedPressure + } else if (data.pressure_msl > '1005' && data.pressure_msl <= '1020') { + document.getElementById('pressure_icon_svg').innerHTML = WidgetsPressure.MediumPressure + } else if (data.pressure_msl > '1020' && data.pressure_msl <= '1035') { + document.getElementById('pressure_icon_svg').innerHTML = WidgetsPressure.HighPressure + } else if (data.pressure_msl > '1036') { + document.getElementById('pressure_icon_svg').innerHTML = WidgetsPressure.VeryHighPressure + } + + setTimeout(() => { + if (CurrentHumidity < 30) { + document.getElementById('humidity_icon_svg').innerHTML = WidgetsHumidity.Humidity_7; + } else if (CurrentHumidity >= 30 && CurrentHumidity < 50) { + document.getElementById('humidity_icon_svg').innerHTML = WidgetsHumidity.Humidity_30; + } else if (CurrentHumidity >= 50 && CurrentHumidity < 70) { + document.getElementById('humidity_icon_svg').innerHTML = WidgetsHumidity.Humidity_50; + } else if (CurrentHumidity >= 70 && CurrentHumidity < 90) { + document.getElementById('humidity_icon_svg').innerHTML = WidgetsHumidity.Humidity_70; + } else if (CurrentHumidity >= 90) { + document.getElementById('humidity_icon_svg').innerHTML = WidgetsHumidity.Humidity_90; + } else { + console.log('Error'); + } + }, 300); + + + const convertTo12Hour = (time) => { + const date = new Date(time); + return date.toLocaleTimeString([], { hour: '2-digit', minute: '2-digit', hour12: true }); + }; + + + const convertTo24Hour = (time) => { + const date = new Date(time); + return date.toLocaleTimeString([], { hour: '2-digit', minute: '2-digit', hour12: false }); + }; + + + function calculateTimeDifference(targetTime) { + const now = new Date(data.time); + const targetDate = new Date(targetTime); + + + const diffInMilliseconds = targetDate - now; + + + return Math.round(diffInMilliseconds / 60000); + } + + const diffToSunrise = calculateTimeDifference(sunrise); + const diffToSunset = calculateTimeDifference(sunset); + + + + + + if (timeFormat === '24 hour') { + document.getElementById('sunrise').innerHTML = convertTo24Hour(sunrise) + document.getElementById('sunset').innerHTML = convertTo24Hour(sunset) + } else{ + document.getElementById('sunrise').innerHTML = convertTo12Hour(sunrise) + document.getElementById('sunset').innerHTML = convertTo12Hour(sunset) + } + + + + + if (diffToSunrise <= 40 && diffToSunrise >= 0) { + document.getElementById('sunrise_insight').hidden = false; + document.getElementById('sunrise_insight').classList.add('insights_item') + + document.getElementById('scroll-indicators').innerHTML = '' + setTimeout(()=>{ + document.querySelector('.insights').scrollLeft = 0 + + createScrollDots() + }, 1500); + + } else{ + document.getElementById('sunrise_insight').hidden = true; + document.getElementById('sunrise_insight').classList.remove('insights_item') + + } + + if (diffToSunset <= 40 && diffToSunset >= 0) { + document.getElementById('sunset_insight').hidden = false; + document.getElementById('sunset_insight').classList.add('insights_item') + + document.getElementById('scroll-indicators').innerHTML = '' + setTimeout(()=>{ + document.querySelector('.insights').scrollLeft = 0 + + createScrollDots() + }, 1500); + + } else{ + document.getElementById('sunset_insight').hidden = true; + document.getElementById('sunset_insight').classList.remove('insights_item') + + } + + + const now = new Date(data.time); + const lastUpdated = new Date(data.time); + const minutesAgo = Math.floor((now - lastUpdated) / 60000); + +document.getElementById('last_updated').innerHTML = '' + +setTimeout(()=>{ + if (minutesAgo > 1) { + document.getElementById('last_updated').innerHTML = `Updated ${minutesAgo} mins ago`; + } else if (minutesAgo < 1) { + document.getElementById('last_updated').innerHTML = getTranslationByLang(localStorage.getItem('AppLanguageCode'), 'updated_just_now');; + } else { + document.getElementById('last_updated').innerHTML = `Updated ${minutesAgo} min ago`; + } +}, 300) + + + + +const calculateDaylightPercentage = (sunrise, sunset, nowTime) => { + const now = new Date(nowTime); + const sunriseTime = new Date(sunrise); + const sunsetTime = new Date(sunset); + + if (now < sunriseTime) return 0; + if (now > sunsetTime) return 100; + + const totalDaylight = sunsetTime - sunriseTime; + + const timeSinceSunrise = now - sunriseTime; + + return (timeSinceSunrise / totalDaylight) * 100; +}; + +const percentageOfDaylight = Math.round(calculateDaylightPercentage(sunrise, sunset, data.time)); + + if (percentageOfDaylight > 1 && percentageOfDaylight <= 10) { + moveSun(10) + } else if (percentageOfDaylight > 10 && percentageOfDaylight <= 20) { + moveSun(20) + } else if (percentageOfDaylight > 20 && percentageOfDaylight <= 30) { + moveSun(30) + } else if (percentageOfDaylight > 30 && percentageOfDaylight <= 40) { + moveSun(40) + } else if (percentageOfDaylight > 40 && percentageOfDaylight <= 50) { + moveSun(50) + } else if (percentageOfDaylight > 50 && percentageOfDaylight <= 60) { + moveSun(60) + } else if (percentageOfDaylight > 60 && percentageOfDaylight <= 70) { + moveSun(70) + } else if (percentageOfDaylight > 70 && percentageOfDaylight <= 80) { + moveSun(80) + } else if (percentageOfDaylight > 80 && percentageOfDaylight <= 90) { + moveSun(90) + } else if (percentageOfDaylight > 90 && percentageOfDaylight <= 100) { + moveSun(100) + } + + + const temperatureCLoths = Math.round(data.temperature_2m); + + function getClothingRecommendation(temp) { + if (temp <= 0) { + return "❄️ Freezing temperatures! Wear a heavy coat, gloves, a hat, and a scarf to stay warm."; + } else if (temp <= 5) { + return "🧥 Very cold! Wear a thick coat, a hat, and gloves to keep warm."; + } else if (temp <= 10) { + return "🧣 Cold weather. A coat and a sweater will keep you comfortable."; + } else if (temp <= 15) { + return "🧥 Cool temperatures. Wear a light jacket and long sleeves."; + } else if (temp <= 20) { + return "🌤️ Mild weather. A light jacket or a sweater should be enough."; + } else if (temp <= 25) { + return "👕 Warm day. A t-shirt and jeans or pants are suitable."; + } else if (temp <= 30) { + return "☀️ Hot! Opt for a t-shirt and light pants or shorts."; + } else if (temp <= 35) { + return "🌞 Very hot. Wear light, breathable clothing and stay hydrated."; + } else if (temp <= 40) { + return "🔥 Extreme heat! Wear very light clothing, stay hydrated, and avoid direct sun exposure."; + } else if (temp <= 45) { + return "⚠️ Dangerously hot! Wear minimal clothing, stay indoors if possible, and drink plenty of water."; + } else { + return "🚨 Extreme heat alert! Wear minimal clothing, stay indoors, and drink plenty of water to stay safe."; + } + } + + + + const recommendation = getClothingRecommendation(temperatureCLoths) + + document.getElementById('cloth_recommended').textContent = getTranslationByLang(localStorage.getItem('AppLanguageCode'), recommendation) + +} + + + +// air quality + + +function AirQuaility(data) { + + const aqi = data.current.us_aqi + // const + + + let aqiCategory; + + if (aqi <= 50) { + aqiCategory = 1; + } else if (aqi <= 100) { + aqiCategory = 2; + } else if (aqi <= 150) { + aqiCategory = 3; + } else if (aqi <= 200) { + aqiCategory = 4; + } else { + aqiCategory = 5; + } + + document.getElementById('aqi-level-value').innerHTML = aqi + + document.getElementById('pm25_air').innerHTML = Math.round(data.current.pm2_5); + document.getElementById('pm25_air_color').style.backgroundColor = getColor(Math.round(data.current.pm2_5), 'PM2.5'); + + + document.getElementById('pm10_air').innerHTML = Math.round(data.current.pm10); + document.getElementById('pm10_air_color').style.backgroundColor = getColor(Math.round(data.current.pm10), 'PM10'); + + + document.getElementById('CO_air').innerHTML = Math.round(data.current.carbon_monoxide); + document.getElementById('CO_air_color').style.backgroundColor = getColor(Math.round(data.current.carbon_monoxide), 'CO'); + + + document.getElementById('NO2_air').innerHTML = Math.round(data.current.nitrogen_dioxide); + document.getElementById('NO2_air_color').style.backgroundColor = getColor(Math.round(data.current.nitrogen_dioxide), 'NO2'); + + + document.getElementById('SO2_air').innerHTML = Math.round(data.current.sulphur_dioxide); + document.getElementById('SO2_air_color').style.backgroundColor = getColor(Math.round(data.current.sulphur_dioxide), 'SO2'); + + document.getElementById('O3_air').innerHTML = Math.round(data.current.ozone); + document.getElementById('O3_air_color').style.backgroundColor = getColor(Math.round(data.current.ozone), 'O3'); + + + + const aqiData = aqiText[aqiCategory]; + + const langCode = localStorage.getItem('AppLanguageCode'); + + const levelTranslation = getTranslationByLang(langCode, aqiData.level); + const messageTranslation = getTranslationByLang(langCode, aqiData.message); + + document.getElementById('aqi-level').textContent = levelTranslation; + document.getElementById('detail_air').textContent = messageTranslation; + + + const backgroundImage = { + 1: 'air-pop-imgs/good.png', + 2: 'air-pop-imgs/fair.png', + 3: 'air-pop-imgs/moderate.png', + 4: 'air-pop-imgs/poor.png', + 5: 'air-pop-imgs/very_poor.png' + }; + + const backgroundColor = { + 1: '#43b710', + 2: '#eaaf10', + 3: '#eb8a11', + 4: '#e83f0f', + 5: '#8e3acf' + } + + + document.getElementById('aqi_img').src = backgroundImage[aqiCategory]; + document.getElementById('aqi-level').style.backgroundColor = backgroundColor[aqiCategory]; +} + + +function getColor(value, type) { + switch (type) { + case 'CO': + if (value <= 4.4) return '#20fc03'; + if (value <= 9.0) return 'yellow'; + if (value <= 15.0) return 'orange'; + if (value <= 30.0) return '#fc606d'; + if (value <= 45.0) return '#9000ff'; + return 'maroon'; + case 'NH3': + if (value <= 5) return '#20fc03'; + if (value <= 15) return 'yellow'; + if (value <= 25) return 'orange'; + if (value <= 35) return '#fc606d'; + if (value <= 50) return '#9000ff'; + return 'maroon'; + case 'CO': + if (value <= 500) return '#20fc03'; + if (value <= 1000) return 'yellow'; + if (value <= 1500) return 'orange'; + if (value <= 2000) return '#fc606d'; + if (value <= 5000) return '#9000ff'; + return 'maroon'; + case 'NO2': + if (value <= 40) return '#20fc03'; + if (value <= 100) return 'yellow'; + if (value <= 200) return 'orange'; + if (value <= 300) return '#fc606d'; + if (value <= 500) return '#9000ff'; + return 'maroon'; + case 'O3': + if (value <= 100) return '#20fc03'; + if (value <= 180) return 'yellow'; + if (value <= 300) return 'orange'; + if (value <= 400) return '#fc606d'; + if (value <= 500) return '#9000ff'; + return 'maroon'; + case 'PM2.5': + if (value <= 12) return '#20fc03'; + if (value <= 35) return 'yellow'; + if (value <= 55) return 'orange'; + if (value <= 150) return '#fc606d'; + if (value <= 250) return '#9000ff'; + return 'maroon'; + case 'PM10': + if (value <= 20) return '#20fc03'; + if (value <= 50) return 'yellow'; + if (value <= 100) return 'orange'; + if (value <= 150) return '#fc606d'; + if (value <= 250) return '#9000ff'; + return 'maroon'; + case 'SO2': + if (value <= 50) return '#20fc03'; + if (value <= 150) return 'yellow'; + if (value <= 250) return 'orange'; + if (value <= 500) return '#fc606d'; + if (value <= 1000) return '#9000ff'; + return 'maroon'; + default: + return 'white'; + } +} + + +// uv index + + +function UvIndex(latitude, longitude) { + const url = `https://currentuvindex.com/api/v1/uvi?latitude=${latitude}&longitude=${longitude}`; + const option = { method: 'GET', headers: { Accept: 'application/json' } }; + + fetch(url, option) + .then(response => { + if (!response.ok) { + throw new Error(`HTTP error! Status: ${response.status}`); + } + return response.json(); + }) + .then(data => { + const now = data.now; + const uvIndex = now.uvi; + + + if (uvIndex >= 0 && uvIndex <= 1) { + document.getElementById('uv-index').innerHTML = getTranslationByLang(localStorage.getItem('AppLanguageCode'), 'minimal_risk'); + document.getElementById('uv-index').style = 'background-color: #43b710'; + document.getElementById('uv_img').src = 'uv-images/uv-0.png'; + document.getElementById('detail_uv').innerHTML = getTranslationByLang(localStorage.getItem('AppLanguageCode'), 'uv_index_satisfactory') + } else if (uvIndex > 1 && uvIndex <= 2) { + document.getElementById('uv-index').innerHTML = getTranslationByLang(localStorage.getItem('AppLanguageCode'), 'low_risk'); + document.getElementById('uv-index').style = 'background-color: #43b710'; + document.getElementById('uv_img').src = 'uv-images/uv-1.png'; + document.getElementById('detail_uv').innerHTML = getTranslationByLang(localStorage.getItem('AppLanguageCode'), 'conditions_low_risk') + } else if (uvIndex > 2 && uvIndex <= 3) { + document.getElementById('uv-index').innerHTML = getTranslationByLang(localStorage.getItem('AppLanguageCode'), 'low_risk'); + document.getElementById('uv-index').style = 'background-color: #43b710'; + document.getElementById('uv_img').src = 'uv-images/uv-2.png'; + document.getElementById('detail_uv').innerHTML = getTranslationByLang(localStorage.getItem('AppLanguageCode'), 'low_exposure_level') + } else if (uvIndex > 3 && uvIndex <= 4) { + document.getElementById('uv-index').innerHTML = getTranslationByLang(localStorage.getItem('AppLanguageCode'), 'moderate_risk'); + document.getElementById('uv-index').style = 'background-color: #eaaf10'; + document.getElementById('uv_img').src = 'uv-images/uv-3.png'; + document.getElementById('detail_uv').innerHTML = getTranslationByLang(localStorage.getItem('AppLanguageCode'), 'moderate_risk_sun_exposure') + } else if (uvIndex > 4 && uvIndex <= 5) { + document.getElementById('uv-index').innerHTML = getTranslationByLang(localStorage.getItem('AppLanguageCode'), 'moderate_risk'); + document.getElementById('uv-index').style = 'background-color: #eaaf10'; + document.getElementById('uv_img').src = 'uv-images/uv-4.png'; + document.getElementById('detail_uv').innerHTML = getTranslationByLang(localStorage.getItem('AppLanguageCode'), 'moderate_risk_sun_exposure') + } else if (uvIndex > 5 && uvIndex <= 6) { + document.getElementById('uv-index').innerHTML = getTranslationByLang(localStorage.getItem('AppLanguageCode'), 'moderate_risk'); + document.getElementById('uv-index').style = 'background-color: #eaaf10'; + document.getElementById('uv_img').src = 'uv-images/uv-5.png'; + document.getElementById('detail_uv').innerHTML = getTranslationByLang(localStorage.getItem('AppLanguageCode'), 'moderate_risk_sun_exposure') + } else if (uvIndex > 6 && uvIndex <= 7) { + document.getElementById('uv-index').innerHTML = getTranslationByLang(localStorage.getItem('AppLanguageCode'), 'high_risk'); + document.getElementById('uv-index').style = 'background-color: #eb8a11'; + document.getElementById('uv_img').src = 'uv-images/uv-6.png'; + document.getElementById('detail_uv').innerHTML = getTranslationByLang(localStorage.getItem('AppLanguageCode'), 'high_risk_sun_exposure') + } else if (uvIndex > 7 && uvIndex <= 8) { + document.getElementById('uv-index').innerHTML = getTranslationByLang(localStorage.getItem('AppLanguageCode'), 'high_risk'); + document.getElementById('uv-index').style = 'background-color: #eb8a11'; + document.getElementById('uv_img').src = 'uv-images/uv-7.png'; + document.getElementById('detail_uv').innerHTML = getTranslationByLang(localStorage.getItem('AppLanguageCode'), 'high_risk_sun_exposure') + } else if (uvIndex > 8 && uvIndex <= 9) { + document.getElementById('uv-index').innerHTML = getTranslationByLang(localStorage.getItem('AppLanguageCode'), 'very_high_risk'); + document.getElementById('uv-index').style = 'background-color: #e83f0f'; + document.getElementById('uv_img').src = 'uv-images/uv-8.png'; + document.getElementById('detail_uv').innerHTML = getTranslationByLang(localStorage.getItem('AppLanguageCode'), 'very_high_risk_sun_exposure') + } else if (uvIndex > 9 && uvIndex <= 10) { + document.getElementById('uv-index').innerHTML = getTranslationByLang(localStorage.getItem('AppLanguageCode'), 'very_high_risk'); + document.getElementById('uv-index').style = 'background-color: #e83f0f'; + document.getElementById('uv_img').src = 'uv-images/uv-9.png'; + document.getElementById('detail_uv').innerHTML = getTranslationByLang(localStorage.getItem('AppLanguageCode'), 'very_high_risk_sun_exposure') + } else if (uvIndex > 10 && uvIndex <= 11) { + document.getElementById('uv-index').innerHTML = getTranslationByLang(localStorage.getItem('AppLanguageCode'), 'very_high_risk'); + document.getElementById('uv-index').style = 'background-color: #e83f0f'; + document.getElementById('uv_img').src = 'uv-images/uv-10.png'; + document.getElementById('detail_uv').innerHTML = getTranslationByLang(localStorage.getItem('AppLanguageCode'), 'very_high_risk_sun_exposure') + } else if (uvIndex > 11 && uvIndex <= 12) { + document.getElementById('uv-index').innerHTML = getTranslationByLang(localStorage.getItem('AppLanguageCode'), 'extreme_risk'); + document.getElementById('uv-index').style = 'background-color: #8e3acf'; + document.getElementById('uv_img').src = 'uv-images/uv-11.png'; + document.getElementById('detail_uv').innerHTML = getTranslationByLang(localStorage.getItem('AppLanguageCode'), 'extreme_risk_sun_exposure') + } else if (uvIndex > 12 && uvIndex <= 13) { + document.getElementById('uv-index').innerHTML = getTranslationByLang(localStorage.getItem('AppLanguageCode'), 'extreme_risk'); + document.getElementById('uv-index').style = 'background-color: #ec0c8b'; + document.getElementById('uv_img').src = 'uv-images/uv-12.png'; + document.getElementById('detail_uv').innerHTML = getTranslationByLang(localStorage.getItem('AppLanguageCode'), 'extreme_risk_sun_exposure') + } else if (uvIndex > 13) { + document.getElementById('uv-index').innerHTML = getTranslationByLang(localStorage.getItem('AppLanguageCode'), 'extreme_risk'); + document.getElementById('uv-index').style = 'background-color: #550ef9'; + document.getElementById('uv_img').src = 'uv-images/uv-13.png'; + document.getElementById('detail_uv').innerHTML = getTranslationByLang(localStorage.getItem('AppLanguageCode'), 'extreme_risk_sun_exposure') + } + + + }) + +} + + +function MoreDetails(latSum, lonSum) { + fetch(`https://api.weatherapi.com/v1/forecast.json?key=ef2cb48d90984d828a8140518240209&q=${latSum},${lonSum}`) + .then(response => response.json()) + .then(data => { + + const mainData = data.forecast.forecastday[0].day + + + + const weatherCondition = mainData.condition.text; + const precipitation = mainData.totalprecip_in; + const humidity = mainData.avghumidity; + + let willRain + + if(mainData.daily_will_it_rain > 0){ + willRain = 'rain is' + } else{ + willRain = 'no rain is' + } + + let maxTemp + + if (SelectedTempUnit === 'fahrenheit') { + maxTemp = Math.round(mainData.maxtemp_c * 9 / 5 + 32) + } else { + maxTemp = Math.round(mainData.maxtemp_c) + } + + let minTemp + + if (SelectedTempUnit === 'fahrenheit') { + minTemp = Math.round(mainData.mintemp_c * 9 / 5 + 32) + } else { + minTemp = Math.round(mainData.mintemp_c) + } + + let Precipitation; + + if (SelectedPrecipitationUnit === 'in') { + Precipitation = mainData.totalprecip_in.toFixed(2) + ' inches'; + } else { + Precipitation = inchesToMm(mainData.totalprecip_in).toFixed(1) + ' millimetres' + } + + + const weatherSummary = `${weatherCondition} and ${willRain} expected for today. 🌡️ The daytime temperature will reach ${maxTemp}°, and it will dip to ${minTemp}° at night. 🌧️ We expect around ${Precipitation} of precipitation, with humidity levels around ${humidity}%.`; + + let weatherTips = ""; + + const hotWeatherTips = [ + "🔥 It's going to be hot today! Stay hydrated and wear light, breathable clothing.", + "🥵 High temperatures ahead! Drink plenty of water and avoid the sun during peak hours.", + "☀️ The heat is on! Wear a hat and stay in the shade as much as possible." + ]; + + const chillyWeatherTips = [ + "🧥 It's going to be a bit chilly. Consider wearing a jacket if you're heading out.", + "🥶 Brr! It's cold today, so bundle up before heading out.", + "🌬️ The temperature is lower today, keep yourself warm with layers." + ]; + + const rainTips = [ + "☔ There's a chance of rain. Don't forget to carry an umbrella or raincoat.", + "🌧️ Wet weather ahead! Be sure to stay dry with waterproof gear.", + "🌂 Expect rain showers today. Make sure to keep your umbrella handy." + ]; + + const sunnyTips = [ + "🌞 Enjoy the sunshine! Remember to apply sunscreen if you're spending time outdoors.", + "😎 It's sunny out there! Perfect day for outdoor activities, but don't forget your sunglasses.", + "☀️ Bright and sunny! Keep hydrated and protect yourself from the sun." + ]; + + const snowTips = [ + "❄️ Snow is expected, so dress warmly and drive carefully.", + "🌨️ Heavy snow is on its way! Prepare for slippery roads and reduced visibility.", + "⛄ Snowy day ahead! A great time for winter fun, but stay safe on the roads." + ]; + + const cloudyWeatherTips = [ + "☁️ It's a cloudy day. Might be a good idea to carry a light jacket just in case.", + "🌥️ Overcast skies today. Perfect weather for a cozy indoor day or a walk in the park.", + "🌫️ Cloudy conditions ahead. Visibility might be reduced, so drive carefully." + ]; + + const fogTips = [ + "🌫️ Foggy conditions ahead. Reduce your speed and use low-beam headlights when driving.", + "👁️‍🗨️ Visibility will be reduced due to fog. Be cautious on the road.", + "🚶‍♂️ Foggy weather today. If you're walking or biking, wear bright, reflective clothing." + ]; + + const windTips = [ + "💨 It's going to be windy today. Secure loose objects outdoors and be cautious when driving.", + "🌬️ Strong winds ahead! Hold onto your hat and be aware of flying debris.", + "🌀 Windy day ahead. If you're outdoors, take care of gusty conditions, especially near tall structures." + ]; + + const thunderstormTips = [ + "⛈️ Thunderstorms expected. Stay indoors and avoid being near tall objects or open fields.", + "⚡ There's a risk of thunderstorms. Unplug sensitive electronics to avoid damage from lightning.", + "🌩️ Stormy weather today! Avoid driving during heavy rain and stay safe indoors." + ]; + + if (maxTemp > 29) { + weatherTips += hotWeatherTips[Math.floor(Math.random() * hotWeatherTips.length)] + " "; + } else if (maxTemp < 19) { + weatherTips += chillyWeatherTips[Math.floor(Math.random() * chillyWeatherTips.length)] + " "; + } + + if (precipitation > 0) { + weatherTips += rainTips[Math.floor(Math.random() * rainTips.length)] + " "; + } + + if (weatherCondition.toLowerCase().includes("rain")) { + weatherTips += "🚗 Be cautious of slippery roads if you're driving. "; + } else if (weatherCondition.toLowerCase().includes("sunny")) { + weatherTips += sunnyTips[Math.floor(Math.random() * sunnyTips.length)] + " "; + } else if (weatherCondition.toLowerCase().includes("snow")) { + weatherTips += snowTips[Math.floor(Math.random() * snowTips.length)] + " "; + } else if (weatherCondition.toLowerCase().includes("cloudy") || weatherCondition.toLowerCase().includes("cloud") || weatherCondition.toLowerCase().includes("overcast")) { + weatherTips += cloudyWeatherTips[Math.floor(Math.random() * cloudyWeatherTips.length)] + " "; + } else if (weatherCondition.toLowerCase().includes("fog")) { + weatherTips += fogTips[Math.floor(Math.random() * fogTips.length)] + " "; + } else if (weatherCondition.toLowerCase().includes("wind")) { + weatherTips += windTips[Math.floor(Math.random() * windTips.length)] + " "; + } else if (weatherCondition.toLowerCase().includes("thunder")) { + weatherTips += thunderstormTips[Math.floor(Math.random() * thunderstormTips.length)] + " "; + } + + document.getElementById('summeryDay').innerHTML = `
  • ${weatherSummary}
  • ` + document.getElementById('day_tips').innerHTML = `
  • ${weatherTips}
  • ` + + + + }) + + + + +} + +function astronomyData(latSum, lonSum) { + fetch(`https://api.weatherapi.com/v1/astronomy.json?key=ef2cb48d90984d828a8140518240209&q=${latSum},${lonSum}`) + .then(response => response.json()) + .then(data => { + + + const MoonPhaseName = data.astronomy.astro.moon_phase + const moonillumination = Math.round(data.astronomy.astro.moon_illumination) + + if (MoonPhaseName.includes("New Moon")) { + document.querySelector('moonPhaseProgress').style.right = moonillumination + '%' + } else if (MoonPhaseName.includes("Waxing Crescent")) { + document.querySelector('moonPhaseProgress').style.right = moonillumination + '%' + } else if (MoonPhaseName.includes("First Quarter")) { + document.querySelector('moonPhaseProgress').style.right = moonillumination + '%' + document.querySelector('moonPhaseProgress').style.borderRadius = '0%' + } else if (MoonPhaseName.includes("Waxing Gibbous")) { + document.querySelector('moonPhaseProgress').style.right = moonillumination + '%' + document.querySelector('moonPhaseProgress').style.borderRadius = '' + } else if (MoonPhaseName.includes("Full Moon")) { + document.querySelector('moonPhaseProgress').style.left = moonillumination + '%' + document.querySelector('moonPhaseProgress').style.borderRadius = '' + } else if (MoonPhaseName.includes("Waning Gibbous")) { + document.querySelector('moonPhaseProgress').style.left = moonillumination + '%' + document.querySelector('moonPhaseProgress').style.borderRadius = '' + } else if (MoonPhaseName.includes("Last Quarter")) { + document.querySelector('moonPhaseProgress').style.left = moonillumination + '%' + document.querySelector('moonPhaseProgress').style.borderRadius = '0%' + } else if (MoonPhaseName.includes("Waning Crescent")) { + document.querySelector('moonPhaseProgress').style.left = moonillumination + '%' + document.querySelector('moonPhaseProgress').style.borderRadius = '' + } + + document.getElementById('moonIlli').innerHTML = moonillumination +'%' + + + document.getElementById('moonPhase_name').innerHTML = MoonPhaseName + + function convertTo24Hour(time) { + const [timePart, modifier] = time.split(' '); + let [hours, minutes] = timePart.split(':'); + + if (hours === '12') { + hours = '00'; + } + + if (modifier === 'PM') { + hours = parseInt(hours, 10) + 12; + } + + return `${hours}:${minutes}`; + } + + + + if (timeFormat === '24 hour') { + document.getElementById('moonriseTime').innerHTML = convertTo24Hour(data.astronomy.astro.moonrise); + document.getElementById('moonSetTime').innerHTML = convertTo24Hour(data.astronomy.astro.moonset); + } else{ + document.getElementById('moonriseTime').innerHTML = data.astronomy.astro.moonrise; + document.getElementById('moonSetTime').innerHTML = data.astronomy.astro.moonset; + } + + + }) + +} + + +let currentApiKeyAlertsIndex = 0; + +function FetchAlert(lat, lon){ + + +const apiKeyAlerts = apiKeysAlerts[currentApiKeyAlertsIndex]; +const apiUrlAlerts = `https://api.openweathermap.org/data/2.5/onecall?lat=${lat}&lon=${lon}&exclude=current,minutely,hourly,daily&appid=${apiKeyAlerts}`; + +fetch(apiUrlAlerts) + .then(response => { + if (!response.ok) { + throw new Error('Network response was not ok'); + } + return response.json(); + }) + .then(data => { + if (data.alerts) { + console.log(data.alerts); + const alertEvent = data.alerts[0].event; + + document.querySelector('.weatherCommentsDiv').classList.add('alertOpened'); + document.querySelector('.excessiveHeat').hidden = false; + localStorage.setItem('AlertCache', JSON.stringify(data.alerts)); + + } else { + console.log('No alerts'); + document.querySelector('.weatherCommentsDiv').classList.remove('alertOpened'); + document.querySelector('.excessiveHeat').hidden = true; + localStorage.removeItem('AlertCache', JSON.stringify(data.alerts)); + + } + }) + .catch(error => { + console.error('Error fetching weather alerts:', error); + if (currentApiKeyAlertsIndex < apiKeysAlerts.length - 1) { + currentApiKeyAlertsIndex++; + console.log(`Switching to API key index ${currentApiKeyAlertsIndex} for alerts`); + FetchAlert(lat, lon); + } else { + console.error('All alert API keys failed. Unable to fetch data.'); + } + }); +} + +function clickForecastItem(index){ + localStorage.setItem('ClickedForecastItem', index) +} + + const AppLanguageCodeValue = localStorage.getItem('AppLanguageCode'); + if (AppLanguageCodeValue) { + applyTranslations(AppLanguageCodeValue); + + } + + // --------- + + function getOpenWeatherMainTemp(){ + + const mainTempProviderGet = localStorage.getItem('CustomApiKey') + const mainTempProviderValid = localStorage.getItem('ApiKeyValid') + const mainTempProvider = localStorage.getItem('MainTempProvider'); + + setTimeout(()=>{ + if(mainTempProviderValid && mainTempProviderValid === 'Yes'){ + if(mainTempProvider && mainTempProvider === 'OpenWeatherMap'){ + fetch(`https://api.openweathermap.org/data/2.5/weather?lat=${localStorage.getItem('currentLat')}&lon=${localStorage.getItem('currentLong')}&units=metric&appid=${mainTempProviderGet}`) + .then(response => response.json()) + .then(data => { + let CurrentTemperature; + + if (SelectedTempUnit === 'fahrenheit') { + CurrentTemperature = Math.round(celsiusToFahrenheit(data.main.temp)) + } else { + CurrentTemperature = Math.round(data.main.temp) + } + + if (CurrentTemperature < 10 && CurrentTemperature >= 0) { + CurrentTemperature = '0' + CurrentTemperature; + } + + document.getElementById('temp').innerHTML = CurrentTemperature + '°'; + + }) + } + } + }, 300); + } \ No newline at end of file diff --git a/app/src/main/assets/bundle.js b/app/src/main/assets/bundle.js new file mode 100644 index 000000000..1480a780c --- /dev/null +++ b/app/src/main/assets/bundle.js @@ -0,0 +1,13402 @@ +/****************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ +/* global Reflect, Promise, SuppressedError, Symbol */ + + +function __decorate(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +} + +typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { + var e = new Error(message); + return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; +}; + +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +const t$3=t=>(e,o)=>{void 0!==o?o.addInitializer((()=>{customElements.define(t,e);})):customElements.define(t,e);}; + +/** + * @license + * Copyright 2019 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +const t$2=globalThis,e$8=t$2.ShadowRoot&&(void 0===t$2.ShadyCSS||t$2.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s$3=Symbol(),o$7=new WeakMap;let n$7 = class n{constructor(t,e,o){if(this._$cssResult$=!0,o!==s$3)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e;}get styleSheet(){let t=this.o;const s=this.t;if(e$8&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=o$7.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&o$7.set(s,t));}return t}toString(){return this.cssText}};const r$7=t=>new n$7("string"==typeof t?t:t+"",void 0,s$3),i$4=(t,...e)=>{const o=1===t.length?t[0]:e.reduce(((e,s,o)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+t[o+1]),t[0]);return new n$7(o,t,s$3)},S$1=(s,o)=>{if(e$8)s.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const e of o){const o=document.createElement("style"),n=t$2.litNonce;void 0!==n&&o.setAttribute("nonce",n),o.textContent=e.cssText,s.appendChild(o);}},c$2=e$8?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return r$7(e)})(t):t; + +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */const{is:i$3,defineProperty:e$7,getOwnPropertyDescriptor:r$6,getOwnPropertyNames:h$1,getOwnPropertySymbols:o$6,getPrototypeOf:n$6}=Object,a$2=globalThis,c$1=a$2.trustedTypes,l$3=c$1?c$1.emptyScript:"",p$1=a$2.reactiveElementPolyfillSupport,d$1=(t,s)=>t,u$2={toAttribute(t,s){switch(s){case Boolean:t=t?l$3:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t);}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t);}catch(t){i=null;}}return i}},f$2=(t,s)=>!i$3(t,s),y$1={attribute:!0,type:String,converter:u$2,reflect:!1,hasChanged:f$2};Symbol.metadata??=Symbol("metadata"),a$2.litPropertyMetadata??=new WeakMap;class b extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t);}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=y$1){if(s.state&&(s.attribute=!1),this._$Ei(),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),r=this.getPropertyDescriptor(t,i,s);void 0!==r&&e$7(this.prototype,t,r);}}static getPropertyDescriptor(t,s,i){const{get:e,set:h}=r$6(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t;}};return {get(){return e?.call(this)},set(s){const r=e?.call(this);h.call(this,s),this.requestUpdate(t,r,i);},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??y$1}static _$Ei(){if(this.hasOwnProperty(d$1("elementProperties")))return;const t=n$6(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties);}static finalize(){if(this.hasOwnProperty(d$1("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(d$1("properties"))){const t=this.properties,s=[...h$1(t),...o$6(t)];for(const i of s)this.createProperty(i,t[i]);}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,i]of s)this.elementProperties.set(t,i);}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);void 0!==i&&this._$Eh.set(i,t);}this.elementStyles=this.finalizeStyles(this.styles);}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift(c$2(s));}else void 0!==s&&i.push(c$2(s));return i}static _$Eu(t,s){const i=s.attribute;return !1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev();}_$Ev(){this._$Eg=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)));}addController(t){(this._$ES??=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.();}removeController(t){this._$ES?.splice(this._$ES.indexOf(t)>>>0,1);}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t);}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return S$1(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$ES?.forEach((t=>t.hostConnected?.()));}enableUpdating(t){}disconnectedCallback(){this._$ES?.forEach((t=>t.hostDisconnected?.()));}attributeChangedCallback(t,s,i){this._$AK(t,i);}_$EO(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(void 0!==e&&!0===i.reflect){const r=(void 0!==i.converter?.toAttribute?i.converter:u$2).toAttribute(s,i.type);this._$Em=t,null==r?this.removeAttribute(e):this.setAttribute(e,r),this._$Em=null;}}_$AK(t,s){const i=this.constructor,e=i._$Eh.get(t);if(void 0!==e&&this._$Em!==e){const t=i.getPropertyOptions(e),r="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:u$2;this._$Em=e,this[e]=r.fromAttribute(s,t.type),this._$Em=null;}}requestUpdate(t,s,i,e=!1,r){if(void 0!==t){if(i??=this.constructor.getPropertyOptions(t),!(i.hasChanged??f$2)(e?r:this[t],s))return;this.C(t,s,i);}!1===this.isUpdatePending&&(this._$Eg=this._$EP());}C(t,s,i){this._$AL.has(t)||this._$AL.set(t,s),!0===i.reflect&&this._$Em!==t&&(this._$Ej??=new Set).add(t);}async _$EP(){this.isUpdatePending=!0;try{await this._$Eg;}catch(t){Promise.reject(t);}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this._$Ep){for(const[t,s]of this._$Ep)this[t]=s;this._$Ep=void 0;}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,i]of t)!0!==i.wrapped||this._$AL.has(s)||void 0===this[s]||this.C(s,this[s],i);}let t=!1;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$ES?.forEach((t=>t.hostUpdate?.())),this.update(s)):this._$ET();}catch(s){throw t=!1,this._$ET(),s}t&&this._$AE(s);}willUpdate(t){}_$AE(t){this._$ES?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t);}_$ET(){this._$AL=new Map,this.isUpdatePending=!1;}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Eg}shouldUpdate(t){return !0}update(t){this._$Ej&&=this._$Ej.forEach((t=>this._$EO(t,this[t]))),this._$ET();}updated(t){}firstUpdated(t){}}b.elementStyles=[],b.shadowRootOptions={mode:"open"},b[d$1("elementProperties")]=new Map,b[d$1("finalized")]=new Map,p$1?.({ReactiveElement:b}),(a$2.reactiveElementVersions??=[]).push("2.0.0"); + +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */const o$5={attribute:!0,type:String,converter:u$2,reflect:!1,hasChanged:f$2},r$5=(t=o$5,e,r)=>{const{kind:n,metadata:i}=r;let s=globalThis.litPropertyMetadata.get(i);if(void 0===s&&globalThis.litPropertyMetadata.set(i,s=new Map),s.set(r.name,t),"accessor"===n){const{name:o}=r;return {set(r){const n=e.get.call(this);e.set.call(this,r),this.requestUpdate(o,n,t);},init(e){return void 0!==e&&this.C(o,void 0,t),e}}}if("setter"===n){const{name:o}=r;return function(r){const n=this[o];e.call(this,r),this.requestUpdate(o,n,t);}}throw Error("Unsupported decorator location: "+n)};function n$5(t){return (e,o)=>"object"==typeof o?r$5(t,e,o):((t,e,o)=>{const r=e.hasOwnProperty(o);return e.constructor.createProperty(o,r?{...t,wrapped:!0}:t),r?Object.getOwnPropertyDescriptor(e,o):void 0})(t,e,o)} + +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */function r$4(r){return n$5({...r,state:!0,attribute:!1})} + +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +const e$6=(e,t,c)=>(c.configurable=!0,c.enumerable=!0,Reflect.decorate&&"object"!=typeof t&&Object.defineProperty(e,t,c),c); + +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */function e$5(e,r){return (n,s,i)=>{const o=t=>t.renderRoot?.querySelector(e)??null;return e$6(n,s,{get(){return o(this)}})}} + +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +let e$4;function r$3(r){return (n,o)=>e$6(n,o,{get(){return (this.renderRoot??(e$4??=document.createDocumentFragment())).querySelectorAll(r)}})} + +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +function r$2(r){return (n,e)=>e$6(n,e,{async get(){return await this.updateComplete,this.renderRoot?.querySelector(r)??null}})} + +/** + * @license + * Copyright 2021 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */function o$4(o){return (e,n)=>{const{slot:r,selector:s}=o??{},c="slot"+(r?`[name=${r}]`:":not([name])");return e$6(e,n,{get(){const t=this.renderRoot?.querySelector(c),e=t?.assignedElements(o)??[];return void 0===s?e:e.filter((t=>t.matches(s)))}})}} + +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */function n$4(n){return (o,r)=>{const{slot:e}=n??{},s="slot"+(e?`[name=${e}]`:":not([name])");return e$6(o,r,{get(){const t=this.renderRoot?.querySelector(s);return t?.assignedNodes(n)??[]}})}} + +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +const t$1=globalThis,i$2=t$1.trustedTypes,s$2=i$2?i$2.createPolicy("lit-html",{createHTML:t=>t}):void 0,e$3="$lit$",h=`lit$${(Math.random()+"").slice(9)}$`,o$3="?"+h,n$3=`<${o$3}>`,r$1=document,l$2=()=>r$1.createComment(""),c=t=>null===t||"object"!=typeof t&&"function"!=typeof t,a$1=Array.isArray,u$1=t=>a$1(t)||"function"==typeof t?.[Symbol.iterator],d="[ \t\n\f\r]",f$1=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,v=/-->/g,_=/>/g,m$1=RegExp(`>|${d}(?:([^\\s"'>=/]+)(${d}*=${d}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),p=/'/g,g=/"/g,$=/^(?:script|style|textarea|title)$/i,y=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),x=y(1),w=Symbol.for("lit-noChange"),T=Symbol.for("lit-nothing"),A=new WeakMap,E=r$1.createTreeWalker(r$1,129);function C(t,i){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==s$2?s$2.createHTML(i):i}const P=(t,i)=>{const s=t.length-1,o=[];let r,l=2===i?"":"",c=f$1;for(let i=0;i"===u[0]?(c=r??f$1,d=-1):void 0===u[1]?d=-2:(d=c.lastIndex-u[2].length,a=u[1],c=void 0===u[3]?m$1:'"'===u[3]?g:p):c===g||c===p?c=m$1:c===v||c===_?c=f$1:(c=m$1,r=void 0);const x=c===m$1&&t[i+1].startsWith("/>")?" ":"";l+=c===f$1?s+n$3:d>=0?(o.push(a),s.slice(0,d)+e$3+s.slice(d)+h+x):s+h+(-2===d?i:x);}return [C(t,l+(t[s]||"")+(2===i?"":"")),o]};class V{constructor({strings:t,_$litType$:s},n){let r;this.parts=[];let c=0,a=0;const u=t.length-1,d=this.parts,[f,v]=P(t,s);if(this.el=V.createElement(f,n),E.currentNode=this.el.content,2===s){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes);}for(;null!==(r=E.nextNode())&&d.length0){r.textContent=i$2?i$2.emptyScript:"";for(let i=0;i2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=T;}_$AI(t,i=this,s,e){const h=this.strings;let o=!1;if(void 0===h)t=N(this,t,i,0),o=!c(t)||t!==this._$AH&&t!==w,o&&(this._$AH=t);else {const e=t;let n,r;for(t=h[0],n=0;n{const e=s?.renderBefore??i;let h=e._$litPart$;if(void 0===h){const t=s?.renderBefore??null;e._$litPart$=h=new M(i.insertBefore(l$2(),t),t,void 0,s??{});}return h._$AI(t),h}; + +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */let s$1 = class s extends b{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0;}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const i=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=j(i,this.renderRoot,this.renderOptions);}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0);}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1);}render(){return w}};s$1._$litElement$=!0,s$1[("finalized")]=!0,globalThis.litElementHydrateSupport?.({LitElement:s$1});const r=globalThis.litElementPolyfillSupport;r?.({LitElement:s$1});(globalThis.litElementVersions??=[]).push("4.0.0"); + +/** + * @license + * Copyright 2022 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +const o$2=!1; + +/** + * @license + * Copyright 2022 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +/** + * A component for elevation. + */ +class Elevation extends s$1 { + connectedCallback() { + super.connectedCallback(); + // Needed for VoiceOver, which will create a "group" if the element is a + // sibling to other content. + this.setAttribute('aria-hidden', 'true'); + } + render() { + return x ``; + } +} + +/** + * @license + * Copyright 2024 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +// Generated stylesheet for ./elevation/internal/elevation-styles.css. +const styles$U = i$4 `:host,.shadow,.shadow::before,.shadow::after{border-radius:inherit;inset:0;position:absolute;transition-duration:inherit;transition-property:inherit;transition-timing-function:inherit}:host{display:flex;pointer-events:none;transition-property:box-shadow,opacity}.shadow::before,.shadow::after{content:"";transition-property:box-shadow,opacity;--_level: var(--md-elevation-level, 0);--_shadow-color: var(--md-elevation-shadow-color, var(--md-sys-color-shadow, #000))}.shadow::before{box-shadow:0px calc(1px*(clamp(0,var(--_level),1) + clamp(0,var(--_level) - 3,1) + 2*clamp(0,var(--_level) - 4,1))) calc(1px*(2*clamp(0,var(--_level),1) + clamp(0,var(--_level) - 2,1) + clamp(0,var(--_level) - 4,1))) 0px var(--_shadow-color);opacity:.3}.shadow::after{box-shadow:0px calc(1px*(clamp(0,var(--_level),1) + clamp(0,var(--_level) - 1,1) + 2*clamp(0,var(--_level) - 2,3))) calc(1px*(3*clamp(0,var(--_level),2) + 2*clamp(0,var(--_level) - 2,3))) calc(1px*(clamp(0,var(--_level),4) + 2*clamp(0,var(--_level) - 4,1))) var(--_shadow-color);opacity:.15} +`; + +/** + * @license + * Copyright 2022 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +/** + * The `` custom element with default styles. + * + * Elevation is the relative distance between two surfaces along the z-axis. + * + * @final + * @suppress {visibility} + */ +let MdElevation = class MdElevation extends Elevation { +}; +MdElevation.styles = [styles$U]; +MdElevation = __decorate([ + t$3('md-elevation') +], MdElevation); + +/** + * @license + * Copyright 2023 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +/** + * A key to retrieve an `Attachable` element's `AttachableController` from a + * global `MutationObserver`. + */ +const ATTACHABLE_CONTROLLER = Symbol('attachableController'); +let FOR_ATTRIBUTE_OBSERVER; +{ + /** + * A global `MutationObserver` that reacts to `for` attribute changes on + * `Attachable` elements. If the `for` attribute changes, the controller will + * re-attach to the new referenced element. + */ + FOR_ATTRIBUTE_OBSERVER = new MutationObserver((records) => { + for (const record of records) { + // When a control's `for` attribute changes, inform its + // `AttachableController` to update to a new control. + record.target[ATTACHABLE_CONTROLLER]?.hostConnected(); + } + }); +} +/** + * A controller that provides an implementation for `Attachable` elements. + * + * @example + * ```ts + * class MyElement extends LitElement implements Attachable { + * get control() { return this.attachableController.control; } + * + * private readonly attachableController = new AttachableController( + * this, + * (previousControl, newControl) => { + * previousControl?.removeEventListener('click', this.handleClick); + * newControl?.addEventListener('click', this.handleClick); + * } + * ); + * + * // Implement remaining `Attachable` properties/methods that call the + * // controller's properties/methods. + * } + * ``` + */ +class AttachableController { + get htmlFor() { + return this.host.getAttribute('for'); + } + set htmlFor(htmlFor) { + if (htmlFor === null) { + this.host.removeAttribute('for'); + } + else { + this.host.setAttribute('for', htmlFor); + } + } + get control() { + if (this.host.hasAttribute('for')) { + if (!this.htmlFor || !this.host.isConnected) { + return null; + } + return this.host.getRootNode().querySelector(`#${this.htmlFor}`); + } + return this.currentControl || this.host.parentElement; + } + set control(control) { + if (control) { + this.attach(control); + } + else { + this.detach(); + } + } + /** + * Creates a new controller for an `Attachable` element. + * + * @param host The `Attachable` element. + * @param onControlChange A callback with two parameters for the previous and + * next control. An `Attachable` element may perform setup or teardown + * logic whenever the control changes. + */ + constructor(host, onControlChange) { + this.host = host; + this.onControlChange = onControlChange; + this.currentControl = null; + host.addController(this); + host[ATTACHABLE_CONTROLLER] = this; + FOR_ATTRIBUTE_OBSERVER?.observe(host, { attributeFilter: ['for'] }); + } + attach(control) { + if (control === this.currentControl) { + return; + } + this.setCurrentControl(control); + // When imperatively attaching, remove the `for` attribute so + // that the attached control is used instead of a referenced one. + this.host.removeAttribute('for'); + } + detach() { + this.setCurrentControl(null); + // When imperatively detaching, add an empty `for=""` attribute. This will + // ensure the control is `null` rather than the `parentElement`. + this.host.setAttribute('for', ''); + } + /** @private */ + hostConnected() { + this.setCurrentControl(this.control); + } + /** @private */ + hostDisconnected() { + this.setCurrentControl(null); + } + setCurrentControl(control) { + this.onControlChange(this.currentControl, control); + this.currentControl = control; + } +} + +/** + * @license + * Copyright 2021 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +/** + * Events that the focus ring listens to. + */ +const EVENTS$1 = ['focusin', 'focusout', 'pointerdown']; +/** + * A focus ring component. + * + * @fires visibility-changed {Event} Fired whenever `visible` changes. + */ +class FocusRing extends s$1 { + constructor() { + super(...arguments); + /** + * Makes the focus ring visible. + */ + this.visible = false; + /** + * Makes the focus ring animate inwards instead of outwards. + */ + this.inward = false; + this.attachableController = new AttachableController(this, this.onControlChange.bind(this)); + } + get htmlFor() { + return this.attachableController.htmlFor; + } + set htmlFor(htmlFor) { + this.attachableController.htmlFor = htmlFor; + } + get control() { + return this.attachableController.control; + } + set control(control) { + this.attachableController.control = control; + } + attach(control) { + this.attachableController.attach(control); + } + detach() { + this.attachableController.detach(); + } + connectedCallback() { + super.connectedCallback(); + // Needed for VoiceOver, which will create a "group" if the element is a + // sibling to other content. + this.setAttribute('aria-hidden', 'true'); + } + /** @private */ + handleEvent(event) { + if (event[HANDLED_BY_FOCUS_RING]) { + // This ensures the focus ring does not activate when multiple focus rings + // are used within a single component. + return; + } + switch (event.type) { + default: + return; + case 'focusin': + this.visible = this.control?.matches(':focus-visible') ?? false; + break; + case 'focusout': + case 'pointerdown': + this.visible = false; + break; + } + event[HANDLED_BY_FOCUS_RING] = true; + } + onControlChange(prev, next) { + for (const event of EVENTS$1) { + prev?.removeEventListener(event, this); + next?.addEventListener(event, this); + } + } + update(changed) { + if (changed.has('visible')) { + // This logic can be removed once the `:has` selector has been introduced + // to Firefox. This is necessary to allow correct submenu styles. + this.dispatchEvent(new Event('visibility-changed')); + } + super.update(changed); + } +} +__decorate([ + n$5({ type: Boolean, reflect: true }) +], FocusRing.prototype, "visible", void 0); +__decorate([ + n$5({ type: Boolean, reflect: true }) +], FocusRing.prototype, "inward", void 0); +const HANDLED_BY_FOCUS_RING = Symbol('handledByFocusRing'); + +/** + * @license + * Copyright 2024 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +// Generated stylesheet for ./focus/internal/focus-ring-styles.css. +const styles$T = i$4 `:host{animation-delay:0s,calc(var(--md-focus-ring-duration, 600ms)*.25);animation-duration:calc(var(--md-focus-ring-duration, 600ms)*.25),calc(var(--md-focus-ring-duration, 600ms)*.75);animation-timing-function:cubic-bezier(0.2, 0, 0, 1);box-sizing:border-box;color:var(--md-focus-ring-color, var(--md-sys-color-secondary, #625b71));display:none;pointer-events:none;position:absolute}:host([visible]){display:flex}:host(:not([inward])){animation-name:outward-grow,outward-shrink;border-end-end-radius:calc(var(--md-focus-ring-shape-end-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));border-end-start-radius:calc(var(--md-focus-ring-shape-end-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));border-start-end-radius:calc(var(--md-focus-ring-shape-start-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));border-start-start-radius:calc(var(--md-focus-ring-shape-start-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));inset:calc(-1*var(--md-focus-ring-outward-offset, 2px));outline:var(--md-focus-ring-width, 3px) solid currentColor}:host([inward]){animation-name:inward-grow,inward-shrink;border-end-end-radius:calc(var(--md-focus-ring-shape-end-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border-end-start-radius:calc(var(--md-focus-ring-shape-end-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border-start-end-radius:calc(var(--md-focus-ring-shape-start-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border-start-start-radius:calc(var(--md-focus-ring-shape-start-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border:var(--md-focus-ring-width, 3px) solid currentColor;inset:var(--md-focus-ring-inward-offset, 0px)}@keyframes outward-grow{from{outline-width:0}to{outline-width:var(--md-focus-ring-active-width, 8px)}}@keyframes outward-shrink{from{outline-width:var(--md-focus-ring-active-width, 8px)}}@keyframes inward-grow{from{border-width:0}to{border-width:var(--md-focus-ring-active-width, 8px)}}@keyframes inward-shrink{from{border-width:var(--md-focus-ring-active-width, 8px)}}@media(prefers-reduced-motion){:host{animation:none}} +`; + +/** + * @license + * Copyright 2021 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +/** + * TODO(b/267336424): add docs + * + * @final + * @suppress {visibility} + */ +let MdFocusRing = class MdFocusRing extends FocusRing { +}; +MdFocusRing.styles = [styles$T]; +MdFocusRing = __decorate([ + t$3('md-focus-ring') +], MdFocusRing); + +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +const t={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},e$2=t=>(...e)=>({_$litDirective$:t,values:e});let i$1 = class i{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i;}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}; + +/** + * @license + * Copyright 2018 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */const e$1=e$2(class extends i$1{constructor(t$1){if(super(t$1),t$1.type!==t.ATTRIBUTE||"class"!==t$1.name||t$1.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return " "+Object.keys(t).filter((s=>t[s])).join(" ")+" "}update(s,[i]){if(void 0===this.it){this.it=new Set,void 0!==s.strings&&(this.st=new Set(s.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in i)i[t]&&!this.st?.has(t)&&this.it.add(t);return this.render(i)}const r=s.element.classList;for(const t of this.it)t in i||(r.remove(t),this.it.delete(t));for(const t in i){const s=!!i[t];s===this.it.has(t)||this.st?.has(t)||(s?(r.add(t),this.it.add(t)):(r.remove(t),this.it.delete(t)));}return w}}); + +/** + * @license + * Copyright 2021 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +/** + * Easing functions to use for web animations. + * + * **NOTE:** `EASING.EMPHASIZED` is approximated with unknown accuracy. + * + * TODO(b/241113345): replace with tokens + */ +const EASING = { + STANDARD: 'cubic-bezier(0.2, 0, 0, 1)', + STANDARD_ACCELERATE: 'cubic-bezier(.3,0,1,1)', + STANDARD_DECELERATE: 'cubic-bezier(0,0,0,1)', + EMPHASIZED: 'cubic-bezier(.3,0,0,1)', + EMPHASIZED_ACCELERATE: 'cubic-bezier(.3,0,.8,.15)', + EMPHASIZED_DECELERATE: 'cubic-bezier(.05,.7,.1,1)', +}; +/** + * Creates an `AnimationSignal` that can be used to cancel a previous task. + * + * @example + * class MyClass { + * private labelAnimationSignal = createAnimationSignal(); + * + * private async animateLabel() { + * // Start of the task. Previous tasks will be canceled. + * const signal = this.labelAnimationSignal.start(); + * + * // Do async work... + * if (signal.aborted) { + * // Use AbortSignal to check if a request was made to abort after some + * // asynchronous work. + * return; + * } + * + * const animation = this.animate(...); + * // Add event listeners to be notified when the task should be canceled. + * signal.addEventListener('abort', () => { + * animation.cancel(); + * }); + * + * animation.addEventListener('finish', () => { + * // Tell the signal that the current task is finished. + * this.labelAnimationSignal.finish(); + * }); + * } + * } + * + * @return An `AnimationSignal`. + */ +function createAnimationSignal() { + // The current animation's AbortController + let animationAbortController = null; + return { + start() { + // Tell the previous animation to cancel. + animationAbortController?.abort(); + // Set up a new AbortController for the current animation. + animationAbortController = new AbortController(); + // Provide the AbortSignal so that the caller can check aborted status + // and add listeners. + return animationAbortController.signal; + }, + finish() { + animationAbortController = null; + }, + }; +} + +/** + * @license + * Copyright 2022 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +const PRESS_GROW_MS = 450; +const MINIMUM_PRESS_MS = 225; +const INITIAL_ORIGIN_SCALE = 0.2; +const PADDING = 10; +const SOFT_EDGE_MINIMUM_SIZE = 75; +const SOFT_EDGE_CONTAINER_RATIO = 0.35; +const PRESS_PSEUDO = '::after'; +const ANIMATION_FILL = 'forwards'; +/** + * Interaction states for the ripple. + * + * On Touch: + * - `INACTIVE -> TOUCH_DELAY -> WAITING_FOR_CLICK -> INACTIVE` + * - `INACTIVE -> TOUCH_DELAY -> HOLDING -> WAITING_FOR_CLICK -> INACTIVE` + * + * On Mouse or Pen: + * - `INACTIVE -> WAITING_FOR_CLICK -> INACTIVE` + */ +var State; +(function (State) { + /** + * Initial state of the control, no touch in progress. + * + * Transitions: + * - on touch down: transition to `TOUCH_DELAY`. + * - on mouse down: transition to `WAITING_FOR_CLICK`. + */ + State[State["INACTIVE"] = 0] = "INACTIVE"; + /** + * Touch down has been received, waiting to determine if it's a swipe or + * scroll. + * + * Transitions: + * - on touch up: begin press; transition to `WAITING_FOR_CLICK`. + * - on cancel: transition to `INACTIVE`. + * - after `TOUCH_DELAY_MS`: begin press; transition to `HOLDING`. + */ + State[State["TOUCH_DELAY"] = 1] = "TOUCH_DELAY"; + /** + * A touch has been deemed to be a press + * + * Transitions: + * - on up: transition to `WAITING_FOR_CLICK`. + */ + State[State["HOLDING"] = 2] = "HOLDING"; + /** + * The user touch has finished, transition into rest state. + * + * Transitions: + * - on click end press; transition to `INACTIVE`. + */ + State[State["WAITING_FOR_CLICK"] = 3] = "WAITING_FOR_CLICK"; +})(State || (State = {})); +/** + * Events that the ripple listens to. + */ +const EVENTS = [ + 'click', + 'contextmenu', + 'pointercancel', + 'pointerdown', + 'pointerenter', + 'pointerleave', + 'pointerup', +]; +/** + * Delay reacting to touch so that we do not show the ripple for a swipe or + * scroll interaction. + */ +const TOUCH_DELAY_MS = 150; +/** + * Used to detect if HCM is active. Events do not process during HCM when the + * ripple is not displayed. + */ +const FORCED_COLORS = window.matchMedia('(forced-colors: active)'); +/** + * A ripple component. + */ +class Ripple extends s$1 { + constructor() { + super(...arguments); + /** + * Disables the ripple. + */ + this.disabled = false; + this.hovered = false; + this.pressed = false; + this.rippleSize = ''; + this.rippleScale = ''; + this.initialSize = 0; + this.state = State.INACTIVE; + this.checkBoundsAfterContextMenu = false; + this.attachableController = new AttachableController(this, this.onControlChange.bind(this)); + } + get htmlFor() { + return this.attachableController.htmlFor; + } + set htmlFor(htmlFor) { + this.attachableController.htmlFor = htmlFor; + } + get control() { + return this.attachableController.control; + } + set control(control) { + this.attachableController.control = control; + } + attach(control) { + this.attachableController.attach(control); + } + detach() { + this.attachableController.detach(); + } + connectedCallback() { + super.connectedCallback(); + // Needed for VoiceOver, which will create a "group" if the element is a + // sibling to other content. + this.setAttribute('aria-hidden', 'true'); + } + render() { + const classes = { + 'hovered': this.hovered, + 'pressed': this.pressed, + }; + return x `
    `; + } + update(changedProps) { + if (changedProps.has('disabled') && this.disabled) { + this.hovered = false; + this.pressed = false; + } + super.update(changedProps); + } + /** + * TODO(b/269799771): make private + * @private only public for slider + */ + handlePointerenter(event) { + if (!this.shouldReactToEvent(event)) { + return; + } + this.hovered = true; + } + /** + * TODO(b/269799771): make private + * @private only public for slider + */ + handlePointerleave(event) { + if (!this.shouldReactToEvent(event)) { + return; + } + this.hovered = false; + // release a held mouse or pen press that moves outside the element + if (this.state !== State.INACTIVE) { + this.endPressAnimation(); + } + } + handlePointerup(event) { + if (!this.shouldReactToEvent(event)) { + return; + } + if (this.state === State.HOLDING) { + this.state = State.WAITING_FOR_CLICK; + return; + } + if (this.state === State.TOUCH_DELAY) { + this.state = State.WAITING_FOR_CLICK; + this.startPressAnimation(this.rippleStartEvent); + return; + } + } + async handlePointerdown(event) { + if (!this.shouldReactToEvent(event)) { + return; + } + this.rippleStartEvent = event; + if (!this.isTouch(event)) { + this.state = State.WAITING_FOR_CLICK; + this.startPressAnimation(event); + return; + } + // after a longpress contextmenu event, an extra `pointerdown` can be + // dispatched to the pressed element. Check that the down is within + // bounds of the element in this case. + if (this.checkBoundsAfterContextMenu && !this.inBounds(event)) { + return; + } + this.checkBoundsAfterContextMenu = false; + // Wait for a hold after touch delay + this.state = State.TOUCH_DELAY; + await new Promise((resolve) => { + setTimeout(resolve, TOUCH_DELAY_MS); + }); + if (this.state !== State.TOUCH_DELAY) { + return; + } + this.state = State.HOLDING; + this.startPressAnimation(event); + } + handleClick() { + // Click is a MouseEvent in Firefox and Safari, so we cannot use + // `shouldReactToEvent` + if (this.disabled) { + return; + } + if (this.state === State.WAITING_FOR_CLICK) { + this.endPressAnimation(); + return; + } + if (this.state === State.INACTIVE) { + // keyboard synthesized click event + this.startPressAnimation(); + this.endPressAnimation(); + } + } + handlePointercancel(event) { + if (!this.shouldReactToEvent(event)) { + return; + } + this.endPressAnimation(); + } + handleContextmenu() { + if (this.disabled) { + return; + } + this.checkBoundsAfterContextMenu = true; + this.endPressAnimation(); + } + determineRippleSize() { + const { height, width } = this.getBoundingClientRect(); + const maxDim = Math.max(height, width); + const softEdgeSize = Math.max(SOFT_EDGE_CONTAINER_RATIO * maxDim, SOFT_EDGE_MINIMUM_SIZE); + const initialSize = Math.floor(maxDim * INITIAL_ORIGIN_SCALE); + const hypotenuse = Math.sqrt(width ** 2 + height ** 2); + const maxRadius = hypotenuse + PADDING; + this.initialSize = initialSize; + this.rippleScale = `${(maxRadius + softEdgeSize) / initialSize}`; + this.rippleSize = `${initialSize}px`; + } + getNormalizedPointerEventCoords(pointerEvent) { + const { scrollX, scrollY } = window; + const { left, top } = this.getBoundingClientRect(); + const documentX = scrollX + left; + const documentY = scrollY + top; + const { pageX, pageY } = pointerEvent; + return { x: pageX - documentX, y: pageY - documentY }; + } + getTranslationCoordinates(positionEvent) { + const { height, width } = this.getBoundingClientRect(); + // end in the center + const endPoint = { + x: (width - this.initialSize) / 2, + y: (height - this.initialSize) / 2, + }; + let startPoint; + if (positionEvent instanceof PointerEvent) { + startPoint = this.getNormalizedPointerEventCoords(positionEvent); + } + else { + startPoint = { + x: width / 2, + y: height / 2, + }; + } + // center around start point + startPoint = { + x: startPoint.x - this.initialSize / 2, + y: startPoint.y - this.initialSize / 2, + }; + return { startPoint, endPoint }; + } + startPressAnimation(positionEvent) { + if (!this.mdRoot) { + return; + } + this.pressed = true; + this.growAnimation?.cancel(); + this.determineRippleSize(); + const { startPoint, endPoint } = this.getTranslationCoordinates(positionEvent); + const translateStart = `${startPoint.x}px, ${startPoint.y}px`; + const translateEnd = `${endPoint.x}px, ${endPoint.y}px`; + this.growAnimation = this.mdRoot.animate({ + top: [0, 0], + left: [0, 0], + height: [this.rippleSize, this.rippleSize], + width: [this.rippleSize, this.rippleSize], + transform: [ + `translate(${translateStart}) scale(1)`, + `translate(${translateEnd}) scale(${this.rippleScale})`, + ], + }, { + pseudoElement: PRESS_PSEUDO, + duration: PRESS_GROW_MS, + easing: EASING.STANDARD, + fill: ANIMATION_FILL, + }); + } + async endPressAnimation() { + this.rippleStartEvent = undefined; + this.state = State.INACTIVE; + const animation = this.growAnimation; + let pressAnimationPlayState = Infinity; + if (typeof animation?.currentTime === 'number') { + pressAnimationPlayState = animation.currentTime; + } + else if (animation?.currentTime) { + pressAnimationPlayState = animation.currentTime.to('ms').value; + } + if (pressAnimationPlayState >= MINIMUM_PRESS_MS) { + this.pressed = false; + return; + } + await new Promise((resolve) => { + setTimeout(resolve, MINIMUM_PRESS_MS - pressAnimationPlayState); + }); + if (this.growAnimation !== animation) { + // A new press animation was started. The old animation was canceled and + // should not finish the pressed state. + return; + } + this.pressed = false; + } + /** + * Returns `true` if + * - the ripple element is enabled + * - the pointer is primary for the input type + * - the pointer is the pointer that started the interaction, or will start + * the interaction + * - the pointer is a touch, or the pointer state has the primary button + * held, or the pointer is hovering + */ + shouldReactToEvent(event) { + if (this.disabled || !event.isPrimary) { + return false; + } + if (this.rippleStartEvent && + this.rippleStartEvent.pointerId !== event.pointerId) { + return false; + } + if (event.type === 'pointerenter' || event.type === 'pointerleave') { + return !this.isTouch(event); + } + const isPrimaryButton = event.buttons === 1; + return this.isTouch(event) || isPrimaryButton; + } + /** + * Check if the event is within the bounds of the element. + * + * This is only needed for the "stuck" contextmenu longpress on Chrome. + */ + inBounds({ x, y }) { + const { top, left, bottom, right } = this.getBoundingClientRect(); + return x >= left && x <= right && y >= top && y <= bottom; + } + isTouch({ pointerType }) { + return pointerType === 'touch'; + } + /** @private */ + async handleEvent(event) { + if (FORCED_COLORS?.matches) { + // Skip event logic since the ripple is `display: none`. + return; + } + switch (event.type) { + case 'click': + this.handleClick(); + break; + case 'contextmenu': + this.handleContextmenu(); + break; + case 'pointercancel': + this.handlePointercancel(event); + break; + case 'pointerdown': + await this.handlePointerdown(event); + break; + case 'pointerenter': + this.handlePointerenter(event); + break; + case 'pointerleave': + this.handlePointerleave(event); + break; + case 'pointerup': + this.handlePointerup(event); + break; + } + } + onControlChange(prev, next) { + for (const event of EVENTS) { + prev?.removeEventListener(event, this); + next?.addEventListener(event, this); + } + } +} +__decorate([ + n$5({ type: Boolean, reflect: true }) +], Ripple.prototype, "disabled", void 0); +__decorate([ + r$4() +], Ripple.prototype, "hovered", void 0); +__decorate([ + r$4() +], Ripple.prototype, "pressed", void 0); +__decorate([ + e$5('.surface') +], Ripple.prototype, "mdRoot", void 0); + +/** + * @license + * Copyright 2024 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +// Generated stylesheet for ./ripple/internal/ripple-styles.css. +const styles$S = i$4 `:host{display:flex;margin:auto;pointer-events:none}:host([disabled]){display:none}@media(forced-colors: active){:host{display:none}}:host,.surface{border-radius:inherit;position:absolute;inset:0;overflow:hidden}.surface{-webkit-tap-highlight-color:rgba(0,0,0,0)}.surface::before,.surface::after{content:"";opacity:0;position:absolute}.surface::before{background-color:var(--md-ripple-hover-color, var(--md-sys-color-on-surface, #1d1b20));inset:0;transition:opacity 15ms linear,background-color 15ms linear}.surface::after{background:radial-gradient(closest-side, var(--md-ripple-pressed-color, var(--md-sys-color-on-surface, #1d1b20)) max(100% - 70px, 65%), transparent 100%);transform-origin:center center;transition:opacity 375ms linear}.hovered::before{background-color:var(--md-ripple-hover-color, var(--md-sys-color-on-surface, #1d1b20));opacity:var(--md-ripple-hover-opacity, 0.08)}.pressed::after{opacity:var(--md-ripple-pressed-opacity, 0.12);transition-duration:105ms} +`; + +/** + * @license + * Copyright 2022 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +/** + * @summary Ripples, also known as state layers, are visual indicators used to + * communicate the status of a component or interactive element. + * + * @description A state layer is a semi-transparent covering on an element that + * indicates its state. State layers provide a systematic approach to + * visualizing states by using opacity. A layer can be applied to an entire + * element or in a circular shape and only one state layer can be applied at a + * given time. + * + * @final + * @suppress {visibility} + */ +let MdRipple = class MdRipple extends Ripple { +}; +MdRipple.styles = [styles$S]; +MdRipple = __decorate([ + t$3('md-ripple') +], MdRipple); + +/** + * @license + * Copyright 2023 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +/** + * Accessibility Object Model reflective aria properties. + */ +const ARIA_PROPERTIES = [ + 'ariaAtomic', + 'ariaAutoComplete', + 'ariaBusy', + 'ariaChecked', + 'ariaColCount', + 'ariaColIndex', + 'ariaColSpan', + 'ariaCurrent', + 'ariaDisabled', + 'ariaExpanded', + 'ariaHasPopup', + 'ariaHidden', + 'ariaInvalid', + 'ariaKeyShortcuts', + 'ariaLabel', + 'ariaLevel', + 'ariaLive', + 'ariaModal', + 'ariaMultiLine', + 'ariaMultiSelectable', + 'ariaOrientation', + 'ariaPlaceholder', + 'ariaPosInSet', + 'ariaPressed', + 'ariaReadOnly', + 'ariaRequired', + 'ariaRoleDescription', + 'ariaRowCount', + 'ariaRowIndex', + 'ariaRowSpan', + 'ariaSelected', + 'ariaSetSize', + 'ariaSort', + 'ariaValueMax', + 'ariaValueMin', + 'ariaValueNow', + 'ariaValueText', +]; +/** + * Accessibility Object Model aria attributes. + */ +ARIA_PROPERTIES.map(ariaPropertyToAttribute); +/** + * Converts an AOM aria property into its corresponding attribute. + * + * @example + * ariaPropertyToAttribute('ariaLabel'); // 'aria-label' + * + * @param property The aria property. + * @return The aria attribute. + */ +function ariaPropertyToAttribute(property) { + return property + .replace('aria', 'aria-') + // IDREF attributes also include an "Element" or "Elements" suffix + .replace(/Elements?/g, '') + .toLowerCase(); +} + +/** + * @license + * Copyright 2023 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +/** + * Sets up a `ReactiveElement` constructor to enable updates when delegating + * aria attributes. Elements may bind `this.aria*` properties to `aria-*` + * attributes in their render functions. + * + * This function will: + * - Call `requestUpdate()` when an aria attribute changes. + * - Add `role="presentation"` to the host. + * + * NOTE: The following features are not currently supported: + * - Delegating IDREF attributes (ex: `aria-labelledby`, `aria-controls`) + * - Delegating the `role` attribute + * + * @example + * class XButton extends LitElement { + * static { + * requestUpdateOnAriaChange(XButton); + * } + * + * protected override render() { + * return html` + * + * `; + * } + * } + * + * @param ctor The `ReactiveElement` constructor to patch. + */ +function requestUpdateOnAriaChange(ctor) { + for (const ariaProperty of ARIA_PROPERTIES) { + ctor.createProperty(ariaProperty, { + attribute: ariaPropertyToAttribute(ariaProperty), + reflect: true, + }); + } + ctor.addInitializer((element) => { + const controller = { + hostConnected() { + element.setAttribute('role', 'presentation'); + }, + }; + element.addController(controller); + }); +} + +/** + * @license + * Copyright 2023 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +/** + * A unique symbol used for protected access to an instance's + * `ElementInternals`. + * + * @example + * ```ts + * class MyElement extends mixinElementInternals(LitElement) { + * constructor() { + * super(); + * this[internals].role = 'button'; + * } + * } + * ``` + */ +const internals = Symbol('internals'); +// Private symbols +const privateInternals = Symbol('privateInternals'); +/** + * Mixes in an attached `ElementInternals` instance. + * + * This mixin is only needed when other shared code needs access to a + * component's `ElementInternals`, such as form-associated mixins. + * + * @param base The class to mix functionality into. + * @return The provided class with `WithElementInternals` mixed in. + */ +function mixinElementInternals(base) { + class WithElementInternalsElement extends base { + get [internals]() { + // Create internals in getter so that it can be used in methods called on + // construction in `ReactiveElement`, such as `requestUpdate()`. + if (!this[privateInternals]) { + // Cast needed for closure + this[privateInternals] = this.attachInternals(); + } + return this[privateInternals]; + } + } + return WithElementInternalsElement; +} + +/** + * @license + * Copyright 2023 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +/** + * Sets up an element's constructor to enable form submission. The element + * instance should be form associated and have a `type` property. + * + * A click listener is added to each element instance. If the click is not + * default prevented, it will submit the element's form, if any. + * + * @example + * ```ts + * class MyElement extends mixinElementInternals(LitElement) { + * static { + * setupFormSubmitter(MyElement); + * } + * + * static formAssociated = true; + * + * type: FormSubmitterType = 'submit'; + * } + * ``` + * + * @param ctor The form submitter element's constructor. + */ +function setupFormSubmitter(ctor) { + ctor.addInitializer((instance) => { + const submitter = instance; + submitter.addEventListener('click', async (event) => { + const { type, [internals]: elementInternals } = submitter; + const { form } = elementInternals; + if (!form || type === 'button') { + return; + } + // Wait a full task for event bubbling to complete. + await new Promise((resolve) => { + setTimeout(resolve); + }); + if (event.defaultPrevented) { + return; + } + if (type === 'reset') { + form.reset(); + return; + } + // form.requestSubmit(submitter) does not work with form associated custom + // elements. This patches the dispatched submit event to add the correct + // `submitter`. + // See https://github.com/WICG/webcomponents/issues/814 + form.addEventListener('submit', (submitEvent) => { + Object.defineProperty(submitEvent, 'submitter', { + configurable: true, + enumerable: true, + get: () => submitter, + }); + }, { capture: true, once: true }); + elementInternals.setFormValue(submitter.value); + form.requestSubmit(); + }); + }); +} + +/** + * @license + * Copyright 2021 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +/** + * Dispatches a click event to the given element that triggers a native action, + * but is not composed and therefore is not seen outside the element. + * + * This is useful for responding to an external click event on the host element + * that should trigger an internal action like a button click. + * + * Note, a helper is provided because setting this up correctly is a bit tricky. + * In particular, calling `click` on an element creates a composed event, which + * is not desirable, and a manually dispatched event must specifically be a + * `MouseEvent` to trigger a native action. + * + * @example + * hostClickListener = (event: MouseEvent) { + * if (isActivationClick(event)) { + * this.dispatchActivationClick(this.buttonElement); + * } + * } + * + */ +function dispatchActivationClick(element) { + const event = new MouseEvent('click', { bubbles: true }); + element.dispatchEvent(event); + return event; +} +/** + * Returns true if the click event should trigger an activation behavior. The + * behavior is defined by the element and is whatever it should do when + * clicked. + * + * Typically when an element needs to handle a click, the click is generated + * from within the element and an event listener within the element implements + * the needed behavior; however, it's possible to fire a click directly + * at the element that the element should handle. This method helps + * distinguish these "external" clicks. + * + * An "external" click can be triggered in a number of ways: via a click + * on an associated label for a form associated element, calling + * `element.click()`, or calling + * `element.dispatchEvent(new MouseEvent('click', ...))`. + * + * Also works around Firefox issue + * https://bugzilla.mozilla.org/show_bug.cgi?id=1804576 by squelching + * events for a microtask after called. + * + * @example + * hostClickListener = (event: MouseEvent) { + * if (isActivationClick(event)) { + * this.dispatchActivationClick(this.buttonElement); + * } + * } + * + */ +function isActivationClick(event) { + // Event must start at the event target. + if (event.currentTarget !== event.target) { + return false; + } + // Event must not be retargeted from shadowRoot. + if (event.composedPath()[0] !== event.target) { + return false; + } + // Target must not be disabled; this should only occur for a synthetically + // dispatched click. + if (event.target.disabled) { + return false; + } + // This is an activation if the event should not be squelched. + return !squelchEvent(event); +} +// TODO(https://bugzilla.mozilla.org/show_bug.cgi?id=1804576) +// Remove when Firefox bug is addressed. +function squelchEvent(event) { + const squelched = isSquelchingEvents; + if (squelched) { + event.preventDefault(); + event.stopImmediatePropagation(); + } + squelchEventsForMicrotask(); + return squelched; +} +// Ignore events for one microtask only. +let isSquelchingEvents = false; +async function squelchEventsForMicrotask() { + isSquelchingEvents = true; + // Need to pause for just one microtask. + // tslint:disable-next-line + await null; + isSquelchingEvents = false; +} + +/** + * @license + * Copyright 2019 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +// Separate variable needed for closure. +const buttonBaseClass = mixinElementInternals(s$1); +/** + * A button component. + */ +class Button extends buttonBaseClass { + get name() { + return this.getAttribute('name') ?? ''; + } + set name(name) { + this.setAttribute('name', name); + } + /** + * The associated form element with which this element's value will submit. + */ + get form() { + return this[internals].form; + } + constructor() { + super(); + /** + * Whether or not the button is disabled. + */ + this.disabled = false; + /** + * The URL that the link button points to. + */ + this.href = ''; + /** + * Where to display the linked `href` URL for a link button. Common options + * include `_blank` to open in a new tab. + */ + this.target = ''; + /** + * Whether to render the icon at the inline end of the label rather than the + * inline start. + * + * _Note:_ Link buttons cannot have trailing icons. + */ + this.trailingIcon = false; + /** + * Whether to display the icon or not. + */ + this.hasIcon = false; + /** + * The default behavior of the button. May be "text", "reset", or "submit" + * (default). + */ + this.type = 'submit'; + /** + * The value added to a form with the button's name when the button submits a + * form. + */ + this.value = ''; + this.handleActivationClick = (event) => { + if (!isActivationClick(event) || !this.buttonElement) { + return; + } + this.focus(); + dispatchActivationClick(this.buttonElement); + }; + { + this.addEventListener('click', this.handleActivationClick); + } + } + focus() { + this.buttonElement?.focus(); + } + blur() { + this.buttonElement?.blur(); + } + render() { + // Link buttons may not be disabled + const isDisabled = this.disabled && !this.href; + const buttonOrLink = this.href ? this.renderLink() : this.renderButton(); + // TODO(b/310046938): due to a limitation in focus ring/ripple, we can't use + // the same ID for different elements, so we change the ID instead. + const buttonId = this.href ? 'link' : 'button'; + return x ` + ${this.renderElevationOrOutline?.()} +
    + + + ${buttonOrLink} + `; + } + renderButton() { + // Needed for closure conformance + const { ariaLabel, ariaHasPopup, ariaExpanded } = this; + return x ``; + } + renderLink() { + // Needed for closure conformance + const { ariaLabel, ariaHasPopup, ariaExpanded } = this; + return x `${this.renderContent()} + `; + } + renderContent() { + const icon = x ``; + return x ` + + ${this.trailingIcon ? T : icon} + + ${this.trailingIcon ? icon : T} + `; + } + handleSlotChange() { + this.hasIcon = this.assignedIcons.length > 0; + } +} +(() => { + requestUpdateOnAriaChange(Button); + setupFormSubmitter(Button); +})(); +/** @nocollapse */ +Button.formAssociated = true; +/** @nocollapse */ +Button.shadowRootOptions = { + mode: 'open', + delegatesFocus: true, +}; +__decorate([ + n$5({ type: Boolean, reflect: true }) +], Button.prototype, "disabled", void 0); +__decorate([ + n$5() +], Button.prototype, "href", void 0); +__decorate([ + n$5() +], Button.prototype, "target", void 0); +__decorate([ + n$5({ type: Boolean, attribute: 'trailing-icon', reflect: true }) +], Button.prototype, "trailingIcon", void 0); +__decorate([ + n$5({ type: Boolean, attribute: 'has-icon', reflect: true }) +], Button.prototype, "hasIcon", void 0); +__decorate([ + n$5() +], Button.prototype, "type", void 0); +__decorate([ + n$5({ reflect: true }) +], Button.prototype, "value", void 0); +__decorate([ + e$5('.button') +], Button.prototype, "buttonElement", void 0); +__decorate([ + o$4({ slot: 'icon', flatten: true }) +], Button.prototype, "assignedIcons", void 0); + +/** + * @license + * Copyright 2021 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +/** + * An elevated button component. + */ +class ElevatedButton extends Button { + renderElevationOrOutline() { + return x ``; + } +} + +/** + * @license + * Copyright 2024 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +// Generated stylesheet for ./button/internal/elevated-styles.css. +const styles$R = i$4 `:host{--_container-color: var(--md-elevated-button-container-color, var(--md-sys-color-surface-container-low, #f7f2fa));--_container-elevation: var(--md-elevated-button-container-elevation, 1);--_container-height: var(--md-elevated-button-container-height, 40px);--_container-shadow-color: var(--md-elevated-button-container-shadow-color, var(--md-sys-color-shadow, #000));--_disabled-container-color: var(--md-elevated-button-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-container-elevation: var(--md-elevated-button-disabled-container-elevation, 0);--_disabled-container-opacity: var(--md-elevated-button-disabled-container-opacity, 0.12);--_disabled-label-text-color: var(--md-elevated-button-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-elevated-button-disabled-label-text-opacity, 0.38);--_focus-container-elevation: var(--md-elevated-button-focus-container-elevation, 1);--_focus-label-text-color: var(--md-elevated-button-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_hover-container-elevation: var(--md-elevated-button-hover-container-elevation, 2);--_hover-label-text-color: var(--md-elevated-button-hover-label-text-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-color: var(--md-elevated-button-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-opacity: var(--md-elevated-button-hover-state-layer-opacity, 0.08);--_label-text-color: var(--md-elevated-button-label-text-color, var(--md-sys-color-primary, #6750a4));--_label-text-font: var(--md-elevated-button-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-elevated-button-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-elevated-button-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-elevated-button-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_pressed-container-elevation: var(--md-elevated-button-pressed-container-elevation, 1);--_pressed-label-text-color: var(--md-elevated-button-pressed-label-text-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-color: var(--md-elevated-button-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-opacity: var(--md-elevated-button-pressed-state-layer-opacity, 0.12);--_disabled-icon-color: var(--md-elevated-button-disabled-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-icon-opacity: var(--md-elevated-button-disabled-icon-opacity, 0.38);--_focus-icon-color: var(--md-elevated-button-focus-icon-color, var(--md-sys-color-primary, #6750a4));--_hover-icon-color: var(--md-elevated-button-hover-icon-color, var(--md-sys-color-primary, #6750a4));--_icon-color: var(--md-elevated-button-icon-color, var(--md-sys-color-primary, #6750a4));--_icon-size: var(--md-elevated-button-icon-size, 18px);--_pressed-icon-color: var(--md-elevated-button-pressed-icon-color, var(--md-sys-color-primary, #6750a4));--_container-shape-start-start: var(--md-elevated-button-container-shape-start-start, var(--md-elevated-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-start-end: var(--md-elevated-button-container-shape-start-end, var(--md-elevated-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-end: var(--md-elevated-button-container-shape-end-end, var(--md-elevated-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-start: var(--md-elevated-button-container-shape-end-start, var(--md-elevated-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_leading-space: var(--md-elevated-button-leading-space, 24px);--_trailing-space: var(--md-elevated-button-trailing-space, 24px);--_with-leading-icon-leading-space: var(--md-elevated-button-with-leading-icon-leading-space, 16px);--_with-leading-icon-trailing-space: var(--md-elevated-button-with-leading-icon-trailing-space, 24px);--_with-trailing-icon-leading-space: var(--md-elevated-button-with-trailing-icon-leading-space, 24px);--_with-trailing-icon-trailing-space: var(--md-elevated-button-with-trailing-icon-trailing-space, 16px)} +`; + +/** + * @license + * Copyright 2024 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +// Generated stylesheet for ./button/internal/shared-elevation-styles.css. +const styles$Q = i$4 `md-elevation{transition-duration:280ms}:host([disabled]) md-elevation{transition:none}md-elevation{--md-elevation-level: var(--_container-elevation);--md-elevation-shadow-color: var(--_container-shadow-color)}:host(:focus-within) md-elevation{--md-elevation-level: var(--_focus-container-elevation)}:host(:hover) md-elevation{--md-elevation-level: var(--_hover-container-elevation)}:host(:active) md-elevation{--md-elevation-level: var(--_pressed-container-elevation)}:host([disabled]) md-elevation{--md-elevation-level: var(--_disabled-container-elevation)} +`; + +/** + * @license + * Copyright 2024 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +// Generated stylesheet for ./button/internal/shared-styles.css. +const styles$P = i$4 `:host{border-start-start-radius:var(--_container-shape-start-start);border-start-end-radius:var(--_container-shape-start-end);border-end-start-radius:var(--_container-shape-end-start);border-end-end-radius:var(--_container-shape-end-end);box-sizing:border-box;cursor:pointer;display:inline-flex;gap:8px;min-height:var(--_container-height);outline:none;padding-block:calc((var(--_container-height) - max(var(--_label-text-line-height),var(--_icon-size)))/2);padding-inline-start:var(--_leading-space);padding-inline-end:var(--_trailing-space);place-content:center;place-items:center;position:relative;font-family:var(--_label-text-font);font-size:var(--_label-text-size);line-height:var(--_label-text-line-height);font-weight:var(--_label-text-weight);text-overflow:ellipsis;text-wrap:nowrap;user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0);vertical-align:top;--md-ripple-hover-color: var(--_hover-state-layer-color);--md-ripple-pressed-color: var(--_pressed-state-layer-color);--md-ripple-hover-opacity: var(--_hover-state-layer-opacity);--md-ripple-pressed-opacity: var(--_pressed-state-layer-opacity)}md-focus-ring{--md-focus-ring-shape-start-start: var(--_container-shape-start-start);--md-focus-ring-shape-start-end: var(--_container-shape-start-end);--md-focus-ring-shape-end-end: var(--_container-shape-end-end);--md-focus-ring-shape-end-start: var(--_container-shape-end-start)}:host([disabled]){cursor:default;pointer-events:none}.button{border-radius:inherit;cursor:inherit;display:inline-flex;align-items:center;justify-content:center;border:none;outline:none;-webkit-appearance:none;vertical-align:middle;background:rgba(0,0,0,0);text-decoration:none;min-width:calc(64px - var(--_leading-space) - var(--_trailing-space));width:100%;z-index:0;height:100%;font:inherit;color:var(--_label-text-color);padding:0;gap:inherit;text-transform:inherit}.button::-moz-focus-inner{padding:0;border:0}:host(:hover) .button{color:var(--_hover-label-text-color)}:host(:focus-within) .button{color:var(--_focus-label-text-color)}:host(:active) .button{color:var(--_pressed-label-text-color)}.background{background-color:var(--_container-color);border-radius:inherit;inset:0;position:absolute}.label{overflow:hidden}:is(.button,.label,.label slot),.label ::slotted(*){text-overflow:inherit}:host([disabled]) .label{color:var(--_disabled-label-text-color);opacity:var(--_disabled-label-text-opacity)}:host([disabled]) .background{background-color:var(--_disabled-container-color);opacity:var(--_disabled-container-opacity)}@media(forced-colors: active){.background{border:1px solid CanvasText}:host([disabled]){--_disabled-icon-color: GrayText;--_disabled-icon-opacity: 1;--_disabled-container-opacity: 1;--_disabled-label-text-color: GrayText;--_disabled-label-text-opacity: 1}}:host([has-icon]:not([trailing-icon])){padding-inline-start:var(--_with-leading-icon-leading-space);padding-inline-end:var(--_with-leading-icon-trailing-space)}:host([has-icon][trailing-icon]){padding-inline-start:var(--_with-trailing-icon-leading-space);padding-inline-end:var(--_with-trailing-icon-trailing-space)}::slotted([slot=icon]){display:inline-flex;position:relative;writing-mode:horizontal-tb;fill:currentColor;flex-shrink:0;color:var(--_icon-color);font-size:var(--_icon-size);inline-size:var(--_icon-size);block-size:var(--_icon-size)}:host(:hover) ::slotted([slot=icon]){color:var(--_hover-icon-color)}:host(:focus-within) ::slotted([slot=icon]){color:var(--_focus-icon-color)}:host(:active) ::slotted([slot=icon]){color:var(--_pressed-icon-color)}:host([disabled]) ::slotted([slot=icon]){color:var(--_disabled-icon-color);opacity:var(--_disabled-icon-opacity)}.touch{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%)}:host([touch-target=wrapper]){margin:max(0px,(48px - var(--_container-height))/2) 0}:host([touch-target=none]) .touch{display:none} +`; + +/** + * @license + * Copyright 2021 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +/** + * @summary Buttons help people take action, such as sending an email, sharing a + * document, or liking a comment. + * + * @description + * __Emphasis:__ Medium emphasis – For important actions that don’t distract + * from other onscreen elements. + * + * __Rationale:__ Elevated buttons are essentially filled buttons with a lighter + * background color and a shadow. To prevent shadow creep, only use them when + * absolutely necessary, such as when the button requires visual separation from + * a patterned background. + * + * __Example usages:__ + * - Reply + * - View all + * - Add to cart + * - Take out of trash + * + * @final + * @suppress {visibility} + */ +let MdElevatedButton = class MdElevatedButton extends ElevatedButton { +}; +MdElevatedButton.styles = [ + styles$P, + styles$Q, + styles$R, +]; +MdElevatedButton = __decorate([ + t$3('md-elevated-button') +], MdElevatedButton); + +/** + * @license + * Copyright 2021 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +/** + * A filled button component. + */ +class FilledButton extends Button { + renderElevationOrOutline() { + return x ``; + } +} + +/** + * @license + * Copyright 2024 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +// Generated stylesheet for ./button/internal/filled-styles.css. +const styles$O = i$4 `:host{--_container-color: var(--md-filled-button-container-color, var(--md-sys-color-primary, #6750a4));--_container-elevation: var(--md-filled-button-container-elevation, 0);--_container-height: var(--md-filled-button-container-height, 40px);--_container-shadow-color: var(--md-filled-button-container-shadow-color, var(--md-sys-color-shadow, #000));--_disabled-container-color: var(--md-filled-button-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-container-elevation: var(--md-filled-button-disabled-container-elevation, 0);--_disabled-container-opacity: var(--md-filled-button-disabled-container-opacity, 0.12);--_disabled-label-text-color: var(--md-filled-button-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-filled-button-disabled-label-text-opacity, 0.38);--_focus-container-elevation: var(--md-filled-button-focus-container-elevation, 0);--_focus-label-text-color: var(--md-filled-button-focus-label-text-color, var(--md-sys-color-on-primary, #fff));--_hover-container-elevation: var(--md-filled-button-hover-container-elevation, 1);--_hover-label-text-color: var(--md-filled-button-hover-label-text-color, var(--md-sys-color-on-primary, #fff));--_hover-state-layer-color: var(--md-filled-button-hover-state-layer-color, var(--md-sys-color-on-primary, #fff));--_hover-state-layer-opacity: var(--md-filled-button-hover-state-layer-opacity, 0.08);--_label-text-color: var(--md-filled-button-label-text-color, var(--md-sys-color-on-primary, #fff));--_label-text-font: var(--md-filled-button-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-filled-button-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-filled-button-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-filled-button-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_pressed-container-elevation: var(--md-filled-button-pressed-container-elevation, 0);--_pressed-label-text-color: var(--md-filled-button-pressed-label-text-color, var(--md-sys-color-on-primary, #fff));--_pressed-state-layer-color: var(--md-filled-button-pressed-state-layer-color, var(--md-sys-color-on-primary, #fff));--_pressed-state-layer-opacity: var(--md-filled-button-pressed-state-layer-opacity, 0.12);--_disabled-icon-color: var(--md-filled-button-disabled-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-icon-opacity: var(--md-filled-button-disabled-icon-opacity, 0.38);--_focus-icon-color: var(--md-filled-button-focus-icon-color, var(--md-sys-color-on-primary, #fff));--_hover-icon-color: var(--md-filled-button-hover-icon-color, var(--md-sys-color-on-primary, #fff));--_icon-color: var(--md-filled-button-icon-color, var(--md-sys-color-on-primary, #fff));--_icon-size: var(--md-filled-button-icon-size, 18px);--_pressed-icon-color: var(--md-filled-button-pressed-icon-color, var(--md-sys-color-on-primary, #fff));--_container-shape-start-start: var(--md-filled-button-container-shape-start-start, var(--md-filled-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-start-end: var(--md-filled-button-container-shape-start-end, var(--md-filled-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-end: var(--md-filled-button-container-shape-end-end, var(--md-filled-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-start: var(--md-filled-button-container-shape-end-start, var(--md-filled-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_leading-space: var(--md-filled-button-leading-space, 24px);--_trailing-space: var(--md-filled-button-trailing-space, 24px);--_with-leading-icon-leading-space: var(--md-filled-button-with-leading-icon-leading-space, 16px);--_with-leading-icon-trailing-space: var(--md-filled-button-with-leading-icon-trailing-space, 24px);--_with-trailing-icon-leading-space: var(--md-filled-button-with-trailing-icon-leading-space, 24px);--_with-trailing-icon-trailing-space: var(--md-filled-button-with-trailing-icon-trailing-space, 16px)} +`; + +/** + * @license + * Copyright 2021 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +/** + * @summary Buttons help people take action, such as sending an email, sharing a + * document, or liking a comment. + * + * @description + * __Emphasis:__ High emphasis – For the primary, most important, or most common + * action on a screen + * + * __Rationale:__ The filled button’s contrasting surface color makes it the + * most prominent button after the FAB. It’s used for final or unblocking + * actions in a flow. + * + * __Example usages:__ + * - Save + * - Confirm + * - Done + * + * @final + * @suppress {visibility} + */ +let MdFilledButton = class MdFilledButton extends FilledButton { +}; +MdFilledButton.styles = [ + styles$P, + styles$Q, + styles$O, +]; +MdFilledButton = __decorate([ + t$3('md-filled-button') +], MdFilledButton); + +/** + * @license + * Copyright 2021 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +/** + * A filled tonal button component. + */ +class FilledTonalButton extends Button { + renderElevationOrOutline() { + return x ``; + } +} + +/** + * @license + * Copyright 2024 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +// Generated stylesheet for ./button/internal/filled-tonal-styles.css. +const styles$N = i$4 `:host{--_container-color: var(--md-filled-tonal-button-container-color, var(--md-sys-color-secondary-container, #e8def8));--_container-elevation: var(--md-filled-tonal-button-container-elevation, 0);--_container-height: var(--md-filled-tonal-button-container-height, 40px);--_container-shadow-color: var(--md-filled-tonal-button-container-shadow-color, var(--md-sys-color-shadow, #000));--_disabled-container-color: var(--md-filled-tonal-button-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-container-elevation: var(--md-filled-tonal-button-disabled-container-elevation, 0);--_disabled-container-opacity: var(--md-filled-tonal-button-disabled-container-opacity, 0.12);--_disabled-label-text-color: var(--md-filled-tonal-button-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-filled-tonal-button-disabled-label-text-opacity, 0.38);--_focus-container-elevation: var(--md-filled-tonal-button-focus-container-elevation, 0);--_focus-label-text-color: var(--md-filled-tonal-button-focus-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_hover-container-elevation: var(--md-filled-tonal-button-hover-container-elevation, 1);--_hover-label-text-color: var(--md-filled-tonal-button-hover-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_hover-state-layer-color: var(--md-filled-tonal-button-hover-state-layer-color, var(--md-sys-color-on-secondary-container, #1d192b));--_hover-state-layer-opacity: var(--md-filled-tonal-button-hover-state-layer-opacity, 0.08);--_label-text-color: var(--md-filled-tonal-button-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_label-text-font: var(--md-filled-tonal-button-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-filled-tonal-button-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-filled-tonal-button-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-filled-tonal-button-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_pressed-container-elevation: var(--md-filled-tonal-button-pressed-container-elevation, 0);--_pressed-label-text-color: var(--md-filled-tonal-button-pressed-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_pressed-state-layer-color: var(--md-filled-tonal-button-pressed-state-layer-color, var(--md-sys-color-on-secondary-container, #1d192b));--_pressed-state-layer-opacity: var(--md-filled-tonal-button-pressed-state-layer-opacity, 0.12);--_disabled-icon-color: var(--md-filled-tonal-button-disabled-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-icon-opacity: var(--md-filled-tonal-button-disabled-icon-opacity, 0.38);--_focus-icon-color: var(--md-filled-tonal-button-focus-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_hover-icon-color: var(--md-filled-tonal-button-hover-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_icon-color: var(--md-filled-tonal-button-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_icon-size: var(--md-filled-tonal-button-icon-size, 18px);--_pressed-icon-color: var(--md-filled-tonal-button-pressed-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_container-shape-start-start: var(--md-filled-tonal-button-container-shape-start-start, var(--md-filled-tonal-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-start-end: var(--md-filled-tonal-button-container-shape-start-end, var(--md-filled-tonal-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-end: var(--md-filled-tonal-button-container-shape-end-end, var(--md-filled-tonal-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-start: var(--md-filled-tonal-button-container-shape-end-start, var(--md-filled-tonal-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_leading-space: var(--md-filled-tonal-button-leading-space, 24px);--_trailing-space: var(--md-filled-tonal-button-trailing-space, 24px);--_with-leading-icon-leading-space: var(--md-filled-tonal-button-with-leading-icon-leading-space, 16px);--_with-leading-icon-trailing-space: var(--md-filled-tonal-button-with-leading-icon-trailing-space, 24px);--_with-trailing-icon-leading-space: var(--md-filled-tonal-button-with-trailing-icon-leading-space, 24px);--_with-trailing-icon-trailing-space: var(--md-filled-tonal-button-with-trailing-icon-trailing-space, 16px)} +`; + +/** + * @license + * Copyright 2021 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +/** + * @summary Buttons help people take action, such as sending an email, sharing a + * document, or liking a comment. + * + * @description + * __Emphasis:__ Medium emphasis – For important actions that don’t distract + * from other onscreen elements. + * + * __Rationale:__ Filled tonal buttons have a lighter background color and + * darker label color, making them less visually prominent than a regular, + * filled button. They’re still used for final or unblocking actions in a flow, + * but do so with less emphasis. + * + * __Example usages:__ + * - Save + * - Confirm + * - Done + * + * @final + * @suppress {visibility} + */ +let MdFilledTonalButton = class MdFilledTonalButton extends FilledTonalButton { +}; +MdFilledTonalButton.styles = [ + styles$P, + styles$Q, + styles$N, +]; +MdFilledTonalButton = __decorate([ + t$3('md-filled-tonal-button') +], MdFilledTonalButton); + +/** + * @license + * Copyright 2021 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +/** + * An outlined button component. + */ +class OutlinedButton extends Button { + renderElevationOrOutline() { + return x `
    `; + } +} + +/** + * @license + * Copyright 2024 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +// Generated stylesheet for ./button/internal/outlined-styles.css. +const styles$M = i$4 `:host{--_container-height: var(--md-outlined-button-container-height, 40px);--_disabled-label-text-color: var(--md-outlined-button-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-outlined-button-disabled-label-text-opacity, 0.38);--_disabled-outline-color: var(--md-outlined-button-disabled-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-outline-opacity: var(--md-outlined-button-disabled-outline-opacity, 0.12);--_focus-label-text-color: var(--md-outlined-button-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_hover-label-text-color: var(--md-outlined-button-hover-label-text-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-color: var(--md-outlined-button-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-opacity: var(--md-outlined-button-hover-state-layer-opacity, 0.08);--_label-text-color: var(--md-outlined-button-label-text-color, var(--md-sys-color-primary, #6750a4));--_label-text-font: var(--md-outlined-button-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-outlined-button-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-outlined-button-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-outlined-button-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_outline-color: var(--md-outlined-button-outline-color, var(--md-sys-color-outline, #79747e));--_outline-width: var(--md-outlined-button-outline-width, 1px);--_pressed-label-text-color: var(--md-outlined-button-pressed-label-text-color, var(--md-sys-color-primary, #6750a4));--_pressed-outline-color: var(--md-outlined-button-pressed-outline-color, var(--md-sys-color-outline, #79747e));--_pressed-state-layer-color: var(--md-outlined-button-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-opacity: var(--md-outlined-button-pressed-state-layer-opacity, 0.12);--_disabled-icon-color: var(--md-outlined-button-disabled-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-icon-opacity: var(--md-outlined-button-disabled-icon-opacity, 0.38);--_focus-icon-color: var(--md-outlined-button-focus-icon-color, var(--md-sys-color-primary, #6750a4));--_hover-icon-color: var(--md-outlined-button-hover-icon-color, var(--md-sys-color-primary, #6750a4));--_icon-color: var(--md-outlined-button-icon-color, var(--md-sys-color-primary, #6750a4));--_icon-size: var(--md-outlined-button-icon-size, 18px);--_pressed-icon-color: var(--md-outlined-button-pressed-icon-color, var(--md-sys-color-primary, #6750a4));--_container-shape-start-start: var(--md-outlined-button-container-shape-start-start, var(--md-outlined-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-start-end: var(--md-outlined-button-container-shape-start-end, var(--md-outlined-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-end: var(--md-outlined-button-container-shape-end-end, var(--md-outlined-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-start: var(--md-outlined-button-container-shape-end-start, var(--md-outlined-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_leading-space: var(--md-outlined-button-leading-space, 24px);--_trailing-space: var(--md-outlined-button-trailing-space, 24px);--_with-leading-icon-leading-space: var(--md-outlined-button-with-leading-icon-leading-space, 16px);--_with-leading-icon-trailing-space: var(--md-outlined-button-with-leading-icon-trailing-space, 24px);--_with-trailing-icon-leading-space: var(--md-outlined-button-with-trailing-icon-leading-space, 24px);--_with-trailing-icon-trailing-space: var(--md-outlined-button-with-trailing-icon-trailing-space, 16px);--_container-color: none;--_disabled-container-color: none;--_disabled-container-opacity: 0}.outline{inset:0;border-style:solid;position:absolute;box-sizing:border-box;border-color:var(--_outline-color);border-start-start-radius:var(--_container-shape-start-start);border-start-end-radius:var(--_container-shape-start-end);border-end-start-radius:var(--_container-shape-end-start);border-end-end-radius:var(--_container-shape-end-end)}:host(:active) .outline{border-color:var(--_pressed-outline-color)}:host([disabled]) .outline{border-color:var(--_disabled-outline-color);opacity:var(--_disabled-outline-opacity)}@media(forced-colors: active){:host([disabled]) .background{border-color:GrayText}:host([disabled]) .outline{opacity:1}}.outline,md-ripple{border-width:var(--_outline-width)}md-ripple{inline-size:calc(100% - 2*var(--_outline-width));block-size:calc(100% - 2*var(--_outline-width));border-style:solid;border-color:rgba(0,0,0,0)} +`; + +/** + * @license + * Copyright 2021 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +/** + * @summary Buttons help people take action, such as sending an email, sharing a + * document, or liking a comment. + * + * @description + * __Emphasis:__ Medium emphasis – For important actions that don’t distract + * from other onscreen elements. + * + * __Rationale:__ Use an outlined button for actions that need attention but + * aren’t the primary action, such as “See all” or “Add to cart.” This is also + * the button to use for giving someone the opportunity to change their mind or + * escape a flow. + * + * __Example usages:__ + * - Reply + * - View all + * - Add to cart + * - Take out of trash + * + * @final + * @suppress {visibility} + */ +let MdOutlinedButton = class MdOutlinedButton extends OutlinedButton { +}; +MdOutlinedButton.styles = [styles$P, styles$M]; +MdOutlinedButton = __decorate([ + t$3('md-outlined-button') +], MdOutlinedButton); + +/** + * @license + * Copyright 2021 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +/** + * A text button component. + */ +class TextButton extends Button { +} + +/** + * @license + * Copyright 2024 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +// Generated stylesheet for ./button/internal/text-styles.css. +const styles$L = i$4 `:host{--_container-height: var(--md-text-button-container-height, 40px);--_disabled-label-text-color: var(--md-text-button-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-text-button-disabled-label-text-opacity, 0.38);--_focus-label-text-color: var(--md-text-button-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_hover-label-text-color: var(--md-text-button-hover-label-text-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-color: var(--md-text-button-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-opacity: var(--md-text-button-hover-state-layer-opacity, 0.08);--_label-text-color: var(--md-text-button-label-text-color, var(--md-sys-color-primary, #6750a4));--_label-text-font: var(--md-text-button-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-text-button-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-text-button-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-text-button-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_pressed-label-text-color: var(--md-text-button-pressed-label-text-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-color: var(--md-text-button-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-opacity: var(--md-text-button-pressed-state-layer-opacity, 0.12);--_disabled-icon-color: var(--md-text-button-disabled-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-icon-opacity: var(--md-text-button-disabled-icon-opacity, 0.38);--_focus-icon-color: var(--md-text-button-focus-icon-color, var(--md-sys-color-primary, #6750a4));--_hover-icon-color: var(--md-text-button-hover-icon-color, var(--md-sys-color-primary, #6750a4));--_icon-color: var(--md-text-button-icon-color, var(--md-sys-color-primary, #6750a4));--_icon-size: var(--md-text-button-icon-size, 18px);--_pressed-icon-color: var(--md-text-button-pressed-icon-color, var(--md-sys-color-primary, #6750a4));--_container-shape-start-start: var(--md-text-button-container-shape-start-start, var(--md-text-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-start-end: var(--md-text-button-container-shape-start-end, var(--md-text-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-end: var(--md-text-button-container-shape-end-end, var(--md-text-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-start: var(--md-text-button-container-shape-end-start, var(--md-text-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_leading-space: var(--md-text-button-leading-space, 12px);--_trailing-space: var(--md-text-button-trailing-space, 12px);--_with-leading-icon-leading-space: var(--md-text-button-with-leading-icon-leading-space, 12px);--_with-leading-icon-trailing-space: var(--md-text-button-with-leading-icon-trailing-space, 16px);--_with-trailing-icon-leading-space: var(--md-text-button-with-trailing-icon-leading-space, 16px);--_with-trailing-icon-trailing-space: var(--md-text-button-with-trailing-icon-trailing-space, 12px);--_container-color: none;--_disabled-container-color: none;--_disabled-container-opacity: 0} +`; + +/** + * @license + * Copyright 2021 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +/** + * @summary Buttons help people take action, such as sending an email, sharing a + * document, or liking a comment. + * + * @description + * __Emphasis:__ Low emphasis – For optional or supplementary actions with the + * least amount of prominence + * + * __Rationale:__ Text buttons have less visual prominence, so should be used + * for low emphasis actions, such as an alternative option. + * + * __Example usages:__ + * - Learn more + * - View all + * - Change account + * - Turn on + * + * @final + * @suppress {visibility} + */ +let MdTextButton = class MdTextButton extends TextButton { +}; +MdTextButton.styles = [styles$P, styles$L]; +MdTextButton = __decorate([ + t$3('md-text-button') +], MdTextButton); + +/** + * @license + * Copyright 2021 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +/** + * Re-dispatches an event from the provided element. + * + * This function is useful for forwarding non-composed events, such as `change` + * events. + * + * @example + * class MyInput extends LitElement { + * render() { + * return html``; + * } + * + * protected redispatchEvent(event: Event) { + * redispatchEvent(this, event); + * } + * } + * + * @param element The element to dispatch the event from. + * @param event The event to re-dispatch. + * @return Whether or not the event was dispatched (if cancelable). + */ +function redispatchEvent(element, event) { + // For bubbling events in SSR light DOM (or composed), stop their propagation + // and dispatch the copy. + if (event.bubbles && (!element.shadowRoot || event.composed)) { + event.stopPropagation(); + } + const copy = Reflect.construct(event.constructor, [event.type, event]); + const dispatched = element.dispatchEvent(copy); + if (!dispatched) { + event.preventDefault(); + } + return dispatched; +} + +/** + * @license + * Copyright 2023 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +/** + * A symbol property used to create a constraint validation `Validator`. + * Required for all `mixinConstraintValidation()` elements. + */ +const createValidator = Symbol('createValidator'); +/** + * A symbol property used to return an anchor for constraint validation popups. + * Required for all `mixinConstraintValidation()` elements. + */ +const getValidityAnchor = Symbol('getValidityAnchor'); +// Private symbol members, used to avoid name clashing. +const privateValidator = Symbol('privateValidator'); +const privateSyncValidity = Symbol('privateSyncValidity'); +const privateCustomValidationMessage = Symbol('privateCustomValidationMessage'); +/** + * Mixes in constraint validation APIs for an element. + * + * See https://developer.mozilla.org/en-US/docs/Web/HTML/Constraint_validation + * for more details. + * + * Implementations must provide a validator to cache and compute its validity, + * along with a shadow root element to anchor validation popups to. + * + * @example + * ```ts + * const baseClass = mixinConstraintValidation( + * mixinFormAssociated(mixinElementInternals(LitElement)) + * ); + * + * class MyCheckbox extends baseClass { + * \@property({type: Boolean}) checked = false; + * \@property({type: Boolean}) required = false; + * + * [createValidator]() { + * return new CheckboxValidator(() => this); + * } + * + * [getValidityAnchor]() { + * return this.renderRoot.querySelector('.root'); + * } + * } + * ``` + * + * @param base The class to mix functionality into. + * @return The provided class with `ConstraintValidation` mixed in. + */ +function mixinConstraintValidation(base) { + var _a; + class ConstraintValidationElement extends base { + constructor() { + super(...arguments); + /** + * Needed for Safari, see https://bugs.webkit.org/show_bug.cgi?id=261432 + * Replace with this[internals].validity.customError when resolved. + */ + this[_a] = ''; + } + get validity() { + this[privateSyncValidity](); + return this[internals].validity; + } + get validationMessage() { + this[privateSyncValidity](); + return this[internals].validationMessage; + } + get willValidate() { + this[privateSyncValidity](); + return this[internals].willValidate; + } + checkValidity() { + this[privateSyncValidity](); + return this[internals].checkValidity(); + } + reportValidity() { + this[privateSyncValidity](); + return this[internals].reportValidity(); + } + setCustomValidity(error) { + this[privateCustomValidationMessage] = error; + this[privateSyncValidity](); + } + requestUpdate(name, oldValue, options) { + super.requestUpdate(name, oldValue, options); + this[privateSyncValidity](); + } + firstUpdated(changed) { + super.firstUpdated(changed); + // Sync the validity again when the element first renders, since the + // validity anchor is now available. + // + // Elements that `delegatesFocus: true` to an `` will throw an + // error in Chrome and Safari when a form tries to submit or call + // `form.reportValidity()`: + // "An invalid form control with name='' is not focusable" + // + // The validity anchor MUST be provided in `internals.setValidity()` and + // MUST be the `` element rendered. + // + // See https://lit.dev/playground/#gist=6c26e418e0010f7a5aac15005cde8bde + // for a reproduction. + this[privateSyncValidity](); + } + [(_a = privateCustomValidationMessage, privateSyncValidity)]() { + if (!this[privateValidator]) { + this[privateValidator] = this[createValidator](); + } + const { validity, validationMessage: nonCustomValidationMessage } = this[privateValidator].getValidity(); + const customError = !!this[privateCustomValidationMessage]; + const validationMessage = this[privateCustomValidationMessage] || nonCustomValidationMessage; + this[internals].setValidity({ ...validity, customError }, validationMessage, this[getValidityAnchor]() ?? undefined); + } + [createValidator]() { + throw new Error('Implement [createValidator]'); + } + [getValidityAnchor]() { + throw new Error('Implement [getValidityAnchor]'); + } + } + return ConstraintValidationElement; +} + +/** + * @license + * Copyright 2023 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +/** + * A symbol property to retrieve the form value for an element. + */ +const getFormValue = Symbol('getFormValue'); +/** + * A symbol property to retrieve the form state for an element. + */ +const getFormState = Symbol('getFormState'); +/** + * Mixes in form-associated behavior for a class. This allows an element to add + * values to `
    ` elements. + * + * Implementing classes should provide a `[formValue]` to return the current + * value of the element, as well as reset and restore callbacks. + * + * @example + * ```ts + * const base = mixinFormAssociated(mixinElementInternals(LitElement)); + * + * class MyControl extends base { + * \@property() + * value = ''; + * + * override [getFormValue]() { + * return this.value; + * } + * + * override formResetCallback() { + * const defaultValue = this.getAttribute('value'); + * this.value = defaultValue; + * } + * + * override formStateRestoreCallback(state: string) { + * this.value = state; + * } + * } + * ``` + * + * Elements may optionally provide a `[formState]` if their values do not + * represent the state of the component. + * + * @example + * ```ts + * const base = mixinFormAssociated(mixinElementInternals(LitElement)); + * + * class MyCheckbox extends base { + * \@property() + * value = 'on'; + * + * \@property({type: Boolean}) + * checked = false; + * + * override [getFormValue]() { + * return this.checked ? this.value : null; + * } + * + * override [getFormState]() { + * return String(this.checked); + * } + * + * override formResetCallback() { + * const defaultValue = this.hasAttribute('checked'); + * this.checked = defaultValue; + * } + * + * override formStateRestoreCallback(state: string) { + * this.checked = Boolean(state); + * } + * } + * ``` + * + * IMPORTANT: Requires declares for lit-analyzer + * @example + * ```ts + * const base = mixinFormAssociated(mixinElementInternals(LitElement)); + * class MyControl extends base { + * // Writable mixin properties for lit-html binding, needed for lit-analyzer + * declare disabled: boolean; + * declare name: string; + * } + * ``` + * + * @param base The class to mix functionality into. The base class must use + * `mixinElementInternals()`. + * @return The provided class with `FormAssociated` mixed in. + */ +function mixinFormAssociated(base) { + class FormAssociatedElement extends base { + get form() { + return this[internals].form; + } + get labels() { + return this[internals].labels; + } + // Use @property for the `name` and `disabled` properties to add them to the + // `observedAttributes` array and trigger `attributeChangedCallback()`. + // + // We don't use Lit's default getter/setter (`noAccessor: true`) because + // the attributes need to be updated synchronously to work with synchronous + // form APIs, and Lit updates attributes async by default. + get name() { + return this.getAttribute('name') ?? ''; + } + set name(name) { + // Note: setting name to null or empty does not remove the attribute. + this.setAttribute('name', name); + // We don't need to call `requestUpdate()` since it's called synchronously + // in `attributeChangedCallback()`. + } + get disabled() { + return this.hasAttribute('disabled'); + } + set disabled(disabled) { + this.toggleAttribute('disabled', disabled); + // We don't need to call `requestUpdate()` since it's called synchronously + // in `attributeChangedCallback()`. + } + attributeChangedCallback(name, old, value) { + // Manually `requestUpdate()` for `name` and `disabled` when their + // attribute or property changes. + // The properties update their attributes, so this callback is invoked + // immediately when the properties are set. We call `requestUpdate()` here + // instead of letting Lit set the properties from the attribute change. + // That would cause the properties to re-set the attribute and invoke this + // callback again in a loop. This leads to stale state when Lit tries to + // determine if a property changed or not. + if (name === 'name' || name === 'disabled') { + // Disabled's value is only false if the attribute is missing and null. + const oldValue = name === 'disabled' ? old !== null : old; + // Trigger a lit update when the attribute changes. + this.requestUpdate(name, oldValue); + return; + } + super.attributeChangedCallback(name, old, value); + } + requestUpdate(name, oldValue, options) { + super.requestUpdate(name, oldValue, options); + // If any properties change, update the form value, which may have changed + // as well. + // Update the form value synchronously in `requestUpdate()` rather than + // `update()` or `updated()`, which are async. This is necessary to ensure + // that form data is updated in time for synchronous event listeners. + this[internals].setFormValue(this[getFormValue](), this[getFormState]()); + } + [getFormValue]() { + // Closure does not allow abstract symbol members, so a default + // implementation is needed. + throw new Error('Implement [getFormValue]'); + } + [getFormState]() { + return this[getFormValue](); + } + formDisabledCallback(disabled) { + this.disabled = disabled; + } + } + /** @nocollapse */ + FormAssociatedElement.formAssociated = true; + __decorate([ + n$5({ noAccessor: true }) + ], FormAssociatedElement.prototype, "name", null); + __decorate([ + n$5({ type: Boolean, noAccessor: true }) + ], FormAssociatedElement.prototype, "disabled", null); + return FormAssociatedElement; +} + +/** + * @license + * Copyright 2023 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +/** + * A class that computes and caches `ValidityStateFlags` for a component with + * a given `State` interface. + * + * Cached performance before computing validity is important since constraint + * validation must be checked frequently and synchronously when properties + * change. + * + * @template State The expected interface of properties relevant to constraint + * validation. + */ +class Validator { + /** + * Creates a new validator. + * + * @param getCurrentState A callback that returns the current state of + * constraint validation-related properties. + */ + constructor(getCurrentState) { + this.getCurrentState = getCurrentState; + /** + * The current validity state and message. This is cached and returns if + * constraint validation state does not change. + */ + this.currentValidity = { + validity: {}, + validationMessage: '', + }; + } + /** + * Returns the current `ValidityStateFlags` and validation message for the + * validator. + * + * If the constraint validation state has not changed, this will return a + * cached result. This is important since `getValidity()` can be called + * frequently in response to synchronous property changes. + * + * @return The current validity and validation message. + */ + getValidity() { + const state = this.getCurrentState(); + const hasStateChanged = !this.prevState || !this.equals(this.prevState, state); + if (!hasStateChanged) { + return this.currentValidity; + } + const { validity, validationMessage } = this.computeValidity(state); + this.prevState = this.copy(state); + this.currentValidity = { + validationMessage, + validity: { + // Change any `ValidityState` instances into `ValidityStateFlags` since + // `ValidityState` cannot be easily `{...spread}`. + badInput: validity.badInput, + customError: validity.customError, + patternMismatch: validity.patternMismatch, + rangeOverflow: validity.rangeOverflow, + rangeUnderflow: validity.rangeUnderflow, + stepMismatch: validity.stepMismatch, + tooLong: validity.tooLong, + tooShort: validity.tooShort, + typeMismatch: validity.typeMismatch, + valueMissing: validity.valueMissing, + }, + }; + return this.currentValidity; + } +} + +/** + * @license + * Copyright 2023 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +/** + * A validator that provides constraint validation that emulates + * `` validation. + */ +class CheckboxValidator extends Validator { + computeValidity(state) { + if (!this.checkboxControl) { + // Lazily create the platform input + this.checkboxControl = document.createElement('input'); + this.checkboxControl.type = 'checkbox'; + } + this.checkboxControl.checked = state.checked; + this.checkboxControl.required = state.required; + return { + validity: this.checkboxControl.validity, + validationMessage: this.checkboxControl.validationMessage, + }; + } + equals(prev, next) { + return prev.checked === next.checked && prev.required === next.required; + } + copy({ checked, required }) { + return { checked, required }; + } +} + +/** + * @license + * Copyright 2019 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +// Separate variable needed for closure. +const checkboxBaseClass = mixinConstraintValidation(mixinFormAssociated(mixinElementInternals(s$1))); +/** + * A checkbox component. + * + * + * @fires change {Event} The native `change` event on + * [``](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/change_event) + * --bubbles + * @fires input {InputEvent} The native `input` event on + * [``](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/input_event) + * --bubbles --composed + */ +class Checkbox extends checkboxBaseClass { + constructor() { + super(); + /** + * Whether or not the checkbox is selected. + */ + this.checked = false; + /** + * Whether or not the checkbox is indeterminate. + * + * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/checkbox#indeterminate_state_checkboxes + */ + this.indeterminate = false; + /** + * When true, require the checkbox to be selected when participating in + * form submission. + * + * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/checkbox#validation + */ + this.required = false; + /** + * The value of the checkbox that is submitted with a form when selected. + * + * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/checkbox#value + */ + this.value = 'on'; + this.prevChecked = false; + this.prevDisabled = false; + this.prevIndeterminate = false; + { + this.addEventListener('click', (event) => { + if (!isActivationClick(event) || !this.input) { + return; + } + this.focus(); + dispatchActivationClick(this.input); + }); + } + } + update(changed) { + if (changed.has('checked') || + changed.has('disabled') || + changed.has('indeterminate')) { + this.prevChecked = changed.get('checked') ?? this.checked; + this.prevDisabled = changed.get('disabled') ?? this.disabled; + this.prevIndeterminate = + changed.get('indeterminate') ?? this.indeterminate; + } + super.update(changed); + } + render() { + const prevNone = !this.prevChecked && !this.prevIndeterminate; + const prevChecked = this.prevChecked && !this.prevIndeterminate; + const prevIndeterminate = this.prevIndeterminate; + const isChecked = this.checked && !this.indeterminate; + const isIndeterminate = this.indeterminate; + const containerClasses = e$1({ + 'disabled': this.disabled, + 'selected': isChecked || isIndeterminate, + 'unselected': !isChecked && !isIndeterminate, + 'checked': isChecked, + 'indeterminate': isIndeterminate, + 'prev-unselected': prevNone, + 'prev-checked': prevChecked, + 'prev-indeterminate': prevIndeterminate, + 'prev-disabled': this.prevDisabled, + }); + // Needed for closure conformance + const { ariaLabel, ariaInvalid } = this; + // Note: needs to be rendered before the for + // form.reportValidity() to work in Chrome. + return x ` +
    + + +
    +
    + + + +
    + `; + } + handleInput(event) { + const target = event.target; + this.checked = target.checked; + this.indeterminate = target.indeterminate; + // 'input' event bubbles and is composed, don't re-dispatch it. + } + handleChange(event) { + // 'change' event is not composed, re-dispatch it. + redispatchEvent(this, event); + } + [getFormValue]() { + if (!this.checked || this.indeterminate) { + return null; + } + return this.value; + } + [getFormState]() { + return String(this.checked); + } + formResetCallback() { + // The checked property does not reflect, so the original attribute set by + // the user is used to determine the default value. + this.checked = this.hasAttribute('checked'); + } + formStateRestoreCallback(state) { + this.checked = state === 'true'; + } + [createValidator]() { + return new CheckboxValidator(() => this); + } + [getValidityAnchor]() { + return this.input; + } +} +(() => { + requestUpdateOnAriaChange(Checkbox); +})(); +/** @nocollapse */ +Checkbox.shadowRootOptions = { + ...s$1.shadowRootOptions, + delegatesFocus: true, +}; +__decorate([ + n$5({ type: Boolean }) +], Checkbox.prototype, "checked", void 0); +__decorate([ + n$5({ type: Boolean }) +], Checkbox.prototype, "indeterminate", void 0); +__decorate([ + n$5({ type: Boolean }) +], Checkbox.prototype, "required", void 0); +__decorate([ + n$5() +], Checkbox.prototype, "value", void 0); +__decorate([ + r$4() +], Checkbox.prototype, "prevChecked", void 0); +__decorate([ + r$4() +], Checkbox.prototype, "prevDisabled", void 0); +__decorate([ + r$4() +], Checkbox.prototype, "prevIndeterminate", void 0); +__decorate([ + e$5('input') +], Checkbox.prototype, "input", void 0); + +/** + * @license + * Copyright 2024 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +// Generated stylesheet for ./checkbox/internal/checkbox-styles.css. +const styles$K = i$4 `:host{border-start-start-radius:var(--md-checkbox-container-shape-start-start, var(--md-checkbox-container-shape, 2px));border-start-end-radius:var(--md-checkbox-container-shape-start-end, var(--md-checkbox-container-shape, 2px));border-end-end-radius:var(--md-checkbox-container-shape-end-end, var(--md-checkbox-container-shape, 2px));border-end-start-radius:var(--md-checkbox-container-shape-end-start, var(--md-checkbox-container-shape, 2px));display:inline-flex;height:var(--md-checkbox-container-size, 18px);position:relative;vertical-align:top;width:var(--md-checkbox-container-size, 18px);-webkit-tap-highlight-color:rgba(0,0,0,0);cursor:pointer}:host([disabled]){cursor:default}:host([touch-target=wrapper]){margin:max(0px,(48px - var(--md-checkbox-container-size, 18px))/2)}md-focus-ring{height:44px;inset:unset;width:44px}input{appearance:none;height:48px;margin:0;opacity:0;outline:none;position:absolute;width:48px;z-index:1;cursor:inherit}:host([touch-target=none]) input{height:100%;width:100%}.container{border-radius:inherit;display:flex;height:100%;place-content:center;place-items:center;position:relative;width:100%}.outline,.background,.icon{inset:0;position:absolute}.outline,.background{border-radius:inherit}.outline{border-color:var(--md-checkbox-outline-color, var(--md-sys-color-on-surface-variant, #49454f));border-style:solid;border-width:var(--md-checkbox-outline-width, 2px);box-sizing:border-box}.background{background-color:var(--md-checkbox-selected-container-color, var(--md-sys-color-primary, #6750a4))}.background,.icon{opacity:0;transition-duration:150ms,50ms;transition-property:transform,opacity;transition-timing-function:cubic-bezier(0.3, 0, 0.8, 0.15),linear;transform:scale(0.6)}:where(.selected) :is(.background,.icon){opacity:1;transition-duration:350ms,50ms;transition-timing-function:cubic-bezier(0.05, 0.7, 0.1, 1),linear;transform:scale(1)}md-ripple{border-radius:var(--md-checkbox-state-layer-shape, var(--md-sys-shape-corner-full, 9999px));height:var(--md-checkbox-state-layer-size, 40px);inset:unset;width:var(--md-checkbox-state-layer-size, 40px);--md-ripple-hover-color: var(--md-checkbox-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-hover-opacity: var(--md-checkbox-hover-state-layer-opacity, 0.08);--md-ripple-pressed-color: var(--md-checkbox-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--md-ripple-pressed-opacity: var(--md-checkbox-pressed-state-layer-opacity, 0.12)}.selected md-ripple{--md-ripple-hover-color: var(--md-checkbox-selected-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--md-ripple-hover-opacity: var(--md-checkbox-selected-hover-state-layer-opacity, 0.08);--md-ripple-pressed-color: var(--md-checkbox-selected-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-pressed-opacity: var(--md-checkbox-selected-pressed-state-layer-opacity, 0.12)}.icon{fill:var(--md-checkbox-selected-icon-color, var(--md-sys-color-on-primary, #fff));height:var(--md-checkbox-icon-size, 18px);width:var(--md-checkbox-icon-size, 18px)}.mark.short{height:2px;transition-property:transform,height;width:2px}.mark.long{height:2px;transition-property:transform,width;width:10px}.mark{animation-duration:150ms;animation-timing-function:cubic-bezier(0.3, 0, 0.8, 0.15);transition-duration:150ms;transition-timing-function:cubic-bezier(0.3, 0, 0.8, 0.15)}.selected .mark{animation-duration:350ms;animation-timing-function:cubic-bezier(0.05, 0.7, 0.1, 1);transition-duration:350ms;transition-timing-function:cubic-bezier(0.05, 0.7, 0.1, 1)}.checked .mark,.prev-checked.unselected .mark{transform:scaleY(-1) translate(7px, -14px) rotate(45deg)}.checked .mark.short,.prev-checked.unselected .mark.short{height:5.6568542495px}.checked .mark.long,.prev-checked.unselected .mark.long{width:11.313708499px}.indeterminate .mark,.prev-indeterminate.unselected .mark{transform:scaleY(-1) translate(4px, -10px) rotate(0deg)}.prev-unselected .mark{transition-property:none}.prev-unselected.checked .mark.long{animation-name:prev-unselected-to-checked}@keyframes prev-unselected-to-checked{from{width:0}}:where(:hover) .outline{border-color:var(--md-checkbox-hover-outline-color, var(--md-sys-color-on-surface, #1d1b20));border-width:var(--md-checkbox-hover-outline-width, 2px)}:where(:hover) .background{background:var(--md-checkbox-selected-hover-container-color, var(--md-sys-color-primary, #6750a4))}:where(:hover) .icon{fill:var(--md-checkbox-selected-hover-icon-color, var(--md-sys-color-on-primary, #fff))}:where(:focus-within) .outline{border-color:var(--md-checkbox-focus-outline-color, var(--md-sys-color-on-surface, #1d1b20));border-width:var(--md-checkbox-focus-outline-width, 2px)}:where(:focus-within) .background{background:var(--md-checkbox-selected-focus-container-color, var(--md-sys-color-primary, #6750a4))}:where(:focus-within) .icon{fill:var(--md-checkbox-selected-focus-icon-color, var(--md-sys-color-on-primary, #fff))}:where(:active) .outline{border-color:var(--md-checkbox-pressed-outline-color, var(--md-sys-color-on-surface, #1d1b20));border-width:var(--md-checkbox-pressed-outline-width, 2px)}:where(:active) .background{background:var(--md-checkbox-selected-pressed-container-color, var(--md-sys-color-primary, #6750a4))}:where(:active) .icon{fill:var(--md-checkbox-selected-pressed-icon-color, var(--md-sys-color-on-primary, #fff))}:where(.disabled,.prev-disabled) :is(.background,.icon,.mark){animation-duration:0s;transition-duration:0s}:where(.disabled) .outline{border-color:var(--md-checkbox-disabled-outline-color, var(--md-sys-color-on-surface, #1d1b20));border-width:var(--md-checkbox-disabled-outline-width, 2px);opacity:var(--md-checkbox-disabled-container-opacity, 0.38)}:where(.selected.disabled) .outline{visibility:hidden}:where(.selected.disabled) .background{background:var(--md-checkbox-selected-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));opacity:var(--md-checkbox-selected-disabled-container-opacity, 0.38)}:where(.disabled) .icon{fill:var(--md-checkbox-selected-disabled-icon-color, var(--md-sys-color-surface, #fef7ff))}@media(forced-colors: active){.background{background-color:CanvasText}.selected.disabled .background{background-color:GrayText;opacity:1}.outline{border-color:CanvasText}.disabled .outline{border-color:GrayText;opacity:1}.icon{fill:Canvas}} +`; + +/** + * @license + * Copyright 2018 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +/** + * @summary Checkboxes allow users to select one or more items from a set. + * Checkboxes can turn an option on or off. + * + * @description + * Use checkboxes to: + * - Select one or more options from a list + * - Present a list containing sub-selections + * - Turn an item on or off in a desktop environment + * + * @final + * @suppress {visibility} + */ +let MdCheckbox = class MdCheckbox extends Checkbox { +}; +MdCheckbox.styles = [styles$K]; +MdCheckbox = __decorate([ + t$3('md-checkbox') +], MdCheckbox); + +/** + * @license + * Copyright 2023 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +/** + * A chip component. + * + * @fires update-focus {Event} Dispatched when `disabled` is toggled. --bubbles + */ +class Chip extends s$1 { + constructor() { + super(...arguments); + /** + * Whether or not the chip is disabled. + * + * Disabled chips are not focusable, unless `always-focusable` is set. + */ + this.disabled = false; + /** + * When true, allow disabled chips to be focused with arrow keys. + * + * Add this when a chip needs increased visibility when disabled. See + * https://www.w3.org/WAI/ARIA/apg/practices/keyboard-interface/#kbd_disabled_controls + * for more guidance on when this is needed. + */ + this.alwaysFocusable = false; + /** + * The label of the chip. + */ + this.label = ''; + /** + * Only needed for SSR. + * + * Add this attribute when a chip has a `slot="icon"` to avoid a Flash Of + * Unstyled Content. + */ + this.hasIcon = false; + } + /** + * Whether or not the primary ripple is disabled (defaults to `disabled`). + * Some chip actions such as links cannot be disabled. + */ + get rippleDisabled() { + return this.disabled; + } + focus(options) { + if (this.disabled && !this.alwaysFocusable) { + return; + } + super.focus(options); + } + render() { + return x ` +
    + ${this.renderContainerContent()} +
    + `; + } + updated(changed) { + if (changed.has('disabled') && changed.get('disabled') !== undefined) { + this.dispatchEvent(new Event('update-focus', { bubbles: true })); + } + } + getContainerClasses() { + return { + 'disabled': this.disabled, + 'has-icon': this.hasIcon, + }; + } + renderContainerContent() { + return x ` + ${this.renderOutline()} + + + ${this.renderPrimaryAction(this.renderPrimaryContent())} + `; + } + renderOutline() { + return x ``; + } + renderLeadingIcon() { + return x ``; + } + renderPrimaryContent() { + return x ` + + ${this.label} + + `; + } + handleIconChange(event) { + const slot = event.target; + this.hasIcon = slot.assignedElements({ flatten: true }).length > 0; + } +} +(() => { + requestUpdateOnAriaChange(Chip); +})(); +/** @nocollapse */ +Chip.shadowRootOptions = { + ...s$1.shadowRootOptions, + delegatesFocus: true, +}; +__decorate([ + n$5({ type: Boolean, reflect: true }) +], Chip.prototype, "disabled", void 0); +__decorate([ + n$5({ type: Boolean, attribute: 'always-focusable' }) +], Chip.prototype, "alwaysFocusable", void 0); +__decorate([ + n$5() +], Chip.prototype, "label", void 0); +__decorate([ + n$5({ type: Boolean, reflect: true, attribute: 'has-icon' }) +], Chip.prototype, "hasIcon", void 0); + +/** + * @license + * Copyright 2023 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +/** + * An assist chip component. + */ +class AssistChip extends Chip { + constructor() { + super(...arguments); + this.elevated = false; + this.href = ''; + this.target = ''; + } + get primaryId() { + return this.href ? 'link' : 'button'; + } + get rippleDisabled() { + // Link chips cannot be disabled + return !this.href && this.disabled; + } + getContainerClasses() { + return { + ...super.getContainerClasses(), + // Link chips cannot be disabled + disabled: !this.href && this.disabled, + elevated: this.elevated, + link: !!this.href, + }; + } + renderPrimaryAction(content) { + const { ariaLabel } = this; + if (this.href) { + return x ` + ${content} + `; + } + return x ` + + `; + } + renderOutline() { + if (this.elevated) { + return x ``; + } + return super.renderOutline(); + } +} +__decorate([ + n$5({ type: Boolean }) +], AssistChip.prototype, "elevated", void 0); +__decorate([ + n$5() +], AssistChip.prototype, "href", void 0); +__decorate([ + n$5() +], AssistChip.prototype, "target", void 0); + +/** + * @license + * Copyright 2024 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +// Generated stylesheet for ./chips/internal/assist-styles.css. +const styles$J = i$4 `:host{--_container-height: var(--md-assist-chip-container-height, 32px);--_disabled-label-text-color: var(--md-assist-chip-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-assist-chip-disabled-label-text-opacity, 0.38);--_elevated-container-color: var(--md-assist-chip-elevated-container-color, var(--md-sys-color-surface-container-low, #f7f2fa));--_elevated-container-elevation: var(--md-assist-chip-elevated-container-elevation, 1);--_elevated-container-shadow-color: var(--md-assist-chip-elevated-container-shadow-color, var(--md-sys-color-shadow, #000));--_elevated-disabled-container-color: var(--md-assist-chip-elevated-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));--_elevated-disabled-container-elevation: var(--md-assist-chip-elevated-disabled-container-elevation, 0);--_elevated-disabled-container-opacity: var(--md-assist-chip-elevated-disabled-container-opacity, 0.12);--_elevated-focus-container-elevation: var(--md-assist-chip-elevated-focus-container-elevation, 1);--_elevated-hover-container-elevation: var(--md-assist-chip-elevated-hover-container-elevation, 2);--_elevated-pressed-container-elevation: var(--md-assist-chip-elevated-pressed-container-elevation, 1);--_focus-label-text-color: var(--md-assist-chip-focus-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-label-text-color: var(--md-assist-chip-hover-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-state-layer-color: var(--md-assist-chip-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-state-layer-opacity: var(--md-assist-chip-hover-state-layer-opacity, 0.08);--_label-text-color: var(--md-assist-chip-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_label-text-font: var(--md-assist-chip-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-assist-chip-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-assist-chip-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-assist-chip-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_pressed-label-text-color: var(--md-assist-chip-pressed-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_pressed-state-layer-color: var(--md-assist-chip-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_pressed-state-layer-opacity: var(--md-assist-chip-pressed-state-layer-opacity, 0.12);--_disabled-outline-color: var(--md-assist-chip-disabled-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-outline-opacity: var(--md-assist-chip-disabled-outline-opacity, 0.12);--_focus-outline-color: var(--md-assist-chip-focus-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_outline-color: var(--md-assist-chip-outline-color, var(--md-sys-color-outline, #79747e));--_outline-width: var(--md-assist-chip-outline-width, 1px);--_disabled-leading-icon-color: var(--md-assist-chip-disabled-leading-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-leading-icon-opacity: var(--md-assist-chip-disabled-leading-icon-opacity, 0.38);--_focus-leading-icon-color: var(--md-assist-chip-focus-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_hover-leading-icon-color: var(--md-assist-chip-hover-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_leading-icon-color: var(--md-assist-chip-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_icon-size: var(--md-assist-chip-icon-size, 18px);--_pressed-leading-icon-color: var(--md-assist-chip-pressed-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_container-shape-start-start: var(--md-assist-chip-container-shape-start-start, var(--md-assist-chip-container-shape, var(--md-sys-shape-corner-small, 8px)));--_container-shape-start-end: var(--md-assist-chip-container-shape-start-end, var(--md-assist-chip-container-shape, var(--md-sys-shape-corner-small, 8px)));--_container-shape-end-end: var(--md-assist-chip-container-shape-end-end, var(--md-assist-chip-container-shape, var(--md-sys-shape-corner-small, 8px)));--_container-shape-end-start: var(--md-assist-chip-container-shape-end-start, var(--md-assist-chip-container-shape, var(--md-sys-shape-corner-small, 8px)));--_leading-space: var(--md-assist-chip-leading-space, 16px);--_trailing-space: var(--md-assist-chip-trailing-space, 16px);--_icon-label-space: var(--md-assist-chip-icon-label-space, 8px);--_with-leading-icon-leading-space: var(--md-assist-chip-with-leading-icon-leading-space, 8px)}@media(forced-colors: active){.link .outline{border-color:ActiveText}} +`; + +/** + * @license + * Copyright 2024 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +// Generated stylesheet for ./chips/internal/elevated-styles.css. +const styles$I = i$4 `.elevated{--md-elevation-level: var(--_elevated-container-elevation);--md-elevation-shadow-color: var(--_elevated-container-shadow-color)}.elevated::before{background:var(--_elevated-container-color)}.elevated:hover{--md-elevation-level: var(--_elevated-hover-container-elevation)}.elevated:focus-within{--md-elevation-level: var(--_elevated-focus-container-elevation)}.elevated:active{--md-elevation-level: var(--_elevated-pressed-container-elevation)}.elevated.disabled{--md-elevation-level: var(--_elevated-disabled-container-elevation)}.elevated.disabled::before{background:var(--_elevated-disabled-container-color);opacity:var(--_elevated-disabled-container-opacity)}@media(forced-colors: active){.elevated md-elevation{border:1px solid CanvasText}.elevated.disabled md-elevation{border-color:GrayText}} +`; + +/** + * @license + * Copyright 2024 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +// Generated stylesheet for ./chips/internal/shared-styles.css. +const styles$H = i$4 `:host{border-start-start-radius:var(--_container-shape-start-start);border-start-end-radius:var(--_container-shape-start-end);border-end-start-radius:var(--_container-shape-end-start);border-end-end-radius:var(--_container-shape-end-end);display:inline-flex;height:var(--_container-height);cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);--md-ripple-hover-color: var(--_hover-state-layer-color);--md-ripple-hover-opacity: var(--_hover-state-layer-opacity);--md-ripple-pressed-color: var(--_pressed-state-layer-color);--md-ripple-pressed-opacity: var(--_pressed-state-layer-opacity)}:host([disabled]){pointer-events:none}:host([touch-target=wrapper]){margin:max(0px,(48px - var(--_container-height))/2) 0}md-focus-ring{--md-focus-ring-shape-start-start: var(--_container-shape-start-start);--md-focus-ring-shape-start-end: var(--_container-shape-start-end);--md-focus-ring-shape-end-end: var(--_container-shape-end-end);--md-focus-ring-shape-end-start: var(--_container-shape-end-start)}.container{border-radius:inherit;box-sizing:border-box;display:flex;height:100%;position:relative;width:100%}.container::before{border-radius:inherit;content:"";inset:0;pointer-events:none;position:absolute}.container:not(.disabled){cursor:pointer}.container.disabled{pointer-events:none}.cell{display:flex}.action{align-items:baseline;appearance:none;background:none;border:none;border-radius:inherit;display:flex;outline:none;padding:0;position:relative;text-decoration:none}.primary.action{padding-inline-start:var(--_leading-space);padding-inline-end:var(--_trailing-space)}.has-icon .primary.action{padding-inline-start:var(--_with-leading-icon-leading-space)}.touch{height:48px;inset:50% 0 0;position:absolute;transform:translateY(-50%);width:100%}:host([touch-target=none]) .touch{display:none}.outline{border:var(--_outline-width) solid var(--_outline-color);border-radius:inherit;inset:0;pointer-events:none;position:absolute}:where(:focus) .outline{border-color:var(--_focus-outline-color)}:where(.disabled) .outline{border-color:var(--_disabled-outline-color);opacity:var(--_disabled-outline-opacity)}md-ripple{border-radius:inherit}.label,.icon,.touch{z-index:1}.label{align-items:center;color:var(--_label-text-color);display:flex;font-family:var(--_label-text-font);font-size:var(--_label-text-size);line-height:var(--_label-text-line-height);font-weight:var(--_label-text-weight);height:100%;text-overflow:ellipsis;user-select:none;white-space:nowrap}:where(:hover) .label{color:var(--_hover-label-text-color)}:where(:focus) .label{color:var(--_focus-label-text-color)}:where(:active) .label{color:var(--_pressed-label-text-color)}:where(.disabled) .label{color:var(--_disabled-label-text-color);opacity:var(--_disabled-label-text-opacity)}.icon{align-self:center;display:flex;fill:currentColor;position:relative}.icon ::slotted(:first-child){font-size:var(--_icon-size);height:var(--_icon-size);width:var(--_icon-size)}.leading.icon{color:var(--_leading-icon-color)}.leading.icon ::slotted(*),.leading.icon svg{margin-inline-end:var(--_icon-label-space)}:where(:hover) .leading.icon{color:var(--_hover-leading-icon-color)}:where(:focus) .leading.icon{color:var(--_focus-leading-icon-color)}:where(:active) .leading.icon{color:var(--_pressed-leading-icon-color)}:where(.disabled) .leading.icon{color:var(--_disabled-leading-icon-color);opacity:var(--_disabled-leading-icon-opacity)}@media(forced-colors: active){:where(.disabled) :is(.label,.outline,.leading.icon){color:GrayText;opacity:1}}a,button{text-transform:inherit}a,button:not(:disabled){cursor:inherit} +`; + +/** + * @license + * Copyright 2023 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +/** + * TODO(b/243982145): add docs + * + * @final + * @suppress {visibility} + */ +let MdAssistChip = class MdAssistChip extends AssistChip { +}; +MdAssistChip.styles = [styles$H, styles$I, styles$J]; +MdAssistChip = __decorate([ + t$3('md-assist-chip') +], MdAssistChip); + +/** + * @license + * Copyright 2023 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +/** + * A chip set component. + */ +class ChipSet extends s$1 { + get chips() { + return this.childElements.filter((child) => child instanceof Chip); + } + constructor() { + super(); + this.internals = + // Cast needed for closure + this.attachInternals(); + { + this.addEventListener('focusin', this.updateTabIndices.bind(this)); + this.addEventListener('update-focus', this.updateTabIndices.bind(this)); + this.addEventListener('keydown', this.handleKeyDown.bind(this)); + this.internals.role = 'toolbar'; + } + } + render() { + return x ``; + } + handleKeyDown(event) { + const isLeft = event.key === 'ArrowLeft'; + const isRight = event.key === 'ArrowRight'; + const isHome = event.key === 'Home'; + const isEnd = event.key === 'End'; + // Ignore non-navigation keys + if (!isLeft && !isRight && !isHome && !isEnd) { + return; + } + const { chips } = this; + // Don't try to select another chip if there aren't any. + if (chips.length < 2) { + return; + } + // Prevent default interactions, such as scrolling. + event.preventDefault(); + if (isHome || isEnd) { + const index = isHome ? 0 : chips.length - 1; + chips[index].focus({ trailing: isEnd }); + this.updateTabIndices(); + return; + } + // Check if moving forwards or backwards + const isRtl = getComputedStyle(this).direction === 'rtl'; + const forwards = isRtl ? isLeft : isRight; + const focusedChip = chips.find((chip) => chip.matches(':focus-within')); + if (!focusedChip) { + // If there is not already a chip focused, select the first or last chip + // based on the direction we're traveling. + const nextChip = forwards ? chips[0] : chips[chips.length - 1]; + nextChip.focus({ trailing: !forwards }); + this.updateTabIndices(); + return; + } + const currentIndex = chips.indexOf(focusedChip); + let nextIndex = forwards ? currentIndex + 1 : currentIndex - 1; + // Search for the next sibling that is not disabled to select. + // If we return to the host index, there is nothing to select. + while (nextIndex !== currentIndex) { + if (nextIndex >= chips.length) { + // Return to start if moving past the last item. + nextIndex = 0; + } + else if (nextIndex < 0) { + // Go to end if moving before the first item. + nextIndex = chips.length - 1; + } + // Check if the next sibling is disabled. If so, + // move the index and continue searching. + // + // Some toolbar items may be focusable when disabled for increased + // visibility. + const nextChip = chips[nextIndex]; + if (nextChip.disabled && !nextChip.alwaysFocusable) { + if (forwards) { + nextIndex++; + } + else { + nextIndex--; + } + continue; + } + nextChip.focus({ trailing: !forwards }); + this.updateTabIndices(); + break; + } + } + updateTabIndices() { + // The chip that should be focusable is either the chip that currently has + // focus or the first chip that can be focused. + const { chips } = this; + let chipToFocus; + for (const chip of chips) { + const isChipFocusable = chip.alwaysFocusable || !chip.disabled; + const chipIsFocused = chip.matches(':focus-within'); + if (chipIsFocused && isChipFocusable) { + // Found the first chip that is actively focused. This overrides the + // first focusable chip found. + chipToFocus = chip; + continue; + } + if (isChipFocusable && !chipToFocus) { + chipToFocus = chip; + } + // Disable non-focused chips. If we disable all of them, we'll grant focus + // to the first focusable child that was found. + chip.tabIndex = -1; + } + if (chipToFocus) { + chipToFocus.tabIndex = 0; + } + } +} +__decorate([ + o$4() +], ChipSet.prototype, "childElements", void 0); + +/** + * @license + * Copyright 2024 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +// Generated stylesheet for ./chips/internal/chip-set-styles.css. +const styles$G = i$4 `:host{display:flex;flex-wrap:wrap;gap:8px} +`; + +/** + * @license + * Copyright 2023 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +/** + * TODO(b/243982145): add docs + * + * @final + * @suppress {visibility} + */ +let MdChipSet = class MdChipSet extends ChipSet { +}; +MdChipSet.styles = [styles$G]; +MdChipSet = __decorate([ + t$3('md-chip-set') +], MdChipSet); + +/** + * @license + * Copyright 2023 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +const ARIA_LABEL_REMOVE = 'aria-label-remove'; +/** + * A chip component with multiple actions. + */ +class MultiActionChip extends Chip { + get ariaLabelRemove() { + if (this.hasAttribute(ARIA_LABEL_REMOVE)) { + return this.getAttribute(ARIA_LABEL_REMOVE); + } + const { ariaLabel } = this; + return `Remove ${ariaLabel || this.label}`; + } + set ariaLabelRemove(ariaLabel) { + const prev = this.ariaLabelRemove; + if (ariaLabel === prev) { + return; + } + if (ariaLabel === null) { + this.removeAttribute(ARIA_LABEL_REMOVE); + } + else { + this.setAttribute(ARIA_LABEL_REMOVE, ariaLabel); + } + this.requestUpdate(); + } + constructor() { + super(); + this.handleTrailingActionFocus = this.handleTrailingActionFocus.bind(this); + { + this.addEventListener('keydown', this.handleKeyDown.bind(this)); + } + } + focus(options) { + const isFocusable = this.alwaysFocusable || !this.disabled; + if (isFocusable && options?.trailing && this.trailingAction) { + this.trailingAction.focus(options); + return; + } + super.focus(options); + } + renderContainerContent() { + return x ` + ${super.renderContainerContent()} + ${this.renderTrailingAction(this.handleTrailingActionFocus)} + `; + } + handleKeyDown(event) { + const isLeft = event.key === 'ArrowLeft'; + const isRight = event.key === 'ArrowRight'; + // Ignore non-navigation keys. + if (!isLeft && !isRight) { + return; + } + if (!this.primaryAction || !this.trailingAction) { + // Does not have multiple actions. + return; + } + // Check if moving forwards or backwards + const isRtl = getComputedStyle(this).direction === 'rtl'; + const forwards = isRtl ? isLeft : isRight; + const isPrimaryFocused = this.primaryAction?.matches(':focus-within'); + const isTrailingFocused = this.trailingAction?.matches(':focus-within'); + if ((forwards && isTrailingFocused) || (!forwards && isPrimaryFocused)) { + // Moving outside of the chip, it will be handled by the chip set. + return; + } + // Prevent default interactions, such as scrolling. + event.preventDefault(); + // Don't let the chip set handle this navigation event. + event.stopPropagation(); + const actionToFocus = forwards ? this.trailingAction : this.primaryAction; + actionToFocus.focus(); + } + handleTrailingActionFocus() { + const { primaryAction, trailingAction } = this; + if (!primaryAction || !trailingAction) { + return; + } + // Temporarily turn off the primary action's focusability. This allows + // shift+tab from the trailing action to move to the previous chip rather + // than the primary action in the same chip. + primaryAction.tabIndex = -1; + trailingAction.addEventListener('focusout', () => { + primaryAction.tabIndex = 0; + }, { once: true }); + } +} + +/** + * @license + * Copyright 2023 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +/** @protected */ +function renderRemoveButton({ ariaLabel, disabled, focusListener, tabbable = false, }) { + return x ` + + `; +} +function handleRemoveClick(event) { + if (this.disabled) { + return; + } + event.stopPropagation(); + const preventDefault = !this.dispatchEvent(new Event('remove', { cancelable: true })); + if (preventDefault) { + return; + } + this.remove(); +} + +/** + * @license + * Copyright 2023 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +/** + * A filter chip component. + * + * @fires remove {Event} Dispatched when the remove button is clicked. + */ +class FilterChip extends MultiActionChip { + constructor() { + super(...arguments); + this.elevated = false; + this.removable = false; + this.selected = false; + /** + * Only needed for SSR. + * + * Add this attribute when a filter chip has a `slot="selected-icon"` to avoid + * a Flash Of Unstyled Content. + */ + this.hasSelectedIcon = false; + } + get primaryId() { + return 'button'; + } + getContainerClasses() { + return { + ...super.getContainerClasses(), + elevated: this.elevated, + selected: this.selected, + 'has-trailing': this.removable, + 'has-icon': this.hasIcon || this.selected, + }; + } + renderPrimaryAction(content) { + const { ariaLabel } = this; + return x ` + + `; + } + renderLeadingIcon() { + if (!this.selected) { + return super.renderLeadingIcon(); + } + return x ` + + + + `; + } + renderTrailingAction(focusListener) { + if (this.removable) { + return renderRemoveButton({ + focusListener, + ariaLabel: this.ariaLabelRemove, + disabled: this.disabled, + }); + } + return T; + } + renderOutline() { + if (this.elevated) { + return x ``; + } + return super.renderOutline(); + } + handleClick(event) { + if (this.disabled) { + return; + } + // Store prevValue to revert in case `chip.selected` is changed during an + // event listener. + const prevValue = this.selected; + this.selected = !this.selected; + const preventDefault = !redispatchEvent(this, event); + if (preventDefault) { + // We should not do `this.selected = !this.selected`, since a client + // click listener could change its value. Instead, always revert to the + // original value. + this.selected = prevValue; + return; + } + } +} +__decorate([ + n$5({ type: Boolean }) +], FilterChip.prototype, "elevated", void 0); +__decorate([ + n$5({ type: Boolean }) +], FilterChip.prototype, "removable", void 0); +__decorate([ + n$5({ type: Boolean, reflect: true }) +], FilterChip.prototype, "selected", void 0); +__decorate([ + n$5({ type: Boolean, reflect: true, attribute: 'has-selected-icon' }) +], FilterChip.prototype, "hasSelectedIcon", void 0); +__decorate([ + e$5('.primary.action') +], FilterChip.prototype, "primaryAction", void 0); +__decorate([ + e$5('.trailing.action') +], FilterChip.prototype, "trailingAction", void 0); + +/** + * @license + * Copyright 2024 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +// Generated stylesheet for ./chips/internal/filter-styles.css. +const styles$F = i$4 `:host{--_container-height: var(--md-filter-chip-container-height, 32px);--_disabled-label-text-color: var(--md-filter-chip-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-filter-chip-disabled-label-text-opacity, 0.38);--_elevated-container-elevation: var(--md-filter-chip-elevated-container-elevation, 1);--_elevated-container-shadow-color: var(--md-filter-chip-elevated-container-shadow-color, var(--md-sys-color-shadow, #000));--_elevated-disabled-container-color: var(--md-filter-chip-elevated-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));--_elevated-disabled-container-elevation: var(--md-filter-chip-elevated-disabled-container-elevation, 0);--_elevated-disabled-container-opacity: var(--md-filter-chip-elevated-disabled-container-opacity, 0.12);--_elevated-focus-container-elevation: var(--md-filter-chip-elevated-focus-container-elevation, 1);--_elevated-hover-container-elevation: var(--md-filter-chip-elevated-hover-container-elevation, 2);--_elevated-pressed-container-elevation: var(--md-filter-chip-elevated-pressed-container-elevation, 1);--_elevated-selected-container-color: var(--md-filter-chip-elevated-selected-container-color, var(--md-sys-color-secondary-container, #e8def8));--_label-text-font: var(--md-filter-chip-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-filter-chip-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-filter-chip-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-filter-chip-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_selected-focus-label-text-color: var(--md-filter-chip-selected-focus-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-hover-label-text-color: var(--md-filter-chip-selected-hover-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-hover-state-layer-color: var(--md-filter-chip-selected-hover-state-layer-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-hover-state-layer-opacity: var(--md-filter-chip-selected-hover-state-layer-opacity, 0.08);--_selected-label-text-color: var(--md-filter-chip-selected-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-pressed-label-text-color: var(--md-filter-chip-selected-pressed-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-pressed-state-layer-color: var(--md-filter-chip-selected-pressed-state-layer-color, var(--md-sys-color-on-surface-variant, #49454f));--_selected-pressed-state-layer-opacity: var(--md-filter-chip-selected-pressed-state-layer-opacity, 0.12);--_elevated-container-color: var(--md-filter-chip-elevated-container-color, var(--md-sys-color-surface-container-low, #f7f2fa));--_disabled-outline-color: var(--md-filter-chip-disabled-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-outline-opacity: var(--md-filter-chip-disabled-outline-opacity, 0.12);--_disabled-selected-container-color: var(--md-filter-chip-disabled-selected-container-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-selected-container-opacity: var(--md-filter-chip-disabled-selected-container-opacity, 0.12);--_focus-outline-color: var(--md-filter-chip-focus-outline-color, var(--md-sys-color-on-surface-variant, #49454f));--_outline-color: var(--md-filter-chip-outline-color, var(--md-sys-color-outline, #79747e));--_outline-width: var(--md-filter-chip-outline-width, 1px);--_selected-container-color: var(--md-filter-chip-selected-container-color, var(--md-sys-color-secondary-container, #e8def8));--_selected-outline-width: var(--md-filter-chip-selected-outline-width, 0px);--_focus-label-text-color: var(--md-filter-chip-focus-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-label-text-color: var(--md-filter-chip-hover-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-state-layer-color: var(--md-filter-chip-hover-state-layer-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-state-layer-opacity: var(--md-filter-chip-hover-state-layer-opacity, 0.08);--_label-text-color: var(--md-filter-chip-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-label-text-color: var(--md-filter-chip-pressed-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-state-layer-color: var(--md-filter-chip-pressed-state-layer-color, var(--md-sys-color-on-secondary-container, #1d192b));--_pressed-state-layer-opacity: var(--md-filter-chip-pressed-state-layer-opacity, 0.12);--_icon-size: var(--md-filter-chip-icon-size, 18px);--_disabled-leading-icon-color: var(--md-filter-chip-disabled-leading-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-leading-icon-opacity: var(--md-filter-chip-disabled-leading-icon-opacity, 0.38);--_selected-focus-leading-icon-color: var(--md-filter-chip-selected-focus-leading-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-hover-leading-icon-color: var(--md-filter-chip-selected-hover-leading-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-leading-icon-color: var(--md-filter-chip-selected-leading-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-pressed-leading-icon-color: var(--md-filter-chip-selected-pressed-leading-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_focus-leading-icon-color: var(--md-filter-chip-focus-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_hover-leading-icon-color: var(--md-filter-chip-hover-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_leading-icon-color: var(--md-filter-chip-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_pressed-leading-icon-color: var(--md-filter-chip-pressed-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_disabled-trailing-icon-color: var(--md-filter-chip-disabled-trailing-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-trailing-icon-opacity: var(--md-filter-chip-disabled-trailing-icon-opacity, 0.38);--_selected-focus-trailing-icon-color: var(--md-filter-chip-selected-focus-trailing-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-hover-trailing-icon-color: var(--md-filter-chip-selected-hover-trailing-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-pressed-trailing-icon-color: var(--md-filter-chip-selected-pressed-trailing-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-trailing-icon-color: var(--md-filter-chip-selected-trailing-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_focus-trailing-icon-color: var(--md-filter-chip-focus-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-trailing-icon-color: var(--md-filter-chip-hover-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-trailing-icon-color: var(--md-filter-chip-pressed-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_trailing-icon-color: var(--md-filter-chip-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_container-shape-start-start: var(--md-filter-chip-container-shape-start-start, var(--md-filter-chip-container-shape, var(--md-sys-shape-corner-small, 8px)));--_container-shape-start-end: var(--md-filter-chip-container-shape-start-end, var(--md-filter-chip-container-shape, var(--md-sys-shape-corner-small, 8px)));--_container-shape-end-end: var(--md-filter-chip-container-shape-end-end, var(--md-filter-chip-container-shape, var(--md-sys-shape-corner-small, 8px)));--_container-shape-end-start: var(--md-filter-chip-container-shape-end-start, var(--md-filter-chip-container-shape, var(--md-sys-shape-corner-small, 8px)));--_leading-space: var(--md-filter-chip-leading-space, 16px);--_trailing-space: var(--md-filter-chip-trailing-space, 16px);--_icon-label-space: var(--md-filter-chip-icon-label-space, 8px);--_with-leading-icon-leading-space: var(--md-filter-chip-with-leading-icon-leading-space, 8px);--_with-trailing-icon-trailing-space: var(--md-filter-chip-with-trailing-icon-trailing-space, 8px)}.selected.elevated::before{background:var(--_elevated-selected-container-color)}.checkmark{height:var(--_icon-size);width:var(--_icon-size)}.disabled .checkmark{opacity:var(--_disabled-leading-icon-opacity)}@media(forced-colors: active){.disabled .checkmark{opacity:1}} +`; + +/** + * @license + * Copyright 2024 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +// Generated stylesheet for ./chips/internal/selectable-styles.css. +const styles$E = i$4 `.selected{--md-ripple-hover-color: var(--_selected-hover-state-layer-color);--md-ripple-hover-opacity: var(--_selected-hover-state-layer-opacity);--md-ripple-pressed-color: var(--_selected-pressed-state-layer-color);--md-ripple-pressed-opacity: var(--_selected-pressed-state-layer-opacity)}:where(.selected)::before{background:var(--_selected-container-color)}:where(.selected) .outline{border-width:var(--_selected-outline-width)}:where(.selected.disabled)::before{background:var(--_disabled-selected-container-color);opacity:var(--_disabled-selected-container-opacity)}:where(.selected) .label{color:var(--_selected-label-text-color)}:where(.selected:hover) .label{color:var(--_selected-hover-label-text-color)}:where(.selected:focus) .label{color:var(--_selected-focus-label-text-color)}:where(.selected:active) .label{color:var(--_selected-pressed-label-text-color)}:where(.selected) .leading.icon{color:var(--_selected-leading-icon-color)}:where(.selected:hover) .leading.icon{color:var(--_selected-hover-leading-icon-color)}:where(.selected:focus) .leading.icon{color:var(--_selected-focus-leading-icon-color)}:where(.selected:active) .leading.icon{color:var(--_selected-pressed-leading-icon-color)}@media(forced-colors: active){:where(.selected:not(.elevated))::before{border:1px solid CanvasText}:where(.selected) .outline{border-width:1px}} +`; + +/** + * @license + * Copyright 2024 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +// Generated stylesheet for ./chips/internal/trailing-icon-styles.css. +const styles$D = i$4 `.trailing.action{align-items:center;justify-content:center;padding-inline-start:var(--_icon-label-space);padding-inline-end:var(--_with-trailing-icon-trailing-space)}.trailing.action :is(md-ripple,md-focus-ring){border-radius:50%;height:calc(1.3333333333*var(--_icon-size));width:calc(1.3333333333*var(--_icon-size))}.trailing.action md-focus-ring{inset:unset}.has-trailing .primary.action{padding-inline-end:0}.trailing.icon{color:var(--_trailing-icon-color);height:var(--_icon-size);width:var(--_icon-size)}:where(:hover) .trailing.icon{color:var(--_hover-trailing-icon-color)}:where(:focus) .trailing.icon{color:var(--_focus-trailing-icon-color)}:where(:active) .trailing.icon{color:var(--_pressed-trailing-icon-color)}:where(.disabled) .trailing.icon{color:var(--_disabled-trailing-icon-color);opacity:var(--_disabled-trailing-icon-opacity)}:where(.selected) .trailing.icon{color:var(--_selected-trailing-icon-color)}:where(.selected:hover) .trailing.icon{color:var(--_selected-hover-trailing-icon-color)}:where(.selected:focus) .trailing.icon{color:var(--_selected-focus-trailing-icon-color)}:where(.selected:active) .trailing.icon{color:var(--_selected-pressed-trailing-icon-color)}@media(forced-colors: active){.trailing.icon{color:ButtonText}:where(.disabled) .trailing.icon{color:GrayText;opacity:1}} +`; + +/** + * @license + * Copyright 2023 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +/** + * TODO(b/243982145): add docs + * + * @final + * @suppress {visibility} + */ +let MdFilterChip = class MdFilterChip extends FilterChip { +}; +MdFilterChip.styles = [ + styles$H, + styles$I, + styles$D, + styles$E, + styles$F, +]; +MdFilterChip = __decorate([ + t$3('md-filter-chip') +], MdFilterChip); + +/** + * @license + * Copyright 2023 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +/** + * An input chip component. + * + * @fires remove {Event} Dispatched when the remove button is clicked. + */ +class InputChip extends MultiActionChip { + constructor() { + super(...arguments); + this.avatar = false; + this.href = ''; + this.target = ''; + this.removeOnly = false; + this.selected = false; + } + get primaryId() { + if (this.href) { + return 'link'; + } + if (this.removeOnly) { + return ''; + } + return 'button'; + } + get rippleDisabled() { + // Link chips cannot be disabled + return !this.href && this.disabled; + } + get primaryAction() { + // Don't use @query() since a remove-only input chip still has a span that + // has "primary action" classes. + if (this.removeOnly) { + return null; + } + return this.renderRoot.querySelector('.primary.action'); + } + getContainerClasses() { + return { + ...super.getContainerClasses(), + avatar: this.avatar, + // Link chips cannot be disabled + disabled: !this.href && this.disabled, + link: !!this.href, + selected: this.selected, + 'has-trailing': true, + }; + } + renderPrimaryAction(content) { + const { ariaLabel } = this; + if (this.href) { + return x ` + ${content} + `; + } + if (this.removeOnly) { + return x ` + + ${content} + + `; + } + return x ` + + `; + } + renderTrailingAction(focusListener) { + return renderRemoveButton({ + focusListener, + ariaLabel: this.ariaLabelRemove, + disabled: !this.href && this.disabled, + tabbable: this.removeOnly, + }); + } +} +__decorate([ + n$5({ type: Boolean }) +], InputChip.prototype, "avatar", void 0); +__decorate([ + n$5() +], InputChip.prototype, "href", void 0); +__decorate([ + n$5() +], InputChip.prototype, "target", void 0); +__decorate([ + n$5({ type: Boolean, attribute: 'remove-only' }) +], InputChip.prototype, "removeOnly", void 0); +__decorate([ + n$5({ type: Boolean, reflect: true }) +], InputChip.prototype, "selected", void 0); +__decorate([ + e$5('.trailing.action') +], InputChip.prototype, "trailingAction", void 0); + +/** + * @license + * Copyright 2024 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +// Generated stylesheet for ./chips/internal/input-styles.css. +const styles$C = i$4 `:host{--_container-height: var(--md-input-chip-container-height, 32px);--_disabled-label-text-color: var(--md-input-chip-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-input-chip-disabled-label-text-opacity, 0.38);--_disabled-selected-container-color: var(--md-input-chip-disabled-selected-container-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-selected-container-opacity: var(--md-input-chip-disabled-selected-container-opacity, 0.12);--_label-text-font: var(--md-input-chip-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-input-chip-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-input-chip-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-input-chip-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_selected-container-color: var(--md-input-chip-selected-container-color, var(--md-sys-color-secondary-container, #e8def8));--_selected-focus-label-text-color: var(--md-input-chip-selected-focus-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-hover-label-text-color: var(--md-input-chip-selected-hover-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-hover-state-layer-color: var(--md-input-chip-selected-hover-state-layer-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-hover-state-layer-opacity: var(--md-input-chip-selected-hover-state-layer-opacity, 0.08);--_selected-label-text-color: var(--md-input-chip-selected-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-outline-width: var(--md-input-chip-selected-outline-width, 0px);--_selected-pressed-label-text-color: var(--md-input-chip-selected-pressed-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-pressed-state-layer-color: var(--md-input-chip-selected-pressed-state-layer-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-pressed-state-layer-opacity: var(--md-input-chip-selected-pressed-state-layer-opacity, 0.12);--_disabled-outline-color: var(--md-input-chip-disabled-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-outline-opacity: var(--md-input-chip-disabled-outline-opacity, 0.12);--_focus-label-text-color: var(--md-input-chip-focus-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_focus-outline-color: var(--md-input-chip-focus-outline-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-label-text-color: var(--md-input-chip-hover-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-state-layer-color: var(--md-input-chip-hover-state-layer-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-state-layer-opacity: var(--md-input-chip-hover-state-layer-opacity, 0.08);--_label-text-color: var(--md-input-chip-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_outline-color: var(--md-input-chip-outline-color, var(--md-sys-color-outline, #79747e));--_outline-width: var(--md-input-chip-outline-width, 1px);--_pressed-label-text-color: var(--md-input-chip-pressed-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-state-layer-color: var(--md-input-chip-pressed-state-layer-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-state-layer-opacity: var(--md-input-chip-pressed-state-layer-opacity, 0.12);--_avatar-shape: var(--md-input-chip-avatar-shape, var(--md-sys-shape-corner-full, 9999px));--_avatar-size: var(--md-input-chip-avatar-size, 24px);--_disabled-avatar-opacity: var(--md-input-chip-disabled-avatar-opacity, 0.38);--_disabled-leading-icon-color: var(--md-input-chip-disabled-leading-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-leading-icon-opacity: var(--md-input-chip-disabled-leading-icon-opacity, 0.38);--_icon-size: var(--md-input-chip-icon-size, 18px);--_selected-focus-leading-icon-color: var(--md-input-chip-selected-focus-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_selected-hover-leading-icon-color: var(--md-input-chip-selected-hover-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_selected-leading-icon-color: var(--md-input-chip-selected-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_selected-pressed-leading-icon-color: var(--md-input-chip-selected-pressed-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_focus-leading-icon-color: var(--md-input-chip-focus-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_hover-leading-icon-color: var(--md-input-chip-hover-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_leading-icon-color: var(--md-input-chip-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_pressed-leading-icon-color: var(--md-input-chip-pressed-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_disabled-trailing-icon-color: var(--md-input-chip-disabled-trailing-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-trailing-icon-opacity: var(--md-input-chip-disabled-trailing-icon-opacity, 0.38);--_selected-focus-trailing-icon-color: var(--md-input-chip-selected-focus-trailing-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-hover-trailing-icon-color: var(--md-input-chip-selected-hover-trailing-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-pressed-trailing-icon-color: var(--md-input-chip-selected-pressed-trailing-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-trailing-icon-color: var(--md-input-chip-selected-trailing-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_focus-trailing-icon-color: var(--md-input-chip-focus-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-trailing-icon-color: var(--md-input-chip-hover-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-trailing-icon-color: var(--md-input-chip-pressed-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_trailing-icon-color: var(--md-input-chip-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_container-shape-start-start: var(--md-input-chip-container-shape-start-start, var(--md-input-chip-container-shape, var(--md-sys-shape-corner-small, 8px)));--_container-shape-start-end: var(--md-input-chip-container-shape-start-end, var(--md-input-chip-container-shape, var(--md-sys-shape-corner-small, 8px)));--_container-shape-end-end: var(--md-input-chip-container-shape-end-end, var(--md-input-chip-container-shape, var(--md-sys-shape-corner-small, 8px)));--_container-shape-end-start: var(--md-input-chip-container-shape-end-start, var(--md-input-chip-container-shape, var(--md-sys-shape-corner-small, 8px)));--_leading-space: var(--md-input-chip-leading-space, 16px);--_trailing-space: var(--md-input-chip-trailing-space, 16px);--_icon-label-space: var(--md-input-chip-icon-label-space, 8px);--_with-leading-icon-leading-space: var(--md-input-chip-with-leading-icon-leading-space, 8px);--_with-trailing-icon-trailing-space: var(--md-input-chip-with-trailing-icon-trailing-space, 8px)}:host([avatar]){--_container-shape-start-start: var( --md-input-chip-container-shape-start-start, var(--md-input-chip-container-shape, calc(var(--_container-height) / 2)) );--_container-shape-start-end: var( --md-input-chip-container-shape-start-end, var(--md-input-chip-container-shape, calc(var(--_container-height) / 2)) );--_container-shape-end-end: var( --md-input-chip-container-shape-end-end, var(--md-input-chip-container-shape, calc(var(--_container-height) / 2)) );--_container-shape-end-start: var( --md-input-chip-container-shape-end-start, var(--md-input-chip-container-shape, calc(var(--_container-height) / 2)) )}.avatar .primary.action{padding-inline-start:4px}.avatar .leading.icon ::slotted(:first-child){border-radius:var(--_avatar-shape);height:var(--_avatar-size);width:var(--_avatar-size)}.disabled.avatar .leading.icon{opacity:var(--_disabled-avatar-opacity)}@media(forced-colors: active){.link .outline{border-color:ActiveText}.disabled.avatar .leading.icon{opacity:1}} +`; + +/** + * @license + * Copyright 2023 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +/** + * TODO(b/243982145): add docs + * + * @final + * @suppress {visibility} + */ +let MdInputChip = class MdInputChip extends InputChip { +}; +MdInputChip.styles = [ + styles$H, + styles$D, + styles$E, + styles$C, +]; +MdInputChip = __decorate([ + t$3('md-input-chip') +], MdInputChip); + +/** + * @license + * Copyright 2023 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +/** + * A suggestion chip component. + */ +class SuggestionChip extends AssistChip { +} +// Note: assist and suggestion chips are functionally identical with different +// tokens. + +/** + * @license + * Copyright 2024 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +// Generated stylesheet for ./chips/internal/suggestion-styles.css. +const styles$B = i$4 `:host{--_container-height: var(--md-suggestion-chip-container-height, 32px);--_disabled-label-text-color: var(--md-suggestion-chip-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-suggestion-chip-disabled-label-text-opacity, 0.38);--_elevated-container-color: var(--md-suggestion-chip-elevated-container-color, var(--md-sys-color-surface-container-low, #f7f2fa));--_elevated-container-elevation: var(--md-suggestion-chip-elevated-container-elevation, 1);--_elevated-container-shadow-color: var(--md-suggestion-chip-elevated-container-shadow-color, var(--md-sys-color-shadow, #000));--_elevated-disabled-container-color: var(--md-suggestion-chip-elevated-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));--_elevated-disabled-container-elevation: var(--md-suggestion-chip-elevated-disabled-container-elevation, 0);--_elevated-disabled-container-opacity: var(--md-suggestion-chip-elevated-disabled-container-opacity, 0.12);--_elevated-focus-container-elevation: var(--md-suggestion-chip-elevated-focus-container-elevation, 1);--_elevated-hover-container-elevation: var(--md-suggestion-chip-elevated-hover-container-elevation, 2);--_elevated-pressed-container-elevation: var(--md-suggestion-chip-elevated-pressed-container-elevation, 1);--_focus-label-text-color: var(--md-suggestion-chip-focus-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-label-text-color: var(--md-suggestion-chip-hover-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-state-layer-color: var(--md-suggestion-chip-hover-state-layer-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-state-layer-opacity: var(--md-suggestion-chip-hover-state-layer-opacity, 0.08);--_label-text-color: var(--md-suggestion-chip-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_label-text-font: var(--md-suggestion-chip-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-suggestion-chip-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-suggestion-chip-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-suggestion-chip-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_pressed-label-text-color: var(--md-suggestion-chip-pressed-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-state-layer-color: var(--md-suggestion-chip-pressed-state-layer-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-state-layer-opacity: var(--md-suggestion-chip-pressed-state-layer-opacity, 0.12);--_disabled-outline-color: var(--md-suggestion-chip-disabled-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-outline-opacity: var(--md-suggestion-chip-disabled-outline-opacity, 0.12);--_focus-outline-color: var(--md-suggestion-chip-focus-outline-color, var(--md-sys-color-on-surface-variant, #49454f));--_outline-color: var(--md-suggestion-chip-outline-color, var(--md-sys-color-outline, #79747e));--_outline-width: var(--md-suggestion-chip-outline-width, 1px);--_disabled-leading-icon-color: var(--md-suggestion-chip-disabled-leading-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-leading-icon-opacity: var(--md-suggestion-chip-disabled-leading-icon-opacity, 0.38);--_focus-leading-icon-color: var(--md-suggestion-chip-focus-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_hover-leading-icon-color: var(--md-suggestion-chip-hover-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_leading-icon-color: var(--md-suggestion-chip-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_pressed-leading-icon-color: var(--md-suggestion-chip-pressed-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_icon-size: var(--md-suggestion-chip-icon-size, 18px);--_container-shape-start-start: var(--md-suggestion-chip-container-shape-start-start, var(--md-suggestion-chip-container-shape, var(--md-sys-shape-corner-small, 8px)));--_container-shape-start-end: var(--md-suggestion-chip-container-shape-start-end, var(--md-suggestion-chip-container-shape, var(--md-sys-shape-corner-small, 8px)));--_container-shape-end-end: var(--md-suggestion-chip-container-shape-end-end, var(--md-suggestion-chip-container-shape, var(--md-sys-shape-corner-small, 8px)));--_container-shape-end-start: var(--md-suggestion-chip-container-shape-end-start, var(--md-suggestion-chip-container-shape, var(--md-sys-shape-corner-small, 8px)));--_leading-space: var(--md-suggestion-chip-leading-space, 16px);--_trailing-space: var(--md-suggestion-chip-trailing-space, 16px);--_icon-label-space: var(--md-suggestion-chip-icon-label-space, 8px);--_with-leading-icon-leading-space: var(--md-suggestion-chip-with-leading-icon-leading-space, 8px)}@media(forced-colors: active){.link .outline{border-color:ActiveText}} +`; + +/** + * @license + * Copyright 2023 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +/** + * TODO(b/243982145): add docs + * + * @final + * @suppress {visibility} + */ +let MdSuggestionChip = class MdSuggestionChip extends SuggestionChip { +}; +MdSuggestionChip.styles = [styles$H, styles$I, styles$B]; +MdSuggestionChip = __decorate([ + t$3('md-suggestion-chip') +], MdSuggestionChip); + +/** + * @license + * Copyright 2023 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +/** + * A divider component. + */ +class Divider extends s$1 { + constructor() { + super(...arguments); + /** + * Indents the divider with equal padding on both sides. + */ + this.inset = false; + /** + * Indents the divider with padding on the leading side. + */ + this.insetStart = false; + /** + * Indents the divider with padding on the trailing side. + */ + this.insetEnd = false; + } +} +__decorate([ + n$5({ type: Boolean, reflect: true }) +], Divider.prototype, "inset", void 0); +__decorate([ + n$5({ type: Boolean, reflect: true, attribute: 'inset-start' }) +], Divider.prototype, "insetStart", void 0); +__decorate([ + n$5({ type: Boolean, reflect: true, attribute: 'inset-end' }) +], Divider.prototype, "insetEnd", void 0); + +/** + * @license + * Copyright 2024 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +// Generated stylesheet for ./divider/internal/divider-styles.css. +const styles$A = i$4 `:host{box-sizing:border-box;color:var(--md-divider-color, var(--md-sys-color-outline-variant, #cac4d0));display:flex;height:var(--md-divider-thickness, 1px);width:100%}:host([inset]),:host([inset-start]){padding-inline-start:16px}:host([inset]),:host([inset-end]){padding-inline-end:16px}:host::before{background:currentColor;content:"";height:100%;width:100%}@media(forced-colors: active){:host::before{background:CanvasText}} +`; + +/** + * @license + * Copyright 2023 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +/** + * @summary A divider is a thin line that groups content in lists and + * containers. + * + * @description Dividers can reinforce tapability, such as when used to separate + * list items or define tappable regions in an accordion. + * + * @final + * @suppress {visibility} + */ +let MdDivider = class MdDivider extends Divider { +}; +MdDivider.styles = [styles$A]; +MdDivider = __decorate([ + t$3('md-divider') +], MdDivider); + +/** + * @license + * Copyright 2023 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +/** + * The default dialog open animation. + */ +const DIALOG_DEFAULT_OPEN_ANIMATION = { + dialog: [ + [ + // Dialog slide down + [{ 'transform': 'translateY(-50px)' }, { 'transform': 'translateY(0)' }], + { duration: 500, easing: EASING.EMPHASIZED }, + ], + ], + scrim: [ + [ + // Scrim fade in + [{ 'opacity': 0 }, { 'opacity': 0.6 }], + { duration: 145, easing: 'linear' }, + ], + ], + container: [ + [ + // Container fade in + [{ 'opacity': 0 }, { 'opacity': 1 }], + { duration: 50, easing: 'linear', pseudoElement: '::before' }, + ], + [ + // Container grow + // Note: current spec says to grow from 0dp->100% and shrink from + // 100%->35%. We change this to 35%->100% to simplify the animation that + // is supposed to clip content as it grows. From 0dp it's possible to see + // text/actions appear before the container has fully grown. + [{ 'height': '35%' }, { 'height': '100%' }], + { duration: 500, easing: EASING.EMPHASIZED, pseudoElement: '::before' }, + ], + ], + headline: [ + [ + // Headline fade in + [{ 'opacity': 0 }, { 'opacity': 0, offset: 0.2 }, { 'opacity': 1 }], + { duration: 250, easing: 'linear', fill: 'forwards' }, + ], + ], + content: [ + [ + // Content fade in + [{ 'opacity': 0 }, { 'opacity': 0, offset: 0.2 }, { 'opacity': 1 }], + { duration: 250, easing: 'linear', fill: 'forwards' }, + ], + ], + actions: [ + [ + // Actions fade in + [{ 'opacity': 0 }, { 'opacity': 0, offset: 0.5 }, { 'opacity': 1 }], + { duration: 300, easing: 'linear', fill: 'forwards' }, + ], + ], +}; +/** + * The default dialog close animation. + */ +const DIALOG_DEFAULT_CLOSE_ANIMATION = { + dialog: [ + [ + // Dialog slide up + [{ 'transform': 'translateY(0)' }, { 'transform': 'translateY(-50px)' }], + { duration: 150, easing: EASING.EMPHASIZED_ACCELERATE }, + ], + ], + scrim: [ + [ + // Scrim fade out + [{ 'opacity': 0.6 }, { 'opacity': 0 }], + { duration: 150, easing: 'linear' }, + ], + ], + container: [ + [ + // Container shrink + [{ 'height': '100%' }, { 'height': '35%' }], + { + duration: 150, + easing: EASING.EMPHASIZED_ACCELERATE, + pseudoElement: '::before', + }, + ], + [ + // Container fade out + [{ 'opacity': '1' }, { 'opacity': '0' }], + { delay: 100, duration: 50, easing: 'linear', pseudoElement: '::before' }, + ], + ], + headline: [ + [ + // Headline fade out + [{ 'opacity': 1 }, { 'opacity': 0 }], + { duration: 100, easing: 'linear', fill: 'forwards' }, + ], + ], + content: [ + [ + // Content fade out + [{ 'opacity': 1 }, { 'opacity': 0 }], + { duration: 100, easing: 'linear', fill: 'forwards' }, + ], + ], + actions: [ + [ + // Actions fade out + [{ 'opacity': 1 }, { 'opacity': 0 }], + { duration: 100, easing: 'linear', fill: 'forwards' }, + ], + ], +}; + +/** + * @license + * Copyright 2023 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +/** + * A dialog component. + * + * @fires open {Event} Dispatched when the dialog is opening before any animations. + * @fires opened {Event} Dispatched when the dialog has opened after any animations. + * @fires close {Event} Dispatched when the dialog is closing before any animations. + * @fires closed {Event} Dispatched when the dialog has closed after any animations. + * @fires cancel {Event} Dispatched when the dialog has been canceled by clicking + * on the scrim or pressing Escape. + */ +class Dialog extends s$1 { + /** + * Opens the dialog when set to `true` and closes it when set to `false`. + */ + get open() { + return this.isOpen; + } + set open(open) { + if (open === this.isOpen) { + return; + } + this.isOpen = open; + if (open) { + this.setAttribute('open', ''); + this.show(); + } + else { + this.removeAttribute('open'); + this.close(); + } + } + constructor() { + super(); + /** + * Gets or sets the dialog's return value, usually to indicate which button + * a user pressed to close it. + * + * https://developer.mozilla.org/en-US/docs/Web/API/HTMLDialogElement/returnValue + */ + this.returnValue = ''; + /** + * Gets the opening animation for a dialog. Set to a new function to customize + * the animation. + */ + this.getOpenAnimation = () => DIALOG_DEFAULT_OPEN_ANIMATION; + /** + * Gets the closing animation for a dialog. Set to a new function to customize + * the animation. + */ + this.getCloseAnimation = () => DIALOG_DEFAULT_CLOSE_ANIMATION; + this.isOpen = false; + this.isOpening = false; + this.isConnectedPromise = this.getIsConnectedPromise(); + this.isAtScrollTop = false; + this.isAtScrollBottom = false; + this.nextClickIsFromContent = false; + // Dialogs should not be SSR'd while open, so we can just use runtime checks. + this.hasHeadline = false; + this.hasActions = false; + this.hasIcon = false; + // See https://bugs.chromium.org/p/chromium/issues/detail?id=1512224 + // Chrome v120 has a bug where escape keys do not trigger cancels. If we get + // a dialog "close" event that is triggered without a "cancel" after an escape + // keydown, then we need to manually trigger our closing logic. + // + // This bug occurs when pressing escape to close a dialog without first + // interacting with the dialog's content. + // + // Cleanup tracking: + // https://github.com/material-components/material-web/issues/5330 + // This can be removed when full CloseWatcher support added and the above bug + // in Chromium is fixed to fire 'cancel' with one escape press and close with + // multiple. + this.escapePressedWithoutCancel = false; + { + this.addEventListener('submit', this.handleSubmit); + // We do not use `delegatesFocus: true` due to a Chromium bug with + // selecting text. + // See https://bugs.chromium.org/p/chromium/issues/detail?id=950357 + // + // Material requires using focus trapping within the dialog (see + // b/314840853 for the bug to add it). This would normally mean we don't + // care about delegating focus since the `` never receives it. + // However, we still need to handle situations when a user has not + // provided an focusable child in the content. When that happens, the + // `` itself is focused. + // + // Listen to focus/blur instead of focusin/focusout since those can bubble + // from content. + this.addEventListener('focus', () => { + this.dialog?.focus(); + }); + this.addEventListener('blur', () => { + this.dialog?.blur(); + }); + } + } + /** + * Opens the dialog and fires a cancelable `open` event. After a dialog's + * animation, an `opened` event is fired. + * + * Add an `autocomplete` attribute to a child of the dialog that should + * receive focus after opening. + * + * @return A Promise that resolves after the animation is finished and the + * `opened` event was fired. + */ + async show() { + this.isOpening = true; + // Dialogs can be opened before being attached to the DOM, so we need to + // wait until we're connected before calling `showModal()`. + await this.isConnectedPromise; + await this.updateComplete; + const dialog = this.dialog; + // Check if already opened or if `dialog.close()` was called while awaiting. + if (dialog.open || !this.isOpening) { + this.isOpening = false; + return; + } + const preventOpen = !this.dispatchEvent(new Event('open', { cancelable: true })); + if (preventOpen) { + this.open = false; + return; + } + // All Material dialogs are modal. + dialog.showModal(); + this.open = true; + // Reset scroll position if re-opening a dialog with the same content. + if (this.scroller) { + this.scroller.scrollTop = 0; + } + // Native modal dialogs ignore autofocus and instead force focus to the + // first focusable child. Override this behavior if there is a child with + // an autofocus attribute. + this.querySelector('[autofocus]')?.focus(); + await this.animateDialog(this.getOpenAnimation()); + this.dispatchEvent(new Event('opened')); + this.isOpening = false; + } + /** + * Closes the dialog and fires a cancelable `close` event. After a dialog's + * animation, a `closed` event is fired. + * + * @param returnValue A return value usually indicating which button was used + * to close a dialog. If a dialog is canceled by clicking the scrim or + * pressing Escape, it will not change the return value after closing. + * @return A Promise that resolves after the animation is finished and the + * `closed` event was fired. + */ + async close(returnValue = this.returnValue) { + this.isOpening = false; + if (!this.isConnected) { + // Disconnected dialogs do not fire close events or animate. + this.open = false; + return; + } + await this.updateComplete; + const dialog = this.dialog; + // Check if already closed or if `dialog.show()` was called while awaiting. + if (!dialog.open || this.isOpening) { + this.open = false; + return; + } + const prevReturnValue = this.returnValue; + this.returnValue = returnValue; + const preventClose = !this.dispatchEvent(new Event('close', { cancelable: true })); + if (preventClose) { + this.returnValue = prevReturnValue; + return; + } + await this.animateDialog(this.getCloseAnimation()); + dialog.close(returnValue); + this.open = false; + this.dispatchEvent(new Event('closed')); + } + connectedCallback() { + super.connectedCallback(); + this.isConnectedPromiseResolve(); + } + disconnectedCallback() { + super.disconnectedCallback(); + this.isConnectedPromise = this.getIsConnectedPromise(); + } + render() { + const scrollable = this.open && !(this.isAtScrollTop && this.isAtScrollBottom); + const classes = { + 'has-headline': this.hasHeadline, + 'has-actions': this.hasActions, + 'has-icon': this.hasIcon, + 'scrollable': scrollable, + 'show-top-divider': scrollable && !this.isAtScrollTop, + 'show-bottom-divider': scrollable && !this.isAtScrollBottom, + }; + const { ariaLabel } = this; + return x ` +
    + +
    +
    + +

    + +

    + +
    +
    +
    +
    + +
    +
    +
    +
    + + +
    +
    +
    + `; + } + firstUpdated() { + this.intersectionObserver = new IntersectionObserver((entries) => { + for (const entry of entries) { + this.handleAnchorIntersection(entry); + } + }, { root: this.scroller }); + this.intersectionObserver.observe(this.topAnchor); + this.intersectionObserver.observe(this.bottomAnchor); + } + handleDialogClick() { + if (this.nextClickIsFromContent) { + // Avoid doing a layout calculation below if we know the click came from + // content. + this.nextClickIsFromContent = false; + return; + } + // Click originated on the backdrop. Native ``s will not cancel, + // but Material dialogs do. + const preventDefault = !this.dispatchEvent(new Event('cancel', { cancelable: true })); + if (preventDefault) { + return; + } + this.close(); + } + handleContentClick() { + this.nextClickIsFromContent = true; + } + handleSubmit(event) { + const form = event.target; + const { submitter } = event; + if (form.method !== 'dialog' || !submitter) { + return; + } + // Close reason is the submitter's value attribute, or the dialog's + // `returnValue` if there is no attribute. + this.close(submitter.getAttribute('value') ?? this.returnValue); + } + handleCancel(event) { + if (event.target !== this.dialog) { + // Ignore any cancel events dispatched by content. + return; + } + this.escapePressedWithoutCancel = false; + const preventDefault = !redispatchEvent(this, event); + // We always prevent default on the original dialog event since we'll + // animate closing it before it actually closes. + event.preventDefault(); + if (preventDefault) { + return; + } + this.close(); + } + handleClose() { + if (!this.escapePressedWithoutCancel) { + return; + } + this.escapePressedWithoutCancel = false; + this.dialog?.dispatchEvent(new Event('cancel', { cancelable: true })); + } + handleKeydown(event) { + if (event.key !== 'Escape') { + return; + } + // An escape key was pressed. If a "close" event fires next without a + // "cancel" event first, then we know we're in the Chrome v120 bug. + this.escapePressedWithoutCancel = true; + // Wait a full task for the cancel/close event listeners to fire, then + // reset the flag. + setTimeout(() => { + this.escapePressedWithoutCancel = false; + }); + } + async animateDialog(animation) { + const { dialog, scrim, container, headline, content, actions } = this; + if (!dialog || !scrim || !container || !headline || !content || !actions) { + return; + } + const { container: containerAnimate, dialog: dialogAnimate, scrim: scrimAnimate, headline: headlineAnimate, content: contentAnimate, actions: actionsAnimate, } = animation; + const elementAndAnimation = [ + [dialog, dialogAnimate ?? []], + [scrim, scrimAnimate ?? []], + [container, containerAnimate ?? []], + [headline, headlineAnimate ?? []], + [content, contentAnimate ?? []], + [actions, actionsAnimate ?? []], + ]; + const animations = []; + for (const [element, animation] of elementAndAnimation) { + for (const animateArgs of animation) { + animations.push(element.animate(...animateArgs)); + } + } + await Promise.all(animations.map((animation) => animation.finished)); + } + handleHeadlineChange(event) { + const slot = event.target; + this.hasHeadline = slot.assignedElements().length > 0; + } + handleActionsChange(event) { + const slot = event.target; + this.hasActions = slot.assignedElements().length > 0; + } + handleIconChange(event) { + const slot = event.target; + this.hasIcon = slot.assignedElements().length > 0; + } + handleAnchorIntersection(entry) { + const { target, isIntersecting } = entry; + if (target === this.topAnchor) { + this.isAtScrollTop = isIntersecting; + } + if (target === this.bottomAnchor) { + this.isAtScrollBottom = isIntersecting; + } + } + getIsConnectedPromise() { + return new Promise((resolve) => { + this.isConnectedPromiseResolve = resolve; + }); + } +} +(() => { + requestUpdateOnAriaChange(Dialog); +})(); +__decorate([ + n$5({ type: Boolean }) +], Dialog.prototype, "open", null); +__decorate([ + n$5({ attribute: false }) +], Dialog.prototype, "returnValue", void 0); +__decorate([ + n$5() +], Dialog.prototype, "type", void 0); +__decorate([ + e$5('dialog') +], Dialog.prototype, "dialog", void 0); +__decorate([ + e$5('.scrim') +], Dialog.prototype, "scrim", void 0); +__decorate([ + e$5('.container') +], Dialog.prototype, "container", void 0); +__decorate([ + e$5('.headline') +], Dialog.prototype, "headline", void 0); +__decorate([ + e$5('.content') +], Dialog.prototype, "content", void 0); +__decorate([ + e$5('.actions') +], Dialog.prototype, "actions", void 0); +__decorate([ + r$4() +], Dialog.prototype, "isAtScrollTop", void 0); +__decorate([ + r$4() +], Dialog.prototype, "isAtScrollBottom", void 0); +__decorate([ + e$5('.scroller') +], Dialog.prototype, "scroller", void 0); +__decorate([ + e$5('.top.anchor') +], Dialog.prototype, "topAnchor", void 0); +__decorate([ + e$5('.bottom.anchor') +], Dialog.prototype, "bottomAnchor", void 0); +__decorate([ + r$4() +], Dialog.prototype, "hasHeadline", void 0); +__decorate([ + r$4() +], Dialog.prototype, "hasActions", void 0); +__decorate([ + r$4() +], Dialog.prototype, "hasIcon", void 0); + +/** + * @license + * Copyright 2022 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +const styles$z = i$4 `:host{border-start-start-radius:var(--md-dialog-container-shape-start-start, var(--md-dialog-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));border-start-end-radius:var(--md-dialog-container-shape-start-end, var(--md-dialog-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));border-end-end-radius:var(--md-dialog-container-shape-end-end, var(--md-dialog-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));border-end-start-radius:var(--md-dialog-container-shape-end-start, var(--md-dialog-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));display:contents;margin:auto;max-height:min(560px,100% - 48px);max-width:min(560px,100% - 48px);min-height:140px;min-width:280px;position:fixed;height:fit-content;width:fit-content}dialog{background:rgba(0,0,0,0);border:none;border-radius:inherit;flex-direction:column;height:inherit;margin:inherit;max-height:inherit;max-width:inherit;min-height:inherit;min-width:inherit;outline:none;overflow:visible;padding:0;width:inherit}dialog[open]{display:flex}::backdrop{background:none}.scrim{background:var(--md-sys-color-scrim, #000);display:none;inset:0;opacity:0.6;pointer-events:none;position:fixed;z-index:1}:host([open]) .scrim{display:flex}h2{all:unset;align-self:stretch}.headline{align-items:center;color:var(--md-dialog-headline-color, var(--md-sys-color-on-surface, #1d1b20));display:flex;flex-direction:column;font-family:var(--md-dialog-headline-font, var(--md-sys-typescale-headline-small-font, var(--md-ref-typeface-brand, Roboto)));font-size:var(--md-dialog-headline-size, var(--md-sys-typescale-headline-small-size, 1.5rem));line-height:var(--md-dialog-headline-line-height, var(--md-sys-typescale-headline-small-line-height, 2rem));font-weight:var(--md-dialog-headline-weight, var(--md-sys-typescale-headline-small-weight, var(--md-ref-typeface-weight-regular, 400)));position:relative}slot[name=headline]::slotted(*){align-items:center;align-self:stretch;box-sizing:border-box;display:flex;gap:8px;padding:24px 24px 0}.icon{display:flex}slot[name=icon]::slotted(*){color:var(--md-dialog-icon-color, var(--md-sys-color-secondary, #625b71));fill:currentColor;font-size:var(--md-dialog-icon-size, 24px);margin-top:24px;height:var(--md-dialog-icon-size, 24px);width:var(--md-dialog-icon-size, 24px)}.has-icon slot[name=headline]::slotted(*){justify-content:center;padding-top:16px}.scrollable slot[name=headline]::slotted(*){padding-bottom:16px}.scrollable.has-headline slot[name=content]::slotted(*){padding-top:8px}.container{border-radius:inherit;display:flex;flex-direction:column;flex-grow:1;overflow:hidden;position:relative;transform-origin:top}.container::before{background:var(--md-dialog-container-color, var(--md-sys-color-surface-container-high, #ece6f0));border-radius:inherit;content:"";inset:0;position:absolute}.scroller{display:flex;flex:1;flex-direction:column;overflow:hidden;z-index:1}.scrollable .scroller{overflow-y:scroll}.content{color:var(--md-dialog-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));font-family:var(--md-dialog-supporting-text-font, var(--md-sys-typescale-body-medium-font, var(--md-ref-typeface-plain, Roboto)));font-size:var(--md-dialog-supporting-text-size, var(--md-sys-typescale-body-medium-size, 0.875rem));line-height:var(--md-dialog-supporting-text-line-height, var(--md-sys-typescale-body-medium-line-height, 1.25rem));font-weight:var(--md-dialog-supporting-text-weight, var(--md-sys-typescale-body-medium-weight, var(--md-ref-typeface-weight-regular, 400)));height:min-content;position:relative}slot[name=content]::slotted(*){box-sizing:border-box;padding:24px}.anchor{position:absolute}.top.anchor{top:0}.bottom.anchor{bottom:0}.actions{position:relative}slot[name=actions]::slotted(*){box-sizing:border-box;display:flex;gap:8px;justify-content:flex-end;padding:16px 24px 24px}.has-actions slot[name=content]::slotted(*){padding-bottom:8px}md-divider{display:none;position:absolute}.has-headline.show-top-divider .headline md-divider,.has-actions.show-bottom-divider .actions md-divider{display:flex}.headline md-divider{bottom:0}.actions md-divider{top:0}@media(forced-colors: active){dialog{outline:2px solid WindowText}}/*# sourceMappingURL=dialog-styles.css.map */ +`; + +/** + * @license + * Copyright 2023 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +/** + * @summary Dialogs can require an action, communicate information, or help + * users accomplish a task. There are two types of dialogs: basic and + * full-screen. + * + * @description + * A dialog is a modal window that appears in front of app content to provide + * critical information or ask for a decision. Dialogs disable all app + * functionality when they appear, and remain on screen until confirmed, + * dismissed, or a required action has been taken. + * + * Dialogs are purposefully interruptive, so they should be used sparingly. + * A less disruptive alternative is to use a menu, which provides options + * without interrupting a user’s experience. + * + * On mobile devices only, complex dialogs should be displayed fullscreen. + * + * __Example usages:__ + * - Common use cases for basic dialogs include alerts, quick selection, and + * confirmation. + * - More complex dialogs may contain actions that require a series of tasks + * to complete. One example is creating a calendar entry with the event title, + * date, location, and time. + * + * @final + * @suppress {visibility} + */ +let MdDialog = class MdDialog extends Dialog { +}; +MdDialog.styles = [styles$z]; +MdDialog = __decorate([ + t$3('md-dialog') +], MdDialog); + +/** + * @license + * Copyright 2023 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +// tslint:disable-next-line:enforce-comments-on-exported-symbols +class SharedFab extends s$1 { + constructor() { + super(...arguments); + /** + * The size of the FAB. + * + * NOTE: Branded FABs cannot be sized to `small`, and Extended FABs do not + * have different sizes. + */ + this.size = 'medium'; + /** + * The text to display on the FAB. + */ + this.label = ''; + /** + * Lowers the FAB's elevation. + */ + this.lowered = false; + } + render() { + // Needed for closure conformance + const { ariaLabel } = this; + return x ` + + `; + } + getRenderClasses() { + const isExtended = !!this.label; + return { + 'lowered': this.lowered, + 'small': this.size === 'small' && !isExtended, + 'large': this.size === 'large' && !isExtended, + 'extended': isExtended, + }; + } + renderTouchTarget() { + return x `
    `; + } + renderLabel() { + return this.label ? x `${this.label}` : ''; + } + renderIcon() { + const { ariaLabel } = this; + return x ` + + + + `; + } +} +(() => { + requestUpdateOnAriaChange(SharedFab); +})(); +/** @nocollapse */ +SharedFab.shadowRootOptions = { + mode: 'open', + delegatesFocus: true, +}; +__decorate([ + n$5({ reflect: true }) +], SharedFab.prototype, "size", void 0); +__decorate([ + n$5() +], SharedFab.prototype, "label", void 0); +__decorate([ + n$5({ type: Boolean }) +], SharedFab.prototype, "lowered", void 0); + +/** + * @license + * Copyright 2023 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +// tslint:disable-next-line:enforce-comments-on-exported-symbols +class Fab extends SharedFab { + constructor() { + super(...arguments); + /** + * The FAB color variant to render. + */ + this.variant = 'surface'; + } + getRenderClasses() { + return { + ...super.getRenderClasses(), + 'primary': this.variant === 'primary', + 'secondary': this.variant === 'secondary', + 'tertiary': this.variant === 'tertiary', + }; + } +} +__decorate([ + n$5() +], Fab.prototype, "variant", void 0); + +/** + * @license + * Copyright 2024 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +// Generated stylesheet for ./fab/internal/fab-branded-styles.css. +const styles$y = i$4 `:host{--_container-color: var(--md-fab-branded-container-color, var(--md-sys-color-surface-container-high, #ece6f0));--_container-elevation: var(--md-fab-branded-container-elevation, 3);--_container-height: var(--md-fab-branded-container-height, 56px);--_container-shadow-color: var(--md-fab-branded-container-shadow-color, var(--md-sys-color-shadow, #000));--_container-width: var(--md-fab-branded-container-width, 56px);--_focus-container-elevation: var(--md-fab-branded-focus-container-elevation, 3);--_hover-container-elevation: var(--md-fab-branded-hover-container-elevation, 4);--_hover-state-layer-color: var(--md-fab-branded-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-opacity: var(--md-fab-branded-hover-state-layer-opacity, 0.08);--_icon-size: var(--md-fab-branded-icon-size, 36px);--_lowered-container-color: var(--md-fab-branded-lowered-container-color, var(--md-sys-color-surface-container-low, #f7f2fa));--_lowered-container-elevation: var(--md-fab-branded-lowered-container-elevation, 1);--_lowered-focus-container-elevation: var(--md-fab-branded-lowered-focus-container-elevation, 1);--_lowered-hover-container-elevation: var(--md-fab-branded-lowered-hover-container-elevation, 2);--_lowered-pressed-container-elevation: var(--md-fab-branded-lowered-pressed-container-elevation, 1);--_pressed-container-elevation: var(--md-fab-branded-pressed-container-elevation, 3);--_pressed-state-layer-color: var(--md-fab-branded-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-opacity: var(--md-fab-branded-pressed-state-layer-opacity, 0.12);--_focus-label-text-color: var(--md-fab-branded-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_hover-label-text-color: var(--md-fab-branded-hover-label-text-color, var(--md-sys-color-primary, #6750a4));--_label-text-color: var(--md-fab-branded-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_label-text-font: var(--md-fab-branded-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-size: var(--md-fab-branded-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-line-height: var(--md-fab-branded-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-weight: var(--md-fab-branded-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_large-container-height: var(--md-fab-branded-large-container-height, 96px);--_large-container-width: var(--md-fab-branded-large-container-width, 96px);--_large-icon-size: var(--md-fab-branded-large-icon-size, 48px);--_pressed-label-text-color: var(--md-fab-branded-pressed-label-text-color, var(--md-sys-color-primary, #6750a4));--_container-shape-start-start: var(--md-fab-branded-container-shape-start-start, var(--md-fab-branded-container-shape, var(--md-sys-shape-corner-large, 16px)));--_container-shape-start-end: var(--md-fab-branded-container-shape-start-end, var(--md-fab-branded-container-shape, var(--md-sys-shape-corner-large, 16px)));--_container-shape-end-end: var(--md-fab-branded-container-shape-end-end, var(--md-fab-branded-container-shape, var(--md-sys-shape-corner-large, 16px)));--_container-shape-end-start: var(--md-fab-branded-container-shape-end-start, var(--md-fab-branded-container-shape, var(--md-sys-shape-corner-large, 16px)));--_large-container-shape-start-start: var(--md-fab-branded-large-container-shape-start-start, var(--md-fab-branded-large-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));--_large-container-shape-start-end: var(--md-fab-branded-large-container-shape-start-end, var(--md-fab-branded-large-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));--_large-container-shape-end-end: var(--md-fab-branded-large-container-shape-end-end, var(--md-fab-branded-large-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));--_large-container-shape-end-start: var(--md-fab-branded-large-container-shape-end-start, var(--md-fab-branded-large-container-shape, var(--md-sys-shape-corner-extra-large, 28px)))} +`; + +/** + * @license + * Copyright 2024 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +// Generated stylesheet for ./fab/internal/forced-colors-styles.css. +const styles$x = i$4 `@media(forced-colors: active){.fab{border:1px solid ButtonText}.fab.extended{padding-inline-start:15px;padding-inline-end:19px}md-focus-ring{--md-focus-ring-outward-offset: 3px}} +`; + +/** + * @license + * Copyright 2024 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +// Generated stylesheet for ./fab/internal/shared-styles.css. +const styles$w = i$4 `:host{--md-ripple-hover-opacity: var(--_hover-state-layer-opacity);--md-ripple-pressed-opacity: var(--_pressed-state-layer-opacity);display:inline-flex;-webkit-tap-highlight-color:rgba(0,0,0,0)}:host([size=medium][touch-target=wrapper]){margin:max(0px,48px - var(--_container-height))}:host([size=large][touch-target=wrapper]){margin:max(0px,48px - var(--_large-container-height))}.fab,.icon,.icon ::slotted(*){display:flex}.fab{align-items:center;justify-content:center;vertical-align:middle;padding:0;position:relative;height:var(--_container-height);transition-property:background-color;border-width:0px;outline:none;z-index:0;text-transform:inherit;--md-elevation-level: var(--_container-elevation);--md-elevation-shadow-color: var(--_container-shadow-color);background-color:var(--_container-color);--md-ripple-hover-color: var(--_hover-state-layer-color);--md-ripple-pressed-color: var(--_pressed-state-layer-color)}.fab.extended{width:inherit;box-sizing:border-box;padding-inline-start:16px;padding-inline-end:20px}.fab:not(.extended){width:var(--_container-width)}.fab.large{width:var(--_large-container-width);height:var(--_large-container-height)}.fab.large .icon ::slotted(*){width:var(--_large-icon-size);height:var(--_large-icon-size);font-size:var(--_large-icon-size)}.fab.large,.fab.large .ripple{border-start-start-radius:var(--_large-container-shape-start-start);border-start-end-radius:var(--_large-container-shape-start-end);border-end-start-radius:var(--_large-container-shape-end-start);border-end-end-radius:var(--_large-container-shape-end-end)}.fab.large md-focus-ring{--md-focus-ring-shape-start-start: var(--_large-container-shape-start-start);--md-focus-ring-shape-start-end: var(--_large-container-shape-start-end);--md-focus-ring-shape-end-end: var(--_large-container-shape-end-end);--md-focus-ring-shape-end-start: var(--_large-container-shape-end-start)}.fab:focus{--md-elevation-level: var(--_focus-container-elevation)}.fab:hover{--md-elevation-level: var(--_hover-container-elevation)}.fab:active{--md-elevation-level: var(--_pressed-container-elevation)}.fab.lowered{background-color:var(--_lowered-container-color);--md-elevation-level: var(--_lowered-container-elevation)}.fab.lowered:focus{--md-elevation-level: var(--_lowered-focus-container-elevation)}.fab.lowered:hover{--md-elevation-level: var(--_lowered-hover-container-elevation)}.fab.lowered:active{--md-elevation-level: var(--_lowered-pressed-container-elevation)}.fab .label{color:var(--_label-text-color)}.fab:hover .fab .label{color:var(--_hover-label-text-color)}.fab:focus .fab .label{color:var(--_focus-label-text-color)}.fab:active .fab .label{color:var(--_pressed-label-text-color)}.label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--_label-text-font);font-size:var(--_label-text-size);line-height:var(--_label-text-line-height);font-weight:var(--_label-text-weight)}.fab.extended .icon ::slotted(*){margin-inline-end:12px}.ripple{overflow:hidden}.ripple,md-elevation{z-index:-1}.touch-target{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}:host([touch-target=none]) .touch-target{display:none}md-elevation,.fab{transition-duration:280ms;transition-timing-function:cubic-bezier(0.2, 0, 0, 1)}.fab,.ripple{border-start-start-radius:var(--_container-shape-start-start);border-start-end-radius:var(--_container-shape-start-end);border-end-start-radius:var(--_container-shape-end-start);border-end-end-radius:var(--_container-shape-end-end)}md-focus-ring{--md-focus-ring-shape-start-start: var(--_container-shape-start-start);--md-focus-ring-shape-start-end: var(--_container-shape-start-end);--md-focus-ring-shape-end-end: var(--_container-shape-end-end);--md-focus-ring-shape-end-start: var(--_container-shape-end-start)}.icon ::slotted(*){width:var(--_icon-size);height:var(--_icon-size);font-size:var(--_icon-size)} +`; + +/** + * @license + * Copyright 2023 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +/** + * @summary Floating action buttons (FABs) help people take primary actions. + * They’re used to represent the most important action on a screen, such as + * Create or Reply. + * + * @description + * __Emphasis:__ High emphasis – For the primary, most important, or most common + * action on a screen + * + * __Rationale:__ The FAB remains the default component for a screen’s primary + * action. It comes in three sizes: small FAB, FAB, and large FAB. The extended + * FAB’s wider format and text label give it more visual prominence than a FAB. + * It’s often used on larger screens where a FAB would seem too small. Branded + * FABs are used to specifically call attention to branded logo icons. + * + * __Example usages:__ + * - FAB + * - Create + * - Compose + * - Extended FAB + * - Create + * - Compose + * - New Thread + * - New File + * + * @final + * @suppress {visibility} + */ +let MdBrandedFab = class MdBrandedFab extends Fab { + getRenderClasses() { + return { + ...super.getRenderClasses(), + 'primary': false, + 'secondary': false, + 'tertiary': false, + 'small': false, + }; + } +}; +MdBrandedFab.styles = [styles$w, styles$y, styles$x]; +MdBrandedFab = __decorate([ + t$3('md-branded-fab') +], MdBrandedFab); + +/** + * @license + * Copyright 2024 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +// Generated stylesheet for ./fab/internal/fab-styles.css. +const styles$v = i$4 `:host{--_container-color: var(--md-fab-container-color, var(--md-sys-color-surface-container-high, #ece6f0));--_container-elevation: var(--md-fab-container-elevation, 3);--_container-height: var(--md-fab-container-height, 56px);--_container-shadow-color: var(--md-fab-container-shadow-color, var(--md-sys-color-shadow, #000));--_container-width: var(--md-fab-container-width, 56px);--_focus-container-elevation: var(--md-fab-focus-container-elevation, 3);--_focus-icon-color: var(--md-fab-focus-icon-color, var(--md-sys-color-primary, #6750a4));--_hover-container-elevation: var(--md-fab-hover-container-elevation, 4);--_hover-icon-color: var(--md-fab-hover-icon-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-color: var(--md-fab-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-opacity: var(--md-fab-hover-state-layer-opacity, 0.08);--_icon-color: var(--md-fab-icon-color, var(--md-sys-color-primary, #6750a4));--_icon-size: var(--md-fab-icon-size, 24px);--_lowered-container-color: var(--md-fab-lowered-container-color, var(--md-sys-color-surface-container-low, #f7f2fa));--_lowered-container-elevation: var(--md-fab-lowered-container-elevation, 1);--_lowered-focus-container-elevation: var(--md-fab-lowered-focus-container-elevation, 1);--_lowered-hover-container-elevation: var(--md-fab-lowered-hover-container-elevation, 2);--_lowered-pressed-container-elevation: var(--md-fab-lowered-pressed-container-elevation, 1);--_pressed-container-elevation: var(--md-fab-pressed-container-elevation, 3);--_pressed-icon-color: var(--md-fab-pressed-icon-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-color: var(--md-fab-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-opacity: var(--md-fab-pressed-state-layer-opacity, 0.12);--_focus-label-text-color: var(--md-fab-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_hover-label-text-color: var(--md-fab-hover-label-text-color, var(--md-sys-color-primary, #6750a4));--_label-text-color: var(--md-fab-label-text-color, var(--md-sys-color-primary, #6750a4));--_label-text-font: var(--md-fab-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-fab-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-fab-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-fab-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_large-container-height: var(--md-fab-large-container-height, 96px);--_large-container-width: var(--md-fab-large-container-width, 96px);--_large-icon-size: var(--md-fab-large-icon-size, 36px);--_pressed-label-text-color: var(--md-fab-pressed-label-text-color, var(--md-sys-color-primary, #6750a4));--_primary-container-color: var(--md-fab-primary-container-color, var(--md-sys-color-primary-container, #eaddff));--_primary-focus-icon-color: var(--md-fab-primary-focus-icon-color, var(--md-sys-color-on-primary-container, #21005d));--_primary-focus-label-text-color: var(--md-fab-primary-focus-label-text-color, var(--md-sys-color-on-primary-container, #21005d));--_primary-hover-icon-color: var(--md-fab-primary-hover-icon-color, var(--md-sys-color-on-primary-container, #21005d));--_primary-hover-label-text-color: var(--md-fab-primary-hover-label-text-color, var(--md-sys-color-on-primary-container, #21005d));--_primary-hover-state-layer-color: var(--md-fab-primary-hover-state-layer-color, var(--md-sys-color-on-primary-container, #21005d));--_primary-icon-color: var(--md-fab-primary-icon-color, var(--md-sys-color-on-primary-container, #21005d));--_primary-label-text-color: var(--md-fab-primary-label-text-color, var(--md-sys-color-on-primary-container, #21005d));--_primary-pressed-icon-color: var(--md-fab-primary-pressed-icon-color, var(--md-sys-color-on-primary-container, #21005d));--_primary-pressed-label-text-color: var(--md-fab-primary-pressed-label-text-color, var(--md-sys-color-on-primary-container, #21005d));--_primary-pressed-state-layer-color: var(--md-fab-primary-pressed-state-layer-color, var(--md-sys-color-on-primary-container, #21005d));--_secondary-container-color: var(--md-fab-secondary-container-color, var(--md-sys-color-secondary-container, #e8def8));--_secondary-focus-icon-color: var(--md-fab-secondary-focus-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_secondary-focus-label-text-color: var(--md-fab-secondary-focus-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_secondary-hover-icon-color: var(--md-fab-secondary-hover-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_secondary-hover-label-text-color: var(--md-fab-secondary-hover-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_secondary-hover-state-layer-color: var(--md-fab-secondary-hover-state-layer-color, var(--md-sys-color-on-secondary-container, #1d192b));--_secondary-icon-color: var(--md-fab-secondary-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_secondary-label-text-color: var(--md-fab-secondary-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_secondary-pressed-icon-color: var(--md-fab-secondary-pressed-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_secondary-pressed-label-text-color: var(--md-fab-secondary-pressed-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_secondary-pressed-state-layer-color: var(--md-fab-secondary-pressed-state-layer-color, var(--md-sys-color-on-secondary-container, #1d192b));--_small-container-height: var(--md-fab-small-container-height, 40px);--_small-container-width: var(--md-fab-small-container-width, 40px);--_small-icon-size: var(--md-fab-small-icon-size, 24px);--_tertiary-container-color: var(--md-fab-tertiary-container-color, var(--md-sys-color-tertiary-container, #ffd8e4));--_tertiary-focus-icon-color: var(--md-fab-tertiary-focus-icon-color, var(--md-sys-color-on-tertiary-container, #31111d));--_tertiary-focus-label-text-color: var(--md-fab-tertiary-focus-label-text-color, var(--md-sys-color-on-tertiary-container, #31111d));--_tertiary-hover-icon-color: var(--md-fab-tertiary-hover-icon-color, var(--md-sys-color-on-tertiary-container, #31111d));--_tertiary-hover-label-text-color: var(--md-fab-tertiary-hover-label-text-color, var(--md-sys-color-on-tertiary-container, #31111d));--_tertiary-hover-state-layer-color: var(--md-fab-tertiary-hover-state-layer-color, var(--md-sys-color-on-tertiary-container, #31111d));--_tertiary-icon-color: var(--md-fab-tertiary-icon-color, var(--md-sys-color-on-tertiary-container, #31111d));--_tertiary-label-text-color: var(--md-fab-tertiary-label-text-color, var(--md-sys-color-on-tertiary-container, #31111d));--_tertiary-pressed-icon-color: var(--md-fab-tertiary-pressed-icon-color, var(--md-sys-color-on-tertiary-container, #31111d));--_tertiary-pressed-label-text-color: var(--md-fab-tertiary-pressed-label-text-color, var(--md-sys-color-on-tertiary-container, #31111d));--_tertiary-pressed-state-layer-color: var(--md-fab-tertiary-pressed-state-layer-color, var(--md-sys-color-on-tertiary-container, #31111d));--_container-shape-start-start: var(--md-fab-container-shape-start-start, var(--md-fab-container-shape, var(--md-sys-shape-corner-large, 16px)));--_container-shape-start-end: var(--md-fab-container-shape-start-end, var(--md-fab-container-shape, var(--md-sys-shape-corner-large, 16px)));--_container-shape-end-end: var(--md-fab-container-shape-end-end, var(--md-fab-container-shape, var(--md-sys-shape-corner-large, 16px)));--_container-shape-end-start: var(--md-fab-container-shape-end-start, var(--md-fab-container-shape, var(--md-sys-shape-corner-large, 16px)));--_large-container-shape-start-start: var(--md-fab-large-container-shape-start-start, var(--md-fab-large-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));--_large-container-shape-start-end: var(--md-fab-large-container-shape-start-end, var(--md-fab-large-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));--_large-container-shape-end-end: var(--md-fab-large-container-shape-end-end, var(--md-fab-large-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));--_large-container-shape-end-start: var(--md-fab-large-container-shape-end-start, var(--md-fab-large-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));--_small-container-shape-start-start: var(--md-fab-small-container-shape-start-start, var(--md-fab-small-container-shape, var(--md-sys-shape-corner-medium, 12px)));--_small-container-shape-start-end: var(--md-fab-small-container-shape-start-end, var(--md-fab-small-container-shape, var(--md-sys-shape-corner-medium, 12px)));--_small-container-shape-end-end: var(--md-fab-small-container-shape-end-end, var(--md-fab-small-container-shape, var(--md-sys-shape-corner-medium, 12px)));--_small-container-shape-end-start: var(--md-fab-small-container-shape-end-start, var(--md-fab-small-container-shape, var(--md-sys-shape-corner-medium, 12px)));cursor:pointer}:host([size=small][touch-target=wrapper]){margin:max(0px,48px - var(--_small-container-height))}.fab{cursor:inherit}.fab .icon ::slotted(*){color:var(--_icon-color)}.fab:focus{color:var(--_focus-icon-color)}.fab:hover{color:var(--_hover-icon-color)}.fab:active{color:var(--_pressed-icon-color)}.fab.primary{background-color:var(--_primary-container-color);--md-ripple-hover-color: var(--_primary-hover-state-layer-color);--md-ripple-pressed-color: var(--_primary-pressed-state-layer-color)}.fab.primary .icon ::slotted(*){color:var(--_primary-icon-color)}.fab.primary:focus{color:var(--_primary-focus-icon-color)}.fab.primary:hover{color:var(--_primary-hover-icon-color)}.fab.primary:active{color:var(--_primary-pressed-icon-color)}.fab.primary .label{color:var(--_primary-label-text-color)}.fab:hover .fab.primary .label{color:var(--_primary-hover-label-text-color)}.fab:focus .fab.primary .label{color:var(--_primary-focus-label-text-color)}.fab:active .fab.primary .label{color:var(--_primary-pressed-label-text-color)}.fab.secondary{background-color:var(--_secondary-container-color);--md-ripple-hover-color: var(--_secondary-hover-state-layer-color);--md-ripple-pressed-color: var(--_secondary-pressed-state-layer-color)}.fab.secondary .icon ::slotted(*){color:var(--_secondary-icon-color)}.fab.secondary:focus{color:var(--_secondary-focus-icon-color)}.fab.secondary:hover{color:var(--_secondary-hover-icon-color)}.fab.secondary:active{color:var(--_secondary-pressed-icon-color)}.fab.secondary .label{color:var(--_secondary-label-text-color)}.fab:hover .fab.secondary .label{color:var(--_secondary-hover-label-text-color)}.fab:focus .fab.secondary .label{color:var(--_secondary-focus-label-text-color)}.fab:active .fab.secondary .label{color:var(--_secondary-pressed-label-text-color)}.fab.tertiary{background-color:var(--_tertiary-container-color);--md-ripple-hover-color: var(--_tertiary-hover-state-layer-color);--md-ripple-pressed-color: var(--_tertiary-pressed-state-layer-color)}.fab.tertiary .icon ::slotted(*){color:var(--_tertiary-icon-color)}.fab.tertiary:focus{color:var(--_tertiary-focus-icon-color)}.fab.tertiary:hover{color:var(--_tertiary-hover-icon-color)}.fab.tertiary:active{color:var(--_tertiary-pressed-icon-color)}.fab.tertiary .label{color:var(--_tertiary-label-text-color)}.fab:hover .fab.tertiary .label{color:var(--_tertiary-hover-label-text-color)}.fab:focus .fab.tertiary .label{color:var(--_tertiary-focus-label-text-color)}.fab:active .fab.tertiary .label{color:var(--_tertiary-pressed-label-text-color)}.fab.extended slot span{padding-inline-start:4px}.fab.small{width:var(--_small-container-width);height:var(--_small-container-height)}.fab.small .icon ::slotted(*){width:var(--_small-icon-size);height:var(--_small-icon-size);font-size:var(--_small-icon-size)}.fab.small,.fab.small .ripple{border-start-start-radius:var(--_small-container-shape-start-start);border-start-end-radius:var(--_small-container-shape-start-end);border-end-start-radius:var(--_small-container-shape-end-start);border-end-end-radius:var(--_small-container-shape-end-end)}.fab.small md-focus-ring{--md-focus-ring-shape-start-start: var(--_small-container-shape-start-start);--md-focus-ring-shape-start-end: var(--_small-container-shape-start-end);--md-focus-ring-shape-end-end: var(--_small-container-shape-end-end);--md-focus-ring-shape-end-start: var(--_small-container-shape-end-start)} +`; + +/** + * @license + * Copyright 2022 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +/** + * @summary Floating action buttons (FABs) help people take primary actions. + * They’re used to represent the most important action on a screen, such as + * Create or Reply. + * + * @description + * __Emphasis:__ High emphasis – For the primary, most important, or most common + * action on a screen + * + * __Rationale:__ The FAB remains the default component for a screen’s primary + * action. It comes in three sizes: small FAB, FAB, and large FAB. The extended + * FAB’s wider format and text label give it more visual prominence than a FAB. + * It’s often used on larger screens where a FAB would seem too small. + * + * __Example usages:__ + * - FAB + * - Create + * - Compose + * - Extended FAB + * - Create + * - Compose + * - New Thread + * - New File + * + * @final + * @suppress {visibility} + */ +let MdFab = class MdFab extends Fab { +}; +MdFab.styles = [styles$w, styles$v, styles$x]; +MdFab = __decorate([ + t$3('md-fab') +], MdFab); + +/** + * @license + * Copyright 2021 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +/** + * A field component. + */ +class Field extends s$1 { + constructor() { + super(...arguments); + this.disabled = false; + this.error = false; + this.focused = false; + this.label = ''; + this.populated = false; + this.required = false; + this.resizable = false; + this.supportingText = ''; + this.errorText = ''; + this.count = -1; + this.max = -1; + /** + * Whether or not the field has leading content. + */ + this.hasStart = false; + /** + * Whether or not the field has trailing content. + */ + this.hasEnd = false; + this.isAnimating = false; + /** + * When set to true, the error text's `role="alert"` will be removed, then + * re-added after an animation frame. This will re-announce an error message + * to screen readers. + */ + this.refreshErrorAlert = false; + this.disableTransitions = false; + } + get counterText() { + // Count and max are typed as number, but can be set to null when Lit removes + // their attributes. These getters coerce back to a number for calculations. + const countAsNumber = this.count ?? -1; + const maxAsNumber = this.max ?? -1; + // Counter does not show if count is negative, or max is negative or 0. + if (countAsNumber < 0 || maxAsNumber <= 0) { + return ''; + } + return `${countAsNumber} / ${maxAsNumber}`; + } + get supportingOrErrorText() { + return this.error && this.errorText ? this.errorText : this.supportingText; + } + /** + * Re-announces the field's error supporting text to screen readers. + * + * Error text announces to screen readers anytime it is visible and changes. + * Use the method to re-announce the message when the text has not changed, + * but announcement is still needed (such as for `reportValidity()`). + */ + reannounceError() { + this.refreshErrorAlert = true; + } + update(props) { + // Client-side property updates + const isDisabledChanging = props.has('disabled') && props.get('disabled') !== undefined; + if (isDisabledChanging) { + this.disableTransitions = true; + } + // When disabling, remove focus styles if focused. + if (this.disabled && this.focused) { + props.set('focused', true); + this.focused = false; + } + // Animate if focused or populated change. + this.animateLabelIfNeeded({ + wasFocused: props.get('focused'), + wasPopulated: props.get('populated'), + }); + super.update(props); + } + render() { + const floatingLabel = this.renderLabel(/*isFloating*/ true); + const restingLabel = this.renderLabel(/*isFloating*/ false); + const outline = this.renderOutline?.(floatingLabel); + const classes = { + 'disabled': this.disabled, + 'disable-transitions': this.disableTransitions, + 'error': this.error && !this.disabled, + 'focused': this.focused, + 'with-start': this.hasStart, + 'with-end': this.hasEnd, + 'populated': this.populated, + 'resizable': this.resizable, + 'required': this.required, + 'no-label': !this.label, + }; + return x ` +
    +
    + ${this.renderBackground?.()} ${this.renderIndicator?.()} ${outline} +
    +
    + +
    +
    +
    + ${restingLabel} ${outline ? T : floatingLabel} +
    +
    + +
    +
    +
    + +
    +
    +
    + ${this.renderSupportingText()} +
    + `; + } + updated(changed) { + if (changed.has('supportingText') || + changed.has('errorText') || + changed.has('count') || + changed.has('max')) { + this.updateSlottedAriaDescribedBy(); + } + if (this.refreshErrorAlert) { + // The past render cycle removed the role="alert" from the error message. + // Re-add it after an animation frame to re-announce the error. + requestAnimationFrame(() => { + this.refreshErrorAlert = false; + }); + } + if (this.disableTransitions) { + requestAnimationFrame(() => { + this.disableTransitions = false; + }); + } + } + renderSupportingText() { + const { supportingOrErrorText, counterText } = this; + if (!supportingOrErrorText && !counterText) { + return T; + } + // Always render the supporting text span so that our `space-around` + // container puts the counter at the end. + const start = x `${supportingOrErrorText}`; + // Conditionally render counter so we don't render the extra `gap`. + // TODO(b/244473435): add aria-label and announcements + const end = counterText + ? x `${counterText}` + : T; + // Announce if there is an error and error text visible. + // If refreshErrorAlert is true, do not announce. This will remove the + // role="alert" attribute. Another render cycle will happen after an + // animation frame to re-add the role. + const shouldErrorAnnounce = this.error && this.errorText && !this.refreshErrorAlert; + const role = shouldErrorAnnounce ? 'alert' : T; + return x ` +
    ${start}${end}
    + + `; + } + updateSlottedAriaDescribedBy() { + for (const element of this.slottedAriaDescribedBy) { + j(x `${this.supportingOrErrorText} ${this.counterText}`, element); + element.setAttribute('hidden', ''); + } + } + renderLabel(isFloating) { + if (!this.label) { + return T; + } + let visible; + if (isFloating) { + // Floating label is visible when focused/populated or when animating. + visible = this.focused || this.populated || this.isAnimating; + } + else { + // Resting label is visible when unfocused. It is never visible while + // animating. + visible = !this.focused && !this.populated && !this.isAnimating; + } + const classes = { + 'hidden': !visible, + 'floating': isFloating, + 'resting': !isFloating, + }; + // Add '*' if a label is present and the field is required + const labelText = `${this.label}${this.required ? '*' : ''}`; + return x ` + ${labelText} + `; + } + animateLabelIfNeeded({ wasFocused, wasPopulated, }) { + if (!this.label) { + return; + } + wasFocused ?? (wasFocused = this.focused); + wasPopulated ?? (wasPopulated = this.populated); + const wasFloating = wasFocused || wasPopulated; + const shouldBeFloating = this.focused || this.populated; + if (wasFloating === shouldBeFloating) { + return; + } + this.isAnimating = true; + this.labelAnimation?.cancel(); + // Only one label is visible at a time for clearer text rendering. + // The floating label is visible and used during animation. At the end of + // the animation, it will either remain visible (if floating) or hide and + // the resting label will be shown. + // + // We don't use forward filling because if the dimensions of the text field + // change (leading icon removed, density changes, etc), then the animation + // will be inaccurate. + // + // Re-calculating the animation each time will prevent any visual glitches + // from appearing. + // TODO(b/241113345): use animation tokens + this.labelAnimation = this.floatingLabelEl?.animate(this.getLabelKeyframes(), { duration: 150, easing: EASING.STANDARD }); + this.labelAnimation?.addEventListener('finish', () => { + // At the end of the animation, update the visible label. + this.isAnimating = false; + }); + } + getLabelKeyframes() { + const { floatingLabelEl, restingLabelEl } = this; + if (!floatingLabelEl || !restingLabelEl) { + return []; + } + const { x: floatingX, y: floatingY, height: floatingHeight, } = floatingLabelEl.getBoundingClientRect(); + const { x: restingX, y: restingY, height: restingHeight, } = restingLabelEl.getBoundingClientRect(); + const floatingScrollWidth = floatingLabelEl.scrollWidth; + const restingScrollWidth = restingLabelEl.scrollWidth; + // Scale by width ratio instead of font size since letter-spacing will scale + // incorrectly. Using the width we can better approximate the adjusted + // scale and compensate for tracking and overflow. + // (use scrollWidth instead of width to account for clipped labels) + const scale = restingScrollWidth / floatingScrollWidth; + const xDelta = restingX - floatingX; + // The line-height of the resting and floating label are different. When + // we move the floating label down to the resting label's position, it won't + // exactly match because of this. We need to adjust by half of what the + // final scaled floating label's height will be. + const yDelta = restingY - + floatingY + + Math.round((restingHeight - floatingHeight * scale) / 2); + // Create the two transforms: floating to resting (using the calculations + // above), and resting to floating (re-setting the transform to initial + // values). + const restTransform = `translateX(${xDelta}px) translateY(${yDelta}px) scale(${scale})`; + const floatTransform = `translateX(0) translateY(0) scale(1)`; + // Constrain the floating labels width to a scaled percentage of the + // resting label's width. This will prevent long clipped labels from + // overflowing the container. + const restingClientWidth = restingLabelEl.clientWidth; + const isRestingClipped = restingScrollWidth > restingClientWidth; + const width = isRestingClipped ? `${restingClientWidth / scale}px` : ''; + if (this.focused || this.populated) { + return [ + { transform: restTransform, width }, + { transform: floatTransform, width }, + ]; + } + return [ + { transform: floatTransform, width }, + { transform: restTransform, width }, + ]; + } + getSurfacePositionClientRect() { + return this.containerEl.getBoundingClientRect(); + } +} +__decorate([ + n$5({ type: Boolean }) +], Field.prototype, "disabled", void 0); +__decorate([ + n$5({ type: Boolean }) +], Field.prototype, "error", void 0); +__decorate([ + n$5({ type: Boolean }) +], Field.prototype, "focused", void 0); +__decorate([ + n$5() +], Field.prototype, "label", void 0); +__decorate([ + n$5({ type: Boolean }) +], Field.prototype, "populated", void 0); +__decorate([ + n$5({ type: Boolean }) +], Field.prototype, "required", void 0); +__decorate([ + n$5({ type: Boolean }) +], Field.prototype, "resizable", void 0); +__decorate([ + n$5({ attribute: 'supporting-text' }) +], Field.prototype, "supportingText", void 0); +__decorate([ + n$5({ attribute: 'error-text' }) +], Field.prototype, "errorText", void 0); +__decorate([ + n$5({ type: Number }) +], Field.prototype, "count", void 0); +__decorate([ + n$5({ type: Number }) +], Field.prototype, "max", void 0); +__decorate([ + n$5({ type: Boolean, attribute: 'has-start' }) +], Field.prototype, "hasStart", void 0); +__decorate([ + n$5({ type: Boolean, attribute: 'has-end' }) +], Field.prototype, "hasEnd", void 0); +__decorate([ + o$4({ slot: 'aria-describedby' }) +], Field.prototype, "slottedAriaDescribedBy", void 0); +__decorate([ + r$4() +], Field.prototype, "isAnimating", void 0); +__decorate([ + r$4() +], Field.prototype, "refreshErrorAlert", void 0); +__decorate([ + r$4() +], Field.prototype, "disableTransitions", void 0); +__decorate([ + e$5('.label.floating') +], Field.prototype, "floatingLabelEl", void 0); +__decorate([ + e$5('.label.resting') +], Field.prototype, "restingLabelEl", void 0); +__decorate([ + e$5('.container') +], Field.prototype, "containerEl", void 0); + +/** + * @license + * Copyright 2021 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +/** + * A filled field component. + */ +class FilledField extends Field { + renderBackground() { + return x ` +
    +
    + `; + } + renderIndicator() { + return x `
    `; + } +} + +/** + * @license + * Copyright 2024 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +// Generated stylesheet for ./field/internal/filled-styles.css. +const styles$u = i$4 `@layer styles{:host{--_active-indicator-color: var(--md-filled-field-active-indicator-color, var(--md-sys-color-on-surface-variant, #49454f));--_active-indicator-height: var(--md-filled-field-active-indicator-height, 1px);--_bottom-space: var(--md-filled-field-bottom-space, 16px);--_container-color: var(--md-filled-field-container-color, var(--md-sys-color-surface-container-highest, #e6e0e9));--_content-color: var(--md-filled-field-content-color, var(--md-sys-color-on-surface, #1d1b20));--_content-font: var(--md-filled-field-content-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_content-line-height: var(--md-filled-field-content-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_content-size: var(--md-filled-field-content-size, var(--md-sys-typescale-body-large-size, 1rem));--_content-weight: var(--md-filled-field-content-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_disabled-active-indicator-color: var(--md-filled-field-disabled-active-indicator-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-active-indicator-height: var(--md-filled-field-disabled-active-indicator-height, 1px);--_disabled-active-indicator-opacity: var(--md-filled-field-disabled-active-indicator-opacity, 0.38);--_disabled-container-color: var(--md-filled-field-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-container-opacity: var(--md-filled-field-disabled-container-opacity, 0.04);--_disabled-content-color: var(--md-filled-field-disabled-content-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-content-opacity: var(--md-filled-field-disabled-content-opacity, 0.38);--_disabled-label-text-color: var(--md-filled-field-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-filled-field-disabled-label-text-opacity, 0.38);--_disabled-leading-content-color: var(--md-filled-field-disabled-leading-content-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-leading-content-opacity: var(--md-filled-field-disabled-leading-content-opacity, 0.38);--_disabled-supporting-text-color: var(--md-filled-field-disabled-supporting-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-supporting-text-opacity: var(--md-filled-field-disabled-supporting-text-opacity, 0.38);--_disabled-trailing-content-color: var(--md-filled-field-disabled-trailing-content-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-trailing-content-opacity: var(--md-filled-field-disabled-trailing-content-opacity, 0.38);--_error-active-indicator-color: var(--md-filled-field-error-active-indicator-color, var(--md-sys-color-error, #b3261e));--_error-content-color: var(--md-filled-field-error-content-color, var(--md-sys-color-on-surface, #1d1b20));--_error-focus-active-indicator-color: var(--md-filled-field-error-focus-active-indicator-color, var(--md-sys-color-error, #b3261e));--_error-focus-content-color: var(--md-filled-field-error-focus-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-focus-label-text-color: var(--md-filled-field-error-focus-label-text-color, var(--md-sys-color-error, #b3261e));--_error-focus-leading-content-color: var(--md-filled-field-error-focus-leading-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-focus-supporting-text-color: var(--md-filled-field-error-focus-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-focus-trailing-content-color: var(--md-filled-field-error-focus-trailing-content-color, var(--md-sys-color-error, #b3261e));--_error-hover-active-indicator-color: var(--md-filled-field-error-hover-active-indicator-color, var(--md-sys-color-on-error-container, #410e0b));--_error-hover-content-color: var(--md-filled-field-error-hover-content-color, var(--md-sys-color-on-surface, #1d1b20));--_error-hover-label-text-color: var(--md-filled-field-error-hover-label-text-color, var(--md-sys-color-on-error-container, #410e0b));--_error-hover-leading-content-color: var(--md-filled-field-error-hover-leading-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-hover-state-layer-color: var(--md-filled-field-error-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_error-hover-state-layer-opacity: var(--md-filled-field-error-hover-state-layer-opacity, 0.08);--_error-hover-supporting-text-color: var(--md-filled-field-error-hover-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-hover-trailing-content-color: var(--md-filled-field-error-hover-trailing-content-color, var(--md-sys-color-on-error-container, #410e0b));--_error-label-text-color: var(--md-filled-field-error-label-text-color, var(--md-sys-color-error, #b3261e));--_error-leading-content-color: var(--md-filled-field-error-leading-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-supporting-text-color: var(--md-filled-field-error-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-trailing-content-color: var(--md-filled-field-error-trailing-content-color, var(--md-sys-color-error, #b3261e));--_focus-active-indicator-color: var(--md-filled-field-focus-active-indicator-color, var(--md-sys-color-primary, #6750a4));--_focus-active-indicator-height: var(--md-filled-field-focus-active-indicator-height, 3px);--_focus-content-color: var(--md-filled-field-focus-content-color, var(--md-sys-color-on-surface, #1d1b20));--_focus-label-text-color: var(--md-filled-field-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_focus-leading-content-color: var(--md-filled-field-focus-leading-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_focus-supporting-text-color: var(--md-filled-field-focus-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_focus-trailing-content-color: var(--md-filled-field-focus-trailing-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-active-indicator-color: var(--md-filled-field-hover-active-indicator-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-active-indicator-height: var(--md-filled-field-hover-active-indicator-height, 1px);--_hover-content-color: var(--md-filled-field-hover-content-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-label-text-color: var(--md-filled-field-hover-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-leading-content-color: var(--md-filled-field-hover-leading-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-state-layer-color: var(--md-filled-field-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-state-layer-opacity: var(--md-filled-field-hover-state-layer-opacity, 0.08);--_hover-supporting-text-color: var(--md-filled-field-hover-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-trailing-content-color: var(--md-filled-field-hover-trailing-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_label-text-color: var(--md-filled-field-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_label-text-font: var(--md-filled-field-label-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-filled-field-label-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_label-text-populated-line-height: var(--md-filled-field-label-text-populated-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_label-text-populated-size: var(--md-filled-field-label-text-populated-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_label-text-size: var(--md-filled-field-label-text-size, var(--md-sys-typescale-body-large-size, 1rem));--_label-text-weight: var(--md-filled-field-label-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_leading-content-color: var(--md-filled-field-leading-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_leading-space: var(--md-filled-field-leading-space, 16px);--_supporting-text-color: var(--md-filled-field-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_supporting-text-font: var(--md-filled-field-supporting-text-font, var(--md-sys-typescale-body-small-font, var(--md-ref-typeface-plain, Roboto)));--_supporting-text-leading-space: var(--md-filled-field-supporting-text-leading-space, 16px);--_supporting-text-line-height: var(--md-filled-field-supporting-text-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_supporting-text-size: var(--md-filled-field-supporting-text-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_supporting-text-top-space: var(--md-filled-field-supporting-text-top-space, 4px);--_supporting-text-trailing-space: var(--md-filled-field-supporting-text-trailing-space, 16px);--_supporting-text-weight: var(--md-filled-field-supporting-text-weight, var(--md-sys-typescale-body-small-weight, var(--md-ref-typeface-weight-regular, 400)));--_top-space: var(--md-filled-field-top-space, 16px);--_trailing-content-color: var(--md-filled-field-trailing-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_trailing-space: var(--md-filled-field-trailing-space, 16px);--_with-label-bottom-space: var(--md-filled-field-with-label-bottom-space, 8px);--_with-label-top-space: var(--md-filled-field-with-label-top-space, 8px);--_container-shape-start-start: var(--md-filled-field-container-shape-start-start, var(--md-filled-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_container-shape-start-end: var(--md-filled-field-container-shape-start-end, var(--md-filled-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_container-shape-end-end: var(--md-filled-field-container-shape-end-end, var(--md-filled-field-container-shape, var(--md-sys-shape-corner-none, 0px)));--_container-shape-end-start: var(--md-filled-field-container-shape-end-start, var(--md-filled-field-container-shape, var(--md-sys-shape-corner-none, 0px)))}.background,.state-layer{border-radius:inherit;inset:0;pointer-events:none;position:absolute}.background{background:var(--_container-color)}.state-layer{visibility:hidden}.field:not(.disabled):hover .state-layer{visibility:visible}.label.floating{position:absolute;top:var(--_with-label-top-space)}.field:not(.with-start) .label-wrapper{margin-inline-start:var(--_leading-space)}.field:not(.with-end) .label-wrapper{margin-inline-end:var(--_trailing-space)}.active-indicator{inset:auto 0 0 0;pointer-events:none;position:absolute;width:100%;z-index:1}.active-indicator::before,.active-indicator::after{border-bottom:var(--_active-indicator-height) solid var(--_active-indicator-color);inset:auto 0 0 0;content:"";position:absolute;width:100%}.active-indicator::after{opacity:0;transition:opacity 150ms cubic-bezier(0.2, 0, 0, 1)}.focused .active-indicator::after{opacity:1}.field:not(.with-start) .content ::slotted(*){padding-inline-start:var(--_leading-space)}.field:not(.with-end) .content ::slotted(*){padding-inline-end:var(--_trailing-space)}.field:not(.no-label) .content ::slotted(:not(textarea)){padding-bottom:var(--_with-label-bottom-space);padding-top:calc(var(--_with-label-top-space) + var(--_label-text-populated-line-height))}.field:not(.no-label) .content ::slotted(textarea){margin-bottom:var(--_with-label-bottom-space);margin-top:calc(var(--_with-label-top-space) + var(--_label-text-populated-line-height))}:hover .active-indicator::before{border-bottom-color:var(--_hover-active-indicator-color);border-bottom-width:var(--_hover-active-indicator-height)}.active-indicator::after{border-bottom-color:var(--_focus-active-indicator-color);border-bottom-width:var(--_focus-active-indicator-height)}:hover .state-layer{background:var(--_hover-state-layer-color);opacity:var(--_hover-state-layer-opacity)}.disabled .active-indicator::before{border-bottom-color:var(--_disabled-active-indicator-color);border-bottom-width:var(--_disabled-active-indicator-height);opacity:var(--_disabled-active-indicator-opacity)}.disabled .background{background:var(--_disabled-container-color);opacity:var(--_disabled-container-opacity)}.error .active-indicator::before{border-bottom-color:var(--_error-active-indicator-color)}.error:hover .active-indicator::before{border-bottom-color:var(--_error-hover-active-indicator-color)}.error:hover .state-layer{background:var(--_error-hover-state-layer-color);opacity:var(--_error-hover-state-layer-opacity)}.error .active-indicator::after{border-bottom-color:var(--_error-focus-active-indicator-color)}.resizable .container{bottom:var(--_focus-active-indicator-height);clip-path:inset(var(--_focus-active-indicator-height) 0 0 0)}.resizable .container>*{top:var(--_focus-active-indicator-height)}}@layer hcm{@media(forced-colors: active){.disabled .active-indicator::before{border-color:GrayText;opacity:1}}} +`; + +/** + * @license + * Copyright 2024 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +// Generated stylesheet for ./field/internal/shared-styles.css. +const styles$t = i$4 `:host{display:inline-flex;resize:both}.field{display:flex;flex:1;flex-direction:column;writing-mode:horizontal-tb;max-width:100%}.container-overflow{border-start-start-radius:var(--_container-shape-start-start);border-start-end-radius:var(--_container-shape-start-end);border-end-end-radius:var(--_container-shape-end-end);border-end-start-radius:var(--_container-shape-end-start);display:flex;height:100%;position:relative}.container{align-items:center;border-radius:inherit;display:flex;flex:1;max-height:100%;min-height:100%;min-width:min-content;position:relative}.field,.container-overflow{resize:inherit}.resizable:not(.disabled) .container{resize:inherit;overflow:hidden}.disabled{pointer-events:none}@layer styles{.start,.middle,.end{display:flex;box-sizing:border-box;height:100%;position:relative}.start{color:var(--_leading-content-color)}.end{color:var(--_trailing-content-color)}.start,.end{align-items:center;justify-content:center}.with-start .start,.with-end .end{min-width:48px}.with-start .start{margin-inline-end:4px}.with-end .end{margin-inline-start:4px}.middle{align-items:stretch;align-self:baseline;flex:1}.content{color:var(--_content-color);display:flex;flex:1;opacity:0;transition:opacity 83ms cubic-bezier(0.2, 0, 0, 1)}.no-label .content,.focused .content,.populated .content{opacity:1;transition-delay:67ms}:is(.disabled,.disable-transitions) .content{transition:none}.content ::slotted(*){all:unset;color:currentColor;font-family:var(--_content-font);font-size:var(--_content-size);line-height:var(--_content-line-height);font-weight:var(--_content-weight);width:100%;overflow-wrap:revert;white-space:revert}.content ::slotted(:not(textarea)){padding-top:var(--_top-space);padding-bottom:var(--_bottom-space)}.content ::slotted(textarea){margin-top:var(--_top-space);margin-bottom:var(--_bottom-space)}:hover .content{color:var(--_hover-content-color)}:hover .start{color:var(--_hover-leading-content-color)}:hover .end{color:var(--_hover-trailing-content-color)}.focused .content{color:var(--_focus-content-color)}.focused .start{color:var(--_focus-leading-content-color)}.focused .end{color:var(--_focus-trailing-content-color)}.disabled .content{color:var(--_disabled-content-color)}.disabled.no-label .content,.disabled.focused .content,.disabled.populated .content{opacity:var(--_disabled-content-opacity)}.disabled .start{color:var(--_disabled-leading-content-color);opacity:var(--_disabled-leading-content-opacity)}.disabled .end{color:var(--_disabled-trailing-content-color);opacity:var(--_disabled-trailing-content-opacity)}.error .content{color:var(--_error-content-color)}.error .start{color:var(--_error-leading-content-color)}.error .end{color:var(--_error-trailing-content-color)}.error:hover .content{color:var(--_error-hover-content-color)}.error:hover .start{color:var(--_error-hover-leading-content-color)}.error:hover .end{color:var(--_error-hover-trailing-content-color)}.error.focused .content{color:var(--_error-focus-content-color)}.error.focused .start{color:var(--_error-focus-leading-content-color)}.error.focused .end{color:var(--_error-focus-trailing-content-color)}}@layer hcm{@media(forced-colors: active){.disabled :is(.start,.content,.end){color:GrayText;opacity:1}}}@layer styles{.label{box-sizing:border-box;color:var(--_label-text-color);overflow:hidden;max-width:100%;text-overflow:ellipsis;white-space:nowrap;z-index:1;font-family:var(--_label-text-font);font-size:var(--_label-text-size);line-height:var(--_label-text-line-height);font-weight:var(--_label-text-weight);width:min-content}.label-wrapper{inset:0;pointer-events:none;position:absolute}.label.resting{position:absolute;top:var(--_top-space)}.label.floating{font-size:var(--_label-text-populated-size);line-height:var(--_label-text-populated-line-height);transform-origin:top left}.label.hidden{opacity:0}.no-label .label{display:none}.label-wrapper{inset:0;position:absolute;text-align:initial}:hover .label{color:var(--_hover-label-text-color)}.focused .label{color:var(--_focus-label-text-color)}.disabled .label{color:var(--_disabled-label-text-color)}.disabled .label:not(.hidden){opacity:var(--_disabled-label-text-opacity)}.error .label{color:var(--_error-label-text-color)}.error:hover .label{color:var(--_error-hover-label-text-color)}.error.focused .label{color:var(--_error-focus-label-text-color)}}@layer hcm{@media(forced-colors: active){.disabled .label:not(.hidden){color:GrayText;opacity:1}}}@layer styles{.supporting-text{color:var(--_supporting-text-color);display:flex;font-family:var(--_supporting-text-font);font-size:var(--_supporting-text-size);line-height:var(--_supporting-text-line-height);font-weight:var(--_supporting-text-weight);gap:16px;justify-content:space-between;padding-inline-start:var(--_supporting-text-leading-space);padding-inline-end:var(--_supporting-text-trailing-space);padding-top:var(--_supporting-text-top-space)}.supporting-text :nth-child(2){flex-shrink:0}:hover .supporting-text{color:var(--_hover-supporting-text-color)}.focus .supporting-text{color:var(--_focus-supporting-text-color)}.disabled .supporting-text{color:var(--_disabled-supporting-text-color);opacity:var(--_disabled-supporting-text-opacity)}.error .supporting-text{color:var(--_error-supporting-text-color)}.error:hover .supporting-text{color:var(--_error-hover-supporting-text-color)}.error.focus .supporting-text{color:var(--_error-focus-supporting-text-color)}}@layer hcm{@media(forced-colors: active){.disabled .supporting-text{color:GrayText;opacity:1}}} +`; + +/** + * @license + * Copyright 2021 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +/** + * TODO(b/228525797): add docs + * @final + * @suppress {visibility} + */ +let MdFilledField = class MdFilledField extends FilledField { +}; +MdFilledField.styles = [styles$t, styles$u]; +MdFilledField = __decorate([ + t$3('md-filled-field') +], MdFilledField); + +/** + * @license + * Copyright 2021 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +/** + * An outlined field component. + */ +class OutlinedField extends Field { + renderOutline(floatingLabel) { + return x ` +
    +
    +
    +
    +
    +
    ${floatingLabel}
    +
    +
    +
    + `; + } +} + +/** + * @license + * Copyright 2024 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +// Generated stylesheet for ./field/internal/outlined-styles.css. +const styles$s = i$4 `@layer styles{:host{--_bottom-space: var(--md-outlined-field-bottom-space, 16px);--_content-color: var(--md-outlined-field-content-color, var(--md-sys-color-on-surface, #1d1b20));--_content-font: var(--md-outlined-field-content-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_content-line-height: var(--md-outlined-field-content-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_content-size: var(--md-outlined-field-content-size, var(--md-sys-typescale-body-large-size, 1rem));--_content-weight: var(--md-outlined-field-content-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_disabled-content-color: var(--md-outlined-field-disabled-content-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-content-opacity: var(--md-outlined-field-disabled-content-opacity, 0.38);--_disabled-label-text-color: var(--md-outlined-field-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-outlined-field-disabled-label-text-opacity, 0.38);--_disabled-leading-content-color: var(--md-outlined-field-disabled-leading-content-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-leading-content-opacity: var(--md-outlined-field-disabled-leading-content-opacity, 0.38);--_disabled-outline-color: var(--md-outlined-field-disabled-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-outline-opacity: var(--md-outlined-field-disabled-outline-opacity, 0.12);--_disabled-outline-width: var(--md-outlined-field-disabled-outline-width, 1px);--_disabled-supporting-text-color: var(--md-outlined-field-disabled-supporting-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-supporting-text-opacity: var(--md-outlined-field-disabled-supporting-text-opacity, 0.38);--_disabled-trailing-content-color: var(--md-outlined-field-disabled-trailing-content-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-trailing-content-opacity: var(--md-outlined-field-disabled-trailing-content-opacity, 0.38);--_error-content-color: var(--md-outlined-field-error-content-color, var(--md-sys-color-on-surface, #1d1b20));--_error-focus-content-color: var(--md-outlined-field-error-focus-content-color, var(--md-sys-color-on-surface, #1d1b20));--_error-focus-label-text-color: var(--md-outlined-field-error-focus-label-text-color, var(--md-sys-color-error, #b3261e));--_error-focus-leading-content-color: var(--md-outlined-field-error-focus-leading-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-focus-outline-color: var(--md-outlined-field-error-focus-outline-color, var(--md-sys-color-error, #b3261e));--_error-focus-supporting-text-color: var(--md-outlined-field-error-focus-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-focus-trailing-content-color: var(--md-outlined-field-error-focus-trailing-content-color, var(--md-sys-color-error, #b3261e));--_error-hover-content-color: var(--md-outlined-field-error-hover-content-color, var(--md-sys-color-on-surface, #1d1b20));--_error-hover-label-text-color: var(--md-outlined-field-error-hover-label-text-color, var(--md-sys-color-on-error-container, #410e0b));--_error-hover-leading-content-color: var(--md-outlined-field-error-hover-leading-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-hover-outline-color: var(--md-outlined-field-error-hover-outline-color, var(--md-sys-color-on-error-container, #410e0b));--_error-hover-supporting-text-color: var(--md-outlined-field-error-hover-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-hover-trailing-content-color: var(--md-outlined-field-error-hover-trailing-content-color, var(--md-sys-color-on-error-container, #410e0b));--_error-label-text-color: var(--md-outlined-field-error-label-text-color, var(--md-sys-color-error, #b3261e));--_error-leading-content-color: var(--md-outlined-field-error-leading-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-outline-color: var(--md-outlined-field-error-outline-color, var(--md-sys-color-error, #b3261e));--_error-supporting-text-color: var(--md-outlined-field-error-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-trailing-content-color: var(--md-outlined-field-error-trailing-content-color, var(--md-sys-color-error, #b3261e));--_focus-content-color: var(--md-outlined-field-focus-content-color, var(--md-sys-color-on-surface, #1d1b20));--_focus-label-text-color: var(--md-outlined-field-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_focus-leading-content-color: var(--md-outlined-field-focus-leading-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_focus-outline-color: var(--md-outlined-field-focus-outline-color, var(--md-sys-color-primary, #6750a4));--_focus-outline-width: var(--md-outlined-field-focus-outline-width, 3px);--_focus-supporting-text-color: var(--md-outlined-field-focus-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_focus-trailing-content-color: var(--md-outlined-field-focus-trailing-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-content-color: var(--md-outlined-field-hover-content-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-label-text-color: var(--md-outlined-field-hover-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-leading-content-color: var(--md-outlined-field-hover-leading-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-outline-color: var(--md-outlined-field-hover-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-outline-width: var(--md-outlined-field-hover-outline-width, 1px);--_hover-supporting-text-color: var(--md-outlined-field-hover-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-trailing-content-color: var(--md-outlined-field-hover-trailing-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_label-text-color: var(--md-outlined-field-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_label-text-font: var(--md-outlined-field-label-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-outlined-field-label-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_label-text-padding-bottom: var(--md-outlined-field-label-text-padding-bottom, 8px);--_label-text-populated-line-height: var(--md-outlined-field-label-text-populated-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_label-text-populated-size: var(--md-outlined-field-label-text-populated-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_label-text-size: var(--md-outlined-field-label-text-size, var(--md-sys-typescale-body-large-size, 1rem));--_label-text-weight: var(--md-outlined-field-label-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_leading-content-color: var(--md-outlined-field-leading-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_leading-space: var(--md-outlined-field-leading-space, 16px);--_outline-color: var(--md-outlined-field-outline-color, var(--md-sys-color-outline, #79747e));--_outline-label-padding: var(--md-outlined-field-outline-label-padding, 4px);--_outline-width: var(--md-outlined-field-outline-width, 1px);--_supporting-text-color: var(--md-outlined-field-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_supporting-text-font: var(--md-outlined-field-supporting-text-font, var(--md-sys-typescale-body-small-font, var(--md-ref-typeface-plain, Roboto)));--_supporting-text-leading-space: var(--md-outlined-field-supporting-text-leading-space, 16px);--_supporting-text-line-height: var(--md-outlined-field-supporting-text-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_supporting-text-size: var(--md-outlined-field-supporting-text-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_supporting-text-top-space: var(--md-outlined-field-supporting-text-top-space, 4px);--_supporting-text-trailing-space: var(--md-outlined-field-supporting-text-trailing-space, 16px);--_supporting-text-weight: var(--md-outlined-field-supporting-text-weight, var(--md-sys-typescale-body-small-weight, var(--md-ref-typeface-weight-regular, 400)));--_top-space: var(--md-outlined-field-top-space, 16px);--_trailing-content-color: var(--md-outlined-field-trailing-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_trailing-space: var(--md-outlined-field-trailing-space, 16px);--_container-shape-start-start: var(--md-outlined-field-container-shape-start-start, var(--md-outlined-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_container-shape-start-end: var(--md-outlined-field-container-shape-start-end, var(--md-outlined-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_container-shape-end-end: var(--md-outlined-field-container-shape-end-end, var(--md-outlined-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_container-shape-end-start: var(--md-outlined-field-container-shape-end-start, var(--md-outlined-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)))}.outline{border-color:var(--_outline-color);border-radius:inherit;display:flex;pointer-events:none;height:100%;position:absolute;width:100%;z-index:1}.outline-start::before,.outline-start::after,.outline-panel-inactive::before,.outline-panel-inactive::after,.outline-panel-active::before,.outline-panel-active::after,.outline-end::before,.outline-end::after{border:inherit;content:"";inset:0;position:absolute}.outline-start,.outline-end{border:inherit;border-radius:inherit;box-sizing:border-box;position:relative}.outline-start::before,.outline-start::after,.outline-end::before,.outline-end::after{border-bottom-style:solid;border-top-style:solid}.outline-start::after,.outline-end::after{opacity:0;transition:opacity 150ms cubic-bezier(0.2, 0, 0, 1)}.focused .outline-start::after,.focused .outline-end::after{opacity:1}.outline-start::before,.outline-start::after{border-inline-start-style:solid;border-inline-end-style:none;border-start-start-radius:inherit;border-start-end-radius:0;border-end-start-radius:inherit;border-end-end-radius:0;margin-inline-end:var(--_outline-label-padding)}.outline-end{flex-grow:1;margin-inline-start:calc(-1*var(--_outline-label-padding))}.outline-end::before,.outline-end::after{border-inline-start-style:none;border-inline-end-style:solid;border-start-start-radius:0;border-start-end-radius:inherit;border-end-start-radius:0;border-end-end-radius:inherit}.outline-notch{align-items:flex-start;border:inherit;display:flex;margin-inline-start:calc(-1*var(--_outline-label-padding));margin-inline-end:var(--_outline-label-padding);max-width:calc(100% - var(--_leading-space) - var(--_trailing-space));padding:0 var(--_outline-label-padding);position:relative}.no-label .outline-notch{display:none}.outline-panel-inactive,.outline-panel-active{border:inherit;border-bottom-style:solid;inset:0;position:absolute}.outline-panel-inactive::before,.outline-panel-inactive::after,.outline-panel-active::before,.outline-panel-active::after{border-top-style:solid;border-bottom:none;bottom:auto;transform:scaleX(1);transition:transform 150ms cubic-bezier(0.2, 0, 0, 1)}.outline-panel-inactive::before,.outline-panel-active::before{right:50%;transform-origin:top left}.outline-panel-inactive::after,.outline-panel-active::after{left:50%;transform-origin:top right}.populated .outline-panel-inactive::before,.populated .outline-panel-inactive::after,.populated .outline-panel-active::before,.populated .outline-panel-active::after,.focused .outline-panel-inactive::before,.focused .outline-panel-inactive::after,.focused .outline-panel-active::before,.focused .outline-panel-active::after{transform:scaleX(0)}.outline-panel-active{opacity:0;transition:opacity 150ms cubic-bezier(0.2, 0, 0, 1)}.focused .outline-panel-active{opacity:1}.outline-label{display:flex;max-width:100%;transform:translateY(calc(-100% + var(--_label-text-padding-bottom)))}.outline-start,.field:not(.with-start) .content ::slotted(*){padding-inline-start:max(var(--_leading-space),max(var(--_container-shape-start-start),var(--_container-shape-end-start)) + var(--_outline-label-padding))}.field:not(.with-start) .label-wrapper{margin-inline-start:max(var(--_leading-space),max(var(--_container-shape-start-start),var(--_container-shape-end-start)) + var(--_outline-label-padding))}.field:not(.with-end) .content ::slotted(*){padding-inline-end:max(var(--_trailing-space),max(var(--_container-shape-start-end),var(--_container-shape-end-end)))}.field:not(.with-end) .label-wrapper{margin-inline-end:max(var(--_trailing-space),max(var(--_container-shape-start-end),var(--_container-shape-end-end)))}.outline-start::before,.outline-end::before,.outline-panel-inactive,.outline-panel-inactive::before,.outline-panel-inactive::after{border-width:var(--_outline-width)}:hover .outline{border-color:var(--_hover-outline-color);color:var(--_hover-outline-color)}:hover .outline-start::before,:hover .outline-end::before,:hover .outline-panel-inactive,:hover .outline-panel-inactive::before,:hover .outline-panel-inactive::after{border-width:var(--_hover-outline-width)}.focused .outline{border-color:var(--_focus-outline-color);color:var(--_focus-outline-color)}.outline-start::after,.outline-end::after,.outline-panel-active,.outline-panel-active::before,.outline-panel-active::after{border-width:var(--_focus-outline-width)}.disabled .outline{border-color:var(--_disabled-outline-color);color:var(--_disabled-outline-color)}.disabled .outline-start,.disabled .outline-end,.disabled .outline-panel-inactive{opacity:var(--_disabled-outline-opacity)}.disabled .outline-start::before,.disabled .outline-end::before,.disabled .outline-panel-inactive,.disabled .outline-panel-inactive::before,.disabled .outline-panel-inactive::after{border-width:var(--_disabled-outline-width)}.error .outline{border-color:var(--_error-outline-color);color:var(--_error-outline-color)}.error:hover .outline{border-color:var(--_error-hover-outline-color);color:var(--_error-hover-outline-color)}.error.focused .outline{border-color:var(--_error-focus-outline-color);color:var(--_error-focus-outline-color)}.resizable .container{bottom:var(--_focus-outline-width);inset-inline-end:var(--_focus-outline-width);clip-path:inset(var(--_focus-outline-width) 0 0 var(--_focus-outline-width))}.resizable .container>*{top:var(--_focus-outline-width);inset-inline-start:var(--_focus-outline-width)}.resizable .container:dir(rtl){clip-path:inset(var(--_focus-outline-width) var(--_focus-outline-width) 0 0)}}@layer hcm{@media(forced-colors: active){.disabled .outline{border-color:GrayText;color:GrayText}.disabled :is(.outline-start,.outline-end,.outline-panel-inactive){opacity:1}}} +`; + +/** + * @license + * Copyright 2021 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +/** + * TODO(b/228525797): add docs + * @final + * @suppress {visibility} + */ +let MdOutlinedField = class MdOutlinedField extends OutlinedField { +}; +MdOutlinedField.styles = [styles$t, styles$s]; +MdOutlinedField = __decorate([ + t$3('md-outlined-field') +], MdOutlinedField); + +/** + * @license + * Copyright 2022 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +/** + * TODO(b/265336902): add docs + */ +class Icon extends s$1 { + render() { + return x ``; + } + connectedCallback() { + super.connectedCallback(); + const ariaHidden = this.getAttribute('aria-hidden'); + if (ariaHidden === 'false') { + // Allow the user to set `aria-hidden="false"` to create an icon that is + // announced by screenreaders. + this.removeAttribute('aria-hidden'); + return; + } + // Needed for VoiceOver, which will create a "group" if the element is a + // sibling to other content. + this.setAttribute('aria-hidden', 'true'); + } +} + +/** + * @license + * Copyright 2024 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +// Generated stylesheet for ./icon/internal/icon-styles.css. +const styles$r = i$4 `:host{font-size:var(--md-icon-size, 24px);width:var(--md-icon-size, 24px);height:var(--md-icon-size, 24px);color:inherit;font-variation-settings:inherit;font-weight:400;font-family:var(--md-icon-font, Material Symbols Outlined);display:inline-flex;font-style:normal;place-items:center;place-content:center;line-height:1;overflow:hidden;letter-spacing:normal;text-transform:none;user-select:none;white-space:nowrap;word-wrap:normal;flex-shrink:0;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}::slotted(svg){fill:currentColor}::slotted(*){height:100%;width:100%} +`; + +/** + * @license + * Copyright 2022 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +/** + * @final + * @suppress {visibility} + */ +let MdIcon = class MdIcon extends Icon { +}; +/** @nocollapse */ +MdIcon.styles = [styles$r]; +MdIcon = __decorate([ + t$3('md-icon') +], MdIcon); + +/** + * @license + * Copyright 2024 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +// Generated stylesheet for ./iconbutton/internal/filled-styles.css. +const styles$q = i$4 `:host{--_container-color: var(--md-filled-icon-button-container-color, var(--md-sys-color-primary, #6750a4));--_container-height: var(--md-filled-icon-button-container-height, 40px);--_container-width: var(--md-filled-icon-button-container-width, 40px);--_disabled-container-color: var(--md-filled-icon-button-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-container-opacity: var(--md-filled-icon-button-disabled-container-opacity, 0.12);--_disabled-icon-color: var(--md-filled-icon-button-disabled-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-icon-opacity: var(--md-filled-icon-button-disabled-icon-opacity, 0.38);--_focus-icon-color: var(--md-filled-icon-button-focus-icon-color, var(--md-sys-color-on-primary, #fff));--_hover-icon-color: var(--md-filled-icon-button-hover-icon-color, var(--md-sys-color-on-primary, #fff));--_hover-state-layer-color: var(--md-filled-icon-button-hover-state-layer-color, var(--md-sys-color-on-primary, #fff));--_hover-state-layer-opacity: var(--md-filled-icon-button-hover-state-layer-opacity, 0.08);--_icon-color: var(--md-filled-icon-button-icon-color, var(--md-sys-color-on-primary, #fff));--_icon-size: var(--md-filled-icon-button-icon-size, 24px);--_pressed-icon-color: var(--md-filled-icon-button-pressed-icon-color, var(--md-sys-color-on-primary, #fff));--_pressed-state-layer-color: var(--md-filled-icon-button-pressed-state-layer-color, var(--md-sys-color-on-primary, #fff));--_pressed-state-layer-opacity: var(--md-filled-icon-button-pressed-state-layer-opacity, 0.12);--_selected-container-color: var(--md-filled-icon-button-selected-container-color, var(--md-sys-color-primary, #6750a4));--_toggle-selected-focus-icon-color: var(--md-filled-icon-button-toggle-selected-focus-icon-color, var(--md-sys-color-on-primary, #fff));--_toggle-selected-hover-icon-color: var(--md-filled-icon-button-toggle-selected-hover-icon-color, var(--md-sys-color-on-primary, #fff));--_toggle-selected-hover-state-layer-color: var(--md-filled-icon-button-toggle-selected-hover-state-layer-color, var(--md-sys-color-on-primary, #fff));--_toggle-selected-icon-color: var(--md-filled-icon-button-toggle-selected-icon-color, var(--md-sys-color-on-primary, #fff));--_toggle-selected-pressed-icon-color: var(--md-filled-icon-button-toggle-selected-pressed-icon-color, var(--md-sys-color-on-primary, #fff));--_toggle-selected-pressed-state-layer-color: var(--md-filled-icon-button-toggle-selected-pressed-state-layer-color, var(--md-sys-color-on-primary, #fff));--_unselected-container-color: var(--md-filled-icon-button-unselected-container-color, var(--md-sys-color-surface-container-highest, #e6e0e9));--_toggle-focus-icon-color: var(--md-filled-icon-button-toggle-focus-icon-color, var(--md-sys-color-primary, #6750a4));--_toggle-hover-icon-color: var(--md-filled-icon-button-toggle-hover-icon-color, var(--md-sys-color-primary, #6750a4));--_toggle-hover-state-layer-color: var(--md-filled-icon-button-toggle-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--_toggle-icon-color: var(--md-filled-icon-button-toggle-icon-color, var(--md-sys-color-primary, #6750a4));--_toggle-pressed-icon-color: var(--md-filled-icon-button-toggle-pressed-icon-color, var(--md-sys-color-primary, #6750a4));--_toggle-pressed-state-layer-color: var(--md-filled-icon-button-toggle-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--_container-shape-start-start: var(--md-filled-icon-button-container-shape-start-start, var(--md-filled-icon-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-start-end: var(--md-filled-icon-button-container-shape-start-end, var(--md-filled-icon-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-end: var(--md-filled-icon-button-container-shape-end-end, var(--md-filled-icon-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-start: var(--md-filled-icon-button-container-shape-end-start, var(--md-filled-icon-button-container-shape, var(--md-sys-shape-corner-full, 9999px)))}.icon-button{color:var(--_icon-color);--md-ripple-hover-color: var(--_hover-state-layer-color);--md-ripple-hover-opacity: var(--_hover-state-layer-opacity);--md-ripple-pressed-color: var(--_pressed-state-layer-color);--md-ripple-pressed-opacity: var(--_pressed-state-layer-opacity)}.icon-button:hover{color:var(--_hover-icon-color)}.icon-button:focus{color:var(--_focus-icon-color)}.icon-button:active{color:var(--_pressed-icon-color)}.icon-button:disabled{color:var(--_disabled-icon-color)}.icon-button::before{background-color:var(--_container-color);border-radius:inherit;content:"";inset:0;position:absolute;z-index:-1}.icon-button:disabled::before{background-color:var(--_disabled-container-color);opacity:var(--_disabled-container-opacity)}.icon-button:disabled .icon{opacity:var(--_disabled-icon-opacity)}.toggle-filled{--md-ripple-hover-color: var(--_toggle-hover-state-layer-color);--md-ripple-pressed-color: var(--_toggle-pressed-state-layer-color)}.toggle-filled:not(:disabled){color:var(--_toggle-icon-color)}.toggle-filled:not(:disabled):hover{color:var(--_toggle-hover-icon-color)}.toggle-filled:not(:disabled):focus{color:var(--_toggle-focus-icon-color)}.toggle-filled:not(:disabled):active{color:var(--_toggle-pressed-icon-color)}.toggle-filled:not(:disabled)::before{background-color:var(--_unselected-container-color)}.selected{--md-ripple-hover-color: var(--_toggle-selected-hover-state-layer-color);--md-ripple-pressed-color: var(--_toggle-selected-pressed-state-layer-color)}.selected:not(:disabled){color:var(--_toggle-selected-icon-color)}.selected:not(:disabled):hover{color:var(--_toggle-selected-hover-icon-color)}.selected:not(:disabled):focus{color:var(--_toggle-selected-focus-icon-color)}.selected:not(:disabled):active{color:var(--_toggle-selected-pressed-icon-color)}.selected:not(:disabled)::before{background-color:var(--_selected-container-color)} +`; + +/** + * @license + * Copyright 2020 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */const e=Symbol.for(""),o$1=t=>{if(t?.r===e)return t?._$litStatic$},s=(t,...r)=>({_$litStatic$:r.reduce(((r,e,o)=>r+(t=>{if(void 0!==t._$litStatic$)return t._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${t}. Use 'unsafeStatic' to pass non-literal values, but\n take care to ensure page security.`)})(e)+t[o+1]),t[0]),r:e}),a=new Map,l$1=t=>(r,...e)=>{const i=e.length;let s,l;const n=[],u=[];let c,$=0,f=!1;for(;$ + ${this.renderFocusRing()} + ${this.renderRipple()} + ${!this.selected ? this.renderIcon() : T} + ${this.selected ? this.renderSelectedIcon() : T} + ${this.renderTouchTarget()} + ${this.href && this.renderLink()} + `; + } + renderLink() { + // Needed for closure conformance + const { ariaLabel } = this; + return x ` + + `; + } + getRenderClasses() { + return { + 'flip-icon': this.flipIcon, + 'selected': this.toggle && this.selected, + }; + } + renderIcon() { + return x ``; + } + renderSelectedIcon() { + // Use default slot as fallback to not require specifying multiple icons + return x ``; + } + renderTouchTarget() { + return x ``; + } + renderFocusRing() { + // TODO(b/310046938): use the same id for both elements + return x ``; + } + renderRipple() { + // TODO(b/310046938): use the same id for both elements + return x ``; + } + connectedCallback() { + this.flipIcon = isRtl(this, this.flipIconInRtl); + super.connectedCallback(); + } + async handleClick(event) { + // Allow the event to propagate + await 0; + if (!this.toggle || this.disabled || event.defaultPrevented) { + return; + } + this.selected = !this.selected; + this.dispatchEvent(new InputEvent('input', { bubbles: true, composed: true })); + // Bubbles but does not compose to mimic native browser & ` validation. + */ +class RadioValidator extends Validator { + computeValidity(states) { + if (!this.radioElement) { + // Lazily create the radio element + this.radioElement = document.createElement('input'); + this.radioElement.type = 'radio'; + // A name is required for validation to run + this.radioElement.name = 'group'; + } + let isRequired = false; + let isChecked = false; + for (const { checked, required } of states) { + if (required) { + isRequired = true; + } + if (checked) { + isChecked = true; + } + } + // Firefox v119 doesn't compute grouped radio validation correctly while + // they are detached from the DOM, which is why we don't render multiple + // virtual s. Instead, we can check the required/checked states and + // grab the i18n'd validation message if the value is missing. + this.radioElement.checked = isChecked; + this.radioElement.required = isRequired; + return { + validity: { + valueMissing: isRequired && !isChecked, + }, + validationMessage: this.radioElement.validationMessage, + }; + } + equals(prevGroup, nextGroup) { + if (prevGroup.length !== nextGroup.length) { + return false; + } + for (let i = 0; i < prevGroup.length; i++) { + const prev = prevGroup[i]; + const next = nextGroup[i]; + if (prev.checked !== next.checked || prev.required !== next.required) { + return false; + } + } + return true; + } + copy(states) { + // Cast as unknown since typescript does not have enough information to + // infer that the array always has at least one element. + return states.map(({ checked, required }) => ({ + checked, + required, + })); + } +} + +/** + * @license + * Copyright 2022 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +/** + * A `ReactiveController` that provides root node-scoped single selection for + * elements, similar to native `` selection. + * + * To use, elements should add the controller and call + * `selectionController.handleCheckedChange()` in a getter/setter. This must + * be synchronous to match native behavior. + * + * @example + * const CHECKED = Symbol('checked'); + * + * class MyToggle extends LitElement { + * get checked() { return this[CHECKED]; } + * set checked(checked: boolean) { + * const oldValue = this.checked; + * if (oldValue === checked) { + * return; + * } + * + * this[CHECKED] = checked; + * this.selectionController.handleCheckedChange(); + * this.requestUpdate('checked', oldValue); + * } + * + * [CHECKED] = false; + * + * private selectionController = new SingleSelectionController(this); + * + * constructor() { + * super(); + * this.addController(this.selectionController); + * } + * } + */ +class SingleSelectionController { + /** + * All single selection elements in the host element's root with the same + * `name` attribute, including the host element. + */ + get controls() { + const name = this.host.getAttribute('name'); + if (!name || !this.root || !this.host.isConnected) { + return [this.host]; + } + // Cast as unknown since there is not enough information for typescript to + // know that there is always at least one element (the host). + return Array.from(this.root.querySelectorAll(`[name="${name}"]`)); + } + constructor(host) { + this.host = host; + this.focused = false; + this.root = null; + this.handleFocusIn = () => { + this.focused = true; + this.updateTabIndices(); + }; + this.handleFocusOut = () => { + this.focused = false; + this.updateTabIndices(); + }; + /** + * Handles arrow key events from the host. Using the arrow keys will + * select and check the next or previous sibling with the host's + * `name` attribute. + */ + this.handleKeyDown = (event) => { + const isDown = event.key === 'ArrowDown'; + const isUp = event.key === 'ArrowUp'; + const isLeft = event.key === 'ArrowLeft'; + const isRight = event.key === 'ArrowRight'; + // Ignore non-arrow keys + if (!isLeft && !isRight && !isDown && !isUp) { + return; + } + // Don't try to select another sibling if there aren't any. + const siblings = this.controls; + if (!siblings.length) { + return; + } + // Prevent default interactions on the element for arrow keys, + // since this controller will introduce new behavior. + event.preventDefault(); + // Check if moving forwards or backwards + const isRtl = getComputedStyle(this.host).direction === 'rtl'; + const forwards = isRtl ? isLeft || isDown : isRight || isDown; + const hostIndex = siblings.indexOf(this.host); + let nextIndex = forwards ? hostIndex + 1 : hostIndex - 1; + // Search for the next sibling that is not disabled to select. + // If we return to the host index, there is nothing to select. + while (nextIndex !== hostIndex) { + if (nextIndex >= siblings.length) { + // Return to start if moving past the last item. + nextIndex = 0; + } + else if (nextIndex < 0) { + // Go to end if moving before the first item. + nextIndex = siblings.length - 1; + } + // Check if the next sibling is disabled. If so, + // move the index and continue searching. + const nextSibling = siblings[nextIndex]; + if (nextSibling.hasAttribute('disabled')) { + if (forwards) { + nextIndex++; + } + else { + nextIndex--; + } + continue; + } + // Uncheck and remove focusability from other siblings. + for (const sibling of siblings) { + if (sibling !== nextSibling) { + sibling.checked = false; + sibling.tabIndex = -1; + sibling.blur(); + } + } + // The next sibling should be checked, focused and dispatch a change event + nextSibling.checked = true; + nextSibling.tabIndex = 0; + nextSibling.focus(); + // Fire a change event since the change is triggered by a user action. + // This matches native behavior. + nextSibling.dispatchEvent(new Event('change', { bubbles: true })); + break; + } + }; + } + hostConnected() { + this.root = this.host.getRootNode(); + this.host.addEventListener('keydown', this.handleKeyDown); + this.host.addEventListener('focusin', this.handleFocusIn); + this.host.addEventListener('focusout', this.handleFocusOut); + if (this.host.checked) { + // Uncheck other siblings when attached if already checked. This mimics + // native behavior. + this.uncheckSiblings(); + } + // Update for the newly added host. + this.updateTabIndices(); + } + hostDisconnected() { + this.host.removeEventListener('keydown', this.handleKeyDown); + this.host.removeEventListener('focusin', this.handleFocusIn); + this.host.removeEventListener('focusout', this.handleFocusOut); + // Update for siblings that are still connected. + this.updateTabIndices(); + this.root = null; + } + /** + * Should be called whenever the host's `checked` property changes + * synchronously. + */ + handleCheckedChange() { + if (!this.host.checked) { + return; + } + this.uncheckSiblings(); + this.updateTabIndices(); + } + uncheckSiblings() { + for (const sibling of this.controls) { + if (sibling !== this.host) { + sibling.checked = false; + } + } + } + /** + * Updates the `tabindex` of the host and its siblings. + */ + updateTabIndices() { + // There are three tabindex states for a group of elements: + // 1. If any are checked, that element is focusable. + const siblings = this.controls; + const checkedSibling = siblings.find((sibling) => sibling.checked); + // 2. If an element is focused, the others are no longer focusable. + if (checkedSibling || this.focused) { + const focusable = checkedSibling || this.host; + focusable.tabIndex = 0; + for (const sibling of siblings) { + if (sibling !== focusable) { + sibling.tabIndex = -1; + } + } + return; + } + // 3. If none are checked or focused, all are focusable. + for (const sibling of siblings) { + sibling.tabIndex = 0; + } + } +} + +/** + * @license + * Copyright 2018 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +var _a$2; +const CHECKED = Symbol('checked'); +let maskId = 0; +// Separate variable needed for closure. +const radioBaseClass = mixinConstraintValidation(mixinFormAssociated(mixinElementInternals(mixinFocusable(s$1)))); +/** + * A radio component. + * + * @fires input {InputEvent} Dispatched when the value changes from user + * interaction. --bubbles + * @fires change {Event} Dispatched when the value changes from user + * interaction. --bubbles --composed + */ +class Radio extends radioBaseClass { + /** + * Whether or not the radio is selected. + */ + get checked() { + return this[CHECKED]; + } + set checked(checked) { + const wasChecked = this.checked; + if (wasChecked === checked) { + return; + } + this[CHECKED] = checked; + this.requestUpdate('checked', wasChecked); + this.selectionController.handleCheckedChange(); + } + constructor() { + super(); + // Unique maskId is required because of a Safari bug that fail to persist + // reference to the mask. This should be removed once the bug is fixed. + this.maskId = `cutout${++maskId}`; + this[_a$2] = false; + /** + * Whether or not the radio is required. If any radio is required in a group, + * all radios are implicitly required. + */ + this.required = false; + /** + * The element value to use in form submission when checked. + */ + this.value = 'on'; + this.selectionController = new SingleSelectionController(this); + this.addController(this.selectionController); + { + this[internals].role = 'radio'; + this.addEventListener('click', this.handleClick.bind(this)); + this.addEventListener('keydown', this.handleKeydown.bind(this)); + } + } + render() { + const classes = { 'checked': this.checked }; + return x ` + + `; + } + updated() { + this[internals].ariaChecked = String(this.checked); + } + async handleClick(event) { + if (this.disabled) { + return; + } + // allow event to propagate to user code after a microtask. + await 0; + if (event.defaultPrevented) { + return; + } + if (isActivationClick(event)) { + this.focus(); + } + // Per spec, clicking on a radio input always selects it. + this.checked = true; + this.dispatchEvent(new Event('change', { bubbles: true })); + this.dispatchEvent(new InputEvent('input', { bubbles: true, composed: true })); + } + async handleKeydown(event) { + // allow event to propagate to user code after a microtask. + await 0; + if (event.key !== ' ' || event.defaultPrevented) { + return; + } + this.click(); + } + [(_a$2 = CHECKED, getFormValue)]() { + return this.checked ? this.value : null; + } + [getFormState]() { + return String(this.checked); + } + formResetCallback() { + // The checked property does not reflect, so the original attribute set by + // the user is used to determine the default value. + this.checked = this.hasAttribute('checked'); + } + formStateRestoreCallback(state) { + this.checked = state === 'true'; + } + [createValidator]() { + return new RadioValidator(() => { + if (!this.selectionController) { + // Validation runs on superclass construction, so selection controller + // might not actually be ready until this class constructs. + return [this]; + } + return this.selectionController.controls; + }); + } + [getValidityAnchor]() { + return this.container; + } +} +__decorate([ + n$5({ type: Boolean }) +], Radio.prototype, "checked", null); +__decorate([ + n$5({ type: Boolean }) +], Radio.prototype, "required", void 0); +__decorate([ + n$5() +], Radio.prototype, "value", void 0); +__decorate([ + e$5('.container') +], Radio.prototype, "container", void 0); + +/** + * @license + * Copyright 2024 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +// Generated stylesheet for ./radio/internal/radio-styles.css. +const styles$d = i$4 `@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20px);outline:none;position:relative;vertical-align:top;width:var(--md-radio-icon-size, 20px);-webkit-tap-highlight-color:rgba(0,0,0,0);cursor:pointer;--md-ripple-hover-color: var(--md-radio-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-hover-opacity: var(--md-radio-hover-state-layer-opacity, 0.08);--md-ripple-pressed-color: var(--md-radio-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--md-ripple-pressed-opacity: var(--md-radio-pressed-state-layer-opacity, 0.12)}:host([disabled]){cursor:default}:host([touch-target=wrapper]){margin:max(0px,(48px - var(--md-radio-icon-size, 20px))/2)}.container{display:flex;height:100%;place-content:center;place-items:center;width:100%}md-focus-ring{height:44px;inset:unset;width:44px}.checked{--md-ripple-hover-color: var(--md-radio-selected-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--md-ripple-hover-opacity: var(--md-radio-selected-hover-state-layer-opacity, 0.08);--md-ripple-pressed-color: var(--md-radio-selected-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-pressed-opacity: var(--md-radio-selected-pressed-state-layer-opacity, 0.12)}input{appearance:none;height:48px;margin:0;position:absolute;width:48px;cursor:inherit}:host([touch-target=none]) input{width:100%;height:100%}md-ripple{border-radius:50%;height:var(--md-radio-state-layer-size, 40px);inset:unset;width:var(--md-radio-state-layer-size, 40px)}.icon{fill:var(--md-radio-icon-color, var(--md-sys-color-on-surface-variant, #49454f));inset:0;position:absolute}.outer.circle{transition:fill 50ms linear}.inner.circle{opacity:0;transform-origin:center;transition:opacity 50ms linear}.checked .icon{fill:var(--md-radio-selected-icon-color, var(--md-sys-color-primary, #6750a4))}.checked .inner.circle{animation:inner-circle-grow 300ms cubic-bezier(0.05, 0.7, 0.1, 1);opacity:1}@keyframes inner-circle-grow{from{transform:scale(0)}to{transform:scale(1)}}:host([disabled]) .circle{animation-duration:0s;transition-duration:0s}:host(:hover) .icon{fill:var(--md-radio-hover-icon-color, var(--md-sys-color-on-surface, #1d1b20))}:host(:focus-within) .icon{fill:var(--md-radio-focus-icon-color, var(--md-sys-color-on-surface, #1d1b20))}:host(:active) .icon{fill:var(--md-radio-pressed-icon-color, var(--md-sys-color-on-surface, #1d1b20))}:host([disabled]) .icon{fill:var(--md-radio-disabled-unselected-icon-color, var(--md-sys-color-on-surface, #1d1b20));opacity:var(--md-radio-disabled-unselected-icon-opacity, 0.38)}:host(:hover) .checked .icon{fill:var(--md-radio-selected-hover-icon-color, var(--md-sys-color-primary, #6750a4))}:host(:focus-within) .checked .icon{fill:var(--md-radio-selected-focus-icon-color, var(--md-sys-color-primary, #6750a4))}:host(:active) .checked .icon{fill:var(--md-radio-selected-pressed-icon-color, var(--md-sys-color-primary, #6750a4))}:host([disabled]) .checked .icon{fill:var(--md-radio-disabled-selected-icon-color, var(--md-sys-color-on-surface, #1d1b20));opacity:var(--md-radio-disabled-selected-icon-opacity, 0.38)}}@layer hcm{@media(forced-colors: active){.icon{fill:CanvasText}:host([disabled]) .icon{fill:GrayText;opacity:1}}} +`; + +/** + * @license + * Copyright 2022 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +/** + * @summary Radio buttons allow users to select one option from a set. + * + * @description + * Radio buttons are the recommended way to allow users to make a single + * selection from a list of options. + * + * Only one radio button can be selected at a time. + * + * Use radio buttons to: + * - Select a single option from a set + * - Expose all available options + * + * @final + * @suppress {visibility} + */ +let MdRadio = class MdRadio extends Radio { +}; +MdRadio.styles = [styles$d]; +MdRadio = __decorate([ + t$3('md-radio') +], MdRadio); + +/** + * @license + * Copyright 2023 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +/** + * A symbol property used for a callback when validity has been reported. + */ +const onReportValidity = Symbol('onReportValidity'); +// Private symbol members, used to avoid name clashing. +const privateCleanupFormListeners = Symbol('privateCleanupFormListeners'); +const privateDoNotReportInvalid = Symbol('privateDoNotReportInvalid'); +const privateIsSelfReportingValidity = Symbol('privateIsSelfReportingValidity'); +const privateCallOnReportValidity = Symbol('privateCallOnReportValidity'); +/** + * Mixes in a callback for constraint validation when validity should be + * styled and reported to the user. + * + * This is commonly used in text-field-like controls that display error styles + * and error messages. + * + * @example + * ```ts + * const baseClass = mixinOnReportValidity( + * mixinConstraintValidation( + * mixinFormAssociated(mixinElementInternals(LitElement)), + * ), + * ); + * + * class MyField extends baseClass { + * \@property({type: Boolean}) error = false; + * \@property() errorMessage = ''; + * + * [onReportValidity](invalidEvent: Event | null) { + * this.error = !!invalidEvent; + * this.errorMessage = this.validationMessage; + * + * // Optionally prevent platform popup from displaying + * invalidEvent?.preventDefault(); + * } + * } + * ``` + * + * @param base The class to mix functionality into. + * @return The provided class with `OnReportValidity` mixed in. + */ +function mixinOnReportValidity(base) { + var _a, _b, _c; + class OnReportValidityElement extends base { + // Mixins must have a constructor with `...args: any[]` + // tslint:disable-next-line:no-any + constructor(...args) { + super(...args); + /** + * Used to clean up event listeners when a new form is associated. + */ + this[_a] = new AbortController(); + /** + * Used to determine if an invalid event should report validity. Invalid + * events from `checkValidity()` do not trigger reporting. + */ + this[_b] = false; + /** + * Used to determine if the control is reporting validity from itself, or + * if a `` is causing the validity report. Forms have different + * control focusing behavior. + */ + this[_c] = false; + this.addEventListener('invalid', (invalidEvent) => { + // Listen for invalid events dispatched by a `` when it tries to + // submit and the element is invalid. We ignore events dispatched when + // calling `checkValidity()` as well as untrusted events, since the + // `reportValidity()` and ``-dispatched events are always + // trusted. + if (this[privateDoNotReportInvalid] || !invalidEvent.isTrusted) { + return; + } + this.addEventListener('invalid', () => { + // A normal bubbling phase event listener. By adding it here, we + // ensure it's the last event listener that is called during the + // bubbling phase. + this[privateCallOnReportValidity](invalidEvent); + }, { once: true }); + }, { + // Listen during the capture phase, which will happen before the + // bubbling phase. That way, we can add a final event listener that + // will run after other event listeners, and we can check if it was + // default prevented. This works because invalid does not bubble. + capture: true, + }); + } + checkValidity() { + this[privateDoNotReportInvalid] = true; + const valid = super.checkValidity(); + this[privateDoNotReportInvalid] = false; + return valid; + } + reportValidity() { + this[privateIsSelfReportingValidity] = true; + const valid = super.reportValidity(); + // Constructor's invalid listener will handle reporting invalid events. + if (valid) { + this[privateCallOnReportValidity](null); + } + this[privateIsSelfReportingValidity] = false; + return valid; + } + [(_a = privateCleanupFormListeners, _b = privateDoNotReportInvalid, _c = privateIsSelfReportingValidity, privateCallOnReportValidity)](invalidEvent) { + // Since invalid events do not bubble to parent listeners, and because + // our invalid listeners are added lazily after other listeners, we can + // reliably read `defaultPrevented` synchronously without worrying + // about waiting for another listener that could cancel it. + const wasCanceled = invalidEvent?.defaultPrevented; + if (wasCanceled) { + return; + } + this[onReportValidity](invalidEvent); + // If an implementation calls invalidEvent.preventDefault() to stop the + // platform popup from displaying, focusing is also prevented, so we need + // to manually focus. + const implementationCanceledFocus = !wasCanceled && invalidEvent?.defaultPrevented; + if (!implementationCanceledFocus) { + return; + } + // The control should be focused when: + // - `control.reportValidity()` is called (self-reporting). + // - a form is reporting validity for its controls and this is the first + // invalid control. + if (this[privateIsSelfReportingValidity] || + isFirstInvalidControlInForm(this[internals].form, this)) { + this.focus(); + } + } + [onReportValidity](invalidEvent) { + throw new Error('Implement [onReportValidity]'); + } + formAssociatedCallback(form) { + // can't use super.formAssociatedCallback?.() due to closure + if (super.formAssociatedCallback) { + super.formAssociatedCallback(form); + } + // Clean up previous form listeners. + this[privateCleanupFormListeners].abort(); + if (!form) { + return; + } + this[privateCleanupFormListeners] = new AbortController(); + // Add a listener that fires when the form runs constraint validation and + // the control is valid, so that it may remove its error styles. + // + // This happens on `form.reportValidity()` and `form.requestSubmit()` + // (both when the submit fails and passes). + addFormReportValidListener(this, form, () => { + this[privateCallOnReportValidity](null); + }, this[privateCleanupFormListeners].signal); + } + } + return OnReportValidityElement; +} +/** + * Add a listener that fires when a form runs constraint validation on a control + * and it is valid. This is needed to clear previously invalid styles. + * + * @param control The control of the form to listen for valid events. + * @param form The control's form that can run constraint validation. + * @param onControlValid A listener that is called when the form runs constraint + * validation and the control is valid. + * @param cleanup A cleanup signal to remove the listener. + */ +function addFormReportValidListener(control, form, onControlValid, cleanup) { + const validateHooks = getFormValidateHooks(form); + // When a form validates its controls, check if an invalid event is dispatched + // on the control. If it is not, then inform the control to report its valid + // state. + let controlFiredInvalid = false; + let cleanupInvalidListener; + let isNextSubmitFromHook = false; + validateHooks.addEventListener('before', () => { + isNextSubmitFromHook = true; + cleanupInvalidListener = new AbortController(); + controlFiredInvalid = false; + control.addEventListener('invalid', () => { + controlFiredInvalid = true; + }, { + signal: cleanupInvalidListener.signal, + }); + }, { signal: cleanup }); + validateHooks.addEventListener('after', () => { + isNextSubmitFromHook = false; + cleanupInvalidListener?.abort(); + if (controlFiredInvalid) { + return; + } + onControlValid(); + }, { signal: cleanup }); + // The above hooks handle imperatively submitting the form, but not + // declaratively submitting the form. This happens when: + // 1. A non-custom element ` +

    Your Heading

    + + + + + */ + + /* header- normal + +
    + + +

    Your Heading

    +
    + */ + + /* activity-full -- +
    +
    + +
    +
    + + */ + + + + + /* 3dot- menu-- + + + + --main-- + + + */ + + + + /* dialog-regular ---- + +
    +
    +

    Modal Heading

    + Supporting text + +
    +
    + + --change id no. use more dialogs--- + + dialog toggle + + + + + ---Button-filled + + + + + */ + + + + + + /* bottom-nav-tabs --- + +
    +
    +
    + + + + + */ + + + + /* snackbar Usages ---- + + NORMAL ONE -- + + ShowSnack('Hi this is a Snack', 5000, 5); + + Action one --- + + showSnackbarAction({ + text: 'Snackbar Text', + actionText: 'Action', + bottomPosition:'5', + manualDismiss: false, + timeout: 5000 , + onActionClick: function(element) { + alert('Custom Action Clicked!'); + } + +}); + + + + */ + + + + /* input-fields --- + + OUTLINED -- + + + + + FILLED -- + + + + + + + */ + + + + /* radio ---- + + + + */ + + + /* full-activity-larger use ----- +
    +
    + +

    Small Header

    +
    +
    +

    Big Header

    +
    + + +
    +
    +
    + + */ \ No newline at end of file diff --git a/app/src/main/assets/components/md-buttons.css b/app/src/main/assets/components/md-buttons.css new file mode 100644 index 000000000..188829b03 --- /dev/null +++ b/app/src/main/assets/components/md-buttons.css @@ -0,0 +1,303 @@ +button-filled { + color: var(--On-Primary); + background-color: var(--Primary); + height: 45px; + align-items: center; + justify-content: center; + font-size: 18px; + width: max-content; + border-radius: 50px; + display: flex; + font-family: var(--google-normal); + min-width: 40px; + padding-left: 20px; + padding-right: 20px; + + } + + + + button-outlined { + color: var(--Primary); + background-color: transparent; + height: 45px; + align-items: center; + justify-content: center; + font-size: 18px; + border: 1px solid var(--Outline); + width: max-content; + border-radius: 50px; + display: flex; + font-family: var(--google-normal); + min-width: 40px; + padding-left: 20px; + padding-right: 20px; + + } + + button-tonal { + color: var(--On-Secondary-Container); + background-color: var(--Secondary-Container); + height: 45px; + align-items: center; + justify-content: center; + font-size: 18px; + width: max-content; + border-radius: 50px; + display: flex; + font-family: var(--google-normal); + min-width: 40px; + padding-left: 20px; + padding-right: 20px; + + } + + text-button { + color: var(--Primary); + background-color: transparent; + height: 45px; + align-items: center; + justify-content: center; + font-size: 18px; + width: max-content; + border-radius: 50px; + display: flex; + font-family: var(--google-normal); + min-width: 40px; + padding-left: 20px; + padding-right: 20px; + + } + + + /* disabled-form */ + + button-filled[disabled], + button-tonal[disabled] { + opacity: 0.12; + background-color: var(--On-Surface); + color: var(--Surface); + pointer-events: none; + + } + + + button-outlined[disabled] { + opacity: 0.32; + border-color: var(--On-Surface); + color: var(--On-Surface); + pointer-events: none; + + } + + + + + /* Fab */ + + fab { + width: 56px; + height: 56px; + padding: 10px; + display: flex; + align-items: center; + justify-content: center; + font-family: 'Material icons outlined'; + background-color: var(--Primary-Container); + color: var(--On-Primary-Container); + font-size: 30px; + border-radius: 18px; + } + + + fab-small { + width: 40px; + height: 40px; + padding: 10px; + display: flex; + align-items: center; + justify-content: center; + font-family: 'Material icons outlined'; + background-color: var(--Primary-Container); + color: var(--On-Primary-Container); + font-size: 24px; + border-radius: 16px; + } + + fab-large { + width: 76px; + height: 76px; + padding: 10px; + display: flex; + align-items: center; + justify-content: center; + font-family: 'Material icons outlined'; + background-color: var(--Primary-Container); + color: var(--On-Primary-Container); + font-size: 34px; + border-radius: 24px; + } + + /* icon-btn */ + + button-filled-i { + color: var(--On-Primary); + background-color: var(--Primary); + height: 45px; + align-items: center; + justify-content: center; + font-size: 18px; + width: max-content; + border-radius: 50px; + display: flex; + font-family: var(--google-normal); + min-width: 40px; + padding-left: 20px; + padding-right: 20px; + + } + + button-filled-i i, + button-outlined-i i, + button-tonal-i i, + text-button-i i { + font-family: 'Material icons outlined'; + margin-right: 8px; + font-style: normal !important; + font-size: 22px; + } + + button-outlined-i { + color: var(--Primary); + background-color: transparent; + height: 45px; + align-items: center; + justify-content: center; + font-size: 18px; + border: 1px solid var(--Outline); + width: max-content; + border-radius: 50px; + display: flex; + font-family: var(--google-normal); + min-width: 40px; + padding-left: 20px; + padding-right: 20px; + + } + + + button-tonal-i { + color: var(--On-Secondary-Container); + background-color: var(--Secondary-Container); + height: 45px; + align-items: center; + justify-content: center; + font-size: 18px; + width: max-content; + border-radius: 50px; + display: flex; + font-family: var(--google-normal); + min-width: 40px; + padding-left: 20px; + padding-right: 20px; + + } + + + text-button-i { + color: var(--Primary); + background-color: transparent; + height: 45px; + align-items: center; + justify-content: center; + font-size: 18px; + width: max-content; + border-radius: 50px; + display: flex; + font-family: var(--google-normal); + min-width: 40px; + padding-left: 20px; + padding-right: 20px; + + } + + + + + + /* buttons-usage */ + + + + /* filled-- + + Filled Button + + + --FILLED With ICON-- + + addAdd task + + + */ + + + /* Outlined --- + + Outlined Button + + --OUTLINED With ICON-- + addAdd task + + + */ + + + + + /* Tonal --- + + Tonal Button + + + --TONAL With ICON-- + addAdd task + + + + */ + + + /* Text Btn --- + + Text Button + + + + --TextBtn With ICON-- + addText Button + + + + + */ + + + + /* fab Btn --- + + edit + + --fab-small-- + + check + + --fab-large + + add + + + */ + + + \ No newline at end of file diff --git a/app/src/main/assets/components/modal-ver.css b/app/src/main/assets/components/modal-ver.css new file mode 100644 index 000000000..f7f599604 --- /dev/null +++ b/app/src/main/assets/components/modal-ver.css @@ -0,0 +1,270 @@ +/* settings-template */ + + + +.title{ + color: var(--Primary); + font-family: 'Google'; + margin: 0; + margin-top: 20px; + font-weight: 900; + margin-left: 10px; + padding-bottom: 5px; + +} + +.text_content_options{ + display: flex; + flex-direction: column; + margin-left: 40px; + +} + +.text_content_options p{ + margin: 0; + color: var(--On-Surface) ; + font-family: 'Google'; + font-size: 18px; +} + +.text_content_options span{ + margin: 0; + font-size: 14.5px; + color: var(--Outline) ; + margin-top: 3px !important; + max-width: 200px; + font-family: var(--google-normal); +} + +.settings_options{ + display: flex; + align-items: center; + justify-content: space-between; + margin-top: 0px; + padding: 10px; + position: relative; + margin-bottom: 10px; + padding-right: 15px; +} + +.settings_options.radio{ + display: flex; + align-items: center; + justify-content: space-between; + margin-top: 0px; + padding: 10px; + position: relative; + margin-bottom: 10px; + padding-right: 15px; + padding-bottom: 55px; + position: relative !important; +} + + +.icon-options{ + position: absolute; + left: 10px; + font-size: 23px; + font-style: normal; + color: var(--On-Surface) ; +} + +/* about-app-template */ + +.about-div{ + padding: 10px; + align-items: center; + color: var(--On-Surface); +} + +.about-div li{ + margin-bottom: 10px; + font-family: var(--google-normal); + font-size: 18px; + line-height: 1.5; +} + +.version-area{ +background-color: rgba(255, 0, 0, 0); +padding-bottom: 1px; +padding-top: 1px; +font-weight: 700; +} + +.made-by{ +text-align: right; +margin-right: 20px; +font-family: var(--google-normal); +font-size: 20px; +color: var(--Primary); + +} + + + + +.title-about{ +color: var(--Primary); +font-family: 'Google'; +margin: 0; +margin-top: 20px; +font-weight: 500; +font-size: 20px; +padding-left: 10px; +padding-bottom: 5px; +display: flex; +align-items: center; +border-bottom: 1px solid var(--Outline); +} + +.title-about span{ +font-weight: normal; +margin-right: 10px; +} + + +/* license */ + +.licenses-div{ +border: 1.5px solid var(--Outline-Variant); +margin: 10px; +padding: 10px; +border-radius: 10px; +} + +.licenses-div .name-main{ +margin: 0; +margin-top: 10px !important; +margin-bottom: 10px; +font-weight: 300; +font-family: var(--outfit); +color: var(--On-Surface); + + +} + +.licenses-div .name-label{ +font-size: 16px; +font-family: var(--outfit); +color: var(--On-Surface); + +} + +.licenses-div .main-license{ +line-height: 1.5; +font-size: 14px; +font-family: var(--outfit); +color: var(--On-Surface-Variant); + +} + +.licenses-div .license-label{ +align-items: center; +justify-content: flex-end; +color: var(--Primary); +opacity: 0.7; +display: flex; +font-weight: 600; +font-family: var(--outfit); + +width: 100%; +} + + + + + + + + + +/* settings-template_usage ---- + + switch-option + +
    + dark_mode +
    +

    Dark theme

    + Enables the dark theme for the app +
    + +
    + + + + ---LABEL--- + +

    General

    + + + + ---OPENS-Other-Screen ---- + + +
    + verified +
    +

    Third party licenses

    + Used in the app +
    + chevron_right +
    + + + + ---SHOW-version +
    + info +
    +

    + Lollipop (6-14) +
    +
    + + */ + + + + /* about-temp + +
    +
  • The app is mainly coded in Java, JavaScript, C++.
  • +
  • The UI of this app is created using GDK, Material You, and Material 3 components, which are open source and + developed by @Google.
  • +
    + + + + ---LABle--- + + +

    infoLanguage used

    + + + */ + + + + /* license + + +
    +

    Open Sans

    + Steve Matteson + +

    Open Sans is a humanist sans serif typeface designed by Steve Matteson, Type Director of + Ascender Corp. This version contains the complete 897 character set, which includes the standard ISO Latin 1, + Latin CE, Greek and Cyrillic character sets. Open Sans was designed with an upright stress, open forms and a + neutral, yet friendly appearance. It was optimized for print, web, and mobile interfaces, and has excellent + legibility characteristics in its letterforms.

    + + Open Font License +
    + + */ \ No newline at end of file diff --git a/app/src/main/assets/components/segment-btns.css b/app/src/main/assets/components/segment-btns.css new file mode 100644 index 000000000..038fdce38 --- /dev/null +++ b/app/src/main/assets/components/segment-btns.css @@ -0,0 +1,413 @@ +.radio-div-set{ + display: flex; + align-items: center; + } + + .radio-div-set div input{ + display: none; + } + + .radio-div-set div label{ + color: var(--On-Surface); + background-color: rgba(0, 0, 255, 0); + border: 1.4px solid var(--Outline); + + + display: flex; + height: 38px; + font-family: var(--google-mid); + font-size: 16px; + position: relative; + justify-content: center; + + align-items: center; + width: max-content; + padding-left: 20px; + padding-right: 20px; + transition: background-color 0.1s, padding 0.2s; + } + + .radio-div-set div:first-child > label{ + border-bottom-left-radius: 50px; + border-top-left-radius: 50px; + width: max-content; + display: flex; + align-items: center; + justify-content: center; + border-right: 1px solid var(--Outline) !important; + + } + + .radio-div-set div:last-child label{ + border-bottom-right-radius: 50px; + border-top-right-radius: 50px; + width: max-content; + display: flex; + align-items: center; + justify-content: center; + border-left: 1px solid var(--Outline); + + } + + .radio-div-set div:last-child input:checked + label { + background-color: var(--Secondary-Container); + color: var(--On-Secondary-Container); + padding-left: 40px; + padding-right: 20px !important; + } + + .radio-div-set div:first-child input:checked + label { + background-color: var(--Secondary-Container); + color: var(--On-Secondary-Container); + padding-left: 40px; + padding-right: 10px !important; + + + } + + + .radio-div-set div input:checked + label { + background-color: var(--Secondary-Container); + color: var(--On-Secondary-Container); + padding-left: 35px; + padding-right: 10px !important; + + } + + + .radio-div-set div:first-child input:checked + label::before { + content: 'done'; + position: absolute; + font-family: 'Material symbols' !important; + left: 13px; + color: var(--On-Surface); + font-size: 24px; + + } + + .radio-div-set div:last-child input:checked + label::before { + content: 'done'; + position: absolute; + font-family: 'Material symbols' !important; + left: 10px; + color: var(--On-Surface); + font-size: 24px; + + } + + .radio-div-set div input:checked + label::before { + content: 'done'; + position: absolute; + font-family: 'Material symbols' !important; + left: 7px; + color: var(--On-Surface); + font-size: 24px; + + } + + + + /* icon-one */ + + + .radio-div-set-icon{ + display: flex; + align-items: center; + } + + .radio-div-set-icon div input{ + display: none; + } + + .radio-div-set-icon div label{ + color: var(--On-Surface); + background-color: rgba(0, 0, 255, 0); + border: 1.4px solid var(--Outline); + + cursor: pointer; + + display: flex; + height: 38px; + font-family: var(--google-mid); + font-size: 15px; + position: relative; + justify-content: space-around; + gap: 5px; + align-items: center; + width: max-content; + padding-left: 10px; + padding-right: 10px; + transition: background-color 0.1s, padding 0.2s; + } + + .radio-div-set-icon div:first-child > label{ + border-bottom-left-radius: 50px; + /* padding-left: 45px; */ + + border-top-left-radius: 50px; + width: max-content; + display: flex; + align-items: center; + justify-content: center; + border-right: 1px solid var(--Outline) !important; + + } + + .radio-div-set-icon div:last-child label{ + border-bottom-right-radius: 50px; + border-top-right-radius: 50px; + width: max-content; + display: flex; + /* padding-left: 40px; */ + + align-items: center; + justify-content: center; + border-left: 1px solid var(--Outline); + + } + + .radio-div-set-icon div:last-child input:checked + label { + background-color: var(--Secondary-Container); + color: var(--On-Secondary-Container); + + } + + .radio-div-set-icon div:first-child input:checked + label { + background-color: var(--Secondary-Container); + color: var(--On-Secondary-Container); + + + + } + + + .radio-div-set-icon div input:checked + label { + background-color: var(--Secondary-Container); + color: var(--On-Secondary-Container); + + + } + + .radio-div-set-icon div label::before { + content: attr(data-icon); + /* position: absolute; */ + font-family: 'Material symbols' !important; + left: 15px; + color: var(--On-Surface); + font-size: 20px; + + } + + + .radio-div-set-icon div:last-child label::before { + content: attr(data-icon); + /* position: absolute; */ + font-family: 'Material symbols' !important; + color: var(--On-Surface); + font-size: 20px; + + } + + + .radio-div-set-icon div:first-child label::before { + content: attr(data-icon); + /* position: absolute; */ + font-family: 'Material symbols' !important; + color: var(--On-Surface); + font-size: 20px; + + } + + + .radio-div-set-icon div:first-child input:checked + label::before { + content: 'done'; + /* position: absolute; */ + font-family: 'Material symbols' !important; + color: var(--On-Secondary-Container); + font-size: 22px; + width: 20px; + height: 24px; + + } + + .radio-div-set-icon div:last-child input:checked + label::before { + content: 'done'; + /* position: absolute; */ + font-family: 'Material symbols' !important; + color: var(--On-Secondary-Container); + font-size: 22px; + width: 20px; + height: 24px; + } + + .radio-div-set-icon div input:checked + label::before { + content: 'done'; + /* position: absolute; */ + font-family: 'Material symbols' !important; + color: var(--On-Secondary-Container); + font-size: 22px; + width: 20px; + height: 24px; + } + + + /* regular */ + + + .radio-div-set-regular{ + display: flex; + align-items: center; + } + + .radio-div-set-regular div input{ + display: none; + } + + .radio-div-set-regular div label{ + color: var(--On-Surface); + background-color: rgba(0, 0, 255, 0); + border: 1px solid var(--Outline); + + border-left: none; + /* border-right: none; */ + cursor: pointer; + display: flex; + height: 38px; + font-family: var(--google-mid); + font-size: 15px; + position: relative; + justify-content: center; + + align-items: center; + width: max-content; + padding-left: 15px; + padding-right: 15px; + transition: background-color 0.1s, padding 0.2s; + } + + .radio-div-set-regular div:first-child > label{ + border-bottom-left-radius: 50px; + + border-top-left-radius: 50px; + width: max-content; + display: flex; + align-items: center; + justify-content: center; + border-right: 1px solid var(--Outline) !important; + border-left: 1px solid var(--Outline) !important; + + + } + + .radio-div-set-regular div:last-child label{ + border-bottom-right-radius: 50px; + border-top-right-radius: 50px; + width: max-content; + display: flex; + align-items: center; + justify-content: center; + /* border-left: 1px solid var(--Outline); */ + border-right: 1px solid var(--Outline) !important; + + } + + .radio-div-set-regular div:last-child input:checked + label { + background-color: var(--Secondary-Container); + color: var(--On-Secondary-Container); + pointer-events: none; + + } + + .radio-div-set-regular div:first-child input:checked + label { + background-color: var(--Secondary-Container); + color: var(--On-Secondary-Container); + + pointer-events: none; + + + } + + + .radio-div-set-regular div input:checked + label { + background-color: var(--Secondary-Container); + color: var(--On-Secondary-Container); + pointer-events: none; + + } + + + + + + /* usage */ + + + + + /* Selected icon only + + + + + + */ + + + + + + /* Icon Ones + + + + */ + + + + /* Regular no icons + +
    + +
    + + +
    + + +
    + + +
    + +
    + + */ \ No newline at end of file diff --git a/app/src/main/assets/fonts/MaterialSymbols.ttf b/app/src/main/assets/fonts/MaterialSymbols.ttf new file mode 100644 index 000000000..0a03e2101 Binary files /dev/null and b/app/src/main/assets/fonts/MaterialSymbols.ttf differ diff --git a/app/src/main/assets/fonts/Outfit-Medium.ttf b/app/src/main/assets/fonts/Outfit-Medium.ttf new file mode 100644 index 000000000..7ae796b94 Binary files /dev/null and b/app/src/main/assets/fonts/Outfit-Medium.ttf differ diff --git a/app/src/main/assets/fonts/Outfit-Regular.ttf b/app/src/main/assets/fonts/Outfit-Regular.ttf new file mode 100644 index 000000000..826899cfe Binary files /dev/null and b/app/src/main/assets/fonts/Outfit-Regular.ttf differ diff --git a/app/src/main/assets/fonts/Poppins-Regular.ttf b/app/src/main/assets/fonts/Poppins-Regular.ttf new file mode 100644 index 000000000..9f0c71b70 Binary files /dev/null and b/app/src/main/assets/fonts/Poppins-Regular.ttf differ diff --git a/app/src/main/assets/fonts/ProductSans-Medium.ttf b/app/src/main/assets/fonts/ProductSans-Medium.ttf new file mode 100644 index 000000000..fd818d6f5 Binary files /dev/null and b/app/src/main/assets/fonts/ProductSans-Medium.ttf differ diff --git a/app/src/main/assets/fonts/ProductSans-Regular.ttf b/app/src/main/assets/fonts/ProductSans-Regular.ttf new file mode 100644 index 000000000..e2c69c3fb Binary files /dev/null and b/app/src/main/assets/fonts/ProductSans-Regular.ttf differ diff --git a/app/src/main/assets/froggie/01d.png b/app/src/main/assets/froggie/01d.png new file mode 100644 index 000000000..8ca63f744 Binary files /dev/null and b/app/src/main/assets/froggie/01d.png differ diff --git a/app/src/main/assets/froggie/01n.png b/app/src/main/assets/froggie/01n.png new file mode 100644 index 000000000..d5648e1f4 Binary files /dev/null and b/app/src/main/assets/froggie/01n.png differ diff --git a/app/src/main/assets/froggie/02d.png b/app/src/main/assets/froggie/02d.png new file mode 100644 index 000000000..d56f9a463 Binary files /dev/null and b/app/src/main/assets/froggie/02d.png differ diff --git a/app/src/main/assets/froggie/02n.png b/app/src/main/assets/froggie/02n.png new file mode 100644 index 000000000..aa64a0ac9 Binary files /dev/null and b/app/src/main/assets/froggie/02n.png differ diff --git a/app/src/main/assets/froggie/03d.png b/app/src/main/assets/froggie/03d.png new file mode 100644 index 000000000..2e0316c2a Binary files /dev/null and b/app/src/main/assets/froggie/03d.png differ diff --git a/app/src/main/assets/froggie/03n.png b/app/src/main/assets/froggie/03n.png new file mode 100644 index 000000000..a47bbfa57 Binary files /dev/null and b/app/src/main/assets/froggie/03n.png differ diff --git a/app/src/main/assets/froggie/04d.png b/app/src/main/assets/froggie/04d.png new file mode 100644 index 000000000..c1d07e08e Binary files /dev/null and b/app/src/main/assets/froggie/04d.png differ diff --git a/app/src/main/assets/froggie/04n.png b/app/src/main/assets/froggie/04n.png new file mode 100644 index 000000000..fda31adad Binary files /dev/null and b/app/src/main/assets/froggie/04n.png differ diff --git a/app/src/main/assets/froggie/09d.png b/app/src/main/assets/froggie/09d.png new file mode 100644 index 000000000..312d82643 Binary files /dev/null and b/app/src/main/assets/froggie/09d.png differ diff --git a/app/src/main/assets/froggie/09n.png b/app/src/main/assets/froggie/09n.png new file mode 100644 index 000000000..a6aeb45fa Binary files /dev/null and b/app/src/main/assets/froggie/09n.png differ diff --git a/app/src/main/assets/froggie/10d.png b/app/src/main/assets/froggie/10d.png new file mode 100644 index 000000000..e3b89facd Binary files /dev/null and b/app/src/main/assets/froggie/10d.png differ diff --git a/app/src/main/assets/froggie/10n.png b/app/src/main/assets/froggie/10n.png new file mode 100644 index 000000000..db38b8050 Binary files /dev/null and b/app/src/main/assets/froggie/10n.png differ diff --git a/app/src/main/assets/froggie/11d.png b/app/src/main/assets/froggie/11d.png new file mode 100644 index 000000000..715f51d58 Binary files /dev/null and b/app/src/main/assets/froggie/11d.png differ diff --git a/app/src/main/assets/froggie/11n.png b/app/src/main/assets/froggie/11n.png new file mode 100644 index 000000000..0b3bfadfd Binary files /dev/null and b/app/src/main/assets/froggie/11n.png differ diff --git a/app/src/main/assets/froggie/13d.png b/app/src/main/assets/froggie/13d.png new file mode 100644 index 000000000..11ae80e0b Binary files /dev/null and b/app/src/main/assets/froggie/13d.png differ diff --git a/app/src/main/assets/froggie/13n.png b/app/src/main/assets/froggie/13n.png new file mode 100644 index 000000000..0562eded5 Binary files /dev/null and b/app/src/main/assets/froggie/13n.png differ diff --git a/app/src/main/assets/froggie/50d.png b/app/src/main/assets/froggie/50d.png new file mode 100644 index 000000000..d7cf5711b Binary files /dev/null and b/app/src/main/assets/froggie/50d.png differ diff --git a/app/src/main/assets/froggie/50n.png b/app/src/main/assets/froggie/50n.png new file mode 100644 index 000000000..333b6e732 Binary files /dev/null and b/app/src/main/assets/froggie/50n.png differ diff --git a/app/src/main/assets/froggie/flurries.png b/app/src/main/assets/froggie/flurries.png new file mode 100644 index 000000000..fc412fcf0 Binary files /dev/null and b/app/src/main/assets/froggie/flurries.png differ diff --git a/app/src/main/assets/froggie/hail.png b/app/src/main/assets/froggie/hail.png new file mode 100644 index 000000000..9ebfa5f7d Binary files /dev/null and b/app/src/main/assets/froggie/hail.png differ diff --git a/app/src/main/assets/froggie/heavy_rain.png b/app/src/main/assets/froggie/heavy_rain.png new file mode 100644 index 000000000..fd2530d8e Binary files /dev/null and b/app/src/main/assets/froggie/heavy_rain.png differ diff --git a/app/src/main/assets/froggie/snowgrains.png b/app/src/main/assets/froggie/snowgrains.png new file mode 100644 index 000000000..70e07e4b3 Binary files /dev/null and b/app/src/main/assets/froggie/snowgrains.png differ diff --git a/app/src/main/assets/froggie/strong_thunder.png b/app/src/main/assets/froggie/strong_thunder.png new file mode 100644 index 000000000..d14f01d52 Binary files /dev/null and b/app/src/main/assets/froggie/strong_thunder.png differ diff --git a/app/src/main/assets/icons/error-cat.json b/app/src/main/assets/icons/error-cat.json new file mode 100644 index 000000000..18c386417 --- /dev/null +++ b/app/src/main/assets/icons/error-cat.json @@ -0,0 +1 @@ +{"v":"5.7.3","fr":25,"ip":0,"op":50,"w":610,"h":495,"nm":"error","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"onda contornos","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[290.23,391.787,0],"ix":2},"a":{"a":0,"k":[215.177,7.452,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"t":0,"s":[100,100,100]},{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"t":25,"s":[98,98,100]},{"t":50,"s":[100,100,100]}],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[18.019,-3.444],[11.925,3.71],[15.246,-5.628],[13.16,-1.326],[6.095,1.06],[18.549,-4.579],[20.669,-11.401],[0,0]],"o":[[-18.019,3.445],[-11.924,-3.71],[-15.247,5.627],[-13.16,1.325],[-6.094,-1.06],[-18.549,4.579],[0,0],[0,0]],"v":[[172.782,-2.665],[120.58,-2.135],[64.933,1.575],[-12.001,-5.314],[-55.9,2.105],[-108.102,-0.619],[-214.927,4.199],[214.927,4.171]],"c":true},"ix":2},"nm":"Caminho 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.760999971278,0.795999983245,0.917999985639,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Preenchimento 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[215.177,7.452],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transformar"}],"nm":"Grupo 1","np":4,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":1750,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"mascara contornos","td":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[306.5,443.092,0],"ix":2},"a":{"a":0,"k":[236.75,48.666,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[236.5,48.416],[-236.5,48.416],[-236.5,-48.416],[236.5,-48.416]],"c":true},"ix":2},"nm":"Caminho 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Preenchimento 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[236.75,48.666],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transformar"}],"nm":"Grupo 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":1750,"st":0,"bm":0},{"ddd":0,"ind":3,"ty":4,"nm":"barco contornos","tt":2,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":0,"s":[0]},{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":25,"s":[1]},{"t":50,"s":[0]}],"ix":10},"p":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"t":0,"s":[298.895,340.028,0],"to":[0,0.995,0],"ti":[0,0,0]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"t":25,"s":[298.895,346,0],"to":[0,0,0],"ti":[0,0.995,0]},{"t":50,"s":[298.895,340.028,0]}],"ix":2},"a":{"a":0,"k":[238.525,103.168,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[34.934,18.014],[0.174,0.101],[0,0],[-20.846,-10.75],[-11.059,-3.23],[0,0]],"o":[[-8.314,-1.72],[-20.869,-10.761],[0,0],[0.173,0.102],[27.561,14.213],[0,0],[0,0]],"v":[[50.064,23.648],[-12.12,-2.247],[-50.064,-23.648],[-48.52,-23.283],[-11.623,-3.201],[48.425,22.504],[48.994,22.88]],"c":true},"ix":2},"nm":"Caminho 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.169000004787,0.161000001197,0.368999974868,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Preenchimento 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[50.595,73.639],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transformar"}],"nm":"Grupo 1","np":4,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0.734,-5.533],[2.44,-4.275],[0,0],[-0.479,3.608],[0.983,3.414],[0,0]],"o":[[-0.688,5.183],[0,0],[1.73,-2.956],[0.497,-3.745],[0,0],[1.453,5.042]],"v":[[7.355,0.862],[2.555,15.132],[-8.089,9.167],[-4.699,-0.739],[-5.492,-11.566],[6.178,-15.132]],"c":true},"ix":2},"nm":"Caminho 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.910000011968,0.426999978458,0.187999994615,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Preenchimento 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[115.743,122.502],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transformar"}],"nm":"Grupo 2","np":4,"cix":2,"bm":0,"ix":2,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[-1.194,-3.664],[0,0],[-0.797,6.003],[-2.282,4.144],[0,0],[0.434,-3.271]],"o":[[0,0],[-1.756,-5.397],[0.66,-4.971],[0,0],[-1.473,2.748],[-0.541,4.075]],"v":[[6.506,11.687],[-6,15.504],[-7.563,-1.76],[-3.057,-15.504],[8.36,-9.109],[5.44,-0.034]],"c":true},"ix":2},"nm":"Caminho 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.910000011968,0.426999978458,0.187999994615,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Preenchimento 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[52.884,114.798],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transformar"}],"nm":"Grupo 3","np":4,"cix":2,"bm":0,"ix":3,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[5.822,0.774],[4.058,2.181],[0,0],[-3.355,-0.445],[-3.466,1.022]],"o":[[-5.262,1.636],[-4.837,-0.641],[0,0],[2.8,1.537],[3.812,0.506],[0,0]],"v":[[15.093,5.954],[-1.685,7.362],[-15.093,3.043],[-8.832,-8.136],[0.45,-5.101],[11.458,-5.945]],"c":true},"ix":2},"nm":"Caminho 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.910000011968,0.426999978458,0.187999994615,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Preenchimento 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[80.698,149.982],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transformar"}],"nm":"Grupo 4","np":4,"cix":2,"bm":0,"ix":4,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[-4.76,-3.116],[0,0],[4.006,0.532],[3.244,-0.853],[0,0],[-5.01,-0.665]],"o":[[0,0],[-3.188,-2.051],[-3.528,-0.468],[0,0],[4.627,-1.143],[6.014,0.799]],"v":[[15.421,-1.916],[8.808,8.618],[-2.064,4.637],[-12.292,5.268],[-15.421,-7.166],[-0.872,-7.954]],"c":true},"ix":2},"nm":"Caminho 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.910000011968,0.426999978458,0.187999994615,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Preenchimento 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[90.212,87.524],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transformar"}],"nm":"Grupo 5","np":4,"cix":2,"bm":0,"ix":5,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[1.729,-2.957],[6.489,-1.913],[3.812,0.506],[2.799,1.537],[2.086,6.41],[-0.541,4.074],[-1.472,2.748],[-7.128,1.866],[-3.527,-0.468],[-3.188,-2.051],[-1.781,-6.203],[0.498,-3.746]],"o":[[-3.416,5.852],[-3.466,1.023],[-3.355,-0.445],[-5.946,-3.261],[-1.194,-3.663],[0.435,-3.273],[3.497,-6.508],[3.244,-0.852],[4.007,0.532],[5.417,3.48],[0.983,3.413],[-0.479,3.607]],"v":[[23.477,13.415],[8.012,25.525],[-2.997,26.37],[-12.279,23.335],[-24.788,8.229],[-25.854,-3.49],[-22.934,-12.566],[-6.225,-25.72],[4.003,-26.349],[14.876,-22.368],[26.073,-7.317],[26.865,3.51]],"c":true},"ix":2},"nm":"Caminho 1","mn":"ADBE Vector Shape - Group","hd":false},{"ind":1,"ty":"sh","ix":2,"ks":{"a":0,"k":{"i":[[1.452,5.041],[7.856,5.136],[6.015,0.797],[4.626,-1.143],[5.274,-9.583],[0.66,-4.971],[-1.756,-5.399],[-8.926,-4.799],[-4.837,-0.642],[-5.262,1.636],[-4.931,8.644],[-0.688,5.182]],"o":[[-2.601,-9.045],[-4.761,-3.117],[-5.009,-0.667],[-10.62,2.619],[-2.282,4.144],[-0.797,6.003],[3.109,9.567],[4.058,2.18],[5.822,0.773],[9.469,-2.94],[2.439,-4.276],[0.735,-5.533]],"v":[[37.744,-10.884],[21.488,-32.902],[5.196,-38.939],[-9.353,-38.152],[-34.352,-18.961],[-38.856,-5.217],[-37.294,12.048],[-18.539,34.514],[-5.132,38.833],[11.646,37.425],[34.121,19.379],[38.919,5.11]],"c":true},"ix":2},"nm":"Caminho 2","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"mm","mm":1,"nm":"Mesclar caminhos 1","mn":"ADBE Vector Filter - Merge","hd":false},{"ty":"fl","c":{"a":0,"k":[0.877999997606,0.877999997606,0.877999997606,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Preenchimento 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[84.144,118.511],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transformar"}],"nm":"Grupo 6","np":6,"cix":2,"bm":0,"ix":6,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[18.726,2.442],[0,0],[-0.705,0.04],[0,0]],"o":[[0,0],[18.626,2.429],[0,0],[-0.706,0.041]],"v":[[-45.038,-0.021],[-44.899,-1.085],[43.292,-2.421],[45.038,-2.008]],"c":true},"ix":2},"nm":"Caminho 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.169000004787,0.161000001197,0.368999974868,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Preenchimento 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[147.494,97.467],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transformar"}],"nm":"Grupo 7","np":4,"cix":2,"bm":0,"ix":7,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[130.107,-38.817],[35.758,50.211],[-130.107,28.187],[-111.111,-50.211]],"c":true},"ix":2},"nm":"Caminho 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0,0.125,0.263000009574,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Preenchimento 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[346.693,155.875],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transformar"}],"nm":"Grupo 8","np":4,"cix":2,"bm":0,"ix":8,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[238.275,-10.946],[143.925,78.082],[-158.527,37.921],[-238.275,-78.082],[-2.944,-22.34]],"c":true},"ix":2},"nm":"Caminho 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.046999998654,0.383999992819,0.642999985639,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Preenchimento 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[238.525,128.004],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transformar"}],"nm":"Grupo 9","np":4,"cix":2,"bm":0,"ix":9,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[-30.452,-11.733],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[22.546,8.675]],"v":[[54.447,15.708],[-29.446,6.601],[-54.448,2.22],[-45.036,-5.08],[-31.336,-15.708]],"c":true},"ix":2},"nm":"Caminho 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0,0.125,0.263000009574,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Preenchimento 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[181.186,89.557],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transformar"}],"nm":"Grupo 10","np":4,"cix":2,"bm":0,"ix":10,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0]],"v":[[64.818,58.717],[-64.818,-61.806],[0.327,61.806]],"c":true},"ix":2},"nm":"Caminho 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0,0.125,0.263000009574,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Preenchimento 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[309.542,62.056],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transformar"}],"nm":"Grupo 11","np":2,"cix":2,"bm":0,"ix":11,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[91.565,61.805],[16.21,48.604],[-66.562,34.103],[-91.564,29.721],[-82.154,22.422],[-68.452,11.794],[-64.768,8.934],[26.419,-61.805],[75.721,31.747]],"c":true},"ix":2},"nm":"Caminho 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.046999998654,0.383999992819,0.642999985639,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Preenchimento 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[218.304,62.056],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transformar"}],"nm":"Grupo 12","np":2,"cix":2,"bm":0,"ix":12,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":1750,"st":0,"bm":0},{"ddd":0,"ind":4,"ty":4,"nm":"bandeira contornos","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":0,"s":[0]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":25,"s":[-2]},{"t":50,"s":[0]}],"ix":10},"p":{"a":0,"k":[508.393,364.277,0],"ix":2},"a":{"a":0,"k":[3.333,103.527,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0.658,-2.953],[0,0],[0,0],[1.126,4.839]],"o":[[-0.67,2.999],[0,0],[1.614,-1.725],[0.1,0.1]],"v":[[3.548,0.438],[-4.206,5.982],[-4.206,5.979],[0.835,-5.982]],"c":true},"ix":2},"nm":"Caminho 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.910000011968,0.426999978458,0.187999994615,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Preenchimento 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[40.042,10.085],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transformar"}],"nm":"Grupo 1","np":4,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[7.587,6.536],[2.491,-0.102],[0.116,0.13],[0,0],[-0.384,0.003],[0,0],[0,-0.002],[1.614,-1.724],[0,0],[0,0],[0,0],[0,0],[0,0],[-0.505,-0.066],[0,0],[-7.421,-5.626],[0,0],[0,0]],"o":[[0,0],[-6.49,-5.591],[-0.022,-0.006],[0,0],[0,0],[0,0],[0,0.001],[1.126,4.839],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[2.297,-0.311],[8.902,6.748],[0,0],[0,0]],"v":[[19.81,-1.324],[4.701,-6.806],[-13.361,-12.344],[-14.212,-12.72],[-14.578,-11.828],[-13.731,-11.387],[-13.729,-11.388],[-13.729,-11.384],[-18.77,0.577],[-18.77,0.58],[-18.771,0.58],[-19.525,0.237],[-19.809,0.93],[-19.81,0.932],[-18.689,1.354],[-18.549,1.01],[-1.682,5.948],[16.577,12.72],[14.09,4.741]],"c":true},"ix":2},"nm":"Caminho 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.910000011968,0.426999978458,0.187999994615,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Preenchimento 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[54.606,15.487],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transformar"}],"nm":"Grupo 2","np":4,"cix":2,"bm":0,"ix":2,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0.027,-0.206],[0.013,-0.035],[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.219,-0.085]],"o":[[-0.005,0.036],[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.089,-0.218],[0.201,0.081]],"v":[[20.93,-49.702],[20.902,-49.594],[20.04,-47.383],[20.04,-47.382],[19.668,-46.43],[19.668,-46.428],[15.306,-35.217],[15.079,-34.632],[14.954,-34.311],[14.71,-33.687],[-17.967,50.277],[-20.956,50.137],[13.589,-34.109],[13.59,-34.111],[13.874,-34.805],[18.821,-46.868],[19.188,-47.762],[20.087,-49.956],[20.641,-50.193]],"c":true},"ix":2},"nm":"Caminho 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.811999990426,0.830999995213,0.925,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Preenchimento 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[21.206,50.527],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transformar"}],"nm":"Grupo 3","np":4,"cix":2,"bm":0,"ix":3,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":1750,"st":0,"bm":0},{"ddd":0,"ind":5,"ty":4,"nm":"hominho contornos","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":0,"s":[0]},{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":25,"s":[2]},{"t":50,"s":[0]}],"ix":10},"p":{"a":0,"k":[153.864,377.089,0],"ix":2},"a":{"a":0,"k":[61,205,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[3.986,-3.765],[-0.075,4.263],[-3.986,-0.553],[-3.493,-4.263]],"c":true},"ix":2},"nm":"Caminho 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.917999985639,0.552999997606,0.305999995213,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Preenchimento 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[97.339,38.926],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transformar"}],"nm":"Grupo 1","np":4,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[-0.562,-8.323],[0,0],[0,0],[1.36,0.35],[0,0],[5.078,1.566],[0,0],[0.814,1.124],[-5.522,-2.048]],"o":[[0,0],[-0.808,0.107],[0,0],[-1.359,-0.356],[0,0],[0,0],[-1.596,-0.485],[-3.418,-4.711],[5.522,2.048]],"v":[[13.008,-2.493],[12.001,4.652],[10.312,5.359],[7.791,10.466],[6.728,0.137],[-5.829,-0.359],[-5.828,-0.365],[-9.59,-2.727],[-5.788,-7.58]],"c":true},"ix":2},"nm":"Caminho 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.2,0.2,0.2,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Preenchimento 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[95.438,17.148],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transformar"}],"nm":"Grupo 2","np":4,"cix":2,"bm":0,"ix":2,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[-0.809,0.107],[-0.116,-0.991],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[-0.629,4.74],[-0.194,0.58],[0,0],[0,0],[-1.359,-0.356],[0,0]],"o":[[0.624,-0.087],[0.272,2.269],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0.146,-1.094],[0,0],[5.078,1.566],[0,0],[1.359,0.35],[0,0]],"v":[[8.821,-8.33],[10.152,-7.222],[7.611,-2.644],[6.924,7.179],[-1.544,13.34],[2.518,5.313],[-4.963,4.813],[-9.338,3.738],[-10.424,2.403],[-9.585,-10.532],[-9.079,-13.115],[-9.01,-13.34],[3.549,-12.844],[4.611,-2.515],[7.132,-7.623]],"c":true},"ix":2},"nm":"Caminho 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.948999980852,0.6,0.289999988032,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Preenchimento 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[98.577,30.124],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transformar"}],"nm":"Grupo 3","np":4,"cix":2,"bm":0,"ix":3,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[-27.616,-9.801],[0,0],[0,0],[0,0]],"v":[[9.572,21.137],[-18.343,-21.136],[-3.118,6.541],[18.343,4.45]],"c":true},"ix":2},"nm":"Caminho 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0,0.204000001795,0.419999994016,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Preenchimento 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[96.057,55.643],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transformar"}],"nm":"Grupo 4","np":4,"cix":2,"bm":0,"ix":4,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0.764,0.72],[-0.083,1.851],[1.039,2.566],[-0.396,0.279],[-1.226,0.312],[-0.102,-1.634],[-0.007,-0.046],[-0.404,-1.421]],"o":[[0,0],[0,0],[-0.996,-0.933],[0.115,-2.484],[-0.334,-0.82],[0.504,-0.363],[2.714,-0.681],[0.001,0.039],[0.064,0.647],[1.219,4.354]],"v":[[6.884,6.578],[1.556,9.341],[0.103,8.224],[-1.936,3.969],[-6.475,-5.63],[-6.488,-7.344],[-3.696,-8.419],[2.648,-7.707],[2.663,-7.576],[3.415,-4.318]],"c":true},"ix":2},"nm":"Caminho 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.948999980852,0.6,0.289999988032,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Preenchimento 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[78.549,23.927],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transformar"}],"nm":"Grupo 5","np":4,"cix":2,"bm":0,"ix":5,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[-3.947,0.211],[0,0],[0,0],[1.336,-0.011],[10.934,5.859],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[-6.258,0.062],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0.764,0.719],[0,0],[0,0],[0,0]],"v":[[40.412,1.789],[31.641,18.477],[28.509,35.442],[26.4,35.488],[-9.476,29.344],[-2.174,8.72],[-2.025,-8.292],[-27.405,-8.849],[-40.412,-31.214],[-38.108,-32.53],[-32.811,-35.549],[-19.9,-19.09],[4.664,-26.152],[6.117,-25.035],[3.726,-23.797],[18.953,3.862]],"c":true},"ix":2},"nm":"Caminho 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.046999998654,0.383999992819,0.642999985639,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Preenchimento 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[73.989,58.304],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transformar"}],"nm":"Grupo 6","np":4,"cix":2,"bm":0,"ix":6,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0.27,0.029],[0,0],[0,0]],"o":[[0,0],[-0.244,-0.072],[-3.801,-0.447],[0,0],[0,0]],"v":[[-1.025,-5.379],[9.493,0.432],[8.726,0.278],[-5.761,5.379],[-9.493,0.782]],"c":true},"ix":2},"nm":"Caminho 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0,0.204000001795,0.419999994016,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Preenchimento 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[106.756,42.408],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transformar"}],"nm":"Grupo 7","np":4,"cix":2,"bm":0,"ix":7,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[-3.801,-0.446],[-0.244,-0.072],[1.081,-3.632],[3.946,-0.205],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0.269,0.029],[3.283,0.917],[-1.164,3.914],[-3.947,0.211],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[-6.037,-7.682],[-2.126,-2.866],[1.606,1.731],[16.092,-3.37],[16.859,-3.216],[20.594,5.476],[15.011,14.038],[-6.449,16.11],[-21.675,-11.549],[-19.284,-12.787],[-13.956,-15.55],[-12.88,-16.11],[-11.005,-13.804],[-9.919,-12.469]],"c":true},"ix":2},"nm":"Caminho 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.046999998654,0.383999992819,0.642999985639,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Preenchimento 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[99.39,46.056],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transformar"}],"nm":"Grupo 8","np":4,"cix":2,"bm":0,"ix":8,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0]],"v":[[2.188,-1.317],[1.694,2.393],[-2.188,-2.393]],"c":true},"ix":2},"nm":"Caminho 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0,0.204000001795,0.419999994016,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Preenchimento 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[91.658,35.98],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transformar"}],"nm":"Grupo 9","np":4,"cix":2,"bm":0,"ix":9,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[-0.65,3.078],[0,0],[-0.889,0.37],[-1.354,-1.521],[-0.21,-0.673]],"o":[[0,0],[0,0],[0,0],[0.065,-1.079],[1.178,-0.489],[0.277,0.317],[0.805,2.561]],"v":[[5.163,4.06],[-0.135,7.082],[-4.512,-2.895],[-1.344,-2.878],[-0.154,-6.592],[3.301,-4.383],[4.035,-2.846]],"c":true},"ix":2},"nm":"Caminho 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.948999980852,0.6,0.289999988032,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Preenchimento 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[36.015,18.694],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transformar"}],"nm":"Grupo 10","np":4,"cix":2,"bm":0,"ix":10,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[10.718,3.027],[10.627,3.713],[-11.228,0.811],[-10.627,-3.713],[11.228,-0.811],[11.13,-0.076]],"c":true},"ix":2},"nm":"Caminho 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.862999949736,0.277999997606,0.328999986836,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Preenchimento 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[52.567,14.101],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transformar"}],"nm":"Grupo 11","np":4,"cix":2,"bm":0,"ix":11,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0.063,0.647],[0,0]],"o":[[0,0],[0,0],[-0.404,-1.421],[0,0],[0,0]],"v":[[3.357,0.796],[3.193,2.03],[-2.853,1.228],[-3.605,-2.03],[3.605,-1.072]],"c":true},"ix":2},"nm":"Caminho 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.067000003889,0.063000002094,0.136999990426,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Preenchimento 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[84.818,18.382],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transformar"}],"nm":"Grupo 12","np":4,"cix":2,"bm":0,"ix":12,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0.504,-0.363],[-0.334,-0.819],[0,0]],"o":[[0,0],[-1.226,0.313],[-0.395,0.279],[0,0],[0,0]],"v":[[-5.372,-2.135],[5.785,-0.654],[2.992,0.421],[3.005,2.135],[-5.785,0.968]],"c":true},"ix":2},"nm":"Caminho 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.067000003889,0.063000002094,0.136999990426,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Preenchimento 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[69.069,16.161],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transformar"}],"nm":"Grupo 13","np":4,"cix":2,"bm":0,"ix":13,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[-0.021,0.206],[0.454,1.336],[0.738,0.319],[0,0],[0.701,-3.656],[0.043,-0.319],[-0.212,-1.246],[-1.247,-0.166],[-0.132,0.015],[-0.518,3.902]],"o":[[0.185,-1.929],[-0.388,-1.146],[0,0],[-1.798,-0.141],[-0.066,0.304],[-0.204,1.542],[0.366,2.145],[0.135,0.017],[1.848,-0.184],[0.028,-0.211]],"v":[[3.624,-0.078],[3.172,-5.105],[1.451,-7.391],[0.883,-7.532],[-3.448,-1.343],[-3.605,-0.407],[-3.57,3.843],[-1.036,7.656],[-0.626,7.658],[3.554,0.544]],"c":true},"ix":2},"nm":"Caminho 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.862999949736,0.277999997606,0.328999986836,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Preenchimento 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[4.059,7.923],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transformar"}],"nm":"Grupo 14","np":4,"cix":2,"bm":0,"ix":14,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0.277,0.317],[1.178,-0.488],[0.065,-1.079],[0,0],[0,0],[0,0],[-0.518,3.902],[1.686,0.732],[0,0],[0,0]],"o":[[0,0],[0,0],[-0.21,-0.673],[-1.354,-1.521],[-0.889,0.371],[0,0],[0,0],[0,0],[1.848,-0.185],[0.512,-3.851],[0,0],[0,0],[0,0]],"v":[[18.604,6.72],[18.479,7.66],[17.313,7.656],[16.58,6.119],[13.124,3.909],[11.934,7.625],[8.766,7.608],[-19.296,7.443],[-19.303,7.39],[-15.124,0.276],[-17.227,-7.66],[19.303,1.449],[19.204,2.197]],"c":true},"ix":2},"nm":"Caminho 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.910000011968,0.426999978458,0.187999994615,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Preenchimento 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[22.736,8.191],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transformar"}],"nm":"Grupo 15","np":4,"cix":2,"bm":0,"ix":15,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[-7.889,-0.188],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[-1.424,-7.763],[0,0],[0,0],[17.34,5.523],[0,0]],"v":[[15.789,-4.481],[-5.23,-8.073],[-6.092,24.732],[-21.09,27.96],[-24.038,-13.084],[-11.495,-27.772],[-5.111,-27.618],[-5.104,-27.617],[25.462,-3.139]],"c":true},"ix":2},"nm":"Caminho 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0,0.125,0.263000009574,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Preenchimento 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[52.459,114.844],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transformar"}],"nm":"Grupo 16","np":4,"cix":2,"bm":0,"ix":16,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[1.246,-7.213],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[-3.821,-6.273],[-4.877,-2.729],[-11.295,4.52],[1.911,6.273],[10.017,0.222],[11.295,-4.265]],"c":true},"ix":2},"nm":"Caminho 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.513999968884,0.6,0.702000038297,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Preenchimento 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[82.042,197.797],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transformar"}],"nm":"Grupo 17","np":4,"cix":2,"bm":0,"ix":17,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[-2.653,-12.601],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-0.527,-11.795],[-9.312,13.551],[11.965,-10.136],[10.064,-13.551]],"c":true},"ix":2},"nm":"Caminho 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.513999968884,0.6,0.702000038297,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Preenchimento 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[34.803,153.627],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transformar"}],"nm":"Grupo 18","np":4,"cix":2,"bm":0,"ix":18,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[17.34,5.522],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[20.148,53.268],[3.293,51.029],[2.995,-28.791],[-27.572,-53.268],[-10.414,-52.845],[27.572,-46.748]],"c":true},"ix":2},"nm":"Caminho 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0,0.204000001795,0.419999994016,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Preenchimento 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[74.927,140.495],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transformar"}],"nm":"Grupo 19","np":4,"cix":2,"bm":0,"ix":19,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":1750,"st":0,"bm":0},{"ddd":0,"ind":6,"ty":4,"nm":"nuvem contornos 3","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[441.196,174.382,0],"ix":2},"a":{"a":0,"k":[48.338,13.382,0],"ix":1},"s":{"a":0,"k":[173,173,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[-13.305,-1.026],[-18.691,-0.966],[0,0],[-9.991,-13.554],[0,0]],"o":[[0,0],[18.69,0.967],[0,0],[0,0],[0,0]],"v":[[-29.094,4.319],[-1.289,-13.346],[23.524,4.319],[48.338,13.382],[-48.338,13.382]],"c":true},"ix":2},"nm":"Caminho 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.870999983245,0.889999988032,0.957000014361,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Preenchimento 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[48.338,13.382],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transformar"}],"nm":"Grupo 1","np":4,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":1750,"st":0,"bm":0},{"ddd":0,"ind":7,"ty":4,"nm":"nuvem contornos 2","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[171.196,120.382,0],"ix":2},"a":{"a":0,"k":[48.338,13.382,0],"ix":1},"s":{"a":0,"k":[248,248,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[-13.305,-1.026],[-18.691,-0.966],[0,0],[-9.991,-13.554],[0,0]],"o":[[0,0],[18.69,0.967],[0,0],[0,0],[0,0]],"v":[[-29.094,4.319],[-1.289,-13.346],[23.524,4.319],[48.338,13.382],[-48.338,13.382]],"c":true},"ix":2},"nm":"Caminho 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.870999983245,0.889999988032,0.957000014361,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Preenchimento 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[48.338,13.382],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transformar"}],"nm":"Grupo 1","np":4,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":1750,"st":0,"bm":0},{"ddd":0,"ind":8,"ty":4,"nm":"nuvem contornos","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[532.196,98.382,0],"ix":2},"a":{"a":0,"k":[48.338,13.382,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[-13.305,-1.026],[-18.691,-0.966],[0,0],[-9.991,-13.554],[0,0]],"o":[[0,0],[18.69,0.967],[0,0],[0,0],[0,0]],"v":[[-29.094,4.319],[-1.289,-13.346],[23.524,4.319],[48.338,13.382],[-48.338,13.382]],"c":true},"ix":2},"nm":"Caminho 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.870999983245,0.889999988032,0.957000014361,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Preenchimento 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[48.338,13.382],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transformar"}],"nm":"Grupo 1","np":4,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":1750,"st":0,"bm":0}],"markers":[]} \ No newline at end of file diff --git a/app/src/main/assets/icons/error.png b/app/src/main/assets/icons/error.png new file mode 100644 index 000000000..0c7c37d80 Binary files /dev/null and b/app/src/main/assets/icons/error.png differ diff --git a/app/src/main/assets/icons/moon_texture.png b/app/src/main/assets/icons/moon_texture.png new file mode 100644 index 000000000..60ffaa143 Binary files /dev/null and b/app/src/main/assets/icons/moon_texture.png differ diff --git a/app/src/main/assets/icons/prevmap.png b/app/src/main/assets/icons/prevmap.png new file mode 100644 index 000000000..43383f07d Binary files /dev/null and b/app/src/main/assets/icons/prevmap.png differ diff --git a/app/src/main/assets/icons/sun.png b/app/src/main/assets/icons/sun.png new file mode 100644 index 000000000..5a0a1d413 Binary files /dev/null and b/app/src/main/assets/icons/sun.png differ diff --git a/app/src/main/assets/icons/very_hot.svg b/app/src/main/assets/icons/very_hot.svg new file mode 100644 index 000000000..53b2cb894 --- /dev/null +++ b/app/src/main/assets/icons/very_hot.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/src/main/assets/icons/wind_direction.png b/app/src/main/assets/icons/wind_direction.png new file mode 100644 index 000000000..15d85d075 Binary files /dev/null and b/app/src/main/assets/icons/wind_direction.png differ diff --git a/app/src/main/assets/index.html b/app/src/main/assets/index.html new file mode 100644 index 000000000..1a33f40ab --- /dev/null +++ b/app/src/main/assets/index.html @@ -0,0 +1,765 @@ + + + + + + + Weather Home + + + + + + + + + + + + + + +
    +
    +
    + +

    + +

    +
    +
    + + + + +
    + + + +
    + + + + +
    + + +
    +
    +
    + + +
    + + + + +
    + Now +
    +

    + Weather Icon +
    + +
    +

    arrow_upward34°

    +

    arrow_downward23°

    +
    +
    + +
    +

    + Feels like 30° +
    + + + + +
    + +
    + schedule +

    +
    + + + + + + + + +
    + +
    + +
    + + + + + + + + + + + + + + +
    +

    keyboard_arrow_down

    + +
    +
      +
        +
        + +
        + + + +
        +
        + +
        + air +

        +
        + +
        + wind_power +

        +
        + + +
        + cloud +

        +
        +
        +
        + + + +
        +
        + + + + + +
        +
        + apparel +
        + +
        + +
        +
        + trending_down +
        +

        Cooling expected over the next 3 days

        +
        + + + +
        +
        +
        +
        +
        + + +
        + +
        +
        +

        Next 24-hr

        +

        Mar, 19

        +
        +
        + +
        +
        + +
        +
        + + +
        +

        Hourly precipitation

        +
        + +
        +
        +

        Today's amount

        + 1.5 mm +
        + +
        +

        Precipitation hours

        + 1.5 mm +
        + + +
        + + + + + + +
        + +
        +
        +

        14-day forecast

        +

        More chevron_right

        +
        +
        + + +
        +
        + +
        +
        radar Live radar
        +
        + +
        +
        + + + + + +
        + + +
        +
        wb_twilightSun
        + +
        + + + +
        + +
        + + +
        + +
        + vertical_align_top +

        +
        + +
        + vertical_align_bottom +

        +
        + +
        +
        + +
        +
        +

        +
        + +
        +
        + + + + + +
        +
        + + +
        + + +
        +
        + vertical_align_top +

        +
        +
        + vertical_align_bottom +

        +
        +
        + + +
        + +
        + + +
        +
        humidity_highHumidity
        + +
        + + + + + +
        + +
        +

        1%

        +
        + +
        +

        -

        + Dew point +
        + +
        + + + +
        + +
        + + + + + +
        + +
        +
        compressPressure
        +

        29.96

        + inHG +
        + + +
        + +
        +
        visibilityVisibility
        + +
        + + + + + +
        + + +
        +

        10

        + km +
        + +
        + + +
        + +
        + +
        + +
        +
        exploreDirection
        +

        --

        + --- +
        + + +
        + + + + + + +
        + + + +
        +
        +

        Air Quality

        + +
        +

        33

        +
        +
        +

        Error

        +
        +
        +
        + +
        + +
        +
        +
        + Air quality not found! +
        +
        +
        + + + +
        + +
        + PM2.5 + +

        +
        + +
        + CO + +

        +
        + +
        + NO2 + +

        +
        + +
        + SO2 + +

        +
        + +
        + O3 + +

        +
        + + +
        + PM10 + +

        +
        + +
        + + +
        + +
        +
        +

        UV Index

        +
        +

        +
        +
        +
        + +
        + +
        +
        +
        + +
        +
        +
        + +
        + + + +
        +

        open-meteo | weatherapi

        +
        + + + + +
        +
        +
        + + + + + + + + +
        + +
        + + + + +
        + + + + +
        +

        UI isn't made for Desktop devices

        +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/assets/index.js b/app/src/main/assets/index.js new file mode 100644 index 000000000..cc8575007 --- /dev/null +++ b/app/src/main/assets/index.js @@ -0,0 +1 @@ +import '@material/web/all.js' \ No newline at end of file diff --git a/app/src/main/assets/langs/langs.js b/app/src/main/assets/langs/langs.js new file mode 100644 index 000000000..67dfaa16e --- /dev/null +++ b/app/src/main/assets/langs/langs.js @@ -0,0 +1,2953 @@ +const translations = { + "feels_like": [ + "Feels like", + "Sensación térmica", + "Conditions", + "Fühlt sich an wie", + "Sembra che", + "", + "Hőérzet", + "Чувствуется как", + "Temperatura odczuwalna", + "", + "Se simte ca", + "Pocitová teplota", + "体感温度", + "体感", + "Відчувається як" + ], + "precipitation": [ + "Precipitation", + "Precipitación", + "Précipitations", + "Niederschlag", + "Precipitazioni", + "", + "Csapadék", + "Осадки", + "Opady", + "", + "Precipitații", + "Zrážky", + "降雨量", + "降水量", + "Опади" + ], + "humidity": [ + "Humidity", + "Humedad", + "Humidité", + "Luftfeuchtigkeit", + "Umidità", + "", + "Páratartalom", + "Влажность", + "Wilgotność", + "", + "Umiditate", + "Vlhkosť", + "湿度", + "湿度", + "Вологість" + ], + "wind": [ + "Wind", + "Viento", + "Vent", + "Wind", + "Vento", + "", + "Szél", + "Ветер", + "Wiatr", + "", + "Vânt", + "Vietor", + "风", + "風", + "Вітер" + ], + "uv": [ + "UV", + "UV", + "Uv", + "UV", + "UV", + "", + "UV", + "УФ", + "UV", + "", + "UV", + "UV", + "紫外线", + "UV", + "УФ" + ], + "settings": [ + "Settings", + "Ajustes", + "Paramètres", + "Einstellungen", + "Impostazioni", + "", + "Beállítások", + "Настройки", + "Ustawienia", + "", + "Setări", + "Nastavenia", + "设置", + "設定", + "Налаштування" + ], + "about": [ + "About", + "Acerca de", + "À propos", + "Über", + "Circa", + "", + "Továbbiak", + "О сайте", + "O aplikacji", + "", + "Despre", + "O aplikácii", + "关于", + "について", + "Про програму" + ], + "today": [ + "Today", + "Hoy", + "Aujourd'hui", + "Heute", + "Oggi", + "", + "Ma", + "Сегодня", + "Dzisiaj", + "", + "Azi", + "Dnes", + "今天", + "今日", + "Сьогодні" + ], + "tomorrow": [ + "Tomorrow", + "Mañana", + "Demain", + "Morgen", + "Domani", + "", + "Holnap", + "Завтра", + "Jutro", + "", + "Mâine", + "Zajtra", + "明天", + "明日", + "Завтра" + ], + "language": [ + "Language", + "Idioma", + "Langue", + "Sprache", + "Lingua", + "", + "Nyelv", + "Язык", + "Język", + "", + "Limbă", + "Jazyk", + "语言", + "言語", + "Мова" + ], + "weather_master": [ + "WeatherMaster", + "WeatherMaster", + "WeatherMaster", + "WeatherMaster", + "WeatherMaster", + "WeatherMaster", + "WeatherMaster", + "WeatherMaster", + "WeatherMaster", + "WeatherMaster", + "WeatherMaster", + "WeatherMaster", + "WeatherMaster", + "WeatherMaster", + "WeatherMaster" + ], + "temperature": [ + "Temperature", + "Temperatura", + "Température", + "Temperatur", + "Temperatura", + "", + "Hőmérséklet", + "Температура", + "Temperatura", + "", + "Temperatură", + "Teplota", + "温度", + "温度", + "Температура" + ], + "now": [ + "Now", + "Ahora", + "Maintenant", + "Jetzt", + "Ora", + "", + "Most", + "Сейчас", + "Teraz", + "", + "Acum", + "Teraz", + "现在", + "現在", + "Зараз" + ], + "clear_sky": [ + "Clear sky", + "Cielo despejado", + "Ciel dégagé", + "Klarer Himmel", + "Cielo sereno", + "", + "Tiszta égbolt", + "Чистое небо", + "Bezchmurne niebo", + "", + "Cer senin", + "Jasno", + "晴天", + "晴天", + "Ясно" + ], + "mostly_clear": [ + "Mostly clear", + "Mayormente despejado", + "Légèrement", + "Meistens klar", + "Per lo più sereno", + "", + "Többnyire derült", + "В основном ясно", + "Drobne chmury", + "", + "În mare parte senin", + "Takmer jasno", + "大部晴朗", + "ほぼ快晴", + "Переважно ясно" + ], + "partly_cloudy": [ + "Partly cloudy", + "Parcialmente nublado", + "Nuageux", + "Teilweise bewölkt", + "Parzialmente nuvoloso", + "", + "Részben felhős", + "Частично облачно", + "Częściowe zachmurzenie", + "", + "Parțial înnorat", + "Polooblačno", + "多云", + "一部曇り", + "Хмарно з проясненнями" + ], + "overcast": [ + "Overcast", + "Nublado", + "Couvert", + "Bedeckt", + "Nuvoloso", + "", + "Borult", + "Пасмурная погода", + "Zachmurzenie", + "", + "Înnorat", + "Zamračené", + "多云", + "曇り", + "Похмуро" + ], + "fog": [ + "Fog", + "Niebla", + "Brouillard", + "Nebel", + "Nebbia", + "", + "Köd", + "Туман", + "Mgła", + "", + "Ceață", + "Hmla", + "雾", + "霧", + "Туман" + ], + "drizzle": [ + "Drizzle", + "Llovizna", + "Bruine", + "Nieselregen", + "Pioggerella", + "", + "Szitálás", + "Морось", + "Mżawka", + "", + "Burniță", + "Mrholenie", + "细雨", + "霧雨", + "Мряка" + ], + "freezing_drizzle": [ + "Freezing Drizzle", + "Llovizna helada", + "Bruine verglaçante", + "Eisiger Nieselregen", + "Pioggia gelata", + "", + "Ónos eső", + "Холодная морось", + "Marznąca mżawka", + "", + "Chiciură fină", + "Mrznúce mrholenie", + "冰冻细雨", + "着氷性の霧雨", + "Мокрий сніг" + ], + "moderate_rain": [ + "Moderate rain", + "Lluvia moderada", + "Pluie légère", + "Mäßiger Regen", + "Pioggia moderata", + "", + "Eső", + "Умеренный дождь", + "Umiarkowany deszcz", + "", + "Ploaie moderată", + "Mierny dážď", + "中雨", + "小雨", + "Помірний дощ" + ], + "heavy_intensity_rain": [ + "Heavy intensity rain", + "Lluvia intensa", + "Forte Pluie", + "Starker Regen", + "Pioggia di forte intensità", + "", + "Zápor", + "Дождь сильной интенсивности", + "Intensywne opady deszczu", + "", + "Ploaie torențială", + "Silný dážď", + "强降雨", + "激しい雨", + "Сильний дощ" + ], + "freezing_rain": [ + "Freezing Rain", + "Lluvia helada", + "Pluie verglaçante", + "Gefrierregen", + "Pioggia gelata", + "", + "Ónos eső", + "Ледяной дождь", + "Marznący deszcz", + "", + "Chiciură", + "Mrznúci dážď", + "冻雨", + "雨氷", + "Крижана буря" + ], + "slight_snow": [ + "Slight snow", + "Nieve ligera", + "Neige légère", + "Leichter Schneefall", + "Neve leggera", + "", + "Szitáló havazás", + "Небольшой снег", + "Lekki śnieg", + "", + "Ninsoare ușoară", + "Jemné sneženie", + "小雪", + "小雪", + "Легкий сніг" + ], + "moderate_snow": [ + "Moderate snow", + "Nieve moderada", + "Neige modérée", + "Mäßiger Schneefall", + "Neve moderata", + "", + "Havazás", + "Умеренный снег", + "Opady śniegu", + "", + "Ninsoare moderată", + "Mierne sneženie", + "中雪", + "中程度の雪", + "Помірний сніг" + ], + "heavy_intensity_snow": [ + "Heavy intensity snow", + "Nieve intensa", + "Fortes chutes de neige", + "Starker Schneefall", + "Neve di forte intensità", + "", + "Hózápor", + "Сильный снег", + "Intensywne opady śniegu", + "", + "Ninsoare puternică", + "Silné sneženie", + "强降雪", + "大雪", + "Снігопад" + ], + "snow_grains": [ + "Snow grains", + "Copos de nieve", + "Gros flocons", + "Schneekörner", + "Granelli di neve", + "", + "Hódara", + "Град", + "Ziarnisty śnieg", + "", + "Ninsoare fină", + "Silné sneženie", + "霰", + "霧雪", + "Град" + ], + "rain_showers": [ + "Rain showers", + "Chubascos", + "Averses de pluie", + "Regenschauer", + "Piogge a catinelle", + "", + "Zivatar", + "Ливневые дожди", + "Opady deszczu", + "", + "Averse de ploaie", + "Prehánky", + "阵雨", + "にわか雨", + "Злива" + ], + "heavy_rain_showers": [ + "Heavy rain showers", + "Lluvias fuertes", + "Fortes averses de Pluie", + "Starke Regenschauer", + "Forti rovesci di pioggia", + "", + "Erős zivatar", + "Сильные ливневые дожди", + "Silne opady deszczu", + "", + "Avererse de ploaie torențiale", + "Silné prehánky", + "阵雨", + "激しいにわか雨", + "Сильна злива" + ], + "slight_snow_showers": [ + "Slight snow showers", + "Ligeras nevadas", + "Légères averses", + "Leichte Schneeschauer", + "Leggeri rovesci di neve", + "", + "Enyhe havazás", + "Небольшие осадки в виде снега", + "Lekkie opady śniegu", + "", + "Averse ușoare de zăpadă", + "Mierne snehové prehánky", + "小阵雨", + "にわかに小雪", + "Снігопад" + ], + "heavy_snow_showers": [ + "Heavy snow showers", + "Fuertes nevadas", + "Fortes averses de neige", + "Starke Schneeschauer", + "Forti rovesci di neve", + "", + "Erős havazás", + "Сильная метель со снегом", + "Śnieżyca", + "", + "Averse abundente de zăpadă", + "Silné snehové prehánky", + "强降阵雨", + "にわかに大雪", + "Сильний снігопад" + ], + "thunderstorm": [ + "Thunderstorm", + "Tormenta eléctrica", + "Orage", + "Gewitter", + "Temporale", + "", + "Vihar", + "Гроза", + "Burze z piorunami", + "", + "Furtună cu fulgere", + "Búrka", + "雷阵雨", + "雷雨", + "Гроза" + ], + "strong_thunderstorm": [ + "Strong thunderstorm", + "Tormenta eléctrica fuerte", + "Puissant orage", + "Starkes Gewitter", + "Forte temporale", + "", + "Heves vihar", + "Сильная гроза", + "Gwałtowne burze", + "", + "Furtună puternică", + "Silná búrka", + "强雷阵雨", + "激しい雷雨", + "Сильна гроза" + ], + "save": [ + "Save", + "Guardar", + "Sauvegarder", + "Speichern", + "Risparmiare", + "", + "Mentés", + "Сохранить", + "Zapisz", + "", + "Salvează", + "Uložiť", + "保存", + "保存", + "Зберегти" + ], + "saved_locations": [ + "Saved locations", + "Ubicaciones guardadas", + "Emplacements enregistrés", + "Gespeicherte Orte", + "Luoghi salvati", + "", + "Mentett helyek", + "Сохраненные местоположения", + "Zapisane lokalizacje", + "", + "Locații Salvate", + "Uložené miesta", + "已保存位置", + "地点を保存しました", + "Збережені місця" + ], + "search": [ + "Search", + "Buscar", + "Rechercher", + "Suche", + "Ricerca", + "", + "Keresés", + "Поиск", + "Wyszukaj", + "", + "Caută", + "Hľadať", + "搜索", + "検索", + "Пошук" + ], + "good": [ + "Good", + "Bien", + "Bon", + "Gut", + "Buono", + "", + "Jó", + "Хорошо", + "Dobra", + "", + "Bun", + "Dobrý", + "好", + "良い", + "Хороша" + ], + "fair": [ + "Fair", + "Regular", + "Juste", + "angemessen", + "Fiera", + "", + "Elfogadható", + "Прекрасно", + "Dość dobra", + "", + "Corect", + "Dostačujúci", + "晴转多云", + "ほどよい", + "Добра" + ], + "moderate": [ + "Moderate", + "Moderado", + "Modéré", + "Mäßig", + "Moderato", + "", + "Közepes", + "Умеренный", + "Umiarkowana", + "", + "Moderat", + "Mierny", + "中等", + "適度", + "Середня" + ], + "poor": [ + "Poor", + "Pobre", + "Pauvre", + "Schlecht", + "Povero", + "", + "Rossz", + "Плохо", + "Zła", + "", + "Sărac", + "Zlý", + "差", + "悪い", + "Погана" + ], + "very_poor": [ + "Very poor", + "Muy pobre", + "Très pauvre", + "Sehr schlecht", + "Molto scarso", + "", + "Nagyon rossz", + "Очень плохо", + "Bardzo zła", + "", + "Foarte sărac", + "Veľmi zlý", + "非常差", + "とても悪い", + "Дуже погана" + ], + "pressure": [ + "Pressure", + "Presión", + "Pression", + "Druck", + "Pressione", + "", + "Nyomás", + "Давление", + "Ciśnienie", + "", + "Presiune", + "Tlak", + "气压", + "気圧", + "Тиск" + ], + "day": [ + "Day", + "Día", + "Jour", + "Tag", + "Giorno", + "", + "Nap", + "День", + "Dzień", + "", + "Zi", + "Deň", + "天", + "日", + "День" + ], + "days": [ + "Days", + "Días", + "Jours", + "Tage", + "Giorni", + "", + "Napok", + "Дни", + "Dni", + "", + "Zile", + "Dni", + "天", + "日数", + "Дні" + ], + "mon": [ + "Mon", + "Lun", + "Lun", + "Mon", + "Lun", + "", + "Hé", + "Пн", + "Pon", + "", + "Lun", + "Pon", + "周一", + "月", + "Пн" + ], + "tue": [ + "Tue", + "Mar", + "Mar", + "Die", + "Mar", + "", + "Ke", + "Вт", + "Wt", + "", + "Mar", + "Uto", + "周二", + "火", + "Вт" + ], + "wed": [ + "Wed", + "Mie", + "Mer", + "Mit", + "Mer", + "", + "Sze", + "Ср", + "Śr", + "", + "Mie", + "Str", + "周三", + "水", + "Ср" + ], + "thu": [ + "Thu", + "Jue", + "Jeu", + "Don", + "Gio", + "", + "Csü", + "Чт", + "Czw", + "", + "Joi", + "Štv", + "周四", + "木", + "Чт" + ], + "fri": [ + "Fri", + "Vie", + "Ven", + "Fre", + "Ven", + "", + "Pén", + "Пт", + "Pią", + "", + "Vin", + "Pia", + "周五", + "金", + "Пт" + ], + "sat": [ + "Sat", + "Sab", + "Sam", + "Sam", + "Sat", + "", + "Szo", + "Сб", + "Sob", + "", + "Sâm", + "Sob", + "周六", + "土", + "Сб" + ], + "sun": [ + "Sun", + "Dom", + "Dim", + "Son", + "Sole", + "", + "Vas", + "Вс", + "Niedz", + "", + "Dum", + "Ned", + "周日", + "日", + "Нд" + ], + "error": [ + "Error", + "Error", + "Erreur", + "Fehler", + "Errore", + "", + "Hiba", + "Ошибка", + "Błąd", + "", + "Eroare", + "Chyba", + "错误", + "エラー", + "Помилка" + ], + "uv_index": [ + "UV index", + "Índice UV", + "Indice UV", + "UV Index", + "Indice UV", + "", + "UV sugárzás", + "УФ-индекс", + "UV indeks", + "", + "Indice UV", + "UV index", + "紫外线指数", + "UV指数", + "УФ-індекс" + ], + "new_app_version_available": [ + "New App Version is available!", + "Nueva versión disponible!", + "Nouvelle version d'application disponible!", + "Neue App Version ist vefügbar!", + "È disponibile la nuova versione dell'app!", + "", + "Új verzió elérhető!", + "Новая версия приложения доступна!", + "Dostepna aktualizacja!", + "", + "Versiune nouă a aplicației disponibilă!", + "K dispozícii je nová verzia aplikácie!", + "新的 App 版本已发布!", + "新しいバージョンが利用可能です!", + "Нова версія застосунку доступна!" + ], + "update": [ + "Update", + "Actualización", + "Mettre à jour", + "Aktualisiere", + "Aggiornamento", + "", + "Frissítés", + "Обновление", + "Aktualizacja", + "", + "Actualizare", + "Aktualizovať", + "更新", + "アップデート", + "Оновити" + ], + "air_quality": [ + "Air Quality", + "Calidad del aire", + "Qualité de l'air", + "Luft Qualität", + "Qualità dell'aria", + "", + "Levegőminőség", + "Качество воздуха", + "Jakość powietrza", + "", + "Calitatea aerului", + "Kvalita ovzdušia", + "空气质量", + "空気の質", + "Якість повітря" + ], + "dew_point": [ + "Dew point", + "Punto de rocío", + "Point", + "Taupunkt", + "Punto di rugiada", + "", + "Harmatpont", + "Точка росы", + "Punkt rosy", + "", + "Punct de rouă", + "Rosný bod", + "露点", + "露点", + "Точка роси" + ], + "sunset": [ + "Sunset", + "Atardecer", + "Coucher du soleil", + "Sonnenuntergang", + "Tramonto", + "", + "Napnyugta", + "Закат", + "Zachód słońca", + "", + "Răsărit", + "Západ slnka", + "日落", + "日の入", + "Захід сонця" + ], + "sunrise": [ + "Sunrise", + "Amanecer", + "Lever du soleil", + "Sonnenaufgang", + "Alba", + "", + "Napkelte", + "Восход солнца", + "Wschód słońca", + "", + "Apus", + "Východ slnka", + "日出", + "日の出", + "Схід сонця" + ], + "moonrise": [ + "Moonrise", + "Salida de la luna", + "Lever de la lune", + "Mondaufgang", + "Sorgere della luna", + "", + "Holdkelte", + "Восход луны", + "Wschód księżyca", + "", + "Răsăritul lunii", + "Východ mesiaca", + "月出", + "月の出", + "Схід місяця" + ], + "moonset": [ + "Moonset", + "Puesta de luna", + "Coucher de la lune", + "Monduntergang", + "Tramonto della luna", + "", + "Holdnyugta", + "Закат луны", + "Zachód księżyca", + "", + "Apusul lunii", + "Západ mesiaca", + "月落", + "月の入り", + "Захід місяця" + ], + "amount": [ + "Amount", + "Cantidad", + "Quantité", + "Menge", + "Importo", + "", + "Mennyiség", + "Количество", + "Suma", + "", + "Cantitate", + "Množstvo", + "总量", + "降水量", + "Кількість" + ], + "precipitation_chances": [ + "Precipitation chances", + "Probabilidad de precipitaciones", + "Chances de précipitations", + "Niederschlagswahrscheinlichkeit", + "Possibilità di precipitazioni", + "", + "Csapadék esélye", + "Вероятность осадков", + "Szansa na opady", + "", + "Sanșe de precipitație", + "Pravdepodobnosť zrážok", + "降雨几率", + "降水確率", + "Імовірність опадів" + ], + "precipitation_amount": [ + "Precipitation amount", + "Cantidad de precipitación", + "Quantité de précipitations", + "Niederschlagsmenge", + "Quantità di precipitazioni", + "", + "Csapadék", + "Количество осадков", + "Suma opadów", + "", + "Cantitate de precipitații", + "Množstvo zrážok", + "降水量", + "降水量", + "Кількість опадів" + ], + "wind_gust": [ + "Wind gust", + "Ráfaga de viento", + "Rafale de vent", + "Windböe", + "Raffica di vento", + "", + "Széllökés", + "Порыв ветра", + "Porywy wiatru", + "", + "Rafală de vânt", + "Náraz vetra", + "阵风", + "突風", + "Пориви вітру" + ], + "wind_speed": [ + "Wind speed", + "Velocidad del viento", + "Vitesse du vent", + "Windgeschwindigkeit", + "Velocità del vento", + "", + "Szél", + "Скорость ветра", + "Prędkość wiatru", + "", + "Viteza vântului", + "Rýchlosť vetra", + "风速", + "風速", + "Швидкість вітру" + ], + "live_radar": [ + "Live radar", + "Radar en directo", + "Radar en direct", + "Live Radar", + "Radar in tempo reale", + "", + "Élő radarkép", + "Живой радар", + "Pogoda na żywo", + "", + "Radar în timp real", + "Živý radar", + "即时雷达", + "雨雲レーダー", + "Радар" + ], + "visibility": [ + "Visibility", + "Visibilidad", + "Visibilité", + "Sichtbarkeit", + "Visibilità", + "", + "Látótávolság", + "Видимость", + "Widzialność", + "", + "Vizibilitate", + "Viditeľnosť", + "能见度", + "視認性", + "Видимість" + ], + "minimal_risk": [ + "Minimal risk", + "Riesgo mínimo", + "Risque minimum", + "Geringes Risiko", + "Rischio minimo", + "", + "Minimális kockázat", + "Минимальный риск", + "Znikome ryzyko", + "", + "Risc Minim", + "Minimálne riziko", + "最低风险", + "最小限のリスク", + "Мінімальний ризик" + ], + "low_risk": [ + "Low risk", + "Riesgo bajo", + "Léger risque", + "Niedriges Risiko", + "Basso rischio", + "", + "Alacsony kockázat", + "Низкий риск", + "Niskie ryzyko", + "", + "Risc Scăzut", + "Nízke riziko", + "低风险", + "低リスク", + "Низький ризик" + ], + "moderate_risk": [ + "Moderate risk", + "Riesgo moderado", + "Risque modéré", + "Mäßiges Risiko", + "Rischio moderato", + "", + "Közepes kockázat", + "Умеренный риск", + "Umiarkowane ryzyko", + "", + "Risc Moderat", + "Mierne riziko", + "中等风险", + "中リスク", + "Середній ризик" + ], + "high_risk": [ + "High risk", + "Riesgo alto", + "Risque important", + "Hohes Risiko", + "Alto rischio", + "", + "Magas kockázat", + "Высокий риск", + "Wysokie ryzyko", + "", + "Risc Ridicat", + "Vysoké riziko", + "高风险", + "高リスク", + "Високий ризик" + ], + "very_high_risk": [ + "Very high risk", + "Riesgo muy alto", + "Risque très important", + "Sehr hohes Risiko", + "Rischio molto elevato", + "", + "Nagyon magas kockázat", + "Очень высокий риск", + "Bardzo wysokie ryzyko", + "", + "Risc foarte ridicat", + "Veľmi vysoké riziko", + "很高危险", + "非常に高いリスク", + "Дуже високий ризик" + ], + "extreme_risk": [ + "Extreme risk", + "Riesgo extremo", + "Risque extrême", + "Extrem hohes Risiko", + "Rischio estremo", + "", + "Extrém kockázat", + "Экстремальный риск", + "Ekstremalne ryzyko", + "", + "Risc Extrem", + "Extrémne riziko", + "极度危险", + "極度のリスク", + "Надзвичайний ризик" + ], + "uv_index_satisfactory": [ + "A UV index is satisfactory, indicating that there is little or no risk of harm from ultraviolet radiation.", + "El índice UV es satisfactorio, lo que indica que hay poco o ningún riesgo de daño por radiación ultravioleta.", + "Un index UV satisfaisant, indiquant qu'il y a un léger ou pas de risque de radiation ultraviolet.", + "Der UV-Index ist zufriedenstellend, d. h. es besteht kein oder nur ein geringes Risiko einer Schädigung durch ultraviolette Strahlung.", + "L'indice UV è soddisfacente e indica che il rischio di danni da radiazioni ultraviolette è minimo o nullo.", + "", + "Az UV-szint megfelelő, a káros sugárzás minimális vagy nincs.", + "Ультрафиолетовый индекс - удовлетворительный, что говорит о незначительном или нулевом риске вреда от ультрафиолетового излучения.", + "Indeks UV jest zadowalający, wskazując, że istnieje niewielkie lub żadne ryzyko szkód spowodowanych promieniowaniem ultrafioletowym.", + "", + "Un indice UV este satisfăcător, indicând că există un risc redus sau inexistent de vătămare din cauza radiațiilor ultraviolete.", + "UV index je uspokojivý, čo naznačuje, že existuje malé alebo žiadne riziko poškodenia ultrafialovým žiarením.", + "紫外线指数令人满意,表明来自紫外线辐射的危害风险很小或没有。", + "UV指数は十分で、紫外線による害の危険性はほとんどありません。", + "Індекс УФ-випромінювання задовільний, отже ризик ураження незначний або відсутній." + ], + "conditions_low_risk": [ + "Conditions are generally low-risk, indicating that exposure to ultraviolet radiation poses a minimal threat.", + "Las condiciones suelen ser de bajo riesgo, lo que indica que la exposición a la radiación ultravioleta supone una amenaza mínima.", + "Les conditions sont légères, indiquant qu'une exposition aux radiations aux ultraviolets aura de légères conséquences.", + "Die Bedingungen sind im Allgemeinen risikoarm, was bedeutet, dass die Aussetzung gegenüber ultravioletter Strahlung eine minimale Gefahr darstellt.", + "Le condizioni sono generalmente a basso rischio, il che indica che l'esposizione ai raggi ultravioletti rappresenta una minaccia minima.", + "", + "Az UV-szint alacsony, az ultraibolya sugárzás nem jelent számottevő kockázatot.", + "Как правило, эти заболевания относятся к категории низкого риска, что говорит о том, что воздействие ультрафиолетового излучения представляет минимальную угрозу.", + "Warunki niskiego ryzyka wskazują, że narażenie na promieniowanie ultrafioletowe stanowi minimalne zagrożenie.", + "", + "Condițiile sunt în general cu risc scăzut, ceea ce indică faptul că expunerea la radiațiile ultraviolete reprezintă o amenințare minimă.", + "Podmienky sú vo všeobecnosti nízkorizikové, čo znamená, že vystavenie ultrafialovému žiareniu predstavuje minimálnu hrozbu.", + "情况通常属于低风险,表明暴露于紫外线辐射所构成的威胁极小。", + "一般的にリスクは低く、紫外線を浴びても危険は少ないです。", + "Низький або мінімальний ризик укаження від УФ-випромінювання." + ], + "low_exposure_level": [ + "Low exposure level with minimal risk of harm from UV radiation, suitable for most people.", + "Bajo nivel de exposición con un riesgo mínimo de daños por radiación UV, adecuado para la mayoría de las personas.", + "Niveau d'exposition léger avec risques minimum, acceptable pour la plupart des personnes.", + "Niedriges Expositionsniveau mit minimalem Risiko einer Schädigung durch UV-Strahlung, für die meisten Menschen geeignet.", + "Livello di esposizione basso con rischio minimo di danni da radiazioni UV, adatto alla maggior parte delle persone.", + "", + "Az UV- szint alacsony, a napégés kockázata minimális, a legtöbb ember számára elfogadható.", + "Низкий уровень облучения с минимальным риском вреда от УФ-излучения, подходит для большинства людей.", + "Niski poziom ekspozycji z minimalnym ryzykiem szkód spowodowanych promieniowaniem UV, odpowiedni dla większości ludzi.", + "", + "Nivel scăzut de expunere cu risc minim de vătămare din cauza radiațiilor UV, potrivit pentru majoritatea persoanelor.", + "Nízka úroveň vystavenia s minimálnym rizikom poškodenia UV žiarením, vhodné pre väčšinu ľudí.", + "低暴露水平,紫外线危害风险极小,适合大多数人。", + "紫外線による害のリスクは最小限で、ほとんどの人に害はありません。", + "Є мінімальний ризик ураження від УФ-випромінювання, терпимо для більшості людей." + ], + "moderate_risk_sun_exposure": [ + "Moderate risk of harm from unprotected sun exposure, protective measures recommended.", + "Riesgo moderado de daños por exposición al sol sin protección, se recomiendan medidas de protección.", + "Risque modéré de brûlures causées par une exposition au soleil non protégée, mesures protectrices recommandées.", + "Mäßiges Risiko von Schäden durch ungeschützte Sonneneinstrahlung, Schutzmaßnahmen empfohlen.", + "Rischio moderato di danni da esposizione solare non protetta, si raccomandano misure di protezione.", + "", + "A napégés kockázata közepes, a megelőzés ajánlott.", + "Умеренный риск вреда от незащищенного воздействия солнца, рекомендуются защитные меры.", + "Umiarkowane ryzyko szkód spowodowanych ekspozycją na słońce bez ochrony, zalecane środki ochronne.", + "", + "Risc moderat de vătămare din cauza expunerii neprotejate la soare, se recomandă măsuri de protecție.", + "Mierne riziko poškodenia z nechráneného vystavenia slnku, odporúčajú sa ochranné opatrenia.", + "无防护暴露于阳光下会造成中等程度的伤害,建议采取防护措施。", + "無防備に日光にさらされることによる危害のリスクが少しあり、何かしらの措置を推奨します。", + "Перебування на відкритому сонці без захисту може нанести шкоду, рекомендуються захисні заходи." + ], + "high_risk_sun_exposure": [ + "High risk of harm from unprotected sun exposure, protective measures required.", + "Alto riesgo de daños por exposición al sol sin protección, se requieren medidas de protección.", + "Risque important de brûlures causées par une exposition au soleil non protégée, mesures protectrices requises.", + "Hohes Risiko von Schäden durch ungeschützte Sonneneinstrahlung, Schutzmaßnahmen erforderlich.", + "Alto rischio di danni da esposizione solare non protetta, sono necessarie misure di protezione.", + "", + "A napégés kockázata magas, a megelőzés szükséges.", + "Высокий риск вреда от незащищенного воздействия солнца, требуются защитные меры.", + "Wysokie ryzyko szkód spowodowanych ekspozycją na słońce bez ochrony, wymagane środki ochronne.", + "", + "Risc ridicat de vătămare din cauza expunerii neprotejate la soare, sunt necesare măsuri de protecție.", + "Vysoké riziko poškodenia z nechráneného vystavenia sa slnku, potrebné ochranné opatrenia.", + "无防护暴露在阳光下会造成伤害,风险很高,需要采取防护措施。", + "無防備に日光にさらされることによる危害のリスクが高く、何かしらの措置が必要です。", + "Високий ризик ураження від перебування на сонці, використовуйте захисні засоби." + ], + "very_high_risk_sun_exposure": [ + "Very high risk of harm from unprotected sun exposure, extra precautions required.", + "Riesgo muy elevado de daños por exposición al sol sin protección, se requieren precauciones adicionales.", + "Risque très important de brûlures causées par une exposition au soleil non protégée, précautions supplémentaires requises.", + "Sehr hohes Risiko von Schäden durch ungeschützte Sonneneinstrahlung, zusätzliche Vorsichtsmaßnahmen erforderlich.", + "Rischio molto elevato di danni dovuti all'esposizione al sole non protetta, sono necessarie ulteriori precauzioni.", + "", + "A napégés kockázata nagyon magas, szigorú elővigyázatosság szükséges.", + "Очень высокий риск вреда от незащищенного воздействия солнца, требуются дополнительные меры предосторожности.", + "Bardzo wysokie ryzyko szkód spowodowanych ekspozycją na słońce bez ochrony, wymagane dodatkowe środki ostrożności.", + "", + "Risc foarte ridicat de vătămare din cauza expunerii neprotejate la soare, sunt necesare măsuri de precauție suplimentare.", + "Veľmi vysoké riziko poškodenia v dôsledku nechráneného vystavenia sa slnečnému žiareniu, sú potrebné mimoriadne bezpečnostné opatrenia.", + "无防护地暴露在阳光下会造成伤害的风险非常高,需要采取额外的预防措施。", + "無防備に日光にさらされることによる危害のリスクが非常に高く、特別な措置が必要です。", + "Дуже високий ризик ураження від перебування на сонці, використовуйте додаткові захисні засоби." + ], + "extreme_risk_sun_exposure": [ + "Extreme risk of harm from unprotected sun exposure, full protection necessary.", + "Riesgo extremo de daños por exposición al sol sin protección, es necesaria una protección total.", + "Risque extrême brûlures causées par une exposition au soleil non protégée, protection complète nécessaire.", + "Extremes Risiko von Schäden durch ungeschützte Sonneneinstrahlung, vollständiger Schutz erforderlich.", + "Rischio estremo di danni da esposizione solare non protetta, è necessaria una protezione totale.", + "", + "A napégés kockázata extrém, könnyű, kevés testrészt fedetlenül hagyó ruha viselete szükséges.", + "Крайне высок риск вреда от незащищенного пребывания на солнце, необходима полная защита.", + "Ekstremalne ryzyko szkód spowodowanych ekspozycją na słońce bez ochrony, konieczna pełna ochrona.", + "", + "Risc extrem de mare de vătămare în urma expunerii neprotejate la soare, protecție completă necesară.", + "Extrémne riziko poškodenia z nechráneného vystavenia sa slnku, potrebná úplná ochrana.", + "无防护地暴露在阳光下会造成极大伤害,需要全面防护。", + "無防備に日光にさらされると非常に危険で、完全な措置が必要です。", + "Надзвичайно високий ризик ураження від перебування на сонці, необхідний повний захист." + ], + "air_quality_satisfactory": [ + "Air quality is considered satisfactory, and air pollution poses little or no risk.", + "La calidad del aire se considera satisfactoria y la contaminación atmosférica plantea poco o ningún riesgo.", + "La qualité de l’air est jugée satisfaisante et la pollution atmosphérique pose peu ou pas de risque.", + "Die Luftqualität wird als zufriedenstellend angesehen, und die Luftverschmutzung stellt nur ein geringes oder gar kein Risiko dar.", + "La qualità dell'aria è considerata soddisfacente e l'inquinamento atmosferico presenta rischi minimi o nulli.", + "", + "A levegőminőség kielégítő, a légszennyezettség jelentéktelen.", + "Качество воздуха считается удовлетворительным, а загрязнение воздуха не представляет практически никакого риска.", + "Jakość powietrza zadowalająca, a zanieczyszczenie powietrza stanowi niewielkie lub żadne zagrożenie.", + "", + "Calitatea aerului este considerată satisfăcătoare, iar poluarea aerului reprezintă un risc redus sau inexistent.", + "Kvalita ovzdušia sa považuje za uspokojivú a znečistenie ovzdušia predstavuje malé alebo žiadne riziko.", + "空气质量令人满意,空气污染几乎没有或根本不存在危害。", + "空気の質は十分で、空気による危害のリスクはありません。", + "Якість повітря вважається задовільною, а забруднення повітря становить незначний ризик або взагалі відсутній." + ], + "air_quality_acceptable": [ + "Air quality is acceptable; however, for some pollutants there may be a moderate health concern for a very small number of people who are unusually sensitive to air pollution.", + "La calidad del aire es aceptable; sin embargo, para algunos contaminantes puede haber un problema de salud moderado para un número muy pequeño de personas que son inusualmente sensibles a la contaminación atmosférica.", + "La qualité de l’air est acceptable; toutefois, pour certains polluants, il peut y avoir un problème de santé modéré pour un très petit nombre de personnes qui sont exceptionnellement sensibles à la pollution atmosphérique.", + "Die Luftqualität ist akzeptabel; allerdings können einige Schadstoffe bei einer sehr kleinen Zahl von Menschen, die ungewöhnlich empfindlich auf Luftverschmutzung reagieren, ein mäßiges Gesundheitsrisiko darstellen.", + "La qualità dell'aria è accettabile; tuttavia, per alcuni inquinanti può esserci un moderato problema di salute per un numero molto ristretto di persone insolitamente sensibili all'inquinamento atmosferico.", + "", + "A levegőminőség elfogadható; habár némely szemnyezőanyag közepes egészségügyi kockázatot jelenthet a kölünlegesen érzékeny csoportok számára.", + "Качество воздуха является приемлемым, однако некоторые загрязнители могут вызывать умеренное беспокойство за здоровье очень небольшого числа людей, необычайно чувствительных к загрязнению воздуха.", + "Jakość powietrza jest akceptowalna; jednak w przypadku niektórych zanieczyszczeń mogą występować umiarkowane obawy o zdrowie u bardzo małej liczby osób, które są wyjątkowo wrażliwe na zanieczyszczenie powietrza.", + "", + "Calitatea aerului este acceptabilă; cu toate acestea, pentru unii poluanți poate exista o preocupare moderată privind sănătatea pentru un număr foarte mic de persoane care sunt neobișnuit de sensibile la poluarea aerului.", + "Kvalita vzduchu je prijateľná; pri niektorých znečisťujúcich látkach však môže existovať mierny zdravotný problém u veľmi malého počtu ľudí, ktorí sú nezvyčajne citliví na znečistenie ovzdušia.", + "空气质量可以接受;然而,对于某些污染物,对于极少数对空气污染异常敏感的人来说,可能会造成中等程度的健康问题。", + "空気の質は十分ですが、大気汚染に非常に敏感な人には注意が必要です。", + "Якість повітря є прийнятною, проте деякі забруднювачі можуть викликати занепокоєння у надзвичайно чутливих до забруднення повітря людей." + ], + "sensitive_groups_health_effects": [ + "Member of sensitive groups may experience health effects. The general public is not likely to be affected.", + "Los miembros de grupos sensibles pueden experimentar efectos sobre la salud. No es probable que afecte al público en general.", + "Les membres de groupes sensibles peuvent subir des effets sur la santé. Le grand public n’est pas susceptible d’être touché.", + "Bei Mitgliedern empfindlicher Gruppen können gesundheitliche Auswirkungen auftreten. Die allgemeine Öffentlichkeit wird wahrscheinlich nicht betroffen sein.", + "I membri di gruppi sensibili possono subire effetti sulla salute. È improbabile che il pubblico in generale subisca effetti.", + "", + "Az érzékeny csoportok egészségügyi tüneteket tapasztalhatnak. A legtöbb emberre általában nincs hatással.", + "Представители чувствительных групп могут испытать воздействие на здоровье. На широкую общественность воздействие маловероятно.", + "Członkowie wrażliwych grup mogą odczuwać skutki zdrowotne. Nie jest prawdopodobne, aby miało to wpływ na ogół społeczeństwa.", + "", + "Membrii grupurilor sensibile pot avea efecte asupra sănătății. Populația generală nu este susceptibilă de a fi afectată.", + "Členovia citlivých skupín môžu pociťovať zdravotné účinky. Širokej verejnosti sa to pravdepodobne nedotkne.", + "敏感人群的健康可能会受到影响,普通公众不太可能受到影响。", + "大気汚染に敏感な人は影響が出る可能性がありますが、通常の人にはあまり注意は必要ありません。", + "Чутливі люди можуть відчути вплив на здоров'я. Більшість людей навряд чи відчує який-небудь вплив на собі." + ], + "health_effects_public": [ + "Everyone may begin to experience health effects; member of sensitive groups may experience more serious health effects.", + "Todo el mundo puede empezar a experimentar efectos sobre la salud; los miembros de grupos sensibles pueden experimentar efectos más graves sobre la salud.", + "Tout le monde peut commencer à ressentir des effets sur la santé; les membres de groupes sensibles peuvent éprouver des effets plus graves sur la santé.", + "Bei allen Menschen können erste gesundheitliche Auswirkungen auftreten; bei Angehörigen empfindlicher Gruppen können schwerwiegendere gesundheitliche Auswirkungen auftreten.", + "Tutti possono iniziare a subire effetti sulla salute; i membri di gruppi sensibili possono subire effetti più gravi sulla salute.", + "", + "A legtöbb embernél tünetek jelenhetnek meg; az érzékeny csoportok súlyos tüneteket tapasztalhatnak.", + "Каждый человек может начать испытывать последствия для здоровья; представители чувствительных групп могут испытывать более серьезные последствия для здоровья.", + "Wszyscy mogą zacząć odczuwać skutki zdrowotne; członkowie wrażliwych grup mogą odczuwać poważniejsze skutki zdrowotne.", + "", + "Toată lumea poate începe să aibă efecte asupra sănătății; membrii grupurilor sensibile pot avea efecte mai grave asupra sănătății.", + "Každý môže začať pociťovať účinky na zdravie; člen citlivých skupín môže pociťovať vážnejšie zdravotné účinky.", + "每个人都可能开始受到健康影响;敏感群体的成员可能会受到更严重的健康影响。", + "大気汚染に敏感な人に深刻な影響があるかもしれません。通常の人にも影響が出る可能性があります。", + "Більшість людей може почати відчувати вплив на здоров'я, а більш чутливі люди можуть відчувати більш серйозні наслідки для здоров'я." + ], + "emergency_conditions": [ + "Health warnings of emergency conditions. The entire population is more likely to be affected.", + "Alertas sanitarias de condiciones de emergencia. Es más probable que toda la población se vea afectada.", + "Avertissements sanitaires concernant les situations d’urgence. L’ensemble de la population est plus susceptible d’être touchée.", + "Gesundheitswarnungen vor Notlagen. Die Wahrscheinlichkeit, dass die gesamte Bevölkerung betroffen ist, ist größer.", + "Avvisi sanitari di condizioni di emergenza. L'intera popolazione ha maggiori probabilità di essere colpita.", + "", + "Egészségügyi vészhelyzeti riasztás. A legtöbb ember valószínűleg érintett.", + "Предупреждения о чрезвычайных ситуациях. С большей вероятностью пострадает все население.", + "Ostrzeżenia zdrowotne o stanach zagrożenia. Istnieje większe prawdopodobieństwo, że wpłynie to na całą populację.", + "", + "Avertizări de sănătate privind condițiile de urgență. Este mai probabil ca întreaga populație să fie afectată.", + "Zdravotné varovania pred núdzovými podmienkami. Je pravdepodobnejšie, že bude postihnutá celá populácia.", + "健康警告:紧急状况,全体人群都更有可能受到影响。", + "ほぼすべての人が大気汚染による深刻な影響を受ける可能性があります。", + "Попередження про надзвичайні умови й пагубний вплив на здоров'я усього населення." + ], + "support": [ + "Support", + "Soporte", + "Supportable", + "Unterstützung", + "Supporto", + "", + "Támogatás", + "Поддержка", + "Wsparcie", + "", + "Asistență", + "Podpora", + "支持", + "サポート", + "Підтримка" + ], + "weather_notifications": [ + "Weather notifications", + "Notificaciones meteorológicas", + "Notification de conditions", + "Wetter Benachrichtigungen", + "Notifiche meteo", + "", + "Időjárás értesítés", + "Уведомления о погоде", + "Powiadomienia pogodowe", + "", + "Notificări meteorologice", + "Notifikácie o počasí", + "天气通知", + "天気の通知", + "Сповіщення про погоду" + ], + "home_location": [ + "Home location", + "Ubicación de inicio", + "Emplacement du domicile", + "Heimatort", + "Posizione di casa", + "", + "Otthon megadása", + "Расположение дома", + "Główna lokalizacja", + "", + "Locația de domiciliu", + "Domovská lokalita", + "家庭位置", + "家の場所", + "Домашня адреса" + ], + "save_locations_menu": [ + "You need to save locations to show in the menu", + "Es necesario guardar las ubicaciones para mostrarlas en el menú", + "Vous devez enregistrer cet endroit pour les montrer dans le menu", + "Sie müssen Orte speichern, die im Menü angezeigt werden sollen", + "È necessario salvare le posizioni da visualizzare nel menu", + "", + "Ahhoz, hogy a menüben megjelenjen, helyeket kell elmenteni", + "Вам нужно сохранить местоположения, чтобы они отображались в меню", + "Zapisz lokalizacje do wyświetlenia w menu", + "", + "Trebuie să salvați locațiile pentru a le afișa în meniu", + "Ak chcete zobraziť miesta v ponuke, musíte ich uložiť", + "您需要保存菜单中显示的位置", + "メニューに表示するには地点を登録する必要があります", + "Збережіть місця, щоб вони показувалися в меню" + ], + "temperature_unit": [ + "Temperature Unit", + "Unidad de temperatura", + "Unité de Température", + "Temperatur Einheit", + "Unità di temperatura", + "", + "Hőmérséklet mértékegysége", + "Единица измерения температуры", + "Jednostka temperatury", + "", + "Unitatea de temperatură", + "Jednotka teploty", + "温度单位", + "気温の単位", + "Одиниця температури" + ], + "wind_unit": [ + "Wind Unit", + "Unidad de viento", + "Unité de Vent", + "Wind Einheit", + "Unità vento", + "", + "Szélerősség mértékegysége", + "Единица измерения ветра", + "Jednostka wiatru", + "", + "Unitatea de vânt", + "Jednotka vetra", + "风速单位", + "風速の単位", + "Одиниця вітру" + ], + "visibility_unit": [ + "Visibility Unit", + "Unidad de visibilidad", + "Unité de Visibilité", + "Sichtbarkeit Einheit", + "Unità di visibilità", + "", + "Látóhatár mértékegysége", + "Единица измерения видимости", + "Jednostka widzialności", + "", + "Unitatea de vizibilitate", + "Jednotka viditeľnosti", + "能见度单位", + "視認性の単位", + "Одиниця видимості" + ], + "precipitation_unit": [ + "Precipitation Unit", + "Unidad de Precipitación", + "Unité de Précipitations", + "Niederschlag Einheit", + "Unità di precipitazione", + "", + "Csapadék mértékegysége", + "Единица измерения осадков", + "Jednostka opadów", + "", + "Unitatea de precipitații", + "Jednotka zrážok", + "降水量单位", + "降水量の単位", + "Одиниця опадів" + ], + "pressure_unit": [ + "Pressure Unit", + "Unidad de presión", + "Unité de Pression", + "Druck Einheit", + "Unità di pressione", + "", + "Nyomás mértékegysége", + "Единица измерения давления", + "Jednostka ciśnienia", + "", + "Unitatea de presiune", + "Jednotka tlaku", + "气压单位", + "気圧の単位", + "Одиниця тиску" + ], + "app_language": [ + "App language", + "Idioma", + "Langue de l'application", + "App Sprache", + "Lingua dell'app", + "", + "Alkalmazás nyelve", + "Язык приложения", + "Język aplikacji", + "", + "Limba aplicației", + "Jazyk aplikácie", + "应用程序语言", + "アプリの言語", + "Мова застосунку" + ], + "additional": [ + "Additional", + "Adicional", + "Plus", + "Zusätzlich", + "Ulteriori", + "", + "Továbbiak", + "Дополнительно", + "Dodatkowe", + "", + "Suplimentare", + "Ostatné", + "附加", + "その他", + "Додатково" + ], + "about_weathermaster": [ + "About WeatherMaster", + "Acerca de WeatherMaster", + "A propos de MaîtreMétéo", + "Über WheatherMaster", + "Informazioni su WeatherMaster", + "", + "A WeatherMaster névjegye", + "О WeatherMaster", + "O WeatherMaster", + "", + "Despre WeatherMaster", + "O aplikácii WeatherMaster", + "关于天气大师", + "WeatherMasterについて", + "Про WeatherMaster" + ], + "data_provided_by": [ + "Data provided by", + "Datos proporcionados por", + "Informations provenant de", + "Daten bereitgestellt von", + "Dati forniti da", + "", + "Adatszolgáltató", + "Данные предоставлены", + "Dostawca danych", + "", + "Date furnizate de", + "Údaje poskytlo", + "数据来源", + "データの提供元", + "Погодні дані надають" + ], + "map": [ + "Map", + "Mapa", + "Carte", + "Karte", + "Mappa", + "", + "Térkép", + "Карта", + "Mapy", + "", + "Hartă", + "Mapa", + "地图", + "地図", + "Мапа" + ], + "third_party_licenses": [ + "Third party licenses", + "Licencias de terceros", + "Licences tierces", + "Lizenzen von Dritten", + "Licenze di terze parti", + "", + "Harmadik fél licencei", + "Лицензии третьих сторон", + "Licencje stron trzecich", + "", + "Licențe terță parte", + "Licencie tretích strán", + "第三方许可", + "サードパーティライセンス", + "Ліцензії третіх сторін" + ], + "privacy_policy": [ + "Privacy & Policy", + "Política de privacidad", + "Vie privée & Politique", + "Datenschutz & Politik", + "Privacy e politica", + "", + "Adatvédelmi irányelvek", + "Конфиденциальность и политика", + "Polityka prywatności", + "", + "Politică și Confidențialitate", + "Ochrana osobných údajov a zásady", + "隐私政策", + "プライバシーポリシー", + "Політика конфіденційності" + ], + "terms_conditions": [ + "Terms & Conditions", + "Términos y condiciones", + "Termes & Conditions", + "Bedingungen & Konditionen", + "Termini e condizioni", + "", + "Felhasználási feltételek", + "Условия и положения", + "Warunki użytkowania", + "", + "Termeni și condiții", + "Zmluvné podmienky", + "条款和条件", + "利用規約", + "Загальні положення та умови" + ], + "latest_version": [ + "Latest version", + "Última versión", + "Dernière version", + "Neueste Version", + "Ultima versione", + "", + "Legújabb verzió", + "Последняя версия", + "Najnowsza wersja", + "", + "Ultima Versiune", + "Najnovšia verzia", + "最新版本", + "最新バージョンを確認", + "Остання версія" + ], + "app_version": [ + "App version", + "Versión de la aplicación", + "Version de l’application", + "App Version", + "Versione dell'app", + "", + "Alkalmazás verziója", + "Версия приложения", + "Wersja aplikacji", + "", + "Versiunea Aplicației", + "Verzia aplikácie", + "应用程序版本", + "アプリのバージョン", + "Версія застосунку" + ], + "view_source_code": [ + "View source code", + "Ver código fuente", + "Afficher le code source", + "Quellcode anzeigen", + "Visualizza il codice sorgente", + "", + "Forráskód megtekintése", + "Посмотреть исходный код", + "Zobacz kod źródłowy", + "", + "Vedeți codul sursă", + "Zobraziť zdrojový kód", + "查看源代码", + "ソースコードを見る", + "Переглянути вихідний код" + ], + "forecast": [ + "Forecast", + "Pronóstico", + "Prévision", + "Vorhersage", + "Previsioni", + "", + "Előrejelzés", + "Прогноз", + "Prognoza", + "", + "Prognoză", + "Predpoveď", + "预报", + "予報", + "Прогноз" + ], + "more": [ + "More", + "Mas", + "Plus", + "Mehr", + "Di più", + "", + "Több", + "Подробнее", + "Więcej", + "", + "Mai mult", + "Viac", + "更多", + "もっと", + "Більше" + ], + "todays_amount": [ + "Today's amount", + "Cantidad de hoy", + "Quantité du jour", + "Heutige Menge", + "Importo odierno", + "", + "Napi csapadék", + "Сегодняшнее количество", + "Dzisiejsza suma", + "", + "Cantitatea de azi", + "Dnešné množstvo", + "今日总量", + "今日の降水量", + "Кількість на сьогодні" + ], + "precipitation_hours": [ + "Precipitation hours", + "Horas de precipitación", + "Précipitation par heures", + "Niederschlagsstunden", + "Ore di precipitazione", + "", + "Csapadék időtartama", + "Часы выпадения осадков", + "Godziny opadów", + "", + "Ore de precipitații", + "Doba zrážok", + "降水时数", + "1時間降水量", + "Години опадів" + ], + "next": [ + "Next", + "Siguiente", + "Suivant", + "Nächste", + "Avanti", + "", + "Következő", + "Следующий", + "Następne", + "", + "Următorul", + "Ďalej", + "下一个", + "次", + "Далі" + ], + "cloudiness": [ + "Cloudiness", + "Nubosidad", + "Nébulosité", + "Bewölkung", + "Nuvolosità", + "", + "Felhőzet", + "Облачность", + "Zachmurzenie", + "", + "Nebulozitate", + "Oblačnosť", + "云量", + "曇り具合", + "Хмарність" + ], + "weather_alerts": [ + "Weather alerts", + "Alertas meteorológicas", + "Alertes météo", + "Wetter Warnungen", + "Allerte meteo", + "", + "Időjárási riasztás", + "Предупреждения о погоде", + "Ostrzeżenia pogodowe", + "", + "Alerte meteorologice", + "Upozornenia na počasie", + "天气警报", + "気象警報", + "Попередження про погоду" + ], + "tap_to_see_more": [ + "Tap to see more...", + "Ver más...", + "Appuyez pour voir plus...", + "Tippen Sie, um mehr zu sehen...", + "Toccare per vedere di più...", + "", + "Koppintson a továbbiakhoz", + "Нажмите, чтобы увидеть больше...", + "Zobacz więcej", + "", + "Vedeți detalii...", + "Klepnutím zobrazíte viac...", + "点击查看更多", + "タップしてさらに表示", + "Натисніть, щоб дізнатися більше" + ], + "weather": [ + "Weather", + "Clima", + "Météo", + "Wetter", + "Tempo atmosferico", + "", + "Időjárás", + "Погода", + "Pogoda", + "", + "Vreme", + "Počasie", + "天气", + "天気", + "Погода" + ], + "learn_about_the_app": [ + "Learn about the app", + "Conozca más sobre la aplicación", + "En savoir plus sur l’application", + "Mehr über die App erfahren", + "Scopri di più sull'app", + "", + "Tobb információ az alkalmazásról", + "Узнать о приложении", + "Dowiedz się więcej o aplikacji", + "", + "Aflați despre aplicație", + "Získajte informácie o aplikácii", + "了解该应用", + "このアプリについて", + "Дізнатися більше про застосунок" + ], + "translate_this_app": [ + "Translate this app", + "Traducir esta aplicación", + "Traduire cette application", + "Übersetzen Sie diese App", + "Traduci questa app", + "", + "Az alkalmazás lefordítása", + "Перевести это приложение", + "Przetłumacz tę aplikację", + "", + "Traduceți această aplicație", + "Preložte túto aplikáciu", + "翻译该应用", + "アプリを翻訳する", + "Перекласти застосунок" + ], + "join_POEditor_project_to_help": [ + "Join POEditor project to help", + "Únase al proyecto POEditor para ayudar", + "Rejoignez le projet POEditor pour aider", + "Werden Sie Teil des POEditor-Projekts und helfen Sie mit", + "Unisciti al progetto POEditor per aiutare", + "", + "Csatlakozzon a POEditor projekthez, hogy segíthessen", + "Присоединяйтесь к проекту POEditor, чтобы помочь", + "Dołącz do projektu POEditor, aby pomóc", + "", + "Alăturați-vă proiectului POEditor pentru a ajuta", + "Pripojte sa k projektu POEditor a pomôžte", + "加入 POEditor 项目来帮助我们", + "POEditorのプロジェクトに参加する", + "Приєднуйтеся до POEditor, щоб допомогти" + ], + "notification_bar": [ + "Notification bar", + "Barra de notificaciones", + "Barre de notification", + "Benachrichtigungsleiste", + "Barra delle notifiche", + "", + "Értesítési sáv", + "Панель уведомлений", + "Pasek powiadomień", + "", + "Bara de notificare", + "Notifikačná lišta", + "通知栏", + "エラーが発生しました!", + "Панель сповіщень" + ], + "show_weather_information_in_the_notification_bar": [ + "Show weather information in the notification bar", + "Mostrar información meteorológica en la barra de notificaciones", + "Afficher les informations météorologiques dans la barre de notification", + "Wetterinformationen in der Benachrichtigungsleiste anzeigen", + "Mostra le informazioni meteo nella barra delle notifiche", + "", + "Jelenítse meg az időjárási adatokat az értesítési sávon", + "Показать информацию о погоде на панели уведомлений", + "Pokaż informacje o pogodzie na pasku powiadomień", + "", + "Afișați informații despre vreme în bara de notificări", + "Zobraziť informácie o počasí na paneli upozornení", + "在通知栏中显示天气信息", + "インターネット接続を確認してやり直してください。", + "Показувати інформацію про погоду на панелі сповіщень" + ], + "updated_just_now": [ + "Updated, just now", + "Actualizado, ahora mismo", + "Mise à jour, à l’instant", + "Aktualisiert, gerade eben", + "Aggiornato, proprio ora", + "", + "Éppen most frissítve", + "Обновлено только что", + "Zaktualizowano przed chwilą", + "", + "Actualizat, tocmai acum", + "Aktualizované, práve teraz", + "刚刚更新", + "APIエラーの可能性があります。", + "Щойно оновлено" + ], + "day_length": [ + "day length", + "Duración del día", + "durée du jour", + "Tageslänge", + "lunghezza del giorno", + "", + "Nappali órák", + "продолжительность дня", + "długość dnia", + "", + "lungimea zilei", + "dĺžka dňa", + "昼长", + "日照時間", + "тривалість дня" + ], + "dont_miss_sunrise": [ + "Don't miss the sunrise! It will happen in 40 minutes or less.", + "¡No te pierdas el amanecer! Será en 40 minutos o menos.", + "Ne manquez pas le lever du soleil ! Il se produira dans 40 minutes ou moins.", + "Verpassen Sie nicht den Sonnenaufgang! Er wird in 40 Minuten oder weniger da sein.", + "Non perdetevi l'alba! Accadrà tra 40 minuti o meno.", + "", + "Ne hagyja ki a napkeltét! Legfeljebb 40 percen belül bekövetkezik.", + "Не пропустите восход солнца! Он произойдет через 40 минут или меньше.", + "Nie przegap wschodu słońca! Nastąpi za 40 minut lub mniej.", + "", + "Nu rata răsăritul! Se va întâmpla în 40 de minute sau mai puțin.", + "Nenechajte si ujsť východ slnka! Stane sa to za 40 minút alebo menej.", + "不要错过日出!预计四十分钟。", + "朝日をお見逃しなく!40分以内に昇ります。", + "Не пропустіть світанок! Він настане менш ніж за 40 хвилин" + ], + "dont_miss_sunset": [ + "Don't miss the sunset! It will happen in 40 minutes or less.", + "¡No te pierdas la puesta de sol! Ocurrirá en 40 minutos o menos.", + "Ne manquez pas le coucher du soleil ! Il se produira dans 40 minutes ou moins.", + "Verpassen Sie nicht den Sonnenuntergang! Er findet in 40 Minuten oder weniger statt.", + "Non perdetevi il tramonto! Accadrà tra 40 minuti o meno.", + "", + "Ne hagyja ki a naplementét! Legfeljebb 40 percen belül bekövetkezik.", + "Не пропустите закат! Он произойдет через 40 минут или меньше.", + "Nie przegap zachodu słońca! Nastąpi za 40 minut lub mniej.", + "", + "Nu rata apusul! Se va întâmpla în 40 de minute sau mai puțin.", + "Nenechajte si ujsť západ slnka! Stane sa to za 40 minút alebo menej.", + "不要错过日落!预计四十分钟。", + "夕日をお見逃しなく! 40分以内に沈みます。", + "Не пропустіть захід сонця! Він настане менш ніж за 40 хвилин" + ], + "hourly_precipitation": [ + "Hourly precipitation", + "Precipitación por hora", + "Précipitations par heures", + "Stündlicher Niederschlag", + "Precipitazioni orarie", + "", + "Óránkénti csapadék", + "Почасовые осадки", + "Opady godzinowe", + "", + "Precipitații orare", + "Hodinové zrážky", + "每小时降水量", + "1時間降水量", + "Опади погодинно" + ], + "direction": [ + "Direction", + "Dirección", + "Direction", + "Richtung", + "Direzione", + "", + "Irány", + "Направление", + "Kierunek", + "", + "Direcţie", + "Smer", + "方向", + "方角", + "Напрям" + ], + "calm": [ + "Calm", + "Calma", + "Calme", + "Ruhig", + "Calma", + "", + "Nyugodt", + "Спокойствие", + "Cisza", + "", + "Calm", + "Pokojne", + "静风", + "凪", + "Штиль" + ], + "light_air": [ + "Light air", + "Aire ligero", + "Air léger", + "Leichte Luft", + "Aria leggera", + "", + "Enyhe fuvallat", + "Легкий воздух", + "Lekki wietrzyk", + "", + "Aer ușor", + "Ľahký vzduch", + "轻微风", + "至軽風", + "Тихий вітер" + ], + "light_breeze": [ + "Light breeze", + "Brisa ligera", + "Vent léger", + "Leichte Brise", + "brezza leggera", + "", + "Enyhe szellő", + "Легкий ветерок", + "Lekka bryza", + "", + "Adiere ușoară", + "Ľahký vánok", + "轻风", + "軽風", + "Легкий вітер" + ], + "gentle_breeze": [ + "Gentle breeze", + "Brisa suave", + "Vent doux", + "Sanfte Brise", + "Brezza leggera", + "", + "Enyhe szellő", + "Легкий ветерок", + "Łagodna bryza", + "", + "Adiere blândă", + "Jemný vánok", + "微风", + "軟風", + "Слабкий вітер" + ], + "moderate_breeze": [ + "Moderate breeze", + "Brisa moderada", + "Vent modéré", + "Mäßige Brise", + "Brezza moderata", + "", + "Mérsékelt szellő", + "Умеренный ветер", + "Umiarkowana bryza", + "", + "Adiere moderată", + "Mierny vánok", + "和风", + "和風", + "Помірний вітер" + ], + "fresh_breeze": [ + "Fresh breeze", + "Brisa fresca", + "Vent frais", + "Frische Brise", + "Brezza fresca", + "", + "Friss szellő", + "Свежий ветерок", + "Świeża bryza", + "", + "Adiere proaspătă", + "Svieži vánok", + "清新微风", + "疾風", + "Свіжий вітер" + ], + "strong_breeze": [ + "Strong breeze", + "Fuerte brisa", + "Vent Fort", + "Starke Brise", + "Brezza forte", + "", + "Erős szellő", + "Сильный ветер", + "Silna bryza", + "", + "Adiere puternică", + "Silný vánok", + "强风", + "雄風", + "Сильний вітер" + ], + "high_wind": [ + "High wind", + "Viento fuerte", + "Grand Vent", + "Starker Wind", + "Vento forte", + "", + "Erős szél", + "Сильный ветер", + "Silny wiatr", + "", + "Vânt puternic", + "Silný vietor", + "大风", + "非常に強い風", + "Дуже сильний вітер" + ], + "gale": [ + "Gale", + "Vendaval", + "Coup de vent", + "Sturm", + "Burrasca", + "", + "Szélvihar", + "Гейл", + "Nawałnica", + "", + "Vânt puternic", + "Gale", + "大风", + "強風", + "Буря" + ], + "strong_gale": [ + "Strong gale", + "Fuerte vendaval", + "Fort coup de vent", + "Starker Sturm", + "Forte burrasca", + "", + "Erős szélvihar", + "Сильный штормовой ветер", + "Silna nawałnica", + "", + "Furtună puternică", + "Silná víchrica", + "烈风", + "とても強い風", + "Сильна буря" + ], + "storm": [ + "Storm", + "Tormenta", + "Orage", + "Sturm", + "Tempesta", + "", + "Vihar", + "Шторм", + "Wichura", + "", + "Furtună", + "búrka", + "暴风", + "嵐", + "Шторм" + ], + "violent_storm": [ + "Violent storm", + "Tormenta violenta", + "Violent orage", + "Heftiger Sturm", + "Tempesta violenta", + "", + "Heves vihar", + "Сильный шторм", + "Gwałtowna wichura", + "", + "Furtună violentă", + "Prudká búrka", + "强暴风", + "激しい嵐", + "Буревій" + ], + "hurricane": [ + "Hurricane", + "Huracán", + "Ouragan", + "Hurrikan", + "Uragano", + "", + "Hurrikán", + "Ураган", + "Huragan", + "", + "Uragan", + "Hurikán", + "飓风", + "台風", + "Ураган" + ], + "Warming expected over the next few days.": [ + "Warming expected over the next few days.", + "Se espera calentamiento durante los próximos días.", + "Réchauffement attendu au cours des prochains jours.", + "In den nächsten Tagen wird mit Erwärmung gerechnet.", + "Nei prossimi giorni è previsto un riscaldamento.", + "", + "Felmelegedés várható a következő napokban.", + "В ближайшие дни ожидается потепление.", + "Oczekiwane ocieplenie w ciągu najbliższych kilku dni.", + "", + "Se așteaptă încălzire în următoarele zile.", + "V najbližších dňoch sa očakáva oteplenie.", + "预计未来几天气温将升高。", + "今後数日間は暖かくなるでしょう。", + "У найближчі кілька днів очікуєтсья потепління." + ], + "Temperatures will rise soon, get ready for some heat!": [ + "Temperatures will rise soon, get ready for some heat!", + "Las temperaturas subirán pronto, ¡prepárate para el calor!", + "On dirait qu'il va faire plus chaud cette semaine!", + "Die Temperaturen werden bald steigen, machen Sie sich auf Hitze gefasst!", + "Le temperature saliranno presto, preparatevi al caldo!", + "", + "A hőmérséklet hamarosan emelkedni fog, készüljön a melegre!", + "Температура скоро повысится, приготовьтесь к жаре!", + "Temperatury wkrótce wzrosną, przygotuj się na upały!", + "", + "Temperaturile vor crește în curând, pregătiți-vă pentru puțină căldură!", + "Teploty čoskoro stúpnu, pripravte sa na teplo!", + "气温即将上升,做好迎接炎热的准备吧!", + "気温が上がり始めるので、暑さに気をつけましょう!", + "Незабаром температура підніметься, готуйтеся до спеки!" + ], + "Looks like it's going to get warmer this week.": [ + "Looks like it's going to get warmer this week.", + "Parece que hará más calor esta semana.", + "Il va faire plus chaud cette semaine.", + "Es scheint, als würde es diese Woche wärmer werden.", + "Sembra che questa settimana farà più caldo.", + "", + "Előre láthatóan a hét folyamán melegszik az időjárás.", + "Похоже, на этой неделе станет теплее.", + "Wygląda na to, że w tym tygodniu zrobi się cieplej.", + "", + "Se pare că va deveni mai cald săptămâna asta.", + "Zdá sa, že tento týždeň sa oteplí.", + "看起来这周天气会变暖。", + "今週は暖かくなるようです。", + "Схоже, цього тижня буде тепліше." + ], + "Prepare for warmer weather ahead.": [ + "Prepare for warmer weather ahead.", + "Prepárese para el clima más cálido que se avecina.", + "Préparez-vous pour un temps plus chaud à venir.", + "Bereiten Sie sich auf das bevorstehende wärmere Wetter vor.", + "Preparatevi al clima più caldo che ci aspetta.", + "", + "Felmelegedés várható.", + "Готовьтесь к более теплой погоде.", + "Przygotuj się na cieplejszą pogodę.", + "", + "Pregătiți-vă pentru vremea mai caldă.", + "Pripravte sa na teplejšie počasie.", + "准备好迎接即将到来的温暖天气。", + "暖かい天気に備えましょう。", + "Готуйтеся до потепління попереду." + ], + "Cooling expected over the next few days.": [ + "Cooling expected over the next few days.", + "Se espera enfriamiento durante los próximos días.", + "Refroidissement prévu au cours des prochains jours.", + "In den nächsten Tagen wird mit einer Abkühlung gerechnet.", + "Nei prossimi giorni è previsto un raffreddamento.", + "", + "Lehűlés várható a következő néhány nap folyamán.", + "В ближайшие дни ожидается похолодание.", + "Ochłodzenie spodziewane w ciągu najbliższych kilku dni.", + "", + "Se așteaptă răcire în următoarele zile.", + "V najbližších dňoch sa očakáva ochladenie.", + "预计未来几天气温将下降。", + "今後数日間は冷え込むでしょう。", + "У наступні кілька днів очікується похолодання." + ], + "Temperatures are dropping soon, stay warm!": [ + "Temperatures are dropping soon, stay warm!", + "Las temperaturas bajarán pronto, ¡mantente abrigado!", + "Les températures vont bientôt chuter, restez au chaud!", + "Die Temperaturen fallen bald, bleiben Sie warm!", + "Le temperature scenderanno presto, restate al caldo!", + "", + "A hőmérséklet hamarosan leesik, tartsa magát melegen!", + "Температура скоро понизится, оставайтесь в тепле!", + "Temperatury wkrótce spadną, ubierz się ciepło!", + "", + "Temperaturile scad in curand, stai la cald!", + "Teploty čoskoro klesnú, zostaňte v teple!", + "气温即将下降,注意保暖!", + "これから気温が大きく下がるので、暖かくしましょう。", + "Температура скоро знизиться, не мерзніть!" + ], + "It's going to get cooler in the coming days.": [ + "It's going to get cooler in the coming days.", + "En los próximos días hará más frío.", + "Il va faire plus frais dans les prochains jours.", + "In den nächsten Tagen wird es kühler.", + "Nei prossimi giorni farà più fresco.", + "", + "Lehűlés várható a következő napokban.", + "В ближайшие дни станет прохладнее.", + "W najbliższych dniach będzie coraz chłodniej.", + "", + "O să se răcească în zilele următoare.", + "V najbližších dňoch sa ochladí.", + "未来几天天气将会变凉。", + "これから涼しくなるでしょう。", + "Найближчими днями буде прохолодно." + ], + "Expect a chilly breeze over the next days.": [ + "Expect a chilly breeze over the next days.", + "Se espera una brisa fría durante los próximos días.", + "Attendez-vous à une brise fraîche au cours des prochains jours.", + "In den nächsten Tagen ist mit einer kühlen Brise zu rechnen.", + "Nei prossimi giorni è prevista una brezza fredda.", + "", + "Hűvös szellő várható a követkető napokban.", + "В ближайшие дни ожидается прохладный ветер.", + "Spodziewaj się chłodnej bryzy w ciągu najbliższych dni.", + "", + "Așteptați-vă la o adiere rece în zilele următoare.", + "Počas nasledujúcich dní očakávajte chladný vánok.", + "预计未来几天会有寒风。", + "今後数日間は冷たい風が吹くでしょう。", + "У найближчі дні очікується прохолодний вітер." + ], + "Stable temperatures expected in the next few days.": [ + "Stable temperatures expected in the next few days.", + "Se esperan temperaturas estables en los próximos días.", + "Températures stables prévues pour les prochains jours.", + "In den nächsten Tagen werden stabile Temperaturen erwartet.", + "Nei prossimi giorni sono previste temperature stabili.", + "", + "Stabil hőmérséklet várható a következő néhány nap folyamán.", + "В ближайшие дни ожидается стабильная температура.", + "Stabilna temperatura, stabilna pogoda.", + "", + "Temperaturi stabile așteptate în următoarele zile.", + "V najbližších dňoch sa očakávajú stabilné teploty.", + "预计未来几天气温稳定。", + "今後数日間は気温は安定しているでしょう。", + "У найближчі дні очікується стабільна температура." + ], + "No big temperature changes ahead, steady weather.": [ + "No big temperature changes ahead, steady weather.", + "No se esperan grandes cambios de temperatura y el tiempo será estable.", + "Pas de grands changements de température à l’avenir, temps stable.", + "Keine großen Temperaturschwankungen voraus, stabiles Wetter.", + "Non sono previsti grandi sbalzi di temperatura, tempo stabile.", + "", + "Nincs nagy előre látható változás, stabil az időjárás.", + "Никаких существенных изменений температуры не предвидится, погода стабильная.", + "Bez większych zmian temperatury, stabilna pogoda.", + "", + "Nu există schimbări mari de temperatură în viitor, vreme constantă.", + "Žiadne veľké zmeny teplôt dopredu, stabilné počasie.", + "未来气温无大变化,天气稳定。", + "今後は大きな気温差はなく、安定した天気が続くでしょう。", + "Різких перепадів температури не передбачається." + ], + "Temperatures are holding steady for now.": [ + "Temperatures are holding steady for now.", + "Las temperaturas se mantienen estables por ahora.", + "Les températures sont stables pour l’instant.", + "Die Temperaturen bleiben vorerst stabil.", + "Per ora le temperature sono stabili.", + "", + "Egyelőre stabil a hőmérséklet.", + "На данный момент температура держится стабильной.", + "Na razie temperatury utrzymują się na stałym poziomie.", + "", + "Temperaturile se mențin deocamdată constant.", + "Teploty sa zatiaľ držia na stabilnej úrovni.", + "目前气温保持稳定。", + "今のところ気温は安定しています。", + "Температура поки що тримається стабільно." + ], + "Expect stable weather without much change.": [ + "Expect stable weather without much change.", + "Se espera un clima estable sin muchos cambios.", + "Attendez-vous à un temps stable sans grand changement.", + "Erwarten Sie stabiles Wetter ohne große Veränderungen.", + "Ci si aspetta un meteo stabile, senza grandi cambiamenti.", + "", + "Stabil időjárás, változásokra nem kell számítani.", + "Ожидается стабильная погода без существенных изменений.", + "Spodziewaj się stabilnej pogody bez większych zmian.", + "", + "Așteptați-vă la o vreme stabilă, fără prea multe schimbări.", + "Očakávajte stabilné počasie bez veľkých zmien.", + "预计天气稳定,不会有太大变化。", + "あまり変化のない安定した天気でしょう。", + "Очікується стабільна погода без значних змін." + ], + "❄️ Freezing temperatures! Wear a heavy coat, gloves, a hat, and a scarf to stay warm.": [ + "❄️ Freezing temperatures! Wear a heavy coat, gloves, a hat, and a scarf to stay warm.", + "❄️ ¡Temperaturas gélidas! Use un abrigo grueso, guantes, gorro y bufanda para mantenerse abrigado.", + "❄️ Températures glaciales ! Portez un manteau lourd, des gants, un chapeau et un foulard pour rester au chaud.", + "❄️ Gefriertemperaturen! Tragen Sie einen dicken Mantel, Handschuhe, eine Mütze und einen Schal, um warm zu bleiben.", + "❄️ Temperature gelide! Indossa un cappotto pesante, guanti, un cappello e una sciarpa per stare al caldo.", + "", + "❄️ Fagypont alatti hőmérséklet! Viseljen vastag kabátot, kesztyűt, sapkát és sálat.", + "❄️ Мороз! Наденьте теплое пальто, перчатки, шапку и шарф, чтобы согреться.", + "❄️ Silny mróz. Noś ciepły płaszcz, rękawiczki, czapkę i szalik, aby się ogrzać.", + "", + "❄️ Temperaturi de îngheț! Purtați o haină grea, mănuși, o pălărie și o eșarfă pentru a vă menține cald.", + "❄️ Teploty pod bodom mrazu! Noste ťažký kabát, rukavice, čiapku a šál, aby ste zostali v teple.", + "❄️ 冰冻温度!请穿上厚外套、戴手套、帽子和围巾以保暖。", + "❄️ 氷点下です!とても厚いコート、手袋、帽子やスカーフを着けて暖かくしましょう。", + "❄️ Заморозки! Щоб не заледеніти, одягайте щільне пальто, рукавички, шапку та шарф." + ], + "🧥 Very cold! Wear a thick coat, a hat, and gloves to keep warm.": [ + "🧥 Very cold! Wear a thick coat, a hat, and gloves to keep warm.", + "🧥 ¡Mucho frío! Lleva un abrigo grueso, gorro y guantes para abrigarte.", + "🧥 Très froid ! Portez un manteau épais, un chapeau et des gants pour vous garder au chaud.", + "🧥 Sehr kalt! Tragen Sie einen dicken Mantel, eine Mütze und Handschuhe, um sich warm zu halten.", + "🧥 Fa molto freddo! Indossa un cappotto spesso, un cappello e dei guanti per stare al caldo.", + "", + "🧥 Nagy hideg! Viseljen vastag kabátot, sapkát és kesztyűt.", + "🧥 Очень холодно! Наденьте толстое пальто, шапку и перчатки, чтобы согреться.", + "🧥 Bardzo zimno! Noś gruby płaszcz, czapkę i rękawiczki aby się ogrzać.", + "", + "🧥 Foarte frig! Purtați o haină groasă, o pălărie și mănuși pentru a vă menține cald.", + "🧥 Veľmi chladno! Noste hrubý kabát, čiapku a rukavice, aby ste sa udržali v teple.", + "🧥 非常寒冷!请穿上厚外套、戴帽子和手套以保暖。", + "🧥 とても寒いです!厚いコート、帽子、手袋を着けて暖かくしましょう。", + "🧥 Дуже холодно! Одягайте пальто з підкладом, шапку та рукавички, щоб не замерзнути." + ], + "🧣 Cold weather. A coat and a sweater will keep you comfortable.": [ + "🧣 Cold weather. A coat and a sweater will keep you comfortable.", + "🧣 Hace frío. Un abrigo y un suéter te mantendrán cómoda.", + "🧣 Temps froid. Un manteau et un pull vous garderont à l’aise.", + "🧣 Kaltes Wetter. Ein Mantel und ein Pullover sorgen für Komfort.", + "🧣 Clima freddo. Un cappotto e un maglione ti terranno a tuo agio.", + "", + "🧣 Hideg időjárás. Egy kabát és egy pulóver kényelmesen melegen tartja.", + "🧣 Холодная погода. Пальто и свитер обеспечат вам комфорт.", + "🧣 Mroźna pogoda. Płaszcz i sweter zapewnią ci komfort.", + "", + "🧣 Vreme rece. O haină și un pulover vă vor menține confortabil.", + "🧣 Chladné počasie. Kabát a sveter vám zabezpečia pohodlie.", + "🧣 寒冷的天气,穿一件外套和毛衣会令你感到舒适。", + "🧣 寒いです。適度にコートやセーターを着ましょう。", + "🧣 Доволі холодно. Пальто та светр забезпечать вам комфорт." + ], + "🧥 Cool temperatures. Wear a light jacket and long sleeves.": [ + "🧥 Cool temperatures. Wear a light jacket and long sleeves.", + "🧥 Temperaturas frescas. Llevar chaqueta ligera y mangas largas.", + "🧥 Températures fraîches. Portez une veste légère et des manches longues.", + "🧥 Kühle Temperaturen. Tragen Sie eine leichte Jacke und lange Ärmel.", + "🧥 Temperature fresche. Indossa una giacca leggera e maniche lunghe.", + "", + "🧥 Alacsony hőmérséklet. Viseljen könnyű dzsekit és hosszú ujjút.", + "🧥 Прохладная погода. Наденьте легкую куртку и одежду с длинными рукавами.", + "🧥 Niskie temperatury. Noś kurtkę i długie rękawy.", + "", + "🧥 Temperaturi racoroase. Purtați o jachetă ușoară și mâneci lungi.", + "🧥 Chladné teploty. Noste ľahkú bundu a dlhé rukávy.", + "🧥 凉爽的气温,请穿轻薄夹克和长袖衣物。", + "🧥 涼しいです。薄いジャケットや長袖の服を着ましょう。", + "🧥 Прохолодно. Одягайте легку куртку або вітровку з довгими рукавами." + ], + "🌤️ Mild weather. A light jacket or a sweater should be enough.": [ + "🌤️ Mild weather. A light jacket or a sweater should be enough.", + "🌤️ Clima templado. Una chaqueta ligera o un suéter deberían ser suficientes.", + "🌤️ Temps doux. Une veste légère ou un pull devrait suffire.", + "🌤️ Mildes Wetter. Eine leichte Jacke oder ein Pullover sollten ausreichen.", + "🌤️ Clima mite. Una giacca leggera o un maglione dovrebbero essere sufficienti.", + "", + "🌤️ Enyhe idő. Könnyű dzseki vagy pulóver elegendő.", + "🌤️ Мягкая погода. Легкой куртки или свитера будет достаточно.", + "🌤️ Łagodna pogoda. Lekka kurtka lub sweter powinny wystarczyć.", + "", + "🌤️ Vreme blândă. Un sacou lejer sau un pulover ar trebui să fie suficient.", + "🌤️ Mierne počasie. Mala by stačiť ľahká bunda alebo sveter.", + "🌤️ 温和的天气。穿一件轻薄夹克或毛衣就足够了。", + "🌤️ 穏やかな天気です。薄いジャケットやセーターがあるといいでしょう。", + "🌤️ Мінлива погода. Легкої куртки або светра буде достатньо." + ], + "👕 Warm day. A t-shirt and jeans or pants are suitable.": [ + "👕 Warm day. A t-shirt and jeans or pants are suitable.", + "👕 Día cálido. Una camiseta y unos vaqueros o pantalones son adecuados.", + "👕 Journée chaude. Un t-shirt et un jean ou un pantalon conviennent.", + "👕 Warmer Tag. Ein T-Shirt und Jeans oder Hosen reichen aus.", + "👕 Giornata calda. Sono adatti una maglietta e jeans o pantaloni.", + "", + "👕 Meleg nap. Egy póló és farmer nadrág megfelelő.", + "👕 Теплый день. Подойдет футболка и джинсы или брюки.", + "👕 Ciepły dzień. Odpowiedni będzie t-shirt i dżinsy lub spodnie.", + "", + "👕 Zi caldă. Un tricou și blugi sau pantaloni sunt potrivite.", + "👕 Teplý deň. Vhodné je tričko a džínsy alebo nohavice.", + "👕 暖和的一天,T恤搭配牛仔裤或长裤是合适的。", + "👕 暖かいです。シャツやジーンズが適しています。", + "👕 Досить теплий день. Підійде футболка та джинси або штани." + ], + "☀️ Hot! Opt for a t-shirt and light pants or shorts.": [ + "☀️ Hot! Opt for a t-shirt and light pants or shorts.", + "☀️ ¡Caliente! Opta por una camiseta y unos pantalones o shorts claros.", + "☀️ Chaud ! Optez pour un t-shirt et un pantalon léger ou un short.", + "☀️ Heiß! Entscheiden Sie sich für ein T-Shirt und eine leichte Hose oder Shorts.", + "☀️ Caldo! Opta per una maglietta e pantaloni leggeri o pantaloncini.", + "", + "☀️ Hőség! Viseljen jól szellőző ruhát.", + "☀️ Жарко! Выбирайте футболку и легкие брюки или шорты.", + "☀️ Gorąco! Wybierz t-shirt i lekkie spodnie lub szorty.", + "", + "☀️ Fierbinte! Optează pentru un tricou și pantaloni lejeri sau pantaloni scurți.", + "☀️ Horúce! Rozhodnite sa pre tričko a svetlé nohavice alebo šortky.", + "☀️ 炎热!请选择穿T恤和轻薄长裤或短裤。", + "☀️ 暑いです!なるべく薄手の服を着て、水分補給をしましょう。", + "☀️ Доволі спекотно! Обирайте футболку та легкі штани або шорти." + ], + "🌞 Very hot. Wear light, breathable clothing and stay hydrated.": [ + "🌞 Very hot. Wear light, breathable clothing and stay hydrated.", + "🌞 Mucho calor. Use ropa ligera y transpirable y manténgase hidratado.", + "🌞 Très chaud. Portez des vêtements légers et respirants et restez hydraté.", + "🌞 Sehr heiß. Tragen Sie leichte, atmungsaktive Kleidung und trinken Sie ausreichend.", + "🌞 Molto caldo. Indossa abiti leggeri e traspiranti e mantieniti idratato.", + "", + "🌞 Nagy hőseg. Viseljen könnyű, jól szellőző ruhát, és fogyasszon elegendő folyadékot.", + "🌞 Очень жарко. Носите легкую, дышащую одежду и пейте много воды.", + "🌞 Bardzo gorąco. Nosić lekką, oddychającą odzież, pij wodę.", + "", + "🌞 Foarte cald. Purtați îmbrăcăminte ușoară, respirabilă și rămâneți hidratat.", + "🌞 Veľmi horúce. Noste ľahké, priedušné oblečenie a zostaňte hydratovaní.", + "🌞 非常炎热,请穿着轻薄透气的衣物,并保持水分补充。", + "🌞 とても暑いです。薄手の服を着て、水分補給をしながら安全に過ごしましょう。", + "🌞 Дуже спекотно. Одягайте легкий, дихаючий одяг та пийте достатньо води." + ], + "🔥 Extreme heat! Wear very light clothing, stay hydrated, and avoid direct sun exposure.": [ + "🔥 Extreme heat! Wear very light clothing, stay hydrated, and avoid direct sun exposure.", + "🔥 ¡Calor extremo! Use ropa muy ligera, manténgase hidratado y evite la exposición directa al sol.", + "🔥 Chaleur extrême ! Portez des vêtements très légers, restez hydraté et évitez l’exposition directe au soleil.", + "🔥 Extreme Hitze! Tragen Sie sehr leichte Kleidung, trinken Sie ausreichend und vermeiden Sie direkte Sonneneinstrahlung.", + "🔥 Caldo estremo! Indossa abiti molto leggeri, mantieniti idratato ed evita l'esposizione diretta al sole.", + "", + "🔥 Extrém hőség! Viseljen jól szellőző ruhát, fogyasszon sok vizet és kerülje a közvetlen napsugárzást.", + "🔥 Экстремальная жара! Носите очень легкую одежду, пейте много воды и избегайте прямого воздействия солнца.", + "🔥 Ekstremalny upał! Noś bardzo lekką odzież, pij wodę i unikaj bezpośredniej ekspozycji na słońce.", + "", + "🔥 Căldură extremă! Purtați îmbrăcăminte foarte ușoară, rămâneți hidratat și evitați expunerea directă la soare.", + "🔥Extrémne teplo! Noste veľmi ľahké oblečenie, zostaňte hydratovaní a vyhýbajte sa priamemu slnečnému žiareniu.", + "🔥 极端高温!请穿着非常轻薄的衣物,保持水分补充,并避免直接日晒。", + "🔥 危ない暑さです!薄手の服を着て、直射日光を避けてください!", + "🔥 Екстремальна спека! Носіть дуже легкий одяг, пийте достатньо води та уникайте прямого контакту із сонцем." + ], + "⚠️ Dangerously hot! Wear minimal clothing, stay indoors if possible, and drink plenty of water.": [ + "⚠️ Dangerously hot! Wear minimal clothing, stay indoors if possible, and drink plenty of water.", + "⚠️ ¡Hace un calor peligroso! Use ropa mínima, permanezca en el interior si es posible y beba mucha agua.", + "⚠️ Dangereusement chaud ! Portez le minimum de vêtements, restez à l’intérieur si possible et buvez beaucoup d’eau.", + "⚠️ Gefährlich heiß! Tragen Sie nur minimale Kleidung, bleiben Sie wenn möglich drinnen und trinken Sie viel Wasser.", + "⚠️ Pericolosamente caldo! Indossate indumenti minimi, restate in casa se possibile e bevete molta acqua.", + "", + "⚠️ Veszélyes forróság! Viseljen jól szellőző ruhát, amennyiben lehetséges, maradjon árnyékban és fogyasszon sok vizet.", + "⚠️ Опасно жарко! Надевайте минимум одежды, по возможности оставайтесь в помещении и пейте много воды.", + "⚠️ Niebezpiecznie gorąco! Nosić minimalną odzież, zostań w domu, jeśli to możliwe, i pij dużo wody.", + "", + "⚠️ Periculos de cald! Purtați haine minime, rămâneți în casă dacă este posibil și beți multă apă.", + "⚠️ Nebezpečne horúco! Noste minimálne oblečenie, zostaňte vo vnútri, ak je to možné, a pite veľa vody.", + "⚠️ 极度高温危险!请穿着轻薄衣物,尽可能待在室内,并多喝水。", + "⚠️ 非常に暑いです!薄手の服を着て、可能な限り室内で水分補給をしながら安全に過ごしましょう。", + "⚠️ Небезпечно спекотно! Одягайте мінімум одягу, за можливості залишайтеся в приміщенні й пийте багато води." + ], + "🚨 Extreme heat alert! Wear minimal clothing, stay indoors, and drink plenty of water to stay safe.": [ + "🚨 Extreme heat alert! Wear minimal clothing, stay indoors, and drink plenty of water to stay safe.", + "🚨 ¡Alerta de calor extremo! Use ropa mínima, permanezca en el interior y beba mucha agua para mantenerse a salvo.", + "🚨 Alerte chaleur extrême ! Portez le minimum de vêtements, restez à l’intérieur et buvez beaucoup d’eau pour rester en sécurité.", + "🚨 Warnung vor extremer Hitze! Tragen Sie nur minimale Kleidung, bleiben Sie drinnen und trinken Sie viel Wasser, um sicher zu sein.", + "🚨 Allerta caldo estremo! Indossate indumenti minimi, restate in casa e bevete molta acqua per restare al sicuro.", + "", + "🚨Extrém hőségriadó! Viseljen jól szellőző ruhát, maradjon árnyékban és fogyasszon sok vizet.", + "🚨 Внимание, экстремальная жара! Надевайте минимум одежды, оставайтесь в помещении и пейте много воды, чтобы оставаться в безопасности.", + "🚨 Alarm ekstremalny upał! Noś minimalną odzież, pozostań w domu i pij dużo wody, aby zachować bezpieczeństwo.", + "", + "🚨 Alertă de căldură extremă! Purtați haine minime, rămâneți în casă și beți multă apă pentru a rămâne în siguranță.", + "🚨 Upozornenie na extrémne horúčavy! Noste minimálne oblečenie, zostaňte vnútri a pite veľa vody, aby ste zostali v bezpečí.", + "🚨 极端高温警告!请穿着轻薄衣物,尽量待在室内,并多喝水以确保安全。", + "🚨 とても暑いです!薄手の服を着て、なるべく室内で水分補給をしながら安全に過ごしましょう。", + "🚨 Екстремальна спека! Одягайте мінімум одягу, залишайтеся в приміщенні та пийте багато води." + ], + "current_location": [ + "Current location", + "Ubicación actual", + "Emplacement actuel", + "Aktueller Standort", + "Posizione attuale", + "", + "Jelenlegi hely", + "Текущее местоположение", + "Bieżąca lokalizacja", + "", + "Locația actuală", + "Aktuálna poloha", + "当前位置", + "現在の地点", + "Поточне місцезнаходження" + ], + "main_temp": [ + "Main temperature", + "Temperatura principal", + "Température principal", + "Aktueller Standort", + "Temperatura principale", + "", + "Átlag hőmérséklet", + "Основная температура", + "Temperatura", + "", + "Temperatura principală", + "Hlavná teplota", + "主要温度", + "温度", + "Основна температура" + ], + "pick_a_location": [ + "Pick a location", + "Elija una ubicación", + "Sélectionnez un emplacement", + "Wählen Sie einen Standort", + "Scegli una posizione", + "", + "Válasszon egy helyet", + "Выберите место", + "Wybierz lokalizację", + "", + "Alegeți o locație", + "Vyberte miesto", + "选择一个位置", + "地点を選択", + "Вибрати місце" + ], + "Error occurred!": [ + "Error occurred!", + "¡Error ocurrido!", + "Une erreur est survenue!", + "Ein Fehler ist aufgetreten!", + "Si è verificato un errore!", + "", + "Hiba történt!", + "Произошла ошибка!", + "Wystąpił błąd!", + "", + "A apărut o eroare!", + "Vyskytla sa chyba!", + "出错啦!", + "エラーが発生しました!", + "Виникла помилка!" + ], + "Check your internet connection and try again.": [ + "Check your internet connection and try again.", + "Comprueba tu conexión a Internet y vuelve a intentarlo.", + "Vérifiez votre connexion internet et réessayez.", + "Überprüfen Sie Ihre Internetverbindung und versuchen Sie es erneut.", + "Controlla la tua connessione Internet e riprova.", + "", + "Ellenőrize az internetkapcsolatot és próbálja újra.", + "Проверьте подключение к Интернету и повторите попытку.", + "Sprawdź połączenie internetowe i spróbuj ponownie.", + "", + "Verificați-vă conexiunea la internet și încercați din nou.", + "Skontrolujte svoje internetové pripojenie a skúste to znova.", + "检查您的互联网连接并重试。", + "インターネット接続を確認してやり直してください。", + "Перевірте Ваше інтернет-з'єднання і спробуйте знову" + ], + "There might be an API error.": [ + "There might be an API error.", + "Podría haber un error de API.", + "Il pourrait y avoir une erreur d'API.", + "Möglicherweise liegt ein API-Fehler vor.", + "Potrebbe esserci un errore API.", + "", + "API hiba történt.", + "Возможно, произошла ошибка API.", + "Wystąpił błąd API.", + "", + "Este posibil să existe o eroare API.", + "Môže sa vyskytnúť chyba rozhrania API.", + "可能存在 API 错误。", + "APIエラーの可能性があります。", + "Можливо, сталася API-помилка" + ], + "time_format": [ + "Time format", + "Formato de hora", + "Format de l'heure", + "Zeitformat", + "Formato dell'ora", + "Formato de hora", + "Időformátum", + "Формат времени", + "Format czasu", + "Μορφή ώρας", + "Format de timp", + "Formát času", + "时间格式", + "時刻形式", + "Формат часу" + ], + "daily_conditions": [ + "Daily conditions", + "Condiciones diarias", + "Conditions quotidiennes", + "Tägliche Bedingungen", + "Condizioni giornaliere", + "Condições diárias", + "Napi feltételek", + "Ежедневные условия", + "Warunki codzienne", + "Καθημερινές συνθήκες", + "Condiții zilnice", + "Denné podmienky", + "日常状况", + "日々の状況", + "Щоденні умови" + ], + "Background card animation": [ + "Background card animation", + "Animaciones de tarjetas de fondo", + "Animations de cartes d'arrière-plan", + "Hintergrundkartenanimation", + "Animazione della carta di sfondo", + "Animação de cartão de fundo", + "Háttérkártya animáció", + "Анимация фоновой карты", + "Animacja tła karty", + "Κινούμενα σχέδια καρτών φόντου", + "Animație de fundal de card", + "Animácia karty na pozadí", + "背景卡片动画", + "背景カードアニメーション", + "Анімація фонової картки" + ], +}; + + +// maping + +const langMap = { + 'en': 0, + 'es': 1, + 'fr': 2, + 'de': 3, + 'it': 4, + 'pt': 5, + 'hu': 6, + 'ru': 7, + 'pl': 8, + 'el': 9, + 'ro': 10, + 'sk': 11, + 'zh-Hans': 12, + 'ja': 13, + 'uk': 14, + +}; + +function getTranslationByLang(langCode, key) { + const index = langMap[langCode]; + const translationArray = translations[key]; + + if (translationArray && index !== undefined && index < translationArray.length) { + const translation = translationArray[index]; + if (translation && translation.trim() !== "") { + return translation; + } + } + + return translationArray ? translationArray[0] : ''; +} + +function applyTranslations(langCode) { + const elementsToTranslate = document.querySelectorAll('[data-translate]'); + elementsToTranslate.forEach(el => { + const translationKey = el.getAttribute('data-translate'); + el.textContent = getTranslationByLang(langCode, translationKey); + }); +} diff --git a/app/src/main/assets/map/images/layers-2x.png b/app/src/main/assets/map/images/layers-2x.png new file mode 100644 index 000000000..200c333dc Binary files /dev/null and b/app/src/main/assets/map/images/layers-2x.png differ diff --git a/app/src/main/assets/map/images/layers.png b/app/src/main/assets/map/images/layers.png new file mode 100644 index 000000000..1a72e5784 Binary files /dev/null and b/app/src/main/assets/map/images/layers.png differ diff --git a/app/src/main/assets/map/images/leaflet.css b/app/src/main/assets/map/images/leaflet.css new file mode 100644 index 000000000..1fec55640 --- /dev/null +++ b/app/src/main/assets/map/images/leaflet.css @@ -0,0 +1,661 @@ +/* required styles */ + +.leaflet-pane, +.leaflet-tile, +.leaflet-marker-icon, +.leaflet-marker-shadow, +.leaflet-tile-container, +.leaflet-pane > svg, +.leaflet-pane > canvas, +.leaflet-zoom-box, +.leaflet-image-layer, +.leaflet-layer { + position: absolute; + left: 0; + top: 0; + } +.leaflet-container { + overflow: hidden; + } +.leaflet-tile, +.leaflet-marker-icon, +.leaflet-marker-shadow { + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + -webkit-user-drag: none; + } +/* Prevents IE11 from highlighting tiles in blue */ +.leaflet-tile::selection { + background: transparent; +} +/* Safari renders non-retina tile on retina better with this, but Chrome is worse */ +.leaflet-safari .leaflet-tile { + image-rendering: -webkit-optimize-contrast; + } +/* hack that prevents hw layers "stretching" when loading new tiles */ +.leaflet-safari .leaflet-tile-container { + width: 1600px; + height: 1600px; + -webkit-transform-origin: 0 0; + } +.leaflet-marker-icon, +.leaflet-marker-shadow { + display: block; + } +/* .leaflet-container svg: reset svg max-width decleration shipped in Joomla! (joomla.org) 3.x */ +/* .leaflet-container img: map is broken in FF if you have max-width: 100% on tiles */ +.leaflet-container .leaflet-overlay-pane svg { + max-width: none !important; + max-height: none !important; + } +.leaflet-container .leaflet-marker-pane img, +.leaflet-container .leaflet-shadow-pane img, +.leaflet-container .leaflet-tile-pane img, +.leaflet-container img.leaflet-image-layer, +.leaflet-container .leaflet-tile { + max-width: none !important; + max-height: none !important; + width: auto; + padding: 0; + } + +.leaflet-container img.leaflet-tile { + /* See: https://bugs.chromium.org/p/chromium/issues/detail?id=600120 */ + mix-blend-mode: plus-lighter; +} + +.leaflet-container.leaflet-touch-zoom { + -ms-touch-action: pan-x pan-y; + touch-action: pan-x pan-y; + } +.leaflet-container.leaflet-touch-drag { + -ms-touch-action: pinch-zoom; + /* Fallback for FF which doesn't support pinch-zoom */ + touch-action: none; + touch-action: pinch-zoom; +} +.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom { + -ms-touch-action: none; + touch-action: none; +} +.leaflet-container { + -webkit-tap-highlight-color: transparent; +} +.leaflet-container a { + -webkit-tap-highlight-color: rgba(51, 181, 229, 0.4); +} +.leaflet-tile { + filter: inherit; + visibility: hidden; + } +.leaflet-tile-loaded { + visibility: inherit; + } +.leaflet-zoom-box { + width: 0; + height: 0; + -moz-box-sizing: border-box; + box-sizing: border-box; + z-index: 800; + } +/* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */ +.leaflet-overlay-pane svg { + -moz-user-select: none; + } + +.leaflet-pane { z-index: 400; } + +.leaflet-tile-pane { z-index: 200; } +.leaflet-overlay-pane { z-index: 400; } +.leaflet-shadow-pane { z-index: 500; } +.leaflet-marker-pane { z-index: 600; } +.leaflet-tooltip-pane { z-index: 650; } +.leaflet-popup-pane { z-index: 700; } + +.leaflet-map-pane canvas { z-index: 100; } +.leaflet-map-pane svg { z-index: 200; } + +.leaflet-vml-shape { + width: 1px; + height: 1px; + } +.lvml { + behavior: url(#default#VML); + display: inline-block; + position: absolute; + } + + +/* control positioning */ + +.leaflet-control { + position: relative; + z-index: 800; + pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */ + pointer-events: auto; + } +.leaflet-top, +.leaflet-bottom { + position: absolute; + z-index: 1000; + pointer-events: none; + } +.leaflet-top { + top: 0; + } +.leaflet-right { + right: 0; + } +.leaflet-bottom { + bottom: 0; + } +.leaflet-left { + left: 0; + } +.leaflet-control { + float: left; + clear: both; + } +.leaflet-right .leaflet-control { + float: right; + } +.leaflet-top .leaflet-control { + margin-top: 10px; + } +.leaflet-bottom .leaflet-control { + margin-bottom: 10px; + } +.leaflet-left .leaflet-control { + margin-left: 10px; + } +.leaflet-right .leaflet-control { + margin-right: 10px; + } + + +/* zoom and fade animations */ + +.leaflet-fade-anim .leaflet-popup { + opacity: 0; + -webkit-transition: opacity 0.2s linear; + -moz-transition: opacity 0.2s linear; + transition: opacity 0.2s linear; + } +.leaflet-fade-anim .leaflet-map-pane .leaflet-popup { + opacity: 1; + } +.leaflet-zoom-animated { + -webkit-transform-origin: 0 0; + -ms-transform-origin: 0 0; + transform-origin: 0 0; + } +svg.leaflet-zoom-animated { + will-change: transform; +} + +.leaflet-zoom-anim .leaflet-zoom-animated { + -webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1); + -moz-transition: -moz-transform 0.25s cubic-bezier(0,0,0.25,1); + transition: transform 0.25s cubic-bezier(0,0,0.25,1); + } +.leaflet-zoom-anim .leaflet-tile, +.leaflet-pan-anim .leaflet-tile { + -webkit-transition: none; + -moz-transition: none; + transition: none; + } + +.leaflet-zoom-anim .leaflet-zoom-hide { + visibility: hidden; + } + + +/* cursors */ + +.leaflet-interactive { + cursor: pointer; + } +.leaflet-grab { + cursor: -webkit-grab; + cursor: -moz-grab; + cursor: grab; + } +.leaflet-crosshair, +.leaflet-crosshair .leaflet-interactive { + cursor: crosshair; + } +.leaflet-popup-pane, +.leaflet-control { + cursor: auto; + } +.leaflet-dragging .leaflet-grab, +.leaflet-dragging .leaflet-grab .leaflet-interactive, +.leaflet-dragging .leaflet-marker-draggable { + cursor: move; + cursor: -webkit-grabbing; + cursor: -moz-grabbing; + cursor: grabbing; + } + +/* marker & overlays interactivity */ +.leaflet-marker-icon, +.leaflet-marker-shadow, +.leaflet-image-layer, +.leaflet-pane > svg path, +.leaflet-tile-container { + pointer-events: none; + } + +.leaflet-marker-icon.leaflet-interactive, +.leaflet-image-layer.leaflet-interactive, +.leaflet-pane > svg path.leaflet-interactive, +svg.leaflet-image-layer.leaflet-interactive path { + pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */ + pointer-events: auto; + } + +/* visual tweaks */ + +.leaflet-container { + background: #ddd; + outline-offset: 1px; + } +.leaflet-container a { + color: #0078A8; + } +.leaflet-zoom-box { + border: 2px dotted #38f; + background: rgba(255,255,255,0.5); + } + + +/* general typography */ +.leaflet-container { + font-family: "Helvetica Neue", Arial, Helvetica, sans-serif; + font-size: 12px; + font-size: 0.75rem; + line-height: 1.5; + } + + +/* general toolbar styles */ + +.leaflet-bar { + box-shadow: 0 1px 5px rgba(0,0,0,0.65); + border-radius: 4px; + } +.leaflet-bar a { + background-color: #fff; + border-bottom: 1px solid #ccc; + width: 26px; + height: 26px; + line-height: 26px; + display: block; + text-align: center; + text-decoration: none; + color: black; + } +.leaflet-bar a, +.leaflet-control-layers-toggle { + background-position: 50% 50%; + background-repeat: no-repeat; + display: block; + } +.leaflet-bar a:hover, +.leaflet-bar a:focus { + background-color: #f4f4f4; + } +.leaflet-bar a:first-child { + border-top-left-radius: 4px; + border-top-right-radius: 4px; + } +.leaflet-bar a:last-child { + border-bottom-left-radius: 4px; + border-bottom-right-radius: 4px; + border-bottom: none; + } +.leaflet-bar a.leaflet-disabled { + cursor: default; + background-color: #f4f4f4; + color: #bbb; + } + +.leaflet-touch .leaflet-bar a { + width: 30px; + height: 30px; + line-height: 30px; + } +.leaflet-touch .leaflet-bar a:first-child { + border-top-left-radius: 2px; + border-top-right-radius: 2px; + } +.leaflet-touch .leaflet-bar a:last-child { + border-bottom-left-radius: 2px; + border-bottom-right-radius: 2px; + } + +/* zoom control */ + +.leaflet-control-zoom-in, +.leaflet-control-zoom-out { + font: bold 18px 'Lucida Console', Monaco, monospace; + text-indent: 1px; + } + +.leaflet-touch .leaflet-control-zoom-in, .leaflet-touch .leaflet-control-zoom-out { + font-size: 22px; + } + + +/* layers control */ + +.leaflet-control-layers { + box-shadow: 0 1px 5px rgba(0,0,0,0.4); + background: #fff; + border-radius: 5px; + } +.leaflet-control-layers-toggle { + background-image: url(layers.png); + width: 36px; + height: 36px; + } +.leaflet-retina .leaflet-control-layers-toggle { + background-image: url(layers-2x.png); + background-size: 26px 26px; + } +.leaflet-touch .leaflet-control-layers-toggle { + width: 44px; + height: 44px; + } +.leaflet-control-layers .leaflet-control-layers-list, +.leaflet-control-layers-expanded .leaflet-control-layers-toggle { + display: none; + } +.leaflet-control-layers-expanded .leaflet-control-layers-list { + display: block; + position: relative; + } +.leaflet-control-layers-expanded { + padding: 6px 10px 6px 6px; + color: #333; + background: #fff; + } +.leaflet-control-layers-scrollbar { + overflow-y: scroll; + overflow-x: hidden; + padding-right: 5px; + } +.leaflet-control-layers-selector { + margin-top: 2px; + position: relative; + top: 1px; + } +.leaflet-control-layers label { + display: block; + font-size: 13px; + font-size: 1.08333em; + } +.leaflet-control-layers-separator { + height: 0; + border-top: 1px solid #ddd; + margin: 5px -10px 5px -6px; + } + +/* Default icon URLs */ +.leaflet-default-icon-path { /* used only in path-guessing heuristic, see L.Icon.Default */ + background-image: url(marker-icon.png); + } + + +/* attribution and scale controls */ + +.leaflet-container .leaflet-control-attribution { + background: #fff; + background: rgba(255, 255, 255, 0.8); + margin: 0; + } +.leaflet-control-attribution, +.leaflet-control-scale-line { + padding: 0 5px; + color: #333; + line-height: 1.4; + } +.leaflet-control-attribution a { + text-decoration: none; + } +.leaflet-control-attribution a:hover, +.leaflet-control-attribution a:focus { + text-decoration: underline; + } +.leaflet-attribution-flag { + display: inline !important; + vertical-align: baseline !important; + width: 1em; + height: 0.6669em; + } +.leaflet-left .leaflet-control-scale { + margin-left: 5px; + } +.leaflet-bottom .leaflet-control-scale { + margin-bottom: 5px; + } +.leaflet-control-scale-line { + border: 2px solid #777; + border-top: none; + line-height: 1.1; + padding: 2px 5px 1px; + white-space: nowrap; + -moz-box-sizing: border-box; + box-sizing: border-box; + background: rgba(255, 255, 255, 0.8); + text-shadow: 1px 1px #fff; + } +.leaflet-control-scale-line:not(:first-child) { + border-top: 2px solid #777; + border-bottom: none; + margin-top: -2px; + } +.leaflet-control-scale-line:not(:first-child):not(:last-child) { + border-bottom: 2px solid #777; + } + +.leaflet-touch .leaflet-control-attribution, +.leaflet-touch .leaflet-control-layers, +.leaflet-touch .leaflet-bar { + box-shadow: none; + } +.leaflet-touch .leaflet-control-layers, +.leaflet-touch .leaflet-bar { + border: 2px solid rgba(0,0,0,0.2); + background-clip: padding-box; + } + + +/* popup */ + +.leaflet-popup { + position: absolute; + text-align: center; + margin-bottom: 20px; + } +.leaflet-popup-content-wrapper { + padding: 1px; + text-align: left; + border-radius: 12px; + } +.leaflet-popup-content { + margin: 13px 24px 13px 20px; + line-height: 1.3; + font-size: 13px; + font-size: 1.08333em; + min-height: 1px; + } +.leaflet-popup-content p { + margin: 17px 0; + margin: 1.3em 0; + } +.leaflet-popup-tip-container { + width: 40px; + height: 20px; + position: absolute; + left: 50%; + margin-top: -1px; + margin-left: -20px; + overflow: hidden; + pointer-events: none; + } +.leaflet-popup-tip { + width: 17px; + height: 17px; + padding: 1px; + + margin: -10px auto 0; + pointer-events: auto; + + -webkit-transform: rotate(45deg); + -moz-transform: rotate(45deg); + -ms-transform: rotate(45deg); + transform: rotate(45deg); + } +.leaflet-popup-content-wrapper, +.leaflet-popup-tip { + background: white; + color: #333; + box-shadow: 0 3px 14px rgba(0,0,0,0.4); + } +.leaflet-container a.leaflet-popup-close-button { + position: absolute; + top: 0; + right: 0; + border: none; + text-align: center; + width: 24px; + height: 24px; + font: 16px/24px Tahoma, Verdana, sans-serif; + color: #757575; + text-decoration: none; + background: transparent; + } +.leaflet-container a.leaflet-popup-close-button:hover, +.leaflet-container a.leaflet-popup-close-button:focus { + color: #585858; + } +.leaflet-popup-scrolled { + overflow: auto; + } + +.leaflet-oldie .leaflet-popup-content-wrapper { + -ms-zoom: 1; + } +.leaflet-oldie .leaflet-popup-tip { + width: 24px; + margin: 0 auto; + + -ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)"; + filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678); + } + +.leaflet-oldie .leaflet-control-zoom, +.leaflet-oldie .leaflet-control-layers, +.leaflet-oldie .leaflet-popup-content-wrapper, +.leaflet-oldie .leaflet-popup-tip { + border: 1px solid #999; + } + + +/* div icon */ + +.leaflet-div-icon { + background: #fff; + border: 1px solid #666; + } + + +/* Tooltip */ +/* Base styles for the element that has a tooltip */ +.leaflet-tooltip { + position: absolute; + padding: 6px; + background-color: #fff; + border: 1px solid #fff; + border-radius: 3px; + color: #222; + white-space: nowrap; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + pointer-events: none; + box-shadow: 0 1px 3px rgba(0,0,0,0.4); + } +.leaflet-tooltip.leaflet-interactive { + cursor: pointer; + pointer-events: auto; + } +.leaflet-tooltip-top:before, +.leaflet-tooltip-bottom:before, +.leaflet-tooltip-left:before, +.leaflet-tooltip-right:before { + position: absolute; + pointer-events: none; + border: 6px solid transparent; + background: transparent; + content: ""; + } + +/* Directions */ + +.leaflet-tooltip-bottom { + margin-top: 6px; +} +.leaflet-tooltip-top { + margin-top: -6px; +} +.leaflet-tooltip-bottom:before, +.leaflet-tooltip-top:before { + left: 50%; + margin-left: -6px; + } +.leaflet-tooltip-top:before { + bottom: 0; + margin-bottom: -12px; + border-top-color: #fff; + } +.leaflet-tooltip-bottom:before { + top: 0; + margin-top: -12px; + margin-left: -6px; + border-bottom-color: #fff; + } +.leaflet-tooltip-left { + margin-left: -6px; +} +.leaflet-tooltip-right { + margin-left: 6px; +} +.leaflet-tooltip-left:before, +.leaflet-tooltip-right:before { + top: 50%; + margin-top: -6px; + } +.leaflet-tooltip-left:before { + right: 0; + margin-right: -12px; + border-left-color: #fff; + } +.leaflet-tooltip-right:before { + left: 0; + margin-left: -12px; + border-right-color: #fff; + } + +/* Printing */ + +@media print { + /* Prevent printers from removing background-images of controls. */ + .leaflet-control { + -webkit-print-color-adjust: exact; + print-color-adjust: exact; + } + } diff --git a/app/src/main/assets/map/images/marker-icon-2x.png b/app/src/main/assets/map/images/marker-icon-2x.png new file mode 100644 index 000000000..88f9e5018 Binary files /dev/null and b/app/src/main/assets/map/images/marker-icon-2x.png differ diff --git a/app/src/main/assets/map/images/marker-icon.png b/app/src/main/assets/map/images/marker-icon.png new file mode 100644 index 000000000..950edf246 Binary files /dev/null and b/app/src/main/assets/map/images/marker-icon.png differ diff --git a/app/src/main/assets/map/images/marker-shadow.png b/app/src/main/assets/map/images/marker-shadow.png new file mode 100644 index 000000000..9fd297953 Binary files /dev/null and b/app/src/main/assets/map/images/marker-shadow.png differ diff --git a/app/src/main/assets/map/leaflet.css b/app/src/main/assets/map/leaflet.css new file mode 100644 index 000000000..9ade8dc49 --- /dev/null +++ b/app/src/main/assets/map/leaflet.css @@ -0,0 +1,661 @@ +/* required styles */ + +.leaflet-pane, +.leaflet-tile, +.leaflet-marker-icon, +.leaflet-marker-shadow, +.leaflet-tile-container, +.leaflet-pane > svg, +.leaflet-pane > canvas, +.leaflet-zoom-box, +.leaflet-image-layer, +.leaflet-layer { + position: absolute; + left: 0; + top: 0; + } +.leaflet-container { + overflow: hidden; + } +.leaflet-tile, +.leaflet-marker-icon, +.leaflet-marker-shadow { + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + -webkit-user-drag: none; + } +/* Prevents IE11 from highlighting tiles in blue */ +.leaflet-tile::selection { + background: transparent; +} +/* Safari renders non-retina tile on retina better with this, but Chrome is worse */ +.leaflet-safari .leaflet-tile { + image-rendering: -webkit-optimize-contrast; + } +/* hack that prevents hw layers "stretching" when loading new tiles */ +.leaflet-safari .leaflet-tile-container { + width: 1600px; + height: 1600px; + -webkit-transform-origin: 0 0; + } +.leaflet-marker-icon, +.leaflet-marker-shadow { + display: block; + } +/* .leaflet-container svg: reset svg max-width decleration shipped in Joomla! (joomla.org) 3.x */ +/* .leaflet-container img: map is broken in FF if you have max-width: 100% on tiles */ +.leaflet-container .leaflet-overlay-pane svg { + max-width: none !important; + max-height: none !important; + } +.leaflet-container .leaflet-marker-pane img, +.leaflet-container .leaflet-shadow-pane img, +.leaflet-container .leaflet-tile-pane img, +.leaflet-container img.leaflet-image-layer, +.leaflet-container .leaflet-tile { + max-width: none !important; + max-height: none !important; + width: auto; + padding: 0; + } + +.leaflet-container img.leaflet-tile { + /* See: https://bugs.chromium.org/p/chromium/issues/detail?id=600120 */ + mix-blend-mode: plus-lighter; +} + +.leaflet-container.leaflet-touch-zoom { + -ms-touch-action: pan-x pan-y; + touch-action: pan-x pan-y; + } +.leaflet-container.leaflet-touch-drag { + -ms-touch-action: pinch-zoom; + /* Fallback for FF which doesn't support pinch-zoom */ + touch-action: none; + touch-action: pinch-zoom; +} +.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom { + -ms-touch-action: none; + touch-action: none; +} +.leaflet-container { + -webkit-tap-highlight-color: transparent; +} +.leaflet-container a { + -webkit-tap-highlight-color: rgba(51, 181, 229, 0.4); +} +.leaflet-tile { + filter: inherit; + visibility: hidden; + } +.leaflet-tile-loaded { + visibility: inherit; + } +.leaflet-zoom-box { + width: 0; + height: 0; + -moz-box-sizing: border-box; + box-sizing: border-box; + z-index: 800; + } +/* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */ +.leaflet-overlay-pane svg { + -moz-user-select: none; + } + +.leaflet-pane { z-index: 400; } + +.leaflet-tile-pane { z-index: 200; } +.leaflet-overlay-pane { z-index: 400; } +.leaflet-shadow-pane { z-index: 500; } +.leaflet-marker-pane { z-index: 600; } +.leaflet-tooltip-pane { z-index: 650; } +.leaflet-popup-pane { z-index: 700; } + +.leaflet-map-pane canvas { z-index: 100; } +.leaflet-map-pane svg { z-index: 200; } + +.leaflet-vml-shape { + width: 1px; + height: 1px; + } +.lvml { + behavior: url(#default#VML); + display: inline-block; + position: absolute; + } + + +/* control positioning */ + +.leaflet-control { + position: relative; + z-index: 800; + pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */ + pointer-events: auto; + } +.leaflet-top, +.leaflet-bottom { + position: absolute; + z-index: 1000; + pointer-events: none; + } +.leaflet-top { + top: 0; + } +.leaflet-right { + right: 0; + } +.leaflet-bottom { + bottom: 0; + } +.leaflet-left { + left: 0; + } +.leaflet-control { + float: left; + clear: both; + } +.leaflet-right .leaflet-control { + float: right; + } +.leaflet-top .leaflet-control { + margin-top: 10px; + } +.leaflet-bottom .leaflet-control { + margin-bottom: 10px; + } +.leaflet-left .leaflet-control { + margin-left: 10px; + } +.leaflet-right .leaflet-control { + margin-right: 10px; + } + + +/* zoom and fade animations */ + +.leaflet-fade-anim .leaflet-popup { + opacity: 0; + -webkit-transition: opacity 0.2s linear; + -moz-transition: opacity 0.2s linear; + transition: opacity 0.2s linear; + } +.leaflet-fade-anim .leaflet-map-pane .leaflet-popup { + opacity: 1; + } +.leaflet-zoom-animated { + -webkit-transform-origin: 0 0; + -ms-transform-origin: 0 0; + transform-origin: 0 0; + } +svg.leaflet-zoom-animated { + will-change: transform; +} + +.leaflet-zoom-anim .leaflet-zoom-animated { + -webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1); + -moz-transition: -moz-transform 0.25s cubic-bezier(0,0,0.25,1); + transition: transform 0.25s cubic-bezier(0,0,0.25,1); + } +.leaflet-zoom-anim .leaflet-tile, +.leaflet-pan-anim .leaflet-tile { + -webkit-transition: none; + -moz-transition: none; + transition: none; + } + +.leaflet-zoom-anim .leaflet-zoom-hide { + visibility: hidden; + } + + +/* cursors */ + +.leaflet-interactive { + cursor: pointer; + } +.leaflet-grab { + cursor: -webkit-grab; + cursor: -moz-grab; + cursor: grab; + } +.leaflet-crosshair, +.leaflet-crosshair .leaflet-interactive { + cursor: crosshair; + } +.leaflet-popup-pane, +.leaflet-control { + cursor: auto; + } +.leaflet-dragging .leaflet-grab, +.leaflet-dragging .leaflet-grab .leaflet-interactive, +.leaflet-dragging .leaflet-marker-draggable { + cursor: move; + cursor: -webkit-grabbing; + cursor: -moz-grabbing; + cursor: grabbing; + } + +/* marker & overlays interactivity */ +.leaflet-marker-icon, +.leaflet-marker-shadow, +.leaflet-image-layer, +.leaflet-pane > svg path, +.leaflet-tile-container { + pointer-events: none; + } + +.leaflet-marker-icon.leaflet-interactive, +.leaflet-image-layer.leaflet-interactive, +.leaflet-pane > svg path.leaflet-interactive, +svg.leaflet-image-layer.leaflet-interactive path { + pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */ + pointer-events: auto; + } + +/* visual tweaks */ + +.leaflet-container { + background: #ddd; + outline-offset: 1px; + } +.leaflet-container a { + color: #0078A8; + } +.leaflet-zoom-box { + border: 2px dotted #38f; + background: rgba(255,255,255,0.5); + } + + +/* general typography */ +.leaflet-container { + font-family: "Helvetica Neue", Arial, Helvetica, sans-serif; + font-size: 12px; + font-size: 0.75rem; + line-height: 1.5; + } + + +/* general toolbar styles */ + +.leaflet-bar { + box-shadow: 0 1px 5px rgba(0,0,0,0.65); + border-radius: 4px; + } +.leaflet-bar a { + background-color: #fff; + border-bottom: 1px solid #ccc; + width: 26px; + height: 26px; + line-height: 26px; + display: block; + text-align: center; + text-decoration: none; + color: black; + } +.leaflet-bar a, +.leaflet-control-layers-toggle { + background-position: 50% 50%; + background-repeat: no-repeat; + display: block; + } +.leaflet-bar a:hover, +.leaflet-bar a:focus { + background-color: #f4f4f4; + } +.leaflet-bar a:first-child { + border-top-left-radius: 4px; + border-top-right-radius: 4px; + } +.leaflet-bar a:last-child { + border-bottom-left-radius: 4px; + border-bottom-right-radius: 4px; + border-bottom: none; + } +.leaflet-bar a.leaflet-disabled { + cursor: default; + background-color: #f4f4f4; + color: #bbb; + } + +.leaflet-touch .leaflet-bar a { + width: 30px; + height: 30px; + line-height: 30px; + } +.leaflet-touch .leaflet-bar a:first-child { + border-top-left-radius: 2px; + border-top-right-radius: 2px; + } +.leaflet-touch .leaflet-bar a:last-child { + border-bottom-left-radius: 2px; + border-bottom-right-radius: 2px; + } + +/* zoom control */ + +.leaflet-control-zoom-in, +.leaflet-control-zoom-out { + font: bold 18px 'Lucida Console', Monaco, monospace; + text-indent: 1px; + } + +.leaflet-touch .leaflet-control-zoom-in, .leaflet-touch .leaflet-control-zoom-out { + font-size: 22px; + } + + +/* layers control */ + +.leaflet-control-layers { + box-shadow: 0 1px 5px rgba(0,0,0,0.4); + background: #fff; + border-radius: 5px; + } +.leaflet-control-layers-toggle { + background-image: url(images/layers.png); + width: 36px; + height: 36px; + } +.leaflet-retina .leaflet-control-layers-toggle { + background-image: url(images/layers-2x.png); + background-size: 26px 26px; + } +.leaflet-touch .leaflet-control-layers-toggle { + width: 44px; + height: 44px; + } +.leaflet-control-layers .leaflet-control-layers-list, +.leaflet-control-layers-expanded .leaflet-control-layers-toggle { + display: none; + } +.leaflet-control-layers-expanded .leaflet-control-layers-list { + display: block; + position: relative; + } +.leaflet-control-layers-expanded { + padding: 6px 10px 6px 6px; + color: #333; + background: #fff; + } +.leaflet-control-layers-scrollbar { + overflow-y: scroll; + overflow-x: hidden; + padding-right: 5px; + } +.leaflet-control-layers-selector { + margin-top: 2px; + position: relative; + top: 1px; + } +.leaflet-control-layers label { + display: block; + font-size: 13px; + font-size: 1.08333em; + } +.leaflet-control-layers-separator { + height: 0; + border-top: 1px solid #ddd; + margin: 5px -10px 5px -6px; + } + +/* Default icon URLs */ +.leaflet-default-icon-path { /* used only in path-guessing heuristic, see L.Icon.Default */ + background-image: url(images/marker-icon.png); + } + + +/* attribution and scale controls */ + +.leaflet-container .leaflet-control-attribution { + background: #fff; + background: rgba(255, 255, 255, 0.8); + margin: 0; + } +.leaflet-control-attribution, +.leaflet-control-scale-line { + padding: 0 5px; + color: #333; + line-height: 1.4; + } +.leaflet-control-attribution a { + text-decoration: none; + } +.leaflet-control-attribution a:hover, +.leaflet-control-attribution a:focus { + text-decoration: underline; + } +.leaflet-attribution-flag { + display: inline !important; + vertical-align: baseline !important; + width: 1em; + height: 0.6669em; + } +.leaflet-left .leaflet-control-scale { + margin-left: 5px; + } +.leaflet-bottom .leaflet-control-scale { + margin-bottom: 5px; + } +.leaflet-control-scale-line { + border: 2px solid #777; + border-top: none; + line-height: 1.1; + padding: 2px 5px 1px; + white-space: nowrap; + -moz-box-sizing: border-box; + box-sizing: border-box; + background: rgba(255, 255, 255, 0.8); + text-shadow: 1px 1px #fff; + } +.leaflet-control-scale-line:not(:first-child) { + border-top: 2px solid #777; + border-bottom: none; + margin-top: -2px; + } +.leaflet-control-scale-line:not(:first-child):not(:last-child) { + border-bottom: 2px solid #777; + } + +.leaflet-touch .leaflet-control-attribution, +.leaflet-touch .leaflet-control-layers, +.leaflet-touch .leaflet-bar { + box-shadow: none; + } +.leaflet-touch .leaflet-control-layers, +.leaflet-touch .leaflet-bar { + border: 2px solid rgba(0,0,0,0.2); + background-clip: padding-box; + } + + +/* popup */ + +.leaflet-popup { + position: absolute; + text-align: center; + margin-bottom: 20px; + } +.leaflet-popup-content-wrapper { + padding: 1px; + text-align: left; + border-radius: 12px; + } +.leaflet-popup-content { + margin: 13px 24px 13px 20px; + line-height: 1.3; + font-size: 13px; + font-size: 1.08333em; + min-height: 1px; + } +.leaflet-popup-content p { + margin: 17px 0; + margin: 1.3em 0; + } +.leaflet-popup-tip-container { + width: 40px; + height: 20px; + position: absolute; + left: 50%; + margin-top: -1px; + margin-left: -20px; + overflow: hidden; + pointer-events: none; + } +.leaflet-popup-tip { + width: 17px; + height: 17px; + padding: 1px; + + margin: -10px auto 0; + pointer-events: auto; + + -webkit-transform: rotate(45deg); + -moz-transform: rotate(45deg); + -ms-transform: rotate(45deg); + transform: rotate(45deg); + } +.leaflet-popup-content-wrapper, +.leaflet-popup-tip { + background: white; + color: #333; + box-shadow: 0 3px 14px rgba(0,0,0,0.4); + } +.leaflet-container a.leaflet-popup-close-button { + position: absolute; + top: 0; + right: 0; + border: none; + text-align: center; + width: 24px; + height: 24px; + font: 16px/24px Tahoma, Verdana, sans-serif; + color: #757575; + text-decoration: none; + background: transparent; + } +.leaflet-container a.leaflet-popup-close-button:hover, +.leaflet-container a.leaflet-popup-close-button:focus { + color: #585858; + } +.leaflet-popup-scrolled { + overflow: auto; + } + +.leaflet-oldie .leaflet-popup-content-wrapper { + -ms-zoom: 1; + } +.leaflet-oldie .leaflet-popup-tip { + width: 24px; + margin: 0 auto; + + -ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)"; + filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678); + } + +.leaflet-oldie .leaflet-control-zoom, +.leaflet-oldie .leaflet-control-layers, +.leaflet-oldie .leaflet-popup-content-wrapper, +.leaflet-oldie .leaflet-popup-tip { + border: 1px solid #999; + } + + +/* div icon */ + +.leaflet-div-icon { + background: #fff; + border: 1px solid #666; + } + + +/* Tooltip */ +/* Base styles for the element that has a tooltip */ +.leaflet-tooltip { + position: absolute; + padding: 6px; + background-color: #fff; + border: 1px solid #fff; + border-radius: 3px; + color: #222; + white-space: nowrap; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + pointer-events: none; + box-shadow: 0 1px 3px rgba(0,0,0,0.4); + } +.leaflet-tooltip.leaflet-interactive { + cursor: pointer; + pointer-events: auto; + } +.leaflet-tooltip-top:before, +.leaflet-tooltip-bottom:before, +.leaflet-tooltip-left:before, +.leaflet-tooltip-right:before { + position: absolute; + pointer-events: none; + border: 6px solid transparent; + background: transparent; + content: ""; + } + +/* Directions */ + +.leaflet-tooltip-bottom { + margin-top: 6px; +} +.leaflet-tooltip-top { + margin-top: -6px; +} +.leaflet-tooltip-bottom:before, +.leaflet-tooltip-top:before { + left: 50%; + margin-left: -6px; + } +.leaflet-tooltip-top:before { + bottom: 0; + margin-bottom: -12px; + border-top-color: #fff; + } +.leaflet-tooltip-bottom:before { + top: 0; + margin-top: -12px; + margin-left: -6px; + border-bottom-color: #fff; + } +.leaflet-tooltip-left { + margin-left: -6px; +} +.leaflet-tooltip-right { + margin-left: 6px; +} +.leaflet-tooltip-left:before, +.leaflet-tooltip-right:before { + top: 50%; + margin-top: -6px; + } +.leaflet-tooltip-left:before { + right: 0; + margin-right: -12px; + border-left-color: #fff; + } +.leaflet-tooltip-right:before { + left: 0; + margin-left: -12px; + border-right-color: #fff; + } + +/* Printing */ + +@media print { + /* Prevent printers from removing background-images of controls. */ + .leaflet-control { + -webkit-print-color-adjust: exact; + print-color-adjust: exact; + } + } diff --git a/app/src/main/assets/map/leaflet.js b/app/src/main/assets/map/leaflet.js new file mode 100644 index 000000000..a3bf693d0 --- /dev/null +++ b/app/src/main/assets/map/leaflet.js @@ -0,0 +1,6 @@ +/* @preserve + * Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com + * (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade + */ +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).leaflet={})}(this,function(t){"use strict";function l(t){for(var e,i,n=1,o=arguments.length;n=this.min.x&&i.x<=this.max.x&&e.y>=this.min.y&&i.y<=this.max.y},intersects:function(t){t=_(t);var e=this.min,i=this.max,n=t.min,t=t.max,o=t.x>=e.x&&n.x<=i.x,t=t.y>=e.y&&n.y<=i.y;return o&&t},overlaps:function(t){t=_(t);var e=this.min,i=this.max,n=t.min,t=t.max,o=t.x>e.x&&n.xe.y&&n.y=n.lat&&i.lat<=o.lat&&e.lng>=n.lng&&i.lng<=o.lng},intersects:function(t){t=g(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),t=t.getNorthEast(),o=t.lat>=e.lat&&n.lat<=i.lat,t=t.lng>=e.lng&&n.lng<=i.lng;return o&&t},overlaps:function(t){t=g(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),t=t.getNorthEast(),o=t.lat>e.lat&&n.late.lng&&n.lng","http://www.w3.org/2000/svg"===(Wt.firstChild&&Wt.firstChild.namespaceURI));function y(t){return 0<=navigator.userAgent.toLowerCase().indexOf(t)}var b={ie:pt,ielt9:mt,edge:n,webkit:ft,android:gt,android23:vt,androidStock:yt,opera:xt,chrome:wt,gecko:bt,safari:Pt,phantom:Lt,opera12:o,win:Tt,ie3d:Mt,webkit3d:zt,gecko3d:_t,any3d:Ct,mobile:Zt,mobileWebkit:St,mobileWebkit3d:Et,msPointer:kt,pointer:Ot,touch:Bt,touchNative:At,mobileOpera:It,mobileGecko:Rt,retina:Nt,passiveEvents:Dt,canvas:jt,svg:Ht,vml:!Ht&&function(){try{var t=document.createElement("div"),e=(t.innerHTML='',t.firstChild);return e.style.behavior="url(#default#VML)",e&&"object"==typeof e.adj}catch(t){return!1}}(),inlineSvg:Wt,mac:0===navigator.platform.indexOf("Mac"),linux:0===navigator.platform.indexOf("Linux")},Ft=b.msPointer?"MSPointerDown":"pointerdown",Ut=b.msPointer?"MSPointerMove":"pointermove",Vt=b.msPointer?"MSPointerUp":"pointerup",qt=b.msPointer?"MSPointerCancel":"pointercancel",Gt={touchstart:Ft,touchmove:Ut,touchend:Vt,touchcancel:qt},Kt={touchstart:function(t,e){e.MSPOINTER_TYPE_TOUCH&&e.pointerType===e.MSPOINTER_TYPE_TOUCH&&O(e);ee(t,e)},touchmove:ee,touchend:ee,touchcancel:ee},Yt={},Xt=!1;function Jt(t,e,i){return"touchstart"!==e||Xt||(document.addEventListener(Ft,$t,!0),document.addEventListener(Ut,Qt,!0),document.addEventListener(Vt,te,!0),document.addEventListener(qt,te,!0),Xt=!0),Kt[e]?(i=Kt[e].bind(this,i),t.addEventListener(Gt[e],i,!1),i):(console.warn("wrong event specified:",e),u)}function $t(t){Yt[t.pointerId]=t}function Qt(t){Yt[t.pointerId]&&(Yt[t.pointerId]=t)}function te(t){delete Yt[t.pointerId]}function ee(t,e){if(e.pointerType!==(e.MSPOINTER_TYPE_MOUSE||"mouse")){for(var i in e.touches=[],Yt)e.touches.push(Yt[i]);e.changedTouches=[e],t(e)}}var ie=200;function ne(t,i){t.addEventListener("dblclick",i);var n,o=0;function e(t){var e;1!==t.detail?n=t.detail:"mouse"===t.pointerType||t.sourceCapabilities&&!t.sourceCapabilities.firesTouchEvents||((e=Ne(t)).some(function(t){return t instanceof HTMLLabelElement&&t.attributes.for})&&!e.some(function(t){return t instanceof HTMLInputElement||t instanceof HTMLSelectElement})||((e=Date.now())-o<=ie?2===++n&&i(function(t){var e,i,n={};for(i in t)e=t[i],n[i]=e&&e.bind?e.bind(t):e;return(t=n).type="dblclick",n.detail=2,n.isTrusted=!1,n._simulated=!0,n}(t)):n=1,o=e))}return t.addEventListener("click",e),{dblclick:i,simDblclick:e}}var oe,se,re,ae,he,le,ue=we(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),ce=we(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),de="webkitTransition"===ce||"OTransition"===ce?ce+"End":"transitionend";function _e(t){return"string"==typeof t?document.getElementById(t):t}function pe(t,e){var i=t.style[e]||t.currentStyle&&t.currentStyle[e];return"auto"===(i=i&&"auto"!==i||!document.defaultView?i:(t=document.defaultView.getComputedStyle(t,null))?t[e]:null)?null:i}function P(t,e,i){t=document.createElement(t);return t.className=e||"",i&&i.appendChild(t),t}function T(t){var e=t.parentNode;e&&e.removeChild(t)}function me(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function fe(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function ge(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function ve(t,e){return void 0!==t.classList?t.classList.contains(e):0<(t=xe(t)).length&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(t)}function M(t,e){var i;if(void 0!==t.classList)for(var n=F(e),o=0,s=n.length;othis.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,e){this._enforcingBounds=!0;var i=this.getCenter(),t=this._limitCenter(i,this._zoom,g(t));return i.equals(t)||this.panTo(t,e),this._enforcingBounds=!1,this},panInside:function(t,e){var i=m((e=e||{}).paddingTopLeft||e.padding||[0,0]),n=m(e.paddingBottomRight||e.padding||[0,0]),o=this.project(this.getCenter()),t=this.project(t),s=this.getPixelBounds(),i=_([s.min.add(i),s.max.subtract(n)]),s=i.getSize();return i.contains(t)||(this._enforcingBounds=!0,n=t.subtract(i.getCenter()),i=i.extend(t).getSize().subtract(s),o.x+=n.x<0?-i.x:i.x,o.y+=n.y<0?-i.y:i.y,this.panTo(this.unproject(o),e),this._enforcingBounds=!1),this},invalidateSize:function(t){if(!this._loaded)return this;t=l({animate:!1,pan:!0},!0===t?{animate:!0}:t);var e=this.getSize(),i=(this._sizeChanged=!0,this._lastCenter=null,this.getSize()),n=e.divideBy(2).round(),o=i.divideBy(2).round(),n=n.subtract(o);return n.x||n.y?(t.animate&&t.pan?this.panBy(n):(t.pan&&this._rawPanBy(n),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(a(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:i})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){var e,i;return t=this._locateOptions=l({timeout:1e4,watch:!1},t),"geolocation"in navigator?(e=a(this._handleGeolocationResponse,this),i=a(this._handleGeolocationError,this),t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,i,t):navigator.geolocation.getCurrentPosition(e,i,t)):this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){var e;this._container._leaflet_id&&(e=t.code,t=t.message||(1===e?"permission denied":2===e?"position unavailable":"timeout"),this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+t+"."}))},_handleGeolocationResponse:function(t){if(this._container._leaflet_id){var e,i,n=new v(t.coords.latitude,t.coords.longitude),o=n.toBounds(2*t.coords.accuracy),s=this._locateOptions,r=(s.setView&&(e=this.getBoundsZoom(o),this.setView(n,s.maxZoom?Math.min(e,s.maxZoom):e)),{latlng:n,bounds:o,timestamp:t.timestamp});for(i in t.coords)"number"==typeof t.coords[i]&&(r[i]=t.coords[i]);this.fire("locationfound",r)}},addHandler:function(t,e){return e&&(e=this[t]=new e(this),this._handlers.push(e),this.options[t]&&e.enable()),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(t){this._container._leaflet_id=void 0,this._containerId=void 0}for(var t in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),T(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(r(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)T(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){e=P("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),e||this._mapPane);return t&&(this._panes[t]=e),e},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds();return new s(this.unproject(t.getBottomLeft()),this.unproject(t.getTopRight()))},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,i){t=g(t),i=m(i||[0,0]);var n=this.getZoom()||0,o=this.getMinZoom(),s=this.getMaxZoom(),r=t.getNorthWest(),t=t.getSouthEast(),i=this.getSize().subtract(i),t=_(this.project(t,n),this.project(r,n)).getSize(),r=b.any3d?this.options.zoomSnap:1,a=i.x/t.x,i=i.y/t.y,t=e?Math.max(a,i):Math.min(a,i),n=this.getScaleZoom(t,n);return r&&(n=Math.round(n/(r/100))*(r/100),n=e?Math.ceil(n/r)*r:Math.floor(n/r)*r),Math.max(o,Math.min(s,n))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new p(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){t=this._getTopLeftPoint(t,e);return new f(t,t.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(void 0===t?this.getZoom():t)},getPane:function(t){return"string"==typeof t?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var i=this.options.crs;return e=void 0===e?this._zoom:e,i.scale(t)/i.scale(e)},getScaleZoom:function(t,e){var i=this.options.crs,t=(e=void 0===e?this._zoom:e,i.zoom(t*i.scale(e)));return isNaN(t)?1/0:t},project:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.latLngToPoint(w(t),e)},unproject:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.pointToLatLng(m(t),e)},layerPointToLatLng:function(t){t=m(t).add(this.getPixelOrigin());return this.unproject(t)},latLngToLayerPoint:function(t){return this.project(w(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(w(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(g(t))},distance:function(t,e){return this.options.crs.distance(w(t),w(e))},containerPointToLayerPoint:function(t){return m(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return m(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){t=this.containerPointToLayerPoint(m(t));return this.layerPointToLatLng(t)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(w(t)))},mouseEventToContainerPoint:function(t){return De(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){t=this._container=_e(t);if(!t)throw new Error("Map container not found.");if(t._leaflet_id)throw new Error("Map container is already initialized.");S(t,"scroll",this._onScroll,this),this._containerId=h(t)},_initLayout:function(){var t=this._container,e=(this._fadeAnimated=this.options.fadeAnimation&&b.any3d,M(t,"leaflet-container"+(b.touch?" leaflet-touch":"")+(b.retina?" leaflet-retina":"")+(b.ielt9?" leaflet-oldie":"")+(b.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":"")),pe(t,"position"));"absolute"!==e&&"relative"!==e&&"fixed"!==e&&"sticky"!==e&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),Z(this._mapPane,new p(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(M(t.markerPane,"leaflet-zoom-hide"),M(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e,i){Z(this._mapPane,new p(0,0));var n=!this._loaded,o=(this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset"),this._zoom!==e);this._moveStart(o,i)._move(t,e)._moveEnd(o),this.fire("viewreset"),n&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,i,n){void 0===e&&(e=this._zoom);var o=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),n?i&&i.pinch&&this.fire("zoom",i):((o||i&&i.pinch)&&this.fire("zoom",i),this.fire("move",i)),this},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return r(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){Z(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={};var e=t?k:S;e((this._targets[h(this._container)]=this)._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&e(window,"resize",this._onResize,this),b.any3d&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){r(this._resizeRequest),this._resizeRequest=x(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,e){for(var i,n=[],o="mouseout"===e||"mouseover"===e,s=t.target||t.srcElement,r=!1;s;){if((i=this._targets[h(s)])&&("click"===e||"preclick"===e)&&this._draggableMoved(i)){r=!0;break}if(i&&i.listens(e,!0)){if(o&&!We(s,t))break;if(n.push(i),o)break}if(s===this._container)break;s=s.parentNode}return n=n.length||r||o||!this.listens(e,!0)?n:[this]},_isClickDisabled:function(t){for(;t&&t!==this._container;){if(t._leaflet_disable_click)return!0;t=t.parentNode}},_handleDOMEvent:function(t){var e,i=t.target||t.srcElement;!this._loaded||i._leaflet_disable_events||"click"===t.type&&this._isClickDisabled(i)||("mousedown"===(e=t.type)&&Me(i),this._fireDOMEvent(t,e))},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,e,i){"click"===t.type&&((a=l({},t)).type="preclick",this._fireDOMEvent(a,a.type,i));var n=this._findEventTargets(t,e);if(i){for(var o=[],s=0;sthis.options.zoomAnimationThreshold)return!1;var n=this.getZoomScale(e),n=this._getCenterOffset(t)._divideBy(1-1/n);if(!0!==i.animate&&!this.getSize().contains(n))return!1;x(function(){this._moveStart(!0,i.noMoveStart||!1)._animateZoom(t,e,!0)},this)}return!0},_animateZoom:function(t,e,i,n){this._mapPane&&(i&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,M(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:n}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(a(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&z(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function Ue(t){return new B(t)}var B=et.extend({options:{position:"topright"},initialize:function(t){c(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var e=this._container=this.onAdd(t),i=this.getPosition(),t=t._controlCorners[i];return M(e,"leaflet-control"),-1!==i.indexOf("bottom")?t.insertBefore(e,t.firstChild):t.appendChild(e),this._map.on("unload",this.remove,this),this},remove:function(){return this._map&&(T(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null),this},_refocusOnMap:function(t){this._map&&t&&0",e=document.createElement("div");return e.innerHTML=t,e.firstChild},_addItem:function(t){var e,i=document.createElement("label"),n=this._map.hasLayer(t.layer),n=(t.overlay?((e=document.createElement("input")).type="checkbox",e.className="leaflet-control-layers-selector",e.defaultChecked=n):e=this._createRadioElement("leaflet-base-layers_"+h(this),n),this._layerControlInputs.push(e),e.layerId=h(t.layer),S(e,"click",this._onInputClick,this),document.createElement("span")),o=(n.innerHTML=" "+t.name,document.createElement("span"));return i.appendChild(o),o.appendChild(e),o.appendChild(n),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(i),this._checkDisabledLayers(),i},_onInputClick:function(){if(!this._preventClick){var t,e,i=this._layerControlInputs,n=[],o=[];this._handlingClick=!0;for(var s=i.length-1;0<=s;s--)t=i[s],e=this._getLayer(t.layerId).layer,t.checked?n.push(e):t.checked||o.push(e);for(s=0;se.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var t=this._section,e=(this._preventClick=!0,S(t,"click",O),this.expand(),this);setTimeout(function(){k(t,"click",O),e._preventClick=!1})}})),qe=B.extend({options:{position:"topleft",zoomInText:'',zoomInTitle:"Zoom in",zoomOutText:'',zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",i=P("div",e+" leaflet-bar"),n=this.options;return this._zoomInButton=this._createButton(n.zoomInText,n.zoomInTitle,e+"-in",i,this._zoomIn),this._zoomOutButton=this._createButton(n.zoomOutText,n.zoomOutTitle,e+"-out",i,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),i},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,e,i,n,o){i=P("a",i,n);return i.innerHTML=t,i.href="#",i.title=e,i.setAttribute("role","button"),i.setAttribute("aria-label",e),Ie(i),S(i,"click",Re),S(i,"click",o,this),S(i,"click",this._refocusOnMap,this),i},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";z(this._zoomInButton,e),z(this._zoomOutButton,e),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),!this._disabled&&t._zoom!==t.getMinZoom()||(M(this._zoomOutButton,e),this._zoomOutButton.setAttribute("aria-disabled","true")),!this._disabled&&t._zoom!==t.getMaxZoom()||(M(this._zoomInButton,e),this._zoomInButton.setAttribute("aria-disabled","true"))}}),Ge=(A.mergeOptions({zoomControl:!0}),A.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new qe,this.addControl(this.zoomControl))}),B.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e="leaflet-control-scale",i=P("div",e),n=this.options;return this._addScales(n,e+"-line",i),t.on(n.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),i},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,i){t.metric&&(this._mScale=P("div",e,i)),t.imperial&&(this._iScale=P("div",e,i))},_update:function(){var t=this._map,e=t.getSize().y/2,t=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(t)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var e=this._getRoundNum(t);this._updateScale(this._mScale,e<1e3?e+" m":e/1e3+" km",e/t)},_updateImperial:function(t){var e,i,t=3.2808399*t;5280'+(b.inlineSvg?' ':"")+"Leaflet"},initialize:function(t){c(this,t),this._attributions={}},onAdd:function(t){for(var e in(t.attributionControl=this)._container=P("div","leaflet-control-attribution"),Ie(this._container),t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),t.on("layeradd",this._addAttribution,this),this._container},onRemove:function(t){t.off("layeradd",this._addAttribution,this)},_addAttribution:function(t){t.layer.getAttribution&&(this.addAttribution(t.layer.getAttribution()),t.layer.once("remove",function(){this.removeAttribution(t.layer.getAttribution())},this))},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t&&(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update()),this},removeAttribution:function(t){return t&&this._attributions[t]&&(this._attributions[t]--,this._update()),this},_update:function(){if(this._map){var t,e=[];for(t in this._attributions)this._attributions[t]&&e.push(t);var i=[];this.options.prefix&&i.push(this.options.prefix),e.length&&i.push(e.join(", ")),this._container.innerHTML=i.join(' ')}}}),n=(A.mergeOptions({attributionControl:!0}),A.addInitHook(function(){this.options.attributionControl&&(new Ke).addTo(this)}),B.Layers=Ve,B.Zoom=qe,B.Scale=Ge,B.Attribution=Ke,Ue.layers=function(t,e,i){return new Ve(t,e,i)},Ue.zoom=function(t){return new qe(t)},Ue.scale=function(t){return new Ge(t)},Ue.attribution=function(t){return new Ke(t)},et.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled||(this._enabled=!0,this.addHooks()),this},disable:function(){return this._enabled&&(this._enabled=!1,this.removeHooks()),this},enabled:function(){return!!this._enabled}})),ft=(n.addTo=function(t,e){return t.addHandler(e,this),this},{Events:e}),Ye=b.touch?"touchstart mousedown":"mousedown",Xe=it.extend({options:{clickTolerance:3},initialize:function(t,e,i,n){c(this,n),this._element=t,this._dragStartTarget=e||t,this._preventOutline=i},enable:function(){this._enabled||(S(this._dragStartTarget,Ye,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(Xe._dragging===this&&this.finishDrag(!0),k(this._dragStartTarget,Ye,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){var e,i;this._enabled&&(this._moved=!1,ve(this._element,"leaflet-zoom-anim")||(t.touches&&1!==t.touches.length?Xe._dragging===this&&this.finishDrag():Xe._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||((Xe._dragging=this)._preventOutline&&Me(this._element),Le(),re(),this._moving||(this.fire("down"),i=t.touches?t.touches[0]:t,e=Ce(this._element),this._startPoint=new p(i.clientX,i.clientY),this._startPos=Pe(this._element),this._parentScale=Ze(e),i="mousedown"===t.type,S(document,i?"mousemove":"touchmove",this._onMove,this),S(document,i?"mouseup":"touchend touchcancel",this._onUp,this)))))},_onMove:function(t){var e;this._enabled&&(t.touches&&1e&&(i.push(t[n]),o=n);oe.max.x&&(i|=2),t.ye.max.y&&(i|=8),i}function ri(t,e,i,n){var o=e.x,e=e.y,s=i.x-o,r=i.y-e,a=s*s+r*r;return 0this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()t.y!=n.y>t.y&&t.x<(n.x-i.x)*(t.y-i.y)/(n.y-i.y)+i.x&&(l=!l);return l||yi.prototype._containsPoint.call(this,t,!0)}});var wi=ci.extend({initialize:function(t,e){c(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,i,n,o=d(t)?t:t.features;if(o){for(e=0,i=o.length;es.x&&(r=i.x+a-s.x+o.x),i.x-r-n.x<(a=0)&&(r=i.x-n.x),i.y+e+o.y>s.y&&(a=i.y+e-s.y+o.y),i.y-a-n.y<0&&(a=i.y-n.y),(r||a)&&(this.options.keepInView&&(this._autopanning=!0),t.fire("autopanstart").panBy([r,a]))))},_getAnchor:function(){return m(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}})),Ii=(A.mergeOptions({closePopupOnClick:!0}),A.include({openPopup:function(t,e,i){return this._initOverlay(Bi,t,e,i).openOn(this),this},closePopup:function(t){return(t=arguments.length?t:this._popup)&&t.close(),this}}),o.include({bindPopup:function(t,e){return this._popup=this._initOverlay(Bi,this._popup,t,e),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t){return this._popup&&(this instanceof ci||(this._popup._source=this),this._popup._prepareOpen(t||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){var e;this._popup&&this._map&&(Re(t),e=t.layer||t.target,this._popup._source!==e||e instanceof fi?(this._popup._source=e,this.openPopup(t.latlng)):this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(t.latlng))},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}}),Ai.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(t){Ai.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(t){Ai.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var t=Ai.prototype.getEvents.call(this);return this.options.permanent||(t.preclick=this.close),t},_initLayout:function(){var t="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=P("div",t),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+h(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e,i=this._map,n=this._container,o=i.latLngToContainerPoint(i.getCenter()),i=i.layerPointToContainerPoint(t),s=this.options.direction,r=n.offsetWidth,a=n.offsetHeight,h=m(this.options.offset),l=this._getAnchor(),i="top"===s?(e=r/2,a):"bottom"===s?(e=r/2,0):(e="center"===s?r/2:"right"===s?0:"left"===s?r:i.xthis.options.maxZoom||nthis.options.maxZoom||void 0!==this.options.minZoom&&oi.max.x)||!e.wrapLat&&(t.yi.max.y))return!1}return!this.options.bounds||(e=this._tileCoordsToBounds(t),g(this.options.bounds).overlaps(e))},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,i=this.getTileSize(),n=t.scaleBy(i),i=n.add(i);return[e.unproject(n,t.z),e.unproject(i,t.z)]},_tileCoordsToBounds:function(t){t=this._tileCoordsToNwSe(t),t=new s(t[0],t[1]);return t=this.options.noWrap?t:this._map.wrapLatLngBounds(t)},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var t=t.split(":"),e=new p(+t[0],+t[1]);return e.z=+t[2],e},_removeTile:function(t){var e=this._tiles[t];e&&(T(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){M(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=u,t.onmousemove=u,b.ielt9&&this.options.opacity<1&&C(t,this.options.opacity)},_addTile:function(t,e){var i=this._getTilePos(t),n=this._tileCoordsToKey(t),o=this.createTile(this._wrapCoords(t),a(this._tileReady,this,t));this._initTile(o),this.createTile.length<2&&x(a(this._tileReady,this,t,null,o)),Z(o,i),this._tiles[n]={el:o,coords:t,current:!0},e.appendChild(o),this.fire("tileloadstart",{tile:o,coords:t})},_tileReady:function(t,e,i){e&&this.fire("tileerror",{error:e,tile:i,coords:t});var n=this._tileCoordsToKey(t);(i=this._tiles[n])&&(i.loaded=+new Date,this._map._fadeAnimated?(C(i.el,0),r(this._fadeFrame),this._fadeFrame=x(this._updateOpacity,this)):(i.active=!0,this._pruneTiles()),e||(M(i.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:i.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),b.ielt9||!this._map._fadeAnimated?x(this._pruneTiles,this):setTimeout(a(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new p(this._wrapX?H(t.x,this._wrapX):t.x,this._wrapY?H(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new f(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}});var Di=Ni.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(t,e){this._url=t,(e=c(this,e)).detectRetina&&b.retina&&0')}}catch(t){}return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),zt={_initContainer:function(){this._container=P("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Wi.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=Vi("shape");M(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=Vi("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[h(t)]=t},_addPath:function(t){var e=t._container;this._container.appendChild(e),t.options.interactive&&t.addInteractiveTarget(e)},_removePath:function(t){var e=t._container;T(e),t.removeInteractiveTarget(e),delete this._layers[h(t)]},_updateStyle:function(t){var e=t._stroke,i=t._fill,n=t.options,o=t._container;o.stroked=!!n.stroke,o.filled=!!n.fill,n.stroke?(e=e||(t._stroke=Vi("stroke")),o.appendChild(e),e.weight=n.weight+"px",e.color=n.color,e.opacity=n.opacity,n.dashArray?e.dashStyle=d(n.dashArray)?n.dashArray.join(" "):n.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=n.lineCap.replace("butt","flat"),e.joinstyle=n.lineJoin):e&&(o.removeChild(e),t._stroke=null),n.fill?(i=i||(t._fill=Vi("fill")),o.appendChild(i),i.color=n.fillColor||n.color,i.opacity=n.fillOpacity):i&&(o.removeChild(i),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),i=Math.round(t._radius),n=Math.round(t._radiusY||i);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+i+","+n+" 0,23592600")},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){fe(t._container)},_bringToBack:function(t){ge(t._container)}},qi=b.vml?Vi:ct,Gi=Wi.extend({_initContainer:function(){this._container=qi("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=qi("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){T(this._container),k(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){var t,e,i;this._map._animatingZoom&&this._bounds||(Wi.prototype._update.call(this),e=(t=this._bounds).getSize(),i=this._container,this._svgSize&&this._svgSize.equals(e)||(this._svgSize=e,i.setAttribute("width",e.x),i.setAttribute("height",e.y)),Z(i,t.min),i.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update"))},_initPath:function(t){var e=t._path=qi("path");t.options.className&&M(e,t.options.className),t.options.interactive&&M(e,"leaflet-interactive"),this._updateStyle(t),this._layers[h(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){T(t._path),t.removeInteractiveTarget(t._path),delete this._layers[h(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var e=t._path,t=t.options;e&&(t.stroke?(e.setAttribute("stroke",t.color),e.setAttribute("stroke-opacity",t.opacity),e.setAttribute("stroke-width",t.weight),e.setAttribute("stroke-linecap",t.lineCap),e.setAttribute("stroke-linejoin",t.lineJoin),t.dashArray?e.setAttribute("stroke-dasharray",t.dashArray):e.removeAttribute("stroke-dasharray"),t.dashOffset?e.setAttribute("stroke-dashoffset",t.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),t.fill?(e.setAttribute("fill",t.fillColor||t.color),e.setAttribute("fill-opacity",t.fillOpacity),e.setAttribute("fill-rule",t.fillRule||"evenodd")):e.setAttribute("fill","none"))},_updatePoly:function(t,e){this._setPath(t,dt(t._parts,e))},_updateCircle:function(t){var e=t._point,i=Math.max(Math.round(t._radius),1),n="a"+i+","+(Math.max(Math.round(t._radiusY),1)||i)+" 0 1,0 ",e=t._empty()?"M0 0":"M"+(e.x-i)+","+e.y+n+2*i+",0 "+n+2*-i+",0 ";this._setPath(t,e)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){fe(t._path)},_bringToBack:function(t){ge(t._path)}});function Ki(t){return b.svg||b.vml?new Gi(t):null}b.vml&&Gi.include(zt),A.include({getRenderer:function(t){t=(t=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer)||(this._renderer=this._createRenderer());return this.hasLayer(t)||this.addLayer(t),t},_getPaneRenderer:function(t){var e;return"overlayPane"!==t&&void 0!==t&&(void 0===(e=this._paneRenderers[t])&&(e=this._createRenderer({pane:t}),this._paneRenderers[t]=e),e)},_createRenderer:function(t){return this.options.preferCanvas&&Ui(t)||Ki(t)}});var Yi=xi.extend({initialize:function(t,e){xi.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=g(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});Gi.create=qi,Gi.pointsToPath=dt,wi.geometryToLayer=bi,wi.coordsToLatLng=Li,wi.coordsToLatLngs=Ti,wi.latLngToCoords=Mi,wi.latLngsToCoords=zi,wi.getFeature=Ci,wi.asFeature=Zi,A.mergeOptions({boxZoom:!0});var _t=n.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){S(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){k(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){T(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||1!==t.which&&1!==t.button)return!1;this._clearDeferredResetState(),this._resetState(),re(),Le(),this._startPoint=this._map.mouseEventToContainerPoint(t),S(document,{contextmenu:Re,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=P("div","leaflet-zoom-box",this._container),M(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var t=new f(this._point,this._startPoint),e=t.getSize();Z(this._box,t.min),this._box.style.width=e.x+"px",this._box.style.height=e.y+"px"},_finish:function(){this._moved&&(T(this._box),z(this._container,"leaflet-crosshair")),ae(),Te(),k(document,{contextmenu:Re,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){1!==t.which&&1!==t.button||(this._finish(),this._moved&&(this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(a(this._resetState,this),0),t=new s(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point)),this._map.fitBounds(t).fire("boxzoomend",{boxZoomBounds:t})))},_onKeyDown:function(t){27===t.keyCode&&(this._finish(),this._clearDeferredResetState(),this._resetState())}}),Ct=(A.addInitHook("addHandler","boxZoom",_t),A.mergeOptions({doubleClickZoom:!0}),n.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,i=e.getZoom(),n=e.options.zoomDelta,i=t.originalEvent.shiftKey?i-n:i+n;"center"===e.options.doubleClickZoom?e.setZoom(i):e.setZoomAround(t.containerPoint,i)}})),Zt=(A.addInitHook("addHandler","doubleClickZoom",Ct),A.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0}),n.extend({addHooks:function(){var t;this._draggable||(t=this._map,this._draggable=new Xe(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))),M(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){z(this._map._container,"leaflet-grab"),z(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t,e=this._map;e._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity?(t=g(this._map.options.maxBounds),this._offsetLimit=_(this._map.latLngToContainerPoint(t.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(t.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))):this._offsetLimit=null,e.fire("movestart").fire("dragstart"),e.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){var e,i;this._map.options.inertia&&(e=this._lastTime=+new Date,i=this._lastPos=this._draggable._absPos||this._draggable._newPos,this._positions.push(i),this._times.push(e),this._prunePositions(e)),this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;1e.max.x&&(t.x=this._viscousLimit(t.x,e.max.x)),t.y>e.max.y&&(t.y=this._viscousLimit(t.y,e.max.y)),this._draggable._newPos=this._draggable._startPos.add(t))},_onPreDragWrap:function(){var t=this._worldWidth,e=Math.round(t/2),i=this._initialWorldOffset,n=this._draggable._newPos.x,o=(n-e+i)%t+e-i,n=(n+e+i)%t-e-i,t=Math.abs(o+i)e.getMaxZoom()&&11?i[1]=1:i[1]<=0&&(i[1]=0),HSVtoRGB(i[0],i[1],i[2])}function addBrightnessToRGB(t,e){var i=RGBtoHSV(255*t[0],255*t[1],255*t[2]);return i[2]+=e,i[2]>1?i[2]=1:i[2]<0&&(i[2]=0),HSVtoRGB(i[0],i[1],i[2])}function addHueToRGB(t,e){var i=RGBtoHSV(255*t[0],255*t[1],255*t[2]);return i[0]+=e/360,i[0]>1?i[0]-=1:i[0]<0&&(i[0]+=1),HSVtoRGB(i[0],i[1],i[2])}var rgbToHex=function(){var t,e,i=[];for(t=0;t<256;t+=1)e=t.toString(16),i[t]=1===e.length?"0"+e:e;return function(t,e,r){return t<0&&(t=0),e<0&&(e=0),r<0&&(r=0),"#"+i[t]+i[e]+i[r]}}(),setSubframeEnabled=function(t){subframeEnabled=!!t},getSubframeEnabled=function(){return subframeEnabled},setExpressionsPlugin=function(t){expressionsPlugin=t},getExpressionsPlugin=function(){return expressionsPlugin},setExpressionInterfaces=function(t){expressionsInterfaces=t},getExpressionInterfaces=function(){return expressionsInterfaces},setDefaultCurveSegments=function(t){defaultCurveSegments=t},getDefaultCurveSegments=function(){return defaultCurveSegments},setIdPrefix=function(t){idPrefix$1=t},getIdPrefix=function(){return idPrefix$1};function createNS(t){return document.createElementNS(svgNS,t)}function _typeof$5(t){return _typeof$5="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof$5(t)}var dataManager=function(){var t,e,i=1,r=[],s={onmessage:function(){},postMessage:function(e){t({data:e})}},a={postMessage:function(t){s.onmessage({data:t})}};function n(){e||(e=function(e){if(window.Worker&&window.Blob&&getWebWorker()){var i=new Blob(["var _workerSelf = self; self.onmessage = ",e.toString()],{type:"text/javascript"}),r=URL.createObjectURL(i);return new Worker(r)}return t=e,s}((function(t){if(a.dataManager||(a.dataManager=function(){function t(s,a){var n,o,h,l,p,m,c=s.length;for(o=0;o=0;e-=1)if("sh"===t[e].ty)if(t[e].ks.k.i)r(t[e].ks.k);else for(a=t[e].ks.k.length,s=0;si[0]||!(i[0]>t[0])&&(t[1]>i[1]||!(i[1]>t[1])&&(t[2]>i[2]||!(i[2]>t[2])&&null))}var a,n=function(){var t=[4,4,14];function e(t){var e,i,r,s=t.length;for(e=0;e=0;i-=1)if("sh"===t[i].ty)if(t[i].ks.k.i)t[i].ks.k.c=t[i].closed;else for(s=t[i].ks.k.length,r=0;r500)&&(this._imageLoaded(),clearInterval(i)),e+=1}.bind(this),50)}function a(t){var e={assetData:t},i=r(t,this.assetsPath,this.path);return dataManager.loadData(i,function(t){e.img=t,this._footageLoaded()}.bind(this),function(){e.img={},this._footageLoaded()}.bind(this)),e}function n(){this._imageLoaded=e.bind(this),this._footageLoaded=i.bind(this),this.testImageLoaded=s.bind(this),this.createFootageData=a.bind(this),this.assetsPath="",this.path="",this.totalImages=0,this.totalFootages=0,this.loadedAssets=0,this.loadedFootagesCount=0,this.imagesLoadedCb=null,this.images=[]}return n.prototype={loadAssets:function(t,e){var i;this.imagesLoadedCb=e;var r=t.length;for(i=0;ithis.animationData.op&&(this.animationData.op=t.op,this.totalFrames=Math.floor(t.op-this.animationData.ip));var e,i,r=this.animationData.layers,s=r.length,a=t.layers,n=a.length;for(i=0;ithis.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger("enterFrame"),this.renderFrame(),this.trigger("drawnFrame")},AnimationItem.prototype.renderFrame=function(){if(!1!==this.isLoaded&&this.renderer)try{this.expressionsPlugin&&this.expressionsPlugin.resetFrame(),this.renderer.renderFrame(this.currentFrame+this.firstFrame)}catch(t){this.triggerRenderFrameError(t)}},AnimationItem.prototype.play=function(t){t&&this.name!==t||!0===this.isPaused&&(this.isPaused=!1,this.trigger("_play"),this.audioController.resume(),this._idle&&(this._idle=!1,this.trigger("_active")))},AnimationItem.prototype.pause=function(t){t&&this.name!==t||!1===this.isPaused&&(this.isPaused=!0,this.trigger("_pause"),this._idle=!0,this.trigger("_idle"),this.audioController.pause())},AnimationItem.prototype.togglePause=function(t){t&&this.name!==t||(!0===this.isPaused?this.play():this.pause())},AnimationItem.prototype.stop=function(t){t&&this.name!==t||(this.pause(),this.playCount=0,this._completedLoop=!1,this.setCurrentRawFrameValue(0))},AnimationItem.prototype.getMarkerData=function(t){for(var e,i=0;i=this.totalFrames-1&&this.frameModifier>0?this.loop&&this.playCount!==this.loop?e>=this.totalFrames?(this.playCount+=1,this.checkSegments(e%this.totalFrames)||(this.setCurrentRawFrameValue(e%this.totalFrames),this._completedLoop=!0,this.trigger("loopComplete"))):this.setCurrentRawFrameValue(e):this.checkSegments(e>this.totalFrames?e%this.totalFrames:0)||(i=!0,e=this.totalFrames-1):e<0?this.checkSegments(e%this.totalFrames)||(!this.loop||this.playCount--<=0&&!0!==this.loop?(i=!0,e=0):(this.setCurrentRawFrameValue(this.totalFrames+e%this.totalFrames),this._completedLoop?this.trigger("loopComplete"):this._completedLoop=!0)):this.setCurrentRawFrameValue(e),i&&(this.setCurrentRawFrameValue(e),this.pause(),this.trigger("complete"))}},AnimationItem.prototype.adjustSegment=function(t,e){this.playCount=0,t[1]0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(-1)),this.totalFrames=t[0]-t[1],this.timeCompleted=this.totalFrames,this.firstFrame=t[1],this.setCurrentRawFrameValue(this.totalFrames-.001-e)):t[1]>t[0]&&(this.frameModifier<0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(1)),this.totalFrames=t[1]-t[0],this.timeCompleted=this.totalFrames,this.firstFrame=t[0],this.setCurrentRawFrameValue(.001+e)),this.trigger("segmentStart")},AnimationItem.prototype.setSegment=function(t,e){var i=-1;this.isPaused&&(this.currentRawFrame+this.firstFramee&&(i=e-t)),this.firstFrame=t,this.totalFrames=e-t,this.timeCompleted=this.totalFrames,-1!==i&&this.goToAndStop(i,!0)},AnimationItem.prototype.playSegments=function(t,e){if(e&&(this.segments.length=0),"object"===_typeof$4(t[0])){var i,r=t.length;for(i=0;i=0;i-=1)e[i].animation.destroy(t)},t.freeze=function(){n=!0},t.unfreeze=function(){n=!1,d()},t.setVolume=function(t,i){var s;for(s=0;s=.001?function(t,e,i,r){for(var s=0;s<4;++s){var a=h(e,i,r);if(0===a)return e;e-=(o(e,i,r)-t)/a}return e}(t,l,e,r):0===p?l:function(t,e,i,r,s){var a,n,h=0;do{(a=o(n=e+(i-e)/2,r,s)-t)>0?i=n:e=n}while(Math.abs(a)>1e-7&&++h<10);return n}(t,a,a+i,e,r)}},t}(),pooling={double:function(t){return t.concat(createSizedArray(t.length))}},poolFactory=function(t,e,i){var r=0,s=t,a=createSizedArray(s);return{newElement:function(){return r?a[r-=1]:e()},release:function(t){r===s&&(a=pooling.double(a),s*=2),i&&i(t),a[r]=t,r+=1}}},bezierLengthPool=poolFactory(8,(function(){return{addedLength:0,percents:createTypedArray("float32",getDefaultCurveSegments()),lengths:createTypedArray("float32",getDefaultCurveSegments())}})),segmentsLengthPool=poolFactory(8,(function(){return{lengths:[],totalLength:0}}),(function(t){var e,i=t.lengths.length;for(e=0;e-.001&&n<.001}var i=function(t,e,i,r){var s,a,n,o,h,l,p=getDefaultCurveSegments(),f=0,m=[],c=[],d=bezierLengthPool.newElement();for(n=i.length,s=0;sn?-1:1,l=!0;l;)if(r[a]<=n&&r[a+1]>n?(o=(n-r[a])/(r[a+1]-r[a]),l=!1):a+=h,a<0||a>=s-1){if(a===s-1)return i[a];l=!1}return i[a]+(i[a+1]-i[a])*o}var h=createTypedArray("float32",8);return{getSegmentsLength:function(t){var e,r=segmentsLengthPool.newElement(),s=t.c,a=t.v,n=t.o,o=t.i,h=t._length,l=r.lengths,p=0;for(e=0;e1&&(a=1);var p,f=o(a,l),m=o(n=n>1?1:n,l),c=e.length,d=1-f,u=1-m,y=d*d*d,g=f*d*d*3,v=f*f*d*3,b=f*f*f,x=d*d*u,P=f*d*u+d*f*u+d*d*m,E=f*f*u+d*f*m+f*d*m,S=f*f*m,C=d*u*u,_=f*u*u+d*m*u+d*u*m,A=f*m*u+d*m*m+f*u*m,T=f*m*m,M=u*u*u,k=m*u*u+u*m*u+u*u*m,D=m*m*u+u*m*m+m*u*m,F=m*m*m;for(p=0;pc?m>d?m-c-d:d-c-m:d>c?d-c-m:c-m-d)>-1e-4&&f<1e-4}}}var bez=bezFunction(),initFrame=initialDefaultFrame,mathAbs=Math.abs;function interpolateValue(t,e){var i,r=this.offsetTime;"multidimensional"===this.propType&&(i=createTypedArray("float32",this.pv.length));for(var s,a,n,o,h,l,p,f,m,c=e.lastIndex,d=c,u=this.keyframes.length-1,y=!0;y;){if(s=this.keyframes[d],a=this.keyframes[d+1],d===u-1&&t>=a.t-r){s.h&&(s=a),c=0;break}if(a.t-r>t){c=d;break}d=v||t=v?x.points.length-1:0;for(h=x.points[P].point.length,o=0;o=C&&S=v)i[0]=g[0],i[1]=g[1],i[2]=g[2];else if(t<=b)i[0]=s.s[0],i[1]=s.s[1],i[2]=s.s[2];else{quaternionToEuler(i,slerp(createQuaternion(s.s),createQuaternion(g),(t-b)/(v-b)))}else for(d=0;d=v?l=1:t1e-6?(r=Math.acos(s),a=Math.sin(r),n=Math.sin((1-i)*r)/a,o=Math.sin(i*r)/a):(n=1-i,o=i),h[0]=n*l+o*c,h[1]=n*p+o*d,h[2]=n*f+o*u,h[3]=n*m+o*y,h}function quaternionToEuler(t,e){var i=e[0],r=e[1],s=e[2],a=e[3],n=Math.atan2(2*r*a-2*i*s,1-2*r*r-2*s*s),o=Math.asin(2*i*r+2*s*a),h=Math.atan2(2*i*a-2*r*s,1-2*i*i-2*s*s);t[0]=n/degToRads,t[1]=o/degToRads,t[2]=h/degToRads}function createQuaternion(t){var e=t[0]*degToRads,i=t[1]*degToRads,r=t[2]*degToRads,s=Math.cos(e/2),a=Math.cos(i/2),n=Math.cos(r/2),o=Math.sin(e/2),h=Math.sin(i/2),l=Math.sin(r/2);return[o*h*n+s*a*l,o*a*n+s*h*l,s*h*n-o*a*l,s*a*n-o*h*l]}function getValueAtCurrentTime(){var t=this.comp.renderedFrame-this.offsetTime,e=this.keyframes[0].t-this.offsetTime,i=this.keyframes[this.keyframes.length-1].t-this.offsetTime;if(!(t===this._caching.lastFrame||this._caching.lastFrame!==initFrame&&(this._caching.lastFrame>=i&&t>=i||this._caching.lastFrame=t&&(this._caching._lastKeyframeIndex=-1,this._caching.lastIndex=0);var r=this.interpolateValue(t,this._caching);this.pv=r}return this._caching.lastFrame=t,this.pv}function setVValue(t){var e;if("unidimensional"===this.propType)e=t*this.mult,mathAbs(this.v-e)>1e-5&&(this.v=e,this._mdf=!0);else for(var i=0,r=this.v.length;i1e-5&&(this.v[i]=e,this._mdf=!0),i+=1}function processEffectsSequence(){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length)if(this.lock)this.setVValue(this.pv);else{var t;this.lock=!0,this._mdf=this._isFirstFrame;var e=this.effectsSequence.length,i=this.kf?this.pv:this.data.k;for(t=0;t=this._maxLength&&this.doubleArrayLength(),i){case"v":a=this.v;break;case"i":a=this.i;break;case"o":a=this.o;break;default:a=[]}(!a[r]||a[r]&&!s)&&(a[r]=pointPool.newElement()),a[r][0]=t,a[r][1]=e},ShapePath.prototype.setTripleAt=function(t,e,i,r,s,a,n,o){this.setXYAt(t,e,"v",n,o),this.setXYAt(i,r,"o",n,o),this.setXYAt(s,a,"i",n,o)},ShapePath.prototype.reverse=function(){var t=new ShapePath;t.setPathData(this.c,this._length);var e=this.v,i=this.o,r=this.i,s=0;this.c&&(t.setTripleAt(e[0][0],e[0][1],r[0][0],r[0][1],i[0][0],i[0][1],0,!1),s=1);var a,n=this._length-1,o=this._length;for(a=s;a=c[c.length-1].t-this.offsetTime)r=c[c.length-1].s?c[c.length-1].s[0]:c[c.length-2].e[0],a=!0;else{for(var d,u,y,g=m,v=c.length-1,b=!0;b&&(d=c[g],!((u=c[g+1]).t-this.offsetTime>t));)g=u.t-this.offsetTime)p=1;else if(tr&&e>r)||(this._caching.lastIndex=s0||t>-1e-6&&t<0?r(1e4*t)/1e4:t}function I(){var t=this.props;return"matrix("+w(t[0])+","+w(t[1])+","+w(t[4])+","+w(t[5])+","+w(t[12])+","+w(t[13])+")"}return function(){this.reset=s,this.rotate=a,this.rotateX=n,this.rotateY=o,this.rotateZ=h,this.skew=p,this.skewFromAxis=f,this.shear=l,this.scale=m,this.setTransform=c,this.translate=d,this.transform=u,this.multiply=y,this.applyToPoint=P,this.applyToX=E,this.applyToY=S,this.applyToZ=C,this.applyToPointArray=k,this.applyToTriplePoints=M,this.applyToPointStringified=D,this.toCSS=F,this.to2dCSS=I,this.clone=b,this.cloneFromProps=x,this.equals=v,this.inversePoints=T,this.inversePoint=A,this.getInverseMatrix=_,this._t=this.transform,this.isIdentity=g,this._identity=!0,this._identityCalculated=!1,this.props=createTypedArray("float32",16),this.reset()}}();function _typeof$3(t){return _typeof$3="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof$3(t)}var lottie={},standalone="__[STANDALONE]__",animationData="__[ANIMATIONDATA]__",renderer="";function setLocation(t){setLocationHref(t)}function searchAnimations(){!0===standalone?animationManager.searchAnimations(animationData,standalone,renderer):animationManager.searchAnimations()}function setSubframeRendering(t){setSubframeEnabled(t)}function setPrefix(t){setIdPrefix(t)}function loadAnimation(t){return!0===standalone&&(t.animationData=JSON.parse(animationData)),animationManager.loadAnimation(t)}function setQuality(t){if("string"==typeof t)switch(t){case"high":setDefaultCurveSegments(200);break;default:case"medium":setDefaultCurveSegments(50);break;case"low":setDefaultCurveSegments(10)}else!isNaN(t)&&t>1&&setDefaultCurveSegments(t);getDefaultCurveSegments()>=50?roundValues(!1):roundValues(!0)}function inBrowser(){return"undefined"!=typeof navigator}function installPlugin(t,e){"expressions"===t&&setExpressionsPlugin(e)}function getFactory(t){switch(t){case"propertyFactory":return PropertyFactory;case"shapePropertyFactory":return ShapePropertyFactory;case"matrix":return Matrix;default:return null}}function checkReady(){"complete"===document.readyState&&(clearInterval(readyStateCheckInterval),searchAnimations())}function getQueryVariable(t){for(var e=queryString.split("&"),i=0;i=1?a.push({s:t-1,e:e-1}):(a.push({s:t,e:1}),a.push({s:0,e:e-1}));var n,o,h=[],l=a.length;for(n=0;nr+i))p=o.s*s<=r?0:(o.s*s-r)/i,f=o.e*s>=r+i?1:(o.e*s-r)/i,h.push([p,f])}return h.length||h.push([0,0]),h},TrimModifier.prototype.releasePathsData=function(t){var e,i=t.length;for(e=0;e1?1+a:this.s.v<0?0+a:this.s.v+a)>(i=this.e.v>1?1+a:this.e.v<0?0+a:this.e.v+a)){var n=e;e=i,i=n}e=1e-4*Math.round(1e4*e),i=1e-4*Math.round(1e4*i),this.sValue=e,this.eValue=i}else e=this.sValue,i=this.eValue;var o,h,l,p,f,m=this.shapes.length,c=0;if(i===e)for(s=0;s=0;s-=1)if((d=this.shapes[s]).shape._mdf){for((u=d.localShapeCollection).releaseShapes(),2===this.m&&m>1?(g=this.calculateShapeEdges(e,i,d.totalShapeLength,x,c),x+=d.totalShapeLength):g=[[v,b]],h=g.length,o=0;o=1?y.push({s:d.totalShapeLength*(v-1),e:d.totalShapeLength*(b-1)}):(y.push({s:d.totalShapeLength*v,e:d.totalShapeLength}),y.push({s:0,e:d.totalShapeLength*(b-1)}));var P=this.addShapes(d,y[0]);if(y[0].s!==y[0].e){if(y.length>1)if(d.shape.paths.shapes[d.shape.paths._length-1].c){var E=P.pop();this.addPaths(P,u),P=this.addShapes(d,y[1],E)}else this.addPaths(P,u),P=this.addShapes(d,y[1]);this.addPaths(P,u)}}d.shape.paths=u}}},TrimModifier.prototype.addPaths=function(t,e){var i,r=t.length;for(i=0;ie.e){i.c=!1;break}e.s<=d&&e.e>=d+n.addedLength?(this.addSegment(m[r].v[s-1],m[r].o[s-1],m[r].i[s],m[r].v[s],i,o,y),y=!1):(l=bez.getNewSegment(m[r].v[s-1],m[r].v[s],m[r].o[s-1],m[r].i[s],(e.s-d)/n.addedLength,(e.e-d)/n.addedLength,h[s-1]),this.addSegmentFromArray(l,i,o,y),y=!1,i.c=!1),d+=n.addedLength,o+=1}if(m[r].c&&h.length){if(n=h[s-1],d<=e.e){var g=h[s-1].addedLength;e.s<=d&&e.e>=d+g?(this.addSegment(m[r].v[s-1],m[r].o[s-1],m[r].i[0],m[r].v[0],i,o,y),y=!1):(l=bez.getNewSegment(m[r].v[s-1],m[r].v[0],m[r].o[s-1],m[r].i[0],(e.s-d)/g,(e.e-d)/g,h[s-1]),this.addSegmentFromArray(l,i,o,y),y=!1,i.c=!1)}else i.c=!1;d+=n.addedLength,o+=1}if(i._length&&(i.setXYAt(i.v[p][0],i.v[p][1],"i",p),i.setXYAt(i.v[i._length-1][0],i.v[i._length-1][1],"o",i._length-1)),d>e.e)break;r=this.p.keyframes[this.p.keyframes.length-1].t?(r=this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length-1].t/i,0),s=this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length-1].t-.05)/i,0)):(r=this.p.pv,s=this.p.getValueAtTime((this.p._caching.lastFrame+this.p.offsetTime-.01)/i,this.p.offsetTime));else if(this.px&&this.px.keyframes&&this.py.keyframes&&this.px.getValueAtTime&&this.py.getValueAtTime){r=[],s=[];var a=this.px,n=this.py;a._caching.lastFrame+a.offsetTime<=a.keyframes[0].t?(r[0]=a.getValueAtTime((a.keyframes[0].t+.01)/i,0),r[1]=n.getValueAtTime((n.keyframes[0].t+.01)/i,0),s[0]=a.getValueAtTime(a.keyframes[0].t/i,0),s[1]=n.getValueAtTime(n.keyframes[0].t/i,0)):a._caching.lastFrame+a.offsetTime>=a.keyframes[a.keyframes.length-1].t?(r[0]=a.getValueAtTime(a.keyframes[a.keyframes.length-1].t/i,0),r[1]=n.getValueAtTime(n.keyframes[n.keyframes.length-1].t/i,0),s[0]=a.getValueAtTime((a.keyframes[a.keyframes.length-1].t-.01)/i,0),s[1]=n.getValueAtTime((n.keyframes[n.keyframes.length-1].t-.01)/i,0)):(r=[a.pv,n.pv],s[0]=a.getValueAtTime((a._caching.lastFrame+a.offsetTime-.01)/i,a.offsetTime),s[1]=n.getValueAtTime((n._caching.lastFrame+n.offsetTime-.01)/i,n.offsetTime))}else r=s=t;this.v.rotate(-Math.atan2(r[1]-s[1],r[0]-s[0]))}this.data.p&&this.data.p.s?this.data.p.z?this.v.translate(this.px.v,this.py.v,-this.pz.v):this.v.translate(this.px.v,this.py.v,0):this.v.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}this.frameId=this.elem.globalData.frameId}},precalculateMatrix:function(){if(this.appliedTransformations=0,this.pre.reset(),!this.a.effectsSequence.length&&(this.pre.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations=1,!this.s.effectsSequence.length)){if(this.pre.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.appliedTransformations=2,this.sk){if(this.sk.effectsSequence.length||this.sa.effectsSequence.length)return;this.pre.skewFromAxis(-this.sk.v,this.sa.v),this.appliedTransformations=3}this.r?this.r.effectsSequence.length||(this.pre.rotate(-this.r.v),this.appliedTransformations=4):this.rz.effectsSequence.length||this.ry.effectsSequence.length||this.rx.effectsSequence.length||this.or.effectsSequence.length||(this.pre.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.appliedTransformations=4)}},autoOrient:function(){}},extendPrototype([DynamicPropertyContainer],e),e.prototype.addDynamicProperty=function(t){this._addDynamicProperty(t),this.elem.addDynamicProperty(t),this._isDirty=!0},e.prototype._addDynamicProperty=DynamicPropertyContainer.prototype.addDynamicProperty,{getTransformProperty:function(t,i,r){return new e(t,i,r)}}}();function RepeaterModifier(){}function RoundCornersModifier(){}function floatEqual(t,e){return 1e5*Math.abs(t-e)<=Math.min(Math.abs(t),Math.abs(e))}function floatZero(t){return Math.abs(t)<=1e-5}function lerp(t,e,i){return t*(1-i)+e*i}function lerpPoint(t,e,i){return[lerp(t[0],e[0],i),lerp(t[1],e[1],i)]}function quadRoots(t,e,i){if(0===t)return[];var r=e*e-4*t*i;if(r<0)return[];var s=-e/(2*t);if(0===r)return[s];var a=Math.sqrt(r)/(2*t);return[s-a,s+a]}function polynomialCoefficients(t,e,i,r){return[3*e-t-3*i+r,3*t-6*e+3*i,-3*t+3*e,t]}function singlePoint(t){return new PolynomialBezier(t,t,t,t,!1)}function PolynomialBezier(t,e,i,r,s){s&&pointEqual(t,e)&&(e=lerpPoint(t,r,1/3)),s&&pointEqual(i,r)&&(i=lerpPoint(t,r,2/3));var a=polynomialCoefficients(t[0],e[0],i[0],r[0]),n=polynomialCoefficients(t[1],e[1],i[1],r[1]);this.a=[a[0],n[0]],this.b=[a[1],n[1]],this.c=[a[2],n[2]],this.d=[a[3],n[3]],this.points=[t,e,i,r]}function extrema(t,e){var i=t.points[0][e],r=t.points[t.points.length-1][e];if(i>r){var s=r;r=i,i=s}for(var a=quadRoots(3*t.a[e],2*t.b[e],t.c[e]),n=0;n0&&a[n]<1){var o=t.point(a[n])[e];or&&(r=o)}return{min:i,max:r}}function intersectData(t,e,i){var r=t.boundingBox();return{cx:r.cx,cy:r.cy,width:r.width,height:r.height,bez:t,t:(e+i)/2,t1:e,t2:i}}function splitData(t){var e=t.bez.split(.5);return[intersectData(e[0],t.t1,t.t),intersectData(e[1],t.t,t.t2)]}function boxIntersect(t,e){return 2*Math.abs(t.cx-e.cx)=a||t.width<=r&&t.height<=r&&e.width<=r&&e.height<=r)s.push([t.t,e.t]);else{var n=splitData(t),o=splitData(e);intersectsImpl(n[0],o[0],i+1,r,s,a),intersectsImpl(n[0],o[1],i+1,r,s,a),intersectsImpl(n[1],o[0],i+1,r,s,a),intersectsImpl(n[1],o[1],i+1,r,s,a)}}function crossProduct(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function lineIntersection(t,e,i,r){var s=[t[0],t[1],1],a=[e[0],e[1],1],n=[i[0],i[1],1],o=[r[0],r[1],1],h=crossProduct(crossProduct(s,a),crossProduct(n,o));return floatZero(h[2])?null:[h[0]/h[2],h[1]/h[2]]}function polarOffset(t,e,i){return[t[0]+Math.cos(e)*i,t[1]-Math.sin(e)*i]}function pointDistance(t,e){return Math.hypot(t[0]-e[0],t[1]-e[1])}function pointEqual(t,e){return floatEqual(t[0],e[0])&&floatEqual(t[1],e[1])}function ZigZagModifier(){}function setPoint(t,e,i,r,s,a,n){var o=i-Math.PI/2,h=i+Math.PI/2,l=e[0]+Math.cos(i)*r*s,p=e[1]-Math.sin(i)*r*s;t.setTripleAt(l,p,l+Math.cos(o)*a,p-Math.sin(o)*a,l+Math.cos(h)*n,p-Math.sin(h)*n,t.length())}function getPerpendicularVector(t,e){var i=[e[0]-t[0],e[1]-t[1]],r=.5*-Math.PI;return[Math.cos(r)*i[0]-Math.sin(r)*i[1],Math.sin(r)*i[0]+Math.cos(r)*i[1]]}function getProjectingAngle(t,e){var i=0===e?t.length()-1:e-1,r=(e+1)%t.length(),s=getPerpendicularVector(t.v[i],t.v[r]);return Math.atan2(0,1)-Math.atan2(s[1],s[0])}function zigZagCorner(t,e,i,r,s,a,n){var o=getProjectingAngle(e,i),h=e.v[i%e._length],l=e.v[0===i?e._length-1:i-1],p=e.v[(i+1)%e._length],f=2===a?Math.sqrt(Math.pow(h[0]-l[0],2)+Math.pow(h[1]-l[1],2)):0,m=2===a?Math.sqrt(Math.pow(h[0]-p[0],2)+Math.pow(h[1]-p[1],2)):0;setPoint(t,e.v[i%e._length],o,n,r,m/(2*(s+1)),f/(2*(s+1)),a)}function zigZagSegment(t,e,i,r,s,a){for(var n=0;n1&&e.length>1&&(s=getIntersection(t[0],e[e.length-1]))?[[t[0].split(s[0])[0]],[e[e.length-1].split(s[1])[1]]]:[i,r]}function pruneIntersections(t){for(var e,i=1;i1&&(e=pruneSegmentIntersection(t[t.length-1],t[0]),t[t.length-1]=e[0],t[0]=e[1]),t}function offsetSegmentSplit(t,e){var i,r,s,a,n=t.inflectionPoints();if(0===n.length)return[offsetSegment(t,e)];if(1===n.length||floatEqual(n[1],1))return i=(s=t.split(n[0]))[0],r=s[1],[offsetSegment(i,e),offsetSegment(r,e)];i=(s=t.split(n[0]))[0];var o=(n[1]-n[0])/(1-n[0]);return a=(s=s[1].split(o))[0],r=s[1],[offsetSegment(i,e),offsetSegment(a,e),offsetSegment(r,e)]}function OffsetPathModifier(){}function getFontProperties(t){for(var e=t.fStyle?t.fStyle.split(" "):[],i="normal",r="normal",s=e.length,a=0;a0;)i-=1,this._elements.unshift(e[i]);this.dynamicProperties.length?this.k=!0:this.getValue(!0)},RepeaterModifier.prototype.resetElements=function(t){var e,i=t.length;for(e=0;e0?Math.floor(m):Math.ceil(m),u=this.pMatrix.props,y=this.rMatrix.props,g=this.sMatrix.props;this.pMatrix.reset(),this.rMatrix.reset(),this.sMatrix.reset(),this.tMatrix.reset(),this.matrix.reset();var v,b,x=0;if(m>0){for(;xd;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!0),x-=1;c&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,-c,!0),x-=c)}for(r=1===this.data.m?0:this._currentCopies-1,s=1===this.data.m?1:-1,a=this._currentCopies;a;){if(b=(i=(e=this.elemsData[r].it)[e.length-1].transform.mProps.v.props).length,e[e.length-1].transform.mProps._mdf=!0,e[e.length-1].transform.op._mdf=!0,e[e.length-1].transform.op.v=1===this._currentCopies?this.so.v:this.so.v+(this.eo.v-this.so.v)*(r/(this._currentCopies-1)),0!==x){for((0!==r&&1===s||r!==this._currentCopies-1&&-1===s)&&this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),this.matrix.transform(y[0],y[1],y[2],y[3],y[4],y[5],y[6],y[7],y[8],y[9],y[10],y[11],y[12],y[13],y[14],y[15]),this.matrix.transform(g[0],g[1],g[2],g[3],g[4],g[5],g[6],g[7],g[8],g[9],g[10],g[11],g[12],g[13],g[14],g[15]),this.matrix.transform(u[0],u[1],u[2],u[3],u[4],u[5],u[6],u[7],u[8],u[9],u[10],u[11],u[12],u[13],u[14],u[15]),v=0;v0&&r<1?[e]:[]:[e-r,e+r].filter((function(t){return t>0&&t<1}))},PolynomialBezier.prototype.split=function(t){if(t<=0)return[singlePoint(this.points[0]),this];if(t>=1)return[this,singlePoint(this.points[this.points.length-1])];var e=lerpPoint(this.points[0],this.points[1],t),i=lerpPoint(this.points[1],this.points[2],t),r=lerpPoint(this.points[2],this.points[3],t),s=lerpPoint(e,i,t),a=lerpPoint(i,r,t),n=lerpPoint(s,a,t);return[new PolynomialBezier(this.points[0],e,s,n,!0),new PolynomialBezier(n,a,r,this.points[3],!0)]},PolynomialBezier.prototype.bounds=function(){return{x:extrema(this,0),y:extrema(this,1)}},PolynomialBezier.prototype.boundingBox=function(){var t=this.bounds();return{left:t.x.min,right:t.x.max,top:t.y.min,bottom:t.y.max,width:t.x.max-t.x.min,height:t.y.max-t.y.min,cx:(t.x.max+t.x.min)/2,cy:(t.y.max+t.y.min)/2}},PolynomialBezier.prototype.intersections=function(t,e,i){void 0===e&&(e=2),void 0===i&&(i=7);var r=[];return intersectsImpl(intersectData(this,0,1),intersectData(t,0,1),0,e,r,i),r},PolynomialBezier.shapeSegment=function(t,e){var i=(e+1)%t.length();return new PolynomialBezier(t.v[e],t.o[e],t.i[i],t.v[i],!0)},PolynomialBezier.shapeSegmentInverted=function(t,e){var i=(e+1)%t.length();return new PolynomialBezier(t.v[i],t.i[i],t.o[e],t.v[e],!0)},extendPrototype([ShapeModifier],ZigZagModifier),ZigZagModifier.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.amplitude=PropertyFactory.getProp(t,e.s,0,null,this),this.frequency=PropertyFactory.getProp(t,e.r,0,null,this),this.pointsType=PropertyFactory.getProp(t,e.pt,0,null,this),this._isAnimated=0!==this.amplitude.effectsSequence.length||0!==this.frequency.effectsSequence.length||0!==this.pointsType.effectsSequence.length},ZigZagModifier.prototype.processPath=function(t,e,i,r){var s=t._length,a=shapePool.newElement();if(a.c=t.c,t.c||(s-=1),0===s)return a;var n=-1,o=PolynomialBezier.shapeSegment(t,0);zigZagCorner(a,t,0,e,i,r,n);for(var h=0;h=0;a-=1)o=PolynomialBezier.shapeSegmentInverted(t,a),l.push(offsetSegmentSplit(o,e));l=pruneIntersections(l);var p=null,f=null;for(a=0;a=55296&&i<=56319){var r=t.charCodeAt(1);r>=56320&&r<=57343&&(e=1024*(i-55296)+r-56320+65536)}return e}function o(t){var e=n(t);return e>=127462&&e<=127487}var h=function(){this.fonts=[],this.chars=null,this.typekitLoaded=0,this.isLoaded=!1,this._warned=!1,this.initTime=Date.now(),this.setIsLoadedBinded=this.setIsLoaded.bind(this),this.checkLoadedFontsBinded=this.checkLoadedFonts.bind(this)};h.isModifier=function(t,e){var i=t.toString(16)+e.toString(16);return-1!==r.indexOf(i)},h.isZeroWidthJoiner=function(t){return 8205===t},h.isFlagEmoji=function(t){return o(t.substr(0,2))&&o(t.substr(2,2))},h.isRegionalCode=o,h.isCombinedCharacter=function(t){return-1!==e.indexOf(t)},h.isRegionalFlag=function(t,e){var r=n(t.substr(e,2));if(r!==i)return!1;var s=0;for(e+=2;s<5;){if((r=n(t.substr(e,2)))<917601||r>917626)return!1;s+=1,e+=2}return 917631===n(t.substr(e,2))},h.isVariationSelector=function(t){return 65039===t},h.BLACK_FLAG_CODE_POINT=i;var l={addChars:function(t){if(t){var e;this.chars||(this.chars=[]);var i,r,s=t.length,a=this.chars.length;for(e=0;e0&&(p=!1),p){var f=createTag("style");f.setAttribute("f-forigin",r[i].fOrigin),f.setAttribute("f-origin",r[i].origin),f.setAttribute("f-family",r[i].fFamily),f.type="text/css",f.innerText="@font-face {font-family: "+r[i].fFamily+"; font-style: normal; src: url('"+r[i].fPath+"');}",e.appendChild(f)}}else if("g"===r[i].fOrigin||1===r[i].origin){for(h=document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]'),l=0;lt?!0!==this.isInRange&&(this.globalData._mdf=!0,this._mdf=!0,this.isInRange=!0,this.show()):!1!==this.isInRange&&(this.globalData._mdf=!0,this.isInRange=!1,this.hide())},renderRenderable:function(){var t,e=this.renderableComponents.length;for(t=0;t.1)&&this.audio.seek(this._currentTime/this.globalData.frameRate):(this.audio.play(),this.audio.seek(this._currentTime/this.globalData.frameRate),this._isPlaying=!0))},AudioElement.prototype.show=function(){},AudioElement.prototype.hide=function(){this.audio.pause(),this._isPlaying=!1},AudioElement.prototype.pause=function(){this.audio.pause(),this._isPlaying=!1,this._canPlay=!1},AudioElement.prototype.resume=function(){this._canPlay=!0},AudioElement.prototype.setRate=function(t){this.audio.rate(t)},AudioElement.prototype.volume=function(t){this._volumeMultiplier=t,this._previousVolume=t*this._volume,this.audio.volume(this._previousVolume)},AudioElement.prototype.getBaseElement=function(){return null},AudioElement.prototype.destroy=function(){},AudioElement.prototype.sourceRectAtTime=function(){},AudioElement.prototype.initExpressions=function(){},BaseRenderer.prototype.checkLayers=function(t){var e,i,r=this.layers.length;for(this.completeLayers=!0,e=r-1;e>=0;e-=1)this.elements[e]||(i=this.layers[e]).ip-i.st<=t-this.layers[e].st&&i.op-i.st>t-this.layers[e].st&&this.buildItem(e),this.completeLayers=!!this.elements[e]&&this.completeLayers;this.checkPendingElements()},BaseRenderer.prototype.createItem=function(t){switch(t.ty){case 2:return this.createImage(t);case 0:return this.createComp(t);case 1:return this.createSolid(t);case 3:default:return this.createNull(t);case 4:return this.createShape(t);case 5:return this.createText(t);case 6:return this.createAudio(t);case 13:return this.createCamera(t);case 15:return this.createFootage(t)}},BaseRenderer.prototype.createCamera=function(){throw new Error("You're using a 3d camera. Try the html renderer.")},BaseRenderer.prototype.createAudio=function(t){return new AudioElement(t,this.globalData,this)},BaseRenderer.prototype.createFootage=function(t){return new FootageElement(t,this.globalData,this)},BaseRenderer.prototype.buildAllItems=function(){var t,e=this.layers.length;for(t=0;t0&&(this.maskElement.setAttribute("id",y),this.element.maskedElement.setAttribute(v,"url("+getLocationHref()+"#"+y+")"),a.appendChild(this.maskElement)),this.viewData.length&&this.element.addRenderableComponent(this)}TransformElement.prototype={initTransform:function(){var t=new Matrix;this.finalTransform={mProp:this.data.ks?TransformPropertyFactory.getTransformProperty(this,this.data.ks,this):{o:0},_matMdf:!1,_localMatMdf:!1,_opMdf:!1,mat:t,localMat:t,localOpacity:1},this.data.ao&&(this.finalTransform.mProp.autoOriented=!0),this.data.ty},renderTransform:function(){if(this.finalTransform._opMdf=this.finalTransform.mProp.o._mdf||this._isFirstFrame,this.finalTransform._matMdf=this.finalTransform.mProp._mdf||this._isFirstFrame,this.hierarchy){var t,e=this.finalTransform.mat,i=0,r=this.hierarchy.length;if(!this.finalTransform._matMdf)for(;i1&&(a+=" C"+e.o[r-1][0]+","+e.o[r-1][1]+" "+e.i[0][0]+","+e.i[0][1]+" "+e.v[0][0]+","+e.v[0][1]),i.lastPath!==a){var n="";i.elem&&(e.c&&(n=t.inv?this.solidPath+a:a),i.elem.setAttribute("d",n)),i.lastPath=a}},MaskElement.prototype.destroy=function(){this.element=null,this.globalData=null,this.maskElement=null,this.data=null,this.masksProperties=null};var filtersFactory=function(){var t={};return t.createFilter=function(t,e){var i=createNS("filter");i.setAttribute("id",t),!0!==e&&(i.setAttribute("filterUnits","objectBoundingBox"),i.setAttribute("x","0%"),i.setAttribute("y","0%"),i.setAttribute("width","100%"),i.setAttribute("height","100%"));return i},t.createAlphaToLuminanceFilter=function(){var t=createNS("feColorMatrix");return t.setAttribute("type","matrix"),t.setAttribute("color-interpolation-filters","sRGB"),t.setAttribute("values","0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1"),t},t}(),featureSupport=function(){var t={maskType:!0,svgLumaHidden:!0,offscreenCanvas:"undefined"!=typeof OffscreenCanvas};return(/MSIE 10/i.test(navigator.userAgent)||/MSIE 9/i.test(navigator.userAgent)||/rv:11.0/i.test(navigator.userAgent)||/Edge\/\d./i.test(navigator.userAgent))&&(t.maskType=!1),/firefox/i.test(navigator.userAgent)&&(t.svgLumaHidden=!1),t}(),registeredEffects$1={},idPrefix="filter_result_";function SVGEffects(t){var e,i,r="SourceGraphic",s=t.data.ef?t.data.ef.length:0,a=createElementID(),n=filtersFactory.createFilter(a,!0),o=0;for(this.filters=[],e=0;e=0&&!this.shapeModifiers[t].processShapes(this._isFirstFrame);t-=1);}},searchProcessedElement:function(t){for(var e=this.processedElements,i=0,r=e.length;i.01)return!1;i+=1}return!0},GradientProperty.prototype.checkCollapsable=function(){if(this.o.length/2!=this.c.length/4)return!1;if(this.data.k.k[0].s)for(var t=0,e=this.data.k.k.length;t0;)h=r.transformers[d].mProps._mdf||h,c-=1,d-=1;if(h)for(c=y-r.styles[p].lvl,d=r.transformers.length-1;c>0;)m.multiply(r.transformers[d].mProps.v),c-=1,d-=1}else m=t;if(n=(f=r.sh.paths)._length,h){for(o="",a=0;a=1?v=.99:v<=-1&&(v=-.99);var b=o*v,x=Math.cos(g+e.a.v)*b+p[0],P=Math.sin(g+e.a.v)*b+p[1];h.setAttribute("fx",x),h.setAttribute("fy",P),l&&!e.g._collapsable&&(e.of.setAttribute("fx",x),e.of.setAttribute("fy",P))}}function h(t,e,i){var r=e.style,s=e.d;s&&(s._mdf||i)&&s.dashStr&&(r.pElem.setAttribute("stroke-dasharray",s.dashStr),r.pElem.setAttribute("stroke-dashoffset",s.dashoffset[0])),e.c&&(e.c._mdf||i)&&r.pElem.setAttribute("stroke","rgb("+bmFloor(e.c.v[0])+","+bmFloor(e.c.v[1])+","+bmFloor(e.c.v[2])+")"),(e.o._mdf||i)&&r.pElem.setAttribute("stroke-opacity",e.o.v),(e.w._mdf||i)&&(r.pElem.setAttribute("stroke-width",e.w.v),r.msElem&&r.msElem.setAttribute("stroke-width",e.w.v))}return{createRenderFunction:function(t){switch(t.ty){case"fl":return a;case"gf":return o;case"gs":return n;case"st":return h;case"sh":case"el":case"rc":case"sr":return s;case"tr":return i;case"no":return r;default:return null}}}}();function SVGShapeElement(t,e,i){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.initElement(t,e,i),this.prevViewData=[]}function LetterProps(t,e,i,r,s,a){this.o=t,this.sw=e,this.sc=i,this.fc=r,this.m=s,this.p=a,this._mdf={o:!0,sw:!!e,sc:!!i,fc:!!r,m:!0,p:!0}}function TextProperty(t,e){this._frameId=initialDefaultFrame,this.pv="",this.v="",this.kf=!1,this._isFirstFrame=!0,this._mdf=!1,e.d&&e.d.sid&&(e.d=t.globalData.slotManager.getProp(e.d)),this.data=e,this.elem=t,this.comp=this.elem.comp,this.keysIndex=0,this.canResize=!1,this.minimumFontSize=1,this.effectsSequence=[],this.currentData={ascent:0,boxWidth:this.defaultBoxWidth,f:"",fStyle:"",fWeight:"",fc:"",j:"",justifyOffset:"",l:[],lh:0,lineWidths:[],ls:"",of:"",s:"",sc:"",sw:0,t:0,tr:0,sz:0,ps:null,fillColorAnim:!1,strokeColorAnim:!1,strokeWidthAnim:!1,yOffset:0,finalSize:0,finalText:[],finalLineHeight:0,__complete:!1},this.copyData(this.currentData,this.data.d.k[0].s),this.searchProperty()||this.completeTextData(this.currentData)}extendPrototype([BaseElement,TransformElement,SVGBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableDOMElement],SVGShapeElement),SVGShapeElement.prototype.initSecondaryElement=function(){},SVGShapeElement.prototype.identityMatrix=new Matrix,SVGShapeElement.prototype.buildExpressionInterface=function(){},SVGShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes()},SVGShapeElement.prototype.filterUniqueShapes=function(){var t,e,i,r,s=this.shapes.length,a=this.stylesList.length,n=[],o=!1;for(i=0;i1&&o&&this.setShapesAsAnimated(n)}},SVGShapeElement.prototype.setShapesAsAnimated=function(t){var e,i=t.length;for(e=0;e=0;o-=1){if((m=this.searchProcessedElement(t[o]))?e[o]=i[m-1]:t[o]._render=n,"fl"===t[o].ty||"st"===t[o].ty||"gf"===t[o].ty||"gs"===t[o].ty||"no"===t[o].ty)m?e[o].style.closed=!1:e[o]=this.createStyleElement(t[o],s),t[o]._render&&e[o].style.pElem.parentNode!==r&&r.appendChild(e[o].style.pElem),u.push(e[o].style);else if("gr"===t[o].ty){if(m)for(l=e[o].it.length,h=0;h1,this.kf&&this.addEffect(this.getKeyframeValue.bind(this)),this.kf},TextProperty.prototype.addEffect=function(t){this.effectsSequence.push(t),this.elem.addDynamicProperty(this)},TextProperty.prototype.getValue=function(t){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length||t){this.currentData.t=this.data.d.k[this.keysIndex].s.t;var e=this.currentData,i=this.keysIndex;if(this.lock)this.setCurrentData(this.currentData);else{var r;this.lock=!0,this._mdf=!1;var s=this.effectsSequence.length,a=t||this.data.d.k[this.keysIndex].s;for(r=0;re);)i+=1;return this.keysIndex!==i&&(this.keysIndex=i),this.data.d.k[this.keysIndex].s},TextProperty.prototype.buildFinalText=function(t){for(var e,i,r=[],s=0,a=t.length,n=!1,o=!1,h="";s=55296&&e<=56319?FontManager.isRegionalFlag(t,s)?h=t.substr(s,14):(i=t.charCodeAt(s+1))>=56320&&i<=57343&&(FontManager.isModifier(e,i)?(h=t.substr(s,2),n=!0):h=FontManager.isFlagEmoji(t.substr(s,4))?t.substr(s,4):t.substr(s,2)):e>56319?(i=t.charCodeAt(s+1),FontManager.isVariationSelector(e)&&(n=!0)):FontManager.isZeroWidthJoiner(e)&&(n=!0,o=!0),n?(r[r.length-1]+=h,n=!1):r.push(h),s+=h.length;return r},TextProperty.prototype.completeTextData=function(t){t.__complete=!0;var e,i,r,s,a,n,o,h=this.elem.globalData.fontManager,l=this.data,p=[],f=0,m=l.m.g,c=0,d=0,u=0,y=[],g=0,v=0,b=h.getFontByName(t.f),x=0,P=getFontProperties(b);t.fWeight=P.weight,t.fStyle=P.style,t.finalSize=t.s,t.finalText=this.buildFinalText(t.t),i=t.finalText.length,t.finalLineHeight=t.lh;var E,S=t.tr/1e3*t.finalSize;if(t.sz)for(var C,_,A=!0,T=t.sz[0],M=t.sz[1];A;){C=0,g=0,i=(_=this.buildFinalText(t.t)).length,S=t.tr/1e3*t.finalSize;var k=-1;for(e=0;eT&&" "!==_[e]?(-1===k?i+=1:e=k,C+=t.finalLineHeight||1.2*t.finalSize,_.splice(e,k===e?1:0,"\r"),k=-1,g=0):(g+=x,g+=S);C+=b.ascent*t.finalSize/100,this.canResize&&t.finalSize>this.minimumFontSize&&Mv?g:v,g=-2*S,s="",r=!0,u+=1):s=D,h.chars?(o=h.getCharData(D,b.fStyle,h.getFontByName(t.f).fFamily),x=r?0:o.w*t.finalSize/100):x=h.measureText(s,t.f,t.finalSize)," "===D?F+=x+S:(g+=x+S+F,F=0),p.push({l:x,an:x,add:c,n:r,anIndexes:[],val:s,line:u,animatorJustifyOffset:0}),2==m){if(c+=x,""===s||" "===s||e===i-1){for(""!==s&&" "!==s||(c-=x);d<=e;)p[d].an=c,p[d].ind=f,p[d].extra=x,d+=1;f+=1,c=0}}else if(3==m){if(c+=x,""===s||e===i-1){for(""===s&&(c-=x);d<=e;)p[d].an=c,p[d].ind=f,p[d].extra=x,d+=1;c=0,f+=1}}else p[f].ind=f,p[f].extra=0,f+=1;if(t.l=p,v=g>v?g:v,y.push(g),t.sz)t.boxWidth=t.sz[0],t.justifyOffset=0;else switch(t.boxWidth=v,t.j){case 1:t.justifyOffset=-t.boxWidth;break;case 2:t.justifyOffset=-t.boxWidth/2;break;default:t.justifyOffset=0}t.lineWidths=y;var w,I,V,B,R=l.a;n=R.length;var L=[];for(a=0;a0?s=this.ne.v/100:a=-this.ne.v/100,this.xe.v>0?n=1-this.xe.v/100:o=1+this.xe.v/100;var h=BezierFactory.getBezierEasing(s,a,n,o).get,l=0,p=this.finalS,f=this.finalE,m=this.data.sh;if(2===m)l=h(l=f===p?r>=f?1:0:t(0,e(.5/(f-p)+(r-p)/(f-p),1)));else if(3===m)l=h(l=f===p?r>=f?0:1:1-t(0,e(.5/(f-p)+(r-p)/(f-p),1)));else if(4===m)f===p?l=0:(l=t(0,e(.5/(f-p)+(r-p)/(f-p),1)))<.5?l*=2:l=1-2*(l-.5),l=h(l);else if(5===m){if(f===p)l=0;else{var c=f-p,d=-c/2+(r=e(t(0,r+.5-p),f-p)),u=c/2;l=Math.sqrt(1-d*d/(u*u))}l=h(l)}else 6===m?(f===p?l=0:(r=e(t(0,r+.5-p),f-p),l=(1+Math.cos(Math.PI+2*Math.PI*r/(f-p)))/2),l=h(l)):(r>=i(p)&&(l=t(0,e(r-p<0?e(f,1)-(p-r):f-r,1))),l=h(l));if(100!==this.sm.v){var y=.01*this.sm.v;0===y&&(y=1e-8);var g=.5-.5*y;l1&&(l=1)}return l*this.a.v},getValue:function(t){this.iterateDynamicProperties(),this._mdf=t||this._mdf,this._currentTextLength=this.elem.textProperty.currentData.l.length||0,t&&2===this.data.r&&(this.e.v=this._currentTextLength);var e=2===this.data.r?1:100/this.data.totalChars,i=this.o.v/e,r=this.s.v/e+i,s=this.e.v/e+i;if(r>s){var a=r;r=s,s=a}this.finalS=r,this.finalE=s}},extendPrototype([DynamicPropertyContainer],r),{getTextSelectorProp:function(t,e,i){return new r(t,e,i)}}}();function TextAnimatorDataProperty(t,e,i){var r={propType:!1},s=PropertyFactory.getProp,a=e.a;this.a={r:a.r?s(t,a.r,0,degToRads,i):r,rx:a.rx?s(t,a.rx,0,degToRads,i):r,ry:a.ry?s(t,a.ry,0,degToRads,i):r,sk:a.sk?s(t,a.sk,0,degToRads,i):r,sa:a.sa?s(t,a.sa,0,degToRads,i):r,s:a.s?s(t,a.s,1,.01,i):r,a:a.a?s(t,a.a,1,0,i):r,o:a.o?s(t,a.o,0,.01,i):r,p:a.p?s(t,a.p,1,0,i):r,sw:a.sw?s(t,a.sw,0,0,i):r,sc:a.sc?s(t,a.sc,1,0,i):r,fc:a.fc?s(t,a.fc,1,0,i):r,fh:a.fh?s(t,a.fh,0,0,i):r,fs:a.fs?s(t,a.fs,0,.01,i):r,fb:a.fb?s(t,a.fb,0,.01,i):r,t:a.t?s(t,a.t,0,0,i):r},this.s=TextSelectorProp.getTextSelectorProp(t,e.s,i),this.s.t=e.s.t}function TextAnimatorProperty(t,e,i){this._isFirstFrame=!0,this._hasMaskedPath=!1,this._frameId=-1,this._textData=t,this._renderType=e,this._elem=i,this._animatorsData=createSizedArray(this._textData.a.length),this._pathData={},this._moreOptions={alignment:{}},this.renderedLetters=[],this.lettersChangedFlag=!1,this.initDynamicPropertyContainer(i)}function ITextElement(){}TextAnimatorProperty.prototype.searchProperties=function(){var t,e,i=this._textData.a.length,r=PropertyFactory.getProp;for(t=0;t=o+ot||!d?(v=(o+ot-l)/h.partialLength,G=c.point[0]+(h.point[0]-c.point[0])*v,z=c.point[1]+(h.point[1]-c.point[1])*v,C.translate(-P[0]*T[s].an*.005,-P[1]*B*.01),p=!1):d&&(l+=h.partialLength,(f+=1)>=d.length&&(f=0,u[m+=1]?d=u[m].points:x.v.c?(f=0,d=u[m=0].points):(l-=h.partialLength,d=null)),d&&(c=h,y=(h=d[f]).partialLength));L=T[s].an/2-T[s].add,C.translate(-L,0,0)}else L=T[s].an/2-T[s].add,C.translate(-L,0,0),C.translate(-P[0]*T[s].an*.005,-P[1]*B*.01,0);for(F=0;Ft?this.textSpans[t].span:createNS(h?"g":"text"),y<=t){if(n.setAttribute("stroke-linecap","butt"),n.setAttribute("stroke-linejoin","round"),n.setAttribute("stroke-miterlimit","4"),this.textSpans[t].span=n,h){var g=createNS("g");n.appendChild(g),this.textSpans[t].childSpan=g}this.textSpans[t].span=n,this.layerElement.appendChild(n)}n.style.display="inherit"}if(l.reset(),p&&(o[t].n&&(f=-d,m+=i.yOffset,m+=c?1:0,c=!1),this.applyTextPropertiesToMatrix(i,l,o[t].line,f,m),f+=o[t].l||0,f+=d),h){var v;if(1===(u=this.globalData.fontManager.getCharData(i.finalText[t],r.fStyle,this.globalData.fontManager.getFontByName(i.f).fFamily)).t)v=new SVGCompElement(u.data,this.globalData,this);else{var b=emptyShapeData;u.data&&u.data.shapes&&(b=this.buildShapeData(u.data,i.finalSize)),v=new SVGShapeElement(b,this.globalData,this)}if(this.textSpans[t].glyph){var x=this.textSpans[t].glyph;this.textSpans[t].childSpan.removeChild(x.layerElement),x.destroy()}this.textSpans[t].glyph=v,v._debug=!0,v.prepareFrame(0),v.renderFrame(),this.textSpans[t].childSpan.appendChild(v.layerElement),1===u.t&&this.textSpans[t].childSpan.setAttribute("transform","scale("+i.finalSize/100+","+i.finalSize/100+")")}else p&&n.setAttribute("transform","translate("+l.props[12]+","+l.props[13]+")"),n.textContent=o[t].val,n.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve")}p&&n&&n.setAttribute("d","")}else{var P=this.textContainer,E="start";switch(i.j){case 1:E="end";break;case 2:E="middle";break;default:E="start"}P.setAttribute("text-anchor",E),P.setAttribute("letter-spacing",d);var S=this.buildTextContents(i.finalText);for(e=S.length,m=i.ps?i.ps[1]+i.ascent:0,t=0;t=0;e-=1)(this.completeLayers||this.elements[e])&&this.elements[e].prepareFrame(t-this.layers[e].st);if(this.globalData._mdf)for(e=0;e=0;i-=1)(this.completeLayers||this.elements[i])&&(this.elements[i].prepareFrame(this.renderedFrame-this.layers[i].st),this.elements[i]._mdf&&(this._mdf=!0))}},ICompElement.prototype.renderInnerContent=function(){var t,e=this.layers.length;for(t=0;t=0;i-=1)t.finalTransform.multiply(t.transforms[i].transform.mProps.v);t._mdf=s},processSequences:function(t){var e,i=this.sequenceList.length;for(e=0;e=1){this.buffers=[];var t=this.globalData.canvasContext,e=assetLoader.createCanvas(t.canvas.width,t.canvas.height);this.buffers.push(e);var i=assetLoader.createCanvas(t.canvas.width,t.canvas.height);this.buffers.push(i),this.data.tt>=3&&!document._isProxy&&assetLoader.loadLumaCanvas()}this.canvasContext=this.globalData.canvasContext,this.transformCanvas=this.globalData.transformCanvas,this.renderableEffectsManager=new CVEffects(this),this.searchEffectTransforms()},createContent:function(){},setBlendMode:function(){var t=this.globalData;if(t.blendMode!==this.data.bm){t.blendMode=this.data.bm;var e=getBlendMode(this.data.bm);t.canvasContext.globalCompositeOperation=e}},createRenderableComponents:function(){this.maskManager=new CVMaskElement(this.data,this),this.transformEffects=this.renderableEffectsManager.getEffects(effectTypes.TRANSFORM_EFFECT)},hideElement:function(){this.hidden||this.isInRange&&!this.isTransparent||(this.hidden=!0)},showElement:function(){this.isInRange&&!this.isTransparent&&(this.hidden=!1,this._isFirstFrame=!0,this.maskManager._isFirstFrame=!0)},clearCanvas:function(t){t.clearRect(this.transformCanvas.tx,this.transformCanvas.ty,this.transformCanvas.w*this.transformCanvas.sx,this.transformCanvas.h*this.transformCanvas.sy)},prepareLayer:function(){if(this.data.tt>=1){var t=this.buffers[0].getContext("2d");this.clearCanvas(t),t.drawImage(this.canvasContext.canvas,0,0),this.currentTransform=this.canvasContext.getTransform(),this.canvasContext.setTransform(1,0,0,1,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.setTransform(this.currentTransform)}},exitLayer:function(){if(this.data.tt>=1){var t=this.buffers[1],e=t.getContext("2d");if(this.clearCanvas(e),e.drawImage(this.canvasContext.canvas,0,0),this.canvasContext.setTransform(1,0,0,1,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.setTransform(this.currentTransform),this.comp.getElementById("tp"in this.data?this.data.tp:this.data.ind-1).renderFrame(!0),this.canvasContext.setTransform(1,0,0,1,0,0),this.data.tt>=3&&!document._isProxy){var i=assetLoader.getLumaCanvas(this.canvasContext.canvas);i.getContext("2d").drawImage(this.canvasContext.canvas,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.drawImage(i,0,0)}this.canvasContext.globalCompositeOperation=operationsMap[this.data.tt],this.canvasContext.drawImage(t,0,0),this.canvasContext.globalCompositeOperation="destination-over",this.canvasContext.drawImage(this.buffers[0],0,0),this.canvasContext.setTransform(this.currentTransform),this.canvasContext.globalCompositeOperation="source-over"}},renderFrame:function(t){if(!this.hidden&&!this.data.hd&&(1!==this.data.td||t)){this.renderTransform(),this.renderRenderable(),this.renderLocalTransform(),this.setBlendMode();var e=0===this.data.ty;this.prepareLayer(),this.globalData.renderer.save(e),this.globalData.renderer.ctxTransform(this.finalTransform.localMat.props),this.globalData.renderer.ctxOpacity(this.finalTransform.localOpacity),this.renderInnerContent(),this.globalData.renderer.restore(e),this.exitLayer(),this.maskManager.hasMasks&&this.globalData.renderer.restore(!0),this._isFirstFrame&&(this._isFirstFrame=!1)}},destroy:function(){this.canvasContext=null,this.data=null,this.globalData=null,this.maskManager.destroy()},mHelper:new Matrix},CVBaseElement.prototype.hide=CVBaseElement.prototype.hideElement,CVBaseElement.prototype.show=CVBaseElement.prototype.showElement,CVShapeData.prototype.setAsAnimated=SVGShapeData.prototype.setAsAnimated,extendPrototype([BaseElement,TransformElement,CVBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableElement],CVShapeElement),CVShapeElement.prototype.initElement=RenderableDOMElement.prototype.initElement,CVShapeElement.prototype.transformHelper={opacity:1,_opMdf:!1},CVShapeElement.prototype.dashResetter=[],CVShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,!0,[])},CVShapeElement.prototype.createStyleElement=function(t,e){var i={data:t,type:t.ty,preTransforms:this.transformsManager.addTransformSequence(e),transforms:[],elements:[],closed:!0===t.hd},r={};if("fl"===t.ty||"st"===t.ty?(r.c=PropertyFactory.getProp(this,t.c,1,255,this),r.c.k||(i.co="rgb("+bmFloor(r.c.v[0])+","+bmFloor(r.c.v[1])+","+bmFloor(r.c.v[2])+")")):"gf"!==t.ty&&"gs"!==t.ty||(r.s=PropertyFactory.getProp(this,t.s,1,null,this),r.e=PropertyFactory.getProp(this,t.e,1,null,this),r.h=PropertyFactory.getProp(this,t.h||{k:0},0,.01,this),r.a=PropertyFactory.getProp(this,t.a||{k:0},0,degToRads,this),r.g=new GradientProperty(this,t.g,this)),r.o=PropertyFactory.getProp(this,t.o,0,.01,this),"st"===t.ty||"gs"===t.ty){if(i.lc=lineCapEnum[t.lc||2],i.lj=lineJoinEnum[t.lj||2],1==t.lj&&(i.ml=t.ml),r.w=PropertyFactory.getProp(this,t.w,0,null,this),r.w.k||(i.wi=r.w.v),t.d){var s=new DashProperty(this,t.d,"canvas",this);r.d=s,r.d.k||(i.da=r.d.dashArray,i.do=r.d.dashoffset[0])}}else i.r=2===t.r?"evenodd":"nonzero";return this.stylesList.push(i),r.style=i,r},CVShapeElement.prototype.createGroupElement=function(){return{it:[],prevViewData:[]}},CVShapeElement.prototype.createTransformElement=function(t){return{transform:{opacity:1,_opMdf:!1,key:this.transformsManager.getNewKey(),op:PropertyFactory.getProp(this,t.o,0,.01,this),mProps:TransformPropertyFactory.getTransformProperty(this,t,this)}}},CVShapeElement.prototype.createShapeElement=function(t){var e=new CVShapeData(this,t,this.stylesList,this.transformsManager);return this.shapes.push(e),this.addShapeToModifiers(e),e},CVShapeElement.prototype.reloadShapes=function(){var t;this._isFirstFrame=!0;var e=this.itemsData.length;for(t=0;t=0;a-=1){if((h=this.searchProcessedElement(t[a]))?e[a]=i[h-1]:t[a]._shouldRender=r,"fl"===t[a].ty||"st"===t[a].ty||"gf"===t[a].ty||"gs"===t[a].ty)h?e[a].style.closed=!1:e[a]=this.createStyleElement(t[a],d),m.push(e[a].style);else if("gr"===t[a].ty){if(h)for(o=e[a].it.length,n=0;n=0;s-=1)"tr"===e[s].ty?(a=i[s].transform,this.renderShapeTransform(t,a)):"sh"===e[s].ty||"el"===e[s].ty||"rc"===e[s].ty||"sr"===e[s].ty?this.renderPath(e[s],i[s]):"fl"===e[s].ty?this.renderFill(e[s],i[s],a):"st"===e[s].ty?this.renderStroke(e[s],i[s],a):"gf"===e[s].ty||"gs"===e[s].ty?this.renderGradientFill(e[s],i[s],a):"gr"===e[s].ty?this.renderShape(a,e[s].it,i[s].it):e[s].ty;r&&this.drawLayer()},CVShapeElement.prototype.renderStyledShape=function(t,e){if(this._isFirstFrame||e._mdf||t.transforms._mdf){var i,r,s,a=t.trNodes,n=e.paths,o=n._length;a.length=0;var h=t.transforms.finalTransform;for(s=0;s=1?f=.99:f<=-1&&(f=-.99);var m=l*f,c=Math.cos(p+e.a.v)*m+o[0],d=Math.sin(p+e.a.v)*m+o[1];r=n.createRadialGradient(c,d,0,o[0],o[1],l)}var u=t.g.p,y=e.g.c,g=1;for(a=0;ao&&"xMidYMid slice"===h||ns&&"meet"===o||as&&"slice"===o)?(i-this.transformCanvas.w*(r/this.transformCanvas.h))/2*this.renderConfig.dpr:"xMax"===l&&(as&&"slice"===o)?(i-this.transformCanvas.w*(r/this.transformCanvas.h))*this.renderConfig.dpr:0,this.transformCanvas.ty="YMid"===p&&(a>s&&"meet"===o||as&&"meet"===o||a=0;t-=1)this.elements[t]&&this.elements[t].destroy&&this.elements[t].destroy();this.elements.length=0,this.globalData.canvasContext=null,this.animationItem.container=null,this.destroyed=!0},CanvasRendererBase.prototype.renderFrame=function(t,e){if((this.renderedFrame!==t||!0!==this.renderConfig.clearCanvas||e)&&!this.destroyed&&-1!==t){var i;this.renderedFrame=t,this.globalData.frameNum=t-this.animationItem._isFirstFrame,this.globalData.frameId+=1,this.globalData._mdf=!this.renderConfig.clearCanvas||e,this.globalData.projectInterface.currentFrame=t;var r=this.layers.length;for(this.completeLayers||this.checkLayers(t),i=r-1;i>=0;i-=1)(this.completeLayers||this.elements[i])&&this.elements[i].prepareFrame(t-this.layers[i].st);if(this.globalData._mdf){for(!0===this.renderConfig.clearCanvas?this.canvasContext.clearRect(0,0,this.transformCanvas.w,this.transformCanvas.h):this.save(),i=r-1;i>=0;i-=1)(this.completeLayers||this.elements[i])&&this.elements[i].renderFrame();!0!==this.renderConfig.clearCanvas&&this.restore()}}},CanvasRendererBase.prototype.buildItem=function(t){var e=this.elements;if(!e[t]&&99!==this.layers[t].ty){var i=this.createItem(this.layers[t],this,this.globalData);e[t]=i,i.initExpressions()}},CanvasRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){this.pendingElements.pop().checkParenting()}},CanvasRendererBase.prototype.hide=function(){this.animationItem.container.style.display="none"},CanvasRendererBase.prototype.show=function(){this.animationItem.container.style.display="block"},CVContextData.prototype.duplicate=function(){var t=2*this._length,e=0;for(e=this._length;e=0;t-=1)(this.completeLayers||this.elements[t])&&this.elements[t].renderFrame()},CVCompElement.prototype.destroy=function(){var t;for(t=this.layers.length-1;t>=0;t-=1)this.elements[t]&&this.elements[t].destroy();this.layers=null,this.elements=null},CVCompElement.prototype.createComp=function(t){return new CVCompElement(t,this.globalData,this)},extendPrototype([CanvasRendererBase],CanvasRenderer),CanvasRenderer.prototype.createComp=function(t){return new CVCompElement(t,this.globalData,this)},HBaseElement.prototype={checkBlendMode:function(){},initRendererElement:function(){this.baseElement=createTag(this.data.tg||"div"),this.data.hasMask?(this.svgElement=createNS("svg"),this.layerElement=createNS("g"),this.maskedElement=this.layerElement,this.svgElement.appendChild(this.layerElement),this.baseElement.appendChild(this.svgElement)):this.layerElement=this.baseElement,styleDiv(this.baseElement)},createContainerElements:function(){this.renderableEffectsManager=new CVEffects(this),this.transformedElement=this.baseElement,this.maskedElement=this.layerElement,this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl),0!==this.data.bm&&this.setBlendMode()},renderElement:function(){var t=this.transformedElement?this.transformedElement.style:{};if(this.finalTransform._matMdf){var e=this.finalTransform.mat.toCSS();t.transform=e,t.webkitTransform=e}this.finalTransform._opMdf&&(t.opacity=this.finalTransform.mProp.o.v)},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))},destroy:function(){this.layerElement=null,this.transformedElement=null,this.matteElement&&(this.matteElement=null),this.maskManager&&(this.maskManager.destroy(),this.maskManager=null)},createRenderableComponents:function(){this.maskManager=new MaskElement(this.data,this,this.globalData)},addEffects:function(){},setMatte:function(){}},HBaseElement.prototype.getBaseElement=SVGBaseElement.prototype.getBaseElement,HBaseElement.prototype.destroyBaseElement=HBaseElement.prototype.destroy,HBaseElement.prototype.buildElementParenting=BaseRenderer.prototype.buildElementParenting,extendPrototype([BaseElement,TransformElement,HBaseElement,HierarchyElement,FrameElement,RenderableDOMElement],HSolidElement),HSolidElement.prototype.createContent=function(){var t;this.data.hasMask?((t=createNS("rect")).setAttribute("width",this.data.sw),t.setAttribute("height",this.data.sh),t.setAttribute("fill",this.data.sc),this.svgElement.setAttribute("width",this.data.sw),this.svgElement.setAttribute("height",this.data.sh)):((t=createTag("div")).style.width=this.data.sw+"px",t.style.height=this.data.sh+"px",t.style.backgroundColor=this.data.sc),this.layerElement.appendChild(t)},extendPrototype([BaseElement,TransformElement,HSolidElement,SVGShapeElement,HBaseElement,HierarchyElement,FrameElement,RenderableElement],HShapeElement),HShapeElement.prototype._renderShapeFrame=HShapeElement.prototype.renderInnerContent,HShapeElement.prototype.createContent=function(){var t;if(this.baseElement.style.fontSize=0,this.data.hasMask)this.layerElement.appendChild(this.shapesContainer),t=this.svgElement;else{t=createNS("svg");var e=this.comp.data?this.comp.data:this.globalData.compSize;t.setAttribute("width",e.w),t.setAttribute("height",e.h),t.appendChild(this.shapesContainer),this.layerElement.appendChild(t)}this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.shapesContainer,0,[],!0),this.filterUniqueShapes(),this.shapeCont=t},HShapeElement.prototype.getTransformedPoint=function(t,e){var i,r=t.length;for(i=0;i0&&o<1&&f[m].push(this.calculateF(o,t,e,i,r,m)):(h=a*a-4*n*s)>=0&&((l=(-a+bmSqrt(h))/(2*s))>0&&l<1&&f[m].push(this.calculateF(l,t,e,i,r,m)),(p=(-a-bmSqrt(h))/(2*s))>0&&p<1&&f[m].push(this.calculateF(p,t,e,i,r,m))));this.shapeBoundingBox.left=bmMin.apply(null,f[0]),this.shapeBoundingBox.top=bmMin.apply(null,f[1]),this.shapeBoundingBox.right=bmMax.apply(null,f[0]),this.shapeBoundingBox.bottom=bmMax.apply(null,f[1])},HShapeElement.prototype.calculateF=function(t,e,i,r,s,a){return bmPow(1-t,3)*e[a]+3*bmPow(1-t,2)*t*i[a]+3*(1-t)*bmPow(t,2)*r[a]+bmPow(t,3)*s[a]},HShapeElement.prototype.calculateBoundingBox=function(t,e){var i,r=t.length;for(i=0;ii&&(i=s)}i*=t.mult}else i=t.v*t.mult;e.x-=i,e.xMax+=i,e.y-=i,e.yMax+=i},HShapeElement.prototype.currentBoxContains=function(t){return this.currentBBox.x<=t.x&&this.currentBBox.y<=t.y&&this.currentBBox.width+this.currentBBox.x>=t.x+t.width&&this.currentBBox.height+this.currentBBox.y>=t.y+t.height},HShapeElement.prototype.renderInnerContent=function(){if(this._renderShapeFrame(),!this.hidden&&(this._isFirstFrame||this._mdf)){var t=this.tempBoundingBox,e=999999;if(t.x=e,t.xMax=-e,t.y=e,t.yMax=-e,this.calculateBoundingBox(this.itemsData,t),t.width=t.xMax=0;t-=1){var r=this.hierarchy[t].finalTransform.mProp;this.mat.translate(-r.p.v[0],-r.p.v[1],r.p.v[2]),this.mat.rotateX(-r.or.v[0]).rotateY(-r.or.v[1]).rotateZ(r.or.v[2]),this.mat.rotateX(-r.rx.v).rotateY(-r.ry.v).rotateZ(r.rz.v),this.mat.scale(1/r.s.v[0],1/r.s.v[1],1/r.s.v[2]),this.mat.translate(r.a.v[0],r.a.v[1],r.a.v[2])}if(this.p?this.mat.translate(-this.p.v[0],-this.p.v[1],this.p.v[2]):this.mat.translate(-this.px.v,-this.py.v,this.pz.v),this.a){var s;s=this.p?[this.p.v[0]-this.a.v[0],this.p.v[1]-this.a.v[1],this.p.v[2]-this.a.v[2]]:[this.px.v-this.a.v[0],this.py.v-this.a.v[1],this.pz.v-this.a.v[2]];var a=Math.sqrt(Math.pow(s[0],2)+Math.pow(s[1],2)+Math.pow(s[2],2)),n=[s[0]/a,s[1]/a,s[2]/a],o=Math.sqrt(n[2]*n[2]+n[0]*n[0]),h=Math.atan2(n[1],o),l=Math.atan2(n[0],-n[2]);this.mat.rotateY(l).rotateX(-h)}this.mat.rotateX(-this.rx.v).rotateY(-this.ry.v).rotateZ(this.rz.v),this.mat.rotateX(-this.or.v[0]).rotateY(-this.or.v[1]).rotateZ(this.or.v[2]),this.mat.translate(this.globalData.compSize.w/2,this.globalData.compSize.h/2,0),this.mat.translate(0,0,this.pe.v);var p=!this._prevMat.equals(this.mat);if((p||this.pe._mdf)&&this.comp.threeDElements){var f,m,c;for(e=this.comp.threeDElements.length,t=0;t=t)return this.threeDElements[e].perspectiveElem;e+=1}return null},HybridRendererBase.prototype.createThreeDContainer=function(t,e){var i,r,s=createTag("div");styleDiv(s);var a=createTag("div");if(styleDiv(a),"3d"===e){(i=s.style).width=this.globalData.compSize.w+"px",i.height=this.globalData.compSize.h+"px";var n="50% 50%";i.webkitTransformOrigin=n,i.mozTransformOrigin=n,i.transformOrigin=n;var o="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)";(r=a.style).transform=o,r.webkitTransform=o}s.appendChild(a);var h={container:a,perspectiveElem:s,startPos:t,endPos:t,type:e};return this.threeDElements.push(h),h},HybridRendererBase.prototype.build3dContainers=function(){var t,e,i=this.layers.length,r="";for(t=0;t=0;t-=1)this.resizerElem.appendChild(this.threeDElements[t].perspectiveElem)},HybridRendererBase.prototype.addTo3dContainer=function(t,e){for(var i=0,r=this.threeDElements.length;in?(t=s/this.globalData.compSize.w,e=s/this.globalData.compSize.w,i=0,r=(a-this.globalData.compSize.h*(s/this.globalData.compSize.w))/2):(t=a/this.globalData.compSize.h,e=a/this.globalData.compSize.h,i=(s-this.globalData.compSize.w*(a/this.globalData.compSize.h))/2,r=0);var o=this.resizerElem.style;o.webkitTransform="matrix3d("+t+",0,0,0,0,"+e+",0,0,0,0,1,0,"+i+","+r+",0,1)",o.transform=o.webkitTransform},HybridRendererBase.prototype.renderFrame=SVGRenderer.prototype.renderFrame,HybridRendererBase.prototype.hide=function(){this.resizerElem.style.display="none"},HybridRendererBase.prototype.show=function(){this.resizerElem.style.display="block"},HybridRendererBase.prototype.initItems=function(){if(this.buildAllItems(),this.camera)this.camera.setup();else{var t,e=this.globalData.compSize.w,i=this.globalData.compSize.h,r=this.threeDElements.length;for(t=0;t=o;)t/=2,e/=2,i>>>=1;return(t+i)/e};return b.int32=function(){return 0|v.g(4)},b.quick=function(){return v.g(4)/4294967296},b.double=b,m(c(v.S),t),(d.pass||u||function(t,i,r,s){return s&&(s.S&&p(s,v),t.state=function(){return p(v,{})}),r?(e.random=t,i):t})(b,g,"global"in d?d.global:this==e,d.state)},m(e.random(),t)}function initialize$2(t){seedRandom([],t)}var propTypes={SHAPE:"shape"};function _typeof$1(t){return _typeof$1="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof$1(t)}var ExpressionManager=function(){var ob={},Math=BMMath,window=null,document=null,XMLHttpRequest=null,fetch=null,frames=null,_lottieGlobal={};function resetFrame(){_lottieGlobal={}}function $bm_isInstanceOfArray(t){return t.constructor===Array||t.constructor===Float32Array}function isNumerable(t,e){return"number"===t||e instanceof Number||"boolean"===t||"string"===t}function $bm_neg(t){var e=_typeof$1(t);if("number"===e||t instanceof Number||"boolean"===e)return-t;if($bm_isInstanceOfArray(t)){var i,r=t.length,s=[];for(i=0;ii){var r=i;i=e,e=r}return Math.min(Math.max(t,e),i)}function radiansToDegrees(t){return t/degToRads}var radians_to_degrees=radiansToDegrees;function degreesToRadians(t){return t*degToRads}var degrees_to_radians=radiansToDegrees,helperLengthArray=[0,0,0,0,0,0];function length(t,e){if("number"==typeof t||t instanceof Number)return e=e||0,Math.abs(t-e);var i;e||(e=helperLengthArray);var r=Math.min(t.length,e.length),s=0;for(i=0;i.5?l/(2-n-o):l/(n+o),n){case r:e=(s-a)/l+(s1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}function hslToRgb(t){var e,i,r,s=t[0],a=t[1],n=t[2];if(0===a)e=n,r=n,i=n;else{var o=n<.5?n*(1+a):n+a-n*a,h=2*n-o;e=hue2rgb(h,o,s+1/3),i=hue2rgb(h,o,s),r=hue2rgb(h,o,s-1/3)}return[e,i,r,t[3]]}function linear(t,e,i,r,s){if(void 0!==r&&void 0!==s||(r=e,s=i,e=0,i=1),i=i)return s;var n,o=i===e?0:(t-e)/(i-e);if(!r.length)return r+(s-r)*o;var h=r.length,l=createTypedArray("float32",h);for(n=0;n1){for(r=0;r1?e=1:e<0&&(e=0);var n=t(e);if($bm_isInstanceOfArray(s)){var o,h=s.length,l=createTypedArray("float32",h);for(o=0;odata.k[e].t&&tdata.k[e+1].t-t?(i=e+2,r=data.k[e+1].t):(i=e+1,r=data.k[e].t);break}}-1===i&&(i=e+1,r=data.k[e].t)}else i=0,r=0;var a={};return a.index=i,a.time=r/elem.comp.globalData.frameRate,a}function key(t){var e,i,r;if(!data.k.length||"number"==typeof data.k[0])throw new Error("The property has no keyframe at index "+t);t-=1,e={time:data.k[t].t/elem.comp.globalData.frameRate,value:[]};var s=Object.prototype.hasOwnProperty.call(data.k[t],"s")?data.k[t].s:data.k[t-1].e;for(r=s.length,i=0;il.length-1)&&(e=l.length-1),r=p-(s=l[l.length-1-e].t)),"pingpong"===t){if(Math.floor((h-s)/r)%2!=0)return this.getValueAtTime((r-(h-s)%r+s)/this.comp.globalData.frameRate,0)}else{if("offset"===t){var f=this.getValueAtTime(s/this.comp.globalData.frameRate,0),m=this.getValueAtTime(p/this.comp.globalData.frameRate,0),c=this.getValueAtTime(((h-s)%r+s)/this.comp.globalData.frameRate,0),d=Math.floor((h-s)/r);if(this.pv.length){for(n=(o=new Array(f.length)).length,a=0;a=p)return this.pv;if(i?s=p+(r=e?Math.abs(this.elem.comp.globalData.frameRate*e):Math.max(0,this.elem.data.op-p)):((!e||e>l.length-1)&&(e=l.length-1),r=(s=l[e].t)-p),"pingpong"===t){if(Math.floor((p-h)/r)%2==0)return this.getValueAtTime(((p-h)%r+p)/this.comp.globalData.frameRate,0)}else{if("offset"===t){var f=this.getValueAtTime(p/this.comp.globalData.frameRate,0),m=this.getValueAtTime(s/this.comp.globalData.frameRate,0),c=this.getValueAtTime((r-(p-h)%r+p)/this.comp.globalData.frameRate,0),d=Math.floor((p-h)/r)+1;if(this.pv.length){for(n=(o=new Array(f.length)).length,a=0;a1?(s+t-a)/(e-1):1,o=0,h=0;for(i=this.pv.length?createTypedArray("float32",this.pv.length):0;on){var p=o,f=i.c&&o===h-1?0:o+1,m=(n-l)/a[o].addedLength;r=bez.getPointInSegment(i.v[p],i.v[f],i.o[p],i.i[f],m,a[o]);break}l+=a[o].addedLength,o+=1}return r||(r=i.c?[i.v[0][0],i.v[0][1]]:[i.v[i._length-1][0],i.v[i._length-1][1]]),r},vectorOnPath:function(t,e,i){1==t?t=this.v.c:0==t&&(t=.999);var r=this.pointOnPath(t,e),s=this.pointOnPath(t+.001,e),a=s[0]-r[0],n=s[1]-r[1],o=Math.sqrt(Math.pow(a,2)+Math.pow(n,2));return 0===o?[0,0]:"tangent"===i?[a/o,n/o]:[-n/o,a/o]},tangentOnPath:function(t,e){return this.vectorOnPath(t,e,"tangent")},normalOnPath:function(t,e){return this.vectorOnPath(t,e,"normal")},setGroupProperty:expressionHelpers.setGroupProperty,getValueAtTime:expressionHelpers.getStaticValueAtTime},extendPrototype([l],o),extendPrototype([l],h),h.prototype.getValueAtTime=function(t){return this._cachingAtTime||(this._cachingAtTime={shapeValue:shapePool.clone(this.pv),lastIndex:0,lastTime:initialDefaultFrame}),t*=this.elem.globalData.frameRate,(t-=this.offsetTime)!==this._cachingAtTime.lastTime&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastTime=l?c<0?r:s:r+m*Math.pow((a-t)/c,1/i),p[f]=n,f+=1,o+=256/255;return p.join(" ")},SVGProLevelsFilter.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e,i=this.filterManager.effectElements;this.feFuncRComposed&&(t||i[3].p._mdf||i[4].p._mdf||i[5].p._mdf||i[6].p._mdf||i[7].p._mdf)&&(e=this.getTableValue(i[3].p.v,i[4].p.v,i[5].p.v,i[6].p.v,i[7].p.v),this.feFuncRComposed.setAttribute("tableValues",e),this.feFuncGComposed.setAttribute("tableValues",e),this.feFuncBComposed.setAttribute("tableValues",e)),this.feFuncR&&(t||i[10].p._mdf||i[11].p._mdf||i[12].p._mdf||i[13].p._mdf||i[14].p._mdf)&&(e=this.getTableValue(i[10].p.v,i[11].p.v,i[12].p.v,i[13].p.v,i[14].p.v),this.feFuncR.setAttribute("tableValues",e)),this.feFuncG&&(t||i[17].p._mdf||i[18].p._mdf||i[19].p._mdf||i[20].p._mdf||i[21].p._mdf)&&(e=this.getTableValue(i[17].p.v,i[18].p.v,i[19].p.v,i[20].p.v,i[21].p.v),this.feFuncG.setAttribute("tableValues",e)),this.feFuncB&&(t||i[24].p._mdf||i[25].p._mdf||i[26].p._mdf||i[27].p._mdf||i[28].p._mdf)&&(e=this.getTableValue(i[24].p.v,i[25].p.v,i[26].p.v,i[27].p.v,i[28].p.v),this.feFuncB.setAttribute("tableValues",e)),this.feFuncA&&(t||i[31].p._mdf||i[32].p._mdf||i[33].p._mdf||i[34].p._mdf||i[35].p._mdf)&&(e=this.getTableValue(i[31].p.v,i[32].p.v,i[33].p.v,i[34].p.v,i[35].p.v),this.feFuncA.setAttribute("tableValues",e))}},extendPrototype([SVGComposableEffect],SVGDropShadowEffect),SVGDropShadowEffect.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){if((t||this.filterManager.effectElements[4].p._mdf)&&this.feGaussianBlur.setAttribute("stdDeviation",this.filterManager.effectElements[4].p.v/4),t||this.filterManager.effectElements[0].p._mdf){var e=this.filterManager.effectElements[0].p.v;this.feFlood.setAttribute("flood-color",rgbToHex(Math.round(255*e[0]),Math.round(255*e[1]),Math.round(255*e[2])))}if((t||this.filterManager.effectElements[1].p._mdf)&&this.feFlood.setAttribute("flood-opacity",this.filterManager.effectElements[1].p.v/255),t||this.filterManager.effectElements[2].p._mdf||this.filterManager.effectElements[3].p._mdf){var i=this.filterManager.effectElements[3].p.v,r=(this.filterManager.effectElements[2].p.v-90)*degToRads,s=i*Math.cos(r),a=i*Math.sin(r);this.feOffset.setAttribute("dx",s),this.feOffset.setAttribute("dy",a)}}};var _svgMatteSymbols=[];function SVGMatte3Effect(t,e,i){this.initialized=!1,this.filterManager=e,this.filterElem=t,this.elem=i,i.matteElement=createNS("g"),i.matteElement.appendChild(i.layerElement),i.matteElement.appendChild(i.transformedElement),i.baseElement=i.matteElement}function SVGGaussianBlurEffect(t,e,i,r){t.setAttribute("x","-100%"),t.setAttribute("y","-100%"),t.setAttribute("width","300%"),t.setAttribute("height","300%"),this.filterManager=e;var s=createNS("feGaussianBlur");s.setAttribute("result",r),t.appendChild(s),this.feGaussianBlur=s}function TransformEffect(){}function SVGTransformEffect(t,e){this.init(e)}function CVTransformEffect(t){this.init(t)}return SVGMatte3Effect.prototype.findSymbol=function(t){for(var e=0,i=_svgMatteSymbols.length;e ', + + Humidity_30: ' ', + + Humidity_50: ' ', + + Humidity_70: ' ', + + Humidity_90: ' ' +} + + +// pressure + + +const WidgetsPressure = { + + LowPressure: ' ', + + LowMedPressure: ' ', + + MediumPressure: ' ', + + HighPressure: ' ', + + VeryHighPressure: ' ' +} + +// wind + +const WidgetsWindDirections = { + + SouthArrow: ' ', + + EastArrow: ' ', + + NorthEastArrow: ' ', + + NorthWestArrow: ' ', + + NorthArrow: ' ', + + SouthWestArrow: ' ', + + WestArrow: ' ' +} + + +// uv text + + +const Uv_0 = 'A UV index is satisfactory, indicating that there is little or no risk of harm from ultraviolet radiation.'; +const Uv_1 = 'Conditions are generally low-risk, indicating that exposure to ultraviolet radiation poses a minimal threat.'; +const Uv_2 = 'Low exposure level with minimal risk of harm from UV radiation, suitable for most people.'; +const Uv_3 = 'Moderate risk of harm from unprotected sun exposure, protective measures recommended.'; +const Uv_4 = 'Moderate risk of harm from unprotected sun exposure, protective measures recommended.'; +const Uv_5 = 'Moderate risk of harm from unprotected sun exposure, protective measures recommended.'; +const Uv_6 = 'High risk of harm from unprotected sun exposure, protective measures required.'; +const Uv_7 = 'High risk of harm from unprotected sun exposure, protective measures required.'; +const Uv_8 = 'Very high risk of harm from unprotected sun exposure, extra precautions required.'; +const Uv_9 = 'Very high risk of harm from unprotected sun exposure, extra precautions required.'; +const Uv_10 = 'Very high risk of harm from unprotected sun exposure, extra precautions required.'; +const Uv_11 = 'Extreme risk of harm from unprotected sun exposure, full protection necessary.'; +const Uv_12 = 'Extreme risk of harm from unprotected sun exposure, full protection necessary.'; +const Uv_13 = 'Extreme risk of harm from unprotected sun exposure, full protection necessary.'; + +// aqi text + +const aqiText = { + 1: { + level: "good", + message: "air_quality_satisfactory", + }, + 2: { + level: "fair", + message: "air_quality_acceptable", + }, + 3: { + level: "moderate", + message: "sensitive_groups_health_effects", + }, + 4: { + level: "poor", + message: "health_effects_public", + }, + 5: { + level: "very_poor", + message: "emergency_conditions", + } +}; + diff --git a/app/src/main/assets/modules/ripple_acc.js b/app/src/main/assets/modules/ripple_acc.js new file mode 100644 index 000000000..dcc5d5fe3 --- /dev/null +++ b/app/src/main/assets/modules/ripple_acc.js @@ -0,0 +1,46 @@ + +document.addEventListener('DOMContentLoaded', function () { + var addripple = document.querySelectorAll('.ripple_btn'); + + addripple.forEach(function (element) { + var createRippleForOne = document.createElement('md-ripple'); + element.appendChild(createRippleForOne); + element.style.position = 'relative'; + }); +}); + +document.addEventListener('DOMContentLoaded', function () { + var addrippleDark = document.querySelectorAll('.ripple_btn_dark'); + + addrippleDark.forEach(function (elementDark) { + var createRippleForOneDark = document.createElement('md-ripple'); + elementDark.appendChild(createRippleForOneDark); + elementDark.style.position = 'relative'; + createRippleForOneDark.style = '--md-ripple-pressed-color: var(--Inverse-On-Surface);' + }); +}); + +document.addEventListener('DOMContentLoaded', function () { + var addrippleDarkFixed = document.querySelectorAll('.ripple_btn_dark_fix'); + + addrippleDarkFixed.forEach(function (elementDarkFixed) { + var createRippleForOneDarkFixed = document.createElement('md-ripple'); + elementDarkFixed.appendChild(createRippleForOneDarkFixed); + elementDarkFixed.style.position = 'relative'; + createRippleForOneDarkFixed.style = '--md-ripple-pressed-color: black'; + }); +}); + + + +document.addEventListener('DOMContentLoaded', function () { + var addripplelow = document.querySelectorAll('.ripple_btn_low'); + + addripplelow.forEach(function (elementrippleLow) { + var createRippleForOnelow = document.createElement('md-ripple'); + elementrippleLow.appendChild(createRippleForOnelow); + elementrippleLow.style.position = 'relative'; + createRippleForOnelow.style = '--md-ripple-pressed-opacity: 0.13;' + }); +}); + diff --git a/app/src/main/assets/modules/scroll.js b/app/src/main/assets/modules/scroll.js new file mode 100644 index 000000000..c8d7f9b59 --- /dev/null +++ b/app/src/main/assets/modules/scroll.js @@ -0,0 +1,34 @@ +const weatherWrap = document.getElementById('weather_wrap'); +const mainWeat = document.querySelector('.main-weat'); +const maxHeight = 180; +const minHeight = 0; +const maxOpacity = 1; +const minOpacity = 0; + +let ticking = false; + +if(weatherWrap){ +weatherWrap.addEventListener('scroll', function() { + if (!ticking) { + window.requestAnimationFrame(() => { + const scrollPosition = weatherWrap.scrollTop; + const newHeight = Math.max(minHeight, maxHeight - scrollPosition); + const newOpacity = Math.max(minOpacity, maxOpacity - (scrollPosition / maxHeight)); + mainWeat.style.transform = `scale(${newOpacity})`; + mainWeat.style.opacity = newOpacity; + document.querySelector('.froggie').style.opacity = newOpacity; + + if(scrollPosition > 100){ + document.querySelector('.header-top').classList.add('use'); + + } else{ + document.querySelector('.header-top').classList.remove('use'); + + } + ticking = false; + }); + ticking = true; + } +});} + + diff --git a/app/src/main/assets/modules/sun-tracker.js b/app/src/main/assets/modules/sun-tracker.js new file mode 100644 index 000000000..59a6bbb2c --- /dev/null +++ b/app/src/main/assets/modules/sun-tracker.js @@ -0,0 +1,53 @@ +function moveSun(percent) { + const circle = document.querySelector('.sun_tracker'); + + if (percent === 10) { + circle.style.transform = `translate(10px, -12px)`; + } else if (percent === 20) { + circle.style.transform = `translate(20px, -20px)`; + } else if (percent === 30) { + circle.style.transform = `translate(30px, -30px)`; + } else if (percent === 40) { + circle.style.transform = `translate(40px, -40px)`; + } else if (percent === 50) { + circle.style.transform = `translate(62px, -45px)`; + } else if (percent === 60) { + circle.style.transform = `translate(80px, -40px)`; + } else if (percent === 70) { + circle.style.transform = `translate(95px, -32px)`; + } else if (percent === 80) { + circle.style.transform = `translate(110px, -20px)`; + } else if (percent === 90) { + circle.style.transform = `translate(125px, -8px)`; + } else if (percent === 100) { + circle.style.transform = `translate(133px, -0px)`; + + } else { + const block = document.querySelector('.block'); + const blockWidth = block.offsetWidth; + const blockHeight = block.offsetHeight; + + const t = percent / 100; + + const x = t * blockWidth; + const y = blockHeight * (1 - 4 * (t - 0.5) ** 2); + + circle.style.transform = `translate(${x}px, ${y - 15}px)`; + } + } + + +// toggle summary + +function openSummery(){ + document.querySelector('.summeryText').classList.toggle('openSummery'); + + if(document.querySelector('.summeryText').classList.contains('openSummery')){ + document.querySelector('#arrow_up_toggle').innerHTML = 'keyboard_arrow_up' + + } else{ + document.querySelector('#arrow_up_toggle').innerHTML = 'keyboard_arrow_down'; + + } +} + diff --git a/app/src/main/assets/modules/units.js b/app/src/main/assets/modules/units.js new file mode 100644 index 000000000..f93d4a494 --- /dev/null +++ b/app/src/main/assets/modules/units.js @@ -0,0 +1,1152 @@ +function celsiusToFahrenheit(celsius) { + return (celsius * 9 / 5) + 32; +} + +function kmhToMph(kmh) { + return kmh * 0.621371; +} + +function kmToMiles(km) { + return km * 0.621371; +} + +function mmToInches(mm) { + return mm * 0.0393701; +} + +function hPaToInHg(hPa) { + return hPa * 0.02953; +} + +function hPaToMmHg(hPa) { + return hPa * 0.750062; +} + +function inchesToMm(inches) { + return inches * 25.4; +} + + + +// Weather Icons + +function GetWeatherIcon(iconCode, isDay) { + + + if (isDay === 1) { + if (iconCode === 0) { + return 'weather-icons/clear_day.svg'; + } else if (iconCode === 1) { + return 'weather-icons/mostly_clear_day.svg'; + } else if (iconCode === 2) { + return 'weather-icons/partly_cloudy_day.svg'; + + } else if (iconCode === 3) { + return 'weather-icons/cloudy.svg'; + + } else if (iconCode === 45 || iconCode === 48) { + return 'weather-icons/haze_fog_dust_smoke.svg'; + + } else if (iconCode === 51 || iconCode === 53 || iconCode === 55) { + + return 'weather-icons/drizzle.svg'; + + } else if (iconCode === 56 || iconCode === 57) { + + return 'weather-icons/mixed_rain_hail_sleet.svg'; + + } else if (iconCode === 61 || iconCode === 63) { + + return 'weather-icons/showers_rain.svg'; + + } else if (iconCode === 65) { + + return 'weather-icons/heavy_rain.svg'; + + } else if (iconCode === 66 || iconCode === 67) { + + return 'weather-icons/sleet_hail.svg'; + + } else if (iconCode === 71) { + + return 'weather-icons/scattered_snow_showers_day.svg'; + + } else if (iconCode === 73) { + + return 'weather-icons/showers_snow.svg'; + + } else if (iconCode === 75) { + + return 'weather-icons/heavy_snow.svg'; + + } else if (iconCode === 77) { + + return 'weather-icons/flurries.svg'; + + } else if (iconCode === 80 || iconCode === 81) { + + return 'weather-icons/showers_rain.svg'; + + } else if (iconCode === 82) { + + return 'weather-icons/heavy_rain.svg'; + + } else if (iconCode === 85) { + + return 'weather-icons/showers_snow.svg'; + + } else if (iconCode === 86) { + + return 'weather-icons/heavy_snow.svg'; + + } else if (iconCode === 95) { + + return 'weather-icons/isolated_thunderstorms.svg' + + } else if (iconCode === 96 || iconCode === 99) { + + return 'weather-icons/strong_thunderstorms.svg' + + } + } else { + if (iconCode === 0) { + + return 'weather-icons/clear_night.svg'; + + } else if (iconCode === 1) { + + return 'weather-icons/mostly_clear_night.svg'; + + } else if (iconCode === 2) { + + return 'weather-icons/partly_cloudy_night.svg'; + + } else if (iconCode === 3) { + + return 'weather-icons/cloudy.svg'; + + } else if (iconCode === 45 || iconCode === 48) { + + return 'weather-icons/haze_fog_dust_smoke.svg'; + + } else if (iconCode === 51 || iconCode === 53 || iconCode === 55) { + + return 'weather-icons/drizzle.svg'; + + } else if (iconCode === 56 || iconCode === 57) { + + return 'weather-icons/mixed_rain_hail_sleet.svg'; + + } else if (iconCode === 61 || iconCode === 63) { + + return 'weather-icons/showers_rain.svg'; + + } else if (iconCode === 65) { + + return 'weather-icons/heavy_rain.svg'; + + } else if (iconCode === 66 || iconCode === 67) { + + return 'weather-icons/sleet_hail.svg'; + + } else if (iconCode === 71) { + + return 'weather-icons/scattered_snow_showers_night.svg'; + + } else if (iconCode === 73) { + + return 'weather-icons/showers_snow.svg'; + + } else if (iconCode === 75) { + + return 'weather-icons/heavy_snow.svg'; + + } else if (iconCode === 77) { + + return 'weather-icons/flurries.svg'; + + } else if (iconCode === 80 || iconCode === 81) { + + return 'weather-icons/showers_rain.svg'; + + } else if (iconCode === 82) { + + return 'weather-icons/heavy_rain.svg'; + + } else if (iconCode === 85) { + + return 'weather-icons/showers_snow.svg'; + + } else if (iconCode === 86) { + + return 'weather-icons/heavy_snow.svg'; + + } else if (iconCode === 95) { + + return 'weather-icons/isolated_thunderstorms.svg' + + } else if (iconCode === 96 || iconCode === 99) { + + return 'weather-icons/strong_thunderstorms.svg' + + } + } + + + + + return iconCode +} + + +// Weather label + + +function GetWeatherLabel(iconCode, isDay) { + + + if (isDay === 1) { + if (iconCode === 0) { + if(localStorage.getItem('UseBackgroundAnimations') && localStorage.getItem('UseBackgroundAnimations') === 'false'){ + }else{ + removeClouds() + removeRain() + removeFog() + removeSnow() + removeStars() + removeThunder() + } + return 'clear_sky' + + } else if (iconCode === 1) { + if(localStorage.getItem('UseBackgroundAnimations') && localStorage.getItem('UseBackgroundAnimations') === 'false'){ + }else{ + displayClouds() + removeRain() + removeFog() + removeSnow() + removeStars() + removeThunder()} + return 'mostly_clear' + + } else if (iconCode === 2) { + if(localStorage.getItem('UseBackgroundAnimations') && localStorage.getItem('UseBackgroundAnimations') === 'false'){ + }else{ + displayClouds() + removeRain() + removeFog() + removeSnow() + removeStars() + removeThunder()} + return 'partly_cloudy' + + } else if (iconCode === 3) { + if(localStorage.getItem('UseBackgroundAnimations') && localStorage.getItem('UseBackgroundAnimations') === 'false'){ + }else{ + displayClouds() + removeRain() + removeFog() + removeSnow() + removeStars() + removeThunder()} + return 'overcast' + + } else if (iconCode === 45 || iconCode === 48) { + if(localStorage.getItem('UseBackgroundAnimations') && localStorage.getItem('UseBackgroundAnimations') === 'false'){ + }else{ + removeClouds() + removeRain() + displayFog() + removeSnow() + removeStars() + removeThunder()} + return 'fog' + + } else if (iconCode === 51 || iconCode === 53 || iconCode === 55) { + if(localStorage.getItem('UseBackgroundAnimations') && localStorage.getItem('UseBackgroundAnimations') === 'false'){ + }else{ + removeClouds() + displayRain() + removeFog() + removeSnow() + removeStars() + removeThunder()} + return 'drizzle' + + } else if (iconCode === 56 || iconCode === 57) { + if(localStorage.getItem('UseBackgroundAnimations') && localStorage.getItem('UseBackgroundAnimations') === 'false'){ + }else{ + removeClouds() + displayRain() + removeFog() + removeSnow() + removeStars() + removeThunder()} + return 'freezing_drizzle' + + } else if (iconCode === 61 || iconCode === 63) { + if(localStorage.getItem('UseBackgroundAnimations') && localStorage.getItem('UseBackgroundAnimations') === 'false'){ + }else{ + removeClouds() + displayRain() + removeFog() + removeSnow() + removeStars() + removeThunder()} + return 'moderate_rain' + + } else if (iconCode === 65) { + if(localStorage.getItem('UseBackgroundAnimations') && localStorage.getItem('UseBackgroundAnimations') === 'false'){ + }else{ + removeClouds() + displayRain() + removeFog() + removeSnow() + removeStars() + removeThunder()} + return 'heavy_intensity_rain' + + } else if (iconCode === 66 || iconCode === 67) { + if(localStorage.getItem('UseBackgroundAnimations') && localStorage.getItem('UseBackgroundAnimations') === 'false'){ + }else{ + removeClouds() + displayRain() + removeFog() + removeSnow() + removeStars() + removeThunder()} + return 'freezing_rain' + + } else if (iconCode === 71) { + if(localStorage.getItem('UseBackgroundAnimations') && localStorage.getItem('UseBackgroundAnimations') === 'false'){ + }else{ + removeClouds() + removeRain() + removeFog() + displaySnow() + removeStars() + removeThunder()} + return 'slight_snow' + + } else if (iconCode === 73) { + if(localStorage.getItem('UseBackgroundAnimations') && localStorage.getItem('UseBackgroundAnimations') === 'false'){ + }else{ + removeClouds() + removeRain() + removeFog() + displaySnow() + removeStars() + removeThunder()} + return 'moderate_snow' + + } else if (iconCode === 75) { + if(localStorage.getItem('UseBackgroundAnimations') && localStorage.getItem('UseBackgroundAnimations') === 'false'){ + }else{ + removeClouds() + removeRain() + removeFog() + displaySnow() + removeStars() + removeThunder()} + return 'heavy_intensity_snow' + + } else if (iconCode === 77) { + if(localStorage.getItem('UseBackgroundAnimations') && localStorage.getItem('UseBackgroundAnimations') === 'false'){ + }else{ + removeClouds() + removeRain() + removeFog() + displaySnow() + removeStars() + removeThunder()} + return 'snow_grains' + + } else if (iconCode === 80 || iconCode === 81) { + if(localStorage.getItem('UseBackgroundAnimations') && localStorage.getItem('UseBackgroundAnimations') === 'false'){ + }else{ + removeClouds() + displayRain() + removeFog() + removeSnow() + removeStars() + removeThunder()} + return 'rain_showers' + + } else if (iconCode === 82) { + if(localStorage.getItem('UseBackgroundAnimations') && localStorage.getItem('UseBackgroundAnimations') === 'false'){ + }else{ + removeClouds() + displayRain() + removeFog() + removeSnow() + removeStars() + removeThunder()} + return 'heavy_rain_showers' + + } else if (iconCode === 85) { + if(localStorage.getItem('UseBackgroundAnimations') && localStorage.getItem('UseBackgroundAnimations') === 'false'){ + }else{ + removeClouds() + removeRain() + removeFog() + displaySnow() + removeStars() + removeThunder()} + return 'slight_snow_showers' + + } else if (iconCode === 86) { + if(localStorage.getItem('UseBackgroundAnimations') && localStorage.getItem('UseBackgroundAnimations') === 'false'){ + }else{ + removeClouds() + removeRain() + removeFog() + displaySnow() + removeStars() + removeThunder()} + return 'heavy_snow_showers' + + } else if (iconCode === 95) { + if(localStorage.getItem('UseBackgroundAnimations') && localStorage.getItem('UseBackgroundAnimations') === 'false'){ + }else{ + removeClouds() + displayRain() + removeFog() + removeSnow() + removeStars() + displayThunder()} + return 'thunderstorm' + + } else if (iconCode === 96 || iconCode === 99) { + if(localStorage.getItem('UseBackgroundAnimations') && localStorage.getItem('UseBackgroundAnimations') === 'false'){ + }else{ + removeClouds() + displayRain() + removeFog() + removeSnow() + removeStars() + displayThunder()} + return 'strong_thunderstorm' + + } + } else { + if (iconCode === 0) { + if(localStorage.getItem('UseBackgroundAnimations') && localStorage.getItem('UseBackgroundAnimations') === 'false'){ + }else{ + removeClouds() + removeRain() + removeFog() + removeSnow() + displayStars() + removeThunder()} + return 'clear_sky' + + } else if (iconCode === 1) { + if(localStorage.getItem('UseBackgroundAnimations') && localStorage.getItem('UseBackgroundAnimations') === 'false'){ + }else{ + displayClouds() + removeRain() + removeFog() + removeSnow() + displayStars() + removeThunder()} + return 'mostly_clear' + + } else if (iconCode === 2) { + if(localStorage.getItem('UseBackgroundAnimations') && localStorage.getItem('UseBackgroundAnimations') === 'false'){ + }else{ + displayClouds() + removeRain() + removeFog() + removeSnow() + removeStars() + removeThunder()} + return 'partly_cloudy' + + } else if (iconCode === 3) { + if(localStorage.getItem('UseBackgroundAnimations') && localStorage.getItem('UseBackgroundAnimations') === 'false'){ + }else{ + displayClouds() + removeRain() + removeFog() + removeSnow() + removeStars() + removeThunder()} + return 'overcast' + + } else if (iconCode === 45 || iconCode === 48) { + if(localStorage.getItem('UseBackgroundAnimations') && localStorage.getItem('UseBackgroundAnimations') === 'false'){ + }else{ + removeClouds() + removeRain() + displayFog() + removeSnow() + removeStars() + removeThunder()} + return 'fog' + + } else if (iconCode === 51 || iconCode === 53 || iconCode === 55) { + if(localStorage.getItem('UseBackgroundAnimations') && localStorage.getItem('UseBackgroundAnimations') === 'false'){ + }else{ + removeClouds() + displayRain() + removeFog() + removeSnow() + removeStars() + removeThunder()} + return 'drizzle' + + } else if (iconCode === 56 || iconCode === 57) { + if(localStorage.getItem('UseBackgroundAnimations') && localStorage.getItem('UseBackgroundAnimations') === 'false'){ + }else{ + removeClouds() + displayRain() + removeFog() + removeSnow() + removeStars() + removeThunder()} + return 'freezing_drizzle' + + } else if (iconCode === 61 || iconCode === 63) { + if(localStorage.getItem('UseBackgroundAnimations') && localStorage.getItem('UseBackgroundAnimations') === 'false'){ + }else{ + removeClouds() + displayRain() + removeFog() + removeSnow() + removeStars() + removeThunder()} + return 'moderate_rain' + + } else if (iconCode === 65) { + if(localStorage.getItem('UseBackgroundAnimations') && localStorage.getItem('UseBackgroundAnimations') === 'false'){ + }else{ + removeClouds() + displayRain() + removeFog() + removeSnow() + removeStars() + removeThunder()} + return 'heavy_intensity_rain' + + } else if (iconCode === 66 || iconCode === 67) { + if(localStorage.getItem('UseBackgroundAnimations') && localStorage.getItem('UseBackgroundAnimations') === 'false'){ + }else{ + removeClouds() + displayRain() + removeFog() + removeSnow() + removeStars() + removeThunder()} + return 'freezing_rain' + + } else if (iconCode === 71) { + if(localStorage.getItem('UseBackgroundAnimations') && localStorage.getItem('UseBackgroundAnimations') === 'false'){ + }else{ + removeClouds() + removeRain() + removeFog() + displaySnow() + removeStars() + removeThunder()} + return 'slight_snow' + + } else if (iconCode === 73) { + if(localStorage.getItem('UseBackgroundAnimations') && localStorage.getItem('UseBackgroundAnimations') === 'false'){ + }else{ + removeClouds() + removeRain() + removeFog() + displaySnow() + removeStars() + removeThunder()} + return 'moderate_snow' + + } else if (iconCode === 75) { + if(localStorage.getItem('UseBackgroundAnimations') && localStorage.getItem('UseBackgroundAnimations') === 'false'){ + }else{ + removeClouds() + removeRain() + removeFog() + displaySnow() + removeStars() + removeThunder()} + return 'heavy_intensity_snow' + + } else if (iconCode === 77) { + if(localStorage.getItem('UseBackgroundAnimations') && localStorage.getItem('UseBackgroundAnimations') === 'false'){ + }else{ + removeClouds() + removeRain() + removeFog() + displaySnow() + removeStars() + removeThunder()} + return 'snow_grains' + + } else if (iconCode === 80 || iconCode === 81) { + if(localStorage.getItem('UseBackgroundAnimations') && localStorage.getItem('UseBackgroundAnimations') === 'false'){ + }else{ + removeClouds() + displayRain() + removeFog() + removeSnow() + removeStars() + removeThunder()} + return 'rain_showers' + + } else if (iconCode === 82) { + if(localStorage.getItem('UseBackgroundAnimations') && localStorage.getItem('UseBackgroundAnimations') === 'false'){ + }else{ + removeClouds() + displayRain() + removeFog() + removeSnow() + removeStars() + removeThunder()} + return 'heavy_rain_showers' + + } else if (iconCode === 85) { + if(localStorage.getItem('UseBackgroundAnimations') && localStorage.getItem('UseBackgroundAnimations') === 'false'){ + }else{ + removeClouds() + removeRain() + removeFog() + displaySnow() + removeStars() + removeThunder()} + return 'slight_snow_showers' + + } else if (iconCode === 86) { + if(localStorage.getItem('UseBackgroundAnimations') && localStorage.getItem('UseBackgroundAnimations') === 'false'){ + }else{ + removeClouds() + removeRain() + removeFog() + displaySnow() + removeStars() + removeThunder()} + return 'heavy_snow_showers' + + } else if (iconCode === 95) { + if(localStorage.getItem('UseBackgroundAnimations') && localStorage.getItem('UseBackgroundAnimations') === 'false'){ + }else{ + removeClouds() + displayRain() + removeFog() + removeSnow() + removeStars() + displayThunder()} + return 'thunderstorm' + + } else if (iconCode === 96 || iconCode === 99) { + if(localStorage.getItem('UseBackgroundAnimations') && localStorage.getItem('UseBackgroundAnimations') === 'false'){ + }else{ + removeClouds() + displayRain() + removeFog() + removeSnow() + removeStars() + displayThunder()} + return 'strong_thunderstorm' + + } + } + + + + + return '' +} + +function getWeatherLabelInLang(iconCode, isDay, langCode) { + const translationKey = GetWeatherLabel(iconCode, isDay); + + const translatedLabel = getTranslationByLang(langCode, translationKey); + + return translatedLabel || 'Unknown weather'; +} + + +// froggie + + +function GetFroggieIcon(iconCode, isDay) { + + + if (isDay === 1) { + if (iconCode === 0) { + return 'froggie/01d.png'; + } else if (iconCode === 1) { + return 'froggie/02d.png'; + } else if (iconCode === 2) { + return 'froggie/02d.png'; + + } else if (iconCode === 3) { + return 'froggie/03d.png'; + + } else if (iconCode === 45 || iconCode === 48) { + return 'froggie/50d.png'; + + } else if (iconCode === 51 || iconCode === 53 || iconCode === 55) { + + return 'froggie/10d.png'; + + } else if (iconCode === 56 || iconCode === 57) { + + return 'froggie/10d.png'; + + } else if (iconCode === 61 || iconCode === 63) { + + return 'froggie/09d.png'; + + } else if (iconCode === 65) { + + return 'froggie/09d.png'; + + } else if (iconCode === 66 || iconCode === 67) { + + return 'froggie/hail.png'; + + } else if (iconCode === 71) { + + return 'froggie/13d.png'; + + } else if (iconCode === 73) { + + return 'froggie/flurries.png'; + + } else if (iconCode === 75) { + + return 'froggie/13d.png'; + + } else if (iconCode === 77) { + + return 'froggie/snowgrains.png'; + + } else if (iconCode === 80 || iconCode === 81) { + + return 'froggie/heavy_rain.png'; + + } else if (iconCode === 82) { + + return 'froggie/heavy_rain.png'; + + } else if (iconCode === 85) { + + return 'froggie/13d.png'; + + } else if (iconCode === 86) { + + return 'froggie/flurries.png'; + + } else if (iconCode === 95) { + + return 'froggie/11d.png' + + } else if (iconCode === 96 || iconCode === 99) { + + return 'froggie/strong_thunder.png' + + } + } else { + if (iconCode === 0) { + return 'froggie/01n.png'; + } else if (iconCode === 1) { + return 'froggie/02n.png'; + } else if (iconCode === 2) { + return 'froggie/02n.png'; + + } else if (iconCode === 3) { + return 'froggie/03n.png'; + + } else if (iconCode === 45 || iconCode === 48) { + return 'froggie/50n.png'; + + } else if (iconCode === 51 || iconCode === 53 || iconCode === 55) { + + return 'froggie/10n.png'; + + } else if (iconCode === 56 || iconCode === 57) { + + return 'froggie/10n.png'; + + } else if (iconCode === 61 || iconCode === 63) { + + return 'froggie/09n.png'; + + } else if (iconCode === 65) { + + return 'froggie/09n.png'; + + } else if (iconCode === 66 || iconCode === 67) { + + return 'froggie/hail.png'; + + } else if (iconCode === 71) { + + return 'froggie/13n.png'; + + } else if (iconCode === 73) { + + return 'froggie/flurries.png'; + + } else if (iconCode === 75) { + + return 'froggie/13n.png'; + + } else if (iconCode === 77) { + + return 'froggie/snowgrains.png'; + + } else if (iconCode === 80 || iconCode === 81) { + + return 'froggie/heavy_rain.png'; + + } else if (iconCode === 82) { + + return 'froggie/heavy_rain.png'; + + } else if (iconCode === 85) { + + return 'froggie/13n.png'; + + } else if (iconCode === 86) { + + return 'froggie/flurries.png'; + + } else if (iconCode === 95) { + + return 'froggie/11n.png' + + } else if (iconCode === 96 || iconCode === 99) { + + return 'froggie/strong_thunder.png' + + } + } + + + + + return froggie +} + + +// color theme + +function GetWeatherTheme(iconCode, isDay) { + + + if (isDay === 1) { + if (iconCode === 0) { + return 'clear-day' + + } else if (iconCode === 1) { + return 'cloudy' + + } else if (iconCode === 2) { + return 'cloudy' + + } else if (iconCode === 3) { + return 'overcast' + + } else if (iconCode === 45 || iconCode === 48) { + return 'fog' + + } else if (iconCode === 51 || iconCode === 53 || iconCode === 55) { + return 'rain' + + } else if (iconCode === 56 || iconCode === 57) { + return 'rain' + + } else if (iconCode === 61 || iconCode === 63) { + return 'rain' + + } else if (iconCode === 65) { + return 'rain' + + } else if (iconCode === 66 || iconCode === 67) { + return 'rain' + + } else if (iconCode === 71) { + return 'snow' + + } else if (iconCode === 73) { + return 'snow' + + } else if (iconCode === 75) { + return 'snow' + + } else if (iconCode === 77) { + return 'snow' + + } else if (iconCode === 80 || iconCode === 81) { + return 'rain' + + } else if (iconCode === 82) { + return 'rain' + + } else if (iconCode === 85) { + return 'snow' + + } else if (iconCode === 86) { + return 'snow' + + } else if (iconCode === 95) { + return 'thunder' + + } else if (iconCode === 96 || iconCode === 99) { + return 'thunder' + + } + } else { + if (iconCode === 0) { + return 'clear-night' + + } else if (iconCode === 1) { + return 'cloudy' + + } else if (iconCode === 2) { + return 'cloudy' + + } else if (iconCode === 3) { + return 'overcast' + + } else if (iconCode === 45 || iconCode === 48) { + return 'fog' + + } else if (iconCode === 51 || iconCode === 53 || iconCode === 55) { + return 'rain' + + } else if (iconCode === 56 || iconCode === 57) { + return 'rain' + + } else if (iconCode === 61 || iconCode === 63) { + return 'rain' + + } else if (iconCode === 65) { + return 'rain' + + } else if (iconCode === 66 || iconCode === 67) { + return 'rain' + + } else if (iconCode === 71) { + return 'snow' + + } else if (iconCode === 73) { + return 'snow' + + } else if (iconCode === 75) { + return 'snow' + + } else if (iconCode === 77) { + return 'snow' + + } else if (iconCode === 80 || iconCode === 81) { + return 'rain' + + } else if (iconCode === 82) { + return 'rain' + + } else if (iconCode === 85) { + return 'snow' + + } else if (iconCode === 86) { + return 'snow' + + } else if (iconCode === 95) { + return 'thunder' + + } else if (iconCode === 96 || iconCode === 99) { + return 'thunder' + + } + } + + + + + return WeatherTheme +} + + +// day night + + +function GetWeatherIconDay(iconCode) { + + + if (iconCode === 0) { + return 'weather-icons/clear_day.svg'; + } else if (iconCode === 1) { + return 'weather-icons/mostly_clear_day.svg'; + } else if (iconCode === 2) { + return 'weather-icons/partly_cloudy_day.svg'; + + } else if (iconCode === 3) { + return 'weather-icons/cloudy.svg'; + + } else if (iconCode === 45 || iconCode === 48) { + return 'weather-icons/haze_fog_dust_smoke.svg'; + + } else if (iconCode === 51 || iconCode === 53 || iconCode === 55) { + + return 'weather-icons/drizzle.svg'; + + } else if (iconCode === 56 || iconCode === 57) { + + return 'weather-icons/mixed_rain_hail_sleet.svg'; + + } else if (iconCode === 61 || iconCode === 63) { + + return 'weather-icons/showers_rain.svg'; + + } else if (iconCode === 65) { + + return 'weather-icons/heavy_rain.svg'; + + } else if (iconCode === 66 || iconCode === 67) { + + return 'weather-icons/sleet_hail.svg'; + + } else if (iconCode === 71) { + + return 'weather-icons/scattered_snow_showers_day.svg'; + + } else if (iconCode === 73) { + + return 'weather-icons/showers_snow.svg'; + + } else if (iconCode === 75) { + + return 'weather-icons/heavy_snow.svg'; + + } else if (iconCode === 77) { + + return 'weather-icons/flurries.svg'; + + } else if (iconCode === 80 || iconCode === 81) { + + return 'weather-icons/showers_rain.svg'; + + } else if (iconCode === 82) { + + return 'weather-icons/heavy_rain.svg'; + + } else if (iconCode === 85) { + + return 'weather-icons/showers_snow.svg'; + + } else if (iconCode === 86) { + + return 'weather-icons/heavy_snow.svg'; + + } else if (iconCode === 95) { + + return 'weather-icons/isolated_thunderstorms.svg' + + } else if (iconCode === 96 || iconCode === 99) { + + return 'weather-icons/strong_thunderstorms.svg' + + } + + + return iconCodeDay +} + + + +function GetWeatherIconNight(iconCode) { + + + if (iconCode === 0) { + + return 'weather-icons/clear_night.svg'; + + } else if (iconCode === 1) { + + return 'weather-icons/mostly_clear_night.svg'; + + } else if (iconCode === 2) { + + return 'weather-icons/partly_cloudy_night.svg'; + + } else if (iconCode === 3) { + + return 'weather-icons/cloudy.svg'; + + } else if (iconCode === 45 || iconCode === 48) { + + return 'weather-icons/haze_fog_dust_smoke.svg'; + + } else if (iconCode === 51 || iconCode === 53 || iconCode === 55) { + + return 'weather-icons/drizzle.svg'; + + } else if (iconCode === 56 || iconCode === 57) { + + return 'weather-icons/mixed_rain_hail_sleet.svg'; + + } else if (iconCode === 61 || iconCode === 63) { + + return 'weather-icons/showers_rain.svg'; + + } else if (iconCode === 65) { + + return 'weather-icons/heavy_rain.svg'; + + } else if (iconCode === 66 || iconCode === 67) { + + return 'weather-icons/sleet_hail.svg'; + + } else if (iconCode === 71) { + + return 'weather-icons/scattered_snow_showers_night.svg'; + + } else if (iconCode === 73) { + + return 'weather-icons/showers_snow.svg'; + + } else if (iconCode === 75) { + + return 'weather-icons/heavy_snow.svg'; + + } else if (iconCode === 77) { + + return 'weather-icons/flurries.svg'; + + } else if (iconCode === 80 || iconCode === 81) { + + return 'weather-icons/showers_rain.svg'; + + } else if (iconCode === 82) { + + return 'weather-icons/heavy_rain.svg'; + + } else if (iconCode === 85) { + + return 'weather-icons/showers_snow.svg'; + + } else if (iconCode === 86) { + + return 'weather-icons/heavy_snow.svg'; + + } else if (iconCode === 95) { + + return 'weather-icons/isolated_thunderstorms.svg' + + } else if (iconCode === 96 || iconCode === 99) { + + return 'weather-icons/strong_thunderstorms.svg' + + } + + return iconCodeNight +} + + + + + + diff --git a/app/src/main/assets/moon_phases/moon_first_quarter.svg b/app/src/main/assets/moon_phases/moon_first_quarter.svg new file mode 100644 index 000000000..f15467b6e --- /dev/null +++ b/app/src/main/assets/moon_phases/moon_first_quarter.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/app/src/main/assets/moon_phases/moon_full.svg b/app/src/main/assets/moon_phases/moon_full.svg new file mode 100644 index 000000000..c0c67d107 --- /dev/null +++ b/app/src/main/assets/moon_phases/moon_full.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/app/src/main/assets/moon_phases/moon_last_quarter.svg b/app/src/main/assets/moon_phases/moon_last_quarter.svg new file mode 100644 index 000000000..5263f4366 --- /dev/null +++ b/app/src/main/assets/moon_phases/moon_last_quarter.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/app/src/main/assets/moon_phases/moon_new.svg b/app/src/main/assets/moon_phases/moon_new.svg new file mode 100644 index 000000000..38ae6ddc9 --- /dev/null +++ b/app/src/main/assets/moon_phases/moon_new.svg @@ -0,0 +1,3 @@ + + + diff --git a/app/src/main/assets/moon_phases/moon_waning_crescent.svg b/app/src/main/assets/moon_phases/moon_waning_crescent.svg new file mode 100644 index 000000000..93fcba411 --- /dev/null +++ b/app/src/main/assets/moon_phases/moon_waning_crescent.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/app/src/main/assets/moon_phases/moon_waning_gibbous.svg b/app/src/main/assets/moon_phases/moon_waning_gibbous.svg new file mode 100644 index 000000000..a055dbb28 --- /dev/null +++ b/app/src/main/assets/moon_phases/moon_waning_gibbous.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/app/src/main/assets/moon_phases/moon_waxing_crescent.svg b/app/src/main/assets/moon_phases/moon_waxing_crescent.svg new file mode 100644 index 000000000..a5cc7cfc5 --- /dev/null +++ b/app/src/main/assets/moon_phases/moon_waxing_crescent.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/app/src/main/assets/moon_phases/moon_waxing_gibbous.svg b/app/src/main/assets/moon_phases/moon_waxing_gibbous.svg new file mode 100644 index 000000000..11502cc01 --- /dev/null +++ b/app/src/main/assets/moon_phases/moon_waxing_gibbous.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/app/src/main/assets/pages/AboutPage.html b/app/src/main/assets/pages/AboutPage.html new file mode 100644 index 000000000..c96f87bf8 --- /dev/null +++ b/app/src/main/assets/pages/AboutPage.html @@ -0,0 +1,385 @@ + + + + + + about Page + + + + + + + + + + + + +
        +
        +
        + +
        + +
        +

        WeatherMaster

        + 1.6.4 (W) + + + Latest version refresh +
        + + +
        + + + + + + privacy_tip +
        Terms and Conditions
        +
        + + + policy +
        Privacy Policy
        +
        + + + code +
        View source code
        +
        + + + copyright +
        Third party licenses
        + +
        + +
        + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/assets/pages/LanguagesPage.html b/app/src/main/assets/pages/LanguagesPage.html new file mode 100644 index 000000000..de42a3e88 --- /dev/null +++ b/app/src/main/assets/pages/LanguagesPage.html @@ -0,0 +1,414 @@ + + + + + + + Select language + + + + + + + + + + + + + + +
        +
        + +

        Language

        +
        +
        +

        Language

        +
        + + + + translate +
        Translate this app
        +
        Join POEditor project to help
        +
        +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/assets/pages/MoonPhases.html b/app/src/main/assets/pages/MoonPhases.html new file mode 100644 index 000000000..68cb6ac95 --- /dev/null +++ b/app/src/main/assets/pages/MoonPhases.html @@ -0,0 +1,388 @@ + + + + + + + MoonPhases + + + + + + + + + + + + +
        + +
        + + +

        Moon phases

        +
        + + +
        + +
        + +
        + + + + + +

        +
        + + +
        + +
        + Illumination: +

        +
        + +
        + Moonrise: +

        +
        + +
        + Moonset: +

        +
        + +
        + Next phase: +

        +
        + +
        + Next phase in: +

        +
        + +
        + +
        + + + + Moon phase forecast + + +
        + +
        + + + +
        + +
        + +
        + +
        + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/assets/pages/aboutPages/PrivacyPolicy.html b/app/src/main/assets/pages/aboutPages/PrivacyPolicy.html new file mode 100644 index 000000000..67f37d018 --- /dev/null +++ b/app/src/main/assets/pages/aboutPages/PrivacyPolicy.html @@ -0,0 +1,217 @@ + + + + + + + PrivacyPolicy Page + + + + + + + + + + +
        + +
        + +

        Privacy & Policy

        +
        +
        +

        Privacy & Policy

        +
        +

        This privacy policy applies to the WeatherMaster app (hereby referred to as "Application") for mobile + devices that was created by Pranshul (hereby referred to as "Service Provider") as an Open Source + service. This service is intended for use "AS IS".


        Information Collection and + Use +

        The Application collects information when you download and use it. This information may include + information such as

        +
          +
        • Your device's Internet Protocol address (e.g. IP address)
        • +
        • The pages of the Application that you visit, the time and date of your visit, the time spent on + those pages
        • +
        • The time spent on the Application
        • +
        • The operating system you use on your mobile device
        • +
        +


        +

        The Application does not gather precise information about the location of your + mobile device.

        +
        +

        The Application collects your device's location, which helps the Service Provider determine your + approximate geographical location and make use of in below ways:

        +
          +
        • Geolocation Services: The Service Provider utilizes location data to provide features such + as personalized content, relevant recommendations, and location-based services.
        • +
        • Analytics and Improvements: Aggregated and anonymized location data helps the Service + Provider to analyze user behavior, identify trends, and improve the overall performance and + functionality of the Application.
        • +
        • Third-Party Services: Periodically, the Service Provider may transmit anonymized location + data to external services. These services assist them in enhancing the Application and + optimizing their offerings.
        • +
        +

        +

        The Service Provider may use the information you provided to contact you from time to time to provide + you with important information, required notices and marketing promotions.


        +

        For a better experience, while using the Application, the Service Provider may require you to provide + us with certain personally identifiable information. The information that the Service Provider + request will be retained by them and used as described in this privacy policy.


        Third + Party Access +

        Only aggregated, anonymized data is periodically transmitted to external services to aid the Service + Provider in improving the Application and their service. The Service Provider may share your + information with third parties in the ways that are described in this privacy statement.

        +
        +

        The Service Provider may disclose User Provided and Automatically Collected Information:

        +
          +
        • as required by law, such as to comply with a subpoena, or similar legal process;
        • +
        • when they believe in good faith that disclosure is necessary to protect their rights, protect + your safety or the safety of others, investigate fraud, or respond to a government request;
        • +
        • with their trusted services providers who work on their behalf, do not have an independent use + of the information we disclose to them, and have agreed to adhere to the rules set forth in this + privacy statement.
        • +
        +


        Opt-Out Rights +

        You can stop all collection of information by the Application easily by uninstalling it. You may use + the standard uninstall processes as may be available as part of your mobile device or via the mobile + application marketplace or network.


        Data Retention Policy +

        The Service Provider will retain User Provided data for as long as you use the Application and for a + reasonable time thereafter. If you'd like them to delete User Provided Data that you have provided + via the Application, please contact them at pranshul.devmain@gmail.com and they will respond in a + reasonable time.


        Children +

        The Service Provider does not use the Application to knowingly solicit data from or market to + children under the age of 13.

        +

        +

        The Service Provider does not knowingly collect personally identifiable information from + children. The Service Provider encourages all children to never submit any personally + identifiable information through the Application and/or Services. The Service Provider encourage + parents and legal guardians to monitor their children's Internet usage and to help enforce this + Policy by instructing their children never to provide personally identifiable information + through the Application and/or Services without their permission. If you have reason to believe + that a child has provided personally identifiable information to the Service Provider through + the Application and/or Services, please contact the Service Provider + (pranshul.devmain@gmail.com) so that they will be able to take the necessary actions. You must + also be at least 16 years of age to consent to the processing of your personally identifiable + information in your country (in some countries we may allow your parent or guardian to do so on + your behalf).

        +

        Security +

        The Service Provider is concerned about safeguarding the confidentiality of your information. The + Service Provider provides physical, electronic, and procedural safeguards to protect information the + Service Provider processes and maintains.


        Changes +

        This Privacy Policy may be updated from time to time for any reason. The Service Provider will notify + you of any changes to the Privacy Policy by updating this page with the new Privacy Policy. You are + advised to consult this Privacy Policy regularly for any changes, as continued use is deemed + approval of all changes.


        +

        This privacy policy is effective as of 2024-06-16


        Your Consent +

        By using the Application, you are consenting to the processing of your information as set forth in + this Privacy Policy now and as amended by us.


        Contact Us +

        If you have any questions regarding privacy while using the Application, or have questions about the + practices, please contact the Service Provider via email at pranshul.devmain@gmail.com.

        + pranshul.devmain@gmail.com +
        +
        + +

        This Terms and Conditions page was generated by App Privacy Policy Generator

        +
        +
        +
        + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/assets/pages/aboutPages/TermsConditions.html b/app/src/main/assets/pages/aboutPages/TermsConditions.html new file mode 100644 index 000000000..29e23c602 --- /dev/null +++ b/app/src/main/assets/pages/aboutPages/TermsConditions.html @@ -0,0 +1,191 @@ + + + + + + + TermsConditions Page + + + + + + + + + + +
        + +
        + +

        Terms & Conditions

        +
        +
        +

        Terms & Conditions

        +
        +

        These terms and conditions applies to the WeatherMaster app (hereby referred to as "Application") for + mobile devices that was created by Pranshul (hereby referred to as "Service Provider") as an Open + Source service.


        +

        Upon downloading or utilizing the Application, you are automatically agreeing to the following terms. + It is strongly advised that you thoroughly read and understand these terms prior to using the + Application. Unauthorized copying, modification of the Application, any part of the Application, or + our trademarks is strictly prohibited. Any attempts to extract the source code of the Application, + translate the Application into other languages, or create derivative versions are not permitted. All + trademarks, copyrights, database rights, and other intellectual property rights related to the + Application remain the property of the Service Provider.


        +

        The Service Provider is dedicated to ensuring that the Application is as beneficial and efficient as + possible. As such, they reserve the right to modify the Application or charge for their services at + any time and for any reason. The Service Provider assures you that any charges for the Application + or its services will be clearly communicated to you.


        +

        The Application stores and processes personal data that you have provided to the Service Provider in + order to provide the Service. It is your responsibility to maintain the security of your phone and + access to the Application. The Service Provider strongly advise against jailbreaking or rooting your + phone, which involves removing software restrictions and limitations imposed by the official + operating system of your device. Such actions could expose your phone to malware, viruses, malicious + programs, compromise your phone's security features, and may result in the Application not + functioning correctly or at all.


        +

        Please be aware that the Service Provider does not assume responsibility for certain aspects. Some + functions of the Application require an active internet connection, which can be Wi-Fi or provided + by your mobile network provider. The Service Provider cannot be held responsible if the Application + does not function at full capacity due to lack of access to Wi-Fi or if you have exhausted your data + allowance.


        +

        If you are using the application outside of a Wi-Fi area, please be aware that your mobile network + provider's agreement terms still apply. Consequently, you may incur charges from your mobile + provider for data usage during the connection to the application, or other third-party charges. By + using the application, you accept responsibility for any such charges, including roaming data + charges if you use the application outside of your home territory (i.e., region or country) without + disabling data roaming. If you are not the bill payer for the device on which you are using the + application, they assume that you have obtained permission from the bill payer.


        +

        Similarly, the Service Provider cannot always assume responsibility for your usage of the + application. For instance, it is your responsibility to ensure that your device remains charged. If + your device runs out of battery and you are unable to access the Service, the Service Provider + cannot be held responsible.


        +

        In terms of the Service Provider's responsibility for your use of the application, it is important to + note that while they strive to ensure that it is updated and accurate at all times, they do rely on + third parties to provide information to them so that they can make it available to you. The Service + Provider accepts no liability for any loss, direct or indirect, that you experience as a result of + relying entirely on this functionality of the application.


        +

        The Service Provider may wish to update the application at some point. The application is currently + available as per the requirements for the operating system (and for any additional systems they + decide to extend the availability of the application to) may change, and you will need to download + the updates if you want to continue using the application. The Service Provider does not guarantee + that it will always update the application so that it is relevant to you and/or compatible with the + particular operating system version installed on your device. However, you agree to always accept + updates to the application when offered to you. The Service Provider may also wish to cease + providing the application and may terminate its use at any time without providing termination notice + to you. Unless they inform you otherwise, upon any termination, (a) the rights and licenses granted + to you in these terms will end; (b) you must cease using the application, and (if necessary) delete + it from your device.


        Changes to These Terms and Conditions +

        The Service Provider may periodically update their Terms and Conditions. Therefore, you are advised + to review this page regularly for any changes. The Service Provider will notify you of any changes + by posting the new Terms and Conditions on this page.


        +

        These terms and conditions are effective as of 2024-06-16


        Contact Us +

        If you have any questions or suggestions about the Terms and Conditions, please do not hesitate to + contact the Service Provider at

        + pranshul.devmain@gmail.com +
        +
        + +

        This Terms and Conditions page was generated by App Privacy Policy Generator

        +
        +
        +
        + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/assets/pages/aboutPages/licenses.html b/app/src/main/assets/pages/aboutPages/licenses.html new file mode 100644 index 000000000..e1289dc7f --- /dev/null +++ b/app/src/main/assets/pages/aboutPages/licenses.html @@ -0,0 +1,168 @@ + + + + + + + licenses Page + + + + + + + + + + + + + + +
        + +
        + +

        Third party licenses

        +
        +
        +

        Third party licenses

        +
        + +
        +

        Outfit

        + Rodrigo Fuenzalida, Smartsheet Inc +

        A beautiful geometric sans: The official typeface for brand automation + company outfit.io. Inspired by the ligature-rich outfit wordmark, Outfit.io is delighted to + release it's own type family. The Outfit typeface links the Outfit written voice to Outfit + product marks; on brand by default.

        + Open Font License +
        + +
        +

        Poppins

        + Indian Type Foundry, Jonny Pinhorn +

        Poppins is a geometric sans serif font supporting Devanagari and Latin + scripts. Its Latin glyphs are rationalist, while the Devanagari design, introduced in 2015, was + pioneering, featuring various weights. Developed by Indian Type Foundry, Poppins maintains + monolinear letterforms with optical corrections. It later expanded to include multiple weights + and italics by the ITF studio team.

        + Open Font License +
        + +
        +

        Material design components

        + Open Source Project +

        Material Web, or MWC, is a web component library aligned with Google's + Material Design guidelines. Supported by Google, it offers guidance for creating Material apps + and components, accessible on material.io. Material 3, the latest version, enhances experiences + with dynamic color, better accessibility, and support for large screen layouts and design + tokens.

        + Apache-2.0 +
        + +
        +
        +
        +
        + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/assets/pages/alertPage.html b/app/src/main/assets/pages/alertPage.html new file mode 100644 index 000000000..3ec6d85a2 --- /dev/null +++ b/app/src/main/assets/pages/alertPage.html @@ -0,0 +1,370 @@ + + + + + + + Alert page + + + + + + + + + + + + +
        +
        + + +

        Weather alert

        +
        +
        + + +
        + + +
        + + +

        + + + +
        + +
        + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/assets/pages/conditions_pages/condition_pageUI.css b/app/src/main/assets/pages/conditions_pages/condition_pageUI.css new file mode 100644 index 000000000..e511a4e57 --- /dev/null +++ b/app/src/main/assets/pages/conditions_pages/condition_pageUI.css @@ -0,0 +1,390 @@ +* { + -webkit-tap-highlight-color: transparent; + user-select: none; + touch-action: manipulation; + -webkit-user-drag: none; + outline: none; +} + +body { + background-color: var(--Surface); + padding: 0; + margin: 0; + overflow: hidden; + animation: opacity 0.3s ease-out; + +} + +[hidden]{ + display: none !important; +} + +p{ + margin: 0; +} + +@keyframes opacity{ + 0%{ + opacity: 0; + } + 100%{ + opacity: 1; + } +} + + +.top_conditions_for_header{ + padding: 10px; + height: calc(65px - 10px); + display: flex; + align-items: center; +} + +.condition_info_content{ + height: calc(100% - 65px); + position: fixed; + overflow: auto; + width: 100%; + bottom: 0; + left: 0; + background-color: var(--Surface); +} + +.condition_label_forecast{ + display: flex; + align-items: center; + padding: 10px; + gap: 10px; + color: var(--On-Surface); + padding-left: 18px; + +} + +.condition_label_forecast > p{ + font-size: 26px; + font-family: var(--outfit); +} + +.humidity_block_todays{ + background-color: var(--Surface-Container); + margin: 10px; + border-radius: 20px; + padding: 20px; +} + +.humidityBars, .WindBars{ + display: flex; + align-items: center; + overflow: auto; + padding-top: 10px; + gap: 10px; +} + +.humidityBars humiditymeterbaritem{ + flex-shrink: 0; + display: flex; + align-items: center; + flex-direction: column; + justify-content: center; +} + +humidityforecastbars{ + height: 115px; + width: 33px; + background-color: transparent; + border-radius: 50px; + position: relative; + overflow: hidden; + display: flex; + align-items: flex-end; +} + +humidityforecastbars humiditybarprogress{ + width: 100%; + background-color: var(--Tertiary); + border-radius: inherit; + position: relative; + +} + +humidityforecastbars humiditybarprogress::before{ + content: 'humidity_high'; + color: var(--On-Tertiary); + position: absolute; + top: 5px; + left: 50%; + transform: translateX(-50%); + font-size: 20px; + font-family: 'Material symbols'; + font-weight: normal !important; + font-style: normal !important; + font-variation-settings: 'FILL' 1; + line-height: 1; +} + +humiditymeterbaritem p{ + color: var(--On-Surface); + font-family: var(--outfit-mid); + padding: 10px 0 18px 0; +} + +humiditymeterbaritem span{ + color: var(--On-Surface-Variant); + font-size: 15px; + font-family: var(--google-mid); +} + +.humidity_block_todays > p{ + color: var(--On-Surface); + font-family: var(--outfit-mid); + font-size: 20px; +} + +#HumidityMain, #WindHighMain{ + color: var(--Secondary); + font-size: 50px; + font-family: var(--google-mid); + padding-top: 10px; + display: block; +} + +.info__forecast{ + padding: 13px; + color: var(--On-Surface-Variant); + font-size: 18px; + font-family: var(--google-mid); + display: flex; + padding-top: 20px; + flex-direction: column; + gap: 20px; +} + +.top_visibility_box{ + padding: 10px; + padding-top: 15px; +} + +.visibility_graphic{ + background-color: var(--Surface-Container); + border-radius: 20px; + overflow: hidden; + position: relative; + height: 130px; +} + +.visibility_graphic svg{ + width: 100%; + height: 100%; +} + +.visibility_values{ + z-index: 1; + top: 43px; + left: 20px; + position: absolute; + display: flex; + gap: 8px; + align-items: flex-end; +} + +.visibility_values p:first-child{ + color: var(--On-Tertiary-Container); + font-size: 50px; + font-family: var(--google-mid); +} + +.visibility_values p:last-child{ + color: var(--On-Tertiary-Container); + font-size: 20px; + font-family: var(--google-mid); + padding-bottom: 10px; +} + +.visibility_graphic > span{ + color: var(--On-Surface); + font-family: var(--outfit-mid); + font-size: 16px; + position: absolute; + top: 15px; + left: 20px; +} + +.UvCard{ + background-color: var(--Surface-Container); + margin: 10px; + display: flex; + align-items: center; + justify-content: space-between; + padding: 20px; + height: 100px; + border-radius: 20px; +} + +.UvCard .uvImg div > svg{ + width: 150px; + height: 100%; +} + +.UvCard .uvImg div{ + display: flex; + align-items: center; +} + +#indexValue{ + font-family: var(--google-mid); + color: var(--On-Surface); + font-size: 50px; +} + +#indexDescrip{ + color: var(--On-Surface-Variant); + font-size: 18px; + font-family: var(--outfit); +} + +.WindBars windmeterbaritem{ + flex-shrink: 0; + display: flex; + align-items: center; + flex-direction: column; + justify-content: center; +} + +windforecastBars{ + height: 100px; + width: 33px; + background-color: transparent; + border-radius: 10px; + position: relative; + overflow: hidden; + display: flex; + align-items: flex-end; +} + +windforecastBars windBarProgress{ + width: 100%; + background-color: var(--Tertiary); + border-radius: inherit; + height: 0%; + position: relative; + +} + + +WindMeterBarItem p{ + color: var(--On-Surface); + font-family: var(--outfit-mid); + padding: 10px 0 18px 0; +} + +WindMeterBarItem span{ + color: var(--On-Surface-Variant); + font-size: 15px; + font-family: var(--google-mid); +} + +.WindBars{ + padding-top: 15px !important; +} + + +.top_sunSetRise_card{ + margin: 10px; + background-color: var(--Surface-Container-Lowest); + height: 220px; + border-radius: 40px; + overflow: hidden; + position: relative; +} + +.top_sunSetRise_card svg{ + position: absolute; + bottom: -40px; + left: 0; + width: 100%; +} + +.top_sunSetRise_card::before{ + content: ''; + position: absolute; + bottom: 0; + left: 0; + height: 50%; + width: 100%; + background-color: rgba(0, 0, 0, 0.384); + border-top: 3px solid var(--Outline-Variant); + z-index: 1; + +} + +.info_about_sun{ + display: flex; + align-items: center; + justify-content: center; + gap: 30px; + padding-top: 20px; + +} + +.info_about_sun div span{ + font-family: var(--outfit-mid); + font-size: 18px; + color: var(--On-Surface-Variant); +} + +.info_about_sun div{ + display: flex; + align-items: center; + justify-content: center; + gap: 3px; + flex-direction: column; +} + +.info_about_sun div p{ + color: var(--Secondary); + font-family: var(--google-mid); + font-size: 18px; +} + +.pressureCard{ + margin: 10px; + background-color: var(--Surface-Container); + border-radius: 20px; + padding: 20px; + height: 105px; + --md-linear-progress-track-height: 10px; + --md-linear-progress-active-indicator-height: 10px; + --md-linear-progress-track-shape: 50px; +} + +.pressureCard > div{ + display: flex; + flex-direction: column; + gap: 8px; +} + +.pressureCard > div > span{ + color: var(--On-Surface); + font-size: 18px; + font-family: var(--outfit-mid); +} + +.pressureCard > div > div > p:first-child{ + color: var(--Secondary); + font-size: 40px; + font-family: var(--google-mid); +} + +.pressureCard > div > div{ + display: flex; + align-items: flex-end; + gap: 5px; + padding-bottom: 20px; +} + +.pressureCard > div > div > p:last-child{ + color: var(--On-Surface-Variant); + font-size: 20px; + padding-bottom: 6px; + font-family: var(--google-mid); +} \ No newline at end of file diff --git a/app/src/main/assets/pages/conditions_pages/humidity_forecast.html b/app/src/main/assets/pages/conditions_pages/humidity_forecast.html new file mode 100644 index 000000000..444a20827 --- /dev/null +++ b/app/src/main/assets/pages/conditions_pages/humidity_forecast.html @@ -0,0 +1,121 @@ + + + + + + + Humidity Forecast + + + + + + + + + +
        + + arrow_back + +
        + +
        +
        + humidity_high +

        Humidity

        +
        + + +
        +

        Today's average

        + ---% + +
        + +
        +
        + + +
        + + Relative humidity is the percentage of water vapor present in the air compared to the maximum amount the air can hold at a given temperature. + Dew point is what the temperature would need to be cooled to in order to achieve a relative humidity of 100%. +
        +
        + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/assets/pages/conditions_pages/pressure_forecast.html b/app/src/main/assets/pages/conditions_pages/pressure_forecast.html new file mode 100644 index 000000000..3510166fa --- /dev/null +++ b/app/src/main/assets/pages/conditions_pages/pressure_forecast.html @@ -0,0 +1,134 @@ + + + + + + + Pressure Forecast + + + + + + + + + + + +
        + + arrow_back + +
        + +
        +
        + compress +

        Pressure

        +
        + +
        + +
        + Current condition +
        +

        30.09

        +

        inHg

        +
        +
        + + +
        + +
        + + Atmospheric pressure, also known as air pressure or baromatic pressure, is the downward pressure exerted by the earth's atmosphere. This app uses Mean Sea Level Pressure (MSLP). + + Abnormal atmospheric pressure may cause headaches, joint pain, fatigue, and other effects. + +
        + +
        + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/assets/pages/conditions_pages/sunset_rise_forecast.html b/app/src/main/assets/pages/conditions_pages/sunset_rise_forecast.html new file mode 100644 index 000000000..2a2cb91d6 --- /dev/null +++ b/app/src/main/assets/pages/conditions_pages/sunset_rise_forecast.html @@ -0,0 +1,143 @@ + + + + + + + SunRise set Forecast + + + + + + + + + + + +
        + + arrow_back + +
        + +
        +
        + wb_twilight +

        Sun

        +
        + +
        + + + + + +
        + +
        + +
        + Sunrise +

        +
        + +
        + Sunset +

        +
        + +
        + + +
        + Sunrise: When the sun fully appears above the horizon. This varies depending on location, time of year, and time zone. + + Sunset: When the sun completely disappears below the horizon. This varies depending on location, time of year, and time zone. + + Dawn: When the first visible light of the day appears before sunrise. + + Dusk: The darkest stage of twilight before the last visible light disappears. + + +
        + +
        + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/assets/pages/conditions_pages/uvIndex_forecast.html b/app/src/main/assets/pages/conditions_pages/uvIndex_forecast.html new file mode 100644 index 000000000..b975fa28b --- /dev/null +++ b/app/src/main/assets/pages/conditions_pages/uvIndex_forecast.html @@ -0,0 +1,319 @@ + + + + + + + UVINDEX Forecast + + + + + + + + + + + +
        + + arrow_back + +
        + +
        +
        + sunny +

        UV index

        +
        + + +
        + +
        + Current condition +

        +

        +
        + + +
        + + + + + + + + + + + + + + +
        + +
        + +
        + + The UV index measures the strength of the sun's ultraviolet (UV) radiation. It is on a scale of 0 to + 11, with the higher values indicating stronger UV radiation. + + UV radiation can cause sunburn, skin cancer, and eye damage. The higher the UV index, the greater the + risk of these problems. + + 1-2: Low. no protection needed. You can safely stay outside using minimal sun protection. + + 3-7: Moderate to High. Protection needed. Seek shade during late morning through mid-afternoon. When + outside, generously apply broad-spectrum SPF-15 or higher suncreen on exposed skin, and wear protective + clothing, a wide-brimmed hat, and sunglasses. + + 8+: Very High to Extreme. Extra protection needed. Be carefull outside, + especially during late morning through mid-afternoon. If your shadow is shorter than you, seek shade and + wear protective clothing, a wide-brimmed hat, and sunglasses, and generously apply a minimum of SPF-15, + broad-spectrum sunscreen on exposed skin. +
        +
        + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/assets/pages/conditions_pages/visibility_forecast.html b/app/src/main/assets/pages/conditions_pages/visibility_forecast.html new file mode 100644 index 000000000..73b1e0810 --- /dev/null +++ b/app/src/main/assets/pages/conditions_pages/visibility_forecast.html @@ -0,0 +1,107 @@ + + + + + + + Visibility Forecast + + + + + + + + + +
        + + arrow_back + +
        + +
        +
        + visibility +

        Visibility

        +
        + +
        + +
        + Current condition +
        +

        +

        +
        + + + + + + + + + +
        +
        + +
        + + Visibility measures the distance at which prominent objects can be seen against the sky or horizon. Visibility can be affected by precipitation, fog, dust, smoke, or haze. +
        + +
        + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/assets/pages/conditions_pages/wind_forecast.html b/app/src/main/assets/pages/conditions_pages/wind_forecast.html new file mode 100644 index 000000000..8dbfe23f3 --- /dev/null +++ b/app/src/main/assets/pages/conditions_pages/wind_forecast.html @@ -0,0 +1,174 @@ + + + + + + + Wind Forecast + + + + + + + + + + + +
        + + arrow_back + +
        + +
        +
        + air +

        Wind

        +
        + +
        +

        Today's high

        + 33px + +
        + +
        +
        + +
        + Wind speed is measured by averaging wind speeds over a period of time. Gusts are sudden bursts of wind typically lasting under twenty seconds. +
        +
        + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/assets/pages/forecastPage.html b/app/src/main/assets/pages/forecastPage.html new file mode 100644 index 000000000..6b3790a1d --- /dev/null +++ b/app/src/main/assets/pages/forecastPage.html @@ -0,0 +1,133 @@ + + + + + + + Forecast page + + + + + + + + + + + + + + + +
        +
        + + +

        14-day forecast

        +
        +
        + +
        + + + + +
        + + + +
        +
        + + + +
        +
        + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/assets/pages/forecastPageUi.css b/app/src/main/assets/pages/forecastPageUi.css new file mode 100644 index 000000000..d9e751456 --- /dev/null +++ b/app/src/main/assets/pages/forecastPageUi.css @@ -0,0 +1,305 @@ +* { + -webkit-tap-highlight-color: transparent; + user-select: none; + touch-action: manipulation; + -webkit-user-drag: none; + outline: none; + --Surface: #334151; + --On-Surface: #e0e2e8; + --On-Surface-Variant: #b9c8da; + --Outline-Variant: #3f4955; + --Primary: #9ccbfb; +} + +p{ + margin: 0; +} + +body { + background-color: #334150; + padding: 0; + margin: 0; + overflow: hidden; + font-family: var(--outfit); + animation: opacity 0.3s ease-out; + +} + +@keyframes opacity{ + 0%{ + opacity: 0; + } + 100%{ + opacity: 1; + } +} + + +.full-activity-content::before { + position: fixed; + bottom: 0; + content: ''; + width: 100%; + background: linear-gradient(0deg, var(--Surface) 10%, rgba(255, 0, 0, 0)); + height: 30px; + z-index: 1; +} + +[hidden]{ + display: none !important; +} + + +.loader_holder{ + display: flex; + align-items: center; + justify-content: center; + height: 100%; + position: fixed; + background-color: var(--Surface); + z-index: 2; + left: 0; + top: 0; + width: 100%; + --md-circular-progress-size: 55px; + transition: opacity 0.2s ease-out; +} + +forecastDateHeader{ + display: flex; + overflow: auto; + padding: 10px; + padding-left: 15px; + padding-right: 15px; + gap: 10px; + padding-bottom: 15px; + border-bottom: 1.5px solid var(--Outline-Variant); +} + + +forecastDateHeader .forecastDateHeaderContent{ + flex-shrink: 0; + height: 100px; + width: 65px; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + background-color: #253648; + padding: 5px 5px; + position: relative; + border-radius: 10px; + gap: 10px; +} + +forecastDateHeader .forecastDateHeaderContent.selected{ + background-color: #011d33; + pointer-events: none; +} + +forecastDateHeader .forecastDateHeaderContent.selected::before{ + opacity: 1; +} + + +forecastDateHeader .forecastDateHeaderContent::before{ + content: ''; + width: 40%; + height: 4px; + background-color: var(--Primary); + opacity: 0; + transition: opacity 0.2s ease-out; + position: absolute; + bottom: -15px; + border-radius: 50px 50px 0 0; + z-index: 1; +} + +forecastDateHeader .forecastDateHeaderContent img{ + width: 30px; +} + +forecastDateHeader .forecastDateHeaderContent div p{ + color: var(--On-Surface); + font-family: var(--google-normal); + font-size: 15px; + +} + +forecastDateHeader .forecastDateHeaderContent div span{ + color: var(--On-Surface-Variant); + font-family: var(--google-normal); + font-size: 15px; + +} + +forecastDateHeader .forecastDateHeaderContent > span{ + color: var(--On-Surface); + font-family: var(--google-mid); + font-size: 16.5px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + width: 100%; + text-align: center; +} + +forecastMainDetails{ + display: flex; + flex-direction: column; +} + +forecastMainDetails .forecastTempConditionMainContent .top-details { + display: flex; + align-items: flex-start; + flex-direction: column; + padding-top: 40px; + padding-left: 15px; + padding-right: 15px; +} + +forecastMainDetails .forecastTempConditionMainContent .top-details > p{ + color: #e9eef7; + font-family: var(--google-mid); + font-size: 20px; + padding-bottom: 5px; +} + +forecastMainDetails .forecastTempConditionMainContent .top-details > div > tempLarge p{ + color: #e0e3ea; +} + +forecastMainDetails .forecastTempConditionMainContent .top-details > div > tempLarge span{ + color: #b9c8db; +} + +forecastMainDetails .forecastTempConditionMainContent .top-details > div > tempLarge{ + font-size: 56px; + flex-shrink: 0; + font-family: var(--google-mid); + font-weight: 500; + display: flex; + align-items: center; + padding-right: 10px; +} + +forecastMainDetails .forecastTempConditionMainContent .top-details > div{ + display: flex; + align-items: center; +} + +weatherConditionText{ + color: var(--Primary); + text-transform: capitalize; + font-family: var(--outfit-mid); + font-size: 18px; + padding-top: 5px; +} + +.daily-conditions-title{ + padding-left: 15px; + font-weight: 600; + color: #d0e2f8; + margin-top: 40px; + font-size: 20px; + } + + +.daily-conditions{ + padding: 15px; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + +} + +.daily-conditions-wrap{ + display: grid; + grid-template-columns: repeat(2, 1fr); + gap: 10px; + width: 100%; +} + +.daily-conditions-wrap > div{ + background-color: #0d1d2a; + border-radius: 15px; + padding-bottom: 45px; + position: relative; +} + +.daily-conditions-wrap > div svg{ + height: 120px; + width: 120px; + flex-shrink: 0; +} + +conditionicon{ + display: flex; + align-items: center; + justify-content: center; + flex-shrink: 0; + +} + +.daily-conditions-wrap > div p{ + padding: 10px; + padding-left: 15px; + font-size: 18px; + font-family: var(--outfit); + color: var(--On-Surface-Variant); + padding-right: 15px; + +} + +.daily-conditions-wrap > div span{ + padding: 10px; + display: flex; + padding-left: 15px; + color: var(--On-Surface); + font-size: 20px; + font-family: var(--outfit-mid); + position: absolute; + bottom: 0; +} + +.sunrise-sunset-forecast{ + padding: 15px; + display: grid; + grid-template-columns: repeat(2, 1fr); + gap: 10px; +} + +.sunrise-sunset-forecast .sunrise-sunset-item{ + background-color: #0d1d2a; + border-radius: 15px; + width: 100%; +} + +.sunrise-sunset-forecast .sunrise-sunset-item > div > svg{ + width: 100px; + height: 100px; +} + +.sunrise-sunset-forecast .sunrise-sunset-item > div{ + display: flex; + align-items: center; + justify-content: center; +} + +.sunrise-sunset-forecast .sunrise-sunset-item p{ + padding: 10px; + padding-left: 15px; + font-size: 18px; + font-family: var(--outfit); + color: var(--On-Surface-Variant); +} + +.sunrise-sunset-forecast .sunrise-sunset-item span{ + padding: 10px; + display: flex; + padding-left: 15px; + color: var(--On-Surface); + font-size: 20px; + font-family: var(--outfit-mid); +} \ No newline at end of file diff --git a/app/src/main/assets/pages/moonphaseUi.css b/app/src/main/assets/pages/moonphaseUi.css new file mode 100644 index 000000000..7135e4353 --- /dev/null +++ b/app/src/main/assets/pages/moonphaseUi.css @@ -0,0 +1,217 @@ +* { + -webkit-tap-highlight-color: transparent; + user-select: none; + touch-action: manipulation; + -webkit-user-drag: none; + outline: none; +} + +p { + margin: 0; +} + + +body, +html { + background: linear-gradient(0deg, #4e2bad, #2b226f); + margin: 0; + padding: 0; + overflow: hidden; + height: 100vh; +} + +.moon_activity { + height: 100%; + width: 100%; + top: 0; + left: 0; + overflow: hidden; + position: fixed; + background: linear-gradient(0deg, #4e2bad, #2b226f); +} + +.moon_activity_header { + display: flex; + align-items: center; + padding: 10px; + height: 45px; + padding-left: 4px; + background-color: transparent; + overflow: hidden; +} + +.moon_activity_header p { + margin: 0; + font-family: 'outfit'; + margin-left: 8px; + font-size: 23px; + +} + +.moon_phase_current_data{ + display: flex; + flex-direction: column; +} + + +.moon_phase_img_text_current{ + display: flex; + align-items: center; + flex-direction: column; + gap: 14px; + position: relative; + margin-top: 12px; +} + +.moon_phase_img_text_current p{ + font-family: var(--outfit-mid); + font-size: 25px; +} + +.moon_phase_current_text_data{ + background-color: rgba(0, 0, 0, 0.308); + margin: 10px; + padding: 20px; + border-radius: 10px; + margin-top: 20px; +} + +.moon_phase_current_text_data .moon_phase_current_text_data_item{ + display: flex; + align-items: center; + justify-content: space-between; + margin-bottom: 10px; + font-family: var(--outfit); + +} + +.moon_phase_current_text_data .moon_phase_current_text_data_item:last-child{ + margin-bottom: 0; +} + +.moon_phase_current_text_data .moon_phase_current_text_data_item span{ + color: white; + opacity: 0.8; + font-size: 18px; +} + +.moon_phase_current_text_data .moon_phase_current_text_data_item p{ + font-family: var(--outfit-mid); +} + +.moon_Phase_content{ + height: calc(100% - 65px); + overflow: auto; +} + +.moon_Phase_content::before { + position: fixed; + bottom: 0; + content: ''; + width: 100%; + background: linear-gradient(0deg, #2b226f 10%, rgba(255, 0, 0, 0)); + height: 30px; + z-index: 1; +} + + + +moonPhasetitle{ + padding-left: 12px; + font-family: var(--google-mid); + margin-top: 15px; + font-size: 16px; + opacity: 0.7; + display: block; + color: #ffffff; + + + padding-top: 5px; + padding-bottom: 5px; +} + +.moonPhase_forecast div img{ +height:80px; +} + +.moonPhase_forecast { + display: grid; + grid-template-columns: repeat(2, 1fr); + padding: 10px; + gap: 10px; + padding-bottom: 32px; +} + +.moonPhase_forecast div{ + background-color: rgba(0, 0, 0, 0.2); + display: flex; + padding: 10px; + flex-direction: column; + border-radius: 10px; + padding-bottom: 15px; + padding-top: 12px; + align-items: center; +} + +.moonPhase_forecast div p{ + font-size: 15px; + font-family: var(--outfit-mid); + + text-align: center; +} + +.moonPhase_forecast div span{ + font-size: 15px; + font-family: var(--outfit); + opacity: 0.7; + display: block; + width: 100%; + text-align: left; +} + + + + +.moonphase_loader{ + --md-circular-progress-size: 55px; + --md-sys-color-primary: rgb(191, 173, 255); + display: flex; + align-items: center; + justify-content: center; + position: fixed; + z-index: 1; + bottom: 0; + left: 0; + width: 100%; + background: #2b226f; + height: 100%; + transition: opacity 0.3s ease-out; +} + + +[hidden]{ + display: none !important; +} + +moonPhase { + width: 150px; + height: 150px; + display: block; + background: url(../icons/moon_texture.png); + border-radius: 9999px; + position: relative; + background-size: cover; + overflow: hidden; + background-position: center; + box-shadow: 0px 10px 15px rgba(0, 0, 0, 0.3); + } + + moonPhaseProgress { + position: absolute; + top: 0; + width: 0; + transition: width 0.2s ease-out; + height: 100%; + border-radius: 50%; + background-color: rgba(0, 0, 0, 0.65); + } \ No newline at end of file diff --git a/app/src/main/assets/pages/radar.html b/app/src/main/assets/pages/radar.html new file mode 100644 index 000000000..04574b8e8 --- /dev/null +++ b/app/src/main/assets/pages/radar.html @@ -0,0 +1,450 @@ + + + + + + + Live rader + + + + + + + + + + + + + + + + +
        + +
        + + +

        Live Radar

        + +
        + +
        + +
        +
        + + +
        + +
        + +
        + +
        +
        +
        + +
        +

        Light

        +
        + + + + + + + + + + + + + + + + +
        +
        + + +
        +
        + + + + + + +
        +

        Heavy

        +
        +
        + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/assets/pages/settings.html b/app/src/main/assets/pages/settings.html new file mode 100644 index 000000000..173c0bb0b --- /dev/null +++ b/app/src/main/assets/pages/settings.html @@ -0,0 +1,844 @@ + + + + + + + Settings + + + + + + + + + + + + + +
        +
        + +

        Settings

        +
        +
        +

        Settings

        +
        + +

        Weather

        + + + + + + notifications +
        Notification bar
        +
        Show weather information in the notifications bar
        + +
        + + + thermostat +
        Main temperature
        +
        Open-Meteo
        + + +
        + + + +
        Open-Meteo
        +
        + +
        AccuWeather
        +
        + +
        OpenWeatherMap
        +
        +
        + + + +
        + + + check + + + +
        +
        Get your own API key from openweathermap.org/api. A new API key usually takes 10-15 + minutes to start working.
        +
        + + + + animation +
        Background card animation
        + +
        + + + home_pin +
        Home location
        +
        You need to save locations to show in the menu
        +
        Your device location
        + + chevron_right + +
        + + + + + + + device_thermostat +
        Temperature Unit
        + + +
        °F
        +
        + +
        °C
        +
        +
        +
        + + + + airwave +
        Wind Unit
        + + +
        Km/h
        +
        + +
        Mph
        +
        + +
        M/s
        +
        +
        +
        + + + visibility +
        Visibility Unit
        + + +
        km
        +
        + +
        mile
        +
        +
        +
        + + + rainy_light +
        Precipitation Unit
        + + +
        mm
        +
        + +
        in
        +
        +
        +
        + + + + av_timer +
        Pressure Unit
        + + +
        hPa
        +
        + +
        inHg
        +
        + +
        mmHg
        +
        +
        +
        + + + schedule +
        Time format
        + + +
        12 hr
        +
        + +
        24 hr
        +
        +
        +
        + +
        + +

        Additional

        + + + + language +
        App language
        +
        English
        +
        + + + info +
        About WeatherMaster
        +
        Learn about the app
        + chevron_right +
        + + + + favorite +
        Support
        +
        On Ko-Fi
        + open_in_new +
        + +
        + + +

        Data provided by

        + + +
        OpenWeatherMap
        + open_in_new +
        + +
        Opencagedata
        + open_in_new +
        + +
        Open-Meteo
        + open_in_new +
        +
        + + + +

        Map

        + + +
        Leaflet
        + open_in_new +
        + +
        Rainviewer
        + open_in_new +
        + +
        Carto
        + open_in_new +
        +
        + + + +

        + + + +
        +
        +
        + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/assets/ripple-files/icon-ripple.js b/app/src/main/assets/ripple-files/icon-ripple.js new file mode 100644 index 000000000..445a8ff90 --- /dev/null +++ b/app/src/main/assets/ripple-files/icon-ripple.js @@ -0,0 +1,25 @@ +function playEffect(button) { + button.classList.add('touched'); + + button.classList.remove('touchedfade'); + +} +function playEffect2(button) { + + + + setTimeout(()=>{ + button.classList.add('touchedfade'); + }, 200); + + setTimeout(()=>{ + button.classList.remove('touched'); + button.classList.remove('touchedfade'); + }, 300); +} + + + + + + diff --git a/app/src/main/assets/ripple-files/ripple.css b/app/src/main/assets/ripple-files/ripple.css new file mode 100644 index 000000000..1c61fb0c6 --- /dev/null +++ b/app/src/main/assets/ripple-files/ripple.css @@ -0,0 +1,231 @@ +.md-ripples { + position: relative; + overflow: hidden; + +} + +.ripples-bounded .ripple { + background-color:var(--On-Surface); + opacity: 0.2; + animation: ripple3 150ms ease-out !important; + } + + + + .ripples-inverse .ripple { + background-color:var(--Inverse-Primary); + opacity: 0.25; + animation: ripple2 130ms ease-out !important; +} + + .ripples-dialog .ripple { + background-color:var(--Primary); + opacity: 0.25; + animation: ripple 100ms ease-out !important; + } + + .ripples-full .ripple { + background-color:var(--Primary); + opacity: 0.25; + animation: ripple 130ms ease-out !important; +} + + button-outlined .ripple, button-tonal .ripple, text-button .ripple, fab .ripple, fab-small .ripple, fab-large .ripple, button-outlined-i .ripple, button-tonal-i .ripple, text-button-i .ripple{ + background-color:var(--Primary); + opacity: 0.25; + animation: ripple2 130ms ease-out !important; +} + +button-filled .ripple, button-filled-i .ripple{ + background-color:var(--ripple-bounded); + opacity: 0.25; + animation: ripple2 130ms ease-out !important; +} + + .ripple { + background-color: #000; + position: absolute; + border-radius: 50%; + touch-action: none !important; + pointer-events: none !important; + animation: ripple 70ms ease-out !important; + } + + /* icon */ + + .ripple-icon-btn { + position: relative; + cursor: pointer; + border-radius: 50%; + border: none; + } + + + .ripple-icon-btn.regular{ + width: 40px; + height: 40px; + border-radius: 50px; + font-size: 24px; + color: var(--On-Surface); + display: flex; + align-items: center; + justify-content: center; + background-color: transparent; + flex-shrink: 0; + } + + .ripple-icon-btn.regular.filled{ + width: 40px; + height: 40px; + border-radius: 50px; + font-size: 24px; + color: var(--On-Primary); + display: flex; + align-items: center; + justify-content: center; + background-color: var(--Primary); + } + + .ripple-icon-btn.regular.tonal{ + width: 40px; + height: 40px; + border-radius: 50px; + font-size: 24px; + color: var(--On-Secondary-Container); + display: flex; + align-items: center; + justify-content: center; + background-color: var(--Secondary-Container); + } + + .ripple-icon-btn.regular.outlined{ + width: 40px; + height: 40px; + border-radius: 50px; + font-size: 24px; + color: var(--Primary); + display: flex; + align-items: center; + justify-content: center; + background-color: transparent; + border: 1px solid var(--Outline); + } + + + .ripple-icon-btn.regular.primary{ + width: 40px; + height: 40px; + border-radius: 50px; + font-size: 24px; + color: var(--On-Primary-Container); + display: flex; + align-items: center; + justify-content: center; + background-color: var(--Primary-Container); + } + + .ripple-icon-btn.regular.tertiary{ + width: 40px; + height: 40px; + border-radius: 50px; + font-size: 24px; + color: var(--On-Tertiary-Container); + display: flex; + align-items: center; + justify-content: center; + background-color: var(--Tertiary-Container); + } + + .ripple-icon-btn.regular.surface{ + width: 40px; + height: 40px; + border-radius: 50px; + font-size: 24px; + color: var(--On-Surface); + display: flex; + align-items: center; + justify-content: center; + background-color: var(--Surface-Container-High); + } + + + .ripple-effect-icon { + position: absolute; + top: 0; + left: 0; + bottom: 0; + right: 0; + width: 100%; + height: 100%; + background-color: rgb(255,255,255, 0); + border-radius: 50%; + opacity: 0; + transform: scale(1.5); + transition: transform 0.15s, opacity 0.1s; + pointer-events: none; + } + + + + .ripple-icon-btn.touched .ripple-effect-icon { + transform: scale(1); + background-color: var(--ripple-unbounded); + opacity: 0.17; + + } + + + + .ripple-icon-btn.touchedfade .ripple-effect-icon { + transition: opacity 0.2s, scale 0.2s; + opacity: 0; + scale: 1.2; + + } + + .ripple-icon-btn[disabled]{ + pointer-events: none; + color: var(--On-Surface); + opacity: 0.38; + } + + +@keyframes ripple { + from { + transform: scale(0); + } + to { + transform: scale(1); + } +} + +@keyframes ripple2 { + 0% { + transform: scale(0.3); + + } + 100% { + transform: scale(1); + + } +} + +@keyframes ripple3 { + 0% { + transform: scale(0.5); + + } + 100% { + transform: scale(1); + + } + } + + +/* icon-ripple */ + + +/* */ \ No newline at end of file diff --git a/app/src/main/assets/ripple-files/ripples.js b/app/src/main/assets/ripple-files/ripples.js new file mode 100644 index 000000000..c64988465 --- /dev/null +++ b/app/src/main/assets/ripple-files/ripples.js @@ -0,0 +1,2 @@ +/*! For license information please see ripples.js.LICENSE.txt */ +(()=>{var e={750:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(645),i=n.n(r)()((function(e){return e[1]}));i.push([e.id,".md-ripples{position:relative;overflow:hidden;-webkit-tap-highlight-color:transparent}.ripples-light .ripple{background-color:#fff}.ripples-dark .ripple{background-color:#000}.ripple{background-color:#000;opacity:.16;position:absolute;border-radius:50%;pointer-events:none;animation:ripple .3s ease-out}@keyframes ripple{from{transform:scale(0)}to{transform:scale(1)}}",""]);const o=i},645:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=e(t);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,r){"string"==typeof e&&(e=[[null,e,""]]);var i={};if(r)for(var o=0;o0&&t-1 in e)}E.fn=E.prototype={jquery:C,constructor:E,length:0,toArray:function(){return s.call(this)},get:function(e){return null==e?s.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=E.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return E.each(this,e)},map:function(e){return this.pushStack(E.map(this,(function(t,n){return e.call(t,n,t)})))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(E.grep(this,(function(e,t){return(t+1)%2})))},odd:function(){return this.pushStack(E.grep(this,(function(e,t){return t%2})))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n+~]|[\\x20\\t\\r\\n\\f])[\\x20\\t\\r\\n\\f]*"),U=new RegExp(R+"|>"),X=new RegExp(B),V=new RegExp("^"+I+"$"),Y={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+B),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\([\\x20\\t\\r\\n\\f]*(even|odd|(([+-]|)(\\d*)n|)[\\x20\\t\\r\\n\\f]*(?:([+-]|)[\\x20\\t\\r\\n\\f]*(\\d+)|))[\\x20\\t\\r\\n\\f]*\\)|)","i"),bool:new RegExp("^(?:"+M+")$","i"),needsContext:new RegExp("^[\\x20\\t\\r\\n\\f]*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\([\\x20\\t\\r\\n\\f]*((?:-\\d)?\\d*)[\\x20\\t\\r\\n\\f]*\\)|)(?=[^-]|$)","i")},G=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}[\\x20\\t\\r\\n\\f]?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){p()},ae=be((function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()}),{dir:"parentNode",next:"legend"});try{H.apply(D=O.call(w.childNodes),w.childNodes),D[w.childNodes.length].nodeType}catch(e){H={apply:D.length?function(e,t){q.apply(e,O.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}function se(e,t,r,i){var o,s,l,c,f,h,m,y=t&&t.ownerDocument,w=t?t.nodeType:9;if(r=r||[],"string"!=typeof e||!e||1!==w&&9!==w&&11!==w)return r;if(!i&&(p(t),t=t||d,g)){if(11!==w&&(f=Z.exec(e)))if(o=f[1]){if(9===w){if(!(l=t.getElementById(o)))return r;if(l.id===o)return r.push(l),r}else if(y&&(l=y.getElementById(o))&&x(t,l)&&l.id===o)return r.push(l),r}else{if(f[2])return H.apply(r,t.getElementsByTagName(e)),r;if((o=f[3])&&n.getElementsByClassName&&t.getElementsByClassName)return H.apply(r,t.getElementsByClassName(o)),r}if(n.qsa&&!A[e+" "]&&(!v||!v.test(e))&&(1!==w||"object"!==t.nodeName.toLowerCase())){if(m=e,y=t,1===w&&(U.test(e)||z.test(e))){for((y=ee.test(e)&&me(t.parentNode)||t)===t&&n.scope||((c=t.getAttribute("id"))?c=c.replace(re,ie):t.setAttribute("id",c=b)),s=(h=a(e)).length;s--;)h[s]=(c?"#"+c:":scope")+" "+xe(h[s]);m=h.join(",")}try{return H.apply(r,y.querySelectorAll(m)),r}catch(t){A(e,!0)}finally{c===b&&t.removeAttribute("id")}}}return u(e.replace($,"$1"),t,r,i)}function ue(){var e=[];return function t(n,i){return e.push(n+" ")>r.cacheLength&&delete t[e.shift()],t[n+" "]=i}}function le(e){return e[b]=!0,e}function ce(e){var t=d.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){for(var n=e.split("|"),i=n.length;i--;)r.attrHandle[n[i]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function de(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function he(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function ge(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&ae(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function ve(e){return le((function(t){return t=+t,le((function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))}))}))}function me(e){return e&&void 0!==e.getElementsByTagName&&e}for(t in n=se.support={},o=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!G.test(t||n&&n.nodeName||"HTML")},p=se.setDocument=function(e){var t,i,a=e?e.ownerDocument||e:w;return a!=d&&9===a.nodeType&&a.documentElement?(h=(d=a).documentElement,g=!o(d),w!=d&&(i=d.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",oe,!1):i.attachEvent&&i.attachEvent("onunload",oe)),n.scope=ce((function(e){return h.appendChild(e).appendChild(d.createElement("div")),void 0!==e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length})),n.attributes=ce((function(e){return e.className="i",!e.getAttribute("className")})),n.getElementsByTagName=ce((function(e){return e.appendChild(d.createComment("")),!e.getElementsByTagName("*").length})),n.getElementsByClassName=K.test(d.getElementsByClassName),n.getById=ce((function(e){return h.appendChild(e).id=b,!d.getElementsByName||!d.getElementsByName(b).length})),n.getById?(r.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&g){var n=t.getElementById(e);return n?[n]:[]}}):(r.filter.ID=function(e){var t=e.replace(te,ne);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&g){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];for(i=t.getElementsByName(e),r=0;o=i[r++];)if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),r.find.TAG=n.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):n.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},r.find.CLASS=n.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&g)return t.getElementsByClassName(e)},m=[],v=[],(n.qsa=K.test(d.querySelectorAll))&&(ce((function(e){var t;h.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]=[\\x20\\t\\r\\n\\f]*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\[[\\x20\\t\\r\\n\\f]*(?:value|"+M+")"),e.querySelectorAll("[id~="+b+"-]").length||v.push("~="),(t=d.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\[[\\x20\\t\\r\\n\\f]*name[\\x20\\t\\r\\n\\f]*=[\\x20\\t\\r\\n\\f]*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+b+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")})),ce((function(e){e.innerHTML="";var t=d.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name[\\x20\\t\\r\\n\\f]*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),h.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")}))),(n.matchesSelector=K.test(y=h.matches||h.webkitMatchesSelector||h.mozMatchesSelector||h.oMatchesSelector||h.msMatchesSelector))&&ce((function(e){n.disconnectedMatch=y.call(e,"*"),y.call(e,"[s!='']:x"),m.push("!=",B)})),v=v.length&&new RegExp(v.join("|")),m=m.length&&new RegExp(m.join("|")),t=K.test(h.compareDocumentPosition),x=t||K.test(h.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},N=t?function(e,t){if(e===t)return f=!0,0;var r=!e.compareDocumentPosition-!t.compareDocumentPosition;return r||(1&(r=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!n.sortDetached&&t.compareDocumentPosition(e)===r?e==d||e.ownerDocument==w&&x(w,e)?-1:t==d||t.ownerDocument==w&&x(w,t)?1:c?P(c,e)-P(c,t):0:4&r?-1:1)}:function(e,t){if(e===t)return f=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==d?-1:t==d?1:i?-1:o?1:c?P(c,e)-P(c,t):0;if(i===o)return pe(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)s.unshift(n);for(;a[r]===s[r];)r++;return r?pe(a[r],s[r]):a[r]==w?-1:s[r]==w?1:0},d):d},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(p(e),n.matchesSelector&&g&&!A[t+" "]&&(!m||!m.test(t))&&(!v||!v.test(t)))try{var r=y.call(e,t);if(r||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){A(t,!0)}return se(t,d,null,[e]).length>0},se.contains=function(e,t){return(e.ownerDocument||e)!=d&&p(e),x(e,t)},se.attr=function(e,t){(e.ownerDocument||e)!=d&&p(e);var i=r.attrHandle[t.toLowerCase()],o=i&&j.call(r.attrHandle,t.toLowerCase())?i(e,t,!g):void 0;return void 0!==o?o:n.attributes||!g?e.getAttribute(t):(o=e.getAttributeNode(t))&&o.specified?o.value:null},se.escape=function(e){return(e+"").replace(re,ie)},se.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},se.uniqueSort=function(e){var t,r=[],i=0,o=0;if(f=!n.detectDuplicates,c=!n.sortStable&&e.slice(0),e.sort(N),f){for(;t=e[o++];)t===e[o]&&(i=r.push(o));for(;i--;)e.splice(r[i],1)}return c=null,e},i=se.getText=function(e){var t,n="",r=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=i(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[r++];)n+=i(t);return n},(r=se.selectors={cacheLength:50,createPseudo:le,match:Y,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return Y.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=a(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=E[e+" "];return t||(t=new RegExp("(^|[\\x20\\t\\r\\n\\f])"+e+"("+R+"|$)"))&&E(e,(function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")}))},ATTR:function(e,t,n){return function(r){var i=se.attr(r,e);return null==i?"!="===t:!t||(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i.replace(F," ")+" ").indexOf(n)>-1:"|="===t&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,f,p,d,h,g=o!==a?"nextSibling":"previousSibling",v=t.parentNode,m=s&&t.nodeName.toLowerCase(),y=!u&&!s,x=!1;if(v){if(o){for(;g;){for(p=t;p=p[g];)if(s?p.nodeName.toLowerCase()===m:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?v.firstChild:v.lastChild],a&&y){for(x=(d=(l=(c=(f=(p=v)[b]||(p[b]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]||[])[0]===T&&l[1])&&l[2],p=d&&v.childNodes[d];p=++d&&p&&p[g]||(x=d=0)||h.pop();)if(1===p.nodeType&&++x&&p===t){c[e]=[T,d,x];break}}else if(y&&(x=d=(l=(c=(f=(p=t)[b]||(p[b]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]||[])[0]===T&&l[1]),!1===x)for(;(p=++d&&p&&p[g]||(x=d=0)||h.pop())&&((s?p.nodeName.toLowerCase()!==m:1!==p.nodeType)||!++x||(y&&((c=(f=p[b]||(p[b]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]=[T,x]),p!==t)););return(x-=i)===r||x%r==0&&x/r>=0}}},PSEUDO:function(e,t){var n,i=r.pseudos[e]||r.setFilters[e.toLowerCase()]||se.error("unsupported pseudo: "+e);return i[b]?i(t):i.length>1?(n=[e,e,"",t],r.setFilters.hasOwnProperty(e.toLowerCase())?le((function(e,n){for(var r,o=i(e,t),a=o.length;a--;)e[r=P(e,o[a])]=!(n[r]=o[a])})):function(e){return i(e,0,n)}):i}},pseudos:{not:le((function(e){var t=[],n=[],r=s(e.replace($,"$1"));return r[b]?le((function(e,t,n,i){for(var o,a=r(e,null,i,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))})):function(e,i,o){return t[0]=e,r(t,null,o,n),t[0]=null,!n.pop()}})),has:le((function(e){return function(t){return se(e,t).length>0}})),contains:le((function(e){return e=e.replace(te,ne),function(t){return(t.textContent||i(t)).indexOf(e)>-1}})),lang:le((function(e){return V.test(e||"")||se.error("unsupported lang: "+e),e=e.replace(te,ne).toLowerCase(),function(t){var n;do{if(n=g?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}})),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===h},focus:function(e){return e===d.activeElement&&(!d.hasFocus||d.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:ge(!1),disabled:ge(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!r.pseudos.empty(e)},header:function(e){return J.test(e.nodeName)},input:function(e){return Q.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:ve((function(){return[0]})),last:ve((function(e,t){return[t-1]})),eq:ve((function(e,t,n){return[n<0?n+t:n]})),even:ve((function(e,t){for(var n=0;nt?t:n;--r>=0;)e.push(r);return e})),gt:ve((function(e,t,n){for(var r=n<0?n+t:n;++r1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function Te(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s-1&&(o[l]=!(a[l]=f))}}else m=Te(m===a?m.splice(h,m.length):m),i?i(null,a,m,u):H.apply(a,m)}))}function Ee(e){for(var t,n,i,o=e.length,a=r.relative[e[0].type],s=a||r.relative[" "],u=a?1:0,c=be((function(e){return e===t}),s,!0),f=be((function(e){return P(t,e)>-1}),s,!0),p=[function(e,n,r){var i=!a&&(r||n!==l)||((t=n).nodeType?c(e,n,r):f(e,n,r));return t=null,i}];u1&&we(p),u>1&&xe(e.slice(0,u-1).concat({value:" "===e[u-2].type?"*":""})).replace($,"$1"),n,u0,i=e.length>0,o=function(o,a,s,u,c){var f,h,v,m=0,y="0",x=o&&[],b=[],w=l,C=o||i&&r.find.TAG("*",c),E=T+=null==w?1:Math.random()||.1,S=C.length;for(c&&(l=a==d||a||c);y!==S&&null!=(f=C[y]);y++){if(i&&f){for(h=0,a||f.ownerDocument==d||(p(f),s=!g);v=e[h++];)if(v(f,a||d,s)){u.push(f);break}c&&(T=E)}n&&((f=!v&&f)&&m--,o&&x.push(f))}if(m+=y,n&&y!==m){for(h=0;v=t[h++];)v(x,b,a,s);if(o){if(m>0)for(;y--;)x[y]||b[y]||(b[y]=L.call(u));b=Te(b)}H.apply(u,b),c&&!o&&b.length>0&&m+t.length>1&&se.uniqueSort(u)}return c&&(T=E,l=w),x};return n?le(o):o}(o,i))).selector=e}return s},u=se.select=function(e,t,n,i){var o,u,l,c,f,p="function"==typeof e&&e,d=!i&&a(e=p.selector||e);if(n=n||[],1===d.length){if((u=d[0]=d[0].slice(0)).length>2&&"ID"===(l=u[0]).type&&9===t.nodeType&&g&&r.relative[u[1].type]){if(!(t=(r.find.ID(l.matches[0].replace(te,ne),t)||[])[0]))return n;p&&(t=t.parentNode),e=e.slice(u.shift().value.length)}for(o=Y.needsContext.test(e)?0:u.length;o--&&(l=u[o],!r.relative[c=l.type]);)if((f=r.find[c])&&(i=f(l.matches[0].replace(te,ne),ee.test(u[0].type)&&me(t.parentNode)||t))){if(u.splice(o,1),!(e=i.length&&xe(u)))return H.apply(n,i),n;break}}return(p||s(e,d))(i,t,!g,n,!t||ee.test(e)&&me(t.parentNode)||t),n},n.sortStable=b.split("").sort(N).join("")===b,n.detectDuplicates=!!f,p(),n.sortDetached=ce((function(e){return 1&e.compareDocumentPosition(d.createElement("fieldset"))})),ce((function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")}))||fe("type|href|height|width",(function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)})),n.attributes&&ce((function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")}))||fe("value",(function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue})),ce((function(e){return null==e.getAttribute("disabled")}))||fe(M,(function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null})),se}(r);E.find=k,E.expr=k.selectors,E.expr[":"]=E.expr.pseudos,E.uniqueSort=E.unique=k.uniqueSort,E.text=k.getText,E.isXMLDoc=k.isXML,E.contains=k.contains,E.escapeSelector=k.escape;var A=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&E(e).is(n))break;r.push(e)}return r},N=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},j=E.expr.match.needsContext;function D(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var L=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function q(e,t,n){return m(t)?E.grep(e,(function(e,r){return!!t.call(e,r,e)!==n})):t.nodeType?E.grep(e,(function(e){return e===t!==n})):"string"!=typeof t?E.grep(e,(function(e){return c.call(t,e)>-1!==n})):E.filter(t,e,n)}E.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?E.find.matchesSelector(r,e)?[r]:[]:E.find.matches(e,E.grep(t,(function(e){return 1===e.nodeType})))},E.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(E(e).filter((function(){for(t=0;t1?E.uniqueSort(n):n},filter:function(e){return this.pushStack(q(this,e||[],!1))},not:function(e){return this.pushStack(q(this,e||[],!0))},is:function(e){return!!q(this,"string"==typeof e&&j.test(e)?E(e):e||[],!1).length}});var H,O=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(E.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||H,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:O.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof E?t[0]:t,E.merge(this,E.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:x,!0)),L.test(r[1])&&E.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=x.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(E):E.makeArray(e,this)}).prototype=E.fn,H=E(x);var P=/^(?:parents|prev(?:Until|All))/,M={children:!0,contents:!0,next:!0,prev:!0};function R(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}E.fn.extend({has:function(e){var t=E(e,this),n=t.length;return this.filter((function(){for(var e=0;e-1:1===n.nodeType&&E.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?E.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?c.call(E(e),this[0]):c.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(E.uniqueSort(E.merge(this.get(),E(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),E.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return A(e,"parentNode")},parentsUntil:function(e,t,n){return A(e,"parentNode",n)},next:function(e){return R(e,"nextSibling")},prev:function(e){return R(e,"previousSibling")},nextAll:function(e){return A(e,"nextSibling")},prevAll:function(e){return A(e,"previousSibling")},nextUntil:function(e,t,n){return A(e,"nextSibling",n)},prevUntil:function(e,t,n){return A(e,"previousSibling",n)},siblings:function(e){return N((e.parentNode||{}).firstChild,e)},children:function(e){return N(e.firstChild)},contents:function(e){return null!=e.contentDocument&&a(e.contentDocument)?e.contentDocument:(D(e,"template")&&(e=e.content||e),E.merge([],e.childNodes))}},(function(e,t){E.fn[e]=function(n,r){var i=E.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=E.filter(r,i)),this.length>1&&(M[e]||E.uniqueSort(i),P.test(e)&&i.reverse()),this.pushStack(i)}}));var I=/[^\x20\t\r\n\f]+/g;function W(e){return e}function B(e){throw e}function F(e,t,n,r){var i;try{e&&m(i=e.promise)?i.call(e).done(t).fail(n):e&&m(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}E.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return E.each(e.match(I)||[],(function(e,n){t[n]=!0})),t}(e):E.extend({},e);var t,n,r,i,o=[],a=[],s=-1,u=function(){for(i=i||e.once,r=t=!0;a.length;s=-1)for(n=a.shift();++s-1;)o.splice(n,1),n<=s&&s--})),this},has:function(e){return e?E.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=a=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=a=[],n||t||(o=n=""),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=[e,(n=n||[]).slice?n.slice():n],a.push(n),t||u()),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!r}};return l},E.extend({Deferred:function(e){var t=[["notify","progress",E.Callbacks("memory"),E.Callbacks("memory"),2],["resolve","done",E.Callbacks("once memory"),E.Callbacks("once memory"),0,"resolved"],["reject","fail",E.Callbacks("once memory"),E.Callbacks("once memory"),1,"rejected"]],n="pending",i={state:function(){return n},always:function(){return o.done(arguments).fail(arguments),this},catch:function(e){return i.then(null,e)},pipe:function(){var e=arguments;return E.Deferred((function(n){E.each(t,(function(t,r){var i=m(e[r[4]])&&e[r[4]];o[r[1]]((function(){var e=i&&i.apply(this,arguments);e&&m(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this,i?[e]:arguments)}))})),e=null})).promise()},then:function(e,n,i){var o=0;function a(e,t,n,i){return function(){var s=this,u=arguments,l=function(){var r,l;if(!(e=o&&(n!==B&&(s=void 0,u=[r]),t.rejectWith(s,u))}};e?c():(E.Deferred.getStackHook&&(c.stackTrace=E.Deferred.getStackHook()),r.setTimeout(c))}}return E.Deferred((function(r){t[0][3].add(a(0,r,m(i)?i:W,r.notifyWith)),t[1][3].add(a(0,r,m(e)?e:W)),t[2][3].add(a(0,r,m(n)?n:B))})).promise()},promise:function(e){return null!=e?E.extend(e,i):i}},o={};return E.each(t,(function(e,r){var a=r[2],s=r[5];i[r[1]]=a.add,s&&a.add((function(){n=s}),t[3-e][2].disable,t[3-e][3].disable,t[0][2].lock,t[0][3].lock),a.add(r[3].fire),o[r[0]]=function(){return o[r[0]+"With"](this===o?void 0:this,arguments),this},o[r[0]+"With"]=a.fireWith})),i.promise(o),e&&e.call(o,o),o},when:function(e){var t=arguments.length,n=t,r=Array(n),i=s.call(arguments),o=E.Deferred(),a=function(e){return function(n){r[e]=this,i[e]=arguments.length>1?s.call(arguments):n,--t||o.resolveWith(r,i)}};if(t<=1&&(F(e,o.done(a(n)).resolve,o.reject,!t),"pending"===o.state()||m(i[n]&&i[n].then)))return o.then();for(;n--;)F(i[n],a(n),o.reject);return o.promise()}});var $=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;E.Deferred.exceptionHook=function(e,t){r.console&&r.console.warn&&e&&$.test(e.name)&&r.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},E.readyException=function(e){r.setTimeout((function(){throw e}))};var _=E.Deferred();function z(){x.removeEventListener("DOMContentLoaded",z),r.removeEventListener("load",z),E.ready()}E.fn.ready=function(e){return _.then(e).catch((function(e){E.readyException(e)})),this},E.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--E.readyWait:E.isReady)||(E.isReady=!0,!0!==e&&--E.readyWait>0||_.resolveWith(x,[E]))}}),E.ready.then=_.then,"complete"===x.readyState||"loading"!==x.readyState&&!x.documentElement.doScroll?r.setTimeout(E.ready):(x.addEventListener("DOMContentLoaded",z),r.addEventListener("load",z));var U=function(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if("object"===T(n))for(s in i=!0,n)U(e,t,s,n[s],!0,o,a);else if(void 0!==r&&(i=!0,m(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(E(e),n)})),t))for(;s1,null,!0)},removeData:function(e){return this.each((function(){Z.remove(this,e)}))}}),E.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=K.get(e,t),n&&(!r||Array.isArray(n)?r=K.access(e,t,E.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=E.queue(e,t),r=n.length,i=n.shift(),o=E._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,(function(){E.dequeue(e,t)}),o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return K.get(e,n)||K.access(e,n,{empty:E.Callbacks("once memory").add((function(){K.remove(e,[t+"queue",n])}))})}}),E.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length\x20\t\r\n\f]*)/i,ye=/^$|^module$|\/(?:java|ecma)script/i;he=x.createDocumentFragment().appendChild(x.createElement("div")),(ge=x.createElement("input")).setAttribute("type","radio"),ge.setAttribute("checked","checked"),ge.setAttribute("name","t"),he.appendChild(ge),v.checkClone=he.cloneNode(!0).cloneNode(!0).lastChild.checked,he.innerHTML="",v.noCloneChecked=!!he.cloneNode(!0).lastChild.defaultValue,he.innerHTML="",v.option=!!he.lastChild;var xe={thead:[1,"","
        "],col:[2,"","
        "],tr:[2,"","
        "],td:[3,"","
        "],_default:[0,"",""]};function be(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&D(e,t)?E.merge([e],n):n}function we(e,t){for(var n=0,r=e.length;n",""]);var Te=/<|&#?\w+;/;function Ce(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d-1)i&&i.push(o);else if(l=se(o),a=be(f.appendChild(o),"script"),l&&we(a),n)for(c=0;o=a[c++];)ye.test(o.type||"")&&n.push(o);return f}var Ee=/^([^.]*)(?:\.(.+)|)/;function Se(){return!0}function ke(){return!1}function Ae(e,t){return e===function(){try{return x.activeElement}catch(e){}}()==("focus"===t)}function Ne(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)Ne(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=ke;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return E().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=E.guid++)),e.each((function(){E.event.add(this,t,i,r,n)}))}function je(e,t,n){n?(K.set(e,t,!1),E.event.add(e,t,{namespace:!1,handler:function(e){var r,i,o=K.get(this,t);if(1&e.isTrigger&&this[t]){if(o.length)(E.event.special[t]||{}).delegateType&&e.stopPropagation();else if(o=s.call(arguments),K.set(this,t,o),r=n(this,t),this[t](),o!==(i=K.get(this,t))||r?K.set(this,t,!1):i={},o!==i)return e.stopImmediatePropagation(),e.preventDefault(),i&&i.value}else o.length&&(K.set(this,t,{value:E.event.trigger(E.extend(o[0],E.Event.prototype),o.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===K.get(e,t)&&E.event.add(e,t,Se)}E.event={global:{},add:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=K.get(e);if(Q(e))for(n.handler&&(n=(o=n).handler,i=o.selector),i&&E.find.matchesSelector(ae,i),n.guid||(n.guid=E.guid++),(u=v.events)||(u=v.events=Object.create(null)),(a=v.handle)||(a=v.handle=function(t){return void 0!==E&&E.event.triggered!==t.type?E.event.dispatch.apply(e,arguments):void 0}),l=(t=(t||"").match(I)||[""]).length;l--;)d=g=(s=Ee.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=E.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=E.event.special[d]||{},c=E.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&E.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(e,r,h,a)||e.addEventListener&&e.addEventListener(d,a)),f.add&&(f.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),E.event.global[d]=!0)},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=K.hasData(e)&&K.get(e);if(v&&(u=v.events)){for(l=(t=(t||"").match(I)||[""]).length;l--;)if(d=g=(s=Ee.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d){for(f=E.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;o--;)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||E.removeEvent(e,d,v.handle),delete u[d])}else for(d in u)E.event.remove(e,d+t[l],n,r,!0);E.isEmptyObject(u)&&K.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=new Array(arguments.length),u=E.event.fix(e),l=(K.get(this,"events")||Object.create(null))[u.type]||[],c=E.event.special[u.type]||{};for(s[0]=u,t=1;t=1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n-1:E.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u\s*$/g;function He(e,t){return D(e,"table")&&D(11!==t.nodeType?t:t.firstChild,"tr")&&E(e).children("tbody")[0]||e}function Oe(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Pe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Me(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(K.hasData(e)&&(s=K.get(e).events))for(i in K.remove(t,"handle events"),s)for(n=0,r=s[i].length;n1&&"string"==typeof h&&!v.checkClone&&Le.test(h))return e.each((function(i){var o=e.eq(i);g&&(t[0]=h.call(this,i,o.html())),Ie(o,t,n,r)}));if(p&&(o=(i=Ce(t,e[0].ownerDocument,!1,e,r)).firstChild,1===i.childNodes.length&&(i=o),o||r)){for(s=(a=E.map(be(i,"script"),Oe)).length;f0&&we(a,!u&&be(e,"script")),s},cleanData:function(e){for(var t,n,r,i=E.event.special,o=0;void 0!==(n=e[o]);o++)if(Q(n)){if(t=n[K.expando]){if(t.events)for(r in t.events)i[r]?E.event.remove(n,r):E.removeEvent(n,r,t.handle);n[K.expando]=void 0}n[Z.expando]&&(n[Z.expando]=void 0)}}}),E.fn.extend({detach:function(e){return We(this,e,!0)},remove:function(e){return We(this,e)},text:function(e){return U(this,(function(e){return void 0===e?E.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)}))}),null,e,arguments.length)},append:function(){return Ie(this,arguments,(function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||He(this,e).appendChild(e)}))},prepend:function(){return Ie(this,arguments,(function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=He(this,e);t.insertBefore(e,t.firstChild)}}))},before:function(){return Ie(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this)}))},after:function(){return Ie(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)}))},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(E.cleanData(be(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map((function(){return E.clone(this,e,t)}))},html:function(e){return U(this,(function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!De.test(e)&&!xe[(me.exec(e)||["",""])[1].toLowerCase()]){e=E.htmlPrefilter(e);try{for(;n=0&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))||0),u}function nt(e,t,n){var r=Fe(e),i=(!v.boxSizingReliable()||n)&&"border-box"===E.css(e,"boxSizing",!1,r),o=i,a=ze(e,t,r),s="offset"+t[0].toUpperCase()+t.slice(1);if(Be.test(a)){if(!n)return a;a="auto"}return(!v.boxSizingReliable()&&i||!v.reliableTrDimensions()&&D(e,"tr")||"auto"===a||!parseFloat(a)&&"inline"===E.css(e,"display",!1,r))&&e.getClientRects().length&&(i="border-box"===E.css(e,"boxSizing",!1,r),(o=s in e)&&(a=e[s])),(a=parseFloat(a)||0)+tt(e,t,n||(i?"border":"content"),o,r,a)+"px"}function rt(e,t,n,r,i){return new rt.prototype.init(e,t,n,r,i)}E.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=ze(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=G(t),u=Je.test(t),l=e.style;if(u||(t=Ge(s)),a=E.cssHooks[t]||E.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:l[t];"string"==(o=typeof n)&&(i=ie.exec(n))&&i[1]&&(n=ce(e,t,i),o="number"),null!=n&&n==n&&("number"!==o||u||(n+=i&&i[3]||(E.cssNumber[s]?"":"px")),v.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(u?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,r){var i,o,a,s=G(t);return Je.test(t)||(t=Ge(s)),(a=E.cssHooks[t]||E.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=ze(e,t,r)),"normal"===i&&t in Ze&&(i=Ze[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),E.each(["height","width"],(function(e,t){E.cssHooks[t]={get:function(e,n,r){if(n)return!Qe.test(E.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?nt(e,t,r):$e(e,Ke,(function(){return nt(e,t,r)}))},set:function(e,n,r){var i,o=Fe(e),a=!v.scrollboxSize()&&"absolute"===o.position,s=(a||r)&&"border-box"===E.css(e,"boxSizing",!1,o),u=r?tt(e,t,r,s,o):0;return s&&a&&(u-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(o[t])-tt(e,t,"border",!1,o)-.5)),u&&(i=ie.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=E.css(e,t)),et(0,n,u)}}})),E.cssHooks.marginLeft=Ue(v.reliableMarginLeft,(function(e,t){if(t)return(parseFloat(ze(e,"marginLeft"))||e.getBoundingClientRect().left-$e(e,{marginLeft:0},(function(){return e.getBoundingClientRect().left})))+"px"})),E.each({margin:"",padding:"",border:"Width"},(function(e,t){E.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+oe[r]+t]=o[r]||o[r-2]||o[0];return i}},"margin"!==e&&(E.cssHooks[e+t].set=et)})),E.fn.extend({css:function(e,t){return U(this,(function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=Fe(e),i=t.length;a1)}}),E.Tween=rt,rt.prototype={constructor:rt,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||E.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(E.cssNumber[n]?"":"px")},cur:function(){var e=rt.propHooks[this.prop];return e&&e.get?e.get(this):rt.propHooks._default.get(this)},run:function(e){var t,n=rt.propHooks[this.prop];return this.options.duration?this.pos=t=E.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):rt.propHooks._default.set(this),this}},rt.prototype.init.prototype=rt.prototype,rt.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=E.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){E.fx.step[e.prop]?E.fx.step[e.prop](e):1!==e.elem.nodeType||!E.cssHooks[e.prop]&&null==e.elem.style[Ge(e.prop)]?e.elem[e.prop]=e.now:E.style(e.elem,e.prop,e.now+e.unit)}}},rt.propHooks.scrollTop=rt.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},E.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},E.fx=rt.prototype.init,E.fx.step={};var it,ot,at=/^(?:toggle|show|hide)$/,st=/queueHooks$/;function ut(){ot&&(!1===x.hidden&&r.requestAnimationFrame?r.requestAnimationFrame(ut):r.setTimeout(ut,E.fx.interval),E.fx.tick())}function lt(){return r.setTimeout((function(){it=void 0})),it=Date.now()}function ct(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=oe[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function ft(e,t,n){for(var r,i=(pt.tweeners[t]||[]).concat(pt.tweeners["*"]),o=0,a=i.length;o1)},removeAttr:function(e){return this.each((function(){E.removeAttr(this,e)}))}}),E.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?E.prop(e,t,n):(1===o&&E.isXMLDoc(e)||(i=E.attrHooks[t.toLowerCase()]||(E.expr.match.bool.test(t)?dt:void 0)),void 0!==n?null===n?void E.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=E.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!v.radioValue&&"radio"===t&&D(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(I);if(i&&1===e.nodeType)for(;n=i[r++];)e.removeAttribute(n)}}),dt={set:function(e,t,n){return!1===t?E.removeAttr(e,n):e.setAttribute(n,n),n}},E.each(E.expr.match.bool.source.match(/\w+/g),(function(e,t){var n=ht[t]||E.find.attr;ht[t]=function(e,t,r){var i,o,a=t.toLowerCase();return r||(o=ht[a],ht[a]=i,i=null!=n(e,t,r)?a:null,ht[a]=o),i}}));var gt=/^(?:input|select|textarea|button)$/i,vt=/^(?:a|area)$/i;function mt(e){return(e.match(I)||[]).join(" ")}function yt(e){return e.getAttribute&&e.getAttribute("class")||""}function xt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(I)||[]}E.fn.extend({prop:function(e,t){return U(this,E.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each((function(){delete this[E.propFix[e]||e]}))}}),E.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&E.isXMLDoc(e)||(t=E.propFix[t]||t,i=E.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=E.find.attr(e,"tabindex");return t?parseInt(t,10):gt.test(e.nodeName)||vt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),v.optSelected||(E.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),E.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){E.propFix[this.toLowerCase()]=this})),E.fn.extend({addClass:function(e){var t,n,r,i,o,a,s,u=0;if(m(e))return this.each((function(t){E(this).addClass(e.call(this,t,yt(this)))}));if((t=xt(e)).length)for(;n=this[u++];)if(i=yt(n),r=1===n.nodeType&&" "+mt(i)+" "){for(a=0;o=t[a++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(s=mt(r))&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,r,i,o,a,s,u=0;if(m(e))return this.each((function(t){E(this).removeClass(e.call(this,t,yt(this)))}));if(!arguments.length)return this.attr("class","");if((t=xt(e)).length)for(;n=this[u++];)if(i=yt(n),r=1===n.nodeType&&" "+mt(i)+" "){for(a=0;o=t[a++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");i!==(s=mt(r))&&n.setAttribute("class",s)}return this},toggleClass:function(e,t){var n=typeof e,r="string"===n||Array.isArray(e);return"boolean"==typeof t&&r?t?this.addClass(e):this.removeClass(e):m(e)?this.each((function(n){E(this).toggleClass(e.call(this,n,yt(this),t),t)})):this.each((function(){var t,i,o,a;if(r)for(i=0,o=E(this),a=xt(e);t=a[i++];)o.hasClass(t)?o.removeClass(t):o.addClass(t);else void 0!==e&&"boolean"!==n||((t=yt(this))&&K.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":K.get(this,"__className__")||""))}))},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+mt(yt(n))+" ").indexOf(t)>-1)return!0;return!1}});var bt=/\r/g;E.fn.extend({val:function(e){var t,n,r,i=this[0];return arguments.length?(r=m(e),this.each((function(n){var i;1===this.nodeType&&(null==(i=r?e.call(this,n,E(this).val()):e)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=E.map(i,(function(e){return null==e?"":e+""}))),(t=E.valHooks[this.type]||E.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))}))):i?(t=E.valHooks[i.type]||E.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(bt,""):null==n?"":n:void 0}}),E.extend({valHooks:{option:{get:function(e){var t=E.find.attr(e,"value");return null!=t?t:mt(E.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),E.each(["radio","checkbox"],(function(){E.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=E.inArray(E(e).val(),t)>-1}},v.checkOn||(E.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})})),v.focusin="onfocusin"in r;var wt=/^(?:focusinfocus|focusoutblur)$/,Tt=function(e){e.stopPropagation()};E.extend(E.event,{trigger:function(e,t,n,i){var o,a,s,u,l,c,f,p,h=[n||x],g=d.call(e,"type")?e.type:e,v=d.call(e,"namespace")?e.namespace.split("."):[];if(a=p=s=n=n||x,3!==n.nodeType&&8!==n.nodeType&&!wt.test(g+E.event.triggered)&&(g.indexOf(".")>-1&&(v=g.split("."),g=v.shift(),v.sort()),l=g.indexOf(":")<0&&"on"+g,(e=e[E.expando]?e:new E.Event(g,"object"==typeof e&&e)).isTrigger=i?2:3,e.namespace=v.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+v.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:E.makeArray(t,[e]),f=E.event.special[g]||{},i||!f.trigger||!1!==f.trigger.apply(n,t))){if(!i&&!f.noBubble&&!y(n)){for(u=f.delegateType||g,wt.test(u+g)||(a=a.parentNode);a;a=a.parentNode)h.push(a),s=a;s===(n.ownerDocument||x)&&h.push(s.defaultView||s.parentWindow||r)}for(o=0;(a=h[o++])&&!e.isPropagationStopped();)p=a,e.type=o>1?u:f.bindType||g,(c=(K.get(a,"events")||Object.create(null))[e.type]&&K.get(a,"handle"))&&c.apply(a,t),(c=l&&a[l])&&c.apply&&Q(a)&&(e.result=c.apply(a,t),!1===e.result&&e.preventDefault());return e.type=g,i||e.isDefaultPrevented()||f._default&&!1!==f._default.apply(h.pop(),t)||!Q(n)||l&&m(n[g])&&!y(n)&&((s=n[l])&&(n[l]=null),E.event.triggered=g,e.isPropagationStopped()&&p.addEventListener(g,Tt),n[g](),e.isPropagationStopped()&&p.removeEventListener(g,Tt),E.event.triggered=void 0,s&&(n[l]=s)),e.result}},simulate:function(e,t,n){var r=E.extend(new E.Event,n,{type:e,isSimulated:!0});E.event.trigger(r,null,t)}}),E.fn.extend({trigger:function(e,t){return this.each((function(){E.event.trigger(e,t,this)}))},triggerHandler:function(e,t){var n=this[0];if(n)return E.event.trigger(e,t,n,!0)}}),v.focusin||E.each({focus:"focusin",blur:"focusout"},(function(e,t){var n=function(e){E.event.simulate(t,e.target,E.event.fix(e))};E.event.special[t]={setup:function(){var r=this.ownerDocument||this.document||this,i=K.access(r,t);i||r.addEventListener(e,n,!0),K.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this.document||this,i=K.access(r,t)-1;i?K.access(r,t,i):(r.removeEventListener(e,n,!0),K.remove(r,t))}}}));var Ct=r.location,Et={guid:Date.now()},St=/\?/;E.parseXML=function(e){var t,n;if(!e||"string"!=typeof e)return null;try{t=(new r.DOMParser).parseFromString(e,"text/xml")}catch(e){}return n=t&&t.getElementsByTagName("parsererror")[0],t&&!n||E.error("Invalid XML: "+(n?E.map(n.childNodes,(function(e){return e.textContent})).join("\n"):e)),t};var kt=/\[\]$/,At=/\r?\n/g,Nt=/^(?:submit|button|image|reset|file)$/i,jt=/^(?:input|select|textarea|keygen)/i;function Dt(e,t,n,r){var i;if(Array.isArray(t))E.each(t,(function(t,i){n||kt.test(e)?r(e,i):Dt(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,n,r)}));else if(n||"object"!==T(t))r(e,t);else for(i in t)Dt(e+"["+i+"]",t[i],n,r)}E.param=function(e,t){var n,r=[],i=function(e,t){var n=m(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!E.isPlainObject(e))E.each(e,(function(){i(this.name,this.value)}));else for(n in e)Dt(n,e[n],t,i);return r.join("&")},E.fn.extend({serialize:function(){return E.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var e=E.prop(this,"elements");return e?E.makeArray(e):this})).filter((function(){var e=this.type;return this.name&&!E(this).is(":disabled")&&jt.test(this.nodeName)&&!Nt.test(e)&&(this.checked||!ve.test(e))})).map((function(e,t){var n=E(this).val();return null==n?null:Array.isArray(n)?E.map(n,(function(e){return{name:t.name,value:e.replace(At,"\r\n")}})):{name:t.name,value:n.replace(At,"\r\n")}})).get()}});var Lt=/%20/g,qt=/#.*$/,Ht=/([?&])_=[^&]*/,Ot=/^(.*?):[ \t]*([^\r\n]*)$/gm,Pt=/^(?:GET|HEAD)$/,Mt=/^\/\//,Rt={},It={},Wt="*/".concat("*"),Bt=x.createElement("a");function Ft(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(I)||[];if(m(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function $t(e,t,n,r){var i={},o=e===It;function a(s){var u;return i[s]=!0,E.each(e[s]||[],(function(e,s){var l=s(t,n,r);return"string"!=typeof l||o||i[l]?o?!(u=l):void 0:(t.dataTypes.unshift(l),a(l),!1)})),u}return a(t.dataTypes[0])||!i["*"]&&a("*")}function _t(e,t){var n,r,i=E.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&E.extend(!0,e,r),e}Bt.href=Ct.href,E.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ct.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Ct.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Wt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":E.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?_t(_t(e,E.ajaxSettings),t):_t(E.ajaxSettings,e)},ajaxPrefilter:Ft(Rt),ajaxTransport:Ft(It),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var n,i,o,a,s,u,l,c,f,p,d=E.ajaxSetup({},t),h=d.context||d,g=d.context&&(h.nodeType||h.jquery)?E(h):E.event,v=E.Deferred(),m=E.Callbacks("once memory"),y=d.statusCode||{},b={},w={},T="canceled",C={readyState:0,getResponseHeader:function(e){var t;if(l){if(!a)for(a={};t=Ot.exec(o);)a[t[1].toLowerCase()+" "]=(a[t[1].toLowerCase()+" "]||[]).concat(t[2]);t=a[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return l?o:null},setRequestHeader:function(e,t){return null==l&&(e=w[e.toLowerCase()]=w[e.toLowerCase()]||e,b[e]=t),this},overrideMimeType:function(e){return null==l&&(d.mimeType=e),this},statusCode:function(e){var t;if(e)if(l)C.always(e[C.status]);else for(t in e)y[t]=[y[t],e[t]];return this},abort:function(e){var t=e||T;return n&&n.abort(t),S(0,t),this}};if(v.promise(C),d.url=((e||d.url||Ct.href)+"").replace(Mt,Ct.protocol+"//"),d.type=t.method||t.type||d.method||d.type,d.dataTypes=(d.dataType||"*").toLowerCase().match(I)||[""],null==d.crossDomain){u=x.createElement("a");try{u.href=d.url,u.href=u.href,d.crossDomain=Bt.protocol+"//"+Bt.host!=u.protocol+"//"+u.host}catch(e){d.crossDomain=!0}}if(d.data&&d.processData&&"string"!=typeof d.data&&(d.data=E.param(d.data,d.traditional)),$t(Rt,d,t,C),l)return C;for(f in(c=E.event&&d.global)&&0==E.active++&&E.event.trigger("ajaxStart"),d.type=d.type.toUpperCase(),d.hasContent=!Pt.test(d.type),i=d.url.replace(qt,""),d.hasContent?d.data&&d.processData&&0===(d.contentType||"").indexOf("application/x-www-form-urlencoded")&&(d.data=d.data.replace(Lt,"+")):(p=d.url.slice(i.length),d.data&&(d.processData||"string"==typeof d.data)&&(i+=(St.test(i)?"&":"?")+d.data,delete d.data),!1===d.cache&&(i=i.replace(Ht,"$1"),p=(St.test(i)?"&":"?")+"_="+Et.guid+++p),d.url=i+p),d.ifModified&&(E.lastModified[i]&&C.setRequestHeader("If-Modified-Since",E.lastModified[i]),E.etag[i]&&C.setRequestHeader("If-None-Match",E.etag[i])),(d.data&&d.hasContent&&!1!==d.contentType||t.contentType)&&C.setRequestHeader("Content-Type",d.contentType),C.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+("*"!==d.dataTypes[0]?", "+Wt+"; q=0.01":""):d.accepts["*"]),d.headers)C.setRequestHeader(f,d.headers[f]);if(d.beforeSend&&(!1===d.beforeSend.call(h,C,d)||l))return C.abort();if(T="abort",m.add(d.complete),C.done(d.success),C.fail(d.error),n=$t(It,d,t,C)){if(C.readyState=1,c&&g.trigger("ajaxSend",[C,d]),l)return C;d.async&&d.timeout>0&&(s=r.setTimeout((function(){C.abort("timeout")}),d.timeout));try{l=!1,n.send(b,S)}catch(e){if(l)throw e;S(-1,e)}}else S(-1,"No Transport");function S(e,t,a,u){var f,p,x,b,w,T=t;l||(l=!0,s&&r.clearTimeout(s),n=void 0,o=u||"",C.readyState=e>0?4:0,f=e>=200&&e<300||304===e,a&&(b=function(e,t,n){for(var r,i,o,a,s=e.contents,u=e.dataTypes;"*"===u[0];)u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}(d,C,a)),!f&&E.inArray("script",d.dataTypes)>-1&&E.inArray("json",d.dataTypes)<0&&(d.converters["text script"]=function(){}),b=function(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];for(o=c.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if((s=i.split(" "))[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e.throws)t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}(d,b,C,f),f?(d.ifModified&&((w=C.getResponseHeader("Last-Modified"))&&(E.lastModified[i]=w),(w=C.getResponseHeader("etag"))&&(E.etag[i]=w)),204===e||"HEAD"===d.type?T="nocontent":304===e?T="notmodified":(T=b.state,p=b.data,f=!(x=b.error))):(x=T,!e&&T||(T="error",e<0&&(e=0))),C.status=e,C.statusText=(t||T)+"",f?v.resolveWith(h,[p,T,C]):v.rejectWith(h,[C,T,x]),C.statusCode(y),y=void 0,c&&g.trigger(f?"ajaxSuccess":"ajaxError",[C,d,f?p:x]),m.fireWith(h,[C,T]),c&&(g.trigger("ajaxComplete",[C,d]),--E.active||E.event.trigger("ajaxStop")))}return C},getJSON:function(e,t,n){return E.get(e,t,n,"json")},getScript:function(e,t){return E.get(e,void 0,t,"script")}}),E.each(["get","post"],(function(e,t){E[t]=function(e,n,r,i){return m(n)&&(i=i||r,r=n,n=void 0),E.ajax(E.extend({url:e,type:t,dataType:i,data:n,success:r},E.isPlainObject(e)&&e))}})),E.ajaxPrefilter((function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")})),E._evalUrl=function(e,t,n){return E.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){E.globalEval(e,t,n)}})},E.fn.extend({wrapAll:function(e){var t;return this[0]&&(m(e)&&(e=e.call(this[0])),t=E(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map((function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e})).append(this)),this},wrapInner:function(e){return m(e)?this.each((function(t){E(this).wrapInner(e.call(this,t))})):this.each((function(){var t=E(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)}))},wrap:function(e){var t=m(e);return this.each((function(n){E(this).wrapAll(t?e.call(this,n):e)}))},unwrap:function(e){return this.parent(e).not("body").each((function(){E(this).replaceWith(this.childNodes)})),this}}),E.expr.pseudos.hidden=function(e){return!E.expr.pseudos.visible(e)},E.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},E.ajaxSettings.xhr=function(){try{return new r.XMLHttpRequest}catch(e){}};var zt={0:200,1223:204},Ut=E.ajaxSettings.xhr();v.cors=!!Ut&&"withCredentials"in Ut,v.ajax=Ut=!!Ut,E.ajaxTransport((function(e){var t,n;if(v.cors||Ut&&!e.crossDomain)return{send:function(i,o){var a,s=e.xhr();if(s.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(a in e.xhrFields)s[a]=e.xhrFields[a];for(a in e.mimeType&&s.overrideMimeType&&s.overrideMimeType(e.mimeType),e.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)s.setRequestHeader(a,i[a]);t=function(e){return function(){t&&(t=n=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?o(0,"error"):o(s.status,s.statusText):o(zt[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=t(),n=s.onerror=s.ontimeout=t("error"),void 0!==s.onabort?s.onabort=n:s.onreadystatechange=function(){4===s.readyState&&r.setTimeout((function(){t&&n()}))},t=t("abort");try{s.send(e.hasContent&&e.data||null)}catch(e){if(t)throw e}},abort:function(){t&&t()}}})),E.ajaxPrefilter((function(e){e.crossDomain&&(e.contents.script=!1)})),E.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return E.globalEval(e),e}}}),E.ajaxPrefilter("script",(function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")})),E.ajaxTransport("script",(function(e){var t,n;if(e.crossDomain||e.scriptAttrs)return{send:function(r,i){t=E("