GoScrobble/web/node_modules/.cache/babel-loader/463c678a9de036773f3762544f5b2456.json

1 line
16 KiB
JSON
Raw Permalink Normal View History

2022-04-25 02:47:15 +00:00
{"ast":null,"code":"import React from 'react';\nimport Select from 'react-select';\nimport spacetime from 'spacetime';\nimport { display } from 'spacetime-informal';\nexport const i18nTimezones = {\n 'Pacific/Midway': 'Midway Island, Samoa',\n 'Pacific/Honolulu': 'Hawaii',\n 'America/Juneau': 'Alaska',\n 'America/Boise': 'Mountain Time',\n 'America/Dawson': 'Dawson, Yukon',\n 'America/Chihuahua': 'Chihuahua, La Paz, Mazatlan',\n 'America/Phoenix': 'Arizona',\n 'America/Chicago': 'Central Time',\n 'America/Regina': 'Saskatchewan',\n 'America/Mexico_City': 'Guadalajara, Mexico City, Monterrey',\n 'America/Belize': 'Central America',\n 'America/Detroit': 'Eastern Time',\n 'America/Bogota': 'Bogota, Lima, Quito',\n 'America/Caracas': 'Caracas, La Paz',\n 'America/Santiago': 'Santiago',\n 'America/St_Johns': 'Newfoundland and Labrador',\n 'America/Sao_Paulo': 'Brasilia',\n 'America/Tijuana': 'Tijuana, Pacific Time',\n 'America/Argentina/Buenos_Aires': 'Buenos Aires, Georgetown',\n 'America/Godthab': 'Greenland',\n 'Atlantic/Azores': 'Azores',\n 'Atlantic/Cape_Verde': 'Cape Verde Islands',\n GMT: 'Dublin, Edinburgh, Lisbon, London',\n 'Africa/Casablanca': 'Casablanca, Monrovia',\n 'Atlantic/Canary': 'Canary Islands',\n 'Europe/Belgrade': 'Belgrade, Bratislava, Budapest, Ljubljana, Prague',\n 'Europe/Sarajevo': 'Sarajevo, Skopje, Warsaw, Zagreb',\n 'Europe/Brussels': 'Brussels, Copenhagen, Madrid, Paris',\n 'Europe/Amsterdam': 'Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna',\n 'Africa/Algiers': 'West Central Africa',\n 'Europe/Bucharest': 'Bucharest',\n 'Africa/Cairo': 'Cairo',\n 'Europe/Helsinki': 'Helsinki, Kiev, Riga, Sofia, Tallinn, Vilnius',\n 'Europe/Athens': 'Athens, Istanbul, Minsk',\n 'Asia/Jerusalem': 'Jerusalem',\n 'Africa/Harare': 'Harare, Pretoria',\n 'Europe/Moscow': 'Moscow, St. Petersburg, Volgograd',\n 'Asia/Kuwait': 'Kuwait, Riyadh',\n 'Africa/Nairobi': 'Nairobi',\n 'Asia/Baghdad': 'Baghdad',\n 'Asia/Tehran': 'Tehran',\n 'Asia/Dubai': 'Abu Dhabi, Muscat',\n 'Asia/Baku': 'Baku, Tbilisi, Yerevan',\n 'Asia/Kabul': 'Kabul',\n 'Asia/Yekaterinburg': 'Ekaterinburg',\n 'Asia/Karachi': 'Islamabad, Karachi, Tashkent',\n 'Asia/Kolkata': 'Chennai, Kolkata, Mumbai, New Delhi',\n 'Asia/Kathmandu': 'Kathmandu',\n 'Asia/Dhaka': 'Astana, Dhaka',\n 'Asia/Colombo': 'Sri Jayawardenepura',\n 'Asia/Almaty': 'Almaty, Novosibirsk',\n 'Asia/Rangoon': 'Yangon Rangoon',\n 'Asia/Bangkok': 'Bangkok, Hanoi, Jakarta',\n 'Asia/Krasnoyarsk': 'Krasnoyarsk',\n 'Asia/Shanghai': 'Beijing, Chongqing, Hong Kong SAR, Urumqi',\n 'Asia/Kuala_Lumpur': 'Kuala Lumpur, Singapore',\n 'Asia/Taipei': 'Taipei',\n 'Australia/Perth': 'Perth',\n 'Asia/Irkutsk': 'Irkutsk, Ulaanbaatar',\n 'Asia/Seoul': 'Seoul',\n 'Asia/Tokyo': 'Osaka, Sapporo, Tokyo',\n 'Asia/Yakutsk': 'Yakutsk',\n 'Australia/Darwin': 'Darwin',\n 'Australia/Adelaide': 'Adelaide',\n 'Australia/Sydney': 'Canberra, Melbourne, Sydney',\n 'Australia/Brisbane': 'Brisbane',\n 'Australia/Hobart': 'Hobart',\n 'Asia/Vladivostok': 'Vladivostok',\n 'Pacific/Guam': 'Guam, Port Moresby',\n 'Asia/Magadan': 'Magadan, Solomon Islands, New Caledonia',\n 'Asia/Kamchatka': 'Kamchatka, Marshall Islands',\n 'Pacific/Fiji': 'Fiji Islands',\n 'Pacific/Auckland': 'Auckland, Wellington',\n 'Pacific/Tongatapu': \"Nuku'alofa\"\n};\n\nconst TimezoneSelect = ({\n value,\n onBlur,\n onChange,\n labelStyle = 'original',\n timezones = i18nTimezones,\n ...props\n}) => {\n const getOptions = React.useMemo(() => {\n return Object.entries(timezones).reduce((obj, entry) => {\n const a = spacetime.now().goto(entry[0]);\n const tz = a.timezone();\n const tzDisplay = display(entry[0]);\n let label = '';\n let abbrev = entry[0];\n let altName = entry[0];\n\n if (tzDisplay && tzDisplay.daylight && tzDisplay.standard) {\n abbrev = a.isDST() ? tzDisplay.daylight.abbrev : tzDisplay.standard.abbrev;\n altName = a.isDST() ? tzDisplay.daylight.name : tzDisplay.standard.name;\n }\n\n const min = tz.cur