Skip to content

Instantly share code, notes, and snippets.

@WeslyG
Created August 19, 2022 12:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save WeslyG/7e0c8179d4fb9aa7b9443c757b19dcdd to your computer and use it in GitHub Desktop.
Save WeslyG/7e0c8179d4fb9aa7b9443c757b19dcdd to your computer and use it in GitHub Desktop.
1000130 v35
This file has been truncated, but you can view the full file.
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
var _interopRequireDefault = _$$_REQUIRE(_dependencyMap[0]);
var _Main = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[1]));
var _SceneMain = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[2]));
var _miot = _$$_REQUIRE(_dependencyMap[3]);
_miot.PackageEvent.packageAuthorizationCancel.addListener(function () {
_miot.Package.exit();
});
switch (_miot.Package.entrance) {
case _miot.Entrance.Scene:
_miot.Package.entry(_SceneMain.default, function (_) {});
break;
default:
_miot.Package.entry(_Main.default, function (_) {});
break;
}
},10001,[14305,10004,10157,10074]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var _interopRequireDefault = _$$_REQUIRE(_dependencyMap[0]);
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = undefined;
var _classCallCheck2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[1]));
var _createClass2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[2]));
var _possibleConstructorReturn2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[3]));
var _getPrototypeOf2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[4]));
var _inherits2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[5]));
var _react = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[6]));
var _reactNative = _$$_REQUIRE(_dependencyMap[7]);
var _ui = _$$_REQUIRE(_dependencyMap[8]);
var _reactNavigation = _$$_REQUIRE(_dependencyMap[9]);
var _MainPage = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[10]));
var _MHSetting = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[11]));
var _miot = _$$_REQUIRE(_dependencyMap[12]);
var _CommonSetting = _$$_REQUIRE(_dependencyMap[13]);
var _DataTypeState = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[14]));
var _THStatePage = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[15]));
var _Dimensions$get = _reactNative.Dimensions.get('window'),
screenHeight = _Dimensions$get.height,
screenWidth = _Dimensions$get.widt;
var RootStack = (0, _reactNavigation.createStackNavigator)({
Home: _MainPage.default,
MHSetting: _MHSetting.default,
MoreSetting: _CommonSetting.MoreSetting,
FirmwareUpgrade: _CommonSetting.FirmwareUpgrade,
DataTypeState: _DataTypeState.default,
THStatePage: _THStatePage.default
}, {
initialRouteName: 'Home',
navigationOptions: function navigationOptions(_ref) {
var navigation = _ref.navigation;
return {
header: _react.default.createElement(_ui.TitleBarWhite, {
title: navigation.state.params ? navigation.state.params.title : '',
style: {
backgroundColor: '#222'
},
onPressLeft: function onPressLeft() {
navigation.goBack();
}
})
};
},
transitionConfig: function transitionConfig() {
return {};
}
});
var App = function (_React$Component) {
(0, _inherits2.default)(App, _React$Component);
function App() {
(0, _classCallCheck2.default)(this, App);
return (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(App).apply(this, arguments));
}
(0, _createClass2.default)(App, [{
key: "render",
value: function render() {
return _react.default.createElement(RootStack, null);
}
}]);
return App;
}(_react.default.Component);
exports.default = App;
},10004,[14305,14320,14323,14371,14377,14386,10297,10033,10230,10918,10007,10010,10074,10353,10127,10139]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var _interopRequireDefault = _$$_REQUIRE(_dependencyMap[0]);
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = undefined;
var _objectSpread2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[1]));
var _classCallCheck2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[2]));
var _createClass2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[3]));
var _possibleConstructorReturn2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[4]));
var _getPrototypeOf2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[5]));
var _assertThisInitialized2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[6]));
var _inherits2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[7]));
var _react = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[8]));
var _reactNative = _$$_REQUIRE(_dependencyMap[9]);
var _ui = _$$_REQUIRE(_dependencyMap[10]);
var _miot = _$$_REQUIRE(_dependencyMap[11]);
var _MHSetting = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[12]));
var _MHLocalizableString = _$$_REQUIRE(_dependencyMap[13]);
var _util = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[14]));
var _airQuality = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[15]));
var _power = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[16]));
var _PlusKV = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[17]));
var _MHGlobalData = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[18]));
var _AndroidSetting = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[19]));
var STATUSBAR_HEIGHT = _MHGlobalData.default.statusBarHeight;
var window = _reactNative.Dimensions.get('window');
var APPBAR_HEIGHT = _reactNative.Platform.OS === 'ios' ? 44 : 56;
var mainScrollView;
var me;
var MainPage = function (_React$Component) {
(0, _inherits2.default)(MainPage, _React$Component);
function MainPage(props, context) {
var _this;
(0, _classCallCheck2.default)(this, MainPage);
_this = (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(MainPage).call(this, props, context));
me = (0, _assertThisInitialized2.default)(_this);
_this.state = {
requestStatus: false,
sensorData: {},
isShare: false
};
return _this;
}
(0, _createClass2.default)(MainPage, [{
key: "getLastData",
value: function getLastData() {
var _this2 = this;
_miot.Host.storage.get('lastData').then(function (res) {
if (typeof res === "object") {
_this2.setState({
sensorData: res
});
}
});
}
}, {
key: "componentDidMount",
value: function componentDidMount() {
this.getLastData();
var that = this;
_miot.Service.smarthome.batchGetDeviceProps([{
did: _miot.Device.deviceID,
props: ["prop.battery", "prop.battery_state", "prop.temperature_unit", "prop.tvoc_state", "prop.tvoc_unit", 'prop.pm25_timestamp', "prop.co2_state", "prop.humidity_state", "prop.temperature_state", "prop.pm25_state"]
}]).then(function (json) {
var data = {};
if (json) {
var curObj = json[_miot.Device.deviceID];
for (var Key in curObj) {
var arr = Key.split('.');
if (!curObj[Key]) {
curObj[Key] = 0;
}
if (arr[1] == 'battery') {
that.props.navigation.navigate('Home', {
battery: curObj[Key]
});
}
data[arr[1]] = curObj[Key];
}
that.setState({
isOnline: true,
sensorData: _util.default.handleObj(that.state.sensorData, data)
});
data.tvoc_unit && _PlusKV.default.setPrefTVOCUnit(data.tvoc_unit === 'mg_m3' ? 'mg/m³' : data.tvoc_unit);
data.temperature_unit && _PlusKV.default.setPrefTemperatureUnit(data.temperature_unit === 'f' ? '°F' : '°C');
}
}).catch(function (e) {});
that._subscription && that._subscription.remove();
_miot.Device.getDeviceWifi().subscribeMessages("prop.battery", "prop.battery_state", "prop.temperature_unit", "prop.tvoc_state", "prop.tvoc_unit", 'prop.pm25_timestamp', "prop.co2_state", "prop.humidity_state", "prop.temperature_state", "prop.pm25_state", 'prop.aqi');
that._deviceStatusListener = _miot.DeviceEvent.deviceReceivedMessages.addListener(function (device, map, res) {
if (map) {
var resProps = {};
for (var key in map) {
if (key.indexOf("prop.") === 0) {
resProps[key.substr(5)] = map.get(key);
if (item.key.substr(5) == 'battery') {
that.props.navigation.navigate('Home', {
battery: item.value[0]
});
}
}
}
}
that.setState({
sensorData: _util.default.handleObj(that.state.sensorData, resProps)
});
resProps.tvoc_unit && _PlusKV.default.setPrefTVOCUnit(resProps.tvoc_unit === 'mg_m3' ? 'mg/m³' : resProps.tvoc_unit);
resProps.temperature_unit && _PlusKV.default.setPrefTemperatureUnit(resProps.temperature_unit === 'f' ? '°F' : '°C');
});
_miot.Device.getDeviceWifi().callMethodFromCloud('get_prop', ['prop.pm25', 'co2', 'tvoc', 'humidity', 'battery', 'battery_state', 'temperature', 'temperature_unit', 'tvoc_state', 'tvoc_unit', 'city_id', 'pm25_timestamp', "co2_state", "humidity_state", "temperature_state", "pm25_state", 'aqi']).then(function (json) {
if (json.code == 0) {
that.setState({
isOnline: true,
sensorData: _util.default.handleObj(that.state.sensorData, json.result)
});
json.result.tvoc_unit && _PlusKV.default.setPrefTVOCUnit(json.result.tvoc_unit === 'mg_m3' ? 'mg/m³' : json.tvoc_unit);
json.result.temperature_unit && _PlusKV.default.setPrefTemperatureUnit(json.result.temperature_unit === 'f' ? '°F' : '°C');
} else if (json.code == -2) {
that.setState({
isOnline: false
});
}
}).catch(function (e) {});
that.Interval = setInterval(function () {
_miot.Device.getDeviceWifi().callMethod("get_value", ['aqi', 'pm25', 'co2', 'tvoc', 'humidity', 'temperature', 'tvoc_unit', 'temperature_unit']).then(function (json) {
if (json.code == 0) {
that.setState({
isOnline: true,
sensorData: _util.default.handleObj(that.state.sensorData, json.result)
});
if ((json.result.temperature_unit === 'f' ? '°F' : '°C') != _PlusKV.default.getPrefTemperatureUnit()) {
json.result.temperature_unit && _PlusKV.default.setPrefTemperatureUnit(json.result.temperature_unit === 'f' ? '°F' : '°C');
that.forceUpdate(function () {});
}
if (json.result.tvoc_unit != _PlusKV.default.getPrefTVOCUnit()) {
json.result.tvoc_unit && _PlusKV.default.setPrefTVOCUnit(json.result.tvoc_unit === 'mg_m3' ? 'mg/m³' : json.result.tvoc_unit);
that.forceUpdate(function () {});
}
} else if (json.code == -2) {
that.setState({
isOnline: false
});
}
}).catch(function (e) {});
}, 5000);
if (_miot.Device.isOwner) {
var licenseKey = "license-" + _miot.Device.deviceID;
var params = {
'did': _miot.Device.deviceID,
'props': ['prop.s_licenseKey']
};
_miot.Service.smarthome.batchGetDeviceDatas([params]).then(function (data) {
if (!data[_miot.Device.deviceID]['prop.s_licenseKey']) {
var l = _miot.Host.locale.language;
_miot.Host.ui.openPrivacyLicense(_MHLocalizableString.MHLocalizableString.license_title, _MHGlobalData.default.licensePolicy["license_" + l], _MHLocalizableString.MHLocalizableString.policy_title, _MHGlobalData.default.licensePolicy["policy_" + l]).then(function (res) {
if (res) {
var setParams = {
'did': _miot.Device.deviceID,
'props': {
'prop.s_licenseKey': '0'
}
};
_miot.Service.smarthome.batchSetDeviceDatas([setParams]).then(function (res) {}).catch(function (e) {});
}
}).catch(function (error) {});
}
}).catch(function (e) {});
}
this._deviceCancelAuthorization = _miot.PackageEvent.packageAuthorizationCancel.addListener(function (event) {});
}
}, {
key: "render",
value: function render() {
return _react.default.createElement(_reactNative.View, {
style: styles.containerAll
}, _react.default.createElement(_reactNative.StatusBar, {
backgroundColor: "transparent",
translucent: true
}), _react.default.createElement(_reactNative.ScrollView, {
ref: function ref(component) {
return mainScrollView = component;
},
style: {
backgroundColor: '#222',
width: window.width,
height: window.height,
paddingTop: this.state.isShare ? 0 : 15
},
showsHorizontalScrollIndicator: false,
showsVerticalScrollIndicator: false,
bounces: true,
automaticallyAdjustContentInsets: true,
contentInset: {
top: 0,
left: 0,
right: 0,
bottom: 0
}
}, _react.default.createElement(_airQuality.default, {
data: (0, _objectSpread2.default)({}, this.state.sensorData),
isOnline: this.state.isOnline,
isShare: this.state.isShare,
navigation: this.props.navigation
})));
}
}, {
key: "componentWillMount",
value: function componentWillMount() {
var _this3 = this;
this._deviceNameChangedListener = _miot.DeviceEvent.deviceNameChanged.addListener(function (device) {
_this3.props.navigation.setParams({
name: device.name
});
_this3.forceUpdate();
});
}
}, {
key: "componentWillUnmount",
value: function componentWillUnmount() {
this._subscription.remove();
this._deviceNameChangedListener.remove();
this._deviceStatusListener.remove();
this._deviceCancelAuthorization.remove();
clearInterval(this.Interval);
}
}]);
return MainPage;
}(_react.default.Component);
MainPage.navigationOptions = function (_ref) {
var navigation = _ref.navigation;
var params = navigation.state["params"];
return {
header: _react.default.createElement(_reactNative.View, null, _react.default.createElement(_ui.TitleBarWhite, {
title: params && params.name ? params.name : _MHGlobalData.default.deviceName,
style: {
backgroundColor: '#222'
},
subTitle: _MHLocalizableString.MainLocalizableString.power + ": " + (params ? params.battery : '100') + "%",
onPressLeft: function onPressLeft() {
_miot.Package.exit();
},
onPressRight: function onPressRight() {
navigation.navigate('MHSetting', {
'title': _MHLocalizableString.MHLocalizableString.setting
});
}
}))
};
};
var styles = _reactNative.StyleSheet.create({
containerAll: {
flex: 1,
flexDirection: 'column',
backgroundColor: '#222222',
alignItems: 'center',
justifyContent: 'center',
display: 'flex'
},
topInfo: {},
shareTop: {
position: "absolute",
top: 0,
width: window.width
}
});
var _default = MainPage;
exports.default = _default;
},10007,[14305,14314,14320,14323,14371,14377,14374,14386,10297,10033,10230,10074,10010,10013,10034,10037,10109,10067,10016,10112]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var _interopRequireDefault = _$$_REQUIRE(_dependencyMap[0]);
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = undefined;
var _classCallCheck2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[1]));
var _createClass2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[2]));
var _possibleConstructorReturn2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[3]));
var _getPrototypeOf2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[4]));
var _inherits2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[5]));
var _react = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[6]));
var _reactNative = _$$_REQUIRE(_dependencyMap[7]);
var _MHLocalizableString = _$$_REQUIRE(_dependencyMap[8]);
var _MHGlobalData = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[9]));
var _miot = _$$_REQUIRE(_dependencyMap[10]);
var _ui = _$$_REQUIRE(_dependencyMap[11]);
var _CommonSetting = _$$_REQUIRE(_dependencyMap[12]);
var _Separator = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[13]));
var window = _reactNative.Dimensions.get('window');
var Setting = function (_React$Component) {
(0, _inherits2.default)(Setting, _React$Component);
function Setting(props) {
(0, _classCallCheck2.default)(this, Setting);
return (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(Setting).call(this, props));
}
(0, _createClass2.default)(Setting, [{
key: "componentWillMount",
value: function componentWillMount() {
var licenseKey = "license-" + _miot.Device.deviceID;
this._deviceCancelAuthorization = _miot.PackageEvent.packageAuthorizationCancel.addListener(function (event) {
_miot.Host.storage.set(licenseKey, false);
});
this._deviceNameChangedListener = _miot.DeviceEvent.deviceNameChanged.addListener(function (device) {
_MHGlobalData.default.deviceName = device.name;
});
}
}, {
key: "componentDidUnMount",
value: function componentDidUnMount() {
this._deviceNameChangedListener.remove();
this._deviceCancelAuthorization.remove();
}
}, {
key: "render",
value: function render() {
var lang = _miot.Host.locale.language;
var first_options = _CommonSetting.SETTING_KEYS.first_options,
second_options = _CommonSetting.SETTING_KEYS.second_options;
var firstOptions = [first_options.SHARE, first_options.IFTTT, first_options.FIRMWARE_UPGRADE];
var secondOptions = [];
var extraOptions = {
showUpgrade: true,
licenseUrl: _MHGlobalData.default.licensePolicy["license_" + lang],
policyUrl: _MHGlobalData.default.licensePolicy["policy_" + lang]
};
return _react.default.createElement(_reactNative.View, {
style: {
backgroundColor: 'rgb(235,235,236)',
marginBottom: 0,
flex: 1
}
}, _react.default.createElement(_reactNative.StatusBar, {
barStyle: "dark-content"
}), _react.default.createElement(_Separator.default, null), _react.default.createElement(_reactNative.ScrollView, {
style: {
backgroundColor: '#f7f7f7'
}
}, _react.default.createElement(_CommonSetting.CommonSetting, {
navigation: this.props.navigation,
firstOptions: firstOptions,
extraOptions: extraOptions
})));
}
}, {
key: "_renderSectionHeader",
value: function _renderSectionHeader(sectionData, sectionID) {
return _react.default.createElement(_reactNative.View, null, _react.default.createElement(_reactNative.View, {
style: styles.sectionHeader
}, _react.default.createElement(_reactNative.Text, {
style: styles.sectionHeaderText
}, sectionID)));
}
}, {
key: "_renderRow",
value: function _renderRow(rowData, sectionID, rowID) {
var _this = this;
if (sectionID != '') {
return _react.default.createElement(_reactNative.TouchableHighlight, {
onPress: function onPress() {
return _this._pressRow(sectionID, rowID);
}
}, _react.default.createElement(_reactNative.View, {
style: {
backgroundColor: '#ffffff'
}
}, _react.default.createElement(_reactNative.View, {
style: styles.rowContainer
}, _react.default.createElement(_reactNative.Text, {
style: styles.title
}, rowData.name), _react.default.createElement(_reactNative.Text, {
style: styles.subtitle
}, rowData.subtitle ? _MHGlobalData.default.deviceName : ''), _react.default.createElement(_reactNative.Image, {
style: styles.subArrow,
source: _$$_REQUIRE(_dependencyMap[14])
})), rowID != this._menuData[sectionID].length - 1 ? _react.default.createElement(_reactNative.View, {
style: styles.separator
}, _react.default.createElement(_reactNative.View, null)) : null));
} else {
return _react.default.createElement(_reactNative.TouchableHighlight, {
onPress: function onPress() {
return _this._pressRow(sectionID, rowID);
}
}, _react.default.createElement(_reactNative.View, {
style: {
backgroundColor: '#ffffff'
}
}, _react.default.createElement(_reactNative.View, {
style: styles.rowContainer
}, _react.default.createElement(_reactNative.Text, {
style: styles.reset
}, rowData.name))));
}
}
}, {
key: "_pressRow",
value: function _pressRow(sectionID, rowID) {
this._menuData[sectionID][rowID].func();
}
}, {
key: "onShowDidButtonPress",
value: function onShowDidButtonPress() {
this.props.navigator.push(HelloDeveloper.route);
}
}, {
key: "showReactART",
value: function showReactART() {
this.props.navigator.push(HelloReactART.route);
}
}, {
key: "showActionSheet",
value: function showActionSheet() {
ActionSheetIOS.showActionSheetWithOptions({
options: BUTTONS,
destructiveButtonIndex: 1
}, function (buttonIndex) {});
}
}]);
return Setting;
}(_react.default.Component);
exports.default = Setting;
Setting.navigationOptions = function (_ref) {
var navigation = _ref.navigation;
return {
header: _react.default.createElement(_ui.TitleBarBlack, {
title: navigation.state.params.title,
style: {
backgroundColor: '#fff'
},
onPressLeft: function onPressLeft() {
navigation.navigate('Home', {
name: _MHGlobalData.default.deviceName
});
}
})
};
};
;
var styles = _reactNative.StyleSheet.create({
container: {
flex: 1,
flexDirection: 'row',
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#ffffff'
},
rowContainer: {
alignSelf: 'stretch',
flexDirection: 'row',
flex: 1,
height: 50,
paddingLeft: 20,
paddingRight: 20,
alignItems: 'center'
},
sectionHeader: {
height: 30,
backgroundColor: 'rgb(235,235,236)',
justifyContent: 'center',
paddingLeft: 10
},
sectionHeaderText: {
fontSize: 14
},
list: {
alignSelf: 'stretch'
},
title: {
fontSize: 16,
flex: 2
},
reset: {
fontSize: 16,
flex: 1,
color: 'rgb(251,0,0)',
textAlign: 'center'
},
subtitle: {
fontSize: 14,
flex: 1,
color: 'rgb(138,138,138)',
textAlign: "right",
marginRight: 5
},
subArrow: {
width: 6.5,
height: 13
},
separator: {
height: 0.75,
backgroundColor: '#dddddd',
marginLeft: 20,
marginRight: 20
}
});
},10010,[14305,14320,14323,14371,14377,14386,10297,10033,10013,10016,10074,10230,10353,10332,10031]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.DataTypeStateString = exports.SceneMainStrings = exports.MainLocalizableString = exports.MHLocalizableString = undefined;
var _ui = _$$_REQUIRE(_dependencyMap[0]);
var MHLocalizableString = new _ui.LocalizedStrings({
"en": {
setting: "Setting",
featureSetting: "Shortcut settings",
commonSetting: "Common settings",
deviceName: "Device name",
locationManagement: "Locations",
shareDevice: "Share device",
ifttt: "Automation",
firmwareUpgrate: "Check for firmware updates",
moreSetting: "FAQs",
addToDesktop: "Add to Home screen",
resetDevice: "Remove device",
licenseAndPolicy: "User Agreement & Privacy Policy",
license_title: "User Agreement",
policy_title: "Privacy Policy"
},
"zh": {
setting: "设置",
featureSetting: "功能设置",
commonSetting: "通用设置",
deviceName: "设备名称",
locationManagement: "位置管理",
shareDevice: "设备共享",
ifttt: "智能",
firmwareUpgrate: "检查固件升级",
moreSetting: "常见问题",
addToDesktop: "添加到桌面",
resetDevice: "删除设备",
licenseAndPolicy: "使用条款和隐私政策",
license_title: "使用条款",
policy_title: "隐私政策"
},
"zh-tw": {
setting: "設置",
featureSetting: "功能設定",
commonSetting: "一般設定",
deviceName: "裝置名稱",
locationManagement: "位置管理",
shareDevice: "裝置共用",
ifttt: "智慧",
firmwareUpgrate: "檢查韌體更新",
moreSetting: "常見問題",
addToDesktop: "新增到桌面",
resetDevice: "刪除裝置",
licenseAndPolicy: "用戶協議和隱私政策",
license_title: "用戶協議",
policy_title: "隱私政策"
},
"zh-hk": {
setting: "設置",
featureSetting: "功能設定",
commonSetting: "一般設定",
deviceName: "裝置名稱",
locationManagement: "位置管理",
shareDevice: "裝置共用",
ifttt: "智慧",
firmwareUpgrate: "檢查韌體更新",
moreSetting: "常見問題",
addToDesktop: "新增到桌面",
resetDevice: "刪除裝置",
licenseAndPolicy: "用戶協議和隱私政策",
license_title: "用戶協議",
policy_title: "隱私政策"
}
});
exports.MHLocalizableString = MHLocalizableString;
var MainLocalizableString = new _ui.LocalizedStrings({
"en": {
power: "Battery",
now: 'Now',
minAgo: 'mins ago',
hourAgo: 'hours ago',
temperature: "Temperature",
humidity: "Humidity",
tvoc: "tVOC",
checking: "Detecting…",
initing: "Initializing…",
preparing: "Initializing…",
abnormal: 'Sensor in error',
exposing: 'Calibrating...',
good: 'Excellent',
soso: "Good",
light: "Lightly Polluted",
meduim: "Moderately Polluted",
serious: "Heavily Polluted",
xserious: "Severely Polluted",
low: "Low",
bit_low: "Slightly Low",
suit: "Suitable",
bit_high: "Slightly High",
high: "High",
xdry: "Very Dry",
dry: "Dry",
moist: "Suitable",
xmoist: "Wet",
normal: "Normal",
light_high_density: "Slightly High",
serious_high_density: "High",
xserious_high_density: "Very High",
one_hour_ago: "1 hour ago",
x_hours_ago: "{0} hours ago",
one_minut_ago: "1 min ago",
x_minuts_ago: "{0} mins ago",
today: "Today",
yesterday: "Yesterday",
tomorrow: "Tomorrow",
mmmdd: "{1} {0}",
mm: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
need_date_fix: false,
share_date_time_format: "{0}, {1}",
update_on: "Update {1}{0}.",
bad_detect_time: "Detected at {0} (device time)",
_on_: "on ",
detecting_time: "Detected time: {0}",
hour_24: '24-hour',
day_30: '30-day',
title_temperature: 'Temp',
title_humidity: 'RH',
title_tvoc: 'tVOC',
title_co2: 'CO2',
title_co2e: 'CO₂e',
title_pm25: 'PM2.5',
title_no2: 'NO2',
title_pm10: 'PM10',
title_aqi: 'AQI',
title_o3: 'O3',
title_ultraviolet: 'UV',
title_pollen: 'Pollen',
title_co: 'CO',
title_so2: 'SO2',
title_atmos: 'AP',
title_magnet: 'Switch',
title_battery: 'Battery',
title2_temperature: 'Temperature',
title2_humidity: 'Humidity',
title2_tvoc: 'tVOC',
title2_co2: 'CO2',
title2_co2e: 'CO₂e',
title2_pm25: 'PM2.5',
title2_no2: 'NO2',
title2_pm10: 'PM10',
title2_aqi: 'AQI',
title2_o3: 'O3',
title2_ultraviolet: 'UV',
title2_pollen: 'Pollen',
title2_co: 'CO',
title2_so2: 'SO2',
title2_atmos: 'Air Pressure',
title_temperature_history: 'Temperature History',
title_humidity_history: 'Humidity History',
title_tvoc_history: 'tVOC History',
title_co2_history: 'CO2 History',
title_pm25_history: 'PM2.5 History',
title_atmos_history: 'AP History',
no_history_data_yet: 'No data yet.',
level_temperature_am_very_low: 'Low',
level_temperature_am_low: 'Slightly low',
level_temperature_am_suitable: 'Suitable',
level_temperature_am_high: 'Slightly high',
level_temperature_am_very_high: 'High',
level_temperature_very_low: 'Low',
level_temperature_low: 'Slightly low',
level_temperature_suitable: 'Suitable',
level_temperature_high: 'Slightly high',
level_temperature_very_high: 'High',
level_humidity_am_very_low: 'Very dry',
level_humidity_am_low: 'Dry',
level_humidity_am_suitable: 'Suitable',
level_humidity_am_high: 'Wet',
level_humidity_am_very_high: 'Very wet',
level_humidity_very_low: 'Very dry',
level_humidity_low: 'Dry',
level_humidity_suitable: 'Suitable',
level_humidity_high: 'Wet',
level_humidity_very_high: 'Very wet',
level_tvoc_am_excellent: 'Excellent',
level_tvoc_am_good: 'Good',
level_tvoc_am_slightly: 'Slightly high',
level_tvoc_am_serious: 'High',
level_tvoc_am_xserious: 'Very high',
level_tvoc_excellent: 'Excellent',
level_tvoc_good: 'Good',
level_tvoc_slightly: 'Slightly high',
level_tvoc_serious: 'High',
level_tvoc_xserious: 'Very high',
level_co2_am_good: 'Normal',
level_co2_am_slightly: 'Slightly high',
level_co2_am_serious: 'High',
level_co2_am_xserious: 'Very high',
level_co2_good: 'Normal',
level_co2_slightly: 'Slightly high',
level_co2_serious: 'High',
level_co2_xserious: 'Very high',
level_pm25_excellent: 'Excellent',
level_pm25_good: 'Good',
level_pm25_medium: 'Slightly polluted',
level_pm25_slightly: 'Moderately polluted',
level_pm25_serious: 'Heavily polluted',
level_pm25_xserious: 'Severely polluted',
level_pm25_am_excellent: 'Good',
level_pm25_am_good: 'Moderate',
level_pm25_am_medium: 'Slightly unhealthy',
level_pm25_am_slightly: 'Unhealthy',
level_pm25_am_serious: 'Very unhealthy',
level_pm25_am_xserious: 'Hazardous',
level_pm10_am_excellent: 'Good',
level_pm10_am_good: 'Moderate',
level_pm10_am_medium: 'Slightly unhealthy',
level_pm10_am_slightly: 'Unhealthy',
level_pm10_am_serious: 'Very unhealthy',
level_pm10_am_xserious: 'Hazardous',
level_pm10_excellent: 'Excellent',
level_pm10_good: 'Good',
level_pm10_medium: 'Slightly polluted',
level_pm10_slightly: 'Moderately polluted',
level_pm10_serious: 'Heavily polluted',
level_pm10_xserious: 'Severely polluted',
level_aqi_am_excellent: 'Good',
level_aqi_am_good: 'Moderate',
level_aqi_am_medium: 'Slightly unhealthy',
level_aqi_am_slightly: 'Unhealthy',
level_aqi_am_serious: 'Very unhealthy',
level_aqi_am_xserious: 'Hazardous',
level_aqi_excellent: 'Excellent',
level_aqi_good: 'Good',
level_aqi_medium: 'Slightly polluted',
level_aqi_slightly: 'Moderately polluted',
level_aqi_serious: 'Heavily polluted',
level_aqi_xserious: 'Severely polluted',
level_o3_am_excellent: 'Good',
level_o3_am_good: 'Moderate',
level_o3_am_medium: 'Slightly unhealthy',
level_o3_am_slightly: 'Unhealthy',
level_o3_am_serious: 'Very unhealthy',
level_o3_am_xserious: 'Hazardous',
level_o3_excellent: 'Excellent',
level_o3_good: 'Good',
level_o3_medium: 'Slightly polluted',
level_o3_slightly: 'Moderately polluted',
level_o3_serious: 'Heavily polluted',
level_o3_xserious: 'Severely polluted',
level_no2_am_excellent: 'Good',
level_no2_am_good: 'Moderate',
level_no2_am_slightly: 'Slightly unhealthy',
level_no2_am_medium: 'Unhealthy',
level_no2_am_serious: 'Very unhealthy',
level_no2_am_xserious: 'Hazardous',
level_no2_excellent: 'Excellent',
level_no2_good: 'Good',
level_no2_slightly: 'Slightly polluted',
level_no2_medium: 'Moderately polluted',
level_no2_serious: 'Heavily polluted',
level_no2_xserious: 'Severely polluted',
level_ultraviolet_am_very_low: 'Low',
level_ultraviolet_am_low: 'Moderate',
level_ultraviolet_am_medium: 'High',
level_ultraviolet_am_serious: 'Very high',
level_ultraviolet_am_xserious: 'Extreme high',
level_ultraviolet_very_low: 'Low',
level_ultraviolet_low: 'Moderate',
level_ultraviolet_medium: 'High',
level_ultraviolet_serious: 'Very high',
level_ultraviolet_xserious: 'Extreme high',
level_pollen_am_very_low: 'Very low',
level_pollen_am_low: 'Low',
level_pollen_am_slightly: 'Slightly high',
level_pollen_am_medium: 'High',
level_pollen_am_serious: 'Very high',
level_pollen_am_xserious: 'Extremely high',
level_pollen_very_low: 'Very low',
level_pollen_low: 'Low',
level_pollen_slightly: 'Slightly high',
level_pollen_medium: 'High',
level_pollen_serious: 'Very high',
level_pollen_xserious: 'Extremely high',
level_co_am_excellent: 'Good',
level_co_am_good: 'Moderate',
level_co_am_slightly: 'Slightly unhealthy',
level_co_am_medium: 'Unhealthy',
level_co_am_serious: 'Very unhealthy',
level_co_am_xserious: 'Hazardous',
level_co_excellent: 'Excellent',
level_co_good: 'Good',
level_co_slightly: 'Slightly polluted',
level_co_medium: 'Moderately polluted',
level_co_serious: 'Heavily polluted',
level_co_xserious: 'Severely polluted',
level_so2_am_excellent: 'Good',
level_so2_am_good: 'Moderate',
level_so2_am_slightly: 'Slightly unhealthy',
level_so2_am_medium: 'Unhealthy',
level_so2_am_serious: 'Very unhealthy',
level_so2_am_xserious: 'Hazardous',
level_so2_excellent: 'Excellent',
level_so2_good: 'Good',
level_so2_slightly: 'Slightly polluted',
level_so2_medium: 'Moderately polluted',
level_so2_serious: 'Heavily polluted',
level_so2_xserious: 'Severely polluted',
level_atmos_am_low: 'Low',
level_atmos_am_good: 'Suitable',
level_atmos_low: 'Low',
level_atmos_good: 'Suitable',
evalute_item1: 'Recommendations',
evaluate1: 'Turn on air purification devices',
evaluate2: 'Turn on dehumidification devices',
evaluate3: 'Turn on air conditioner to cool',
evaluate4: 'Turn on heating devices',
evaluate5: 'Turn on ventilation and air purification devices',
evaluate6: 'Turn on ventilation devices',
evaluate7: 'Open windows to ventilate',
evaluate8: 'Turn on air purification devices, or open windows',
evaluate9: 'Turn on humidification devices'
},
"zh": {
power: "电量",
now: '现在',
minAgo: '分钟前',
hourAgo: '小时前',
temperature: "温度",
tvoc: "tVOC",
humidity: "相对湿度",
checking: "检测中...",
initing: "正在初始化...",
preparing: "正在初始化...",
abnormal: '传感器异常',
exposing: '校准中...',
good: '优',
soso: "良",
light: "轻度污染",
meduim: "中度污染",
serious: "重度污染",
xserious: "严重污染",
low: "较低",
bit_low: "略低",
suit: "适宜",
bit_high: "略高",
high: "较高",
xdry: "非常干燥",
dry: "干燥",
moist: "潮湿",
xmoist: "非常潮湿",
normal: "正常",
light_high_density: "浓度略高",
serious_high_density: "浓度较高",
xserious_high_density: "浓度超高",
one_hour_ago: "1 小时前",
x_hours_ago: "{0} 小时前",
one_minut_ago: "1 分钟前",
x_minuts_ago: "{0} 分钟前",
today: "今天",
yesterday: "昨天",
tomorrow: "明天",
mmmdd: "{0}月{1}日",
mm: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'],
share_date_time_format: "{0} {1}",
update_on: "{0}更新",
bad_detect_time: "检测时间:{0}(设备时间)",
_on: "x",
detecting_time: "检测时间:{0}",
hour_24: '24小时',
day_30: '30天',
title_temperature: '温度',
title_humidity: '相对湿度',
title_tvoc: 'tVOC',
title_co2: 'CO2',
title_co2e: 'CO₂e',
title_pm25: 'PM2.5',
title_no2: 'NO2',
title_pm10: 'PM10',
title_aqi: 'AQI',
title_o3: 'O3',
title_ultraviolet: '紫外线',
title_pollen: '花粉',
title_co: 'CO',
title_so2: 'SO2',
title_atmos: '气压',
title_magnet: '开关',
title_battery: '电量',
title2_temperature: '温度',
title2_humidity: '相对湿度',
title2_tvoc: 'tVOC',
title2_co2: 'CO2',
title2_co2e: 'CO₂e',
title2_pm25: 'PM2.5',
title2_no2: 'NO2',
title2_pm10: 'PM10',
title2_aqi: 'AQI',
title2_o3: 'O3',
title2_ultraviolet: '紫外线',
title2_pollen: '花粉',
title2_co: 'CO',
title2_so2: 'SO2',
title2_atmos: '气压',
title_temperature_history: '温度历史',
title_humidity_history: '相对湿度历史',
title_tvoc_history: 'tVOC 历史',
title_co2_history: 'CO2 历史',
title_pm25_history: 'PM2.5 历史',
title_atmos_history: '气压历史',
no_history_data_yet: '暂时没有历史数据',
level_temperature_am_very_low: '较低',
level_temperature_am_low: '略低',
level_temperature_am_suitable: '适宜',
level_temperature_am_high: '略高',
level_temperature_am_very_high: '较高',
level_temperature_very_low: '较低',
level_temperature_low: '略低',
level_temperature_suitable: '适宜',
level_temperature_high: '略高',
level_temperature_very_high: '较高',
level_humidity_am_very_low: '非常干燥',
level_humidity_am_low: '干燥',
level_humidity_am_suitable: '适宜',
level_humidity_am_high: '潮湿',
level_humidity_am_very_high: '非常潮湿',
level_humidity_very_low: '非常干燥',
level_humidity_low: '干燥',
level_humidity_suitable: '适宜',
level_humidity_high: '潮湿',
level_humidity_very_high: '非常潮湿',
level_tvoc_am_excellent: '优',
level_tvoc_am_good: '良',
level_tvoc_am_slightly: '浓度略高',
level_tvoc_am_serious: '浓度较高',
level_tvoc_am_xserious: '浓度超高',
level_tvoc_excellent: '优',
level_tvoc_good: '良',
level_tvoc_slightly: '浓度略高',
level_tvoc_serious: '浓度较高',
level_tvoc_xserious: '浓度超高',
level_co2_am_good: '正常',
level_co2_am_slightly: '浓度略高',
level_co2_am_serious: '浓度较高',
level_co2_am_xserious: '严重超高',
level_co2_good: '正常',
level_co2_slightly: '浓度略高',
level_co2_serious: '浓度较高',
level_co2_xserious: '严重超高',
level_pm25_excellent: '优',
level_pm25_good: '良',
level_pm25_medium: '轻度污染',
level_pm25_slightly: '中度污染',
level_pm25_serious: '重度污染',
level_pm25_xserious: '严重污染',
level_pm25_am_excellent: '好',
level_pm25_am_good: '中等',
level_pm25_am_medium: '较不健康',
level_pm25_am_slightly: '不健康',
level_pm25_am_serious: '非常不健康',
level_pm25_am_xserious: '危险',
level_pm10_am_excellent: '好',
level_pm10_am_good: '中等',
level_pm10_am_medium: '较不健康',
level_pm10_am_slightly: '不健康',
level_pm10_am_serious: '非常不健康',
level_pm10_am_xserious: '危险',
level_pm10_excellent: '优',
level_pm10_good: '良',
level_pm10_medium: '轻度污染',
level_pm10_slightly: '中度污染',
level_pm10_serious: '重度污染',
level_pm10_xserious: '严重污染',
level_aqi_am_excellent: '好',
level_aqi_am_good: '中等',
level_aqi_am_medium: '较不健康',
level_aqi_am_slightly: '不健康',
level_aqi_am_serious: '非常不健康',
level_aqi_am_xserious: '危险',
level_aqi_excellent: '优',
level_aqi_good: '良',
level_aqi_medium: '轻度污染',
level_aqi_slightly: '中度污染',
level_aqi_serious: '重度污染',
level_aqi_xserious: '严重污染',
level_o3_am_excellent: '好',
level_o3_am_good: '中等',
level_o3_am_medium: '较不健康',
level_o3_am_slightly: '不健康',
level_o3_am_serious: '非常不健康',
level_o3_am_xserious: '危险',
level_o3_excellent: '优',
level_o3_good: '良',
level_o3_medium: '轻度污染',
level_o3_slightly: '中度污染',
level_o3_serious: '重度污染',
level_o3_xserious: '严重污染',
level_no2_am_excellent: '好',
level_no2_am_good: '中等',
level_no2_am_slightly: '较不健康',
level_no2_am_medium: '不健康',
level_no2_am_serious: '非常不健康',
level_no2_am_xserious: '危险',
level_no2_excellent: '优',
level_no2_good: '良',
level_no2_slightly: '轻度污染',
level_no2_medium: '中度污染',
level_no2_serious: '重度污染',
level_no2_xserious: '严重污染',
level_ultraviolet_am_very_low: '弱',
level_ultraviolet_am_low: '中等',
level_ultraviolet_am_medium: '强',
level_ultraviolet_am_serious: '很强',
level_ultraviolet_am_xserious: '极强',
level_ultraviolet_very_low: '弱',
level_ultraviolet_low: '中等',
level_ultraviolet_medium: '强',
level_ultraviolet_serious: '很强',
level_ultraviolet_xserious: '极强',
level_pollen_am_very_low: '很低',
level_pollen_am_low: '较低',
level_pollen_am_slightly: '偏高',
level_pollen_am_medium: '较高',
level_pollen_am_serious: '很高',
level_pollen_am_xserious: '极高',
level_pollen_very_low: '很低',
level_pollen_low: '较低',
level_pollen_slightly: '偏高',
level_pollen_medium: '较高',
level_pollen_serious: '很高',
level_pollen_xserious: '极高',
level_co_am_excellent: '好',
level_co_am_good: '中等',
level_co_am_slightly: '较不健康',
level_co_am_medium: '不健康',
level_co_am_serious: '非常不健康',
level_co_am_xserious: '危险',
level_co_excellent: '优',
level_co_good: '良',
level_co_slightly: '轻度污染',
level_co_medium: '中度污染',
level_co_serious: '重度污染',
level_co_xserious: '严重污染',
level_so2_am_excellent: '好',
level_so2_am_good: '中等',
level_so2_am_slightly: '较不健康',
level_so2_am_medium: '不健康',
level_so2_am_serious: '非常不健康',
level_so2_am_xserious: '危险',
level_so2_excellent: '优',
level_so2_good: '良',
level_so2_slightly: '轻度污染',
level_so2_medium: '中度污染',
level_so2_serious: '重度污染',
level_so2_xserious: '严重污染',
level_atmos_am_low: '较低',
level_atmos_am_good: '适宜',
level_atmos_low: '较低',
level_atmos_good: '适宜',
evalute_item1: '建议措施',
evaluate1: '打开空气净化设备',
evaluate2: '打开除湿设备',
evaluate3: '打开空调制冷',
evaluate4: '打开暖气或空调制热',
evaluate5: '打开通风净化设备',
evaluate6: '打开通风设备',
evaluate7: '开窗通风',
evaluate9: '打开加湿设备'
},
"zh-tw": {
power: "電量",
now: '現在',
minAgo: '分鐘前',
hourAgo: '小時前',
temperature: "溫度",
humidity: "相對濕度",
tvoc: "tVOC",
checking: "檢測中...",
initing: "初始化中...",
preparing: "初始化中...",
abnormal: '傳感器異常',
exposing: '校準中...',
good: '優',
soso: "良",
light: "輕度污染",
meduim: "中度污染",
serious: "重度污染",
xserious: "嚴重污染",
low: "較低",
bit_low: "略低",
suit: "適宜",
bit_high: "略高",
high: "較高",
xdry: "非常乾燥",
dry: "乾燥",
moist: "潮濕",
xmoist: "非常潮濕",
normal: "正常",
light_high_density: "濃度略高",
serious_high_density: "濃度較高",
xserious_high_density: "濃度超高",
one_hour_ago: "1 小時前",
x_hours_ago: "{0} 小時前",
one_minut_ago: "1 分鐘前",
x_minuts_ago: "{0} 分鐘前",
today: "今天",
yesterday: "昨天",
tomorrow: "明天",
mmmdd: "{0}月{1}日",
mm: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'],
share_date_time_format: "{0} {1}",
update_on: "{0}更新",
bad_detect_time: "檢測時間:{0}(裝置時間)",
_on: "",
detecting_time: "檢測時間:{0}",
hour_24: '24小時',
day_30: '30天',
title_temperature: '溫度',
title_humidity: '相對濕度',
title_tvoc: 'tVOC',
title_co2: 'CO2',
title_co2e: 'CO₂e',
title_pm25: 'PM2.5',
title_no2: 'NO2',
title_pm10: 'PM10',
title_aqi: 'AQI',
title_o3: 'O3',
title_ultraviolet: '紫外線',
title_pollen: '花粉',
title_co: 'CO',
title_so2: 'SO2',
title_atmos: '氣壓',
title_magnet: '開關',
title_battery: '電量',
title2_temperature: '溫度',
title2_humidity: '相對濕度',
title2_tvoc: 'tVOC',
title2_co2: 'CO2',
title2_co2e: 'CO₂e',
title2_pm25: 'PM2.5',
title2_no2: 'NO2',
title2_pm10: 'PM10',
title2_aqi: 'AQI',
title2_o3: 'O3',
title2_ultraviolet: '紫外線',
title2_pollen: '花粉',
title2_co: 'CO',
title2_so2: 'SO2',
title2_atmos: '氣壓',
title_temperature_history: '溫度歷史',
title_humidity_history: '相對濕度歷史',
title_tvoc_history: 'tVOC 歷史',
title_co2_history: 'CO2 歷史',
title_pm25_history: 'PM2.5 歷史',
title_atmos_history: '氣壓歷史',
no_history_data_yet: '暫時沒有歷史數據',
level_temperature_am_very_low: '較低',
level_temperature_am_low: '略低',
level_temperature_am_suitable: '適宜',
level_temperature_am_high: '略高',
level_temperature_am_very_high: '較高',
level_temperature_very_low: '較低',
level_temperature_low: '略低',
level_temperature_suitable: '適宜',
level_temperature_high: '略高',
level_temperature_very_high: '較高',
level_humidity_am_very_low: '非常乾燥',
level_humidity_am_low: '乾燥',
level_humidity_am_suitable: '適宜',
level_humidity_am_high: '潮濕',
level_humidity_am_very_high: '非常潮濕',
level_humidity_very_low: '非常乾燥',
level_humidity_low: '乾燥',
level_humidity_suitable: '適宜',
level_humidity_high: '潮濕',
level_humidity_very_high: '非常潮濕',
level_tvoc_am_excellent: '優',
level_tvoc_am_good: '良',
level_tvoc_am_slightly: '濃度略高',
level_tvoc_am_serious: '濃度較高',
level_tvoc_am_xserious: '濃度超高',
level_tvoc_excellent: '優',
level_tvoc_good: '良',
level_tvoc_slightly: '濃度略高',
level_tvoc_serious: '濃度較高',
level_tvoc_xserious: '濃度超高',
level_co2_am_good: '正常',
level_co2_am_slightly: '濃度略高',
level_co2_am_serious: '濃度較高',
level_co2_am_xserious: '濃度超高',
level_co2_good: '正常',
level_co2_slightly: '濃度略高',
level_co2_serious: '濃度較高',
level_co2_xserious: '濃度超高',
level_pm25_excellent: '優',
level_pm25_good: '良',
level_pm25_medium: '輕度污染',
level_pm25_slightly: '中度污染',
level_pm25_serious: '重度污染',
level_pm25_xserious: '嚴重污染',
level_pm25_am_excellent: '好',
level_pm25_am_good: '中等',
level_pm25_am_medium: '較不健康',
level_pm25_am_slightly: '不健康',
level_pm25_am_serious: '非常不健康',
level_pm25_am_xserious: '危險',
level_pm10_am_excellent: '好',
level_pm10_am_good: '中等',
level_pm10_am_medium: '較不健康',
level_pm10_am_slightly: '不健康',
level_pm10_am_serious: '非常不健康',
level_pm10_am_xserious: '危險',
level_pm10_excellent: '優',
level_pm10_good: '良',
level_pm10_medium: '輕度污染',
level_pm10_slightly: '中度污染',
level_pm10_serious: '重度污染',
level_pm10_xserious: '嚴重污染',
level_aqi_am_excellent: '好',
level_aqi_am_good: '中等',
level_aqi_am_medium: '較不健康',
level_aqi_am_slightly: '不健康',
level_aqi_am_serious: '非常不健康',
level_aqi_am_xserious: '危險',
level_aqi_excellent: '優',
level_aqi_good: '良',
level_aqi_medium: '輕度污染',
level_aqi_slightly: '中度污染',
level_aqi_serious: '重度污染',
level_aqi_xserious: '嚴重污染',
level_o3_am_excellent: '好',
level_o3_am_good: '中等',
level_o3_am_medium: '較不健康',
level_o3_am_slightly: '不健康',
level_o3_am_serious: '非常不健康',
level_o3_am_xserious: '危險',
level_o3_excellent: '優',
level_o3_good: '良',
level_o3_medium: '輕度污染',
level_o3_slightly: '中度污染',
level_o3_serious: '重度污染',
level_o3_xserious: '嚴重污染',
level_no2_am_excellent: '好',
level_no2_am_good: '中等',
level_no2_am_slightly: '較不健康',
level_no2_am_medium: '不健康',
level_no2_am_serious: '非常不健康',
level_no2_am_xserious: '危險',
level_no2_excellent: '優',
level_no2_good: '良',
level_no2_slightly: '輕度污染',
level_no2_medium: '中度污染',
level_no2_serious: '重度污染',
level_no2_xserious: '嚴重污染',
level_ultraviolet_am_very_low: '弱',
level_ultraviolet_am_low: '中等',
level_ultraviolet_am_medium: '強',
level_ultraviolet_am_serious: '很強',
level_ultraviolet_am_xserious: '極強',
level_ultraviolet_very_low: '弱',
level_ultraviolet_low: '中等',
level_ultraviolet_medium: '強',
level_ultraviolet_serious: '很強',
level_ultraviolet_xserious: '極強',
level_pollen_am_very_low: '很低',
level_pollen_am_low: '較低',
level_pollen_am_slightly: '偏高',
level_pollen_am_medium: '較高',
level_pollen_am_serious: '很高',
level_pollen_am_xserious: '極高',
level_pollen_very_low: '很低',
level_pollen_low: '較低',
level_pollen_slightly: '偏高',
level_pollen_medium: '較高',
level_pollen_serious: '很高',
level_pollen_xserious: '極高',
level_co_am_excellent: '好',
level_co_am_good: '中等',
level_co_am_slightly: '較不健康',
level_co_am_medium: '不健康',
level_co_am_serious: '非常不健康',
level_co_am_xserious: '危險',
level_co_excellent: '優',
level_co_good: '良',
level_co_slightly: '輕度污染',
level_co_medium: '中度污染',
level_co_serious: '重度污染',
level_co_xserious: '嚴重污染',
level_so2_am_excellent: '好',
level_so2_am_good: '中等',
level_so2_am_slightly: '較不健康',
level_so2_am_medium: '不健康',
level_so2_am_serious: '非常不健康',
level_so2_am_xserious: '危險',
level_so2_excellent: '優',
level_so2_good: '良',
level_so2_slightly: '輕度污染',
level_so2_medium: '中度污染',
level_so2_serious: '重度污染',
level_so2_xserious: '嚴重污染',
level_atmos_am_low: '較低',
level_atmos_am_good: '適宜',
level_atmos_low: '較低',
level_atmos_good: '適宜',
evalute_item1: '建議措施',
evaluate1: '打開空氣淨化設備',
evaluate2: '打開除濕設備',
evaluate3: '打開空調製冷',
evaluate4: '打開暖氣或空調製熱',
evaluate5: '打開通風淨化設備',
evaluate6: '打開通風設備',
evaluate7: '開窗通風',
evaluate9: '打開加濕設備'
},
"zh-hk": {
power: "電量",
now: '現在',
minAgo: '分鐘前',
hourAgo: '小時前',
temperature: "溫度",
humidity: "相對濕度",
tvoc: "tVOC",
checking: "檢測中...",
initing: "初始化中...",
preparing: "初始化中...",
abnormal: '傳感器異常',
exposing: '校準中...',
good: '優',
soso: "良",
light: "輕度污染",
meduim: "中度污染",
serious: "重度污染",
xserious: "嚴重污染",
low: "較低",
bit_low: "略低",
suit: "適宜",
bit_high: "略高",
high: "較高",
xdry: "非常乾燥",
dry: "乾燥",
moist: "潮濕",
xmoist: "非常潮濕",
normal: "正常",
light_high_density: "濃度略高",
serious_high_density: "濃度較高",
xserious_high_density: "濃度超高",
one_hour_ago: "1 小時前",
x_hours_ago: "{0} 小時前",
one_minut_ago: "1 分鐘前",
x_minuts_ago: "{0} 分鐘前",
today: "今天",
yesterday: "昨天",
tomorrow: "明天",
mmmdd: "{0}月{1}日",
share_date_time_format: "{0} {1}",
update_on: "{0}更新",
bad_detect_time: "檢測時間:{0}(裝置時間)",
_on: "",
detecting_time: "檢測時間:{0}",
hour_24: '24小時',
day_30: '30天',
title_temperature: '溫度',
title_humidity: '相對濕度',
title_tvoc: 'tVOC',
title_co2: 'CO2',
title_co2e: 'CO₂e',
title_pm25: 'PM2.5',
title_no2: 'NO2',
title_pm10: 'PM10',
title_aqi: 'AQI',
title_o3: 'O3',
title_ultraviolet: '紫外線',
title_pollen: '花粉',
title_co: 'CO',
title_so2: 'SO2',
title_atmos: '氣壓',
title_magnet: '開關',
title_battery: '電量',
title2_temperature: '溫度',
title2_humidity: '相對濕度',
title2_tvoc: 'tVOC',
title2_co2: 'CO2',
title2_co2e: 'CO₂e',
title2_pm25: 'PM2.5',
title2_no2: 'NO2',
title2_pm10: 'PM10',
title2_aqi: 'AQI',
title2_o3: 'O3',
title2_ultraviolet: '紫外線',
title2_pollen: '花粉',
title2_co: 'CO',
title2_so2: 'SO2',
title2_atmos: '氣壓',
evalute_item1: '建議措施',
evaluate1: '打開空氣淨化設備',
evaluate2: '打開除濕設備',
evaluate3: '打開空調製冷',
evaluate4: '打開暖氣或空調製熱',
evaluate5: '打開通風淨化設備',
evaluate6: '打開通風設備',
evaluate7: '開窗通風',
evaluate9: '打開加濕設備'
}
});
exports.MainLocalizableString = MainLocalizableString;
var SceneMainStrings = new _ui.LocalizedStrings({
"zh-Hans": {
higher_than_x: "{0}高于{1}{2}",
lower_than_x: "{0}低于{1}{2}",
ok: "确定"
},
"zh-tw": {
higher_than_x: "{0}高于{1}{2}",
lower_than_x: "{0}低于{1}{2}",
ok: "確定"
},
"zh-hk": {
higher_than_x: "{0}高于{1}{2}",
lower_than_x: "{0}低于{1}{2}",
ok: "確定"
},
"en": {
higher_than_x: "{0} higher than {1}{2}",
lower_than_x: "{0} lower than {1}{2}",
ok: "OK"
}
});
exports.SceneMainStrings = SceneMainStrings;
var DataTypeStateString = new _ui.LocalizedStrings({
"zh-Hans": {
aqi_state: 'AQI 即空气质量指数,是根据环境空气质量标准和各项污染物对人体健康、生态、环境的影响,将常规监测的几种空气污染物浓度简化成为单一的概念性指数值。它将空气污染程度和空气质量状况分级表示,适合于表示城市的短期空气质量状况和变化趋势。参与空气质量评价的主要污染物为PM2.5、PM10、二氧化硫(SO2)、二氧化氮(NO2)、臭氧(O3)、一氧化碳(CO)。\n\n当 AQI介于 0~50 时,基本无空气污染,各类人群可正常活动。\n\n当 AQI介于 51~100 时,某些污染物可能对极少数异常敏感人群健康有较弱影响,建议极少数异常敏感人群应减少户外活动。\n\n当 AQI介于 101~150 时,易感人群症状有轻度加剧,健康人群出现刺激症状。建议儿童、老年人及心脏病、呼吸系统疾病患者应减少长时间、高强度的户外锻炼。\n\n当 AQI介于 151 ~200 时,进一步加剧易感人群症状,可能对健康人群心脏、呼吸系统有影响,建议疾病患者避免长时间、高强度的户外锻练,一般人群适量减少户外运动。\n\n当 AQI介于 201~300 时,心脏病和肺病患者症状显著加剧,运动耐受力降低,健康人群普遍出现症状,建议儿童、老年人和心脏病、肺病患者应停留在室内,停止户外运动,一般人群减少户外运动。\n\n当 AQI 高于 300 时。此时,健康人群运动耐受力降低,有明显强烈症状,提前出现某些疾病,建议儿童、老年人和病人应当留在室内,避免体力消耗,一般人群应避免户外活动。\n',
pm25_state: 'PM2.5 即细颗粒物,是对空气中直径小于或等于 2.5 微米的固体颗粒或液滴的总称。\n\n这些颗粒非常细小,可直接进入肺部。PM2.5 沉淀进肺泡后无法排除,会对呼吸系统和心血管系统造成伤害,可能引起支气管炎、哮喘、冠心病等疾病。\n\n自然过程或人为排放都会产生 PM2.5,但主要来源是后者。自然源包括土壤扬尘(含有氧化物矿物和其他成分)、海盐、植物花粉、孢子、细菌等,自然界中的灾害事件,如火山爆发、森林大火等也会产生大量的细颗粒物。人为源包括发电、冶金、化学等工业生产过程中对煤、石油等各种化石燃料的燃烧,机动车尾气排放,秸秆垃圾的焚烧及扬尘等。在室内,二手烟是颗粒物最主要的来源,另外,烹饪时所产生的油烟也是室内 PM2.5 的来源之一。\n',
tvoc_state: 'tVOC 即总挥发性有机物,包含上千种化合物。室内人员增多,或进行烹饪、进餐、清洁、化妆等活动时, tVOC 读数可能大幅升高,通常会在相关活动结束或通风后回落。当检测仪附近有未密封的含酒精的物质或粘合剂、油漆时, tVOC 读数也会显著升高。室内 tVOC 还可能来自建筑和装饰、家具、家用电器使用的材料。\n\n当 tVOC 高于 3mg/m³ 时,应避免在该环境下持续停留超过 1 个月。可开窗或打开新风换气设备通风、寻找并处理挥发源,以降低 tVOC 浓度。\n\n不同工作原理或不同厂商出品的检测设备的 tVOC 检测结果可能有较大差异。在不同环境下初始化的青萍空气检测仪的 tVOC 读数可能有较大差异。\n\n如要比较多台青萍空气检测仪的 tVOC 读数一致性,需在相同环境下同时重置他们的 tVOC 传感器,然后观察。',
pm10_state: 'PM10 即可吸入颗粒物,是对空气中直径小于或等于 10 微米的固体颗粒或液滴的总称。\n\nPM10 通常由机动车在非铺装路面上的行驶、材料的破碎碾磨处理等活动,以及被风扬起的尘土引发。\n\n人类鼻腔内的毛发、分泌物和黏膜可过滤大多数直径大于 10 微米的粉尘,而 PM10 能直达并沉积于肺部,参与血液循环。PM10 易吸附有害物质,如重金属、有毒微生物等,易导致呼吸系统病症,例如气促、咳嗽等,并加重已有的呼吸系统疾病,损害肺部组织,对儿童和老年人的危害尤为明显。\n',
o3_state: 'O3 即臭氧,地面的臭氧主要由机动车和工业排放的氧化氮(NOx)和挥发性有机物(VOCs)等物质经阳光照射发生化学反应而形成。阳光灿烂时,臭氧污染最为严重。\n\n当空气中臭氧浓度为 %@ 时,可引起鼻腔和喉头粘膜的刺激感;臭氧浓度在 %@ 时,可引起哮喘发作,导致上呼吸道疾病恶化,同时刺激眼睛,使视觉敏感度和视力降低。臭氧浓度在 %@ 以上时,可引起头痛、胸痛、思维能力下降,严重时可导致肺气肿和肺水肿。\n\n臭氧还能阻碍人体血液输氧功能,造成组织缺氧,使甲状腺功能受损、骨骼钙化,还可引起潜在性的全身影响,如诱发淋巴细胞染色体畸变,损害某些酶的活性和产生溶血反应。臭氧对人体也有致畸性,母亲孕期接触臭氧可导致新生儿睑裂狭小发生率增多。\n',
co_state: 'CO 即一氧化碳,是煤、石油等含碳物质不完全燃烧的产物。在冶金、化学、石墨电极制造以及家用煤气或煤炉、汽车尾气中均有一氧化碳存在。\n\n吸入一氧化碳对人体有很大的伤害。它会结合血红蛋白生成碳氧血红蛋白,这种蛋白不能提供氧气给身体组织,进而造成血缺氧。当空气中的一氧化碳浓度为 %@ 时,即可能导致高达 50%% 的人体血红蛋白转换为羰合血红蛋白,进而导致昏迷或死亡。\n',
no2_state: 'NO2 即二氧化氮,是硝酸盐气溶胶的主要来源,构成 PM2.5 和在紫外线下臭氧的主要部分。人为释放二氧化氮的主要来源是燃烧过程(供热、发电以及机动车和船舶的发动机)。\n\n二氧化氮会损害呼吸道。吸入初期仅有轻微的眼及上呼吸道刺激症状,如咽部不适、干咳等。常在数小时至十几小时或更长时间潜伏期后发生迟发性肺水肿、成人呼吸窘迫综合征,出现胸闷、呼吸窘迫、咳嗽、咯泡沫痰、紫绀等。可并发气胸及纵隔气肿。肺水肿消退后两周左右可出现迟发性阻塞性细支气管炎。\n',
so2_state: 'SO2 即二氧化硫,是一种无色气体,带有刺鼻的气味。它源自矿物燃料(煤和石油)的燃烧以及对含有硫磺的矿物的冶炼。人为的二氧化硫主要来源是为取暖、发电和行驶机动车而燃烧含有硫磺的矿物燃料。\n\n二氧化硫可影响呼吸系统和肺功能,并刺激眼睛。它会引发呼吸道的炎症,导致咳嗽、粘液分泌、加重哮喘和慢性支气管炎,并使人们更易患呼吸道感染。\n\n二氧化硫与水结合可形成硫酸,是酸雨的主要成分,是造成树木死亡的原因之一。\n',
pollen_state: '花粉即从各种常见植物中飘出的花粉粒,直径一般在 30~50 微米左右,它们在空气中飘散时,极易被人体吸入呼吸道内。\n\n有花粉过敏史的人吸入这些花粉后,会产生过敏反应,造成流鼻涕或鼻塞、打喷嚏、眼睛的红痒与溢泪、眼睛周围肿胀,严重者还会诱发气管炎、支气管哮喘、肺心病(多发在夏秋季)。\n\n预防措施:\n\n• 在花粉季节出门要带密度较高的口罩。\n• 花粉季节宜在早晨或晚上出门,通常中午前后是花粉浓度最高的时间。\n• 鼻腔局部涂抹花粉阻断剂。\n',
ultraviolet_state: '紫外线指数是在某一天某个地点受到太阳紫外线(UV)辐射强度的国际计量标准。\n\n它的目的是用来保护人们免受紫外线的伤害。公共卫生组织建议人们在紫外线指数大于或等于3 级时要采取措施保护自己(例如,可以在皮肤上涂抹防晒霜和戴帽子等)。\n\n紫外线是光线的一种,过强的照射最直接的影响是皮肤逐渐变黑。长时间照射会加速皮肤衰老,人体皮肤衰老 90% 的原因源于紫外线。\n\n紫外线已被确定与许多疾病的产生有关,例如:皱纹、晒伤、白内障、皮肤癌、视觉损害与免疫系统的伤害。\n',
temp_hum_title: '温湿度',
temp_hum_state_c: '人体感受到的温度取决于多项因素,例如气温、热辐射、相对湿度、风速、人体活动和健康状况、着装等。其中温度和相对湿度是影响人体舒适度的两个重要因素。\n\n冬季,温度在 20℃~24℃、相对湿度在 30%~60% 时,人体感觉最为舒适;夏季,温度在 23℃~26℃、相对湿度在 25%~60% 时,人体感觉最为舒适。\n',
temp_hum_state_f: '人体感受到的温度取决于多项因素,例如气温、热辐射、相对湿度、风速、人体活动和健康状况、着装等。其中温度和相对湿度是影响人体舒适度的两个重要因素。\n\n冬季,温度在 68℉~75℉、相对湿度在 30%~60% 时,人体感觉最为舒适;夏季,温度在 73℉~79℉、相对湿度在 25%~60% 时,人体感觉最为舒适。\n',
temp_hum_value: '温度 tt,相对湿度 hh',
temp_hum_site: '体感舒适区',
temp_hum_humi: '相对湿度 %',
temp_hum_temp: '温度 ',
co2_state: 'CO2 即二氧化碳,是空气中常见的化合物,约占大气体积的 0.04%(400 ppm)。\n\n二氧化碳通常由燃烧有机化合物、细胞的呼吸作用、微生物的发酵作用等所产生。室内二氧化碳主要来自于人的呼吸。\n\n当室内二氧化碳高于 1000 ppm 时,有些人可能会出现困倦的感觉。当高于 2000 ppm 时,有些人可能会出现恶心和头疼的症状。当高于 5000 ppm 时,请避免在该环境下停留超过 8 小时。\n',
atmos_state: '气压(大气压力)会影响人体内氧气的供应。当大气压力下降时,人体会加快呼吸及血液循环,可能引发呼吸急促、心率加快,严重时引发“高原反应”。另外,气压也可能引起人的心理变化,例如低气压下的雨雪天气会使有些人感到压抑和不适。\n\n通常,海拔越高,大气压力越低;天气由晴转阴时,大气压力降低,反之亦然。'
},
"zh-tw": {
aqi_state: 'AQI 即空氣質量指數,是根據環境空氣質量標準和各項污染物對人體健康、生態、環境的影響,將常規監測的幾種空氣污染物濃度簡化成為單一的概念性指數值。它將空氣污染程度和空氣質量狀況分級表示,適合於表示城市的短期空氣質量狀況和變化趨勢。參與空氣質量評價的主要污染物為PM2.5、PM10、二氧化硫(SO2)、二氧化氮(NO2)、臭氧(O3)、一氧化碳(CO)。\n\n當 AQI介於 0~50 時,基本無空氣污染,各類人群可正常活動。\n\n當 AQI介於 51~100 時,某些污染物可能對極少數異常敏感人群健康有較弱影響,建議極少數異常敏感人群應減少戶外活動。\n\n當 AQI介於 101~150 時,易感人群症狀有輕度加劇,健康人群出現刺激症狀。建議兒童、老年人及心髒病、呼吸系統疾病患者應減少長時間、高強度的戶外鍛煉。\n\n當 AQI介於 151 ~200 時,進一步加劇易感人群症狀,可能對健康人群心臟、呼吸系統有影響,建議疾病患者避免長時間、高強度的戶外鍛練,一般人群適量減少戶外運動。\n\n當AQI介於201~300 時,心髒病和肺病患者症狀顯著加劇,運動耐受力降低,健康人群普遍出現症狀,建議兒童、老年人和心髒病、肺病患者應停留在室內,停止戶外運動,一般人群減少戶外運動。\n\n當 AQI 高於 300 時。此時,健康人群運動耐受力降低,有明顯強烈症狀,提前出現某些疾病,建議兒童、老年人和病人應當留在室內,避免體力消耗,一般人群應避免戶外活動。\n',
pm25_state: 'PM2.5 即細顆粒物,是對空氣中直徑小於或等於2_5 微米的固體顆粒或液滴的總稱。這些顆粒物非常細小,可直接進入肺部。PM2.5 沉澱進肺泡後無法排除,會對呼吸系統和心血管系統造成傷害,可能引起支氣管炎、哮喘、冠心病等疾病。\n\n自然過程或人為排放都會產生PM2.5,但主要來源是後者。自然源包括土壤揚塵(含有氧化物礦物和其他成分)、海鹽、植物花粉、孢子、細菌等,自然界中的災害事件,如火山爆發、森林大火等也會產生大量的細顆粒物。人為源包括發電、冶金、化學等工業生產過程中對煤、石油等各種化石燃料的燃燒,機動車尾氣排放,秸稈垃圾的焚燒及揚塵等。在室內,二手煙是顆粒物最主要的來源,另外,烹飪時所產生的油煙也是室內PM2 _5 的來源之一。\n',
tvoc_state: 'tVOC 即總揮發性有機物,包含上千種化合物。室內人員增多,或進行烹飪、進餐、清潔、化妝等活動時, tVOC 讀數可能大幅升高,通常會在相關活動結束或通風後回落。當檢測儀附近有未密封的含酒精的物質或粘合劑、油漆時, tVOC 讀數也會顯著升高。室內tVOC 還可能來自建築和裝飾、家具、家用電器使用的材料。\n\n當tVOC 讀數高於 3mg/m³ 時,應避免在該環境下持續停留超過1 個月。可開窗或打開新風換氣設備通風、尋找並處理揮發源,以降低tVOC 濃度。\n\n不同工作原理或不同廠商出品的檢測設備的tVOC 檢測結果可能有較大差異。在不同環境下初始化的青萍空氣檢測儀的tVOC 讀數可能有較大差異。\n\n如要比較多台青萍空氣檢測儀的tVOC 讀數一致性,需在相同環境下同時重置它們的TVOC 傳感器,然後觀察。',
pm10_state: 'PM10 即可吸入顆粒物,是對空氣中直徑小於或等於 10 微米的固體顆粒或液滴的總稱。\n\nPM10 通常由機動車在非鋪裝路面上的行駛、材料的破碎碾磨處理等活動,以及被風揚起的塵土引發。\n\n人類鼻腔內的毛髮、分泌物和黏膜可過濾大多數直徑大於 10 微米的粉塵,而 PM10 能直達並沉積於肺部,參與血液循環。 PM10 易吸附有害物質,如重金屬、有毒微生物等,易導致呼吸系統病症,例如氣促、咳嗽等,並加重已有的呼吸系統疾病,損害肺部組織,對兒童和老年人的危害尤為明顯。\n',
o3_state: 'O3 即臭氧,地面的臭氧主要由機動車和工業排放的氧化氮(NOx)和揮發性有機物(VOCs)等物質經陽光照射發生化學反應而形成。陽光燦爛時,臭氧污染最為嚴重。\n\n當空氣中臭氧濃度為 %@ 時,可引起鼻腔和喉頭粘膜的刺激​​感;臭氧濃度在 %@ 時,可引起哮喘發作,導致上呼吸道疾病惡化,同時刺激眼睛,使視覺敏感度和視力降低。臭氧濃度在 %@ 以上時,可引起頭痛、胸痛、思維能力下降,嚴重時可導致肺氣腫和肺水腫。\n\n臭氧還能阻礙人體血液輸氧功能,造成組織缺氧,使甲狀腺功能受損、骨骼鈣化,還可引起潛在性的全身影響,如誘發淋巴細胞染色體畸變,損害某些酶的活性和產生溶血反應。臭氧對人體也有致畸性,母親孕期接觸臭氧可導致新生兒瞼裂狹小發生率增多。\n',
co_state: 'CO 即一氧化碳,是煤、石油等含碳物質不完全燃燒的產物。在冶金、化學、石墨電極製造以及家用煤氣或煤爐、汽車尾氣中均有一氧化碳存在。\n\n吸入一氧化碳對人體有很大的傷害。它會結合血紅蛋白生成碳氧血紅蛋白,這種蛋白不能提供氧氣給身體組織,進而造成血缺氧。當空氣中的一氧化碳濃度為 %@ 時,即可能導致高達 50%% 的人體血紅蛋白轉換為羰合血紅蛋白,進而導致昏迷或死亡。\n',
no2_state: 'NO2 即二氧化氮,是硝酸鹽氣溶膠的主要來源,構成 PM2.5 和在紫外線下臭氧的主要部分。人為釋放二氧化氮的主要來源是燃燒過程(供熱、發電以及機動車和船舶的發動機)。\n\n二氧化氮會損害呼吸道。吸入初期僅有輕微的眼及上呼吸道刺激症狀,如咽部不適、乾咳等。常在數小時至十幾小時或更長時間潛伏期後發生遲發性肺水腫、成人呼吸窘迫綜合徵,出現胸悶、呼吸窘迫、咳嗽、咯泡沫痰、紫紺等。可並發氣胸及縱隔氣腫。肺水腫消退後兩週左右可出現遲發性阻塞性細支氣管炎。\n',
so2_state: 'SO2 即二氧化硫,是一種無色氣體,帶有刺鼻的氣味。它源自礦物燃料(煤和石油)的燃燒以及對含有硫磺的礦物的冶煉。人為的二氧化硫主要來源是為取暖、發電和行駛機動車而燃燒含有硫磺的礦物燃料。\n\n二氧化硫可影響呼吸系統和肺功能,並刺激眼睛。它會引發呼吸道的炎症,導致咳嗽、粘液分泌、加重哮喘和慢性支氣管炎,並使人們更易患呼吸道感染。\n\n二氧化硫與水結合可形成硫酸,是酸雨的主要成分,是造成樹木死亡的原因之一。\n',
pollen_state: '花粉即從各種常見植物中飄出的花粉粒,直徑一般在 30~50 微米左右,它們在空氣中飄散時,極易被人體吸入呼吸道內。\n\n有花粉過敏史的人吸入這些花粉後,會產生過敏反應,造成流鼻涕或鼻塞、打噴嚏、眼睛的紅癢與溢淚、眼睛周圍腫脹,嚴重者還會誘發氣管炎、支氣管哮喘、肺心病(多發在夏秋季)。\n\n預防措施:\n\n• 在花粉季節出門要帶密度較高的口罩。\n• 花粉季節宜在早晨或晚上出門,通常中午前後是花粉濃度最高的時間。\n• 鼻腔局部塗抹花粉阻斷劑。\n',
ultraviolet_state: '紫外線指數是在某一天某個地點受到太陽紫外線(UV)輻射強度的國際計量標準。\n\n它的目的是用來保護人們免受紫外線的傷害。公共衛生組織建議人們在紫外線指數大於或等於3 級時要採取措施保護自己(例如,可以在皮膚上塗抹防曬霜和戴帽子等)。\n\n紫外線是光線的一種,過強的照射最直接的影響是皮膚逐漸變黑。長時間照射會加速皮膚衰老,人體皮膚衰老 90% 的原因源於紫外線。\n\n紫外線已被確定與許多疾病的產生有關,例如:皺紋、曬傷、白內障、皮膚癌、視覺損害與免疫系統的傷害。\n',
temp_hum_title: '溫濕度',
temp_hum_state_c: '人體感受到的溫度取決於多項因素,例如氣溫、熱輻射、相對濕度、風速、人體活動和健康狀況。著裝等。其中溫度和相對濕度是影響人體舒適度的兩個重要因素。\n\n冬季,溫度在 20℃~24℃、相對濕度在 30%~60% 時,人體感覺最為舒適;夏季,溫度在 23℃~26℃、相對濕度在 25%~60% 時,人體感覺最為舒適。\n',
temp_hum_state_f: '人體感受到的溫度取決於多項因素,例如氣溫、熱輻射、相對濕度、風速、人體活動和健康狀況。著裝等。其中溫度和相對濕度是影響人體舒適度的兩個重要因素。\n\n冬季,溫度在 68℉~75℉、相對濕度在 30%~60% 時,人體感覺最為舒適;夏季,溫度在 73℉~79℉、相對濕度在 25%~60% 時,人體感覺最為舒適。\n',
temp_hum_value: '溫度 tt,相對濕度 hh',
temp_hum_site: '體感舒適區',
temp_hum_humi: '相對濕度 %',
temp_hum_temp: '溫度 ',
co2_state: 'CO2 即二氧化碳,是空氣中常見的化合物,約佔大氣體積的0.04%(400 ppm)。\n\n二氧化碳通常是由燃燒有機化合物、細胞的呼吸作用、微生物的發酵作用等所產生、室內二氧化碳主要來自於人的呼吸。\n\n當室內二氧化碳高於1000 ppm 時,有些人可能會出現困倦的感覺。當高於2000 ppm 時,有些人可能會出現噁心和頭疼的症狀。當高於5000 ppm 時,請避免在該環境下停留超過8 小時。\n',
atmos_state: '氣壓(大氣壓力)會影響人體內氧氣的供應。當大氣壓力下降時,人體會加快呼吸及血液循環,可能引發呼吸急促、心率加快,嚴重時引發“高原反應”。另外,氣壓也可能引起人的心理變化,例如低氣壓下的雨雪天氣會使有些人感到壓抑和不適。\n\n通常,海拔越高,大氣壓力越低;天氣由晴轉陰時,大氣壓力降低,反之亦然。'
},
"zh-hk": {
aqi_state: 'AQI 即空氣質量指數,是根據環境空氣質量標準和各項污染物對人體健康、生態、環境的影響,將常規監測的幾種空氣污染物濃度簡化成為單一的概念性指數值。它將空氣污染程度和空氣質量狀況分級表示,適合於表示城市的短期空氣質量狀況和變化趨勢。參與空氣質量評價的主要污染物為PM2.5、PM10、二氧化硫(SO2)、二氧化氮(NO2)、臭氧(O3)、一氧化碳(CO)。\n\n當 AQI介於 0~50 時,基本無空氣污染,各類人群可正常活動。\n\n當 AQI介於 51~100 時,某些污染物可能對極少數異常敏感人群健康有較弱影響,建議極少數異常敏感人群應減少戶外活動。\n\n當 AQI介於 101~150 時,易感人群症狀有輕度加劇,健康人群出現刺激症狀。建議兒童、老年人及心髒病、呼吸系統疾病患者應減少長時間、高強度的戶外鍛煉。\n\n當 AQI介於 151 ~200 時,進一步加劇易感人群症狀,可能對健康人群心臟、呼吸系統有影響,建議疾病患者避免長時間、高強度的戶外鍛練,一般人群適量減少戶外運動。\n\n當AQI介於201~300 時,心髒病和肺病患者症狀顯著加劇,運動耐受力降低,健康人群普遍出現症狀,建議兒童、老年人和心髒病、肺病患者應停留在室內,停止戶外運動,一般人群減少戶外運動。\n\n當 AQI 高於 300 時。此時,健康人群運動耐受力降低,有明顯強烈症狀,提前出現某些疾病,建議兒童、老年人和病人應當留在室內,避免體力消耗,一般人群應避免戶外活動。\n',
pm25_state: 'PM2.5 即細顆粒物,是對空氣中直徑小於或等於2_5 微米的固體顆粒或液滴的總稱。這些顆粒物非常細小,可直接進入肺部。PM2.5 沉澱進肺泡後無法排除,會對呼吸系統和心血管系統造成傷害,可能引起支氣管炎、哮喘、冠心病等疾病。\n\n自然過程或人為排放都會產生PM2.5,但主要來源是後者。自然源包括土壤揚塵(含有氧化物礦物和其他成分)、海鹽、植物花粉、孢子、細菌等,自然界中的災害事件,如火山爆發、森林大火等也會產生大量的細顆粒物。人為源包括發電、冶金、化學等工業生產過程中對煤、石油等各種化石燃料的燃燒,機動車尾氣排放,秸稈垃圾的焚燒及揚塵等。在室內,二手煙是顆粒物最主要的來源,另外,烹飪時所產生的油煙也是室內PM2 _5 的來源之一。\n',
tvoc_state: 'tVOC 即總揮發性有機物,包含上千種化合物。室內人員增多,或進行烹飪、進餐、清潔、化妝等活動時, tVOC 讀數可能大幅升高,通常會在相關活動結束或通風後回落。當檢測儀附近有未密封的含酒精的物質或粘合劑、油漆時, tVOC 讀數也會顯著升高。室內tVOC 還可能來自建築和裝飾、家具、家用電器使用的材料。\n\n當tVOC 讀數高於 3mg/m³ 時,應避免在該環境下持續停留超過1 個月。可開窗或打開新風換氣設備通風、尋找並處理揮發源,以降低tVOC 濃度。\n\n不同工作原理或不同廠商出品的檢測設備的tVOC 檢測結果可能有較大差異。在不同環境下初始化的青萍空氣檢測儀的tVOC 讀數可能有較大差異。\n\n如要比較多台青萍空氣檢測儀的tVOC 讀數一致性,需在相同環境下同時重置它們的TVOC 傳感器,然後觀察。',
pm10_state: 'PM10 即可吸入顆粒物,是對空氣中直徑小於或等於 10 微米的固體顆粒或液滴的總稱。\n\nPM10 通常由機動車在非鋪裝路面上的行駛、材料的破碎碾磨處理等活動,以及被風揚起的塵土引發。\n\n人類鼻腔內的毛髮、分泌物和黏膜可過濾大多數直徑大於 10 微米的粉塵,而 PM10 能直達並沉積於肺部,參與血液循環。 PM10 易吸附有害物質,如重金屬、有毒微生物等,易導致呼吸系統病症,例如氣促、咳嗽等,並加重已有的呼吸系統疾病,損害肺部組織,對兒童和老年人的危害尤為明顯。\n',
o3_state: 'O3 即臭氧,地面的臭氧主要由機動車和工業排放的氧化氮(NOx)和揮發性有機物(VOCs)等物質經陽光照射發生化學反應而形成。陽光燦爛時,臭氧污染最為嚴重。\n\n當空氣中臭氧濃度為 %@ 時,可引起鼻腔和喉頭粘膜的刺激​​感;臭氧濃度在 %@ 時,可引起哮喘發作,導致上呼吸道疾病惡化,同時刺激眼睛,使視覺敏感度和視力降低。臭氧濃度在 %@ 以上時,可引起頭痛、胸痛、思維能力下降,嚴重時可導致肺氣腫和肺水腫。\n\n臭氧還能阻礙人體血液輸氧功能,造成組織缺氧,使甲狀腺功能受損、骨骼鈣化,還可引起潛在性的全身影響,如誘發淋巴細胞染色體畸變,損害某些酶的活性和產生溶血反應。臭氧對人體也有致畸性,母親孕期接觸臭氧可導致新生兒瞼裂狹小發生率增多。\n',
co_state: 'CO 即一氧化碳,是煤、石油等含碳物質不完全燃燒的產物。在冶金、化學、石墨電極製造以及家用煤氣或煤爐、汽車尾氣中均有一氧化碳存在。\n\n吸入一氧化碳對人體有很大的傷害。它會結合血紅蛋白生成碳氧血紅蛋白,這種蛋白不能提供氧氣給身體組織,進而造成血缺氧。當空氣中的一氧化碳濃度為 %@ 時,即可能導致高達 50%% 的人體血紅蛋白轉換為羰合血紅蛋白,進而導致昏迷或死亡。\n',
no2_state: 'NO2 即二氧化氮,是硝酸鹽氣溶膠的主要來源,構成 PM2.5 和在紫外線下臭氧的主要部分。人為釋放二氧化氮的主要來源是燃燒過程(供熱、發電以及機動車和船舶的發動機)。\n\n二氧化氮會損害呼吸道。吸入初期僅有輕微的眼及上呼吸道刺激症狀,如咽部不適、乾咳等。常在數小時至十幾小時或更長時間潛伏期後發生遲發性肺水腫、成人呼吸窘迫綜合徵,出現胸悶、呼吸窘迫、咳嗽、咯泡沫痰、紫紺等。可並發氣胸及縱隔氣腫。肺水腫消退後兩週左右可出現遲發性阻塞性細支氣管炎。\n',
so2_state: 'SO2 即二氧化硫,是一種無色氣體,帶有刺鼻的氣味。它源自礦物燃料(煤和石油)的燃燒以及對含有硫磺的礦物的冶煉。人為的二氧化硫主要來源是為取暖、發電和行駛機動車而燃燒含有硫磺的礦物燃料。\n\n二氧化硫可影響呼吸系統和肺功能,並刺激眼睛。它會引發呼吸道的炎症,導致咳嗽、粘液分泌、加重哮喘和慢性支氣管炎,並使人們更易患呼吸道感染。\n\n二氧化硫與水結合可形成硫酸,是酸雨的主要成分,是造成樹木死亡的原因之一。\n',
pollen_state: '花粉即從各種常見植物中飄出的花粉粒,直徑一般在 30~50 微米左右,它們在空氣中飄散時,極易被人體吸入呼吸道內。\n\n有花粉過敏史的人吸入這些花粉後,會產生過敏反應,造成流鼻涕或鼻塞、打噴嚏、眼睛的紅癢與溢淚、眼睛周圍腫脹,嚴重者還會誘發氣管炎、支氣管哮喘、肺心病(多發在夏秋季)。\n\n預防措施:\n\n• 在花粉季節出門要帶密度較高的口罩。\n• 花粉季節宜在早晨或晚上出門,通常中午前後是花粉濃度最高的時間。\n• 鼻腔局部塗抹花粉阻斷劑。\n',
ultraviolet_state: '紫外線指數是在某一天某個地點受到太陽紫外線(UV)輻射強度的國際計量標準。\n\n它的目的是用來保護人們免受紫外線的傷害。公共衛生組織建議人們在紫外線指數大於或等於3 級時要採取措施保護自己(例如,可以在皮膚上塗抹防曬霜和戴帽子等)。\n\n紫外線是光線的一種,過強的照射最直接的影響是皮膚逐漸變黑。長時間照射會加速皮膚衰老,人體皮膚衰老 90% 的原因源於紫外線。\n\n紫外線已被確定與許多疾病的產生有關,例如:皺紋、曬傷、白內障、皮膚癌、視覺損害與免疫系統的傷害。\n',
temp_hum_title: '溫濕度',
temp_hum_state_c: '人體感受到的溫度取決於多項因素,例如氣溫、熱輻射、相對濕度、風速、人體活動和健康狀況。著裝等。其中溫度和相對濕度是影響人體舒適度的兩個重要因素。\n\n冬季,溫度在 20℃~24℃、相對濕度在 30%~60% 時,人體感覺最為舒適;夏季,溫度在 23℃~26℃、相對濕度在 25%~60% 時,人體感覺最為舒適。\n',
temp_hum_state_f: '人體感受到的溫度取決於多項因素,例如氣溫、熱輻射、相對濕度、風速、人體活動和健康狀況。著裝等。其中溫度和相對濕度是影響人體舒適度的兩個重要因素。\n\n冬季,溫度在 68℉~75℉、相對濕度在 30%~60% 時,人體感覺最為舒適;夏季,溫度在 73℉~79℉、相對濕度在 25%~60% 時,人體感覺最為舒適。\n',
temp_hum_value: '溫度 tt,相對濕度 hh',
temp_hum_site: '體感舒適區',
temp_hum_humi: '相對濕度 %',
temp_hum_temp: '溫度 ',
co2_state: 'CO2 即二氧化碳,是空氣中常見的化合物,約佔大氣體積的0.04%(400 ppm)。\n\n二氧化碳通常是由燃燒有機化合物、細胞的呼吸作用、微生物的發酵作用等所產生、室內二氧化碳主要來自於人的呼吸。\n\n當室內二氧化碳高於1000 ppm 時,有些人可能會出現困倦的感覺。當高於2000 ppm 時,有些人可能會出現噁心和頭疼的症狀。當高於5000 ppm 時,請避免在該環境下停留超過8 小時。\n',
atmos_state: '氣壓(大氣壓力)會影響人體內氧氣的供應。當大氣壓力下降時,人體會加快呼吸及血液循環,可能引發呼吸急促、心率加快,嚴重時引發“高原反應”。另外,氣壓也可能引起人的心理變化,例如低氣壓下的雨雪天氣會使有些人感到壓抑和不適。\n\n通常,海拔越高,大氣壓力越低;天氣由晴轉陰時,大氣壓力降低,反之亦然。'
},
"en": {
aqi_state: 'AQI is the air quality index is based on the ambient air quality standards and the impact of various pollutants on human health, ecology and environment, and the concentration of several air pollutants that are routinely monitored is simplified into a single conceptual index value_ It grades air pollution levels and air quality conditions and is suitable for representing short-term air quality conditions and trends in cities. The main pollutants involved in air quality assessment are PM2.5, PM10, sulfur dioxide (SO2), nitrogen dioxide (NO2), ozone (O3), and carbon monoxide (CO).\n\nWhen the AQI is between 0 and 50, there is basically no air pollution, and all kinds of people can move normally.\n\nWhen AQI is between 51 and 100, some pollutants may have a weaker impact on the health of a very small number of abnormally sensitive people. It is recommended that a small number of abnormally sensitive people should reduce outdoor activities.\n\nWhen the AQI is between 101 and 150, the symptoms of the susceptible population are slightly aggravated, and the healthy people have irritation. It is recommended that children, the elderly and patients with heart disease and respiratory diseases should reduce long-term, high-intensity outdoor exercise.\n\nWhen the AQI is between 151 and 200, the symptoms of susceptible people are further aggravated, which may affect the heart and respiratory system of healthy people_ It is recommended that patients with diseases avoid long-term, high-intensity outdoor exercise, and the general population reduces outdoor sports.\n\nWhen AQI is between 201 and 300, the symptoms of patients with heart disease and lung disease are significantly increased, the exercise tolerance is reduced, and symptoms are common in healthy people. It is recommended that children, the elderly and patients with heart disease and lung disease should stay indoors and stop outdoor sports. The general population reduces outdoor sports.\n\nWhen AQI is higher than 300. At this time, the healthy people\'s exercise tolerance is reduced, there are obvious strong symptoms, some diseases appear in advance, it is recommended that children, the elderly and patients should stay indoors, avoid physical exertion, the general population should avoid outdoor activities.\n',
pm25_state: 'PM2.5 is the fine particulate matter in the air having a diameter less than or equal to 2.5 microns. These fine solid or liquid particles can directly get into lung, and cannot be eliminated from human body after depositing in the pulmonary alveoli, thus be harmful to respiratory and cardiovascular systems. Diseases like bronchitis, asthma or coronary might be triggered.\n\nPM2.5 is often generated from natural or man-made sources, especially the latter. Natural sources that can generate large amounts of fine particles are soil dust (containing oxide minerals or other elements), sea salt, plants pollen, spores, bacteria and some natural disasters like volcanic eruptions and forest fires. Man-made sources include the burning of coal, petroleum and other kinds of fossil fuels at the time of generating electricity, metallurgy and chemical industrial production, automotive exhaust emission, as well as the straw wastes burning and flying dust. Inhaled particles indoors mainly come from passive smoking. Besides, cooking oil fume is another source of indoor PM2.5.\n',
tvoc_state: 'tVOC refers to total volatile organic compounds, containing thousands of compounds. When the number of people in the room increases, or when cooking, eating, cleaning, makeup, etc., tVOC readings may increase significantly, and usually decrease after the activities ends or ventilations have been done. The tVOC reading also increases significantly when there is an unsealed, alcohol-containing substance or adhesive or paint near the device. Indoor tVOC may also originates from materials used in construction and decoration, furniture and household appliances.\n\nWhen tVOC is higher than 3mg/m³, it should be avoided to stay in the environment for more than 1 month.\n\nThe tVOC readings from different sensors or devices produced by different manufacturers may vary greatly. The tVOC readings of Qingping Air monitor devices initialized in different environments may vary considerably.\n\nTo compare the tVOC readings of multiple Qingping+ Monitor devices, please reset their tVOC sensors in the same time and same environment and then observe.',
pm10_state: 'PM10 is the respirable particulate matter in the air having a diameter less than or equal to 10 microns.\n\nPM10 is usually triggered by the driving of motors vehicle on a non-paved road, the crushing and grinding of materials, and the dust raised by the wind.\n\nHair, secretions, and mucous membranes in the human nasal cavity filter most dusts larger than 10 microns in diameter, while PM10 can travel directly to the lungs and participate in blood circulation. PM10 is easy to adsorb harmful substances, such as heavy metals and toxic microorganisms, which may lead to respiratory diseases such as shortness of breath and cough. It also aggravates existing respiratory diseases and damages lung tissues, especially for children and the elderly.\n',
o3_state: 'O3 is ozone, Ozone on the ground is mainly formed by chemical reactions of nitrogen oxides (NOx) and volatile organic compounds (VOCs) emitted by motor vehicles and industries through sunlight. When the sun is shining, ozone pollution is the most serious.\n\nWhen the concentration of ozone in the air is %@, it can cause irritation of the nasal cavity and throat mucosa; When the concentration is between %@, it can cause asthma attacks, leading to the deterioration of upper respiratory tract diseases, while irritating the eyes, reducing visual sensitivity and vision; when the concentration is above %@, it can cause headache, chest pain, decreased thinking ability, and severe emphysema and pulmonary edema.\n\nOzone can also block the blood oxygenation function of the human body, causing tissue hypoxia, impaired thyroid function, bone calcification, and potential systemic effects, such as inducing chromosomal aberrations in lymphocytes, impairing the activity of certain enzymes and producing hemolysis reactions. Ozone is also teratogenic to the human body. Exposure to ozone during pregnancy can lead to an increased incidence of cleft palate in newborns.\n',
co_state: 'CO is carbon monoxide, it is a product of incomplete combustion of carbonaceous materials such as coal and petroleum. It is present in metallurgical, chemical, graphite electrode manufacturing, as well as domestic gas or coal stoves, and automobile exhaust.\n\nInhalation of carbon monoxide is very harmful to the human body. It combines hemoglobin to produce carboxyhemoglobin, a protein that does not provide oxygen to the body\'s tissues, which in turn causes oxygen deficiency. When the concentration of carbon monoxide in the air is {0}, it may cause up to 50% of human hemoglobin to be converted to carbonylhemoglobin, which may lead to coma or death.\n',
no2_state: 'NO2 is nitrogen dioxide, it is the main source of nitrate aerosols that make up PM2.5 and the main part of ozone under UV light. The main source of artificial release of nitrogen dioxide is the combustion process (heating, power generation, and engines for motor vehicles and ships).\n\nNitrogen dioxide can damage the respiratory tract, in the initial stage of inhalation, there are only mild eye and upper respiratory tract irritation, such as pharyngeal discomfort and dry cough. Frequent pulmonary edema, adult respiratory distress syndrome, chest distress, respiratory distress, cough, sputum foam, purpura, etc. may occur after hours to ten hours or longer incubation period, and may be complicated by pneumothorax and mediastinal emphysema. Delayed obstructive bronchiolitis can occur about two weeks after the pulmonary edema subsides.\n',
so2_state: 'SO2 is sulfur dioxide, it is a colorless gas with a pungent smell. It is derived from the burning of fossil fuels (coal and petroleum) and the smelting of minerals containing sulfur. The main source of man-made sulfur dioxide is the burning of fossil-containing fossil fuels for heating, generating electricity and driving vehicles.\n\nSulfur dioxide can affect the respiratory system and lung function and irritate the eyes. It causes inflammation of the respiratory tract, causing coughing, mucus secretion, aggravation of asthma and chronic bronchitis, and making people more susceptible to respiratory infections.\n\nSulfur dioxide combines with water to form sulfuric acid, which is the main component of acid rain and is one of the causes of tree death.\n',
pollen_state: 'Pollen is a pollen grain that floats from various common plants and is generally 30 to 50 microns in diameter. When they are dispersed in the air, they are easily inhaled into the respiratory tract.\n\nInhalation of these pollen by people with a history of pollen allergy can cause allergic reactions, causing runny nose or stuffy nose, sneezing, red itching and tearing of the eyes, swelling around the eyes, and severe bronchitis, bronchial asthma, and pulmonary heart disease. (Multiple in summer and autumn).\n\nPrecaution:\n\n• Go out with a higher density mask during the pollen season.\n• During the pollen season, it is advisable to go out in the morning or evening, usually around noon, with the highest concentration of pollen.\n• Topically apply a pollen blocker to the nasal cavity.\n',
ultraviolet_state: 'The UV Index is an international measure of the intensity of solar ultraviolet (UV) radiation at a location on a given day.\n\nIts purpose is to protect people from UV rays. Public health organizations recommend that people take measures to protect themselves when the UV index is greater than or equal to 3 (for example, sunscreen and hats can be applied).\n\nUltraviolet light is a kind of light, and the most direct effect of excessive light is that the skin gradually turns black. Long-term exposure accelerates skin aging, and 90% of human skin aging is caused by ultraviolet light.\n\nUltraviolet light has been identified to be associated with many diseases; for example: wrinkles, sunburn, cataracts, skin cancer, visual impairment, and damage to the immune system.\n',
temp_hum_title: 'Temperature and Humidity',
temp_hum_state_c: 'The temperature that a human body perceives depends on many factors such as air temperature, thermal radiation, relative humidity, wind velocity, physical activity and condition, or even the clothes dressed. Temperature and RH are two important factors that determine whether human body feels comfortable.\n\nIn winter, human body feels the most comfortable when temperature is between 20℃~24℃ while RH is between 30%~60%; in summer, the range is 23℃~26℃ and 25%~60% respectively.\n',
temp_hum_state_f: 'The temperature that a human body perceives depends on many factors such as air temperature, thermal radiation, relative humidity, wind velocity, physical activity and condition, or even the clothes dressed. Temperature and RH are two important factors that determine whether human body feels comfortable.\n\nIn winter, human body feels the most comfortable when temperature is between 68℉~75℉ while RH is between 30%~60%; in summer, the range is 73℉~79℉and 25%~60% respectively.\n',
temp_hum_value: 'Temperature tt, Humidity hh',
temp_hum_site: 'Somatosensory Comfort Zone',
temp_hum_humi: 'Humidity %',
temp_hum_temp: 'Temp ',
co2_state: 'CO2 (Carbon Dioxide) is a common compound existing in the air, accounting for about 0.04% (400 ppm) of earth’s atmosphere volume.\n\nCO2 is usually generated during the process of organic compounds burning, cell respiration, and microbial fermentation. Human breath is the main cause for indoor CO2.\n\nWhen the indoor CO2 content is above 1000 ppm, some people may feel sleepy. Some may have symptoms like nausea or headache when the content is above 2000 ppm. If it exceeds 5000 ppm, please do not stay in such environment for more than 8 hours.\n',
atmos_state: 'Barometric pressure (atmospheric pressure) can affect the supply of oxygen in human bodies. When the atmospheric pressure drops, the human body will accelerate the breathing and blood circulation, which may cause shortness of breath, increase the heart rate, and cause "altitude sickness" in severe cases. In addition, changes in atmospheric pressure can also cause psychological changes in people, such as low pressure during rain and snow, which can make some people feel depressed and uncomfortable.\n\nGenerally, the higher the altitude, the lower the atmospheric pressure. When the weather turns from sunny to cloudy, the atmospheric pressure decreases, and vice versa.'
}
});
exports.DataTypeStateString = DataTypeStateString;
},10013,[10230]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
var _miot = _$$_REQUIRE(_dependencyMap[0]);
var MHGlobal = {};
MHGlobal.deviceName = _miot.Device.name;
MHGlobal.statusBarHeight = MHGlobal.isX ? 44 : 20;
MHGlobal.contentMarginTop = MHGlobal.isX ? 88 : 64;
MHGlobal.licensePolicy = {
'license_en': _$$_REQUIRE(_dependencyMap[1]),
'license_zh': _$$_REQUIRE(_dependencyMap[2]),
'policy_en': _$$_REQUIRE(_dependencyMap[3]),
'policy_zh': _$$_REQUIRE(_dependencyMap[4])
};
module.exports = MHGlobal;
},10016,[10074,10019,10022,10025,10028]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
module.exports = _$$_REQUIRE(_dependencyMap[0]).registerAsset({
"__packager_asset": true,
"httpServerLocation": "/assets/projects/com.cleargrass.snow.mi/Resources/html/license_policy/en",
"scales": [1],
"hash": "f4c216c53bd87a8f0bf79678dcde5979",
"name": "license",
"type": "html"
});
},10019,[10420]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
module.exports = _$$_REQUIRE(_dependencyMap[0]).registerAsset({
"__packager_asset": true,
"httpServerLocation": "/assets/projects/com.cleargrass.snow.mi/Resources/html/license_policy/zh-Hans",
"scales": [1],
"hash": "00742ed6ce486a392574607a23a4a488",
"name": "license",
"type": "html"
});
},10022,[10420]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
module.exports = _$$_REQUIRE(_dependencyMap[0]).registerAsset({
"__packager_asset": true,
"httpServerLocation": "/assets/projects/com.cleargrass.snow.mi/Resources/html/license_policy/en",
"scales": [1],
"hash": "690c7a6ffb9c13fc1b4ad42c0213d181",
"name": "privacy",
"type": "html"
});
},10025,[10420]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
module.exports = _$$_REQUIRE(_dependencyMap[0]).registerAsset({
"__packager_asset": true,
"httpServerLocation": "/assets/projects/com.cleargrass.snow.mi/Resources/html/license_policy/zh-Hans",
"scales": [1],
"hash": "02de052855a46dae46255a5dad59206d",
"name": "privacy",
"type": "html"
});
},10028,[10420]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
module.exports = _$$_REQUIRE(_dependencyMap[0]).registerAsset({
"__packager_asset": true,
"httpServerLocation": "/assets/projects/com.cleargrass.snow.mi/Resources",
"width": 22,
"height": 41,
"scales": [1],
"hash": "2a12f112e01f0379378b28ee14a04959",
"name": "sub_arrow",
"type": "png"
});
},10031,[10420]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
var _interopRequireDefault = _$$_REQUIRE(_dependencyMap[0]);
var _classCallCheck2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[1]));
var _createClass2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[2]));
var _miot = _$$_REQUIRE(_dependencyMap[3]);
var _MHLocalizableString = _$$_REQUIRE(_dependencyMap[4]);
var Util = function () {
function Util() {
(0, _classCallCheck2.default)(this, Util);
}
(0, _createClass2.default)(Util, null, [{
key: "getToday",
value: function getToday() {
var date = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : new Date();
date.setHours(0);
date.setMinutes(0);
date.setSeconds(0);
date.setMilliseconds(0);
return date;
}
}, {
key: "handleSensorData",
value: function handleSensorData(data) {
var _this = this;
var allProps = ['pm25', 'tvoc', 'co2', 'temperature', 'humidity', 'aqi'];
var d = allProps.map(function (item) {
var desc = _this.handleState(item, data[item], data[item + '_unit'], data[item + '_state']);
if (item == 'temperature' || item == 'tvoc') {
return {
name: item,
value: desc.value,
unit: _this.handleUnit(item, data[item + '_unit']),
level: desc.level,
desc: desc.text
};
} else {
return {
name: item,
value: desc.value,
level: desc.level,
desc: desc.text
};
}
});
return d;
}
}, {
key: "handleUnit",
value: function handleUnit(key, unit) {
if (key == 'tvoc') {
return unit ? unit : 'mg_m3';
}
if (key == 'temperature') {
return unit ? unit : 'c';
}
}
}, {
key: "handleToFixed",
value: function handleToFixed(key, value) {
if (value) {
if (key == 'pm25') {
return Number(value).toFixed(1);
} else if (key == 'tvoc') {
return Number(value).toFixed(3);
} else if (key == 'temperature' || key == 'humidity') {
return Number(value).toFixed(1);
} else {
return Number(value);
}
}
}
}, {
key: "handleState",
value: function handleState(key, value, unit, state) {
var desc;
if (state == 'abnormal') {
desc = {
level: 'color7',
text: _MHLocalizableString.MainLocalizableString[state],
value: '--'
};
} else if (state == 'initing' || state == 'preparing') {
if (value != 99999) {
if (key == 'tvoc' || !value) {
desc = {
level: 'color7',
text: _MHLocalizableString.MainLocalizableString[state],
value: this.UnitSetValue(key, value, unit, state)
};
} else {
desc = {
level: this.getLevelDesc(key, value, unit, state).level,
text: this.getLevelDesc(key, value, unit, state).text,
value: this.UnitSetValue(key, value, unit, state)
};
}
} else {
desc = {
level: 'color7',
text: _MHLocalizableString.MainLocalizableString[state],
value: '--'
};
}
} else {
if (value) {
if (value == 99999) {
desc = {
level: 'color7',
text: _MHLocalizableString.MainLocalizableString.abnormal,
value: '--'
};
} else {
desc = this.getLevelDesc(key, value, unit, state);
desc.value = this.UnitSetValue(key, value, unit, state);
}
} else {
desc = {
level: 'color7',
text: '',
value: '--'
};
}
}
return desc;
}
}, {
key: "getLevelDesc",
value: function getLevelDesc(key, value, unit, state) {
if (key === 'pm25') {
return this.pm25LevelDesc(value);
} else if (key === 'tvoc') {
return this.tvocLevelDesc(value, unit, state);
} else if (key === 'temperature') {
return this.tempLevelDesc(value, unit);
} else if (key === 'co2') {
return this.co2LevelDesc(value);
} else {
return this.humLevelDesc(value);
}
}
}, {
key: "pm25LevelDesc",
value: function pm25LevelDesc(n) {
var desc = null;
switch (true) {
case n <= 35:
desc = {
level: 'color1',
text: _MHLocalizableString.MainLocalizableString.good
};
break;
case n <= 75:
desc = {
level: 'color2',
text: _MHLocalizableString.MainLocalizableString.soso
};
break;
case n <= 115:
desc = {
level: 'color3',
text: _MHLocalizableString.MainLocalizableString.light
};
break;
case n <= 150:
desc = {
level: 'color4',
text: _MHLocalizableString.MainLocalizableString.meduim
};
case n <= 250:
desc = {
level: 'color5',
text: _MHLocalizableString.MainLocalizableString.serious
};
break;
case n > 250:
desc = {
level: 'color6',
text: _MHLocalizableString.MainLocalizableString.xserious
};
break;
default:
desc = {
level: 'color7',
text: ''
};
}
return desc;
}
}, {
key: "tvocLevelDesc",
value: function tvocLevelDesc(n, unit, state) {
var desc = {};
switch (true) {
case n <= 65:
desc = {
level: 'color1',
text: _MHLocalizableString.MainLocalizableString.good
};
break;
case n <= 220:
desc = {
level: 'color1',
text: _MHLocalizableString.MainLocalizableString.soso
};
break;
case n <= 660:
desc = {
level: 'color2',
text: _MHLocalizableString.MainLocalizableString.light_high_density
};
break;
case n <= 2200:
desc = {
level: 'color4',
text: _MHLocalizableString.MainLocalizableString.serious_high_density
};
break;
case n > 2200:
desc = {
level: 'color6',
text: _MHLocalizableString.MainLocalizableString.xserious_high_density
};
break;
default:
desc = {
level: 'color7',
text: ''
};
}
if (state == 'exposing') {
desc.text = _MHLocalizableString.MainLocalizableString[state];
}
return desc;
}
}, {
key: "tempLevelDesc",
value: function tempLevelDesc(n, unit) {
var desc = {};
switch (true) {
case n <= 20:
desc = {
level: 'color0',
text: _MHLocalizableString.MainLocalizableString.low
};
break;
case n <= 23:
desc = {
level: 'color0',
text: _MHLocalizableString.MainLocalizableString.bit_low
};
break;
case n <= 26.5:
desc = {
level: 'color1',
text: _MHLocalizableString.MainLocalizableString.suit
};
break;
case n <= 28:
desc = {
level: 'color2',
text: _MHLocalizableString.MainLocalizableString.bit_high
};
break;
case n > 28:
desc = {
level: 'color3',
text: _MHLocalizableString.MainLocalizableString.high
};
break;
default:
desc = {
level: 'color7',
text: ''
};
}
return desc;
}
}, {
key: "co2LevelDesc",
value: function co2LevelDesc(n) {
var desc = {};
switch (true) {
case n <= 1000:
desc = {
level: 'color1',
text: _MHLocalizableString.MainLocalizableString.normal
};
break;
case n <= 2000:
desc = {
level: 'color1',
text: _MHLocalizableString.MainLocalizableString.light_high_density
};
break;
case n <= 3000:
desc = {
level: 'color4',
text: _MHLocalizableString.MainLocalizableString.serious_high_density
};
break;
case n > 3000:
desc = {
level: 'color6',
text: _MHLocalizableString.MainLocalizableString.xserious_high_density
};
break;
default:
desc = {
level: 'color7',
text: ''
};
}
return desc;
}
}, {
key: "humLevelDesc",
value: function humLevelDesc(n) {
var desc = {};
switch (true) {
case n <= 20:
desc = {
level: 'color3',
text: _MHLocalizableString.MainLocalizableString.xdry
};
break;
case n <= 40:
desc = {
level: 'color2',
text: _MHLocalizableString.MainLocalizableString.dry
};
break;
case n <= 60:
desc = {
level: 'color1',
text: _MHLocalizableString.MainLocalizableString.suit
};
break;
case n <= 85:
desc = {
level: 'color0',
text: _MHLocalizableString.MainLocalizableString.moist
};
break;
case n > 85:
desc = {
level: 'color0',
text: _MHLocalizableString.MainLocalizableString.xmoist
};
break;
default:
desc = {
level: 'color7',
text: ''
};
}
return desc;
}
}, {
key: "UnitSetValue",
value: function UnitSetValue(type, value, unit, state) {
var v = 0;
if (value) {
if (unit === 'f' || unit === 'c') {
value = value > 42 ? 42 : value;
v = value.toFixed(1);
} else {
if (unit === 'mg_m3') {
v = Number(value).toFixed(0);
} else if (unit === 'ppm') {
v = Number(value).toFixed(0);
} else if (unit === 'ppb') {
v = Number(value).toFixed(0);
} else if (type === 'co2') {
return value.toFixed(0);
} else {
v = Number(value).toFixed(1);
}
}
}
return v;
}
}, {
key: "getLastTime",
value: function getLastTime(updateTime) {
var nowDate = new Date();
var lastDate = new Date(updateTime * 1000);
var diffTime = function diffTime() {
var time = nowDate / 1000 - updateTime;
if (time < 60) {
return _MHLocalizableString.MainLocalizableString.now;
} else if (time <= 3600) {
return parseInt(time / 60) + _MHLocalizableString.MainLocalizableString.minAgo;
} else if (time <= 216000) {
return parseInt(time / 3600) + _MHLocalizableString.MainLocalizableString.hourAgo;
} else {
return lastDate.getMonth() + 1 + '/' + lastDate.getDate() + ' ' + lastDate.getMinutes() + ':' + lastDate.getSeconds();
}
};
return diffTime();
}
}, {
key: "handleObj",
value: function handleObj(targetObj, curObj) {
!targetObj ? targetObj = {} : '';
for (Key in curObj) {
targetObj[Key] = curObj[Key];
}
return targetObj;
}
}, {
key: "DateHHMM",
value: function DateHHMM(date) {
var hh = date.getHours();
if (hh == 0) hh = "00";else if (hh < 10) hh = "0" + hh;
var mm = date.getMinutes();
if (mm == 0) mm = "00";else if (mm < 10) mm = "0" + mm;
return hh + ":" + mm;
}
}, {
key: "DateMMMDD",
value: function DateMMMDD(date) {
var day = date.getDate();
var month = _MHLocalizableString.MainLocalizableString.mm ? _MHLocalizableString.MainLocalizableString.mm[date.getMonth()] : date.getMonth() + 1;
var timeString = _MHLocalizableString.MainLocalizableString.formatString(_MHLocalizableString.MainLocalizableString.mmmdd, month, day);
return timeString;
}
}, {
key: "DateMMMDDHHMM",
value: function DateMMMDDHHMM(date) {
var d = date ? date : new Date();
return _MHLocalizableString.MainLocalizableString.formatString(_MHLocalizableString.MainLocalizableString.share_date_time_format, this.DateMMMDD(d), this.DateHHMM(d));
}
}]);
return Util;
}();
module.exports = Util;
},10034,[14305,14320,14323,10074,10013]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var _interopRequireDefault = _$$_REQUIRE(_dependencyMap[0]);
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = undefined;
var _extends2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[1]));
var _toConsumableArray2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[2]));
var _classCallCheck2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[3]));
var _createClass2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[4]));
var _possibleConstructorReturn2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[5]));
var _getPrototypeOf2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[6]));
var _inherits2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[7]));
var _react = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[8]));
var _reactNative = _$$_REQUIRE(_dependencyMap[9]);
var _shareTop = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[10]));
var _util = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[11]));
var _historyUtil = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[12]));
var _MHGlobalData = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[13]));
var _MHLocalizableString = _$$_REQUIRE(_dependencyMap[14]);
var _DetailedIndexItemView = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[15]));
var _CombinedChart = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[16]));
var _DataStandard = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[17]));
var _miot = _$$_REQUIRE(_dependencyMap[18]);
var window = _reactNative.Dimensions.get('window');
var STATUSBAR_HEIGHT = _MHGlobalData.default.statusBarHeight;
var displayedChartTypes = ['pm25', 'temperature', 'humidity', 'co2', 'tvoc'];
var tempHourlyHistoryData = [];
var tempDailyHistoryData = [];
var count = 1;
var airQuality = function (_React$Component) {
(0, _inherits2.default)(airQuality, _React$Component);
function airQuality(props) {
var _this;
(0, _classCallCheck2.default)(this, airQuality);
_this = (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(airQuality).call(this, props));
var charts = [];
for (var _i = 0, _displayedChartTypes = displayedChartTypes; _i < _displayedChartTypes.length; _i++) {
var dataType = _displayedChartTypes[_i];
charts.push({
dataType: dataType,
daily: [],
hourly: []
});
}
_this.state = {
charts: charts,
keysOfSensors: ['pm25', 'tvoc', 'co2', 'temperature', 'humidity'],
pm25Tag: 0,
tvocTag: 0,
co2eTag: 0,
temperatureTag: 0,
humidityTag: 0,
hourlyHistoryData: [],
dailyHistoryData: []
};
return _this;
}
(0, _createClass2.default)(airQuality, [{
key: "componentDidMount",
value: function componentDidMount() {
var _this2 = this;
this.getStorageData();
this.getAllHistoryData();
setTimeout(function () {
_this2.forceUpdate(function () {});
}, 30000);
}
}, {
key: "componentWillUnmount",
value: function componentWillUnmount() {
var data = this.props.data;
_miot.Host.storage.set('lastData', data);
}
}, {
key: "getStorageData",
value: function getStorageData() {
var _this3 = this;
_miot.Host.storage.get('historyData').then(function (res) {
if (res.tempDailyHistoryData && res.tempHourlyHistoryData) {
_this3.receiveDailyAndHourly(res.tempHourlyHistoryData, res.tempDailyHistoryData);
}
});
}
}, {
key: "getAllHistoryData",
value: function getAllHistoryData() {
var _this4 = this;
var keys = this.state.keysOfSensors;
var _loop = function _loop(i) {
keys.forEach(function (item) {
_this4.requestHistoryData(item, i);
});
};
for (var i = 0; i < 2; i++) {
_loop(i);
}
}
}, {
key: "requestHistoryData",
value: function requestHistoryData(key, tag) {
var _this5 = this;
var data;
var reqKey;
var btnTag = ['data', 'daily'];
var limit = [96, 31];
var today = _util.default.getToday();
var oneDay = 86400;
var toTime = today.getTime() / 1000 + oneDay;
var fromTime = today.setDate(today.getDate() - 31) / 1000;
if (key == 'temperature') {
reqKey = 'temp';
} else if (key == 'humidity') {
reqKey = 'humi';
} else {
reqKey = key;
}
var param = {
did: _miot.Device.deviceID,
uid: _miot.Service.account.ID,
type: 'store',
key: reqKey + "_" + btnTag[tag],
time_start: fromTime,
time_end: toTime,
limit: limit[tag]
};
_miot.Service.smarthome.getDeviceData(param).then(function (res) {
count++;
data = _historyUtil.default.handleData(res, key, tag);
if (tag == 0) {
tempHourlyHistoryData.push.apply(tempHourlyHistoryData, (0, _toConsumableArray2.default)(data));
} else if (tag == 1) {
tempDailyHistoryData.push.apply(tempDailyHistoryData, (0, _toConsumableArray2.default)(data));
}
if (count == 10) {
setTimeout(function (_) {
_miot.Host.storage.set('historyData', {
tempDailyHistoryData: tempDailyHistoryData,
tempHourlyHistoryData: tempHourlyHistoryData
});
_this5.receiveDailyAndHourly(tempHourlyHistoryData, tempDailyHistoryData);
}, 100);
}
});
}
}, {
key: "receiveDailyAndHourly",
value: function receiveDailyAndHourly(hourlyData, dailyData) {
var charts = _DataStandard.default.buildDailyAndHourlyCharts(dailyData, hourlyData, {});
this.updateCharts(charts);
}
}, {
key: "updateCharts",
value: function updateCharts(charts) {
if (charts.length > 0) {
charts.sort(function (a, b) {
return displayedChartTypes.indexOf(a.dataType) - displayedChartTypes.indexOf(b.dataType);
});
this.setState({
charts: charts
});
}
}
}, {
key: "render",
value: function render() {
return _react.default.createElement(_reactNative.View, {
style: styles.container
}, this.renderDeviceData(), this.renderAdvices(), this.renderCharts());
}
}, {
key: "renderCharts",
value: function renderCharts() {
var _this6 = this;
var width = window.width;
return this.state.charts.map(function (chart, index) {
return _react.default.createElement(_reactNative.View, {
key: index,
style: {
marginBottom: index === _this6.state.charts.length - 1 ? 40 : 0
}
}, _react.default.createElement(_reactNative.View, {
style: styles.contentSeparator
}), _react.default.createElement(_CombinedChart.default, (0, _extends2.default)({
style: {
width: width
}
}, chart, {
navigation: _this6.props.navigation
})));
});
}
}, {
key: "renderAdvices",
value: function renderAdvices() {
var data = this.props.data;
if (data && !(data.tvoc && data.pm25 && data.temperature && data.humidity && data.co2)) {
return null;
}
var advices = _DataStandard.default.buildAdvice(data);
if (advices.length === 0) {
return null;
}
return _react.default.createElement(_reactNative.View, null, _react.default.createElement(_reactNative.View, {
style: styles.contentSeparator
}), _react.default.createElement(_reactNative.View, null, _react.default.createElement(_reactNative.Text, {
style: styles.adviceTitle
}, _MHLocalizableString.MainLocalizableString.evalute_item1)), _react.default.createElement(_reactNative.View, {
style: styles.advicesContainer
}, advices.map(function (advice, idx) {
return _react.default.createElement(_reactNative.View, {
style: [styles.adviceRow, {
marginRight: 20
}],
key: idx
}, _react.default.createElement(_reactNative.Image, {
source: advice.icon,
style: styles.adviceIcon
}), _react.default.createElement(_reactNative.Text, {
style: styles.adviceText
}, advice.text));
})));
}
}, {
key: "deviceDataKeys",
value: function deviceDataKeys() {
return ['pm25', 'space', 'tvoc', 'temperature', 'co2', 'humidity'];
}
}, {
key: "renderDeviceData",
value: function renderDeviceData() {
var _this7 = this;
var originalData = this.props.data;
var deviceData = _util.default.handleSensorData(originalData);
var dataItemGroups = _DataStandard.default.toDetailGroupsWithKeys(deviceData, this.deviceDataKeys(), 2, 'title2_');
return _react.default.createElement(_reactNative.View, null, _react.default.createElement(_reactNative.View, {
style: styles.contentBoxNoTopPadding
}, dataItemGroups.map(function (groupItems, groupIdx) {
return _react.default.createElement(_reactNative.View, {
style: styles.groupRow,
key: groupIdx
}, groupItems.map(function (item, idx) {
if (item && item.value === '--') {
item.degree = '';
}
if (!item) {
return _react.default.createElement(_reactNative.View, {
style: styles.indexItem,
key: idx
});
}
return _react.default.createElement(_DetailedIndexItemView.default, {
style: styles.indexItem,
navigation: _this7.props.navigation,
indexItem: item,
key: idx,
clickable: true
});
}));
})));
}
}]);
return airQuality;
}(_react.default.Component);
var styles = _reactNative.StyleSheet.create({
contentSeparator: {
height: 5,
backgroundColor: '#383838',
marginTop: 20
},
contentBoxNoTopPadding: {
paddingHorizontal: 20
},
groupRow: {
flexDirection: 'row',
justifyContent: 'space-between',
marginTop: 20
},
indexItem: {
width: 158
},
advicesContainer: {
marginTop: 5,
marginLeft: 20
},
adviceRow: {
flexDirection: 'row',
alignItems: 'center',
marginTop: 5
},
adviceText: {
color: '#ffffff',
fontSize: 13,
flex: 1
},
adviceTitle: {
color: '#ffffff80',
fontSize: 13,
marginTop: 15,
marginLeft: 20
},
adviceIcon: {
width: 28,
height: 28,
marginRight: 10,
resizeMode: 'contain'
},
container: {
flex: 1,
width: window.width
},
shareTop: {
position: 'absolute',
top: 0,
width: window.width
},
item: {
width: window.width - 30,
height: 100,
backgroundColor: 'rgba(255, 255, 255, .05)',
padding: 15,
marginBottom: 15,
borderRadius: 12
},
name: {
fontSize: 12,
color: '#ffffff'
},
valueUnit: {
flexDirection: 'row',
justifyContent: 'space-between'
},
unit: {
alignSelf: 'center',
position: 'relative',
left: 0,
fontSize: 12,
color: 'rgba(255, 255, 255, .5)'
},
value: {
position: 'relative',
right: 0,
fontSize: 28,
color: '#ffffff',
width: 100,
textAlign: 'right'
},
desc: {
marginTop: 10,
fontSize: 13,
color: 'rgba(255, 255, 255, .5)'
},
level: {
width: window.width - 60,
height: 2
},
color0: {
backgroundColor: '#00E5FF'
},
color1: {
backgroundColor: '#00E400'
},
color2: {
backgroundColor: '#FFD600'
},
color3: {
backgroundColor: '#FF7E00'
},
color4: {
backgroundColor: '#FF0000'
},
color5: {
backgroundColor: '#CC0065'
},
color6: {
backgroundColor: '#7E0023'
},
color7: {
backgroundColor: 'rgba(255, 255, 255, 0.5)'
},
noValue: {
opacity: 0.5
}
});
var _default = airQuality;
exports.default = _default;
},10037,[14305,14344,14359,14320,14323,14371,14377,14386,10297,10033,10040,10034,10043,10016,10013,10046,10049,10064,10074]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var _interopRequireDefault = _$$_REQUIRE(_dependencyMap[0]);
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = undefined;
var _classCallCheck2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[1]));
var _createClass2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[2]));
var _possibleConstructorReturn2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[3]));
var _getPrototypeOf2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[4]));
var _inherits2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[5]));
var _react = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[6]));
var _reactNative = _$$_REQUIRE(_dependencyMap[7]);
var _MHLocalizableString = _$$_REQUIRE(_dependencyMap[8]);
var _MHGlobalData = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[9]));
var _util = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[10]));
var _miot = _$$_REQUIRE(_dependencyMap[11]);
var window = _reactNative.Dimensions.get('window');
var STATUSBAR_HEIGHT = _MHGlobalData.default.statusBarHeight;
var APPBAR_HEIGHT = _reactNative.Platform.OS === 'ios' ? 44 : 56;
var APPBAR_MARGINTOP = 20;
var topHeight = 0;
var bangsScreen = ["iPhone10,3", "iPhone10,6", "iPhone11,8", "iPhone11,2", "iPhone11,4", "iPhone11,6"];
var shareTop = function (_React$Component) {
(0, _inherits2.default)(shareTop, _React$Component);
function shareTop() {
(0, _classCallCheck2.default)(this, shareTop);
return (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(shareTop).apply(this, arguments));
}
(0, _createClass2.default)(shareTop, [{
key: "render",
value: function render() {
return _react.default.createElement(_reactNative.View, null, this.props.data.pm25_timestamp && this.props.isShare ? _react.default.createElement(_reactNative.View, {
style: [titleStyles.navBarContainer, titleStyles.navBarShare, {
backgroundColor: '#00000000'
}]
}, _react.default.createElement(_reactNative.Text, {
style: [titleStyles.navBarText, titleStyles.navBarTitleText],
numberOfLines: 1
}, _miot.Device.name), _react.default.createElement(_reactNative.View, {
style: {
flexDirection: "row",
alignItems: "center"
}
}, _react.default.createElement(_reactNative.Text, {
key: "share_date",
style: [titleStyles.navBarText, titleStyles.navBarSubTitleText, {
fontSize: 13.88
}]
}, _MHLocalizableString.MainLocalizableString.formatString(_MHLocalizableString.MainLocalizableString.detecting_time, _util.default.DateMMMDDHHMM(this.props.data.pm25_timestamp))))) : null);
}
}]);
return shareTop;
}(_react.default.Component);
var titleStyles = _reactNative.StyleSheet.create({
navBarContainer: {
flexDirection: 'column',
height: APPBAR_HEIGHT,
alignItems: "center",
justifyContent: "center"
},
navBarShare: {
position: "absolute",
top: 0,
left: 0,
right: 0
},
navBarText: {
fontSize: 16,
color: '#ffffff',
textAlign: "center"
},
navBarTitleText: {
marginTop: 0,
fontWeight: '500',
fontSize: 14.58,
alignSelf: "stretch",
marginHorizontal: 97
},
navBarSubTitleText: {
fontWeight: '500',
fontSize: 12.5
}
});
var _default = shareTop;
exports.default = _default;
},10040,[14305,14320,14323,14371,14377,14386,10297,10033,10013,10016,10034,10074]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
var _interopRequireDefault = _$$_REQUIRE(_dependencyMap[0]);
var _classCallCheck2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[1]));
var _createClass2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[2]));
var _util = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[3]));
var historyUtil = function () {
function historyUtil() {
(0, _classCallCheck2.default)(this, historyUtil);
}
(0, _createClass2.default)(historyUtil, null, [{
key: "makeDayTimes",
value: function makeDayTimes(length, gap) {
var today = _util.default.getToday();
var arr = historyUtil.makeArray(length).map(function (v, i) {
var day = new Date(today.getTime());
day.setDate(today.getDate() - i * (gap ? gap : 1));
return day;
});
return arr;
}
}, {
key: "makeArray",
value: function makeArray(length, fillWithUndefined) {
var arr = [];
if (fillWithUndefined) {
return new Array(length);
} else {
for (var i = 0; i < length; i++) {
arr.push(i);
}
return arr;
}
}
}, {
key: "handleData",
value: function handleData(data, key, tag) {
var newData = data.map(function (item) {
var d = JSON.parse(item.value);
if (tag) {
return {
type: key,
max: d[2],
min: d[3],
timestamp: d[1]
};
} else {
return {
type: key,
value: d[2],
timestamp: d[1]
};
}
});
return newData;
}
}, {
key: "handleToFixed",
value: function handleToFixed(key, value, unit) {
if (value) {
if (key == 'pm25') {
return Number(value).toFixed(1);
} else if (key == 'tvoc') {
if (value == 99999) {
return value;
} else {
return Number(value).toFixed(3);
}
} else if (key == 'temperature' || key == 'humidity') {
return Number(value).toFixed(1);
} else {
return Number(value);
}
} else {
if (key == 'tvoc') {
if (unit == 'ppd') {
return 0;
} else {
return Number(value).toFixed(3);
}
}
}
}
}, {
key: "_prepareDiffData",
value: function _prepareDiffData(dataRowsFromDb, key) {
if (!dataRowsFromDb || dataRowsFromDb.length == 0) return [];
var that = this;
var days = that.daysOfDiff;
var oneDayLong = 86400000;
var only = dataRowsFromDb;
var diffData = only.reduce(function (timeBaseAll, v) {
if (v && v.timestamp) {
var time = v.timestamp;
var date = new Date(time * 1000);
var hour = date.getHours();
var today = date.getDate();
var value = v.data[0];
if (timeBaseAll.hasOwnProperty(hour)) {
timeBaseAll[hour].data[today] = value;
} else {
var data = {};
data[today] = value;
timeBaseAll[hour] = {
timestamp: hour,
data: data
};
}
if (hour == 0) {
var xhour = 24;
var xday = today - 1;
if (timeBaseAll.hasOwnProperty(xhour)) {
timeBaseAll[xhour].data[xday] = value;
} else {
var data = {};
data[xday] = value;
timeBaseAll[xhour] = {
timestamp: xhour,
data: data
};
}
}
return timeBaseAll;
}
}, {});
var tArr = [];
for (var i = 0; i < 25; i++) {
tArr.push(i);
}
var dealedData = tArr.map(function (hour) {
var obj = diffData[hour];
var data = obj ? obj.data : {};
var newData = days.map(function (day) {
return data[day.getDate()];
});
return {
timestamp: hour,
data: newData
};
});
return dealedData;
}
}]);
return historyUtil;
}();
historyUtil.daysOfDiff = historyUtil.makeDayTimes(7);
module.exports = historyUtil;
},10043,[14305,14320,14323,10034]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
var _interopRequireWildcard = _$$_REQUIRE(_dependencyMap[0]);
var _interopRequireDefault = _$$_REQUIRE(_dependencyMap[1]);
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = undefined;
var _classCallCheck2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[2]));
var _createClass2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[3]));
var _possibleConstructorReturn2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[4]));
var _getPrototypeOf2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[5]));
var _inherits2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[6]));
var _react = _interopRequireWildcard(_$$_REQUIRE(_dependencyMap[7]));
var _reactNative = _$$_REQUIRE(_dependencyMap[8]);
var DetailedIndexItemView = function (_Component) {
(0, _inherits2.default)(DetailedIndexItemView, _Component);
function DetailedIndexItemView(props) {
var _this;
(0, _classCallCheck2.default)(this, DetailedIndexItemView);
_this = (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(DetailedIndexItemView).call(this, props));
return _this;
}
(0, _createClass2.default)(DetailedIndexItemView, [{
key: "render",
value: function render() {
var _this2 = this;
var _this$props = this.props,
indexItem = _this$props.indexItem,
style = _this$props.style,
clickable = _this$props.clickable,
theme = _this$props.theme;
var title = indexItem.title,
value = indexItem.value,
color = indexItem.color,
unit = indexItem.unit,
degree = indexItem.degree,
uri = indexItem.uri,
params = indexItem.params;
var lightColor = theme === 'white' ? '#000000' : '#FFFFFF';
var grayColor = theme === 'white' ? '#00000080' : '#FFFFFF80';
var lightStyle = {
color: lightColor
};
var grayStyle = {
color: grayColor
};
var initStyle = {
fontSize: 14
};
return _react.default.createElement(_reactNative.TouchableOpacity, {
disabled: !clickable,
style: [styles.container, style],
onPress: function onPress() {
_this2.props.navigation.navigate(uri, params);
}
}, _react.default.createElement(_reactNative.View, {
style: styles.dotContainer
}, _react.default.createElement(_reactNative.View, {
style: [styles.dot, {
backgroundColor: color
}]
})), _react.default.createElement(_reactNative.View, {
style: styles.items
}, _react.default.createElement(_reactNative.Text, {
style: [styles.title, grayStyle]
}, title), _react.default.createElement(_reactNative.View, {
style: styles.valueAndUnit
}, _react.default.createElement(_reactNative.Text, {
style: [styles.value, lightStyle, indexItem.title === 'tVOC' ? initStyle : '']
}, value), _react.default.createElement(_reactNative.Text, {
style: [styles.unit, grayStyle]
}, unit)), _react.default.createElement(_reactNative.Text, {
style: [styles.degree, grayStyle]
}, degree)));
}
}]);
return DetailedIndexItemView;
}(_react.Component);
exports.default = DetailedIndexItemView;
var styles = _reactNative.StyleSheet.create({
container: {
flexDirection: 'row'
},
dotContainer: {
width: 40,
alignItems: 'center'
},
dot: {
marginTop: 22,
width: 15,
height: 15,
borderRadius: 7.5
},
items: {
marginLeft: 10
},
title: {
fontSize: 13
},
valueAndUnit: {
flexDirection: 'row',
alignItems: 'center',
marginTop: 3
},
value: {
fontSize: 16,
color: '#FFFFFF'
},
unit: {
fontSize: 12,
color: '#FFFFFF80',
marginLeft: 5
},
degree: {
fontSize: 13,
color: '#FFFFFF80',
marginTop: 4
}
});
},10046,[14308,14305,14320,14323,14371,14377,14386,10297,10033]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
var _interopRequireWildcard = _$$_REQUIRE(_dependencyMap[0]);
var _interopRequireDefault = _$$_REQUIRE(_dependencyMap[1]);
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = undefined;
var _classCallCheck2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[2]));
var _createClass2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[3]));
var _possibleConstructorReturn2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[4]));
var _getPrototypeOf2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[5]));
var _inherits2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[6]));
var _react = _interopRequireWildcard(_$$_REQUIRE(_dependencyMap[7]));
var _reactNative = _$$_REQUIRE(_dependencyMap[8]);
var _MHLocalizableString = _$$_REQUIRE(_dependencyMap[9]);
var _ScrollableBarChartDaily = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[10]));
var _ScrollableBarChartHourly = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[11]));
var _DataStandard = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[12]));
var CombinedChart = function (_PureComponent) {
(0, _inherits2.default)(CombinedChart, _PureComponent);
function CombinedChart(props) {
var _this;
(0, _classCallCheck2.default)(this, CombinedChart);
_this = (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(CombinedChart).call(this, props));
_this.onItemFocused = function (item) {
var dataType = _this.props.dataType;
var _DataStandard$titleAn = _DataStandard.default.titleAndUnitByType(dataType),
title = _DataStandard$titleAn.title,
unit = _DataStandard$titleAn.unit;
var itemKeys = Object.keys(item);
var selectedValues = [];
if (itemKeys.indexOf('low') >= 0) {
selectedValues.push({
value: item.low,
color: item.lowColor
});
selectedValues.push({
value: item.high,
color: item.highColor
});
} else {
selectedValues.push({
value: item.value,
color: item.color
});
}
_this.setState({
title: title,
unit: unit,
dateText: item.selectedTime,
selectedValues: selectedValues
});
};
var _dataType = props.dataType;
var _DataStandard$titleAn2 = _DataStandard.default.titleAndUnitByType(_dataType),
_title = _DataStandard$titleAn2.title,
_unit = _DataStandard$titleAn2.unit;
_this.state = {
tabIndex: 0,
title: _title,
unit: _unit,
selectedValues: [],
dateText: ''
};
return _this;
}
(0, _createClass2.default)(CombinedChart, [{
key: "render",
value: function render() {
var _this2 = this;
var _this$state = this.state,
tabIndex = _this$state.tabIndex,
title = _this$state.title,
unit = _this$state.unit,
selectedValues = _this$state.selectedValues,
dateText = _this$state.dateText;
var _this$props = this.props,
daily = _this$props.daily,
hourly = _this$props.hourly,
style = _this$props.style,
dataType = _this$props.dataType;
var width = style.width;
var tabs = [];
if (hourly) {
tabs.push({
type: 'hourly',
title: _MHLocalizableString.MainLocalizableString.hour_24
});
}
if (daily) {
tabs.push({
type: 'daily',
title: _MHLocalizableString.MainLocalizableString.day_30
});
}
var showTab = tabIndex >= tabs.length ? tabs[0] : tabs[tabIndex];
return _react.default.createElement(_reactNative.View, null, _react.default.createElement(_reactNative.View, {
style: styles.header
}, _react.default.createElement(_reactNative.View, {
style: styles.currentInfo
}, _react.default.createElement(_reactNative.View, {
style: styles.typeUnitRow
}, _react.default.createElement(_reactNative.Text, {
style: styles.typeText
}, title), _react.default.createElement(_reactNative.Text, {
style: styles.unitText
}, unit)), _react.default.createElement(_reactNative.View, {
style: styles.valuesRow
}, selectedValues.map(function (_ref, index) {
var value = _ref.value,
color = _ref.color;
return _react.default.createElement(_reactNative.View, {
key: index
}, _react.default.createElement(_reactNative.TouchableOpacity, {
disabled: ['temperature', 'humidity', 'pm25', 'tvoc', 'co2'].indexOf(dataType.toLowerCase()) >= 0 ? true : false,
onPress: function onPress() {
var rawValue = _DataStandard.default.getRawValue(dataType, value);
var uri = 'DataTypeState';
var params = {
dataType: dataType,
displayedValue: rawValue
};
_this2.props.navigation.navigate(uri, params);
},
style: styles.valueRow
}, _react.default.createElement(_reactNative.Text, {
style: [styles.valueText, {
color: color
}]
}, value), index < selectedValues.length - 1 && _react.default.createElement(_reactNative.View, {
style: styles.valueSeparator
})));
}), _react.default.createElement(_reactNative.Text, {
style: styles.dateText
}, dateText))), _react.default.createElement(_reactNative.View, {
style: styles.tab
}, tabs.map(function (item, idx) {
return _react.default.createElement(_reactNative.TouchableOpacity, {
style: styles.tabItem,
key: idx,
onPress: function onPress() {
_this2.setState({
tabIndex: idx
});
}
}, _react.default.createElement(_reactNative.View, {
style: styles.tabTextContainer
}, _react.default.createElement(_reactNative.Text, {
style: tabIndex === idx ? styles.tabTextActive : styles.tabTextNormal
}, item.title)), _react.default.createElement(_reactNative.View, {
style: styles.tabLineContainer
}, _react.default.createElement(_reactNative.View, {
style: tabIndex === idx ? styles.tabLineActive : styles.tabLineNormal
})));
}))), (showTab.type === 'daily' && daily.length === 0 || showTab.type === 'hourly' && hourly.length === 0) && _react.default.createElement(_reactNative.View, {
style: {
width: width,
height: 130
}
}), showTab.type === 'daily' && daily.length > 0 && _react.default.createElement(_ScrollableBarChartDaily.default, {
style: {
width: width,
height: 130
},
barItemWidth: 40,
headerAndFooterWidth: 10,
onItemFocused: this.onItemFocused,
items: daily
}), showTab.type === 'hourly' && hourly.length > 0 && _react.default.createElement(_ScrollableBarChartHourly.default, {
style: {
width: width,
height: 130
},
barItemWidth: 14,
headerAndFooterWidth: 20,
onItemFocused: this.onItemFocused,
items: hourly
}));
}
}]);
return CombinedChart;
}(_react.PureComponent);
exports.default = CombinedChart;
var styles = _reactNative.StyleSheet.create({
header: {
flexDirection: 'row',
alignItems: 'flex-start',
height: 43,
justifyContent: 'space-between',
margin: 20
},
typeUnitRow: {
flexDirection: 'row'
},
typeText: {
color: 'white',
marginRight: 10,
fontSize: 13
},
unitText: {
color: '#FFFFFF80',
fontSize: 13
},
valuesRow: {
flexDirection: 'row',
marginTop: 5,
alignItems: 'center'
},
valueRow: {
flexDirection: 'row',
alignItems: 'center'
},
valueSeparator: {
width: 1,
height: 16,
marginHorizontal: 10,
backgroundColor: '#FFFFFF80'
},
valueText: {
fontSize: 24
},
dateText: {
color: '#FFFFFF80',
fontSize: 13,
marginLeft: 10
},
currentInfo: {},
tab: {
flexDirection: 'row',
justifyContent: 'space-evenly'
},
tabItem: {},
tabTextContainer: {
height: 20,
paddingHorizontal: 5,
justifyContent: 'center',
alignItems: 'center'
},
tabTextActive: {
fontSize: 13,
color: '#FFFFFF'
},
tabTextNormal: {
fontSize: 13,
color: '#FFFFFF80'
},
tabLineNormal: {
backgroundColor: '#FFFFFF80',
height: 1
},
tabLineActive: {
backgroundColor: '#FFFFFF',
height: 2
},
tabLineContainer: {
height: 4,
justifyContent: 'center'
}
});
},10049,[14308,14305,14320,14323,14371,14377,14386,10297,10033,10013,10052,10061,10064]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
var _interopRequireDefault = _$$_REQUIRE(_dependencyMap[0]);
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = undefined;
var _classCallCheck2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[1]));
var _createClass2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[2]));
var _possibleConstructorReturn2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[3]));
var _getPrototypeOf2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[4]));
var _inherits2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[5]));
var _react = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[6]));
var _reactNative = _$$_REQUIRE(_dependencyMap[7]);
var _ScrollableBarChart2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[8]));
var BAR_WIDTH = 14;
var DOT_SIZE = 8;
var LABEL_HEIGHT = 20;
var BAR_TEXT_HEIGHT = 20;
var ScrollableBarChartDaily = function (_ScrollableBarChart) {
(0, _inherits2.default)(ScrollableBarChartDaily, _ScrollableBarChart);
function ScrollableBarChartDaily() {
(0, _classCallCheck2.default)(this, ScrollableBarChartDaily);
return (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(ScrollableBarChartDaily).apply(this, arguments));
}
(0, _createClass2.default)(ScrollableBarChartDaily, [{
key: "groupOptions",
value: function groupOptions() {
return {
itemsCount: 1,
labelCursor: 0
};
}
}, {
key: "getLimits",
value: function getLimits(items) {
var valueMin = null;
var valueMax = null;
for (var _iterator = items, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"]();;) {
var _ref;
if (_isArray) {
if (_i >= _iterator.length) break;
_ref = _iterator[_i++];
} else {
_i = _iterator.next();
if (_i.done) break;
_ref = _i.value;
}
var _item = _ref;
var low = _item.low,
high = _item.high;
if (valueMin === null || parseFloat(low) < valueMin) {
valueMin = parseFloat(low);
}
if (valueMax === null || parseFloat(high) > valueMax) {
valueMax = parseFloat(high);
}
}
return {
valueMin: valueMin,
valueMax: valueMax
};
}
}, {
key: "renderItem",
value: function renderItem(_ref2) {
var _this = this;
var item = _ref2.item,
index = _ref2.index;
var _this$props = this.props,
style = _this$props.style,
barItemWidth = _this$props.barItemWidth;
var height = style.height;
var _this$state = this.state,
valueMin = _this$state.valueMin,
valueMax = _this$state.valueMax,
selectedIndex = _this$state.selectedIndex;
var fullBarHeight = height - LABEL_HEIGHT;
var fullValue = valueMax - valueMin;
var minBarHeight = 25;
var _item$ = item[0],
label = _item$.label,
low = _item$.low,
high = _item$.high,
lowColor = _item$.lowColor,
highColor = _item$.highColor;
var top, bottom;
if (!fullValue) {
top = fullBarHeight * 0.5;
bottom = fullBarHeight * 0.5;
} else {
top = (valueMax - high) / fullValue * fullBarHeight;
bottom = (low - valueMin) / fullValue * fullBarHeight;
}
var left = barItemWidth / 2 - 7;
var d = fullBarHeight - bottom - top;
var twoDots = true;
var justifyContent = 'space-between';
if (d < minBarHeight) {
twoDots = false;
var s = (d - BAR_WIDTH) / 2;
top += s;
bottom += s;
justifyContent = 'center';
}
if (top <= 3) {
var dis = Math.abs(top);
top += dis + 6;
bottom -= dis + 6;
}
if (bottom >= fullBarHeight) {
var _dis = Math.abs(fullBarHeight - bottom);
top -= _dis - 6;
bottom -= _dis - 6;
}
var isActive = selectedIndex === index;
return _react.default.createElement(_reactNative.TouchableOpacity, {
key: index,
onPress: function onPress() {
_this.selectItemByIndex(index);
},
style: [styles.itemBar, {
width: barItemWidth
}]
}, _react.default.createElement(_reactNative.View, {
style: [styles.barContainer, {
height: fullBarHeight
}]
}, _react.default.createElement(_reactNative.View, {
style: [styles.bar, {
left: left,
top: top,
bottom: bottom,
justifyContent: justifyContent
}, isActive ? styles.barActive : {}]
}, _react.default.createElement(_reactNative.View, {
style: [styles.dot, {
backgroundColor: highColor,
justifyContent: 'center'
}]
}, !twoDots && _react.default.createElement(_reactNative.View, {
style: styles.dotSplit
})), twoDots && _react.default.createElement(_reactNative.View, {
style: [styles.dot, {
backgroundColor: lowColor
}]
}))), _react.default.createElement(_reactNative.View, {
style: styles.labelContainer
}, _react.default.createElement(_reactNative.Text, {
style: styles.xLabel
}, label)));
}
}]);
return ScrollableBarChartDaily;
}(_ScrollableBarChart2.default);
exports.default = ScrollableBarChartDaily;
var styles = _reactNative.StyleSheet.create({
chart: {
flexDirection: 'row'
},
barContainer: {
width: '100%'
},
bar: {
position: 'absolute',
backgroundColor: '#393939',
width: BAR_WIDTH,
borderRadius: 7,
justifyContent: 'space-between',
alignItems: 'center',
paddingVertical: 3
},
dot: {
width: DOT_SIZE,
height: DOT_SIZE,
borderRadius: 4
},
dotSplit: {
width: DOT_SIZE,
height: 2,
backgroundColor: '#393939'
},
absTop: {
position: 'absolute',
top: 0,
left: 0
},
absBottom: {
position: 'absolute',
top: -4,
left: 0
},
itemBar: {
flexDirection: 'column',
alignItems: 'center',
justifyContent: 'flex-end'
},
labelContainer: {
height: LABEL_HEIGHT,
justifyContent: 'flex-end',
alignItems: 'center',
marginTop: 5
},
barActive: {
borderColor: 'white',
borderWidth: 2
},
xLabel: {
color: '#FFFFFF80',
fontSize: 13
},
barTextContainer: {
position: 'absolute',
left: 0,
right: 0,
height: BAR_TEXT_HEIGHT,
justifyContent: 'center',
alignItems: 'center'
},
barText: {
color: '#FFFFFF',
fontSize: 13
}
});
},10052,[14305,14320,14323,14371,14377,14386,10297,10033,10055]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
var _interopRequireWildcard = _$$_REQUIRE(_dependencyMap[0]);
var _interopRequireDefault = _$$_REQUIRE(_dependencyMap[1]);
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = undefined;
var _classCallCheck2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[2]));
var _createClass2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[3]));
var _possibleConstructorReturn2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[4]));
var _getPrototypeOf2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[5]));
var _inherits2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[6]));
var _react = _interopRequireWildcard(_$$_REQUIRE(_dependencyMap[7]));
var _reactNative = _$$_REQUIRE(_dependencyMap[8]);
var _ArrayUtil = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[9]));
var ScrollableBarChart = function (_PureComponent) {
(0, _inherits2.default)(ScrollableBarChart, _PureComponent);
function ScrollableBarChart(props) {
var _this;
(0, _classCallCheck2.default)(this, ScrollableBarChart);
_this = (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(ScrollableBarChart).call(this, props));
_this.scrollEventTimer = null;
_this.lastScroll = 0;
_this.onListScroll = function (_ref) {
var nativeEvent = _ref.nativeEvent;
var x = nativeEvent.contentOffset.x;
if (_this.scrollEventTimer) {
clearTimeout(_this.scrollEventTimer);
}
_this.scrollEventTimer = setTimeout(function () {
var leftToRight = x >= _this.lastScroll;
_this.lastScroll = x;
var barItemWidth = _this.props.barItemWidth;
var items = _this.state.items;
var selectedIndex = _this.state.selectedIndex;
var width = nativeEvent.layoutMeasurement.width;
var rightIndex = Math.floor(x / barItemWidth) + 1;
var leftIndex = Math.floor((x + width) / barItemWidth) - 1;
if (selectedIndex >= rightIndex && selectedIndex <= leftIndex) {
return;
}
var _this$groupOptions = _this.groupOptions(),
labelCursor = _this$groupOptions.labelCursor;
selectedIndex = leftToRight ? rightIndex : leftIndex;
if (selectedIndex < labelCursor) {
selectedIndex = labelCursor;
} else if (selectedIndex > items.length) {
selectedIndex = items.length;
}
_this.selectItemByIndex(selectedIndex);
_this.scrollEventTimer = null;
}, 200);
};
var _items = props.items,
onItemFocused = props.onItemFocused;
var _this$getLimits = _this.getLimits(_items),
valueMin = _this$getLimits.valueMin,
valueMax = _this$getLimits.valueMax;
var _this$groupOptions2 = _this.groupOptions(),
itemsCount = _this$groupOptions2.itemsCount,
_labelCursor = _this$groupOptions2.labelCursor;
var groups = _ArrayUtil.default.groupedObjectArray(_items, itemsCount);
_this.state = {
selected: false,
groups: groups,
selectedIndex: _labelCursor,
valueRange: valueMax - valueMin,
valueMax: valueMax,
valueMin: valueMin,
items: _items
};
onItemFocused && onItemFocused(_items[_labelCursor]);
return _this;
}
(0, _createClass2.default)(ScrollableBarChart, [{
key: "componentWillReceiveProps",
value: function componentWillReceiveProps(nextProps, nextContext) {
if (nextProps.items !== this.props.items) {
var items = nextProps.items,
onItemFocused = nextProps.onItemFocused;
var _this$getLimits2 = this.getLimits(items),
valueMin = _this$getLimits2.valueMin,
valueMax = _this$getLimits2.valueMax;
var _this$groupOptions3 = this.groupOptions(),
itemsCount = _this$groupOptions3.itemsCount,
labelCursor = _this$groupOptions3.labelCursor;
var groups = _ArrayUtil.default.groupedObjectArray(items, itemsCount);
this.setState({
selected: false,
groups: groups,
selectedIndex: labelCursor,
valueRange: valueMax - valueMin,
valueMax: valueMax,
valueMin: valueMin,
items: items
});
onItemFocused && onItemFocused(items[labelCursor]);
}
}
}, {
key: "groupOptions",
value: function groupOptions() {
return {
count: 1,
label: 0
};
}
}, {
key: "getLimits",
value: function getLimits(items) {
var valueMin = null;
var valueMax = null;
var sum = 0;
for (var _iterator = items, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"]();;) {
var _ref2;
if (_isArray) {
if (_i >= _iterator.length) break;
_ref2 = _iterator[_i++];
} else {
_i = _iterator.next();
if (_i.done) break;
_ref2 = _i.value;
}
var _item = _ref2;
if (!_item) {
continue;
}
var value = _item.value;
if (value === null) {
continue;
}
sum += value;
if (valueMin === null || parseFloat(value) < valueMin) {
valueMin = parseFloat(value);
}
if (valueMax === null || parseFloat(value) > valueMax) {
valueMax = parseFloat(value);
}
}
var valueAvg = sum / items.length;
return {
valueMin: valueMin,
valueMax: valueMax,
valueAvg: valueAvg
};
}
}, {
key: "renderItem",
value: function renderItem(_ref3) {
var item = _ref3.item,
index = _ref3.index;
return null;
}
}, {
key: "selectItemByIndex",
value: function selectItemByIndex(index) {
var _this2 = this;
var onItemFocused = this.props.onItemFocused;
var items = this.state.items;
this.setState({
selectedIndex: index
}, function () {
_this2.reloadData();
onItemFocused && onItemFocused(items[index]);
});
}
}, {
key: "reloadData",
value: function reloadData() {
var reloadState = this.state.selected;
this.setState({
selected: !reloadState
});
}
}, {
key: "render",
value: function render() {
var _this3 = this;
var style = this.props.style;
return _react.default.createElement(_reactNative.FlatList, {
style: style,
scrollEventThrottle: 100,
ListFooterComponent: this.getHeaderAndFooter(),
ListHeaderComponent: this.getHeaderAndFooter(),
onScroll: this.onListScroll,
extraData: this.state,
horizontal: true,
showsHorizontalScrollIndicator: false,
inverted: true,
data: this.state.groups,
keyExtractor: function keyExtractor(item, index) {
return '0' + index;
},
renderItem: function renderItem(_ref4) {
var item = _ref4.item,
index = _ref4.index;
return _this3.renderItem({
item: item,
index: index
});
}
});
}
}, {
key: "getHeaderAndFooter",
value: function getHeaderAndFooter() {
var headerAndFooterWidth = this.props.headerAndFooterWidth;
return _react.default.createElement(_reactNative.View, {
style: {
width: headerAndFooterWidth,
height: 200,
backgroundColor: '#00000000'
}
});
}
}]);
return ScrollableBarChart;
}(_react.PureComponent);
exports.default = ScrollableBarChart;
},10055,[14308,14305,14320,14323,14371,14377,14386,10297,10033,10058]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = undefined;
function groupedObjectArray(array, groupCount) {
if (array.length === 0) {
return [];
}
var groupedRows = [];
var row = [];
for (var _iterator = array, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"]();;) {
var _ref;
if (_isArray) {
if (_i >= _iterator.length) break;
_ref = _iterator[_i++];
} else {
_i = _iterator.next();
if (_i.done) break;
_ref = _i.value;
}
var _c = _ref;
row.push(_c);
if (row.length === groupCount) {
groupedRows.push(row);
row = [];
}
}
if (row.length > 0) {
groupedRows.push(row);
}
return groupedRows;
}
function arrayToMap(arr, mapKey) {
var valueKey = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
var map = {};
for (var _iterator2 = arr, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"]();;) {
var _ref2;
if (_isArray2) {
if (_i2 >= _iterator2.length) break;
_ref2 = _iterator2[_i2++];
} else {
_i2 = _iterator2.next();
if (_i2.done) break;
_ref2 = _i2.value;
}
var _a = _ref2;
map[_a[mapKey]] = valueKey ? _a[valueKey] : _a;
}
return map;
}
function arrayToMappedArray(arr, mapKey) {
var valueKey = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
var map = {};
for (var _iterator3 = arr, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"]();;) {
var _ref3;
if (_isArray3) {
if (_i3 >= _iterator3.length) break;
_ref3 = _iterator3[_i3++];
} else {
_i3 = _iterator3.next();
if (_i3.done) break;
_ref3 = _i3.value;
}
var _a2 = _ref3;
var vk = _a2[mapKey];
var v = valueKey ? _a2[valueKey] : _a2;
if (map[vk]) {
map[vk].push(v);
} else {
map[vk] = [v];
}
}
return map;
}
function arrayCol(arr, key) {
var col = [];
for (var _iterator4 = arr, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : _iterator4[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"]();;) {
var _ref4;
if (_isArray4) {
if (_i4 >= _iterator4.length) break;
_ref4 = _iterator4[_i4++];
} else {
_i4 = _iterator4.next();
if (_i4.done) break;
_ref4 = _i4.value;
}
var _a3 = _ref4;
col.push(_a3[key]);
}
return col;
}
function arrayDistinctCol(arr, key) {
var col = [];
for (var _iterator5 = arr, _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : _iterator5[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"]();;) {
var _ref5;
if (_isArray5) {
if (_i5 >= _iterator5.length) break;
_ref5 = _iterator5[_i5++];
} else {
_i5 = _iterator5.next();
if (_i5.done) break;
_ref5 = _i5.value;
}
var _a4 = _ref5;
var v = _a4[key];
if (col.indexOf(v) < 0) {
col.push(v);
}
}
return col;
}
var _default = {
groupedObjectArray: groupedObjectArray,
arrayToMap: arrayToMap,
arrayToMappedArray: arrayToMappedArray,
arrayCol: arrayCol,
arrayDistinctCol: arrayDistinctCol
};
exports.default = _default;
},10058,[]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
var _interopRequireDefault = _$$_REQUIRE(_dependencyMap[0]);
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = undefined;
var _classCallCheck2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[1]));
var _createClass2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[2]));
var _possibleConstructorReturn2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[3]));
var _getPrototypeOf2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[4]));
var _inherits2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[5]));
var _react = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[6]));
var _reactNative = _$$_REQUIRE(_dependencyMap[7]);
var _ScrollableBarChart2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[8]));
var BAR_WIDTH = 3;
var LABEL_HEIGHT = 20;
var ScrollableBarChartHourly = function (_ScrollableBarChart) {
(0, _inherits2.default)(ScrollableBarChartHourly, _ScrollableBarChart);
function ScrollableBarChartHourly() {
(0, _classCallCheck2.default)(this, ScrollableBarChartHourly);
return (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(ScrollableBarChartHourly).apply(this, arguments));
}
(0, _createClass2.default)(ScrollableBarChartHourly, [{
key: "groupOptions",
value: function groupOptions() {
return {
itemsCount: 4,
labelCursor: 0
};
}
}, {
key: "renderItem",
value: function renderItem(_ref) {
var _this = this;
var item = _ref.item,
index = _ref.index;
var _this$props = this.props,
style = _this$props.style,
barItemWidth = _this$props.barItemWidth;
var height = style.height;
var fullBarHeight = height - LABEL_HEIGHT;
var _this$state = this.state,
selectedIndex = _this$state.selectedIndex,
valueRange = _this$state.valueRange,
valueMin = _this$state.valueMin;
var _this$groupOptions = this.groupOptions(),
itemsCount = _this$groupOptions.itemsCount,
labelCursor = _this$groupOptions.labelCursor;
var xLabel = null;
var barsDom = item.map(function (barItem, idx) {
if (barItem === null) {
return _react.default.createElement(_reactNative.View, {
key: idx,
style: [styles.barItem, {
width: barItemWidth,
height: fullBarHeight
}]
});
}
var value = barItem.value,
color = barItem.color,
label = barItem.label,
showLabel = barItem.showLabel;
var barHeight;
if (valueRange === 0) {
barHeight = fullBarHeight;
} else {
barHeight = fullBarHeight * 0.1 + (value - valueMin) / valueRange * fullBarHeight * 0.9;
}
if (barHeight < 8) {
barHeight = 8;
}
idx === labelCursor + 1 && (xLabel = label);
var itemIndex = index * itemsCount + idx;
var isActive = selectedIndex === itemIndex;
return _react.default.createElement(_reactNative.TouchableOpacity, {
key: idx,
onPress: function onPress() {
_this.selectItemByIndex(itemIndex);
},
style: [styles.barItem, {
width: barItemWidth
}]
}, _react.default.createElement(_reactNative.View, {
style: [styles.barContainer]
}, _react.default.createElement(_reactNative.View, {
style: [styles.bar, {
backgroundColor: color,
height: barHeight
}, isActive ? styles.barActive : {}]
})));
});
return _react.default.createElement(_reactNative.View, {
style: styles.groupContainer
}, _react.default.createElement(_reactNative.View, {
style: styles.barsContainer
}, barsDom), _react.default.createElement(_reactNative.View, {
style: [styles.labelContainer, {
width: barItemWidth * 3
}]
}, !!xLabel && _react.default.createElement(_reactNative.Text, {
style: styles.xLabel
}, xLabel)));
}
}]);
return ScrollableBarChartHourly;
}(_ScrollableBarChart2.default);
exports.default = ScrollableBarChartHourly;
var styles = _reactNative.StyleSheet.create({
container: {},
barContainer: {
alignItems: 'center'
},
bar: {
width: BAR_WIDTH,
borderRadius: 1.5
},
barActive: {
width: 7,
borderRadius: 3.5,
borderColor: 'white',
borderWidth: 2
},
barItem: {
alignItems: 'center',
justifyContent: 'flex-end'
},
labelContainer: {
height: LABEL_HEIGHT,
justifyContent: 'center',
alignItems: 'center'
},
xLabel: {
color: '#FFFFFF80',
justifyContent: 'center',
fontSize: 13,
marginTop: 5
},
barsContainer: {
flexDirection: 'row-reverse'
},
groupContainer: {
justifyContent: 'flex-end',
alignItems: 'flex-end'
}
});
},10061,[14305,14320,14323,14371,14377,14386,10297,10033,10055]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
var _interopRequireDefault = _$$_REQUIRE(_dependencyMap[0]);
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = undefined;
var _objectSpread2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[1]));
var _PlusKV = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[2]));
var _TimeUtil = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[3]));
var _ArrayUtil = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[4]));
var _MHLocalizableString = _$$_REQUIRE(_dependencyMap[5]);
var _tr = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[6]));
var TEMPERATURE_UNIT_C = '°C';
var TEMPERATURE_UNIT_F = '°F';
var UNITS = {
F: '°F',
C: '°C',
MG_M3: 'mg/m³',
UG_M3: 'μg/m³',
PPM: 'ppm',
PPB: 'ppb'
};
var CN = {
pm25: [35, 75, 115, 150, 250, 9999],
pm10: [50, 150, 250, 350, 420, 9999],
no2: [100, 200, 700, 1200, 2340, 9999],
aqi: [50, 100, 150, 200, 300, 9999],
humidity: [20, 40, 60, 85, 99],
o3: [160, 200, 300, 400, 800, 9999],
co: [5000, 10000, 35000, 60000, 90000, 99999],
so2: [150, 500, 650, 800, 1600, 9999],
ultraviolet: [2, 5, 7, 10, 9999],
pollen: [50, 100, 300, 500, 800, 9999],
battery: [10, 30, 50, 60, 70, 90],
atmos: [76, 9999],
tvoc: [65, 220, 660, 2000, 9999],
co2: [1000, 2000, 3000, 9999],
temperature: [20, 23, 26.5, 28, 100]
};
var US = {
pm25: [12, 35.4, 55.4, 150.4, 250.4, 9999],
pm10: [54, 154, 254, 354, 424, 9999],
no2: [53, 100, 360, 649, 1249, 9999],
aqi: [50, 100, 150, 200, 300, 9999],
o3: [0.054, 0.070, 0.085, 0.105, 0.200, 1],
co: [4.4, 9.4, 12.4, 15.4, 30.4, 9999],
so2: [35, 75, 185, 304, 604, 9999],
ultraviolet: [2, 5, 7, 10, 9999],
humidity: [20, 40, 60, 85, 99],
pollen: [51, 101, 301, 501, 801, 9999],
battery: [10, 30, 50, 60, 70, 90],
atmos: [76, 9999],
temperature: [20, 23, 26.5, 28, 100],
ratio: {
no2: 0.4869,
o3: 0.000466,
co: 0.0008,
so2: 0.3497
},
tvoc: [65, 220, 660, 2000, 9999],
co2: [1000, 2000, 3000, 20000]
};
function _prefStandard() {
return _PlusKV.default.getPrefStandard();
}
function _prefTemperatureUnit() {
return _PlusKV.default.getPrefTemperatureUnit();
}
function levelTitleByValue(type, value) {
var TEXTS = ['excellent', 'good', 'medium', 'slightly', 'serious', 'xserious', 'xserious'];
if (['ultraviolet', 'pollen'].indexOf(type) >= 0) {
TEXTS = ['very_low', 'low', 'medium', 'serious', 'xserious', 'xserious'];
} else if (['temperature', 'humidity'].indexOf(type) >= 0) {
TEXTS = ['very_low', 'low', 'suitable', 'high', 'very_high'];
} else if (['co2'].indexOf(type) >= 0) {
TEXTS = ['good', 'slightly', 'serious', 'xserious'];
} else if (['atmos'].indexOf(type) >= 0) {
TEXTS = ['low', 'good'];
} else if (['tvoc'].indexOf(type) >= 0) {
TEXTS = ['excellent', 'good', 'slightly', 'serious', 'xserious'];
}
var source = _prefStandard() === 'cn' ? CN : US;
var arr = source[type] || [];
if (!arr) {
return _MHLocalizableString.MainLocalizableString['level_' + type + '_' + TEXTS[0]];
}
var compareVal = value;
if (source['ratio'] && source['ratio'][type]) {
compareVal *= source['ratio'][type];
}
var idx = 0;
if (type === 'ultraviolet' || type === 'pollen') {
while (idx < arr.length) {
if (compareVal <= arr[idx]) {
return _MHLocalizableString.MainLocalizableString['level_' + type + '_' + TEXTS[idx]];
}
idx++;
}
} else {
while (idx < arr.length) {
if (compareVal < arr[idx]) {
return _MHLocalizableString.MainLocalizableString['level_' + type + '_' + TEXTS[idx]];
}
idx++;
}
}
return _MHLocalizableString.MainLocalizableString['level_' + type + '_' + TEXTS[TEXTS.length - 1]];
}
function temperatureC2F(value) {
return parseFloat(value, 10) * 1.8 + 32.0;
}
function temperatureValue(value) {
if (_prefTemperatureUnit() === TEMPERATURE_UNIT_C) {
return value;
} else {
return temperatureC2F(value);
}
}
function displayedTvocValue(v) {
var tvocUnit = _PlusKV.default.getPrefTVOCUnit();
if (tvocUnit === UNITS.PPB) {
return v;
}
if (tvocUnit === UNITS.PPM) {
return (v / 1000).toFixed(3);
}
return (v / 218.77).toFixed(3);
}
var typeRemoteRatio = {
temperature: 1,
humidity: 1
};
var typePrecisions = {
temperature: 1,
humidity: 1,
atmos: 1,
pm25: 1
};
var precisionTypes = Object.keys(typePrecisions);
function displayedValue(type, v) {
if (v === '--') {
return v;
}
var dv = v;
if (type === 'temperature') {
dv = temperatureValue(v);
} else if (type === 'tvoc') {
dv = displayedTvocValue(v);
}
if (precisionTypes.indexOf(type) >= 0) {
dv = parseFloat(dv).toFixed(typePrecisions[type]);
}
return dv;
}
function colorsByType(type) {
if (type.toLowerCase() === 'temperature') {
return ['#00e5ff', '#00e5ff', '#00e400', '#ffd600', '#ff7e00', '#ff0000', '#cc0065', '#7e0023', '#999999'];
}
if (type.toLowerCase() === 'humidity') {
return ['#ffd600', '#ff7e00', '#00e400', '#00e5ff', '#ff0000', '#cc0065', '#7e0023', '#999999'];
}
if (type.toLowerCase() === 'tvoc') {
return ['#00e400', '#00e400', '#ffd600', '#ff0000', '#7e0023', '#999999'];
}
if (type.toLowerCase() === 'co2') {
return ['#00e400', '#00e400', '#ff0000', '#7e0023', '#999999'];
}
if (type.toLowerCase() === 'atmos') {
return ['#ffd600', '#00e400', '#999999'];
}
return ['#00e400', '#ffd600', '#ff7e00', '#ff0000', '#cc0065', '#7e0023', '#999999'];
}
function indicatorColorByValue(type, value) {
var COLORS = colorsByType(type);
var source = _prefStandard() === 'cn' ? CN : US;
var arr = source[type] || [];
if (!arr) {
return COLORS[0];
}
var compareVal = value;
if (source['ratio'] && source['ratio'][type]) {
compareVal *= source['ratio'][type];
}
var idx = 0;
if (type === 'ultraviolet' || type === 'pollen') {
while (idx < arr.length) {
if (compareVal <= arr[idx]) {
return COLORS[idx];
}
idx++;
}
} else {
while (idx < arr.length) {
if (compareVal < arr[idx]) {
return COLORS[idx];
}
idx++;
}
}
return COLORS[COLORS.length - 1];
}
function valueByStandard(type, valueSet) {
var suffix = _prefStandard() === 'cn' ? '' : '_us';
var v;
valueSet.forEach(function (item) {
if (item.name == type) {
v = item.value;
}
});
if (typeof v === 'undefined') {
return '--';
}
if (type === 'atmos') {
v /= 100;
v = v.toFixed(2);
}
return v;
}
function toDetailGroupsWithKeys(weather, types, groupCount) {
var preTitle = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'title_';
var items = [];
var existTypes = weather.map(function (item) {
return item.name;
});
for (var _iterator = types, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"]();;) {
var _ref;
if (_isArray) {
if (_i >= _iterator.length) break;
_ref = _iterator[_i++];
} else {
_i = _iterator.next();
if (_i.done) break;
_ref = _i.value;
}
var _type = _ref;
if (existTypes.indexOf(_type) < 0) {
items.push(null);
continue;
}
var isTvocInit = false;
if (_type === 'tvoc') {
weather.forEach(function (item) {
if (item.name === 'tvoc' && item.desc === '正在初始化...') {
isTvocInit = true;
}
});
}
var value = valueByStandard(_type, weather);
var uri = ['temperature', 'humidity'].indexOf(_type) >= 0 ? 'THStatePage' : 'DataTypeState';
items.push({
color: indicatorColorByValue(_type, isTvocInit ? 0 : value),
title: _MHLocalizableString.MainLocalizableString[preTitle + _type],
value: isTvocInit ? _MHLocalizableString.MainLocalizableString['initing'] : displayedValue(_type, value),
unit: isTvocInit ? '' : unitByType(_type),
degree: isTvocInit ? '' : levelTitleByValue(_type, value),
uri: uri,
params: {
dataType: _type,
displayedValue: value,
weather: weather
}
});
}
return _ArrayUtil.default.groupedObjectArray(items, groupCount);
}
function buildAdvice(data) {
var test = true;
var pm25_good = 76;
var advices = [];
var pollen = data.pollen,
ultraviolet = data.ultraviolet,
temperature = data.temperature,
humidity = data.humidity,
pm25 = data.pm25,
tvoc = data.tvoc,
co2 = data.co2;
if (humidity < 40) {
if (tvoc <= 1000 && co2 <= 1000) {
advices.push({
icon: _$$_REQUIRE(_dependencyMap[7]),
text: _MHLocalizableString.MainLocalizableString.evaluate9
});
if (pm25 > pm25_good) {
advices.push({
icon: _$$_REQUIRE(_dependencyMap[8]),
text: _MHLocalizableString.MainLocalizableString.evaluate1
});
if (temperature < 23) {
advices.push({
icon: _$$_REQUIRE(_dependencyMap[9]),
text: _MHLocalizableString.MainLocalizableString.evaluate4
});
} else if (temperature > 28) {
advices.push({
icon: _$$_REQUIRE(_dependencyMap[10]),
text: _MHLocalizableString.MainLocalizableString.evaluate3
});
}
} else {
if (temperature < 23) {
advices.push({
icon: _$$_REQUIRE(_dependencyMap[9]),
text: _MHLocalizableString.MainLocalizableString.evaluate4
});
} else if (temperature > 28) {
advices.push({
icon: _$$_REQUIRE(_dependencyMap[10]),
text: _MHLocalizableString.MainLocalizableString.evaluate3
});
}
}
} else {
if (temperature < 23) {
advices.push({
icon: _$$_REQUIRE(_dependencyMap[11]),
text: _MHLocalizableString.MainLocalizableString.evaluate6
});
advices.push({
icon: _$$_REQUIRE(_dependencyMap[7]),
text: _MHLocalizableString.MainLocalizableString.evaluate9
});
advices.push({
icon: _$$_REQUIRE(_dependencyMap[9]),
text: _MHLocalizableString.MainLocalizableString.evaluate4
});
} else if (temperature > 28) {
advices.push({
icon: _$$_REQUIRE(_dependencyMap[11]),
text: _MHLocalizableString.MainLocalizableString.evaluate6
});
advices.push({
icon: _$$_REQUIRE(_dependencyMap[7]),
text: _MHLocalizableString.MainLocalizableString.evaluate9
});
advices.push({
icon: _$$_REQUIRE(_dependencyMap[10]),
text: _MHLocalizableString.MainLocalizableString.evaluate3
});
} else {
advices.push({
icon: _$$_REQUIRE(_dependencyMap[12]),
text: _MHLocalizableString.MainLocalizableString.evaluate7
});
}
}
} else if (humidity <= 60) {
if (tvoc <= 1000 && co2 <= 1000) {
if (pm25 > pm25_good) {
advices.push({
icon: _$$_REQUIRE(_dependencyMap[8]),
text: _MHLocalizableString.MainLocalizableString.evaluate1
});
if (temperature < 23) {
advices.push({
icon: _$$_REQUIRE(_dependencyMap[9]),
text: _MHLocalizableString.MainLocalizableString.evaluate4
});
} else if (temperature > 28) {
advices.push({
icon: _$$_REQUIRE(_dependencyMap[10]),
text: _MHLocalizableString.MainLocalizableString.evaluate3
});
} else {
advices.push({
icon: _$$_REQUIRE(_dependencyMap[12]),
text: _MHLocalizableString.MainLocalizableString.evaluate7
});
}
} else {
if (temperature < 23) {
advices.push({
icon: _$$_REQUIRE(_dependencyMap[9]),
text: _MHLocalizableString.MainLocalizableString.evaluate4
});
} else if (temperature > 28) {
advices.push({
icon: _$$_REQUIRE(_dependencyMap[10]),
text: _MHLocalizableString.MainLocalizableString.evaluate3
});
}
}
} else {
if (temperature < 23) {
advices.push({
icon: _$$_REQUIRE(_dependencyMap[11]),
text: _MHLocalizableString.MainLocalizableString.evaluate6
});
advices.push({
icon: _$$_REQUIRE(_dependencyMap[9]),
text: _MHLocalizableString.MainLocalizableString.evaluate4
});
} else if (temperature > 28) {
advices.push({
icon: _$$_REQUIRE(_dependencyMap[11]),
text: _MHLocalizableString.MainLocalizableString.evaluate6
});
advices.push({
icon: _$$_REQUIRE(_dependencyMap[10]),
text: _MHLocalizableString.MainLocalizableString.evaluate3
});
} else {
advices.push({
icon: _$$_REQUIRE(_dependencyMap[12]),
text: _MHLocalizableString.MainLocalizableString.evaluate7
});
}
}
} else {
if (tvoc <= 1000 && co2 <= 1000) {
advices.push({
icon: _$$_REQUIRE(_dependencyMap[13]),
text: _MHLocalizableString.MainLocalizableString.evaluate2
});
if (pm25 > pm25_good) {
advices.push({
icon: _$$_REQUIRE(_dependencyMap[8]),
text: _MHLocalizableString.MainLocalizableString.evaluate1
});
if (temperature < 23) {
advices.push({
icon: _$$_REQUIRE(_dependencyMap[9]),
text: _MHLocalizableString.MainLocalizableString.evaluate4
});
} else if (temperature > 28) {
advices.push({
icon: _$$_REQUIRE(_dependencyMap[10]),
text: _MHLocalizableString.MainLocalizableString.evaluate3
});
}
} else {
if (temperature < 23) {
advices.push({
icon: _$$_REQUIRE(_dependencyMap[9]),
text: _MHLocalizableString.MainLocalizableString.evaluate4
});
} else if (temperature > 28) {
advices.push({
icon: _$$_REQUIRE(_dependencyMap[10]),
text: _MHLocalizableString.MainLocalizableString.evaluate3
});
}
}
} else {
if (temperature < 23) {
advices.push({
icon: _$$_REQUIRE(_dependencyMap[11]),
text: _MHLocalizableString.MainLocalizableString.evaluate6
});
advices.push({
icon: _$$_REQUIRE(_dependencyMap[13]),
text: _MHLocalizableString.MainLocalizableString.evaluate2
});
advices.push({
icon: _$$_REQUIRE(_dependencyMap[9]),
text: _MHLocalizableString.MainLocalizableString.evaluate4
});
} else if (temperature > 28) {
advices.push({
icon: _$$_REQUIRE(_dependencyMap[11]),
text: _MHLocalizableString.MainLocalizableString.evaluate6
});
advices.push({
icon: _$$_REQUIRE(_dependencyMap[13]),
text: _MHLocalizableString.MainLocalizableString.evaluate2
});
advices.push({
icon: _$$_REQUIRE(_dependencyMap[10]),
text: _MHLocalizableString.MainLocalizableString.evaluate3
});
} else {
advices.push({
icon: _$$_REQUIRE(_dependencyMap[12]),
text: _MHLocalizableString.MainLocalizableString.evaluate7
});
}
}
}
return advices;
}
function titleAndUnitByType(type) {
return {
title: _MHLocalizableString.MainLocalizableString['title_' + type],
unit: unitByType(type)
};
}
function unitByType(type) {
if (['pm25', 'pm10', 'no2', 'so2', 'o3'].indexOf(type) >= 0) {
return UNITS.UG_M3;
}
if (['co'].indexOf(type) >= 0) {
return UNITS.MG_M3;
}
var mapped = {
temperature: _PlusKV.default.getPrefTemperatureUnit(),
co2: UNITS.PPM,
tvoc: _PlusKV.default.getPrefTVOCUnit(),
humidity: '%',
atmos: 'kPa'
};
if (mapped.tvoc === 'mg_m³') {
mapped.tvoc = 'mg/m³';
}
return mapped[type] || '';
}
function getRawValue(type, v) {
if (v === '--') {
return v;
}
var rawValue = v;
if (type === 'temperature') {
rawValue = ((v - 32.0) / 1.8).toFixed(1);
} else if (type === 'tvoc') {
var tvocUnit = 'ppb';
if (tvocUnit === UNITS.PPB) {} else if (tvocUnit === UNITS.PPM) {
rawValue = (v * 1000).toFixed(0);
} else {
rawValue = (v * 218.77).toFixed(0);
}
}
return rawValue;
}
function buildDailyAndHourlyCharts(daily, hourly, typeMap) {
var result = {};
var getTypeArray = function getTypeArray(category, type) {
if (!result[type]) {
result[type] = {};
}
if (!result[type][category]) {
result[type][category] = [];
}
return result[type][category];
};
var cachedTime1 = {};
var cachedTime2 = {};
for (var _iterator2 = hourly, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"]();;) {
var _ref2;
if (_isArray2) {
if (_i2 >= _iterator2.length) break;
_ref2 = _iterator2[_i2++];
} else {
_i2 = _iterator2.next();
if (_i2.done) break;
_ref2 = _i2.value;
}
var _h = _ref2;
var _type2 = _h.type,
value = _h.value,
timestamp = _h.timestamp;
if (typeMap[_type2]) {
_type2 = typeMap[_type2];
}
if (typeRemoteRatio[_type2]) {
value = value / typeRemoteRatio[_type2];
}
var label = cachedTime1[timestamp] || _TimeUtil.default.getHour(timestamp);
cachedTime1[timestamp] = label;
var selectedTime = _TimeUtil.default.getDatetime(timestamp);
getTypeArray('hourly', _type2).push({
color: indicatorColorByValue(_type2, value),
value: displayedValue(_type2, value),
label: label,
selectedTime: selectedTime,
showLabel: timestamp % 3600 === 0
});
}
for (var _iterator3 = daily, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"]();;) {
var _ref3;
if (_isArray3) {
if (_i3 >= _iterator3.length) break;
_ref3 = _iterator3[_i3++];
} else {
_i3 = _iterator3.next();
if (_i3.done) break;
_ref3 = _i3.value;
}
var _d = _ref3;
var _type3 = _d.type,
max = _d.max,
min = _d.min,
_timestamp = _d.timestamp;
if (typeMap[_type3]) {
_type3 = typeMap[_type3];
}
if (typeRemoteRatio[_type3]) {
max = max / typeRemoteRatio[_type3];
min = min / typeRemoteRatio[_type3];
}
var _label = cachedTime2[_timestamp] || _TimeUtil.default.dateAndMonth(_timestamp);
cachedTime2[_timestamp] = _label;
getTypeArray('daily', _type3).push({
lowColor: indicatorColorByValue(_type3, min),
highColor: indicatorColorByValue(_type3, max),
high: displayedValue(_type3, max),
low: displayedValue(_type3, min),
label: _label,
selectedTime: _label
});
}
var charts = [];
var types = Object.keys(result);
for (var _i4 = 0, _types = types; _i4 < _types.length; _i4++) {
var type = _types[_i4];
var parts = result[type];
if (!parts.hourly) {
parts.hourly = [];
}
if (!parts.daily) {
parts.daily = [];
}
charts.push((0, _objectSpread2.default)({
dataType: type
}, result[type]));
}
return charts;
}
function gradesAndDegrees(type) {
var std = _PlusKV.default.getPrefStandard();
var gradeMap = std === 'cn' ? CN : US;
var values;
values = gradeMap[type] || [];
var titles = [];
var colors = [];
for (var _iterator4 = values, _isArray4 = Array.isArray(_iterator4), _i5 = 0, _iterator4 = _isArray4 ? _iterator4 : _iterator4[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"]();;) {
var _ref4;
if (_isArray4) {
if (_i5 >= _iterator4.length) break;
_ref4 = _iterator4[_i5++];
} else {
_i5 = _iterator4.next();
if (_i5.done) break;
_ref4 = _i5.value;
}
var _v = _ref4;
titles.push(levelTitleByValue(type, _v - 1));
colors.push(indicatorColorByValue(type, _v - 1));
}
var displayValues = [];
if (type === 'tvoc' && _PlusKV.default.getPrefTVOCUnit() === UNITS.MG_M3) {
displayValues = [0.3, 1, 3, 9, 999];
} else {
displayValues = values.map(function (value) {
return displayedValue(type, value);
});
}
return {
grades: displayValues,
titles: titles,
colors: colors
};
}
var _default = {
displayedValue: displayedValue,
colorsByType: colorsByType,
indicatorColorByValue: indicatorColorByValue,
valueByStandard: valueByStandard,
toDetailGroupsWithKeys: toDetailGroupsWithKeys,
buildAdvice: buildAdvice,
titleAndUnitByType: titleAndUnitByType,
unitByType: unitByType,
getRawValue: getRawValue,
buildDailyAndHourlyCharts: buildDailyAndHourlyCharts,
gradesAndDegrees: gradesAndDegrees,
temperatureValue: temperatureValue
};
exports.default = _default;
},10064,[14305,14314,10067,10082,10058,10013,10968,10088,10091,10094,10097,10100,10103,10106]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
var _interopRequireDefault = _$$_REQUIRE(_dependencyMap[0]);
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = undefined;
var _react = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[1]));
var _asyncStorage = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[2]));
var _reactNative = _$$_REQUIRE(_dependencyMap[3]);
var _KV_PAIRS_ = {
_phoneId: '',
_userId: '',
_userName: '',
_deleteWeather: '',
_prefStandard: 'cn',
_prefTemperatureUnit: '°C',
_prefTvocUnit: 'mg/m³',
_prefShowHomeAdvice: '1',
_mac2DeviceState: {},
_id2Device: {},
_localWeatherOn: '0',
_localCityId: '',
_sparrowMap: {},
_selectedServer: {}
};
function getByKey(key) {
return _KV_PAIRS_[key];
}
function setByKeyValue(key, value) {
_KV_PAIRS_[key] = value;
asyncSet(key, value, function () {
if (['_prefStandard', '_prefTemperatureUnit', '_prefTvocUnit'].indexOf(key) >= 0) {
_reactNative.Platform.OS === 'ios' && _asyncStorage.default.setItem(key, value, function () {});
}
});
}
function getPhoneId() {
return _KV_PAIRS_._phoneId;
}
function setPhoneId(phoneId) {
setByKeyValue('_phoneId', phoneId);
_reactNative.Platform.OS === 'ios' && _asyncStorage.default.setItem('air.com.phoneId', phoneId, function () {});
}
function getUserId() {
return _KV_PAIRS_._userId;
}
function setUserId(userId) {
setByKeyValue('_userId', userId);
_reactNative.Platform.OS === 'ios' && _asyncStorage.default.setItem('air.com.user', JSON.stringify({
user_id: userId
}), function () {});
}
function getUserName() {
return _KV_PAIRS_._userName;
}
function setUserName(userName) {
setByKeyValue('_userName', userName);
}
function getDeviceStates() {
return _KV_PAIRS_._mac2DeviceState;
}
function getSelectedServer() {
return _KV_PAIRS_._selectedServer;
}
function setSelectedServer(server) {
_KV_PAIRS_._selectedServer = server;
var domain = server.app.domain;
var str = JSON.stringify(server);
if (domain.indexOf('http://') < 0) {
domain = 'http://' + domain;
}
_reactNative.Platform.OS === 'ios' && _asyncStorage.default.setItem('domain', domain, function () {});
asyncSet('_selectedServer', str, function () {});
}
function getId2DevicesMap() {
return _KV_PAIRS_._id2Device;
}
function setId2DevicesMap(map) {
_KV_PAIRS_._id2Device = map;
var str = JSON.stringify(map);
asyncSet('_id2Device', str, function () {});
}
function setDeviceStates(states) {
_KV_PAIRS_._mac2DeviceState = states;
var str = JSON.stringify(states);
asyncSet('_mac2DeviceState', str, function () {
_reactNative.Platform.OS === 'ios' && _asyncStorage.default.setItem('_mac2DeviceState', str, function () {});
});
}
function getSparrowMap() {
return _KV_PAIRS_._sparrowMap;
}
function setSparrowMap(map) {
_KV_PAIRS_._sparrowMap = map;
var str = JSON.stringify(map);
asyncSet('_sparrowMap', str, function () {});
}
function getPrefStandard() {
return _KV_PAIRS_._prefStandard;
}
function setPrefStandard(standard) {
setByKeyValue('_prefStandard', standard);
}
function getPrefShowHomeAdvice() {
return parseInt(_KV_PAIRS_._prefShowHomeAdvice) > 0;
}
function setPrefShowHomeAdvice(pref) {
setByKeyValue('_prefShowHomeAdvice', pref);
}
function getPrefTemperatureUnit() {
return _KV_PAIRS_._prefTemperatureUnit;
}
function setPrefTemperatureUnit(unit) {
setByKeyValue('_prefTemperatureUnit', unit);
}
function getPrefTVOCUnit() {
return _KV_PAIRS_._prefTvocUnit;
}
function setLocalWeatherOn(on) {
setByKeyValue('_localWeatherOn', on ? '1' : '0');
}
function getLocalWeatherOn() {
return _KV_PAIRS_._localWeatherOn;
}
function setLocalCityId(cityId) {
setByKeyValue('_localCityId', cityId);
}
function getLocalCityId() {
return _KV_PAIRS_._localCityId;
}
function setPrefTVOCUnit(unit) {
setByKeyValue('_prefTvocUnit', unit);
}
function initKeyValues(cb) {
_asyncStorage.default.multiGet(Object.keys(_KV_PAIRS_), function (err, stores) {
if (err) {
cb();
return;
}
stores.map(function (store, index) {
var val = store[1];
if (val === null) {} else {
var k = store[0];
switch (k) {
case '_mac2DeviceState':
case '_sparrowMap':
case '_id2Device':
case '_selectedServer':
val = JSON.parse(val);
break;
default:
break;
}
_KV_PAIRS_[k] = val;
}
});
cb();
});
}
function setup(cb) {
if (_reactNative.Platform.OS === 'ios') {
_reactNative.NativeModules.SharedUserDefaults.setGroupId('group.com.cleargrass.app.Air.Widget', function () {
initKeyValues(cb);
});
} else {
initKeyValues(cb);
}
}
function asyncGet(key, cb) {
_asyncStorage.default.getItem(key, function (err, result) {
if (result) {
try {
cb(null, JSON.parse(result));
} catch (e) {
cb(e, null);
}
} else {
cb(null, null);
}
});
}
function asyncSet(key, value, cb) {
_asyncStorage.default.setItem(key, value, cb || function () {});
}
function asyncRemove(key, cb) {
_asyncStorage.default.removeItem(key, cb || function () {});
}
function userLogon() {
var userId = getUserId();
return userId && userId.length > 0;
}
function getGooseReportedTimestamps(mac, onResponse) {
_asyncStorage.default.getItem('goose_history_' + mac, function (err, value) {
if (!err && value) {
onResponse(value.split(',').map(function (v) {
return parseInt(v, 10);
}));
} else {
onResponse([]);
}
});
}
function setGooseReportedTimestamps(mac, timestamps) {
if (timestamps.length > 200) {
timestamps.splice(0, timestamps.length - 200);
}
asyncSet('goose_history_' + mac, timestamps.join(','), function () {});
}
var _default = {
asyncGet: asyncGet,
asyncSet: asyncSet,
asyncRemove: asyncRemove,
setup: setup,
setPhoneId: setPhoneId,
getPhoneId: getPhoneId,
getPrefStandard: getPrefStandard,
setPrefStandard: setPrefStandard,
getDeviceStates: getDeviceStates,
setDeviceStates: setDeviceStates,
getPrefTemperatureUnit: getPrefTemperatureUnit,
setPrefTemperatureUnit: setPrefTemperatureUnit,
getPrefTVOCUnit: getPrefTVOCUnit,
setPrefTVOCUnit: setPrefTVOCUnit,
getPrefShowHomeAdvice: getPrefShowHomeAdvice,
setPrefShowHomeAdvice: setPrefShowHomeAdvice,
getUserId: getUserId,
setUserId: setUserId,
getUserName: getUserName,
setUserName: setUserName,
getLocalWeatherOn: getLocalWeatherOn,
setLocalWeatherOn: setLocalWeatherOn,
getLocalCityId: getLocalCityId,
setLocalCityId: setLocalCityId,
userLogon: userLogon,
setGooseReportedTimestamps: setGooseReportedTimestamps,
getGooseReportedTimestamps: getGooseReportedTimestamps,
getSparrowMap: getSparrowMap,
setSparrowMap: setSparrowMap,
setId2DevicesMap: setId2DevicesMap,
getId2DevicesMap: getId2DevicesMap,
getSelectedServer: getSelectedServer,
setSelectedServer: setSelectedServer,
getByKey: getByKey,
setByKeyValue: setByKeyValue
};
exports.default = _default;
},10067,[14305,10297,10070,10033]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
var _interopRequireDefault = _$$_REQUIRE(_dependencyMap[0]);
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "useAsyncStorage", {
enumerable: true,
get: function get() {
return _hooks.useAsyncStorage;
}
});
exports.default = undefined;
var _AsyncStorage = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[1]));
var _hooks = _$$_REQUIRE(_dependencyMap[2]);
var _default = _AsyncStorage.default;
exports.default = _default;
},10070,[14305,10073,10079]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var _interopRequireDefault = _$$_REQUIRE(_dependencyMap[0]);
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = undefined;
var _slicedToArray2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[1]));
var _RCTAsyncStorage = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[2]));
if (!_RCTAsyncStorage.default) {
throw new Error("[@RNC/AsyncStorage]: NativeModule: AsyncStorage is null.\n\nTo fix this issue try these steps:\n\n \u2022 Run `react-native link @react-native-community/async-storage` in the project root.\n\n \u2022 Rebuild and restart the app.\n\n \u2022 Run the packager with `--reset-cache` flag.\n\n \u2022 If you are using CocoaPods on iOS, run `pod install` in the `ios` directory and then rebuild and re-run the app.\n\n \u2022 If this happens while testing with Jest, check out docs how to integrate AsyncStorage with it: https://github.com/react-native-community/async-storage/blob/master/docs/Jest-integration.md\n\nIf none of these fix the issue, please open an issue on the Github repository: https://github.com/react-native-community/react-native-async-storage/issues \n");
}
function checkValidInput(usedKey, value) {
var isValuePassed = arguments.length > 1;
if (typeof usedKey !== 'string') {}
if (isValuePassed && typeof value !== 'string') {
if (value == null) {
throw new Error("[AsyncStorage] Passing null/undefined as value is not supported. If you want to remove value, Use .remove method instead.\nPassed value: " + value + "\nPassed key: " + usedKey + "\n");
} else {}
}
}
var AsyncStorage = {
_getRequests: [],
_getKeys: [],
_immediate: null,
getItem: function getItem(key, callback) {
return new Promise(function (resolve, reject) {
checkValidInput(key);
_RCTAsyncStorage.default.multiGet([key], function (errors, result) {
var value = result && result[0] && result[0][1] ? result[0][1] : null;
var errs = convertErrors(errors);
callback && callback(errs && errs[0], value);
if (errs) {
reject(errs[0]);
} else {
resolve(value);
}
});
});
},
setItem: function setItem(key, value, callback) {
return new Promise(function (resolve, reject) {
checkValidInput(key, value);
_RCTAsyncStorage.default.multiSet([[key, value]], function (errors) {
var errs = convertErrors(errors);
callback && callback(errs && errs[0]);
if (errs) {
reject(errs[0]);
} else {
resolve(null);
}
});
});
},
removeItem: function removeItem(key, callback) {
return new Promise(function (resolve, reject) {
checkValidInput(key);
_RCTAsyncStorage.default.multiRemove([key], function (errors) {
var errs = convertErrors(errors);
callback && callback(errs && errs[0]);
if (errs) {
reject(errs[0]);
} else {
resolve(null);
}
});
});
},
mergeItem: function mergeItem(key, value, callback) {
return new Promise(function (resolve, reject) {
checkValidInput(key, value);
_RCTAsyncStorage.default.multiMerge([[key, value]], function (errors) {
var errs = convertErrors(errors);
callback && callback(errs && errs[0]);
if (errs) {
reject(errs[0]);
} else {
resolve(null);
}
});
});
},
clear: function clear(callback) {
return new Promise(function (resolve, reject) {
_RCTAsyncStorage.default.clear(function (error) {
var err = convertError(error);
callback && callback(err);
if (err) {
reject(err);
} else {
resolve(null);
}
});
});
},
getAllKeys: function getAllKeys(callback) {
return new Promise(function (resolve, reject) {
_RCTAsyncStorage.default.getAllKeys(function (error, keys) {
var err = convertError(error);
callback && callback(err, keys);
if (err) {
reject(err);
} else {
resolve(keys);
}
});
});
},
flushGetRequests: function flushGetRequests() {
var getRequests = this._getRequests;
var getKeys = this._getKeys;
this._getRequests = [];
this._getKeys = [];
_RCTAsyncStorage.default.multiGet(getKeys, function (errors, result) {
var map = {};
result && result.forEach(function (_ref) {
var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
key = _ref2[0],
value = _ref2[1];
map[key] = value;
return value;
});
var reqLength = getRequests.length;
for (var i = 0; i < reqLength; i++) {
var request = getRequests[i];
var requestKeys = request.keys;
var requestResult = requestKeys.map(function (key) {
return [key, map[key]];
});
request.callback && request.callback(null, requestResult);
request.resolve && request.resolve(requestResult);
}
});
},
multiGet: function multiGet(keys, callback) {
var _this = this;
if (!this._immediate) {
this._immediate = setImmediate(function () {
_this._immediate = null;
_this.flushGetRequests();
});
}
var getRequest = {
keys: keys,
callback: callback,
keyIndex: this._getKeys.length,
resolve: null,
reject: null
};
var promiseResult = new Promise(function (resolve, reject) {
getRequest.resolve = resolve;
getRequest.reject = reject;
});
this._getRequests.push(getRequest);
keys.forEach(function (key) {
if (_this._getKeys.indexOf(key) === -1) {
_this._getKeys.push(key);
}
});
return promiseResult;
},
multiSet: function multiSet(keyValuePairs, callback) {
return new Promise(function (resolve, reject) {
keyValuePairs.forEach(function (_ref3) {
var _ref4 = (0, _slicedToArray2.default)(_ref3, 2),
key = _ref4[0],
value = _ref4[1];
checkValidInput(key, value);
});
_RCTAsyncStorage.default.multiSet(keyValuePairs, function (errors) {
var error = convertErrors(errors);
callback && callback(error);
if (error) {
reject(error);
} else {
resolve(null);
}
});
});
},
multiRemove: function multiRemove(keys, callback) {
return new Promise(function (resolve, reject) {
keys.forEach(function (key) {
return checkValidInput(key);
});
_RCTAsyncStorage.default.multiRemove(keys, function (errors) {
var error = convertErrors(errors);
callback && callback(error);
if (error) {
reject(error);
} else {
resolve(null);
}
});
});
},
multiMerge: function multiMerge(keyValuePairs, callback) {
return new Promise(function (resolve, reject) {
_RCTAsyncStorage.default.multiMerge(keyValuePairs, function (errors) {
var error = convertErrors(errors);
callback && callback(error);
if (error) {
reject(error);
} else {
resolve(null);
}
});
});
}
};
if (!_RCTAsyncStorage.default.multiMerge) {
delete AsyncStorage.mergeItem;
delete AsyncStorage.multiMerge;
}
function convertErrors(errs) {
if (!errs || Array.isArray(errs) && errs.length === 0) {
return null;
}
return (Array.isArray(errs) ? errs : [errs]).map(function (e) {
return convertError(e);
});
}
function convertError(error) {
if (!error) {
return null;
}
var out = new Error(error.message);
out.key = error.key;
return out;
}
var _default = AsyncStorage;
exports.default = _default;
},10073,[14305,14347,10076]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = undefined;
var _require = _$$_REQUIRE(_dependencyMap[0]),
NativeModules = _require.NativeModules;
var RCTAsyncStorage = NativeModules.PlatformLocalStorage || NativeModules.RNC_AsyncSQLiteDBStorage || NativeModules.RNCAsyncStorage;
var _default = RCTAsyncStorage;
exports.default = _default;
},10076,[10033]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
var _interopRequireDefault = _$$_REQUIRE(_dependencyMap[0]);
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.useAsyncStorage = useAsyncStorage;
var _AsyncStorage = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[1]));
function useAsyncStorage(key) {
return {
getItem: function getItem() {
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return _AsyncStorage.default.getItem.apply(_AsyncStorage.default, [key].concat(args));
},
setItem: function setItem() {
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
args[_key2] = arguments[_key2];
}
return _AsyncStorage.default.setItem.apply(_AsyncStorage.default, [key].concat(args));
},
mergeItem: function mergeItem() {
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
args[_key3] = arguments[_key3];
}
return _AsyncStorage.default.mergeItem.apply(_AsyncStorage.default, [key].concat(args));
},
removeItem: function removeItem() {
for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
args[_key4] = arguments[_key4];
}
return _AsyncStorage.default.removeItem.apply(_AsyncStorage.default, [key].concat(args));
}
};
}
},10079,[14305,10073]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
var _interopRequireDefault = _$$_REQUIRE(_dependencyMap[0]);
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = undefined;
var _MHLocalizableString = _$$_REQUIRE(_dependencyMap[1]);
var _moment = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[2]));
var _miot = _$$_REQUIRE(_dependencyMap[3]);
function formatCardTime(timestamp) {
if (!timestamp) {
return '--';
}
var now = new Date().getTime() / 1000;
var mins = Math.floor(Math.abs(now - timestamp) / 60);
var hours = Math.floor(mins / 60);
if (mins < 3) {
return _MHLocalizableString.MainLocalizableString['now'];
}
var pm = mins === 1 ? 'minute' : 'minutes';
var ph = hours === 1 ? 'hour' : 'hours';
if (timestamp > now) {
return _MHLocalizableString.MainLocalizableString['now'];
} else {
if (hours < 1) {
return mins + _MHLocalizableString.MainLocalizableString['pre_' + pm + '_time'];
} else if (hours < 24) {
return hours + _MHLocalizableString.MainLocalizableString['pre_' + ph + '_time'];
} else {
return dateAndMonth(timestamp) + ' ' + hourAndMinutes(timestamp);
}
}
}
function weekdaysDisplay(value) {
var values = ('' + value).split(',');
if (values.length === 7) {
return _MHLocalizableString.MainLocalizableString['dove_alarm_everyday'];
}
if (values.length === 5 && values.indexOf('6') < 0 && values.indexOf('7') < 0) {
return _MHLocalizableString.MainLocalizableString['dove_alarm_weekday'];
}
if (values.length === 2 && values.indexOf('6') >= 0 && values.indexOf('7') >= 0) {
return _MHLocalizableString.MainLocalizableString['dove_alarm_weekend'];
}
if (values.length === 1) {
return _MHLocalizableString.MainLocalizableString['dove_alarm_repeat_values'].split(',')[values[0]];
}
var joinedValues = _MHLocalizableString.MainLocalizableString['dove_alarm_repeat_values_join'].split(',');
var displayed = [];
for (var k in joinedValues) {
if (values.indexOf(k) >= 0) {
displayed.push(joinedValues[k]);
}
}
return displayed.join(' ');
}
function pad2digits(d) {
return d < 10 ? '0' + d : d;
}
function hourAndMinutes(timestamp) {
var d = new Date(timestamp * 1000);
var h = d.getHours();
var m = d.getMinutes();
var is24Hour = true;
{
return h + ':' + pad2digits(m);
}
}
function hour24AndMinutes(timestamp) {
var d = new Date(timestamp * 1000);
var h = d.getHours();
var m = d.getMinutes();
return h + ':' + pad2digits(m);
}
function getHour(timestamp) {
var is24Hour = true;
var format = 'H:mm';
return _moment.default.unix(timestamp).format(format);
}
function getDatetime(timestamp) {
var d = new Date(timestamp * 1000);
var curDate = new Date();
var time = hourAndMinutes(timestamp);
if (d.getMonth() === curDate.getMonth() && d.getDate() === curDate.getDate()) {
return time;
} else {
var lan = _miot.Host.locale.language;
var format = 'M/D';
if (lan === 'en') {
format = 'MMM D';
return time + ', ' + _moment.default.unix(timestamp).format(format);
}
return _moment.default.unix(timestamp).format(format) + ', ' + time;
}
}
function dateAndMonth(timestamp) {
var d = new Date(timestamp * 1000);
var h = d.getDate();
var m = d.getMonth() + 1;
var curDate = new Date();
if (curDate.getDate() === h && curDate.getMonth() === m - 1) {
return _MHLocalizableString.MainLocalizableString['today'];
} else {
return m + '/' + h;
}
}
function hourAndMinuteDigits(hour, minute) {
return hour + ':' + pad2digits(minute);
}
function hourAndMinute(h, m, is24Hour) {
if (is24Hour) {
return {
time: h + ':' + pad2digits(m)
};
} else {
var ap = _MHLocalizableString.MainLocalizableString['dove_time_am'];
var hour12 = h % 12 || 12;
if (h >= 12) {
ap = _MHLocalizableString.MainLocalizableString['dove_time_pm'];
}
return {
time: hour12 + ':' + pad2digits(m),
ampm: ap
};
}
}
function displayAlarmTime(alarm_hour, alarm_minute, show24hours) {
var _hourAndMinute = hourAndMinute(alarm_hour, alarm_minute, show24hours),
time = _hourAndMinute.time,
ampm = _hourAndMinute.ampm;
if (show24hours) {
return time;
} else {
if (_miot.Host.locale.language === 'en') {
return time + ampm;
} else {
return ampm + time;
}
}
}
function currentTimestamp() {
return Math.floor(new Date().getTime() / 1000);
}
function formatShareTime(timestamp) {
if (!timestamp) {
return '--';
}
var d = new Date(timestamp * 1000);
var month = d.getMonth();
var date = d.getDate();
return month + 1 + '/' + date + ' ' + hourAndMinutes(timestamp);
}
function getDurationTime(duration) {
if (duration < 0) {
return '00:00';
} else {
var hours = parseInt(duration / 3600);
var mins = parseInt(duration % 3600 / 60);
var secs = parseInt(duration % 60);
if (hours > 0) {
return pad2digits(hours) + ':' + pad2digits(mins) + ':' + pad2digits(secs);
} else {
return pad2digits(mins) + ':' + pad2digits(secs);
}
}
}
var _default = {
formatCardTime: formatCardTime,
weekdaysDisplay: weekdaysDisplay,
hourAndMinutes: hourAndMinutes,
hour24AndMinutes: hour24AndMinutes,
dateAndMonth: dateAndMonth,
hourAndMinuteDigits: hourAndMinuteDigits,
displayAlarmTime: displayAlarmTime,
formatShareTime: formatShareTime,
currentTimestamp: currentTimestamp,
getHour: getHour,
getDatetime: getDatetime,
getDurationTime: getDurationTime
};
exports.default = _default;
},10082,[14305,10013,10085,10074]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
var _extends = _$$_REQUIRE(_dependencyMap[0]);
;
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : global.moment = factory();
})(this, function () {
'use strict';
var hookCallback;
function hooks() {
return hookCallback.apply(null, arguments);
}
function setHookCallback(callback) {
hookCallback = callback;
}
function isArray(input) {
return input instanceof Array || Object.prototype.toString.call(input) === '[object Array]';
}
function isObject(input) {
return input != null && Object.prototype.toString.call(input) === '[object Object]';
}
function hasOwnProp(a, b) {
return Object.prototype.hasOwnProperty.call(a, b);
}
function isObjectEmpty(obj) {
if (Object.getOwnPropertyNames) {
return Object.getOwnPropertyNames(obj).length === 0;
} else {
var k;
for (k in obj) {
if (hasOwnProp(obj, k)) {
return false;
}
}
return true;
}
}
function isUndefined(input) {
return input === undefined;
}
function isNumber(input) {
return typeof input === 'number' || Object.prototype.toString.call(input) === '[object Number]';
}
function isDate(input) {
return input instanceof Date || Object.prototype.toString.call(input) === '[object Date]';
}
function map(arr, fn) {
var res = [],
i;
for (i = 0; i < arr.length; ++i) {
res.push(fn(arr[i], i));
}
return res;
}
function extend(a, b) {
for (var i in b) {
if (hasOwnProp(b, i)) {
a[i] = b[i];
}
}
if (hasOwnProp(b, 'toString')) {
a.toString = b.toString;
}
if (hasOwnProp(b, 'valueOf')) {
a.valueOf = b.valueOf;
}
return a;
}
function createUTC(input, format, locale, strict) {
return createLocalOrUTC(input, format, locale, strict, true).utc();
}
function defaultParsingFlags() {
return {
empty: false,
unusedTokens: [],
unusedInput: [],
overflow: -2,
charsLeftOver: 0,
nullInput: false,
invalidEra: null,
invalidMonth: null,
invalidFormat: false,
userInvalidated: false,
iso: false,
parsedDateParts: [],
era: null,
meridiem: null,
rfc2822: false,
weekdayMismatch: false
};
}
function getParsingFlags(m) {
if (m._pf == null) {
m._pf = defaultParsingFlags();
}
return m._pf;
}
var some;
if (Array.prototype.some) {
some = Array.prototype.some;
} else {
some = function some(fun) {
var t = Object(this),
len = t.length >>> 0,
i;
for (i = 0; i < len; i++) {
if (i in t && fun.call(this, t[i], i, t)) {
return true;
}
}
return false;
};
}
function isValid(m) {
if (m._isValid == null) {
var flags = getParsingFlags(m),
parsedParts = some.call(flags.parsedDateParts, function (i) {
return i != null;
}),
isNowValid = !isNaN(m._d.getTime()) && flags.overflow < 0 && !flags.empty && !flags.invalidEra && !flags.invalidMonth && !flags.invalidWeekday && !flags.weekdayMismatch && !flags.nullInput && !flags.invalidFormat && !flags.userInvalidated && (!flags.meridiem || flags.meridiem && parsedParts);
if (m._strict) {
isNowValid = isNowValid && flags.charsLeftOver === 0 && flags.unusedTokens.length === 0 && flags.bigHour === undefined;
}
if (Object.isFrozen == null || !Object.isFrozen(m)) {
m._isValid = isNowValid;
} else {
return isNowValid;
}
}
return m._isValid;
}
function createInvalid(flags) {
var m = createUTC(NaN);
if (flags != null) {
extend(getParsingFlags(m), flags);
} else {
getParsingFlags(m).userInvalidated = true;
}
return m;
}
var momentProperties = hooks.momentProperties = [],
updateInProgress = false;
function copyConfig(to, from) {
var i, prop, val;
if (!isUndefined(from._isAMomentObject)) {
to._isAMomentObject = from._isAMomentObject;
}
if (!isUndefined(from._i)) {
to._i = from._i;
}
if (!isUndefined(from._f)) {
to._f = from._f;
}
if (!isUndefined(from._l)) {
to._l = from._l;
}
if (!isUndefined(from._strict)) {
to._strict = from._strict;
}
if (!isUndefined(from._tzm)) {
to._tzm = from._tzm;
}
if (!isUndefined(from._isUTC)) {
to._isUTC = from._isUTC;
}
if (!isUndefined(from._offset)) {
to._offset = from._offset;
}
if (!isUndefined(from._pf)) {
to._pf = getParsingFlags(from);
}
if (!isUndefined(from._locale)) {
to._locale = from._locale;
}
if (momentProperties.length > 0) {
for (i = 0; i < momentProperties.length; i++) {
prop = momentProperties[i];
val = from[prop];
if (!isUndefined(val)) {
to[prop] = val;
}
}
}
return to;
}
function Moment(config) {
copyConfig(this, config);
this._d = new Date(config._d != null ? config._d.getTime() : NaN);
if (!this.isValid()) {
this._d = new Date(NaN);
}
if (updateInProgress === false) {
updateInProgress = true;
hooks.updateOffset(this);
updateInProgress = false;
}
}
function isMoment(obj) {
return obj instanceof Moment || obj != null && obj._isAMomentObject != null;
}
function warn(msg) {
if (hooks.suppressDeprecationWarnings === false && typeof console !== 'undefined' && function () {}) {}
}
function deprecate(msg, fn) {
var firstTime = true;
return extend(function () {
if (hooks.deprecationHandler != null) {
hooks.deprecationHandler(null, msg);
}
if (firstTime) {
var args = [],
arg,
i,
key;
for (i = 0; i < arguments.length; i++) {
arg = '';
if (typeof arguments[i] === 'object') {
arg += '\n[' + i + '] ';
for (key in arguments[0]) {
if (hasOwnProp(arguments[0], key)) {
arg += key + ': ' + arguments[0][key] + ', ';
}
}
arg = arg.slice(0, -2);
} else {
arg = arguments[i];
}
args.push(arg);
}
warn(msg + '\nArguments: ' + Array.prototype.slice.call(args).join('') + '\n' + new Error().stack);
firstTime = false;
}
return fn.apply(this, arguments);
}, fn);
}
var deprecations = {};
function deprecateSimple(name, msg) {
if (hooks.deprecationHandler != null) {
hooks.deprecationHandler(name, msg);
}
if (!deprecations[name]) {
warn(msg);
deprecations[name] = true;
}
}
hooks.suppressDeprecationWarnings = false;
hooks.deprecationHandler = null;
function isFunction(input) {
return typeof Function !== 'undefined' && input instanceof Function || Object.prototype.toString.call(input) === '[object Function]';
}
function set(config) {
var prop, i;
for (i in config) {
if (hasOwnProp(config, i)) {
prop = config[i];
if (isFunction(prop)) {
this[i] = prop;
} else {
this['_' + i] = prop;
}
}
}
this._config = config;
this._dayOfMonthOrdinalParseLenient = new RegExp((this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) + '|' + /\d{1,2}/.source);
}
function mergeConfigs(parentConfig, childConfig) {
var res = extend({}, parentConfig),
prop;
for (prop in childConfig) {
if (hasOwnProp(childConfig, prop)) {
if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {
res[prop] = {};
extend(res[prop], parentConfig[prop]);
extend(res[prop], childConfig[prop]);
} else if (childConfig[prop] != null) {
res[prop] = childConfig[prop];
} else {
delete res[prop];
}
}
}
for (prop in parentConfig) {
if (hasOwnProp(parentConfig, prop) && !hasOwnProp(childConfig, prop) && isObject(parentConfig[prop])) {
res[prop] = extend({}, res[prop]);
}
}
return res;
}
function Locale(config) {
if (config != null) {
this.set(config);
}
}
var keys;
if (Object.keys) {
keys = Object.keys;
} else {
keys = function keys(obj) {
var i,
res = [];
for (i in obj) {
if (hasOwnProp(obj, i)) {
res.push(i);
}
}
return res;
};
}
var defaultCalendar = {
sameDay: '[Today at] LT',
nextDay: '[Tomorrow at] LT',
nextWeek: 'dddd [at] LT',
lastDay: '[Yesterday at] LT',
lastWeek: '[Last] dddd [at] LT',
sameElse: 'L'
};
function calendar(key, mom, now) {
var output = this._calendar[key] || this._calendar['sameElse'];
return isFunction(output) ? output.call(mom, now) : output;
}
function zeroFill(number, targetLength, forceSign) {
var absNumber = '' + Math.abs(number),
zerosToFill = targetLength - absNumber.length,
sign = number >= 0;
return (sign ? forceSign ? '+' : '' : '-') + Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber;
}
var formattingTokens = /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,
localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,
formatFunctions = {},
formatTokenFunctions = {};
function addFormatToken(token, padded, ordinal, callback) {
var func = callback;
if (typeof callback === 'string') {
func = function func() {
return this[callback]();
};
}
if (token) {
formatTokenFunctions[token] = func;
}
if (padded) {
formatTokenFunctions[padded[0]] = function () {
return zeroFill(func.apply(this, arguments), padded[1], padded[2]);
};
}
if (ordinal) {
formatTokenFunctions[ordinal] = function () {
return this.localeData().ordinal(func.apply(this, arguments), token);
};
}
}
function removeFormattingTokens(input) {
if (input.match(/\[[\s\S]/)) {
return input.replace(/^\[|\]$/g, '');
}
return input.replace(/\\/g, '');
}
function makeFormatFunction(format) {
var array = format.match(formattingTokens),
i,
length;
for (i = 0, length = array.length; i < length; i++) {
if (formatTokenFunctions[array[i]]) {
array[i] = formatTokenFunctions[array[i]];
} else {
array[i] = removeFormattingTokens(array[i]);
}
}
return function (mom) {
var output = '',
i;
for (i = 0; i < length; i++) {
output += isFunction(array[i]) ? array[i].call(mom, format) : array[i];
}
return output;
};
}
function formatMoment(m, format) {
if (!m.isValid()) {
return m.localeData().invalidDate();
}
format = expandFormat(format, m.localeData());
formatFunctions[format] = formatFunctions[format] || makeFormatFunction(format);
return formatFunctions[format](m);
}
function expandFormat(format, locale) {
var i = 5;
function replaceLongDateFormatTokens(input) {
return locale.longDateFormat(input) || input;
}
localFormattingTokens.lastIndex = 0;
while (i >= 0 && localFormattingTokens.test(format)) {
format = format.replace(localFormattingTokens, replaceLongDateFormatTokens);
localFormattingTokens.lastIndex = 0;
i -= 1;
}
return format;
}
var defaultLongDateFormat = {
LTS: 'h:mm:ss A',
LT: 'h:mm A',
L: 'MM/DD/YYYY',
LL: 'MMMM D, YYYY',
LLL: 'MMMM D, YYYY h:mm A',
LLLL: 'dddd, MMMM D, YYYY h:mm A'
};
function longDateFormat(key) {
var format = this._longDateFormat[key],
formatUpper = this._longDateFormat[key.toUpperCase()];
if (format || !formatUpper) {
return format;
}
this._longDateFormat[key] = formatUpper.match(formattingTokens).map(function (tok) {
if (tok === 'MMMM' || tok === 'MM' || tok === 'DD' || tok === 'dddd') {
return tok.slice(1);
}
return tok;
}).join('');
return this._longDateFormat[key];
}
var defaultInvalidDate = 'Invalid date';
function invalidDate() {
return this._invalidDate;
}
var defaultOrdinal = '%d',
defaultDayOfMonthOrdinalParse = /\d{1,2}/;
function ordinal(number) {
return this._ordinal.replace('%d', number);
}
var defaultRelativeTime = {
future: 'in %s',
past: '%s ago',
s: 'a few seconds',
ss: '%d seconds',
m: 'a minute',
mm: '%d minutes',
h: 'an hour',
hh: '%d hours',
d: 'a day',
dd: '%d days',
w: 'a week',
ww: '%d weeks',
M: 'a month',
MM: '%d months',
y: 'a year',
yy: '%d years'
};
function relativeTime(number, withoutSuffix, string, isFuture) {
var output = this._relativeTime[string];
return isFunction(output) ? output(number, withoutSuffix, string, isFuture) : output.replace(/%d/i, number);
}
function pastFuture(diff, output) {
var format = this._relativeTime[diff > 0 ? 'future' : 'past'];
return isFunction(format) ? format(output) : format.replace(/%s/i, output);
}
var aliases = {};
function addUnitAlias(unit, shorthand) {
var lowerCase = unit.toLowerCase();
aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;
}
function normalizeUnits(units) {
return typeof units === 'string' ? aliases[units] || aliases[units.toLowerCase()] : undefined;
}
function normalizeObjectUnits(inputObject) {
var normalizedInput = {},
normalizedProp,
prop;
for (prop in inputObject) {
if (hasOwnProp(inputObject, prop)) {
normalizedProp = normalizeUnits(prop);
if (normalizedProp) {
normalizedInput[normalizedProp] = inputObject[prop];
}
}
}
return normalizedInput;
}
var priorities = {};
function addUnitPriority(unit, priority) {
priorities[unit] = priority;
}
function getPrioritizedUnits(unitsObj) {
var units = [],
u;
for (u in unitsObj) {
if (hasOwnProp(unitsObj, u)) {
units.push({
unit: u,
priority: priorities[u]
});
}
}
units.sort(function (a, b) {
return a.priority - b.priority;
});
return units;
}
function isLeapYear(year) {
return year % 4 === 0 && year % 100 !== 0 || year % 400 === 0;
}
function absFloor(number) {
if (number < 0) {
return Math.ceil(number) || 0;
} else {
return Math.floor(number);
}
}
function toInt(argumentForCoercion) {
var coercedNumber = +argumentForCoercion,
value = 0;
if (coercedNumber !== 0 && isFinite(coercedNumber)) {
value = absFloor(coercedNumber);
}
return value;
}
function makeGetSet(unit, keepTime) {
return function (value) {
if (value != null) {
set$1(this, unit, value);
hooks.updateOffset(this, keepTime);
return this;
} else {
return get(this, unit);
}
};
}
function get(mom, unit) {
return mom.isValid() ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]() : NaN;
}
function set$1(mom, unit, value) {
if (mom.isValid() && !isNaN(value)) {
if (unit === 'FullYear' && isLeapYear(mom.year()) && mom.month() === 1 && mom.date() === 29) {
value = toInt(value);
mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value, mom.month(), daysInMonth(value, mom.month()));
} else {
mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);
}
}
}
function stringGet(units) {
units = normalizeUnits(units);
if (isFunction(this[units])) {
return this[units]();
}
return this;
}
function stringSet(units, value) {
if (typeof units === 'object') {
units = normalizeObjectUnits(units);
var prioritized = getPrioritizedUnits(units),
i;
for (i = 0; i < prioritized.length; i++) {
this[prioritized[i].unit](units[prioritized[i].unit]);
}
} else {
units = normalizeUnits(units);
if (isFunction(this[units])) {
return this[units](value);
}
}
return this;
}
var match1 = /\d/,
match2 = /\d\d/,
match3 = /\d{3}/,
match4 = /\d{4}/,
match6 = /[+-]?\d{6}/,
match1to2 = /\d\d?/,
match3to4 = /\d\d\d\d?/,
match5to6 = /\d\d\d\d\d\d?/,
match1to3 = /\d{1,3}/,
match1to4 = /\d{1,4}/,
match1to6 = /[+-]?\d{1,6}/,
matchUnsigned = /\d+/,
matchSigned = /[+-]?\d+/,
matchOffset = /Z|[+-]\d\d:?\d\d/gi,
matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi,
matchTimestamp = /[+-]?\d+(\.\d{1,3})?/,
matchWord = /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,
regexes;
regexes = {};
function addRegexToken(token, regex, strictRegex) {
regexes[token] = isFunction(regex) ? regex : function (isStrict, localeData) {
return isStrict && strictRegex ? strictRegex : regex;
};
}
function getParseRegexForToken(token, config) {
if (!hasOwnProp(regexes, token)) {
return new RegExp(unescapeFormat(token));
}
return regexes[token](config._strict, config._locale);
}
function unescapeFormat(s) {
return regexEscape(s.replace('\\', '').replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function (matched, p1, p2, p3, p4) {
return p1 || p2 || p3 || p4;
}));
}
function regexEscape(s) {
return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
}
var tokens = {};
function addParseToken(token, callback) {
var i,
func = callback;
if (typeof token === 'string') {
token = [token];
}
if (isNumber(callback)) {
func = function func(input, array) {
array[callback] = toInt(input);
};
}
for (i = 0; i < token.length; i++) {
tokens[token[i]] = func;
}
}
function addWeekParseToken(token, callback) {
addParseToken(token, function (input, array, config, token) {
config._w = config._w || {};
callback(input, config._w, config, token);
});
}
function addTimeToArrayFromToken(token, input, config) {
if (input != null && hasOwnProp(tokens, token)) {
tokens[token](input, config._a, config, token);
}
}
var YEAR = 0,
MONTH = 1,
DATE = 2,
HOUR = 3,
MINUTE = 4,
SECOND = 5,
MILLISECOND = 6,
WEEK = 7,
WEEKDAY = 8;
function mod(n, x) {
return (n % x + x) % x;
}
var indexOf;
if (Array.prototype.indexOf) {
indexOf = Array.prototype.indexOf;
} else {
indexOf = function indexOf(o) {
var i;
for (i = 0; i < this.length; ++i) {
if (this[i] === o) {
return i;
}
}
return -1;
};
}
function daysInMonth(year, month) {
if (isNaN(year) || isNaN(month)) {
return NaN;
}
var modMonth = mod(month, 12);
year += (month - modMonth) / 12;
return modMonth === 1 ? isLeapYear(year) ? 29 : 28 : 31 - modMonth % 7 % 2;
}
addFormatToken('M', ['MM', 2], 'Mo', function () {
return this.month() + 1;
});
addFormatToken('MMM', 0, 0, function (format) {
return this.localeData().monthsShort(this, format);
});
addFormatToken('MMMM', 0, 0, function (format) {
return this.localeData().months(this, format);
});
addUnitAlias('month', 'M');
addUnitPriority('month', 8);
addRegexToken('M', match1to2);
addRegexToken('MM', match1to2, match2);
addRegexToken('MMM', function (isStrict, locale) {
return locale.monthsShortRegex(isStrict);
});
addRegexToken('MMMM', function (isStrict, locale) {
return locale.monthsRegex(isStrict);
});
addParseToken(['M', 'MM'], function (input, array) {
array[MONTH] = toInt(input) - 1;
});
addParseToken(['MMM', 'MMMM'], function (input, array, config, token) {
var month = config._locale.monthsParse(input, token, config._strict);
if (month != null) {
array[MONTH] = month;
} else {
getParsingFlags(config).invalidMonth = input;
}
});
var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),
defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,
defaultMonthsShortRegex = matchWord,
defaultMonthsRegex = matchWord;
function localeMonths(m, format) {
if (!m) {
return isArray(this._months) ? this._months : this._months['standalone'];
}
return isArray(this._months) ? this._months[m.month()] : this._months[(this._months.isFormat || MONTHS_IN_FORMAT).test(format) ? 'format' : 'standalone'][m.month()];
}
function localeMonthsShort(m, format) {
if (!m) {
return isArray(this._monthsShort) ? this._monthsShort : this._monthsShort['standalone'];
}
return isArray(this._monthsShort) ? this._monthsShort[m.month()] : this._monthsShort[MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'][m.month()];
}
function handleStrictParse(monthName, format, strict) {
var i,
ii,
mom,
llc = monthName.toLocaleLowerCase();
if (!this._monthsParse) {
this._monthsParse = [];
this._longMonthsParse = [];
this._shortMonthsParse = [];
for (i = 0; i < 12; ++i) {
mom = createUTC([2000, i]);
this._shortMonthsParse[i] = this.monthsShort(mom, '').toLocaleLowerCase();
this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();
}
}
if (strict) {
if (format === 'MMM') {
ii = indexOf.call(this._shortMonthsParse, llc);
return ii !== -1 ? ii : null;
} else {
ii = indexOf.call(this._longMonthsParse, llc);
return ii !== -1 ? ii : null;
}
} else {
if (format === 'MMM') {
ii = indexOf.call(this._shortMonthsParse, llc);
if (ii !== -1) {
return ii;
}
ii = indexOf.call(this._longMonthsParse, llc);
return ii !== -1 ? ii : null;
} else {
ii = indexOf.call(this._longMonthsParse, llc);
if (ii !== -1) {
return ii;
}
ii = indexOf.call(this._shortMonthsParse, llc);
return ii !== -1 ? ii : null;
}
}
}
function localeMonthsParse(monthName, format, strict) {
var i, mom, regex;
if (this._monthsParseExact) {
return handleStrictParse.call(this, monthName, format, strict);
}
if (!this._monthsParse) {
this._monthsParse = [];
this._longMonthsParse = [];
this._shortMonthsParse = [];
}
for (i = 0; i < 12; i++) {
mom = createUTC([2000, i]);
if (strict && !this._longMonthsParse[i]) {
this._longMonthsParse[i] = new RegExp('^' + this.months(mom, '').replace('.', '') + '$', 'i');
this._shortMonthsParse[i] = new RegExp('^' + this.monthsShort(mom, '').replace('.', '') + '$', 'i');
}
if (!strict && !this._monthsParse[i]) {
regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');
this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');
}
if (strict && format === 'MMMM' && this._longMonthsParse[i].test(monthName)) {
return i;
} else if (strict && format === 'MMM' && this._shortMonthsParse[i].test(monthName)) {
return i;
} else if (!strict && this._monthsParse[i].test(monthName)) {
return i;
}
}
}
function setMonth(mom, value) {
var dayOfMonth;
if (!mom.isValid()) {
return mom;
}
if (typeof value === 'string') {
if (/^\d+$/.test(value)) {
value = toInt(value);
} else {
value = mom.localeData().monthsParse(value);
if (!isNumber(value)) {
return mom;
}
}
}
dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));
mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);
return mom;
}
function getSetMonth(value) {
if (value != null) {
setMonth(this, value);
hooks.updateOffset(this, true);
return this;
} else {
return get(this, 'Month');
}
}
function getDaysInMonth() {
return daysInMonth(this.year(), this.month());
}
function monthsShortRegex(isStrict) {
if (this._monthsParseExact) {
if (!hasOwnProp(this, '_monthsRegex')) {
computeMonthsParse.call(this);
}
if (isStrict) {
return this._monthsShortStrictRegex;
} else {
return this._monthsShortRegex;
}
} else {
if (!hasOwnProp(this, '_monthsShortRegex')) {
this._monthsShortRegex = defaultMonthsShortRegex;
}
return this._monthsShortStrictRegex && isStrict ? this._monthsShortStrictRegex : this._monthsShortRegex;
}
}
function monthsRegex(isStrict) {
if (this._monthsParseExact) {
if (!hasOwnProp(this, '_monthsRegex')) {
computeMonthsParse.call(this);
}
if (isStrict) {
return this._monthsStrictRegex;
} else {
return this._monthsRegex;
}
} else {
if (!hasOwnProp(this, '_monthsRegex')) {
this._monthsRegex = defaultMonthsRegex;
}
return this._monthsStrictRegex && isStrict ? this._monthsStrictRegex : this._monthsRegex;
}
}
function computeMonthsParse() {
function cmpLenRev(a, b) {
return b.length - a.length;
}
var shortPieces = [],
longPieces = [],
mixedPieces = [],
i,
mom;
for (i = 0; i < 12; i++) {
mom = createUTC([2000, i]);
shortPieces.push(this.monthsShort(mom, ''));
longPieces.push(this.months(mom, ''));
mixedPieces.push(this.months(mom, ''));
mixedPieces.push(this.monthsShort(mom, ''));
}
shortPieces.sort(cmpLenRev);
longPieces.sort(cmpLenRev);
mixedPieces.sort(cmpLenRev);
for (i = 0; i < 12; i++) {
shortPieces[i] = regexEscape(shortPieces[i]);
longPieces[i] = regexEscape(longPieces[i]);
}
for (i = 0; i < 24; i++) {
mixedPieces[i] = regexEscape(mixedPieces[i]);
}
this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
this._monthsShortRegex = this._monthsRegex;
this._monthsStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');
this._monthsShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');
}
addFormatToken('Y', 0, 0, function () {
var y = this.year();
return y <= 9999 ? zeroFill(y, 4) : '+' + y;
});
addFormatToken(0, ['YY', 2], 0, function () {
return this.year() % 100;
});
addFormatToken(0, ['YYYY', 4], 0, 'year');
addFormatToken(0, ['YYYYY', 5], 0, 'year');
addFormatToken(0, ['YYYYYY', 6, true], 0, 'year');
addUnitAlias('year', 'y');
addUnitPriority('year', 1);
addRegexToken('Y', matchSigned);
addRegexToken('YY', match1to2, match2);
addRegexToken('YYYY', match1to4, match4);
addRegexToken('YYYYY', match1to6, match6);
addRegexToken('YYYYYY', match1to6, match6);
addParseToken(['YYYYY', 'YYYYYY'], YEAR);
addParseToken('YYYY', function (input, array) {
array[YEAR] = input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);
});
addParseToken('YY', function (input, array) {
array[YEAR] = hooks.parseTwoDigitYear(input);
});
addParseToken('Y', function (input, array) {
array[YEAR] = parseInt(input, 10);
});
function daysInYear(year) {
return isLeapYear(year) ? 366 : 365;
}
hooks.parseTwoDigitYear = function (input) {
return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);
};
var getSetYear = makeGetSet('FullYear', true);
function getIsLeapYear() {
return isLeapYear(this.year());
}
function createDate(y, m, d, h, M, s, ms) {
var date;
if (y < 100 && y >= 0) {
date = new Date(y + 400, m, d, h, M, s, ms);
if (isFinite(date.getFullYear())) {
date.setFullYear(y);
}
} else {
date = new Date(y, m, d, h, M, s, ms);
}
return date;
}
function createUTCDate(y) {
var date, args;
if (y < 100 && y >= 0) {
args = Array.prototype.slice.call(arguments);
args[0] = y + 400;
date = new Date(Date.UTC.apply(null, args));
if (isFinite(date.getUTCFullYear())) {
date.setUTCFullYear(y);
}
} else {
date = new Date(Date.UTC.apply(null, arguments));
}
return date;
}
function firstWeekOffset(year, dow, doy) {
var fwd = 7 + dow - doy,
fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;
return -fwdlw + fwd - 1;
}
function dayOfYearFromWeeks(year, week, weekday, dow, doy) {
var localWeekday = (7 + weekday - dow) % 7,
weekOffset = firstWeekOffset(year, dow, doy),
dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,
resYear,
resDayOfYear;
if (dayOfYear <= 0) {
resYear = year - 1;
resDayOfYear = daysInYear(resYear) + dayOfYear;
} else if (dayOfYear > daysInYear(year)) {
resYear = year + 1;
resDayOfYear = dayOfYear - daysInYear(year);
} else {
resYear = year;
resDayOfYear = dayOfYear;
}
return {
year: resYear,
dayOfYear: resDayOfYear
};
}
function weekOfYear(mom, dow, doy) {
var weekOffset = firstWeekOffset(mom.year(), dow, doy),
week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,
resWeek,
resYear;
if (week < 1) {
resYear = mom.year() - 1;
resWeek = week + weeksInYear(resYear, dow, doy);
} else if (week > weeksInYear(mom.year(), dow, doy)) {
resWeek = week - weeksInYear(mom.year(), dow, doy);
resYear = mom.year() + 1;
} else {
resYear = mom.year();
resWeek = week;
}
return {
week: resWeek,
year: resYear
};
}
function weeksInYear(year, dow, doy) {
var weekOffset = firstWeekOffset(year, dow, doy),
weekOffsetNext = firstWeekOffset(year + 1, dow, doy);
return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;
}
addFormatToken('w', ['ww', 2], 'wo', 'week');
addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');
addUnitAlias('week', 'w');
addUnitAlias('isoWeek', 'W');
addUnitPriority('week', 5);
addUnitPriority('isoWeek', 5);
addRegexToken('w', match1to2);
addRegexToken('ww', match1to2, match2);
addRegexToken('W', match1to2);
addRegexToken('WW', match1to2, match2);
addWeekParseToken(['w', 'ww', 'W', 'WW'], function (input, week, config, token) {
week[token.substr(0, 1)] = toInt(input);
});
function localeWeek(mom) {
return weekOfYear(mom, this._week.dow, this._week.doy).week;
}
var defaultLocaleWeek = {
dow: 0,
doy: 6
};
function localeFirstDayOfWeek() {
return this._week.dow;
}
function localeFirstDayOfYear() {
return this._week.doy;
}
function getSetWeek(input) {
var week = this.localeData().week(this);
return input == null ? week : this.add((input - week) * 7, 'd');
}
function getSetISOWeek(input) {
var week = weekOfYear(this, 1, 4).week;
return input == null ? week : this.add((input - week) * 7, 'd');
}
addFormatToken('d', 0, 'do', 'day');
addFormatToken('dd', 0, 0, function (format) {
return this.localeData().weekdaysMin(this, format);
});
addFormatToken('ddd', 0, 0, function (format) {
return this.localeData().weekdaysShort(this, format);
});
addFormatToken('dddd', 0, 0, function (format) {
return this.localeData().weekdays(this, format);
});
addFormatToken('e', 0, 0, 'weekday');
addFormatToken('E', 0, 0, 'isoWeekday');
addUnitAlias('day', 'd');
addUnitAlias('weekday', 'e');
addUnitAlias('isoWeekday', 'E');
addUnitPriority('day', 11);
addUnitPriority('weekday', 11);
addUnitPriority('isoWeekday', 11);
addRegexToken('d', match1to2);
addRegexToken('e', match1to2);
addRegexToken('E', match1to2);
addRegexToken('dd', function (isStrict, locale) {
return locale.weekdaysMinRegex(isStrict);
});
addRegexToken('ddd', function (isStrict, locale) {
return locale.weekdaysShortRegex(isStrict);
});
addRegexToken('dddd', function (isStrict, locale) {
return locale.weekdaysRegex(isStrict);
});
addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {
var weekday = config._locale.weekdaysParse(input, token, config._strict);
if (weekday != null) {
week.d = weekday;
} else {
getParsingFlags(config).invalidWeekday = input;
}
});
addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {
week[token] = toInt(input);
});
function parseWeekday(input, locale) {
if (typeof input !== 'string') {
return input;
}
if (!isNaN(input)) {
return parseInt(input, 10);
}
input = locale.weekdaysParse(input);
if (typeof input === 'number') {
return input;
}
return null;
}
function parseIsoWeekday(input, locale) {
if (typeof input === 'string') {
return locale.weekdaysParse(input) % 7 || 7;
}
return isNaN(input) ? null : input;
}
function shiftWeekdays(ws, n) {
return ws.slice(n, 7).concat(ws.slice(0, n));
}
var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),
defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
defaultWeekdaysRegex = matchWord,
defaultWeekdaysShortRegex = matchWord,
defaultWeekdaysMinRegex = matchWord;
function localeWeekdays(m, format) {
var weekdays = isArray(this._weekdays) ? this._weekdays : this._weekdays[m && m !== true && this._weekdays.isFormat.test(format) ? 'format' : 'standalone'];
return m === true ? shiftWeekdays(weekdays, this._week.dow) : m ? weekdays[m.day()] : weekdays;
}
function localeWeekdaysShort(m) {
return m === true ? shiftWeekdays(this._weekdaysShort, this._week.dow) : m ? this._weekdaysShort[m.day()] : this._weekdaysShort;
}
function localeWeekdaysMin(m) {
return m === true ? shiftWeekdays(this._weekdaysMin, this._week.dow) : m ? this._weekdaysMin[m.day()] : this._weekdaysMin;
}
function handleStrictParse$1(weekdayName, format, strict) {
var i,
ii,
mom,
llc = weekdayName.toLocaleLowerCase();
if (!this._weekdaysParse) {
this._weekdaysParse = [];
this._shortWeekdaysParse = [];
this._minWeekdaysParse = [];
for (i = 0; i < 7; ++i) {
mom = createUTC([2000, 1]).day(i);
this._minWeekdaysParse[i] = this.weekdaysMin(mom, '').toLocaleLowerCase();
this._shortWeekdaysParse[i] = this.weekdaysShort(mom, '').toLocaleLowerCase();
this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();
}
}
if (strict) {
if (format === 'dddd') {
ii = indexOf.call(this._weekdaysParse, llc);
return ii !== -1 ? ii : null;
} else if (format === 'ddd') {
ii = indexOf.call(this._shortWeekdaysParse, llc);
return ii !== -1 ? ii : null;
} else {
ii = indexOf.call(this._minWeekdaysParse, llc);
return ii !== -1 ? ii : null;
}
} else {
if (format === 'dddd') {
ii = indexOf.call(this._weekdaysParse, llc);
if (ii !== -1) {
return ii;
}
ii = indexOf.call(this._shortWeekdaysParse, llc);
if (ii !== -1) {
return ii;
}
ii = indexOf.call(this._minWeekdaysParse, llc);
return ii !== -1 ? ii : null;
} else if (format === 'ddd') {
ii = indexOf.call(this._shortWeekdaysParse, llc);
if (ii !== -1) {
return ii;
}
ii = indexOf.call(this._weekdaysParse, llc);
if (ii !== -1) {
return ii;
}
ii = indexOf.call(this._minWeekdaysParse, llc);
return ii !== -1 ? ii : null;
} else {
ii = indexOf.call(this._minWeekdaysParse, llc);
if (ii !== -1) {
return ii;
}
ii = indexOf.call(this._weekdaysParse, llc);
if (ii !== -1) {
return ii;
}
ii = indexOf.call(this._shortWeekdaysParse, llc);
return ii !== -1 ? ii : null;
}
}
}
function localeWeekdaysParse(weekdayName, format, strict) {
var i, mom, regex;
if (this._weekdaysParseExact) {
return handleStrictParse$1.call(this, weekdayName, format, strict);
}
if (!this._weekdaysParse) {
this._weekdaysParse = [];
this._minWeekdaysParse = [];
this._shortWeekdaysParse = [];
this._fullWeekdaysParse = [];
}
for (i = 0; i < 7; i++) {
mom = createUTC([2000, 1]).day(i);
if (strict && !this._fullWeekdaysParse[i]) {
this._fullWeekdaysParse[i] = new RegExp('^' + this.weekdays(mom, '').replace('.', '\\.?') + '$', 'i');
this._shortWeekdaysParse[i] = new RegExp('^' + this.weekdaysShort(mom, '').replace('.', '\\.?') + '$', 'i');
this._minWeekdaysParse[i] = new RegExp('^' + this.weekdaysMin(mom, '').replace('.', '\\.?') + '$', 'i');
}
if (!this._weekdaysParse[i]) {
regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, '');
this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');
}
if (strict && format === 'dddd' && this._fullWeekdaysParse[i].test(weekdayName)) {
return i;
} else if (strict && format === 'ddd' && this._shortWeekdaysParse[i].test(weekdayName)) {
return i;
} else if (strict && format === 'dd' && this._minWeekdaysParse[i].test(weekdayName)) {
return i;
} else if (!strict && this._weekdaysParse[i].test(weekdayName)) {
return i;
}
}
}
function getSetDayOfWeek(input) {
if (!this.isValid()) {
return input != null ? this : NaN;
}
var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();
if (input != null) {
input = parseWeekday(input, this.localeData());
return this.add(input - day, 'd');
} else {
return day;
}
}
function getSetLocaleDayOfWeek(input) {
if (!this.isValid()) {
return input != null ? this : NaN;
}
var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;
return input == null ? weekday : this.add(input - weekday, 'd');
}
function getSetISODayOfWeek(input) {
if (!this.isValid()) {
return input != null ? this : NaN;
}
if (input != null) {
var weekday = parseIsoWeekday(input, this.localeData());
return this.day(this.day() % 7 ? weekday : weekday - 7);
} else {
return this.day() || 7;
}
}
function weekdaysRegex(isStrict) {
if (this._weekdaysParseExact) {
if (!hasOwnProp(this, '_weekdaysRegex')) {
computeWeekdaysParse.call(this);
}
if (isStrict) {
return this._weekdaysStrictRegex;
} else {
return this._weekdaysRegex;
}
} else {
if (!hasOwnProp(this, '_weekdaysRegex')) {
this._weekdaysRegex = defaultWeekdaysRegex;
}
return this._weekdaysStrictRegex && isStrict ? this._weekdaysStrictRegex : this._weekdaysRegex;
}
}
function weekdaysShortRegex(isStrict) {
if (this._weekdaysParseExact) {
if (!hasOwnProp(this, '_weekdaysRegex')) {
computeWeekdaysParse.call(this);
}
if (isStrict) {
return this._weekdaysShortStrictRegex;
} else {
return this._weekdaysShortRegex;
}
} else {
if (!hasOwnProp(this, '_weekdaysShortRegex')) {
this._weekdaysShortRegex = defaultWeekdaysShortRegex;
}
return this._weekdaysShortStrictRegex && isStrict ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex;
}
}
function weekdaysMinRegex(isStrict) {
if (this._weekdaysParseExact) {
if (!hasOwnProp(this, '_weekdaysRegex')) {
computeWeekdaysParse.call(this);
}
if (isStrict) {
return this._weekdaysMinStrictRegex;
} else {
return this._weekdaysMinRegex;
}
} else {
if (!hasOwnProp(this, '_weekdaysMinRegex')) {
this._weekdaysMinRegex = defaultWeekdaysMinRegex;
}
return this._weekdaysMinStrictRegex && isStrict ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex;
}
}
function computeWeekdaysParse() {
function cmpLenRev(a, b) {
return b.length - a.length;
}
var minPieces = [],
shortPieces = [],
longPieces = [],
mixedPieces = [],
i,
mom,
minp,
shortp,
longp;
for (i = 0; i < 7; i++) {
mom = createUTC([2000, 1]).day(i);
minp = regexEscape(this.weekdaysMin(mom, ''));
shortp = regexEscape(this.weekdaysShort(mom, ''));
longp = regexEscape(this.weekdays(mom, ''));
minPieces.push(minp);
shortPieces.push(shortp);
longPieces.push(longp);
mixedPieces.push(minp);
mixedPieces.push(shortp);
mixedPieces.push(longp);
}
minPieces.sort(cmpLenRev);
shortPieces.sort(cmpLenRev);
longPieces.sort(cmpLenRev);
mixedPieces.sort(cmpLenRev);
this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
this._weekdaysShortRegex = this._weekdaysRegex;
this._weekdaysMinRegex = this._weekdaysRegex;
this._weekdaysStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');
this._weekdaysShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');
this._weekdaysMinStrictRegex = new RegExp('^(' + minPieces.join('|') + ')', 'i');
}
function hFormat() {
return this.hours() % 12 || 12;
}
function kFormat() {
return this.hours() || 24;
}
addFormatToken('H', ['HH', 2], 0, 'hour');
addFormatToken('h', ['hh', 2], 0, hFormat);
addFormatToken('k', ['kk', 2], 0, kFormat);
addFormatToken('hmm', 0, 0, function () {
return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);
});
addFormatToken('hmmss', 0, 0, function () {
return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2) + zeroFill(this.seconds(), 2);
});
addFormatToken('Hmm', 0, 0, function () {
return '' + this.hours() + zeroFill(this.minutes(), 2);
});
addFormatToken('Hmmss', 0, 0, function () {
return '' + this.hours() + zeroFill(this.minutes(), 2) + zeroFill(this.seconds(), 2);
});
function meridiem(token, lowercase) {
addFormatToken(token, 0, 0, function () {
return this.localeData().meridiem(this.hours(), this.minutes(), lowercase);
});
}
meridiem('a', true);
meridiem('A', false);
addUnitAlias('hour', 'h');
addUnitPriority('hour', 13);
function matchMeridiem(isStrict, locale) {
return locale._meridiemParse;
}
addRegexToken('a', matchMeridiem);
addRegexToken('A', matchMeridiem);
addRegexToken('H', match1to2);
addRegexToken('h', match1to2);
addRegexToken('k', match1to2);
addRegexToken('HH', match1to2, match2);
addRegexToken('hh', match1to2, match2);
addRegexToken('kk', match1to2, match2);
addRegexToken('hmm', match3to4);
addRegexToken('hmmss', match5to6);
addRegexToken('Hmm', match3to4);
addRegexToken('Hmmss', match5to6);
addParseToken(['H', 'HH'], HOUR);
addParseToken(['k', 'kk'], function (input, array, config) {
var kInput = toInt(input);
array[HOUR] = kInput === 24 ? 0 : kInput;
});
addParseToken(['a', 'A'], function (input, array, config) {
config._isPm = config._locale.isPM(input);
config._meridiem = input;
});
addParseToken(['h', 'hh'], function (input, array, config) {
array[HOUR] = toInt(input);
getParsingFlags(config).bigHour = true;
});
addParseToken('hmm', function (input, array, config) {
var pos = input.length - 2;
array[HOUR] = toInt(input.substr(0, pos));
array[MINUTE] = toInt(input.substr(pos));
getParsingFlags(config).bigHour = true;
});
addParseToken('hmmss', function (input, array, config) {
var pos1 = input.length - 4,
pos2 = input.length - 2;
array[HOUR] = toInt(input.substr(0, pos1));
array[MINUTE] = toInt(input.substr(pos1, 2));
array[SECOND] = toInt(input.substr(pos2));
getParsingFlags(config).bigHour = true;
});
addParseToken('Hmm', function (input, array, config) {
var pos = input.length - 2;
array[HOUR] = toInt(input.substr(0, pos));
array[MINUTE] = toInt(input.substr(pos));
});
addParseToken('Hmmss', function (input, array, config) {
var pos1 = input.length - 4,
pos2 = input.length - 2;
array[HOUR] = toInt(input.substr(0, pos1));
array[MINUTE] = toInt(input.substr(pos1, 2));
array[SECOND] = toInt(input.substr(pos2));
});
function localeIsPM(input) {
return (input + '').toLowerCase().charAt(0) === 'p';
}
var defaultLocaleMeridiemParse = /[ap]\.?m?\.?/i,
getSetHour = makeGetSet('Hours', true);
function localeMeridiem(hours, minutes, isLower) {
if (hours > 11) {
return isLower ? 'pm' : 'PM';
} else {
return isLower ? 'am' : 'AM';
}
}
var baseConfig = {
calendar: defaultCalendar,
longDateFormat: defaultLongDateFormat,
invalidDate: defaultInvalidDate,
ordinal: defaultOrdinal,
dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,
relativeTime: defaultRelativeTime,
months: defaultLocaleMonths,
monthsShort: defaultLocaleMonthsShort,
week: defaultLocaleWeek,
weekdays: defaultLocaleWeekdays,
weekdaysMin: defaultLocaleWeekdaysMin,
weekdaysShort: defaultLocaleWeekdaysShort,
meridiemParse: defaultLocaleMeridiemParse
};
var locales = {},
localeFamilies = {},
globalLocale;
function commonPrefix(arr1, arr2) {
var i,
minl = Math.min(arr1.length, arr2.length);
for (i = 0; i < minl; i += 1) {
if (arr1[i] !== arr2[i]) {
return i;
}
}
return minl;
}
function normalizeLocale(key) {
return key ? key.toLowerCase().replace('_', '-') : key;
}
function chooseLocale(names) {
var i = 0,
j,
next,
locale,
split;
while (i < names.length) {
split = normalizeLocale(names[i]).split('-');
j = split.length;
next = normalizeLocale(names[i + 1]);
next = next ? next.split('-') : null;
while (j > 0) {
locale = loadLocale(split.slice(0, j).join('-'));
if (locale) {
return locale;
}
if (next && next.length >= j && commonPrefix(split, next) >= j - 1) {
break;
}
j--;
}
i++;
}
return globalLocale;
}
function loadLocale(name) {
var oldLocale = null,
aliasedRequire;
if (locales[name] === undefined && typeof module !== 'undefined' && module && module.exports) {
try {
oldLocale = globalLocale._abbr;
aliasedRequire = _$$_REQUIRE;
aliasedRequire('./locale/' + name);
getSetGlobalLocale(oldLocale);
} catch (e) {
locales[name] = null;
}
}
return locales[name];
}
function getSetGlobalLocale(key, values) {
var data;
if (key) {
if (isUndefined(values)) {
data = getLocale(key);
} else {
data = defineLocale(key, values);
}
if (data) {
globalLocale = data;
} else {
if (typeof console !== 'undefined' && function () {}) {}
}
}
return globalLocale._abbr;
}
function defineLocale(name, config) {
if (config !== null) {
var locale,
parentConfig = baseConfig;
config.abbr = name;
if (locales[name] != null) {
deprecateSimple('defineLocaleOverride', "use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info.");
parentConfig = locales[name]._config;
} else if (config.parentLocale != null) {
if (locales[config.parentLocale] != null) {
parentConfig = locales[config.parentLocale]._config;
} else {
locale = loadLocale(config.parentLocale);
if (locale != null) {
parentConfig = locale._config;
} else {
if (!localeFamilies[config.parentLocale]) {
localeFamilies[config.parentLocale] = [];
}
localeFamilies[config.parentLocale].push({
name: name,
config: config
});
return null;
}
}
}
locales[name] = new Locale(mergeConfigs(parentConfig, config));
if (localeFamilies[name]) {
localeFamilies[name].forEach(function (x) {
defineLocale(x.name, x.config);
});
}
getSetGlobalLocale(name);
return locales[name];
} else {
delete locales[name];
return null;
}
}
function updateLocale(name, config) {
if (config != null) {
var locale,
tmpLocale,
parentConfig = baseConfig;
if (locales[name] != null && locales[name].parentLocale != null) {
locales[name].set(mergeConfigs(locales[name]._config, config));
} else {
tmpLocale = loadLocale(name);
if (tmpLocale != null) {
parentConfig = tmpLocale._config;
}
config = mergeConfigs(parentConfig, config);
if (tmpLocale == null) {
config.abbr = name;
}
locale = new Locale(config);
locale.parentLocale = locales[name];
locales[name] = locale;
}
getSetGlobalLocale(name);
} else {
if (locales[name] != null) {
if (locales[name].parentLocale != null) {
locales[name] = locales[name].parentLocale;
if (name === getSetGlobalLocale()) {
getSetGlobalLocale(name);
}
} else if (locales[name] != null) {
delete locales[name];
}
}
}
return locales[name];
}
function getLocale(key) {
var locale;
if (key && key._locale && key._locale._abbr) {
key = key._locale._abbr;
}
if (!key) {
return globalLocale;
}
if (!isArray(key)) {
locale = loadLocale(key);
if (locale) {
return locale;
}
key = [key];
}
return chooseLocale(key);
}
function listLocales() {
return keys(locales);
}
function checkOverflow(m) {
var overflow,
a = m._a;
if (a && getParsingFlags(m).overflow === -2) {
overflow = a[MONTH] < 0 || a[MONTH] > 11 ? MONTH : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE : a[HOUR] < 0 || a[HOUR] > 24 || a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0) ? HOUR : a[MINUTE] < 0 || a[MINUTE] > 59 ? MINUTE : a[SECOND] < 0 || a[SECOND] > 59 ? SECOND : a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND : -1;
if (getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) {
overflow = DATE;
}
if (getParsingFlags(m)._overflowWeeks && overflow === -1) {
overflow = WEEK;
}
if (getParsingFlags(m)._overflowWeekday && overflow === -1) {
overflow = WEEKDAY;
}
getParsingFlags(m).overflow = overflow;
}
return m;
}
var extendedIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,
basicIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,
tzRegex = /Z|[+-]\d\d(?::?\d\d)?/,
isoDates = [['YYYYYY-MM-DD', /[+-]\d{6}-\d\d-\d\d/], ['YYYY-MM-DD', /\d{4}-\d\d-\d\d/], ['GGGG-[W]WW-E', /\d{4}-W\d\d-\d/], ['GGGG-[W]WW', /\d{4}-W\d\d/, false], ['YYYY-DDD', /\d{4}-\d{3}/], ['YYYY-MM', /\d{4}-\d\d/, false], ['YYYYYYMMDD', /[+-]\d{10}/], ['YYYYMMDD', /\d{8}/], ['GGGG[W]WWE', /\d{4}W\d{3}/], ['GGGG[W]WW', /\d{4}W\d{2}/, false], ['YYYYDDD', /\d{7}/], ['YYYYMM', /\d{6}/, false], ['YYYY', /\d{4}/, false]],
isoTimes = [['HH:mm:ss.SSSS', /\d\d:\d\d:\d\d\.\d+/], ['HH:mm:ss,SSSS', /\d\d:\d\d:\d\d,\d+/], ['HH:mm:ss', /\d\d:\d\d:\d\d/], ['HH:mm', /\d\d:\d\d/], ['HHmmss.SSSS', /\d\d\d\d\d\d\.\d+/], ['HHmmss,SSSS', /\d\d\d\d\d\d,\d+/], ['HHmmss', /\d\d\d\d\d\d/], ['HHmm', /\d\d\d\d/], ['HH', /\d\d/]],
aspNetJsonRegex = /^\/?Date\((-?\d+)/i,
rfc2822 = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,
obsOffsets = {
UT: 0,
GMT: 0,
EDT: -240,
EST: -300,
CDT: -300,
CST: -360,
MDT: -360,
MST: -420,
PDT: -420,
PST: -480
};
function configFromISO(config) {
var i,
l,
string = config._i,
match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),
allowTime,
dateFormat,
timeFormat,
tzFormat;
if (match) {
getParsingFlags(config).iso = true;
for (i = 0, l = isoDates.length; i < l; i++) {
if (isoDates[i][1].exec(match[1])) {
dateFormat = isoDates[i][0];
allowTime = isoDates[i][2] !== false;
break;
}
}
if (dateFormat == null) {
config._isValid = false;
return;
}
if (match[3]) {
for (i = 0, l = isoTimes.length; i < l; i++) {
if (isoTimes[i][1].exec(match[3])) {
timeFormat = (match[2] || ' ') + isoTimes[i][0];
break;
}
}
if (timeFormat == null) {
config._isValid = false;
return;
}
}
if (!allowTime && timeFormat != null) {
config._isValid = false;
return;
}
if (match[4]) {
if (tzRegex.exec(match[4])) {
tzFormat = 'Z';
} else {
config._isValid = false;
return;
}
}
config._f = dateFormat + (timeFormat || '') + (tzFormat || '');
configFromStringAndFormat(config);
} else {
config._isValid = false;
}
}
function extractFromRFC2822Strings(yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr) {
var result = [untruncateYear(yearStr), defaultLocaleMonthsShort.indexOf(monthStr), parseInt(dayStr, 10), parseInt(hourStr, 10), parseInt(minuteStr, 10)];
if (secondStr) {
result.push(parseInt(secondStr, 10));
}
return result;
}
function untruncateYear(yearStr) {
var year = parseInt(yearStr, 10);
if (year <= 49) {
return 2000 + year;
} else if (year <= 999) {
return 1900 + year;
}
return year;
}
function preprocessRFC2822(s) {
return s.replace(/\([^)]*\)|[\n\t]/g, ' ').replace(/(\s\s+)/g, ' ').replace(/^\s\s*/, '').replace(/\s\s*$/, '');
}
function checkWeekday(weekdayStr, parsedInput, config) {
if (weekdayStr) {
var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),
weekdayActual = new Date(parsedInput[0], parsedInput[1], parsedInput[2]).getDay();
if (weekdayProvided !== weekdayActual) {
getParsingFlags(config).weekdayMismatch = true;
config._isValid = false;
return false;
}
}
return true;
}
function calculateOffset(obsOffset, militaryOffset, numOffset) {
if (obsOffset) {
return obsOffsets[obsOffset];
} else if (militaryOffset) {
return 0;
} else {
var hm = parseInt(numOffset, 10),
m = hm % 100,
h = (hm - m) / 100;
return h * 60 + m;
}
}
function configFromRFC2822(config) {
var match = rfc2822.exec(preprocessRFC2822(config._i)),
parsedArray;
if (match) {
parsedArray = extractFromRFC2822Strings(match[4], match[3], match[2], match[5], match[6], match[7]);
if (!checkWeekday(match[1], parsedArray, config)) {
return;
}
config._a = parsedArray;
config._tzm = calculateOffset(match[8], match[9], match[10]);
config._d = createUTCDate.apply(null, config._a);
config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);
getParsingFlags(config).rfc2822 = true;
} else {
config._isValid = false;
}
}
function configFromString(config) {
var matched = aspNetJsonRegex.exec(config._i);
if (matched !== null) {
config._d = new Date(+matched[1]);
return;
}
configFromISO(config);
if (config._isValid === false) {
delete config._isValid;
} else {
return;
}
configFromRFC2822(config);
if (config._isValid === false) {
delete config._isValid;
} else {
return;
}
if (config._strict) {
config._isValid = false;
} else {
hooks.createFromInputFallback(config);
}
}
hooks.createFromInputFallback = deprecate("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.", function (config) {
config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));
});
function defaults(a, b, c) {
if (a != null) {
return a;
}
if (b != null) {
return b;
}
return c;
}
function currentDateArray(config) {
var nowValue = new Date(hooks.now());
if (config._useUTC) {
return [nowValue.getUTCFullYear(), nowValue.getUTCMonth(), nowValue.getUTCDate()];
}
return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];
}
function configFromArray(config) {
var i,
date,
input = [],
currentDate,
expectedWeekday,
yearToUse;
if (config._d) {
return;
}
currentDate = currentDateArray(config);
if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {
dayOfYearFromWeekInfo(config);
}
if (config._dayOfYear != null) {
yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);
if (config._dayOfYear > daysInYear(yearToUse) || config._dayOfYear === 0) {
getParsingFlags(config)._overflowDayOfYear = true;
}
date = createUTCDate(yearToUse, 0, config._dayOfYear);
config._a[MONTH] = date.getUTCMonth();
config._a[DATE] = date.getUTCDate();
}
for (i = 0; i < 3 && config._a[i] == null; ++i) {
config._a[i] = input[i] = currentDate[i];
}
for (; i < 7; i++) {
config._a[i] = input[i] = config._a[i] == null ? i === 2 ? 1 : 0 : config._a[i];
}
if (config._a[HOUR] === 24 && config._a[MINUTE] === 0 && config._a[SECOND] === 0 && config._a[MILLISECOND] === 0) {
config._nextDay = true;
config._a[HOUR] = 0;
}
config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);
expectedWeekday = config._useUTC ? config._d.getUTCDay() : config._d.getDay();
if (config._tzm != null) {
config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);
}
if (config._nextDay) {
config._a[HOUR] = 24;
}
if (config._w && typeof config._w.d !== 'undefined' && config._w.d !== expectedWeekday) {
getParsingFlags(config).weekdayMismatch = true;
}
}
function dayOfYearFromWeekInfo(config) {
var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek;
w = config._w;
if (w.GG != null || w.W != null || w.E != null) {
dow = 1;
doy = 4;
weekYear = defaults(w.GG, config._a[YEAR], weekOfYear(createLocal(), 1, 4).year);
week = defaults(w.W, 1);
weekday = defaults(w.E, 1);
if (weekday < 1 || weekday > 7) {
weekdayOverflow = true;
}
} else {
dow = config._locale._week.dow;
doy = config._locale._week.doy;
curWeek = weekOfYear(createLocal(), dow, doy);
weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);
week = defaults(w.w, curWeek.week);
if (w.d != null) {
weekday = w.d;
if (weekday < 0 || weekday > 6) {
weekdayOverflow = true;
}
} else if (w.e != null) {
weekday = w.e + dow;
if (w.e < 0 || w.e > 6) {
weekdayOverflow = true;
}
} else {
weekday = dow;
}
}
if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {
getParsingFlags(config)._overflowWeeks = true;
} else if (weekdayOverflow != null) {
getParsingFlags(config)._overflowWeekday = true;
} else {
temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);
config._a[YEAR] = temp.year;
config._dayOfYear = temp.dayOfYear;
}
}
hooks.ISO_8601 = function () {};
hooks.RFC_2822 = function () {};
function configFromStringAndFormat(config) {
if (config._f === hooks.ISO_8601) {
configFromISO(config);
return;
}
if (config._f === hooks.RFC_2822) {
configFromRFC2822(config);
return;
}
config._a = [];
getParsingFlags(config).empty = true;
var string = '' + config._i,
i,
parsedInput,
tokens,
token,
skipped,
stringLength = string.length,
totalParsedInputLength = 0,
era;
tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];
for (i = 0; i < tokens.length; i++) {
token = tokens[i];
parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];
if (parsedInput) {
skipped = string.substr(0, string.indexOf(parsedInput));
if (skipped.length > 0) {
getParsingFlags(config).unusedInput.push(skipped);
}
string = string.slice(string.indexOf(parsedInput) + parsedInput.length);
totalParsedInputLength += parsedInput.length;
}
if (formatTokenFunctions[token]) {
if (parsedInput) {
getParsingFlags(config).empty = false;
} else {
getParsingFlags(config).unusedTokens.push(token);
}
addTimeToArrayFromToken(token, parsedInput, config);
} else if (config._strict && !parsedInput) {
getParsingFlags(config).unusedTokens.push(token);
}
}
getParsingFlags(config).charsLeftOver = stringLength - totalParsedInputLength;
if (string.length > 0) {
getParsingFlags(config).unusedInput.push(string);
}
if (config._a[HOUR] <= 12 && getParsingFlags(config).bigHour === true && config._a[HOUR] > 0) {
getParsingFlags(config).bigHour = undefined;
}
getParsingFlags(config).parsedDateParts = config._a.slice(0);
getParsingFlags(config).meridiem = config._meridiem;
config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem);
era = getParsingFlags(config).era;
if (era !== null) {
config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]);
}
configFromArray(config);
checkOverflow(config);
}
function meridiemFixWrap(locale, hour, meridiem) {
var isPm;
if (meridiem == null) {
return hour;
}
if (locale.meridiemHour != null) {
return locale.meridiemHour(hour, meridiem);
} else if (locale.isPM != null) {
isPm = locale.isPM(meridiem);
if (isPm && hour < 12) {
hour += 12;
}
if (!isPm && hour === 12) {
hour = 0;
}
return hour;
} else {
return hour;
}
}
function configFromStringAndArray(config) {
var tempConfig,
bestMoment,
scoreToBeat,
i,
currentScore,
validFormatFound,
bestFormatIsValid = false;
if (config._f.length === 0) {
getParsingFlags(config).invalidFormat = true;
config._d = new Date(NaN);
return;
}
for (i = 0; i < config._f.length; i++) {
currentScore = 0;
validFormatFound = false;
tempConfig = copyConfig({}, config);
if (config._useUTC != null) {
tempConfig._useUTC = config._useUTC;
}
tempConfig._f = config._f[i];
configFromStringAndFormat(tempConfig);
if (isValid(tempConfig)) {
validFormatFound = true;
}
currentScore += getParsingFlags(tempConfig).charsLeftOver;
currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;
getParsingFlags(tempConfig).score = currentScore;
if (!bestFormatIsValid) {
if (scoreToBeat == null || currentScore < scoreToBeat || validFormatFound) {
scoreToBeat = currentScore;
bestMoment = tempConfig;
if (validFormatFound) {
bestFormatIsValid = true;
}
}
} else {
if (currentScore < scoreToBeat) {
scoreToBeat = currentScore;
bestMoment = tempConfig;
}
}
}
extend(config, bestMoment || tempConfig);
}
function configFromObject(config) {
if (config._d) {
return;
}
var i = normalizeObjectUnits(config._i),
dayOrDate = i.day === undefined ? i.date : i.day;
config._a = map([i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond], function (obj) {
return obj && parseInt(obj, 10);
});
configFromArray(config);
}
function createFromConfig(config) {
var res = new Moment(checkOverflow(prepareConfig(config)));
if (res._nextDay) {
res.add(1, 'd');
res._nextDay = undefined;
}
return res;
}
function prepareConfig(config) {
var input = config._i,
format = config._f;
config._locale = config._locale || getLocale(config._l);
if (input === null || format === undefined && input === '') {
return createInvalid({
nullInput: true
});
}
if (typeof input === 'string') {
config._i = input = config._locale.preparse(input);
}
if (isMoment(input)) {
return new Moment(checkOverflow(input));
} else if (isDate(input)) {
config._d = input;
} else if (isArray(format)) {
configFromStringAndArray(config);
} else if (format) {
configFromStringAndFormat(config);
} else {
configFromInput(config);
}
if (!isValid(config)) {
config._d = null;
}
return config;
}
function configFromInput(config) {
var input = config._i;
if (isUndefined(input)) {
config._d = new Date(hooks.now());
} else if (isDate(input)) {
config._d = new Date(input.valueOf());
} else if (typeof input === 'string') {
configFromString(config);
} else if (isArray(input)) {
config._a = map(input.slice(0), function (obj) {
return parseInt(obj, 10);
});
configFromArray(config);
} else if (isObject(input)) {
configFromObject(config);
} else if (isNumber(input)) {
config._d = new Date(input);
} else {
hooks.createFromInputFallback(config);
}
}
function createLocalOrUTC(input, format, locale, strict, isUTC) {
var c = {};
if (format === true || format === false) {
strict = format;
format = undefined;
}
if (locale === true || locale === false) {
strict = locale;
locale = undefined;
}
if (isObject(input) && isObjectEmpty(input) || isArray(input) && input.length === 0) {
input = undefined;
}
c._isAMomentObject = true;
c._useUTC = c._isUTC = isUTC;
c._l = locale;
c._i = input;
c._f = format;
c._strict = strict;
return createFromConfig(c);
}
function createLocal(input, format, locale, strict) {
return createLocalOrUTC(input, format, locale, strict, false);
}
var prototypeMin = deprecate('moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/', function () {
var other = createLocal.apply(null, arguments);
if (this.isValid() && other.isValid()) {
return other < this ? this : other;
} else {
return createInvalid();
}
}),
prototypeMax = deprecate('moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/', function () {
var other = createLocal.apply(null, arguments);
if (this.isValid() && other.isValid()) {
return other > this ? this : other;
} else {
return createInvalid();
}
});
function pickBy(fn, moments) {
var res, i;
if (moments.length === 1 && isArray(moments[0])) {
moments = moments[0];
}
if (!moments.length) {
return createLocal();
}
res = moments[0];
for (i = 1; i < moments.length; ++i) {
if (!moments[i].isValid() || moments[i][fn](res)) {
res = moments[i];
}
}
return res;
}
function min() {
var args = [].slice.call(arguments, 0);
return pickBy('isBefore', args);
}
function max() {
var args = [].slice.call(arguments, 0);
return pickBy('isAfter', args);
}
var now = function now() {
return Date.now ? Date.now() : +new Date();
};
var ordering = ['year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', 'millisecond'];
function isDurationValid(m) {
var key,
unitHasDecimal = false,
i;
for (key in m) {
if (hasOwnProp(m, key) && !(indexOf.call(ordering, key) !== -1 && (m[key] == null || !isNaN(m[key])))) {
return false;
}
}
for (i = 0; i < ordering.length; ++i) {
if (m[ordering[i]]) {
if (unitHasDecimal) {
return false;
}
if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {
unitHasDecimal = true;
}
}
}
return true;
}
function isValid$1() {
return this._isValid;
}
function createInvalid$1() {
return createDuration(NaN);
}
function Duration(duration) {
var normalizedInput = normalizeObjectUnits(duration),
years = normalizedInput.year || 0,
quarters = normalizedInput.quarter || 0,
months = normalizedInput.month || 0,
weeks = normalizedInput.week || normalizedInput.isoWeek || 0,
days = normalizedInput.day || 0,
hours = normalizedInput.hour || 0,
minutes = normalizedInput.minute || 0,
seconds = normalizedInput.second || 0,
milliseconds = normalizedInput.millisecond || 0;
this._isValid = isDurationValid(normalizedInput);
this._milliseconds = +milliseconds + seconds * 1e3 + minutes * 6e4 + hours * 1000 * 60 * 60;
this._days = +days + weeks * 7;
this._months = +months + quarters * 3 + years * 12;
this._data = {};
this._locale = getLocale();
this._bubble();
}
function isDuration(obj) {
return obj instanceof Duration;
}
function absRound(number) {
if (number < 0) {
return Math.round(-1 * number) * -1;
} else {
return Math.round(number);
}
}
function compareArrays(array1, array2, dontConvert) {
var len = Math.min(array1.length, array2.length),
lengthDiff = Math.abs(array1.length - array2.length),
diffs = 0,
i;
for (i = 0; i < len; i++) {
if (dontConvert && array1[i] !== array2[i] || !dontConvert && toInt(array1[i]) !== toInt(array2[i])) {
diffs++;
}
}
return diffs + lengthDiff;
}
function offset(token, separator) {
addFormatToken(token, 0, 0, function () {
var offset = this.utcOffset(),
sign = '+';
if (offset < 0) {
offset = -offset;
sign = '-';
}
return sign + zeroFill(~~(offset / 60), 2) + separator + zeroFill(~~offset % 60, 2);
});
}
offset('Z', ':');
offset('ZZ', '');
addRegexToken('Z', matchShortOffset);
addRegexToken('ZZ', matchShortOffset);
addParseToken(['Z', 'ZZ'], function (input, array, config) {
config._useUTC = true;
config._tzm = offsetFromString(matchShortOffset, input);
});
var chunkOffset = /([\+\-]|\d\d)/gi;
function offsetFromString(matcher, string) {
var matches = (string || '').match(matcher),
chunk,
parts,
minutes;
if (matches === null) {
return null;
}
chunk = matches[matches.length - 1] || [];
parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];
minutes = +(parts[1] * 60) + toInt(parts[2]);
return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes;
}
function cloneWithOffset(input, model) {
var res, diff;
if (model._isUTC) {
res = model.clone();
diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();
res._d.setTime(res._d.valueOf() + diff);
hooks.updateOffset(res, false);
return res;
} else {
return createLocal(input).local();
}
}
function getDateOffset(m) {
return -Math.round(m._d.getTimezoneOffset());
}
hooks.updateOffset = function () {};
function getSetOffset(input, keepLocalTime, keepMinutes) {
var offset = this._offset || 0,
localAdjust;
if (!this.isValid()) {
return input != null ? this : NaN;
}
if (input != null) {
if (typeof input === 'string') {
input = offsetFromString(matchShortOffset, input);
if (input === null) {
return this;
}
} else if (Math.abs(input) < 16 && !keepMinutes) {
input = input * 60;
}
if (!this._isUTC && keepLocalTime) {
localAdjust = getDateOffset(this);
}
this._offset = input;
this._isUTC = true;
if (localAdjust != null) {
this.add(localAdjust, 'm');
}
if (offset !== input) {
if (!keepLocalTime || this._changeInProgress) {
addSubtract(this, createDuration(input - offset, 'm'), 1, false);
} else if (!this._changeInProgress) {
this._changeInProgress = true;
hooks.updateOffset(this, true);
this._changeInProgress = null;
}
}
return this;
} else {
return this._isUTC ? offset : getDateOffset(this);
}
}
function getSetZone(input, keepLocalTime) {
if (input != null) {
if (typeof input !== 'string') {
input = -input;
}
this.utcOffset(input, keepLocalTime);
return this;
} else {
return -this.utcOffset();
}
}
function setOffsetToUTC(keepLocalTime) {
return this.utcOffset(0, keepLocalTime);
}
function setOffsetToLocal(keepLocalTime) {
if (this._isUTC) {
this.utcOffset(0, keepLocalTime);
this._isUTC = false;
if (keepLocalTime) {
this.subtract(getDateOffset(this), 'm');
}
}
return this;
}
function setOffsetToParsedOffset() {
if (this._tzm != null) {
this.utcOffset(this._tzm, false, true);
} else if (typeof this._i === 'string') {
var tZone = offsetFromString(matchOffset, this._i);
if (tZone != null) {
this.utcOffset(tZone);
} else {
this.utcOffset(0, true);
}
}
return this;
}
function hasAlignedHourOffset(input) {
if (!this.isValid()) {
return false;
}
input = input ? createLocal(input).utcOffset() : 0;
return (this.utcOffset() - input) % 60 === 0;
}
function isDaylightSavingTime() {
return this.utcOffset() > this.clone().month(0).utcOffset() || this.utcOffset() > this.clone().month(5).utcOffset();
}
function isDaylightSavingTimeShifted() {
if (!isUndefined(this._isDSTShifted)) {
return this._isDSTShifted;
}
var c = {},
other;
copyConfig(c, this);
c = prepareConfig(c);
if (c._a) {
other = c._isUTC ? createUTC(c._a) : createLocal(c._a);
this._isDSTShifted = this.isValid() && compareArrays(c._a, other.toArray()) > 0;
} else {
this._isDSTShifted = false;
}
return this._isDSTShifted;
}
function isLocal() {
return this.isValid() ? !this._isUTC : false;
}
function isUtcOffset() {
return this.isValid() ? this._isUTC : false;
}
function isUtc() {
return this.isValid() ? this._isUTC && this._offset === 0 : false;
}
var aspNetRegex = /^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,
isoRegex = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;
function createDuration(input, key) {
var duration = input,
match = null,
sign,
ret,
diffRes;
if (isDuration(input)) {
duration = {
ms: input._milliseconds,
d: input._days,
M: input._months
};
} else if (isNumber(input) || !isNaN(+input)) {
duration = {};
if (key) {
duration[key] = +input;
} else {
duration.milliseconds = +input;
}
} else if (match = aspNetRegex.exec(input)) {
sign = match[1] === '-' ? -1 : 1;
duration = {
y: 0,
d: toInt(match[DATE]) * sign,
h: toInt(match[HOUR]) * sign,
m: toInt(match[MINUTE]) * sign,
s: toInt(match[SECOND]) * sign,
ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign
};
} else if (match = isoRegex.exec(input)) {
sign = match[1] === '-' ? -1 : 1;
duration = {
y: parseIso(match[2], sign),
M: parseIso(match[3], sign),
w: parseIso(match[4], sign),
d: parseIso(match[5], sign),
h: parseIso(match[6], sign),
m: parseIso(match[7], sign),
s: parseIso(match[8], sign)
};
} else if (duration == null) {
duration = {};
} else if (typeof duration === 'object' && ('from' in duration || 'to' in duration)) {
diffRes = momentsDifference(createLocal(duration.from), createLocal(duration.to));
duration = {};
duration.ms = diffRes.milliseconds;
duration.M = diffRes.months;
}
ret = new Duration(duration);
if (isDuration(input) && hasOwnProp(input, '_locale')) {
ret._locale = input._locale;
}
if (isDuration(input) && hasOwnProp(input, '_isValid')) {
ret._isValid = input._isValid;
}
return ret;
}
createDuration.fn = Duration.prototype;
createDuration.invalid = createInvalid$1;
function parseIso(inp, sign) {
var res = inp && parseFloat(inp.replace(',', '.'));
return (isNaN(res) ? 0 : res) * sign;
}
function positiveMomentsDifference(base, other) {
var res = {};
res.months = other.month() - base.month() + (other.year() - base.year()) * 12;
if (base.clone().add(res.months, 'M').isAfter(other)) {
--res.months;
}
res.milliseconds = +other - +base.clone().add(res.months, 'M');
return res;
}
function momentsDifference(base, other) {
var res;
if (!(base.isValid() && other.isValid())) {
return {
milliseconds: 0,
months: 0
};
}
other = cloneWithOffset(other, base);
if (base.isBefore(other)) {
res = positiveMomentsDifference(base, other);
} else {
res = positiveMomentsDifference(other, base);
res.milliseconds = -res.milliseconds;
res.months = -res.months;
}
return res;
}
function createAdder(direction, name) {
return function (val, period) {
var dur, tmp;
if (period !== null && !isNaN(+period)) {
deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' + 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');
tmp = val;
val = period;
period = tmp;
}
dur = createDuration(val, period);
addSubtract(this, dur, direction);
return this;
};
}
function addSubtract(mom, duration, isAdding, updateOffset) {
var milliseconds = duration._milliseconds,
days = absRound(duration._days),
months = absRound(duration._months);
if (!mom.isValid()) {
return;
}
updateOffset = updateOffset == null ? true : updateOffset;
if (months) {
setMonth(mom, get(mom, 'Month') + months * isAdding);
}
if (days) {
set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);
}
if (milliseconds) {
mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);
}
if (updateOffset) {
hooks.updateOffset(mom, days || months);
}
}
var add = createAdder(1, 'add'),
subtract = createAdder(-1, 'subtract');
function isString(input) {
return typeof input === 'string' || input instanceof String;
}
function isMomentInput(input) {
return isMoment(input) || isDate(input) || isString(input) || isNumber(input) || isNumberOrStringArray(input) || isMomentInputObject(input) || input === null || input === undefined;
}
function isMomentInputObject(input) {
var objectTest = isObject(input) && !isObjectEmpty(input),
propertyTest = false,
properties = ['years', 'year', 'y', 'months', 'month', 'M', 'days', 'day', 'd', 'dates', 'date', 'D', 'hours', 'hour', 'h', 'minutes', 'minute', 'm', 'seconds', 'second', 's', 'milliseconds', 'millisecond', 'ms'],
i,
property;
for (i = 0; i < properties.length; i += 1) {
property = properties[i];
propertyTest = propertyTest || hasOwnProp(input, property);
}
return objectTest && propertyTest;
}
function isNumberOrStringArray(input) {
var arrayTest = isArray(input),
dataTypeTest = false;
if (arrayTest) {
dataTypeTest = input.filter(function (item) {
return !isNumber(item) && isString(input);
}).length === 0;
}
return arrayTest && dataTypeTest;
}
function isCalendarSpec(input) {
var objectTest = isObject(input) && !isObjectEmpty(input),
propertyTest = false,
properties = ['sameDay', 'nextDay', 'lastDay', 'nextWeek', 'lastWeek', 'sameElse'],
i,
property;
for (i = 0; i < properties.length; i += 1) {
property = properties[i];
propertyTest = propertyTest || hasOwnProp(input, property);
}
return objectTest && propertyTest;
}
function getCalendarFormat(myMoment, now) {
var diff = myMoment.diff(now, 'days', true);
return diff < -6 ? 'sameElse' : diff < -1 ? 'lastWeek' : diff < 0 ? 'lastDay' : diff < 1 ? 'sameDay' : diff < 2 ? 'nextDay' : diff < 7 ? 'nextWeek' : 'sameElse';
}
function calendar$1(time, formats) {
if (arguments.length === 1) {
if (isMomentInput(arguments[0])) {
time = arguments[0];
formats = undefined;
} else if (isCalendarSpec(arguments[0])) {
formats = arguments[0];
time = undefined;
}
}
var now = time || createLocal(),
sod = cloneWithOffset(now, this).startOf('day'),
format = hooks.calendarFormat(this, sod) || 'sameElse',
output = formats && (isFunction(formats[format]) ? formats[format].call(this, now) : formats[format]);
return this.format(output || this.localeData().calendar(format, this, createLocal(now)));
}
function clone() {
return new Moment(this);
}
function isAfter(input, units) {
var localInput = isMoment(input) ? input : createLocal(input);
if (!(this.isValid() && localInput.isValid())) {
return false;
}
units = normalizeUnits(units) || 'millisecond';
if (units === 'millisecond') {
return this.valueOf() > localInput.valueOf();
} else {
return localInput.valueOf() < this.clone().startOf(units).valueOf();
}
}
function isBefore(input, units) {
var localInput = isMoment(input) ? input : createLocal(input);
if (!(this.isValid() && localInput.isValid())) {
return false;
}
units = normalizeUnits(units) || 'millisecond';
if (units === 'millisecond') {
return this.valueOf() < localInput.valueOf();
} else {
return this.clone().endOf(units).valueOf() < localInput.valueOf();
}
}
function isBetween(from, to, units, inclusivity) {
var localFrom = isMoment(from) ? from : createLocal(from),
localTo = isMoment(to) ? to : createLocal(to);
if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {
return false;
}
inclusivity = inclusivity || '()';
return (inclusivity[0] === '(' ? this.isAfter(localFrom, units) : !this.isBefore(localFrom, units)) && (inclusivity[1] === ')' ? this.isBefore(localTo, units) : !this.isAfter(localTo, units));
}
function isSame(input, units) {
var localInput = isMoment(input) ? input : createLocal(input),
inputMs;
if (!(this.isValid() && localInput.isValid())) {
return false;
}
units = normalizeUnits(units) || 'millisecond';
if (units === 'millisecond') {
return this.valueOf() === localInput.valueOf();
} else {
inputMs = localInput.valueOf();
return this.clone().startOf(units).valueOf() <= inputMs && inputMs <= this.clone().endOf(units).valueOf();
}
}
function isSameOrAfter(input, units) {
return this.isSame(input, units) || this.isAfter(input, units);
}
function isSameOrBefore(input, units) {
return this.isSame(input, units) || this.isBefore(input, units);
}
function diff(input, units, asFloat) {
var that, zoneDelta, output;
if (!this.isValid()) {
return NaN;
}
that = cloneWithOffset(input, this);
if (!that.isValid()) {
return NaN;
}
zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;
units = normalizeUnits(units);
switch (units) {
case 'year':
output = monthDiff(this, that) / 12;
break;
case 'month':
output = monthDiff(this, that);
break;
case 'quarter':
output = monthDiff(this, that) / 3;
break;
case 'second':
output = (this - that) / 1e3;
break;
case 'minute':
output = (this - that) / 6e4;
break;
case 'hour':
output = (this - that) / 36e5;
break;
case 'day':
output = (this - that - zoneDelta) / 864e5;
break;
case 'week':
output = (this - that - zoneDelta) / 6048e5;
break;
default:
output = this - that;
}
return asFloat ? output : absFloor(output);
}
function monthDiff(a, b) {
if (a.date() < b.date()) {
return -monthDiff(b, a);
}
var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()),
anchor = a.clone().add(wholeMonthDiff, 'months'),
anchor2,
adjust;
if (b - anchor < 0) {
anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');
adjust = (b - anchor) / (anchor - anchor2);
} else {
anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');
adjust = (b - anchor) / (anchor2 - anchor);
}
return -(wholeMonthDiff + adjust) || 0;
}
hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';
hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';
function toString() {
return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');
}
function toISOString(keepOffset) {
if (!this.isValid()) {
return null;
}
var utc = keepOffset !== true,
m = utc ? this.clone().utc() : this;
if (m.year() < 0 || m.year() > 9999) {
return formatMoment(m, utc ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ');
}
if (isFunction(Date.prototype.toISOString)) {
if (utc) {
return this.toDate().toISOString();
} else {
return new Date(this.valueOf() + this.utcOffset() * 60 * 1000).toISOString().replace('Z', formatMoment(m, 'Z'));
}
}
return formatMoment(m, utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ');
}
function inspect() {
if (!this.isValid()) {
return 'moment.invalid(/* ' + this._i + ' */)';
}
var func = 'moment',
zone = '',
prefix,
year,
datetime,
suffix;
if (!this.isLocal()) {
func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';
zone = 'Z';
}
prefix = '[' + func + '("]';
year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY';
datetime = '-MM-DD[T]HH:mm:ss.SSS';
suffix = zone + '[")]';
return this.format(prefix + year + datetime + suffix);
}
function format(inputString) {
if (!inputString) {
inputString = this.isUtc() ? hooks.defaultFormatUtc : hooks.defaultFormat;
}
var output = formatMoment(this, inputString);
return this.localeData().postformat(output);
}
function from(time, withoutSuffix) {
if (this.isValid() && (isMoment(time) && time.isValid() || createLocal(time).isValid())) {
return createDuration({
to: this,
from: time
}).locale(this.locale()).humanize(!withoutSuffix);
} else {
return this.localeData().invalidDate();
}
}
function fromNow(withoutSuffix) {
return this.from(createLocal(), withoutSuffix);
}
function to(time, withoutSuffix) {
if (this.isValid() && (isMoment(time) && time.isValid() || createLocal(time).isValid())) {
return createDuration({
from: this,
to: time
}).locale(this.locale()).humanize(!withoutSuffix);
} else {
return this.localeData().invalidDate();
}
}
function toNow(withoutSuffix) {
return this.to(createLocal(), withoutSuffix);
}
function locale(key) {
var newLocaleData;
if (key === undefined) {
return this._locale._abbr;
} else {
newLocaleData = getLocale(key);
if (newLocaleData != null) {
this._locale = newLocaleData;
}
return this;
}
}
var lang = deprecate('moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.', function (key) {
if (key === undefined) {
return this.localeData();
} else {
return this.locale(key);
}
});
function localeData() {
return this._locale;
}
var MS_PER_SECOND = 1000,
MS_PER_MINUTE = 60000,
MS_PER_HOUR = 3600000,
MS_PER_400_YEARS = 12622780800000;
function mod$1(dividend, divisor) {
return (dividend % divisor + divisor) % divisor;
}
function localStartOfDate(y, m, d) {
if (y < 100 && y >= 0) {
return new Date(y + 400, m, d) - MS_PER_400_YEARS;
} else {
return new Date(y, m, d).valueOf();
}
}
function utcStartOfDate(y, m, d) {
if (y < 100 && y >= 0) {
return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;
} else {
return Date.UTC(y, m, d);
}
}
function startOf(units) {
var time, startOfDate;
units = normalizeUnits(units);
if (units === undefined || units === 'millisecond' || !this.isValid()) {
return this;
}
startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;
switch (units) {
case 'year':
time = startOfDate(this.year(), 0, 1);
break;
case 'quarter':
time = startOfDate(this.year(), this.month() - this.month() % 3, 1);
break;
case 'month':
time = startOfDate(this.year(), this.month(), 1);
break;
case 'week':
time = startOfDate(this.year(), this.month(), this.date() - this.weekday());
break;
case 'isoWeek':
time = startOfDate(this.year(), this.month(), this.date() - (this.isoWeekday() - 1));
break;
case 'day':
case 'date':
time = startOfDate(this.year(), this.month(), this.date());
break;
case 'hour':
time = this._d.valueOf();
time -= mod$1(time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), MS_PER_HOUR);
break;
case 'minute':
time = this._d.valueOf();
time -= mod$1(time, MS_PER_MINUTE);
break;
case 'second':
time = this._d.valueOf();
time -= mod$1(time, MS_PER_SECOND);
break;
}
this._d.setTime(time);
hooks.updateOffset(this, true);
return this;
}
function endOf(units) {
var time, startOfDate;
units = normalizeUnits(units);
if (units === undefined || units === 'millisecond' || !this.isValid()) {
return this;
}
startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;
switch (units) {
case 'year':
time = startOfDate(this.year() + 1, 0, 1) - 1;
break;
case 'quarter':
time = startOfDate(this.year(), this.month() - this.month() % 3 + 3, 1) - 1;
break;
case 'month':
time = startOfDate(this.year(), this.month() + 1, 1) - 1;
break;
case 'week':
time = startOfDate(this.year(), this.month(), this.date() - this.weekday() + 7) - 1;
break;
case 'isoWeek':
time = startOfDate(this.year(), this.month(), this.date() - (this.isoWeekday() - 1) + 7) - 1;
break;
case 'day':
case 'date':
time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;
break;
case 'hour':
time = this._d.valueOf();
time += MS_PER_HOUR - mod$1(time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), MS_PER_HOUR) - 1;
break;
case 'minute':
time = this._d.valueOf();
time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;
break;
case 'second':
time = this._d.valueOf();
time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;
break;
}
this._d.setTime(time);
hooks.updateOffset(this, true);
return this;
}
function valueOf() {
return this._d.valueOf() - (this._offset || 0) * 60000;
}
function unix() {
return Math.floor(this.valueOf() / 1000);
}
function toDate() {
return new Date(this.valueOf());
}
function toArray() {
var m = this;
return [m.year(), m.month(), m.date(), m.hour(), m.minute(), m.second(), m.millisecond()];
}
function toObject() {
var m = this;
return {
years: m.year(),
months: m.month(),
date: m.date(),
hours: m.hours(),
minutes: m.minutes(),
seconds: m.seconds(),
milliseconds: m.milliseconds()
};
}
function toJSON() {
return this.isValid() ? this.toISOString() : null;
}
function isValid$2() {
return isValid(this);
}
function parsingFlags() {
return extend({}, getParsingFlags(this));
}
function invalidAt() {
return getParsingFlags(this).overflow;
}
function creationData() {
return {
input: this._i,
format: this._f,
locale: this._locale,
isUTC: this._isUTC,
strict: this._strict
};
}
addFormatToken('N', 0, 0, 'eraAbbr');
addFormatToken('NN', 0, 0, 'eraAbbr');
addFormatToken('NNN', 0, 0, 'eraAbbr');
addFormatToken('NNNN', 0, 0, 'eraName');
addFormatToken('NNNNN', 0, 0, 'eraNarrow');
addFormatToken('y', ['y', 1], 'yo', 'eraYear');
addFormatToken('y', ['yy', 2], 0, 'eraYear');
addFormatToken('y', ['yyy', 3], 0, 'eraYear');
addFormatToken('y', ['yyyy', 4], 0, 'eraYear');
addRegexToken('N', matchEraAbbr);
addRegexToken('NN', matchEraAbbr);
addRegexToken('NNN', matchEraAbbr);
addRegexToken('NNNN', matchEraName);
addRegexToken('NNNNN', matchEraNarrow);
addParseToken(['N', 'NN', 'NNN', 'NNNN', 'NNNNN'], function (input, array, config, token) {
var era = config._locale.erasParse(input, token, config._strict);
if (era) {
getParsingFlags(config).era = era;
} else {
getParsingFlags(config).invalidEra = input;
}
});
addRegexToken('y', matchUnsigned);
addRegexToken('yy', matchUnsigned);
addRegexToken('yyy', matchUnsigned);
addRegexToken('yyyy', matchUnsigned);
addRegexToken('yo', matchEraYearOrdinal);
addParseToken(['y', 'yy', 'yyy', 'yyyy'], YEAR);
addParseToken(['yo'], function (input, array, config, token) {
var match;
if (config._locale._eraYearOrdinalRegex) {
match = input.match(config._locale._eraYearOrdinalRegex);
}
if (config._locale.eraYearOrdinalParse) {
array[YEAR] = config._locale.eraYearOrdinalParse(input, match);
} else {
array[YEAR] = parseInt(input, 10);
}
});
function localeEras(m, format) {
var i,
l,
date,
eras = this._eras || getLocale('en')._eras;
for (i = 0, l = eras.length; i < l; ++i) {
switch (typeof eras[i].since) {
case 'string':
date = hooks(eras[i].since).startOf('day');
eras[i].since = date.valueOf();
break;
}
switch (typeof eras[i].until) {
case 'undefined':
eras[i].until = 1 / 0;
break;
case 'string':
date = hooks(eras[i].until).startOf('day').valueOf();
eras[i].until = date.valueOf();
break;
}
}
return eras;
}
function localeErasParse(eraName, format, strict) {
var i,
l,
eras = this.eras(),
name,
abbr,
narrow;
eraName = eraName.toUpperCase();
for (i = 0, l = eras.length; i < l; ++i) {
name = eras[i].name.toUpperCase();
abbr = eras[i].abbr.toUpperCase();
narrow = eras[i].narrow.toUpperCase();
if (strict) {
switch (format) {
case 'N':
case 'NN':
case 'NNN':
if (abbr === eraName) {
return eras[i];
}
break;
case 'NNNN':
if (name === eraName) {
return eras[i];
}
break;
case 'NNNNN':
if (narrow === eraName) {
return eras[i];
}
break;
}
} else if ([name, abbr, narrow].indexOf(eraName) >= 0) {
return eras[i];
}
}
}
function localeErasConvertYear(era, year) {
var dir = era.since <= era.until ? 1 : -1;
if (year === undefined) {
return hooks(era.since).year();
} else {
return hooks(era.since).year() + (year - era.offset) * dir;
}
}
function getEraName() {
var i,
l,
val,
eras = this.localeData().eras();
for (i = 0, l = eras.length; i < l; ++i) {
val = this.startOf('day').valueOf();
if (eras[i].since <= val && val <= eras[i].until) {
return eras[i].name;
}
if (eras[i].until <= val && val <= eras[i].since) {
return eras[i].name;
}
}
return '';
}
function getEraNarrow() {
var i,
l,
val,
eras = this.localeData().eras();
for (i = 0, l = eras.length; i < l; ++i) {
val = this.startOf('day').valueOf();
if (eras[i].since <= val && val <= eras[i].until) {
return eras[i].narrow;
}
if (eras[i].until <= val && val <= eras[i].since) {
return eras[i].narrow;
}
}
return '';
}
function getEraAbbr() {
var i,
l,
val,
eras = this.localeData().eras();
for (i = 0, l = eras.length; i < l; ++i) {
val = this.startOf('day').valueOf();
if (eras[i].since <= val && val <= eras[i].until) {
return eras[i].abbr;
}
if (eras[i].until <= val && val <= eras[i].since) {
return eras[i].abbr;
}
}
return '';
}
function getEraYear() {
var i,
l,
dir,
val,
eras = this.localeData().eras();
for (i = 0, l = eras.length; i < l; ++i) {
dir = eras[i].since <= eras[i].until ? 1 : -1;
val = this.startOf('day').valueOf();
if (eras[i].since <= val && val <= eras[i].until || eras[i].until <= val && val <= eras[i].since) {
return (this.year() - hooks(eras[i].since).year()) * dir + eras[i].offset;
}
}
return this.year();
}
function erasNameRegex(isStrict) {
if (!hasOwnProp(this, '_erasNameRegex')) {
computeErasParse.call(this);
}
return isStrict ? this._erasNameRegex : this._erasRegex;
}
function erasAbbrRegex(isStrict) {
if (!hasOwnProp(this, '_erasAbbrRegex')) {
computeErasParse.call(this);
}
return isStrict ? this._erasAbbrRegex : this._erasRegex;
}
function erasNarrowRegex(isStrict) {
if (!hasOwnProp(this, '_erasNarrowRegex')) {
computeErasParse.call(this);
}
return isStrict ? this._erasNarrowRegex : this._erasRegex;
}
function matchEraAbbr(isStrict, locale) {
return locale.erasAbbrRegex(isStrict);
}
function matchEraName(isStrict, locale) {
return locale.erasNameRegex(isStrict);
}
function matchEraNarrow(isStrict, locale) {
return locale.erasNarrowRegex(isStrict);
}
function matchEraYearOrdinal(isStrict, locale) {
return locale._eraYearOrdinalRegex || matchUnsigned;
}
function computeErasParse() {
var abbrPieces = [],
namePieces = [],
narrowPieces = [],
mixedPieces = [],
i,
l,
eras = this.eras();
for (i = 0, l = eras.length; i < l; ++i) {
namePieces.push(regexEscape(eras[i].name));
abbrPieces.push(regexEscape(eras[i].abbr));
narrowPieces.push(regexEscape(eras[i].narrow));
mixedPieces.push(regexEscape(eras[i].name));
mixedPieces.push(regexEscape(eras[i].abbr));
mixedPieces.push(regexEscape(eras[i].narrow));
}
this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
this._erasNameRegex = new RegExp('^(' + namePieces.join('|') + ')', 'i');
this._erasAbbrRegex = new RegExp('^(' + abbrPieces.join('|') + ')', 'i');
this._erasNarrowRegex = new RegExp('^(' + narrowPieces.join('|') + ')', 'i');
}
addFormatToken(0, ['gg', 2], 0, function () {
return this.weekYear() % 100;
});
addFormatToken(0, ['GG', 2], 0, function () {
return this.isoWeekYear() % 100;
});
function addWeekYearFormatToken(token, getter) {
addFormatToken(0, [token, token.length], 0, getter);
}
addWeekYearFormatToken('gggg', 'weekYear');
addWeekYearFormatToken('ggggg', 'weekYear');
addWeekYearFormatToken('GGGG', 'isoWeekYear');
addWeekYearFormatToken('GGGGG', 'isoWeekYear');
addUnitAlias('weekYear', 'gg');
addUnitAlias('isoWeekYear', 'GG');
addUnitPriority('weekYear', 1);
addUnitPriority('isoWeekYear', 1);
addRegexToken('G', matchSigned);
addRegexToken('g', matchSigned);
addRegexToken('GG', match1to2, match2);
addRegexToken('gg', match1to2, match2);
addRegexToken('GGGG', match1to4, match4);
addRegexToken('gggg', match1to4, match4);
addRegexToken('GGGGG', match1to6, match6);
addRegexToken('ggggg', match1to6, match6);
addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (input, week, config, token) {
week[token.substr(0, 2)] = toInt(input);
});
addWeekParseToken(['gg', 'GG'], function (input, week, config, token) {
week[token] = hooks.parseTwoDigitYear(input);
});
function getSetWeekYear(input) {
return getSetWeekYearHelper.call(this, input, this.week(), this.weekday(), this.localeData()._week.dow, this.localeData()._week.doy);
}
function getSetISOWeekYear(input) {
return getSetWeekYearHelper.call(this, input, this.isoWeek(), this.isoWeekday(), 1, 4);
}
function getISOWeeksInYear() {
return weeksInYear(this.year(), 1, 4);
}
function getISOWeeksInISOWeekYear() {
return weeksInYear(this.isoWeekYear(), 1, 4);
}
function getWeeksInYear() {
var weekInfo = this.localeData()._week;
return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);
}
function getWeeksInWeekYear() {
var weekInfo = this.localeData()._week;
return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy);
}
function getSetWeekYearHelper(input, week, weekday, dow, doy) {
var weeksTarget;
if (input == null) {
return weekOfYear(this, dow, doy).year;
} else {
weeksTarget = weeksInYear(input, dow, doy);
if (week > weeksTarget) {
week = weeksTarget;
}
return setWeekAll.call(this, input, week, weekday, dow, doy);
}
}
function setWeekAll(weekYear, week, weekday, dow, doy) {
var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),
date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);
this.year(date.getUTCFullYear());
this.month(date.getUTCMonth());
this.date(date.getUTCDate());
return this;
}
addFormatToken('Q', 0, 'Qo', 'quarter');
addUnitAlias('quarter', 'Q');
addUnitPriority('quarter', 7);
addRegexToken('Q', match1);
addParseToken('Q', function (input, array) {
array[MONTH] = (toInt(input) - 1) * 3;
});
function getSetQuarter(input) {
return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3);
}
addFormatToken('D', ['DD', 2], 'Do', 'date');
addUnitAlias('date', 'D');
addUnitPriority('date', 9);
addRegexToken('D', match1to2);
addRegexToken('DD', match1to2, match2);
addRegexToken('Do', function (isStrict, locale) {
return isStrict ? locale._dayOfMonthOrdinalParse || locale._ordinalParse : locale._dayOfMonthOrdinalParseLenient;
});
addParseToken(['D', 'DD'], DATE);
addParseToken('Do', function (input, array) {
array[DATE] = toInt(input.match(match1to2)[0]);
});
var getSetDayOfMonth = makeGetSet('Date', true);
addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');
addUnitAlias('dayOfYear', 'DDD');
addUnitPriority('dayOfYear', 4);
addRegexToken('DDD', match1to3);
addRegexToken('DDDD', match3);
addParseToken(['DDD', 'DDDD'], function (input, array, config) {
config._dayOfYear = toInt(input);
});
function getSetDayOfYear(input) {
var dayOfYear = Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) + 1;
return input == null ? dayOfYear : this.add(input - dayOfYear, 'd');
}
addFormatToken('m', ['mm', 2], 0, 'minute');
addUnitAlias('minute', 'm');
addUnitPriority('minute', 14);
addRegexToken('m', match1to2);
addRegexToken('mm', match1to2, match2);
addParseToken(['m', 'mm'], MINUTE);
var getSetMinute = makeGetSet('Minutes', false);
addFormatToken('s', ['ss', 2], 0, 'second');
addUnitAlias('second', 's');
addUnitPriority('second', 15);
addRegexToken('s', match1to2);
addRegexToken('ss', match1to2, match2);
addParseToken(['s', 'ss'], SECOND);
var getSetSecond = makeGetSet('Seconds', false);
addFormatToken('S', 0, 0, function () {
return ~~(this.millisecond() / 100);
});
addFormatToken(0, ['SS', 2], 0, function () {
return ~~(this.millisecond() / 10);
});
addFormatToken(0, ['SSS', 3], 0, 'millisecond');
addFormatToken(0, ['SSSS', 4], 0, function () {
return this.millisecond() * 10;
});
addFormatToken(0, ['SSSSS', 5], 0, function () {
return this.millisecond() * 100;
});
addFormatToken(0, ['SSSSSS', 6], 0, function () {
return this.millisecond() * 1000;
});
addFormatToken(0, ['SSSSSSS', 7], 0, function () {
return this.millisecond() * 10000;
});
addFormatToken(0, ['SSSSSSSS', 8], 0, function () {
return this.millisecond() * 100000;
});
addFormatToken(0, ['SSSSSSSSS', 9], 0, function () {
return this.millisecond() * 1000000;
});
addUnitAlias('millisecond', 'ms');
addUnitPriority('millisecond', 16);
addRegexToken('S', match1to3, match1);
addRegexToken('SS', match1to3, match2);
addRegexToken('SSS', match1to3, match3);
var token, getSetMillisecond;
for (token = 'SSSS'; token.length <= 9; token += 'S') {
addRegexToken(token, matchUnsigned);
}
function parseMs(input, array) {
array[MILLISECOND] = toInt(('0.' + input) * 1000);
}
for (token = 'S'; token.length <= 9; token += 'S') {
addParseToken(token, parseMs);
}
getSetMillisecond = makeGetSet('Milliseconds', false);
addFormatToken('z', 0, 0, 'zoneAbbr');
addFormatToken('zz', 0, 0, 'zoneName');
function getZoneAbbr() {
return this._isUTC ? 'UTC' : '';
}
function getZoneName() {
return this._isUTC ? 'Coordinated Universal Time' : '';
}
var proto = Moment.prototype;
proto.add = add;
proto.calendar = calendar$1;
proto.clone = clone;
proto.diff = diff;
proto.endOf = endOf;
proto.format = format;
proto.from = from;
proto.fromNow = fromNow;
proto.to = to;
proto.toNow = toNow;
proto.get = stringGet;
proto.invalidAt = invalidAt;
proto.isAfter = isAfter;
proto.isBefore = isBefore;
proto.isBetween = isBetween;
proto.isSame = isSame;
proto.isSameOrAfter = isSameOrAfter;
proto.isSameOrBefore = isSameOrBefore;
proto.isValid = isValid$2;
proto.lang = lang;
proto.locale = locale;
proto.localeData = localeData;
proto.max = prototypeMax;
proto.min = prototypeMin;
proto.parsingFlags = parsingFlags;
proto.set = stringSet;
proto.startOf = startOf;
proto.subtract = subtract;
proto.toArray = toArray;
proto.toObject = toObject;
proto.toDate = toDate;
proto.toISOString = toISOString;
proto.inspect = inspect;
if (typeof Symbol !== 'undefined' && (typeof Symbol === "function" ? Symbol.for : "@@for") != null) {
proto[(typeof Symbol === "function" ? Symbol.for : "@@for")('nodejs.util.inspect.custom')] = function () {
return 'Moment<' + this.format() + '>';
};
}
proto.toJSON = toJSON;
proto.toString = toString;
proto.unix = unix;
proto.valueOf = valueOf;
proto.creationData = creationData;
proto.eraName = getEraName;
proto.eraNarrow = getEraNarrow;
proto.eraAbbr = getEraAbbr;
proto.eraYear = getEraYear;
proto.year = getSetYear;
proto.isLeapYear = getIsLeapYear;
proto.weekYear = getSetWeekYear;
proto.isoWeekYear = getSetISOWeekYear;
proto.quarter = proto.quarters = getSetQuarter;
proto.month = getSetMonth;
proto.daysInMonth = getDaysInMonth;
proto.week = proto.weeks = getSetWeek;
proto.isoWeek = proto.isoWeeks = getSetISOWeek;
proto.weeksInYear = getWeeksInYear;
proto.weeksInWeekYear = getWeeksInWeekYear;
proto.isoWeeksInYear = getISOWeeksInYear;
proto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear;
proto.date = getSetDayOfMonth;
proto.day = proto.days = getSetDayOfWeek;
proto.weekday = getSetLocaleDayOfWeek;
proto.isoWeekday = getSetISODayOfWeek;
proto.dayOfYear = getSetDayOfYear;
proto.hour = proto.hours = getSetHour;
proto.minute = proto.minutes = getSetMinute;
proto.second = proto.seconds = getSetSecond;
proto.millisecond = proto.milliseconds = getSetMillisecond;
proto.utcOffset = getSetOffset;
proto.utc = setOffsetToUTC;
proto.local = setOffsetToLocal;
proto.parseZone = setOffsetToParsedOffset;
proto.hasAlignedHourOffset = hasAlignedHourOffset;
proto.isDST = isDaylightSavingTime;
proto.isLocal = isLocal;
proto.isUtcOffset = isUtcOffset;
proto.isUtc = isUtc;
proto.isUTC = isUtc;
proto.zoneAbbr = getZoneAbbr;
proto.zoneName = getZoneName;
proto.dates = deprecate('dates accessor is deprecated. Use date instead.', getSetDayOfMonth);
proto.months = deprecate('months accessor is deprecated. Use month instead', getSetMonth);
proto.years = deprecate('years accessor is deprecated. Use year instead', getSetYear);
proto.zone = deprecate('moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/', getSetZone);
proto.isDSTShifted = deprecate('isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information', isDaylightSavingTimeShifted);
function createUnix(input) {
return createLocal(input * 1000);
}
function createInZone() {
return createLocal.apply(null, arguments).parseZone();
}
function preParsePostFormat(string) {
return string;
}
var proto$1 = Locale.prototype;
proto$1.calendar = calendar;
proto$1.longDateFormat = longDateFormat;
proto$1.invalidDate = invalidDate;
proto$1.ordinal = ordinal;
proto$1.preparse = preParsePostFormat;
proto$1.postformat = preParsePostFormat;
proto$1.relativeTime = relativeTime;
proto$1.pastFuture = pastFuture;
proto$1.set = set;
proto$1.eras = localeEras;
proto$1.erasParse = localeErasParse;
proto$1.erasConvertYear = localeErasConvertYear;
proto$1.erasAbbrRegex = erasAbbrRegex;
proto$1.erasNameRegex = erasNameRegex;
proto$1.erasNarrowRegex = erasNarrowRegex;
proto$1.months = localeMonths;
proto$1.monthsShort = localeMonthsShort;
proto$1.monthsParse = localeMonthsParse;
proto$1.monthsRegex = monthsRegex;
proto$1.monthsShortRegex = monthsShortRegex;
proto$1.week = localeWeek;
proto$1.firstDayOfYear = localeFirstDayOfYear;
proto$1.firstDayOfWeek = localeFirstDayOfWeek;
proto$1.weekdays = localeWeekdays;
proto$1.weekdaysMin = localeWeekdaysMin;
proto$1.weekdaysShort = localeWeekdaysShort;
proto$1.weekdaysParse = localeWeekdaysParse;
proto$1.weekdaysRegex = weekdaysRegex;
proto$1.weekdaysShortRegex = weekdaysShortRegex;
proto$1.weekdaysMinRegex = weekdaysMinRegex;
proto$1.isPM = localeIsPM;
proto$1.meridiem = localeMeridiem;
function get$1(format, index, field, setter) {
var locale = getLocale(),
utc = createUTC().set(setter, index);
return locale[field](utc, format);
}
function listMonthsImpl(format, index, field) {
if (isNumber(format)) {
index = format;
format = undefined;
}
format = format || '';
if (index != null) {
return get$1(format, index, field, 'month');
}
var i,
out = [];
for (i = 0; i < 12; i++) {
out[i] = get$1(format, i, field, 'month');
}
return out;
}
function listWeekdaysImpl(localeSorted, format, index, field) {
if (typeof localeSorted === 'boolean') {
if (isNumber(format)) {
index = format;
format = undefined;
}
format = format || '';
} else {
format = localeSorted;
index = format;
localeSorted = false;
if (isNumber(format)) {
index = format;
format = undefined;
}
format = format || '';
}
var locale = getLocale(),
shift = localeSorted ? locale._week.dow : 0,
i,
out = [];
if (index != null) {
return get$1(format, (index + shift) % 7, field, 'day');
}
for (i = 0; i < 7; i++) {
out[i] = get$1(format, (i + shift) % 7, field, 'day');
}
return out;
}
function listMonths(format, index) {
return listMonthsImpl(format, index, 'months');
}
function listMonthsShort(format, index) {
return listMonthsImpl(format, index, 'monthsShort');
}
function listWeekdays(localeSorted, format, index) {
return listWeekdaysImpl(localeSorted, format, index, 'weekdays');
}
function listWeekdaysShort(localeSorted, format, index) {
return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');
}
function listWeekdaysMin(localeSorted, format, index) {
return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');
}
getSetGlobalLocale('en', {
eras: [{
since: '0001-01-01',
until: 1 / 0,
offset: 1,
name: 'Anno Domini',
narrow: 'AD',
abbr: 'AD'
}, {
since: '0000-12-31',
until: -(1 / 0),
offset: 1,
name: 'Before Christ',
narrow: 'BC',
abbr: 'BC'
}],
dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/,
ordinal: function ordinal(number) {
var b = number % 10,
output = toInt(number % 100 / 10) === 1 ? 'th' : b === 1 ? 'st' : b === 2 ? 'nd' : b === 3 ? 'rd' : 'th';
return number + output;
}
});
hooks.lang = deprecate('moment.lang is deprecated. Use moment.locale instead.', getSetGlobalLocale);
hooks.langData = deprecate('moment.langData is deprecated. Use moment.localeData instead.', getLocale);
var mathAbs = Math.abs;
function abs() {
var data = this._data;
this._milliseconds = mathAbs(this._milliseconds);
this._days = mathAbs(this._days);
this._months = mathAbs(this._months);
data.milliseconds = mathAbs(data.milliseconds);
data.seconds = mathAbs(data.seconds);
data.minutes = mathAbs(data.minutes);
data.hours = mathAbs(data.hours);
data.months = mathAbs(data.months);
data.years = mathAbs(data.years);
return this;
}
function addSubtract$1(duration, input, value, direction) {
var other = createDuration(input, value);
duration._milliseconds += direction * other._milliseconds;
duration._days += direction * other._days;
duration._months += direction * other._months;
return duration._bubble();
}
function add$1(input, value) {
return addSubtract$1(this, input, value, 1);
}
function subtract$1(input, value) {
return addSubtract$1(this, input, value, -1);
}
function absCeil(number) {
if (number < 0) {
return Math.floor(number);
} else {
return Math.ceil(number);
}
}
function bubble() {
var milliseconds = this._milliseconds,
days = this._days,
months = this._months,
data = this._data,
seconds,
minutes,
hours,
years,
monthsFromDays;
if (!(milliseconds >= 0 && days >= 0 && months >= 0 || milliseconds <= 0 && days <= 0 && months <= 0)) {
milliseconds += absCeil(monthsToDays(months) + days) * 864e5;
days = 0;
months = 0;
}
data.milliseconds = milliseconds % 1000;
seconds = absFloor(milliseconds / 1000);
data.seconds = seconds % 60;
minutes = absFloor(seconds / 60);
data.minutes = minutes % 60;
hours = absFloor(minutes / 60);
data.hours = hours % 24;
days += absFloor(hours / 24);
monthsFromDays = absFloor(daysToMonths(days));
months += monthsFromDays;
days -= absCeil(monthsToDays(monthsFromDays));
years = absFloor(months / 12);
months %= 12;
data.days = days;
data.months = months;
data.years = years;
return this;
}
function daysToMonths(days) {
return days * 4800 / 146097;
}
function monthsToDays(months) {
return months * 146097 / 4800;
}
function as(units) {
if (!this.isValid()) {
return NaN;
}
var days,
months,
milliseconds = this._milliseconds;
units = normalizeUnits(units);
if (units === 'month' || units === 'quarter' || units === 'year') {
days = this._days + milliseconds / 864e5;
months = this._months + daysToMonths(days);
switch (units) {
case 'month':
return months;
case 'quarter':
return months / 3;
case 'year':
return months / 12;
}
} else {
days = this._days + Math.round(monthsToDays(this._months));
switch (units) {
case 'week':
return days / 7 + milliseconds / 6048e5;
case 'day':
return days + milliseconds / 864e5;
case 'hour':
return days * 24 + milliseconds / 36e5;
case 'minute':
return days * 1440 + milliseconds / 6e4;
case 'second':
return days * 86400 + milliseconds / 1000;
case 'millisecond':
return Math.floor(days * 864e5) + milliseconds;
default:
throw new Error('Unknown unit ' + units);
}
}
}
function valueOf$1() {
if (!this.isValid()) {
return NaN;
}
return this._milliseconds + this._days * 864e5 + this._months % 12 * 2592e6 + toInt(this._months / 12) * 31536e6;
}
function makeAs(alias) {
return function () {
return this.as(alias);
};
}
var asMilliseconds = makeAs('ms'),
asSeconds = makeAs('s'),
asMinutes = makeAs('m'),
asHours = makeAs('h'),
asDays = makeAs('d'),
asWeeks = makeAs('w'),
asMonths = makeAs('M'),
asQuarters = makeAs('Q'),
asYears = makeAs('y');
function clone$1() {
return createDuration(this);
}
function get$2(units) {
units = normalizeUnits(units);
return this.isValid() ? this[units + 's']() : NaN;
}
function makeGetter(name) {
return function () {
return this.isValid() ? this._data[name] : NaN;
};
}
var milliseconds = makeGetter('milliseconds'),
seconds = makeGetter('seconds'),
minutes = makeGetter('minutes'),
hours = makeGetter('hours'),
days = makeGetter('days'),
months = makeGetter('months'),
years = makeGetter('years');
function weeks() {
return absFloor(this.days() / 7);
}
var round = Math.round,
thresholds = {
ss: 44,
s: 45,
m: 45,
h: 22,
d: 26,
w: null,
M: 11
};
function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {
return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);
}
function relativeTime$1(posNegDuration, withoutSuffix, thresholds, locale) {
var duration = createDuration(posNegDuration).abs(),
seconds = round(duration.as('s')),
minutes = round(duration.as('m')),
hours = round(duration.as('h')),
days = round(duration.as('d')),
months = round(duration.as('M')),
weeks = round(duration.as('w')),
years = round(duration.as('y')),
a = seconds <= thresholds.ss && ['s', seconds] || seconds < thresholds.s && ['ss', seconds] || minutes <= 1 && ['m'] || minutes < thresholds.m && ['mm', minutes] || hours <= 1 && ['h'] || hours < thresholds.h && ['hh', hours] || days <= 1 && ['d'] || days < thresholds.d && ['dd', days];
if (thresholds.w != null) {
a = a || weeks <= 1 && ['w'] || weeks < thresholds.w && ['ww', weeks];
}
a = a || months <= 1 && ['M'] || months < thresholds.M && ['MM', months] || years <= 1 && ['y'] || ['yy', years];
a[2] = withoutSuffix;
a[3] = +posNegDuration > 0;
a[4] = locale;
return substituteTimeAgo.apply(null, a);
}
function getSetRelativeTimeRounding(roundingFunction) {
if (roundingFunction === undefined) {
return round;
}
if (typeof roundingFunction === 'function') {
round = roundingFunction;
return true;
}
return false;
}
function getSetRelativeTimeThreshold(threshold, limit) {
if (thresholds[threshold] === undefined) {
return false;
}
if (limit === undefined) {
return thresholds[threshold];
}
thresholds[threshold] = limit;
if (threshold === 's') {
thresholds.ss = limit - 1;
}
return true;
}
function humanize(argWithSuffix, argThresholds) {
if (!this.isValid()) {
return this.localeData().invalidDate();
}
var withSuffix = false,
th = thresholds,
locale,
output;
if (typeof argWithSuffix === 'object') {
argThresholds = argWithSuffix;
argWithSuffix = false;
}
if (typeof argWithSuffix === 'boolean') {
withSuffix = argWithSuffix;
}
if (typeof argThresholds === 'object') {
th = _extends({}, thresholds, argThresholds);
if (argThresholds.s != null && argThresholds.ss == null) {
th.ss = argThresholds.s - 1;
}
}
locale = this.localeData();
output = relativeTime$1(this, !withSuffix, th, locale);
if (withSuffix) {
output = locale.pastFuture(+this, output);
}
return locale.postformat(output);
}
var abs$1 = Math.abs;
function sign(x) {
return (x > 0) - (x < 0) || +x;
}
function toISOString$1() {
if (!this.isValid()) {
return this.localeData().invalidDate();
}
var seconds = abs$1(this._milliseconds) / 1000,
days = abs$1(this._days),
months = abs$1(this._months),
minutes,
hours,
years,
s,
total = this.asSeconds(),
totalSign,
ymSign,
daysSign,
hmsSign;
if (!total) {
return 'P0D';
}
minutes = absFloor(seconds / 60);
hours = absFloor(minutes / 60);
seconds %= 60;
minutes %= 60;
years = absFloor(months / 12);
months %= 12;
s = seconds ? seconds.toFixed(3).replace(/\.?0+$/, '') : '';
totalSign = total < 0 ? '-' : '';
ymSign = sign(this._months) !== sign(total) ? '-' : '';
daysSign = sign(this._days) !== sign(total) ? '-' : '';
hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';
return totalSign + 'P' + (years ? ymSign + years + 'Y' : '') + (months ? ymSign + months + 'M' : '') + (days ? daysSign + days + 'D' : '') + (hours || minutes || seconds ? 'T' : '') + (hours ? hmsSign + hours + 'H' : '') + (minutes ? hmsSign + minutes + 'M' : '') + (seconds ? hmsSign + s + 'S' : '');
}
var proto$2 = Duration.prototype;
proto$2.isValid = isValid$1;
proto$2.abs = abs;
proto$2.add = add$1;
proto$2.subtract = subtract$1;
proto$2.as = as;
proto$2.asMilliseconds = asMilliseconds;
proto$2.asSeconds = asSeconds;
proto$2.asMinutes = asMinutes;
proto$2.asHours = asHours;
proto$2.asDays = asDays;
proto$2.asWeeks = asWeeks;
proto$2.asMonths = asMonths;
proto$2.asQuarters = asQuarters;
proto$2.asYears = asYears;
proto$2.valueOf = valueOf$1;
proto$2._bubble = bubble;
proto$2.clone = clone$1;
proto$2.get = get$2;
proto$2.milliseconds = milliseconds;
proto$2.seconds = seconds;
proto$2.minutes = minutes;
proto$2.hours = hours;
proto$2.days = days;
proto$2.weeks = weeks;
proto$2.months = months;
proto$2.years = years;
proto$2.humanize = humanize;
proto$2.toISOString = toISOString$1;
proto$2.toString = toISOString$1;
proto$2.toJSON = toISOString$1;
proto$2.locale = locale;
proto$2.localeData = localeData;
proto$2.toIsoString = deprecate('toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', toISOString$1);
proto$2.lang = lang;
addFormatToken('X', 0, 0, 'unix');
addFormatToken('x', 0, 0, 'valueOf');
addRegexToken('x', matchSigned);
addRegexToken('X', matchTimestamp);
addParseToken('X', function (input, array, config) {
config._d = new Date(parseFloat(input) * 1000);
});
addParseToken('x', function (input, array, config) {
config._d = new Date(toInt(input));
});
hooks.version = '2.26.0';
setHookCallback(createLocal);
hooks.fn = proto;
hooks.min = min;
hooks.max = max;
hooks.now = now;
hooks.utc = createUTC;
hooks.unix = createUnix;
hooks.months = listMonths;
hooks.isDate = isDate;
hooks.locale = getSetGlobalLocale;
hooks.invalid = createInvalid;
hooks.duration = createDuration;
hooks.isMoment = isMoment;
hooks.weekdays = listWeekdays;
hooks.parseZone = createInZone;
hooks.localeData = getLocale;
hooks.isDuration = isDuration;
hooks.monthsShort = listMonthsShort;
hooks.weekdaysMin = listWeekdaysMin;
hooks.defineLocale = defineLocale;
hooks.updateLocale = updateLocale;
hooks.locales = listLocales;
hooks.weekdaysShort = listWeekdaysShort;
hooks.normalizeUnits = normalizeUnits;
hooks.relativeTimeRounding = getSetRelativeTimeRounding;
hooks.relativeTimeThreshold = getSetRelativeTimeThreshold;
hooks.calendarFormat = getCalendarFormat;
hooks.prototype = proto;
hooks.HTML5_FMT = {
DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm',
DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss',
DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS',
DATE: 'YYYY-MM-DD',
TIME: 'HH:mm',
TIME_SECONDS: 'HH:mm:ss',
TIME_MS: 'HH:mm:ss.SSS',
WEEK: 'GGGG-[W]WW',
MONTH: 'YYYY-MM'
};
return hooks;
});
},10085,[14344]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
module.exports = _$$_REQUIRE(_dependencyMap[0]).registerAsset({
"__packager_asset": true,
"httpServerLocation": "/assets/projects/com.cleargrass.snow.mi/Resources/advice",
"width": 18.666666666666668,
"height": 18.666666666666668,
"scales": [3],
"hash": "2f4a62ea34467ad4891d766320a6b411",
"name": "advice_add_humidify",
"type": "png"
});
},10088,[10420]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
module.exports = _$$_REQUIRE(_dependencyMap[0]).registerAsset({
"__packager_asset": true,
"httpServerLocation": "/assets/projects/com.cleargrass.snow.mi/Resources/advice",
"width": 18.666666666666668,
"height": 18.666666666666668,
"scales": [3],
"hash": "8d795daad849a2000416229b1dc4975e",
"name": "advice_air_purifier",
"type": "png"
});
},10091,[10420]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
module.exports = _$$_REQUIRE(_dependencyMap[0]).registerAsset({
"__packager_asset": true,
"httpServerLocation": "/assets/projects/com.cleargrass.snow.mi/Resources/advice",
"width": 18.666666666666668,
"height": 18.666666666666668,
"scales": [3],
"hash": "02de5687a984fc9ea541adf1662d4b89",
"name": "advice_heating",
"type": "png"
});
},10094,[10420]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
module.exports = _$$_REQUIRE(_dependencyMap[0]).registerAsset({
"__packager_asset": true,
"httpServerLocation": "/assets/projects/com.cleargrass.snow.mi/Resources/advice",
"width": 18.666666666666668,
"height": 18.666666666666668,
"scales": [3],
"hash": "39e32143919eeb67d124217001890bb0",
"name": "advice_colder",
"type": "png"
});
},10097,[10420]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
module.exports = _$$_REQUIRE(_dependencyMap[0]).registerAsset({
"__packager_asset": true,
"httpServerLocation": "/assets/projects/com.cleargrass.snow.mi/Resources/advice",
"width": 18.666666666666668,
"height": 18.666666666666668,
"scales": [3],
"hash": "495f7d36f487f8747476b6b64978d049",
"name": "advice_air_ventilate",
"type": "png"
});
},10100,[10420]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
module.exports = _$$_REQUIRE(_dependencyMap[0]).registerAsset({
"__packager_asset": true,
"httpServerLocation": "/assets/projects/com.cleargrass.snow.mi/Resources/advice",
"width": 18.666666666666668,
"height": 18.666666666666668,
"scales": [3],
"hash": "085f5f17b568dfcdabe41132aed60b1b",
"name": "advice_open_window",
"type": "png"
});
},10103,[10420]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
module.exports = _$$_REQUIRE(_dependencyMap[0]).registerAsset({
"__packager_asset": true,
"httpServerLocation": "/assets/projects/com.cleargrass.snow.mi/Resources/advice",
"width": 18.666666666666668,
"height": 18.666666666666668,
"scales": [3],
"hash": "32a23c9f1e09f22ce72e40adf5413580",
"name": "advice_dehumidify",
"type": "png"
});
},10106,[10420]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var _interopRequireDefault = _$$_REQUIRE(_dependencyMap[0]);
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = undefined;
var _classCallCheck2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[1]));
var _createClass2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[2]));
var _possibleConstructorReturn2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[3]));
var _getPrototypeOf2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[4]));
var _inherits2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[5]));
var _react = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[6]));
var _reactNative = _$$_REQUIRE(_dependencyMap[7]);
var _MHGlobalData = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[8]));
var _ui = _$$_REQUIRE(_dependencyMap[9]);
var _miot = _$$_REQUIRE(_dependencyMap[10]);
var _util = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[11]));
var _MHLocalizableString = _$$_REQUIRE(_dependencyMap[12]);
var STATUSBAR_HEIGHT = _MHGlobalData.default.statusBarHeight;
var window = _reactNative.Dimensions.get('window');
var APPBAR_HEIGHT = _reactNative.Platform.OS === 'ios' ? 44 : 56;
var APPBAR_MARGINTOP = 25;
var topHeight = 0;
var power = function (_React$Component) {
(0, _inherits2.default)(power, _React$Component);
function power(props, context) {
var _this;
(0, _classCallCheck2.default)(this, power);
_this = (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(power).call(this, props, context));
_this.state = {};
return _this;
}
(0, _createClass2.default)(power, [{
key: "render",
value: function render() {
var time = _MHLocalizableString.MainLocalizableString.formatString(_MHLocalizableString.MainLocalizableString.detecting_time, _util.default.DateMMMDDHHMM());
var text = _miot.Device.name;
if (!this.state.isShare) {
return null;
}
return _react.default.createElement(_reactNative.View, {
style: styles.container
}, _react.default.createElement(_reactNative.Text, {
style: [styles.navBarText, styles.navBarTitleText],
numberOfLines: 1
}, text), _react.default.createElement(_reactNative.Text, {
style: styles.time
}, time));
}
}]);
return power;
}(_react.default.Component);
var styles = _reactNative.StyleSheet.create({
container: {
width: window.width,
alignItems: 'center',
backgroundColor: '#222',
paddingTop: 15
},
power: {
color: '#ffffff',
fontSize: 13
},
time: {
color: '#ffffff',
fontSize: 13
},
navBarText: {
fontSize: 16,
color: '#ffffff',
textAlign: "center"
},
navBarTitleText: {
fontWeight: '500',
fontSize: 14.58,
alignSelf: "stretch",
marginHorizontal: 97
}
});
var _default = power;
exports.default = _default;
},10109,[14305,14320,14323,14371,14377,14386,10297,10033,10016,10230,10074,10034,10013]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var _interopRequireWildcard = _$$_REQUIRE(_dependencyMap[0]);
var _interopRequireDefault = _$$_REQUIRE(_dependencyMap[1]);
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = undefined;
var _classCallCheck2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[2]));
var _createClass2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[3]));
var _possibleConstructorReturn2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[4]));
var _getPrototypeOf2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[5]));
var _inherits2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[6]));
var _react = _interopRequireWildcard(_$$_REQUIRE(_dependencyMap[7]));
var _HelloDeveloper = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[8]));
var _reactNative = _$$_REQUIRE(_dependencyMap[9]);
var _reactNavigation = _$$_REQUIRE(_dependencyMap[10]);
var _miot = _$$_REQUIRE(_dependencyMap[11]);
var _ui = _$$_REQUIRE(_dependencyMap[12]);
var _MHLocalizableString = _$$_REQUIRE(_dependencyMap[13]);
var _Dimensions$get = _reactNative.Dimensions.get('window'),
width = _Dimensions$get.width,
height = _Dimensions$get.height;
var TIME = 300;
var AndroidSetting = function (_Component) {
(0, _inherits2.default)(AndroidSetting, _Component);
function AndroidSetting(props) {
var _this;
(0, _classCallCheck2.default)(this, AndroidSetting);
_this = (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(AndroidSetting).call(this, props));
var ds = new _reactNative.ListView.DataSource({
rowHasChanged: function rowHasChanged(r1, r2) {
return r1 !== r2;
}
});
_this._createMenuData();
_this.state = {
modalVisible: _this.props.visible,
dataSource: ds.cloneWithRows(_this._menuData),
animSlide: new _reactNative.Animated.Value(0),
animOpacity: new _reactNative.Animated.Value(0)
};
return _this;
}
(0, _createClass2.default)(AndroidSetting, [{
key: "_createMenuData",
value: function _createMenuData() {
var _this2 = this;
this._menuData = [{
'name': '智能',
'func': function func() {
_miot.Host.ui.openIftttAutoPage();
}
}, {
'name': '通用设置',
'func': function func() {
_this2.props.navigation.navigate('MoreMenu', {
title: '通用设置'
});
_this2.dismissDialog(false);
}
}, {
'name': '使用帮助',
'func': function func() {
_miot.Host.ui.openFeedbackInput();
}
}];
}
}, {
key: "onShowDidButtonPress",
value: function onShowDidButtonPress() {
this.props.navigator.push(_HelloDeveloper.default.route);
}
}, {
key: "renderRow",
value: function renderRow(rowData, sectionID, rowID) {
return _react.default.createElement(_reactNative.TouchableHighlight, {
underlayColor: "#efeff0",
style: styles.itembkg,
onPress: function onPress() {
if (rowData.switch === undefined) {
rowData.func();
}
}
}, _react.default.createElement(_reactNative.View, null, _react.default.createElement(_reactNative.View, {
style: styles.rowContainer
}, _react.default.createElement(_reactNative.Text, {
style: styles.title
}, rowData.name), rowData.switch !== undefined && _react.default.createElement(_reactNative.Text, {
style: {
width: 60,
height: 30
},
value: rowData.switch,
onValueChange: function onValueChange(v) {
return rowData.func(v);
}
})), _react.default.createElement(_reactNative.View, {
style: styles.separator
})));
}
}, {
key: "componentWillReceiveProps",
value: function componentWillReceiveProps(nextProps) {
if (this.state.modalVisible === nextProps.visible) {
return;
}
if (nextProps.visible) {
this.showDialog(true);
} else {
this.dismissDialog(false);
}
}
}, {
key: "showDialog",
value: function showDialog(doAnim) {
if (doAnim) {
this.state.animSlide.setValue(-height);
this.state.animOpacity.setValue(0.0);
_reactNative.Animated.parallel([_reactNative.Animated.timing(this.state.animSlide, {
toValue: 0.0,
duration: TIME,
easing: _reactNative.Easing.linear
}), _reactNative.Animated.timing(this.state.animOpacity, {
toValue: 1.0,
duration: TIME,
easing: _reactNative.Easing.linear
})]).start();
}
this.setState({
modalVisible: true
});
this.onVisibleChange(true);
}
}, {
key: "render",
value: function render() {
var _this3 = this;
if (this.state.modalVisible) {
return _react.default.createElement(_reactNavigation.SafeAreaView, {
style: {
height: height,
width: width,
position: 'absolute',
top: _reactNative.StatusBar.currentHeight
}
}, _react.default.createElement(_reactNative.TouchableWithoutFeedback, {
style: {
width: width,
flex: 1
},
onPress: function onPress() {
return _this3.dismissDialog(true);
}
}, _react.default.createElement(_reactNative.View, {
style: [{
width: width,
flex: 1
}]
}, _react.default.createElement(_reactNative.Animated.View, {
style: [styles.container, {
opacity: this.state.animOpacity
}]
}, _react.default.createElement(_reactNative.Animated.View, {
style: {
position: 'absolute',
backgroundColor: '#fff',
marginTop: this.state.animSlide
}
}, _react.default.createElement(_reactNative.View, {
style: styles.itembkg
}, _react.default.createElement(_ui.ImageButton, {
style: styles.closeImg,
source: _$$_REQUIRE(_dependencyMap[14]),
highlightedSource: _$$_REQUIRE(_dependencyMap[15]),
onPress: function onPress() {
return _this3.dismissDialog(true);
}
})), _react.default.createElement(_reactNative.View, {
style: styles.separator
}), _react.default.createElement(_reactNative.ListView, {
style: styles.list,
dataSource: this.state.dataSource,
renderRow: this.renderRow.bind(this)
}))))));
} else {
return null;
}
}
}, {
key: "dismissDialog",
value: function dismissDialog(doAnim) {
var _this4 = this;
if (doAnim) {
this.state.animSlide.setValue(0);
this.state.animOpacity.setValue(1.0);
_reactNative.Animated.parallel([_reactNative.Animated.timing(this.state.animSlide, {
toValue: -height,
duration: TIME,
easing: _reactNative.Easing.linear
}), _reactNative.Animated.timing(this.state.animOpacity, {
toValue: 0,
duration: TIME,
easing: _reactNative.Easing.linear
})]).start();
setTimeout(function () {
_this4.setState({
modalVisible: false
});
_this4.onVisibleChange(false);
}, TIME);
} else {
this.setState({
modalVisible: false
});
this.onVisibleChange(false);
}
}
}, {
key: "onVisibleChange",
value: function onVisibleChange(show) {
if (this.props.onVisibleChange) {
this.props.onVisibleChange(show);
}
}
}]);
return AndroidSetting;
}(_react.Component);
exports.default = AndroidSetting;
;
var styles = _reactNative.StyleSheet.create({
container: {
flex: 1,
marginTop: 0,
flexDirection: 'column',
backgroundColor: '#00000055',
justifyContent: 'flex-start'
},
closeImg: {
width: 29,
height: 29,
marginRight: 15,
marginTop: 10,
marginBottom: 10,
alignSelf: 'flex-end'
},
itembkg: {
width: width,
backgroundColor: '#fff'
},
rowContainer: {
alignSelf: 'stretch',
flexDirection: 'row',
alignItems: 'center',
justifyContent: 'space-between',
width: width,
height: 45
},
list: {
alignSelf: 'stretch'
},
title: {
paddingLeft: 23,
paddingRight: 23,
fontSize: 14,
alignItems: 'center',
flex: 1
},
subArrow: {
width: 9,
height: 18
},
separator: {
height: 0.5,
backgroundColor: '#f1f1f1',
marginLeft: 23
}
});
},10112,[14308,14305,14320,14323,14371,14377,14386,10297,10115,10033,10918,10074,10230,10013,10121,10124]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var _interopRequireDefault = _$$_REQUIRE(_dependencyMap[0]);
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = undefined;
var _classCallCheck2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[1]));
var _createClass2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[2]));
var _possibleConstructorReturn2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[3]));
var _getPrototypeOf2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[4]));
var _inherits2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[5]));
var _react = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[6]));
var _reactNative = _$$_REQUIRE(_dependencyMap[7]);
var _ui = _$$_REQUIRE(_dependencyMap[8]);
var HelloDeveloper = function (_React$Component) {
(0, _inherits2.default)(HelloDeveloper, _React$Component);
function HelloDeveloper(props) {
(0, _classCallCheck2.default)(this, HelloDeveloper);
return (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(HelloDeveloper).call(this, props));
}
(0, _createClass2.default)(HelloDeveloper, [{
key: "render",
value: function render() {
return _react.default.createElement(_reactNative.View, {
style: styles.containerAll
}, _react.default.createElement(_reactNative.View, {
style: styles.containerIcon
}, _react.default.createElement(_reactNative.Image, {
style: styles.icon,
source: _$$_REQUIRE(_dependencyMap[9])
})), _react.default.createElement(_reactNative.View, {
style: styles.containerText
}, _react.default.createElement(_reactNative.Text, {
style: styles.title
}, "\u4F60\u597D\uFF0C\u5F00\u53D1\u8005", '\n\n', "\u7EC8\u4E8E\u7B49\u5230\u4F60\u7684\u5230\u6765\uFF0C\u5728\u5C0F\u7C73\u667A\u80FD\u786C\u4EF6\u5E73\u53F0\uFF0C\u60A8\u6709\u673A\u4F1A\u521B\u9020\u51FA\u60CA\u8273\u4E16\u754C\u7684\u667A\u80FD\u4EA7\u54C1\u3002", '\n\n', "\u672A\u6765\u65F6\u667A\u80FD\u5316\u7684\u65F6\u4EE3\uFF0C\u6211\u4EEC\u51C6\u5907\u597D\u4E86\uFF0C\u4F60\u5462\uFF1F")));
}
}]);
return HelloDeveloper;
}(_react.default.Component);
exports.default = HelloDeveloper;
;
var styles = _reactNative.StyleSheet.create({
containerAll: {
flex: 1,
flexDirection: 'column',
backgroundColor: '#838383',
marginTop: 0
},
containerIcon: {
flex: 1.3,
flexDirection: 'column',
justifyContent: 'center',
backgroundColor: '#ffffff',
alignSelf: 'stretch'
},
containerText: {
flex: 1,
flexDirection: 'column',
justifyContent: 'center',
backgroundColor: '#ffffff',
alignSelf: 'stretch',
padding: 20
},
icon: {
alignSelf: 'center',
width: 152,
height: 165
},
title: {
fontSize: 16,
alignSelf: 'center'
}
});
var route = {
key: 'HelloDeveloper',
title: 'Welcome!',
component: HelloDeveloper
};
},10115,[14305,14320,14323,14371,14377,14386,10297,10033,10230,10118]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
module.exports = _$$_REQUIRE(_dependencyMap[0]).registerAsset({
"__packager_asset": true,
"httpServerLocation": "/assets/projects/com.cleargrass.snow.mi/Resources",
"width": 293,
"height": 328,
"scales": [1],
"hash": "72185002c5a95b281ae7ce7ba73c8550",
"name": "hello_raise",
"type": "jpg"
});
},10118,[10420]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var start = Date.now();
_$$_REQUIRE(_dependencyMap[0]);
_$$_REQUIRE(_dependencyMap[1]);
_$$_REQUIRE(_dependencyMap[2]);
_$$_REQUIRE(_dependencyMap[3]);
_$$_REQUIRE(_dependencyMap[4]);
_$$_REQUIRE(_dependencyMap[5]);
_$$_REQUIRE(_dependencyMap[6]);
_$$_REQUIRE(_dependencyMap[7]);
_$$_REQUIRE(_dependencyMap[8]);
_$$_REQUIRE(_dependencyMap[9]);
_$$_REQUIRE(_dependencyMap[10]);
var GlobalPerformanceLogger = _$$_REQUIRE(_dependencyMap[11]);
GlobalPerformanceLogger.markPoint('initializeCore_start', GlobalPerformanceLogger.currentTimestamp() - (Date.now() - start));
GlobalPerformanceLogger.markPoint('initializeCore_end');
},10120,[14449,14452,14455,14470,14479,14485,14500,14524,14533,14536,14560,14548]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
module.exports = _$$_REQUIRE(_dependencyMap[0]).registerAsset({
"__packager_asset": true,
"httpServerLocation": "/assets/projects/com.cleargrass.snow.mi/Resources",
"width": 96,
"height": 96,
"scales": [1],
"hash": "f2ac5cd584ed7dbd986de3df9acfd50b",
"name": "irv2_more_close_normal",
"type": "png"
});
},10121,[10420]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
module.exports = _$$_REQUIRE(_dependencyMap[0]).registerAsset({
"__packager_asset": true,
"httpServerLocation": "/assets/projects/com.cleargrass.snow.mi/Resources",
"width": 96,
"height": 96,
"scales": [1],
"hash": "ce96cf12cf499330f5a16beaa6c12253",
"name": "irv2_more_close_pressed",
"type": "png"
});
},10124,[10420]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
var _interopRequireDefault = _$$_REQUIRE(_dependencyMap[0]);
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = undefined;
var _classCallCheck2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[1]));
var _createClass2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[2]));
var _possibleConstructorReturn2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[3]));
var _getPrototypeOf2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[4]));
var _inherits2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[5]));
var _react = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[6]));
var _reactNative = _$$_REQUIRE(_dependencyMap[7]);
var _ScrollPageBase2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[8]));
var _MHLocalizableString = _$$_REQUIRE(_dependencyMap[9]);
var _DataStandard = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[10]));
var DataTypeState = function (_ScrollPageBase) {
(0, _inherits2.default)(DataTypeState, _ScrollPageBase);
function DataTypeState(props) {
var _this;
(0, _classCallCheck2.default)(this, DataTypeState);
_this = (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(DataTypeState).call(this, props));
var dataType = _this.getPassedParam('dataType');
var value = _this.getPassedParam('displayedValue');
var _DataStandard$titleAn = _DataStandard.default.titleAndUnitByType(dataType),
title = _DataStandard$titleAn.title,
unit = _DataStandard$titleAn.unit;
var color = _DataStandard.default.indicatorColorByValue(dataType, value);
var _DataStandard$gradesA = _DataStandard.default.gradesAndDegrees(dataType),
grades = _DataStandard$gradesA.grades,
titles = _DataStandard$gradesA.titles,
colors = _DataStandard$gradesA.colors;
var _Dimensions$get = _reactNative.Dimensions.get('window'),
width = _Dimensions$get.width;
var signalWdith = width / grades.length;
_this.state = {
dataType: dataType,
value: _DataStandard.default.displayedValue(dataType, value),
title: title,
unit: unit,
color: color,
grades: grades,
titles: titles,
colors: colors,
signalWdith: signalWdith
};
return _this;
}
(0, _createClass2.default)(DataTypeState, [{
key: "renderContent",
value: function renderContent() {
var _this$state = this.state,
dataType = _this$state.dataType,
value = _this$state.value,
title = _this$state.title,
unit = _this$state.unit,
color = _this$state.color,
grades = _this$state.grades,
titles = _this$state.titles,
colors = _this$state.colors,
signalWdith = _this$state.signalWdith;
return _react.default.createElement(_reactNative.View, null, _react.default.createElement(_reactNative.View, {
style: styles.valueRow
}, _react.default.createElement(_reactNative.Text, {
style: [styles.valueText, {
color: color
}]
}, value), _react.default.createElement(_reactNative.Text, {
style: styles.unitText
}, unit)), _react.default.createElement(_reactNative.View, {
style: styles.gradesView
}, titles.map(function (degree, idx) {
return _react.default.createElement(_reactNative.View, {
style: [styles.gradeView, {
backgroundColor: colors[idx],
marginLeft: 1
}],
key: idx
}, _react.default.createElement(_reactNative.Text, {
style: styles.gradeText
}, degree));
})), _react.default.createElement(_reactNative.View, {
style: {
flexDirection: 'row',
marginHorizontal: signalWdith / 2
}
}, grades.map(function (num, idx) {
return idx == grades.length - 1 ? null : _react.default.createElement(_reactNative.View, {
style: styles.gradeView,
key: idx
}, _react.default.createElement(_reactNative.Text, {
style: styles.num
}, num));
})), _react.default.createElement(_reactNative.Text, {
numberOfLines: 0,
style: styles.stateText
}, _MHLocalizableString.DataTypeStateString[dataType + '_state']));
}
}, {
key: "pageTitle",
value: function pageTitle() {
var dataType = this.getPassedParam('dataType');
var _DataStandard$titleAn2 = _DataStandard.default.titleAndUnitByType(dataType),
title = _DataStandard$titleAn2.title,
unit = _DataStandard$titleAn2.unit;
return title;
}
}, {
key: "pageTheme",
value: function pageTheme() {
return 'black';
}
}]);
return DataTypeState;
}(_ScrollPageBase2.default);
exports.default = DataTypeState;
var styles = _reactNative.StyleSheet.create({
valueRow: {
alignItems: 'center',
justifyContent: 'center'
},
valueText: {
fontSize: 30
},
unitText: {
fontSize: 13,
color: '#FFFFFF80',
marginTop: 5
},
gradesView: {
height: 40,
flexDirection: 'row',
marginTop: 20
},
gradeView: {
flex: 1,
alignItems: 'center',
justifyContent: 'center',
height: 40
},
num: {
fontSize: 13,
color: '#FFF'
},
gradeText: {
color: '#FFF',
fontSize: 11,
justifyContent: 'center',
textAlign: 'center'
},
stateText: {
marginHorizontal: 10,
marginTop: 20,
color: '#FFFFFF80',
fontSize: 14,
lineHeight: 24,
marginBottom: 40
}
});
},10127,[14305,14320,14323,14371,14377,14386,10297,10033,10130,10013,10064]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
var _interopRequireWildcard = _$$_REQUIRE(_dependencyMap[0]);
var _interopRequireDefault = _$$_REQUIRE(_dependencyMap[1]);
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = undefined;
var _classCallCheck2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[2]));
var _createClass2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[3]));
var _possibleConstructorReturn2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[4]));
var _getPrototypeOf3 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[5]));
var _inherits2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[6]));
var _react = _interopRequireWildcard(_$$_REQUIRE(_dependencyMap[7]));
var _reactNative = _$$_REQUIRE(_dependencyMap[8]);
var _NavbarEmptyView = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[9]));
var _TopLeftTitleView = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[10]));
var ScrollPageBase = function (_PureComponent) {
(0, _inherits2.default)(ScrollPageBase, _PureComponent);
function ScrollPageBase() {
var _getPrototypeOf2;
var _this;
(0, _classCallCheck2.default)(this, ScrollPageBase);
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
_this = (0, _possibleConstructorReturn2.default)(this, (_getPrototypeOf2 = (0, _getPrototypeOf3.default)(ScrollPageBase)).call.apply(_getPrototypeOf2, [this].concat(args)));
_this.scrollTitltThreshold = 43;
_this.lastSyncOffsetY = 0;
return _this;
}
(0, _createClass2.default)(ScrollPageBase, [{
key: "render",
value: function render() {
var appTheme = {
backgroundColor: '#222222',
navBarStyle: 'black',
titleColor: 'white',
statusBarStyle: 'dark-content'
};
var statusBarStyle = appTheme.statusBarStyle,
titleColor = appTheme.titleColor,
backgroundColor = appTheme.backgroundColor;
return _react.default.createElement(_reactNative.View, {
style: styles.container
}, this.renderStatusBar(appTheme), this.renderTopAbsoluteViews && this.renderTopAbsoluteViews(), _react.default.createElement(_reactNative.ScrollView, {
showsVerticalScrollIndicator: false,
contentContainerStyle: {
flexGrow: 1
},
style: [styles.container, {
backgroundColor: backgroundColor
}, this.getScrollViewStyle && this.getScrollViewStyle()],
bounces: this.bouncesAllowed(),
scrollEventThrottle: 100,
onScroll: function onScroll(event) {}
}, this.renderContent(appTheme)), this.renderAbsoluteViews());
}
}, {
key: "bouncesAllowed",
value: function bouncesAllowed() {
return true;
}
}, {
key: "updateOffsetY",
value: function updateOffsetY(yOffset) {
if (yOffset > this.scrollTitltThreshold) {
if (this.lastSyncOffsetY > this.scrollTitltThreshold) {
return;
}
this.lastSyncOffsetY = yOffset;
this.props.navigation.setParams({
title: this.pageTitle(),
showBarColor: true
});
return;
}
if (yOffset > 20) {
if (this.lastSyncOffsetY > 20 && this.lastSyncOffsetY < this.scrollTitltThreshold) {
return;
}
this.lastSyncOffsetY = yOffset;
this.props.navigation.setParams({
title: '',
showBarColor: true
});
return;
}
if (this.lastSyncOffsetY <= 15) {
return;
}
this.lastSyncOffsetY = yOffset;
this.props.navigation.setParams({
title: '',
showBarColor: false
});
}
}, {
key: "pageTitle",
value: function pageTitle() {
return 'NO TITLE';
}
}, {
key: "renderHeader",
value: function renderHeader(_ref) {
var titleColor = _ref.titleColor;
return _react.default.createElement(_reactNative.View, null, _react.default.createElement(_NavbarEmptyView.default, null), _react.default.createElement(_TopLeftTitleView.default, {
text: this.pageTitle(),
color: titleColor,
fontSize: this.titleFontSize
}));
}
}, {
key: "renderContent",
value: function renderContent(appTheme) {
return null;
}
}, {
key: "pageTheme",
value: function pageTheme() {
return 'default';
}
}, {
key: "renderStatusBar",
value: function renderStatusBar(_ref2) {
var statusBarStyle = _ref2.statusBarStyle,
titleColor = _ref2.titleColor,
backgroundColor = _ref2.backgroundColor;
return _react.default.createElement(_reactNative.StatusBar, {
barStyle: statusBarStyle
});
}
}, {
key: "componentDidMount",
value: function componentDidMount() {
var _this2 = this;
this.props.navigation.setParams({
title: this.pageTitle(),
showBarColor: true
});
_reactNative.InteractionManager.runAfterInteractions(function () {
_this2.pageMounted();
});
}
}, {
key: "pageMounted",
value: function pageMounted() {}
}, {
key: "renderAbsoluteViews",
value: function renderAbsoluteViews() {
return null;
}
}, {
key: "getPassedParam",
value: function getPassedParam(key) {
return this.props.navigation.getParam(key);
}
}]);
return ScrollPageBase;
}(_react.PureComponent);
exports.default = ScrollPageBase;
var styles = _reactNative.StyleSheet.create({
container: {
flex: 1
}
});
},10130,[14308,14305,14320,14323,14371,14377,14386,10297,10033,10133,10136]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
var _interopRequireWildcard = _$$_REQUIRE(_dependencyMap[0]);
var _interopRequireDefault = _$$_REQUIRE(_dependencyMap[1]);
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = undefined;
var _classCallCheck2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[2]));
var _createClass2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[3]));
var _possibleConstructorReturn2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[4]));
var _getPrototypeOf2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[5]));
var _inherits2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[6]));
var _react = _interopRequireWildcard(_$$_REQUIRE(_dependencyMap[7]));
var _reactNative = _$$_REQUIRE(_dependencyMap[8]);
function topNavPadding() {
var _Dimensions$get = _reactNative.Dimensions.get('window'),
width = _Dimensions$get.width,
height = _Dimensions$get.height;
var isLandscape = width > height;
if (_reactNative.Platform.OS === 'android') {
return 56;
}
if (_reactNative.Platform.isPad) {
return 64;
}
if (isLandscape) {
return 32;
}
return isAndroid() ? 30 : 44 + topStatusBarPadding();
}
function topStatusBarPadding() {
return isPhoneX() ? 44 : isAndroid() ? 0 : 20;
}
function isAndroid() {
return _reactNative.Platform.OS === 'android';
}
function isPhoneX() {
var nWD = _reactNative.Dimensions.get('window');
var height = nWD.height > nWD.width ? nWD.height : nWD.width;
return _reactNative.Platform.OS === 'ios' && !_reactNative.Platform.isPad && (height === 812 || height === 896);
}
var NavbarEmptyView = function (_Component) {
(0, _inherits2.default)(NavbarEmptyView, _Component);
function NavbarEmptyView() {
(0, _classCallCheck2.default)(this, NavbarEmptyView);
return (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(NavbarEmptyView).apply(this, arguments));
}
(0, _createClass2.default)(NavbarEmptyView, [{
key: "render",
value: function render() {
return _react.default.createElement(_reactNative.View, {
style: {
height: topNavPadding()
}
});
}
}]);
return NavbarEmptyView;
}(_react.Component);
exports.default = NavbarEmptyView;
},10133,[14308,14305,14320,14323,14371,14377,14386,10297,10033]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
var _interopRequireWildcard = _$$_REQUIRE(_dependencyMap[0]);
var _interopRequireDefault = _$$_REQUIRE(_dependencyMap[1]);
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = undefined;
var _classCallCheck2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[2]));
var _createClass2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[3]));
var _possibleConstructorReturn2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[4]));
var _getPrototypeOf2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[5]));
var _inherits2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[6]));
var _react = _interopRequireWildcard(_$$_REQUIRE(_dependencyMap[7]));
var _reactNative = _$$_REQUIRE(_dependencyMap[8]);
var TopLeftTitleView = function (_Component) {
(0, _inherits2.default)(TopLeftTitleView, _Component);
function TopLeftTitleView() {
(0, _classCallCheck2.default)(this, TopLeftTitleView);
return (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(TopLeftTitleView).apply(this, arguments));
}
(0, _createClass2.default)(TopLeftTitleView, [{
key: "render",
value: function render() {
return _react.default.createElement(_reactNative.View, {
style: styles.container
}, _react.default.createElement(_reactNative.Text, {
style: [styles.title, {
color: this.props.color || '#424242',
fontSize: this.props.fontSize || 34
}]
}, this.props.text));
}
}]);
return TopLeftTitleView;
}(_react.Component);
exports.default = TopLeftTitleView;
var styles = _reactNative.StyleSheet.create({
title: {},
container: {
paddingLeft: 15,
paddingVertical: 8
}
});
},10136,[14308,14305,14320,14323,14371,14377,14386,10297,10033]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
var _interopRequireDefault = _$$_REQUIRE(_dependencyMap[0]);
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = undefined;
var _classCallCheck2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[1]));
var _createClass2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[2]));
var _possibleConstructorReturn2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[3]));
var _getPrototypeOf2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[4]));
var _inherits2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[5]));
var _react = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[6]));
var _reactNative = _$$_REQUIRE(_dependencyMap[7]);
var _ScrollPageBase2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[8]));
var _MHLocalizableString = _$$_REQUIRE(_dependencyMap[9]);
var _PlusKV = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[10]));
var _DataStandard = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[11]));
var _THStateChart = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[12]));
var THStatePage = function (_ScrollPageBase) {
(0, _inherits2.default)(THStatePage, _ScrollPageBase);
function THStatePage() {
(0, _classCallCheck2.default)(this, THStatePage);
return (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(THStatePage).apply(this, arguments));
}
(0, _createClass2.default)(THStatePage, [{
key: "renderContent",
value: function renderContent() {
var temperatureUnit = _PlusKV.default.getPrefTemperatureUnit();
var datas = this.getPassedParam('weather');
var temperature, humidity;
datas.length > 0 && datas.forEach(function (item) {
if (item.name === 'temperature') {
temperature = item.value;
} else if (item.name == 'humidity') {
humidity = item.value;
}
});
var currentValue = _MHLocalizableString.DataTypeStateString['temp_hum_value'].replace('tt', _DataStandard.default.temperatureValue(temperature) + temperatureUnit).replace('hh', humidity + '%');
var _Dimensions$get = _reactNative.Dimensions.get('window'),
width = _Dimensions$get.width;
return _react.default.createElement(_reactNative.View, null, _react.default.createElement(_reactNative.View, {
style: styles.comfortZone
}, _react.default.createElement(_reactNative.Image, {
style: {
height: 11,
width: 17
},
source: _$$_REQUIRE(_dependencyMap[13])
}), _react.default.createElement(_reactNative.Text, {
style: styles.comfortTitle
}, _MHLocalizableString.DataTypeStateString['temp_hum_site'])), _react.default.createElement(_reactNative.View, {
style: styles.comfortZone
}, _react.default.createElement(_reactNative.View, {
style: styles.dotContainer
}, _react.default.createElement(_reactNative.View, {
style: styles.currentDotOuter
}, _react.default.createElement(_reactNative.View, {
style: styles.currentDotInner
}))), _react.default.createElement(_reactNative.Text, {
style: styles.comfortTitle
}, currentValue)), _react.default.createElement(_THStateChart.default, {
current: {
temperature: temperature,
humidity: humidity
},
style: {
width: width - 30,
height: 240,
marginHorizontal: 15,
marginVertical: 20
}
}), _react.default.createElement(_reactNative.Text, {
numberOfLines: 0,
style: styles.stateText
}, temperatureUnit === '°C' ? _MHLocalizableString.DataTypeStateString['temp_hum_state_c'] : _MHLocalizableString.DataTypeStateString['temp_hum_state_f']));
}
}, {
key: "pageTitle",
value: function pageTitle() {
return _MHLocalizableString.DataTypeStateString['temp_hum_title'];
}
}, {
key: "pageTheme",
value: function pageTheme() {
return 'black';
}
}]);
return THStatePage;
}(_ScrollPageBase2.default);
exports.default = THStatePage;
var styles = _reactNative.StyleSheet.create({
stateText: {
marginHorizontal: 10,
color: '#FFFFFF80',
fontSize: 14,
lineHeight: 24,
marginBottom: 40
},
comfortZone: {
flexDirection: 'row',
marginLeft: 15,
height: 30,
alignItems: 'center'
},
comfortTitle: {
fontSize: 15,
color: '#fefefe',
marginLeft: 10
},
currentDotOuter: {
backgroundColor: '#00e5ff4d',
width: 14,
height: 14,
borderRadius: 7,
alignItems: 'center',
justifyContent: 'center'
},
currentDotInner: {
backgroundColor: '#00e5ff',
width: 10,
height: 10,
borderRadius: 5
},
dotContainer: {
width: 17,
height: 17,
alignItems: 'center',
justifyContent: 'center'
}
});
},10139,[14305,14320,14323,14371,14377,14386,10297,10033,10130,10013,10067,10064,10142,10154]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
var _interopRequireWildcard = _$$_REQUIRE(_dependencyMap[0]);
var _interopRequireDefault = _$$_REQUIRE(_dependencyMap[1]);
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = undefined;
var _classCallCheck2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[2]));
var _createClass2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[3]));
var _possibleConstructorReturn2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[4]));
var _getPrototypeOf2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[5]));
var _inherits2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[6]));
var _react = _interopRequireWildcard(_$$_REQUIRE(_dependencyMap[7]));
var _reactNative = _$$_REQUIRE(_dependencyMap[8]);
var _reactNativeDash = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[9]));
var _DataStandard = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[10]));
var _PlusKV = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[11]));
var Surface = _reactNative.ART.Surface,
Shape = _reactNative.ART.Shape,
Path = _reactNative.ART.Path;
var yLabelWidth = 20;
var xLabelHeight = 20;
var THStateChart = function (_PureComponent) {
(0, _inherits2.default)(THStateChart, _PureComponent);
function THStateChart() {
(0, _classCallCheck2.default)(this, THStateChart);
return (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(THStateChart).apply(this, arguments));
}
(0, _createClass2.default)(THStateChart, [{
key: "render",
value: function render() {
var _this$props = this.props,
style = _this$props.style,
current = _this$props.current;
var width = style.width,
height = style.height;
var yAxis = [15, 50, 70, 80];
var xAxis = [25, 75];
var chartHeight = height - 40;
var chartWidth = width - yLabelWidth;
var lastCursor = 0;
var points = [{
x: 25,
y: 15
}, {
x: 25,
y: 70
}, {
x: 75,
y: 80
}, {
x: 75,
y: 40
}, {
x: 58,
y: 39
}];
var htu = _DataStandard.default.titleAndUnitByType('humidity');
var ttu = _DataStandard.default.titleAndUnitByType('temperature');
var temperatureUnit = _PlusKV.default.getPrefTemperatureUnit();
var temperature = current.temperature,
humidity = current.humidity;
var tDiff = temperature - 20;
var currentX, currentY;
if (temperature < 0) {
currentX = 0;
} else if (temperature >= 0 && temperature < 20) {
currentX = temperature / 20 * 0.25 * chartWidth;
} else if (temperature >= 20 && temperature <= 26.5) {
currentX = (temperature - 20) / 6.5 * 0.5 * chartWidth + 0.25 * chartWidth;
} else if (temperature > 26.5 && temperature < 30) {
currentX = (temperature - 26.5) / 3.5 * 0.25 * chartWidth + 0.75 * chartWidth;
} else {
currentX = chartWidth;
}
var dotSize = 14;
if (currentX > chartWidth) {
currentX = chartWidth - dotSize;
} else if (currentX < 0) {
currentX = dotSize;
}
currentY = (100 - humidity) / 100 * chartHeight;
if (currentY > chartHeight) {
currentY = chartHeight - dotSize;
} else if (currentY < 0) {
currentY = dotSize;
}
var p = Path();
var cursor = 0;
while (cursor < points.length) {
var pt = points[cursor];
var x = pt.x * chartWidth / 100;
var y = pt.y * chartHeight / 100;
if (cursor === 0) {
p.moveTo(x, y);
} else {
p.lineTo(x, y);
}
cursor += 1;
}
p.close();
var yLabels = [{
y: 15,
title: '85'
}, {
y: 50,
title: '50'
}, {
y: 70,
title: '30'
}, {
y: 80,
title: '20'
}];
var xLabels = [{
x: 25,
title: '' + _DataStandard.default.temperatureValue(20)
}, {
x: 75,
title: '' + _DataStandard.default.temperatureValue(26.5)
}];
return _react.default.createElement(_reactNative.View, {
style: style
}, _react.default.createElement(_reactNative.View, {
style: [styles.chartBg, {
height: chartHeight
}]
}, yAxis.map(function (y, idx) {
var d = lastCursor;
lastCursor = y;
return _react.default.createElement(_reactNativeDash.default, {
dashThickness: _reactNative.StyleSheet.hairlineWidth,
dashColor: '#FFFFFF33',
key: idx,
style: [styles.yAxis, {
marginTop: (y - d) * chartHeight / 100
}]
});
}), xAxis.map(function (x, idx) {
return _react.default.createElement(_reactNativeDash.default, {
dashThickness: _reactNative.StyleSheet.hairlineWidth,
dashColor: '#FFFFFF33',
key: idx,
style: [styles.xAxisLine, {
left: x * chartWidth / 100
}]
});
})), _react.default.createElement(_reactNative.View, {
style: styles.chartTopLeftTitle
}, _react.default.createElement(_reactNative.Text, {
style: styles.labelText
}, htu.title + htu.unit)), _react.default.createElement(_reactNative.View, {
style: styles.chartContainer
}, _react.default.createElement(_reactNative.View, {
style: styles.yLabels
}, yLabels.map(function (_ref, idx) {
var title = _ref.title,
y = _ref.y;
return _react.default.createElement(_reactNative.View, {
key: idx,
style: [styles.yLabelContainer, {
top: y * chartHeight / 100 - 10
}]
}, _react.default.createElement(_reactNative.Text, {
style: styles.labelText
}, title));
})), _react.default.createElement(Surface, {
width: chartWidth,
height: chartHeight
}, _react.default.createElement(Shape, {
d: p,
fill: '#00e5ff4d',
stroke: '#00e5ff',
strokeWidth: 1
})), _react.default.createElement(_reactNative.View, {
style: [styles.currentDotOuter, {
left: currentX - 7 + yLabelWidth,
top: currentY - 7
}]
}, _react.default.createElement(_reactNative.View, {
style: styles.currentDotInner
}))), _react.default.createElement(_reactNative.View, {
style: styles.xLabels
}, xLabels.map(function (_ref2, idx) {
var title = _ref2.title,
x = _ref2.x;
return _react.default.createElement(_reactNative.View, {
key: idx,
style: [styles.xLabelContainer, {
left: x * chartWidth / 100 - 20 + yLabelWidth
}]
}, _react.default.createElement(_reactNative.Text, {
style: styles.labelText
}, title));
}), _react.default.createElement(_reactNative.View, {
style: styles.chartBottomLeftTitle
}, _react.default.createElement(_reactNative.Text, {
style: styles.labelText
}, ttu.title + ' ' + temperatureUnit))));
}
}]);
return THStateChart;
}(_react.PureComponent);
exports.default = THStateChart;
var styles = _reactNative.StyleSheet.create({
chart: {},
barsContainer: {
flexDirection: 'row'
},
barContainer: {
alignItems: 'center'
},
barItem: {
alignItems: 'center',
justifyContent: 'flex-end'
},
bar: {},
barActive: {
borderColor: 'white',
borderWidth: 1
},
xLabel: {
color: '#FFFFFF80',
fontSize: 13
},
xAxis: {
flexDirection: 'row',
alignItems: 'center'
},
labelTextContainer: {
justifyContent: 'center',
alignItems: 'center'
},
chartBg: {
position: 'absolute',
borderColor: '#FFFFFF33',
borderWidth: _reactNative.StyleSheet.hairlineWidth,
left: yLabelWidth,
top: xLabelHeight,
right: 0
},
yAxis: {
marginHorizontal: 2
},
xAxisLine: {
position: 'absolute',
top: 2,
bottom: 2,
width: 2,
flexDirection: 'column'
},
chartTopLeftTitle: {
height: xLabelHeight,
justifyContent: 'center'
},
chartBottomLeftTitle: {
position: 'absolute',
height: xLabelHeight,
top: 0,
bottom: 0,
right: 0,
width: 150,
justifyContent: 'center',
alignItems: 'flex-end'
},
chartContainer: {
flexDirection: 'row'
},
yLabels: {
width: yLabelWidth,
height: '100%'
},
xLabels: {
height: 20,
width: '100%'
},
yLabelContainer: {
position: 'absolute',
height: xLabelHeight,
justifyContent: 'center',
width: yLabelWidth,
left: 0
},
xLabelContainer: {
position: 'absolute',
height: xLabelHeight,
justifyContent: 'center',
alignItems: 'center',
width: 40,
top: 0
},
labelText: {
color: '#FFFFFF80',
fontSize: 13
},
currentDotOuter: {
backgroundColor: '#00e5ff4d',
position: 'absolute',
width: 14,
height: 14,
borderRadius: 7,
alignItems: 'center',
justifyContent: 'center'
},
currentDotInner: {
backgroundColor: '#00e5ff',
width: 10,
height: 10,
borderRadius: 5
}
});
},10142,[14308,14305,14320,14323,14371,14377,14386,10297,10033,10145,10064,10067]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _react = _$$_REQUIRE(_dependencyMap[0]);
var _react2 = _interopRequireDefault(_react);
var _propTypes = _$$_REQUIRE(_dependencyMap[1]);
var _propTypes2 = _interopRequireDefault(_propTypes);
var _reactNative = _$$_REQUIRE(_dependencyMap[2]);
var _reactNativeMeasureme = _$$_REQUIRE(_dependencyMap[3]);
var _reactNativeMeasureme2 = _interopRequireDefault(_reactNativeMeasureme);
var _util = _$$_REQUIRE(_dependencyMap[4]);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
var Dash = function Dash(props) {
var isRow = (0, _util.isStyleRow)(props.style);
var length = isRow ? props.width : props.height;
var n = Math.ceil(length / (props.dashGap + props.dashLength));
var calculatedDashStyles = (0, _util.getDashStyle)(props);
var dash = [];
for (var i = 0; i < n; i++) {
dash.push(_react2.default.createElement(_reactNative.View, {
key: i,
style: [calculatedDashStyles, props.dashStyle]
}));
}
return _react2.default.createElement(_reactNative.View, {
onLayout: props.onLayout,
style: [props.style, isRow ? styles.row : styles.column]
}, dash);
};
var styles = _reactNative.StyleSheet.create({
row: {
flexDirection: 'row'
},
column: {
flexDirection: 'column'
}
});
Dash.propTypes = {
style: _reactNative.ViewPropTypes.style,
dashGap: _propTypes2.default.number.isRequired,
dashLength: _propTypes2.default.number.isRequired,
dashThickness: _propTypes2.default.number.isRequired,
dashColor: _propTypes2.default.string,
dashStyle: _reactNative.ViewPropTypes.style
};
Dash.defaultProps = {
dashGap: 2,
dashLength: 4,
dashThickness: 2,
dashColor: 'black'
};
exports.default = (0, _reactNativeMeasureme2.default)(Dash);
},10145,[10297,10318,10033,10148,10151]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends = Object.assign || function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
}
return target;
};
var _createClass = function () {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || false;
descriptor.configurable = true;
if ("value" in descriptor) descriptor.writable = true;
Object.defineProperty(target, descriptor.key, descriptor);
}
}
return function (Constructor, protoProps, staticProps) {
if (protoProps) defineProperties(Constructor.prototype, protoProps);
if (staticProps) defineProperties(Constructor, staticProps);
return Constructor;
};
}();
var _react = _$$_REQUIRE(_dependencyMap[0]);
var _react2 = _interopRequireDefault(_react);
var _reactNative = _$$_REQUIRE(_dependencyMap[1]);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
}
function _possibleConstructorReturn(self, call) {
if (!self) {
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
}
return call && (typeof call === "object" || typeof call === "function") ? call : self;
}
function _inherits(subClass, superClass) {
if (typeof superClass !== "function" && superClass !== null) {
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
}
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: false,
writable: true,
configurable: true
}
});
if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
}
exports.default = function (ComposedComponent) {
return function (_Component) {
_inherits(_class, _Component);
function _class(props) {
_classCallCheck(this, _class);
var _this = _possibleConstructorReturn(this, (_class.__proto__ || Object.getPrototypeOf(_class)).call(this, props));
_this.state = {};
_this.measure = function (_ref) {
var _ref$nativeEvent = _ref.nativeEvent;
_ref$nativeEvent = _ref$nativeEvent === undefined ? {} : _ref$nativeEvent;
var _ref$nativeEvent$layo = _ref$nativeEvent.layout;
_ref$nativeEvent$layo = _ref$nativeEvent$layo === undefined ? {} : _ref$nativeEvent$layo;
var _ref$nativeEvent$layo2 = _ref$nativeEvent$layo.width,
width = _ref$nativeEvent$layo2 === undefined ? 0 : _ref$nativeEvent$layo2,
_ref$nativeEvent$layo3 = _ref$nativeEvent$layo.height,
height = _ref$nativeEvent$layo3 === undefined ? 0 : _ref$nativeEvent$layo3;
return _this.setState({
width: width,
height: height,
initialRender: true
});
};
return _this;
}
_createClass(_class, [{
key: 'render',
value: function render() {
return this.state.initialRender ? _react2.default.createElement(ComposedComponent, _extends({}, this.props, this.state, {
onLayout: this.measure
})) : _react2.default.createElement(_reactNative.View, {
style: this.props.style,
onLayout: this.measure
});
}
}]);
return _class;
}(_react.Component);
};
},10148,[10297,10033]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
var _interopRequireDefault = _$$_REQUIRE(_dependencyMap[0]);
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getDashStyle = exports.isStyleRow = undefined;
var _defineProperty2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[1]));
var _objectSpread3 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[2]));
var _reactNative = _$$_REQUIRE(_dependencyMap[3]);
var isStyleRow = function isStyleRow(style) {
var flatStyle = _reactNative.StyleSheet.flatten(style || {});
return flatStyle.flexDirection !== 'column';
};
exports.isStyleRow = isStyleRow;
var getDashStyleId = function getDashStyleId(_ref, isRow) {
var dashGap = _ref.dashGap,
dashLength = _ref.dashLength,
dashThickness = _ref.dashThickness,
dashColor = _ref.dashColor;
return dashGap + "-" + dashLength + "-" + dashThickness + "-" + dashColor + "-" + (isRow ? 'row' : 'column');
};
var createDashStyleSheet = function createDashStyleSheet(_ref2, isRow) {
var dashGap = _ref2.dashGap,
dashLength = _ref2.dashLength,
dashThickness = _ref2.dashThickness,
dashColor = _ref2.dashColor;
var idStyle = _reactNative.StyleSheet.create({
style: {
width: isRow ? dashLength : dashThickness,
height: isRow ? dashThickness : dashLength,
marginRight: isRow ? dashGap : 0,
marginBottom: isRow ? 0 : dashGap,
backgroundColor: dashColor
}
});
return idStyle.style;
};
var stylesStore = {};
var getDashStyle = function getDashStyle(props) {
var isRow = isStyleRow(props.style);
var id = getDashStyleId(props, isRow);
if (!stylesStore[id]) {
stylesStore = (0, _objectSpread3.default)({}, stylesStore, (0, _defineProperty2.default)({}, id, createDashStyleSheet(props, isRow)));
}
return stylesStore[id];
};
exports.getDashStyle = getDashStyle;
},10151,[14305,14317,14314,10033]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
module.exports = _$$_REQUIRE(_dependencyMap[0]).registerAsset({
"__packager_asset": true,
"httpServerLocation": "/assets/projects/com.cleargrass.snow.mi/Resources",
"width": 50,
"height": 33,
"scales": [1],
"hash": "f0a1ea14212c474e82fd591589670828",
"name": "comfortArea",
"type": "png"
});
},10154,[10420]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
var _interopRequireDefault = _$$_REQUIRE(_dependencyMap[0]);
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = undefined;
var _classCallCheck2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[1]));
var _createClass2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[2]));
var _possibleConstructorReturn2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[3]));
var _getPrototypeOf2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[4]));
var _inherits2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[5]));
var _react = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[6]));
var _reactNative = _$$_REQUIRE(_dependencyMap[7]);
var _ui = _$$_REQUIRE(_dependencyMap[8]);
var _miot = _$$_REQUIRE(_dependencyMap[9]);
var _MHLocalizableString = _$$_REQUIRE(_dependencyMap[10]);
var MAX_VALUE = 99998;
var MIN_VALUE = -9999;
var _Dimensions$get = _reactNative.Dimensions.get('window'),
width = _Dimensions$get.width,
height = _Dimensions$get.height;
var SceneMain = function (_React$Component) {
(0, _inherits2.default)(SceneMain, _React$Component);
function SceneMain(props) {
var _this;
(0, _classCallCheck2.default)(this, SceneMain);
_this = (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(SceneMain).call(this, props));
_this.state = {
title: _miot.Package.extraEntry.info.payload.name,
type: _miot.Package.extraEntry.info.payload.key ? _miot.Package.extraEntry.info.payload.key.split('.')[4] : _miot.Package.extraEntry.info.payload.command.split('.')[4],
isHighOrLow: _miot.Package.extraEntry.info.payload.id % 2 != 0 ? 'low' : 'high',
pikerVisible: true,
tvoc_unit: 'mg/m³',
temperature_unit: 'c',
max: 10,
min: 0.1,
fixedNum: 1,
interval: 0.1,
defaultValue: 1.0,
defaultValueObj: {
tvoc: {
'mg/m³': {
high: 1.0,
low: 0.3
},
'ppm': {
high: 0.22,
low: 0.06
},
'ppb': {
high: 220,
low: 60
}
},
temperature: {
'°F': {
high: 79,
low: 73
},
'°C': {
high: 26,
low: 23
}
}
}
};
return _this;
}
(0, _createClass2.default)(SceneMain, [{
key: "componentWillMount",
value: function componentWillMount() {
var _this2 = this;
var that = this;
var unit = that.state.type == 'tvoc' ? 'mg/m³' : '°C';
that.setState({
unit: unit
});
this.handleRangeValue();
_miot.Device.getDeviceWifi().callMethodFromCloud('get_air_data', ['temperature_unit', 'tvoc_unit']).then(function (json) {
if (json.code == 0) {
that.setState({
tvoc_unit: json.result.tvoc_unit,
temperature_unit: json.result.temperature_unit
}, function () {
return _this2.handleRangeValue();
});
} else {}
}).catch(function (e) {});
that._deviceStatusListener = _miot.DeviceEvent.deviceReceivedMessages.addListener(function (device, map, res) {
if (map) {
if (map.has('prop.tvoc_unit')) {
that.setState({
tvoc_unit: map.get('prop.tvoc_unit')[0]
}, function () {
_this2.handleRangeValue();
});
} else if (map.has('prop.temperature_unit')) {
that.setState({
temperature_unit: map.get('prop.temperature_unit')[0]
}, function () {
_this2.handleRangeValue();
});
}
}
});
_miot.Device.getDeviceWifi().subscribeMessages("prop.temperature_unit", "prop.tvoc_unit").then(function (subcription) {
_this2.msgSubscription = subcription;
}).catch(function () {
return undefined;
});
}
}, {
key: "handleRangeValue",
value: function handleRangeValue() {
var max, min, unit, pickedValue, fixedNum, interval;
if (this.state.type == 'tvoc') {
unit = this.state.tvoc_unit;
if (this.state.tvoc_unit == 'ppm') {
max = 2.20;
min = 0;
interval = 0.02;
fixedNum = 2;
} else if (this.state.tvoc_unit == 'ppb') {
max = 2200;
min = 0;
interval = 20;
fixedNum = 0;
} else {
max = 10;
min = 0.1;
unit = 'mg/m³';
interval = 0.1;
fixedNum = 1;
}
} else if (this.state.type == 'temperature') {
if (this.state.temperature_unit == 'f') {
max = 122;
min = 14;
unit = '°F';
interval = 1;
fixedNum = 0;
} else if (this.state.temperature_unit == 'c') {
max = 50;
min = -10;
unit = '°C';
interval = 1;
fixedNum = 0;
}
}
var defaultValue = unit && this.state.type ? this.state.defaultValueObj[this.state.type][unit][this.state.isHighOrLow] : 1;
this.setState({
defaultValue: defaultValue,
max: max,
min: min,
unit: unit,
interval: interval,
fixedNum: fixedNum
});
}
}, {
key: "onNumberChanged",
value: function onNumberChanged(data) {
this.setState({
pickedValue: data.newValue
});
}
}, {
key: "handlePayloadValue",
value: function handlePayloadValue(data) {
var value = data;
var unit = this.state.unit;
if (unit == '°F') {
value = (value - 32) / 1.8;
} else if (unit == 'mg/m³') {
value = value * 220;
} else if (unit == 'ppm') {
value = value * 1000;
}
return value;
}
}, {
key: "render",
value: function render() {
var _this3 = this;
return _react.default.createElement(_reactNative.View, {
style: styles.container
}, _react.default.createElement(_ui.TitleBarBlack, {
style: styles.titleBar,
onPressLeft: function onPressLeft() {
return _miot.Package.exit();
},
disabled: !this.state.numValid,
title: this.state.title,
rightText: _MHLocalizableString.SceneMainStrings.ok,
rightTextStyle: {
color: "#00bc9c"
},
onPressRight: function onPressRight() {
var value;
var pickedValue = _this3.state.pickedValue ? _this3.state.pickedValue.toFixed(_this3.state.fixedNum) : _this3.state.defaultValue.toFixed(_this3.state.fixedNum);
if (_this3.state.isHighOrLow == 'low') {
value = {
min: Number(MIN_VALUE),
max: Number(_this3.handlePayloadValue(pickedValue))
};
} else {
value = {
min: Number(_this3.handlePayloadValue(pickedValue)),
max: Number(MAX_VALUE)
};
}
var action = _miot.Package.entryInfo;
if (_reactNative.Platform.OS === 'android') {
action.payload.key_name = _MHLocalizableString.MainLocalizableString[_this3.state.type] + "\u6D53\u5EA6" + (_this3.state.isHighOrLow == 'low' ? '低于' : '高于') + pickedValue + _this3.state.unit;
action.payload.name = _MHLocalizableString.MainLocalizableString[_this3.state.type] + "\u6D53\u5EA6" + (_this3.state.isHighOrLow == 'low' ? '低于' : '高于') + pickedValue + _this3.state.unit;
action.payload.value = value;
if (action.payload.androidData) {
action.payload.androidData.key_name = _MHLocalizableString.MainLocalizableString[_this3.state.type] + "\u6D53\u5EA6" + (_this3.state.isHighOrLow == 'low' ? '低于' : '高于') + pickedValue + _this3.state.unit;
action.payload.androidData.name = _MHLocalizableString.MainLocalizableString[_this3.state.type] + "\u6D53\u5EA6" + (_this3.state.isHighOrLow == 'low' ? '低于' : '高于') + pickedValue + _this3.state.unit;
action.payload.androidData.value = value;
}
_miot.Package.exitInfo = action;
_miot.Package.exit(action);
} else {
action.payload.name = _MHLocalizableString.MainLocalizableString[_this3.state.type] + "\u6D53\u5EA6" + (_this3.state.isHighOrLow == 'low' ? '低于' : '高于') + pickedValue + _this3.state.unit;
action.payload.key_name = _MHLocalizableString.MainLocalizableString[_this3.state.type] + "\u6D53\u5EA6" + (_this3.state.isHighOrLow == 'low' ? '低于' : '高于') + pickedValue + _this3.state.unit;
action.payload.value = value;
_miot.Package.exitInfo = action;
}
}
}), _react.default.createElement(_ui.NumberSpinner, {
style: styles.NumberSpinner,
visible: true,
unit: this.state.unit,
maxValue: this.state.max,
minValue: this.state.min,
interval: this.state.interval,
defaultValue: this.state.defaultValue,
valueFormat: "%." + this.state.fixedNum + "f",
onNumberChanged: this.onNumberChanged.bind(this)
}));
}
}, {
key: "componentWillUnmount",
value: function componentWillUnmount() {
this.msgSubscription && this.msgSubscription.remove();
}
}]);
return SceneMain;
}(_react.default.Component);
exports.default = SceneMain;
var styles = _reactNative.StyleSheet.create({
container: {
flexDirection: 'row',
alignItems: 'center',
height: height
},
titleBar: {
position: 'absolute',
top: 0
},
NumberSpinner: {
position: 'absolute',
bottom: 10,
width: width - 40,
marginHorizontal: 20,
height: 200
}
});
},10157,[14305,14320,14323,14371,14377,14386,10297,10033,10230,10074,10013]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
{
module.exports = _$$_REQUIRE(_dependencyMap[0])();
}
},10318,[10321]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var ReactPropTypesSecret = _$$_REQUIRE(_dependencyMap[0]);
function emptyFunction() {}
function emptyFunctionWithReset() {}
emptyFunctionWithReset.resetWarningCache = emptyFunction;
module.exports = function () {
function shim(props, propName, componentName, location, propFullName, secret) {
if (secret === ReactPropTypesSecret) {
return;
}
var err = new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");
err.name = 'Invariant Violation';
throw err;
}
;
shim.isRequired = shim;
function getShim() {
return shim;
}
;
var ReactPropTypes = {
array: shim,
bool: shim,
func: shim,
number: shim,
object: shim,
string: shim,
symbol: shim,
any: shim,
arrayOf: getShim,
element: shim,
elementType: shim,
instanceOf: getShim,
node: shim,
objectOf: getShim,
oneOf: getShim,
oneOfType: getShim,
shape: getShim,
exact: getShim,
checkPropTypes: emptyFunctionWithReset,
resetWarningCache: emptyFunction
};
ReactPropTypes.PropTypes = ReactPropTypes;
return ReactPropTypes;
};
},10321,[10324]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
module.exports = ReactPropTypesSecret;
},10324,[]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
module.exports = _interopRequireDefault;
},14305,[]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
var _typeof = _$$_REQUIRE(_dependencyMap[0]);
function _getRequireWildcardCache() {
if (typeof WeakMap !== "function") return null;
var cache = new WeakMap();
_getRequireWildcardCache = function _getRequireWildcardCache() {
return cache;
};
return cache;
}
function _interopRequireWildcard(obj) {
if (obj && obj.__esModule) {
return obj;
}
if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") {
return {
"default": obj
};
}
var cache = _getRequireWildcardCache();
if (cache && cache.has(obj)) {
return cache.get(obj);
}
var newObj = {};
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
for (var key in obj) {
if (Object.prototype.hasOwnProperty.call(obj, key)) {
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
if (desc && (desc.get || desc.set)) {
Object.defineProperty(newObj, key, desc);
} else {
newObj[key] = obj[key];
}
}
}
newObj["default"] = obj;
if (cache) {
cache.set(obj, newObj);
}
return newObj;
}
module.exports = _interopRequireWildcard;
},14308,[14311]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
function _typeof(obj) {
if (typeof Symbol === "function" && typeof (typeof Symbol === "function" ? Symbol.iterator : "@@iterator") === "symbol") {
module.exports = _typeof = function _typeof(obj) {
return typeof obj;
};
} else {
module.exports = _typeof = function _typeof(obj) {
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== (typeof Symbol === "function" ? Symbol.prototype : "@@prototype") ? "symbol" : typeof obj;
};
}
return _typeof(obj);
}
module.exports = _typeof;
},14311,[]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
var defineProperty = _$$_REQUIRE(_dependencyMap[0]);
function _objectSpread(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i] != null ? arguments[i] : {};
var ownKeys = Object.keys(Object(source));
if (typeof Object.getOwnPropertySymbols === 'function') {
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
}));
}
ownKeys.forEach(function (key) {
defineProperty(target, key, source[key]);
});
}
return target;
}
module.exports = _objectSpread;
},14314,[14317]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
function _defineProperty(obj, key, value) {
if (key in obj) {
Object.defineProperty(obj, key, {
value: value,
enumerable: true,
configurable: true,
writable: true
});
} else {
obj[key] = value;
}
return obj;
}
module.exports = _defineProperty;
},14317,[]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
}
module.exports = _classCallCheck;
},14320,[]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
function _defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || false;
descriptor.configurable = true;
if ("value" in descriptor) descriptor.writable = true;
Object.defineProperty(target, descriptor.key, descriptor);
}
}
function _createClass(Constructor, protoProps, staticProps) {
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
if (staticProps) _defineProperties(Constructor, staticProps);
return Constructor;
}
module.exports = _createClass;
},14323,[]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var invariant = function invariant(condition, format, a, b, c, d, e, f) {
if (!condition) {
var error;
if (format === undefined) {
error = new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");
} else {
var args = [a, b, c, d, e, f];
var argIndex = 0;
error = new Error(format.replace(/%s/g, function () {
return args[argIndex++];
}));
error.name = 'Invariant Violation';
}
error.framesToPop = 1;
throw error;
}
};
module.exports = invariant;
},14326,[]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var warning = _$$_REQUIRE(_dependencyMap[0]);
var warnedKeys = {};
function warnOnce(key, message) {
if (warnedKeys[key]) {
return;
}
warning(false, message);
warnedKeys[key] = true;
}
module.exports = warnOnce;
},14329,[14332]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var emptyFunction = _$$_REQUIRE(_dependencyMap[0]);
var warning = emptyFunction;
module.exports = warning;
},14332,[14335]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
"use strict";
function makeEmptyFunction(arg) {
return function () {
return arg;
};
}
var emptyFunction = function emptyFunction() {};
emptyFunction.thatReturns = makeEmptyFunction;
emptyFunction.thatReturnsFalse = makeEmptyFunction(false);
emptyFunction.thatReturnsTrue = makeEmptyFunction(true);
emptyFunction.thatReturnsNull = makeEmptyFunction(null);
emptyFunction.thatReturnsThis = function () {
return this;
};
emptyFunction.thatReturnsArgument = function (arg) {
return arg;
};
module.exports = emptyFunction;
},14335,[]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var _interopRequireWildcard = _$$_REQUIRE(_dependencyMap[0]);
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = undefined;
var TurboModuleRegistry = _interopRequireWildcard(_$$_REQUIRE(_dependencyMap[1]));
var _default = TurboModuleRegistry.get('AccessibilityInfo');
exports.default = _default;
},14338,[14308,14341]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var _interopRequireDefault = _$$_REQUIRE(_dependencyMap[0]);
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.get = get;
exports.getEnforcing = getEnforcing;
var _invariant = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[1]));
var NativeModules = _$$_REQUIRE(_dependencyMap[2]);
var turboModuleProxy = global.__turboModuleProxy;
function get(name) {
if (!global.RN$Bridgeless) {
var legacyModule = NativeModules[name];
if (legacyModule != null) {
return legacyModule;
}
}
if (turboModuleProxy != null) {
var module = turboModuleProxy(name);
return module;
}
return null;
}
function getEnforcing(name) {
var module = get(name);
(0, _invariant.default)(module != null, "TurboModuleRegistry.getEnforcing(...): '" + name + "' could not be found. " + 'Verify that a module by this name is registered in the native binary.');
return module;
}
},14341,[14305,14326,10042]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
function _extends() {
module.exports = _extends = Object.assign || function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
}
return target;
};
return _extends.apply(this, arguments);
}
module.exports = _extends;
},14344,[]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
var arrayWithHoles = _$$_REQUIRE(_dependencyMap[0]);
var iterableToArrayLimit = _$$_REQUIRE(_dependencyMap[1]);
var nonIterableRest = _$$_REQUIRE(_dependencyMap[2]);
function _slicedToArray(arr, i) {
return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || nonIterableRest();
}
module.exports = _slicedToArray;
},14347,[14350,14353,14356]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
function _arrayWithHoles(arr) {
if (Array.isArray(arr)) return arr;
}
module.exports = _arrayWithHoles;
},14350,[]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
function _iterableToArrayLimit(arr, i) {
if (!((typeof Symbol === "function" ? Symbol.iterator : "@@iterator") in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) {
return;
}
var _arr = [];
var _n = true;
var _d = false;
var _e = undefined;
try {
for (var _i = arr[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"](), _s; !(_n = (_s = _i.next()).done); _n = true) {
_arr.push(_s.value);
if (i && _arr.length === i) break;
}
} catch (err) {
_d = true;
_e = err;
} finally {
try {
if (!_n && _i["return"] != null) _i["return"]();
} finally {
if (_d) throw _e;
}
}
return _arr;
}
module.exports = _iterableToArrayLimit;
},14353,[]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
function _nonIterableRest() {
throw new TypeError("Invalid attempt to destructure non-iterable instance");
}
module.exports = _nonIterableRest;
},14356,[]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
var arrayWithoutHoles = _$$_REQUIRE(_dependencyMap[0]);
var iterableToArray = _$$_REQUIRE(_dependencyMap[1]);
var nonIterableSpread = _$$_REQUIRE(_dependencyMap[2]);
function _toConsumableArray(arr) {
return arrayWithoutHoles(arr) || iterableToArray(arr) || nonIterableSpread();
}
module.exports = _toConsumableArray;
},14359,[14362,14365,14368]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
function _arrayWithoutHoles(arr) {
if (Array.isArray(arr)) {
for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) {
arr2[i] = arr[i];
}
return arr2;
}
}
module.exports = _arrayWithoutHoles;
},14362,[]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
function _iterableToArray(iter) {
if ((typeof Symbol === "function" ? Symbol.iterator : "@@iterator") in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter);
}
module.exports = _iterableToArray;
},14365,[]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
function _nonIterableSpread() {
throw new TypeError("Invalid attempt to spread non-iterable instance");
}
module.exports = _nonIterableSpread;
},14368,[]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
var _typeof = _$$_REQUIRE(_dependencyMap[0]);
var assertThisInitialized = _$$_REQUIRE(_dependencyMap[1]);
function _possibleConstructorReturn(self, call) {
if (call && (_typeof(call) === "object" || typeof call === "function")) {
return call;
}
return assertThisInitialized(self);
}
module.exports = _possibleConstructorReturn;
},14371,[14311,14374]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
function _assertThisInitialized(self) {
if (self === undefined) {
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
}
return self;
}
module.exports = _assertThisInitialized;
},14374,[]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
function _getPrototypeOf(o) {
module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
return o.__proto__ || Object.getPrototypeOf(o);
};
return _getPrototypeOf(o);
}
module.exports = _getPrototypeOf;
},14377,[]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
var superPropBase = _$$_REQUIRE(_dependencyMap[0]);
function _get(target, property, receiver) {
if (typeof Reflect !== "undefined" && Reflect.get) {
module.exports = _get = Reflect.get;
} else {
module.exports = _get = function _get(target, property, receiver) {
var base = superPropBase(target, property);
if (!base) return;
var desc = Object.getOwnPropertyDescriptor(base, property);
if (desc.get) {
return desc.get.call(receiver);
}
return desc.value;
};
}
return _get(target, property, receiver || target);
}
module.exports = _get;
},14380,[14383]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
var getPrototypeOf = _$$_REQUIRE(_dependencyMap[0]);
function _superPropBase(object, property) {
while (!Object.prototype.hasOwnProperty.call(object, property)) {
object = getPrototypeOf(object);
if (object === null) break;
}
return object;
}
module.exports = _superPropBase;
},14383,[14377]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
var setPrototypeOf = _$$_REQUIRE(_dependencyMap[0]);
function _inherits(subClass, superClass) {
if (typeof superClass !== "function" && superClass !== null) {
throw new TypeError("Super expression must either be null or a function");
}
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
writable: true,
configurable: true
}
});
if (superClass) setPrototypeOf(subClass, superClass);
}
module.exports = _inherits;
},14386,[14389]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
function _setPrototypeOf(o, p) {
module.exports = _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
o.__proto__ = p;
return o;
};
return _setPrototypeOf(o, p);
}
module.exports = _setPrototypeOf;
},14389,[]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
module.exports = {
getViewManagerConfig: function getViewManagerConfig(viewManagerName) {
return null;
},
getConstants: function getConstants() {
return {};
},
getConstantsForViewManager: function getConstantsForViewManager(viewManagerName) {},
getDefaultEventTypes: function getDefaultEventTypes() {
return [];
},
playTouchSound: function playTouchSound() {},
lazilyLoadView: function lazilyLoadView(name) {},
createView: function createView(reactTag, viewName, rootTag, props) {},
updateView: function updateView(reactTag, viewName, props) {},
focus: function focus(reactTag) {},
blur: function blur(reactTag) {},
findSubviewIn: function findSubviewIn(reactTag, point, callback) {},
dispatchViewManagerCommand: function dispatchViewManagerCommand(reactTag, commandID, commandArgs) {},
measure: function measure(reactTag, callback) {},
measureInWindow: function measureInWindow(reactTag, callback) {},
viewIsDescendantOf: function viewIsDescendantOf(reactTag, ancestorReactTag, callback) {},
measureLayout: function measureLayout(reactTag, ancestorReactTag, errorCallback, callback) {},
measureLayoutRelativeToParent: function measureLayoutRelativeToParent(reactTag, errorCallback, callback) {},
setJSResponder: function setJSResponder(reactTag, blockNativeResponder) {},
clearJSResponder: function clearJSResponder() {},
configureNextLayoutAnimation: function configureNextLayoutAnimation(config, callback, errorCallback) {},
removeSubviewsFromContainerWithID: function removeSubviewsFromContainerWithID(containerID) {},
replaceExistingNonRootView: function replaceExistingNonRootView(reactTag, newReactTag) {},
setChildren: function setChildren(containerTag, reactTags) {},
manageChildren: function manageChildren(containerTag, moveFromIndices, moveToIndices, addChildReactTags, addAtIndices, removeAtIndices) {},
setLayoutAnimationEnabledExperimental: function setLayoutAnimationEnabledExperimental(enabled) {},
sendAccessibilityEvent: function sendAccessibilityEvent(reactTag, eventType) {},
showPopupMenu: function showPopupMenu(reactTag, items, error, success) {},
dismissPopupMenu: function dismissPopupMenu() {}
};
},14392,[]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var _interopRequireDefault = _$$_REQUIRE(_dependencyMap[0]);
var _objectSpread2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[1]));
var _NativeUIManager = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[2]));
var NativeModules = _$$_REQUIRE(_dependencyMap[3]);
var Platform = _$$_REQUIRE(_dependencyMap[4]);
var UIManagerProperties = _$$_REQUIRE(_dependencyMap[5]);
var defineLazyObjectProperty = _$$_REQUIRE(_dependencyMap[6]);
var viewManagerConfigs = {};
var triedLoadingConfig = new Set();
var NativeUIManagerConstants = {};
var isNativeUIManagerConstantsSet = false;
function _getConstants() {
if (!isNativeUIManagerConstantsSet) {
NativeUIManagerConstants = _NativeUIManager.default.getConstants();
isNativeUIManagerConstantsSet = true;
}
return NativeUIManagerConstants;
}
var UIManagerJS = (0, _objectSpread2.default)({}, _NativeUIManager.default, {
getConstants: function getConstants() {
return _getConstants();
},
getViewManagerConfig: function getViewManagerConfig(viewManagerName) {
if (viewManagerConfigs[viewManagerName] === undefined && _NativeUIManager.default.getConstantsForViewManager) {
try {
viewManagerConfigs[viewManagerName] = _NativeUIManager.default.getConstantsForViewManager(viewManagerName);
} catch (e) {
viewManagerConfigs[viewManagerName] = null;
}
}
var config = viewManagerConfigs[viewManagerName];
if (config) {
return config;
}
if (!global.nativeCallSyncHook) {
return config;
}
if (_NativeUIManager.default.lazilyLoadView && !triedLoadingConfig.has(viewManagerName)) {
var result = _NativeUIManager.default.lazilyLoadView(viewManagerName);
triedLoadingConfig.add(viewManagerName);
if (result.viewConfig) {
_getConstants()[viewManagerName] = result.viewConfig;
lazifyViewManagerConfig(viewManagerName);
}
}
return viewManagerConfigs[viewManagerName];
}
});
_NativeUIManager.default.getViewManagerConfig = UIManagerJS.getViewManagerConfig;
function lazifyViewManagerConfig(viewName) {
var viewConfig = _getConstants()[viewName];
viewManagerConfigs[viewName] = viewConfig;
if (viewConfig.Manager) {
defineLazyObjectProperty(viewConfig, 'Constants', {
get: function get() {
var viewManager = NativeModules[viewConfig.Manager];
var constants = {};
viewManager && Object.keys(viewManager).forEach(function (key) {
var value = viewManager[key];
if (typeof value !== 'function') {
constants[key] = value;
}
});
return constants;
}
});
defineLazyObjectProperty(viewConfig, 'Commands', {
get: function get() {
var viewManager = NativeModules[viewConfig.Manager];
var commands = {};
var index = 0;
viewManager && Object.keys(viewManager).forEach(function (key) {
var value = viewManager[key];
if (typeof value === 'function') {
commands[key] = index++;
}
});
return commands;
}
});
}
}
if (_getConstants().ViewManagerNames) {
_NativeUIManager.default.getConstants().ViewManagerNames.forEach(function (viewManagerName) {
defineLazyObjectProperty(_NativeUIManager.default, viewManagerName, {
get: function get() {
return _NativeUIManager.default.getConstantsForViewManager(viewManagerName);
}
});
});
}
if (!global.nativeCallSyncHook) {
Object.keys(_getConstants()).forEach(function (viewManagerName) {
if (!UIManagerProperties.includes(viewManagerName)) {
if (!viewManagerConfigs[viewManagerName]) {
viewManagerConfigs[viewManagerName] = _getConstants()[viewManagerName];
}
defineLazyObjectProperty(_NativeUIManager.default, viewManagerName, {
get: function get() {
return UIManagerJS.getViewManagerConfig(viewManagerName);
}
});
}
});
}
module.exports = UIManagerJS;
},14395,[14305,14314,14398,10042,10066,14404,10084]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var _interopRequireWildcard = _$$_REQUIRE(_dependencyMap[0]);
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = undefined;
var TurboModuleRegistry = _interopRequireWildcard(_$$_REQUIRE(_dependencyMap[1]));
var _default = TurboModuleRegistry.getEnforcing('UIManager');
exports.default = _default;
},14398,[14308,14341]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var _interopRequireWildcard = _$$_REQUIRE(_dependencyMap[0]);
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = undefined;
var TurboModuleRegistry = _interopRequireWildcard(_$$_REQUIRE(_dependencyMap[1]));
var _default = TurboModuleRegistry.getEnforcing('PlatformConstants');
exports.default = _default;
},14401,[14308,14341]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
module.exports = ['clearJSResponder', 'configureNextLayoutAnimation', 'createView', 'dismissPopupMenu', 'dispatchViewManagerCommand', 'findSubviewIn', 'getConstantsForViewManager', 'getDefaultEventTypes', 'manageChildren', 'measure', 'measureInWindow', 'measureLayout', 'measureLayoutRelativeToParent', 'playTouchSound', 'removeRootView', 'removeSubviewsFromContainerWithID', 'replaceExistingNonRootView', 'sendAccessibilityEvent', 'setChildren', 'setJSResponder', 'setLayoutAnimationEnabledExperimental', 'showPopupMenu', 'updateView', 'viewIsDescendantOf', 'PopupMenu', 'LazyViewManagersEnabled', 'ViewManagerNames', 'StyleConstants', 'AccessibilityEventTypes', 'UIView', 'getViewManagerConfig', 'blur', 'focus', 'genericBubblingEventTypes', 'genericDirectEventTypes', 'lazilyLoadView'];
},14404,[]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
var objectWithoutPropertiesLoose = _$$_REQUIRE(_dependencyMap[0]);
function _objectWithoutProperties(source, excluded) {
if (source == null) return {};
var target = objectWithoutPropertiesLoose(source, excluded);
var key, i;
if (Object.getOwnPropertySymbols) {
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
for (i = 0; i < sourceSymbolKeys.length; i++) {
key = sourceSymbolKeys[i];
if (excluded.indexOf(key) >= 0) continue;
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
target[key] = source[key];
}
}
return target;
}
module.exports = _objectWithoutProperties;
},14407,[14410]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
function _objectWithoutPropertiesLoose(source, excluded) {
if (source == null) return {};
var target = {};
var sourceKeys = Object.keys(source);
var key, i;
for (i = 0; i < sourceKeys.length; i++) {
key = sourceKeys[i];
if (excluded.indexOf(key) >= 0) continue;
target[key] = source[key];
}
return target;
}
module.exports = _objectWithoutPropertiesLoose;
},14410,[]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var _interopRequireWildcard = _$$_REQUIRE(_dependencyMap[0]);
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = undefined;
var TurboModuleRegistry = _interopRequireWildcard(_$$_REQUIRE(_dependencyMap[1]));
var NativeModule = TurboModuleRegistry.getEnforcing('DeviceInfo');
var NativeDeviceInfo = NativeModule;
var _default = NativeDeviceInfo;
exports.default = _default;
},14413,[14308,14341]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var _objectSpread = _$$_REQUIRE(_dependencyMap[0]);
var DeprecatedColorPropType = _$$_REQUIRE(_dependencyMap[1]);
var DeprecatedLayoutPropTypes = _$$_REQUIRE(_dependencyMap[2]);
var DeprecatedShadowPropTypesIOS = _$$_REQUIRE(_dependencyMap[3]);
var DeprecatedTransformPropTypes = _$$_REQUIRE(_dependencyMap[4]);
var ReactPropTypes = _$$_REQUIRE(_dependencyMap[5]);
var ImageStylePropTypes = _objectSpread({}, DeprecatedLayoutPropTypes, DeprecatedShadowPropTypesIOS, DeprecatedTransformPropTypes, {
resizeMode: ReactPropTypes.oneOf(['center', 'contain', 'cover', 'repeat', 'stretch']),
backfaceVisibility: ReactPropTypes.oneOf(['visible', 'hidden']),
backgroundColor: DeprecatedColorPropType,
borderColor: DeprecatedColorPropType,
borderWidth: ReactPropTypes.number,
borderRadius: ReactPropTypes.number,
overflow: ReactPropTypes.oneOf(['visible', 'hidden']),
tintColor: DeprecatedColorPropType,
opacity: ReactPropTypes.number,
overlayColor: ReactPropTypes.string,
borderTopLeftRadius: ReactPropTypes.number,
borderTopRightRadius: ReactPropTypes.number,
borderBottomLeftRadius: ReactPropTypes.number,
borderBottomRightRadius: ReactPropTypes.number
});
module.exports = ImageStylePropTypes;
},14416,[14314,14419,14425,14428,14431,10318]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var normalizeColor = _$$_REQUIRE(_dependencyMap[0]);
var colorPropType = function colorPropType(isRequired, props, propName, componentName, location, propFullName) {
var color = props[propName];
if (color === undefined || color === null) {
if (isRequired) {
return new Error('Required ' + location + ' `' + (propFullName || propName) + '` was not specified in `' + componentName + '`.');
}
return;
}
if (typeof color === 'number') {
return;
}
if (normalizeColor(color) === null) {
return new Error('Invalid ' + location + ' `' + (propFullName || propName) + '` supplied to `' + componentName + '`: ' + color + '\n' + "Valid color formats are\n - '#f0f' (#rgb)\n - '#f0fc' (#rgba)\n - '#ff00ff' (#rrggbb)\n - '#ff00ff00' (#rrggbbaa)\n - 'rgb(255, 255, 255)'\n - 'rgba(255, 255, 255, 1.0)'\n - 'hsl(360, 100%, 100%)'\n - 'hsla(360, 100%, 100%, 1.0)'\n - 'transparent'\n - 'red'\n - 0xff00ff00 (0xrrggbbaa)\n");
}
};
var ColorPropType = colorPropType.bind(null, false);
ColorPropType.isRequired = colorPropType.bind(null, true);
module.exports = ColorPropType;
},14419,[14422]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var _interopRequireDefault = _$$_REQUIRE(_dependencyMap[0]);
var _native = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[1]));
var _utils = _$$_REQUIRE(_dependencyMap[2]);
var _index = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[3]));
function shouldUseAutoDarkmode() {
if (_native.default.MIOTService.currentDarkMode == "dark" && !_index.default.darkModeStore.setDarkMode) {
return true;
} else {
return false;
}
}
function changeColor(color, flag, isText) {
if (!shouldUseAutoDarkmode() || flag) {
return color;
}
var tmp = color.toString(16);
if (tmp.length < 8) {
if (tmp.length == 1) {
tmp = "0000000" + tmp;
} else if (tmp.length == 2) {
tmp = "000000" + tmp;
} else if (tmp.length == 3) {
tmp = "00000" + tmp;
} else if (tmp.length == 4) {
tmp = "0000" + tmp;
} else if (tmp.length == 5) {
tmp = "000" + tmp;
} else if (tmp.length == 6) {
tmp = "00" + tmp;
} else if (tmp.length == 7) {
tmp = "0" + tmp;
} else {
tmp = '00000000';
}
}
var alpha = tmp.substr(6, 2);
var first = "0x" + tmp.substr(0, 6);
var finalColor = getAntiColor(parseInt(first, 16), parseInt(alpha, 16), isText);
var finalAlpha = getAntiAlpha(parseInt(first, 16), parseInt(alpha, 16));
var final = parseInt(finalColor.toString(16) + alpha, 16) >>> 0;
return final;
}
function getAntiAlpha(originColor, alpha, isText) {
if (alpha <= 0x65 && alpha >= 0x4c && originColor === 0x000000) {
return 0x99;
}
return alpha;
}
function getAntiColor(originColor, alpha, isText) {
if (originColor === 0x32bac0) {
return 0x25A9AF;
} else if (originColor === 0x25A9AF) {
return 0x158B90;
} else if (originColor === 0xF43F31) {
return 0xD92719;
} else if (originColor === 0xD53C32) {
return 0xB62920;
}
if (!isText) {
if (originColor === 0xf6f7f8 || originColor === 0xe9e9ef || originColor === 0xEBEBEC || originColor === 0xefeff0) {
return 0x000000;
}
if (originColor === 0xE3E6E7) {
return 0x1a1a1a;
}
if (originColor === 0xb0b0b0) {
return 0x1a1a1a;
}
} else {
if (originColor === 0x23262a || originColor === 0x404346 || originColor === 0x454553) {
return 0xffffff;
}
}
var rgbColor = hexToRgb(originColor.toString(16));
var hsvColor = rgbToHsv(rgbColor[0], rgbColor[1], rgbColor[2]);
var h = hsvColor.h;
var s = hsvColor.s;
var v = hsvColor.v;
var flag = false;
if (isText) {
if (hsvColor.h === 0 && hsvColor.s === 0) {
flag = true;
if (v >= 0 && v < 20) {
hsvColor.v = 90;
} else if (v >= 20 && v < 30) {
hsvColor.v = 80;
} else if (v >= 30 && v < 40) {
hsvColor.v = 70;
} else if (v >= 40 && v < 50) {
hsvColor.v = 60;
} else if (v >= 50 && v < 60) {
hsvColor.v = 50;
} else if (v >= 60 && v < 90) {
hsvColor.v = 40;
} else if (v >= 90 && v <= 100) {
hsvColor.v = 90;
} else {
flag = false;
}
} else {}
} else {
if (hsvColor.h === 0 && hsvColor.s === 0) {
flag = true;
if (v >= 90 && v < 97) {
hsvColor.v = 15;
} else if (v >= 97 && v < 100) {
hsvColor.v = 0;
} else if (v === 100) {
hsvColor.v = 10;
} else {
flag = false;
}
}
}
if (!flag) {
hsvColor.s += 8;
hsvColor.v -= 10;
}
return hsvToHex(hsvColor.h, Math.min(Math.max(hsvColor.s, 0), 100), Math.min(Math.max(hsvColor.v, 0), 100));
}
function hexToRgb(color) {
var sColorChange = [];
var tmp = color.toString(16);
if (tmp.length < 8) {
if (tmp.length == 1) {
tmp = "#00000" + tmp;
} else if (tmp.length == 2) {
tmp = "#0000" + tmp;
} else if (tmp.length == 3) {
tmp = "#000" + tmp;
} else if (tmp.length == 4) {
tmp = "#00" + tmp;
} else if (tmp.length == 5) {
tmp = "#0" + tmp;
} else if (tmp.length == 6) {
tmp = "#" + tmp;
} else {
tmp = '#000000';
}
}
var rgbString = "" + tmp.slice(1).match(/.{2}/g).map(function (x) {
return parseInt(x, 16);
}).join();
sColorChange = rgbString.split(",");
return sColorChange;
}
function rgbToHsv(r, g, b) {
r = r / 255;
g = g / 255;
b = b / 255;
var h, s, v;
var min = Math.min(r, g, b);
var max = v = Math.max(r, g, b);
var l = (min + max) / 2;
var difference = max - min;
if (max == min) {
h = 0;
} else {
switch (max) {
case r:
h = (g - b) / difference + (g < b ? 6 : 0);
break;
case g:
h = 2.0 + (b - r) / difference;
break;
case b:
h = 4.0 + (r - g) / difference;
break;
}
h = Math.round(h * 60);
}
if (max == 0) {
s = 0;
} else {
s = 1 - min / max;
}
s = Math.round(s * 100);
v = Math.round(v * 100);
return {
"h": h,
"s": s,
"v": v
};
}
function hsvToHex(h, s, v) {
s = s / 100;
v = v / 100;
var r = 0,
g = 0,
b = 0;
var i = parseInt(h / 60 % 6);
var f = h / 60 - i;
var p = v * (1 - s);
var q = v * (1 - f * s);
var t = v * (1 - (1 - f) * s);
switch (i) {
case 0:
r = v;
g = t;
b = p;
break;
case 1:
r = q;
g = v;
b = p;
break;
case 2:
r = p;
g = v;
b = t;
break;
case 3:
r = p;
g = q;
b = v;
break;
case 4:
r = t;
g = p;
b = v;
break;
case 5:
r = v;
g = p;
b = q;
break;
default:
break;
}
r = parseInt(r * 255.0);
g = parseInt(g * 255.0);
b = parseInt(b * 255.0);
var color = (0, _utils.rgbToHex)(r, g, b);
return color;
}
function normalizeColor(color) {
var matchers = getMatchers();
var match;
if (typeof color === 'number') {
if (color >>> 0 === color && color >= 0 && color <= 0xffffffff) {
return changeColor(color, false, false);
}
return null;
}
var isText = false;
if (color.indexOf('text') != -1) {
isText = true;
color = color.replace(new RegExp("text", "gm"), '');
}
var flag = false;
if (color.indexOf('xm') != -1) {
flag = true;
color = color.replace(new RegExp("xm", "gm"), '');
}
if (match = matchers.hex6.exec(color)) {
var tmp = parseInt(match[1] + "ff", 16) >>> 0;
return changeColor(tmp, flag, isText);
}
if (names.hasOwnProperty(color)) {
return changeColor(names[color], flag, isText);
}
if (match = matchers.rgb.exec(color)) {
var _tmp = (parse255(match[1]) << 24 | parse255(match[2]) << 16 | parse255(match[3]) << 8 | 0x000000ff) >>> 0;
return changeColor(_tmp, flag, isText);
}
if (match = matchers.rgba.exec(color)) {
var _tmp2 = (parse255(match[1]) << 24 | parse255(match[2]) << 16 | parse255(match[3]) << 8 | parse1(match[4])) >>> 0;
return changeColor(_tmp2, flag, isText);
}
if (match = matchers.hex3.exec(color)) {
var _tmp3 = parseInt(match[1] + match[1] + match[2] + match[2] + match[3] + match[3] + "ff", 16) >>> 0;
return changeColor(_tmp3, flag, isText);
}
if (match = matchers.hex8.exec(color)) {
var _tmp4 = parseInt(match[1], 16) >>> 0;
return changeColor(_tmp4, flag, isText);
}
if (match = matchers.hex4.exec(color)) {
var _tmp5 = parseInt(match[1] + match[1] + match[2] + match[2] + match[3] + match[3] + match[4] + match[4], 16) >>> 0;
return changeColor(_tmp5, flag, isText);
}
if (match = matchers.hsl.exec(color)) {
var _tmp6 = (hslToRgb(parse360(match[1]), parsePercentage(match[2]), parsePercentage(match[3])) | 0x000000ff) >>> 0;
return changeColor(_tmp6, flag, isText);
}
if (match = matchers.hsla.exec(color)) {
var _tmp7 = (hslToRgb(parse360(match[1]), parsePercentage(match[2]), parsePercentage(match[3])) | parse1(match[4])) >>> 0;
return changeColor(_tmp7, flag, isText);
}
return null;
}
function hue2rgb(p, q, t) {
if (t < 0) {
t += 1;
}
if (t > 1) {
t -= 1;
}
if (t < 0.16666666666666666) {
return p + (q - p) * 6 * t;
}
if (t < 0.5) {
return q;
}
if (t < 0.6666666666666666) {
return p + (q - p) * (0.6666666666666666 - t) * 6;
}
return p;
}
function hslToRgb(h, s, l) {
var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
var p = 2 * l - q;
var r = hue2rgb(p, q, h + 0.3333333333333333);
var g = hue2rgb(p, q, h);
var b = hue2rgb(p, q, h - 0.3333333333333333);
return Math.round(r * 255) << 24 | Math.round(g * 255) << 16 | Math.round(b * 255) << 8;
}
var NUMBER = '[-+]?\\d*\\.?\\d+';
var PERCENTAGE = "[-+]?\\d*\\.?\\d+%";
function call() {
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return "\\(\\s*(" + args.join(')\\s*,\\s*(') + ")\\s*\\)";
}
var cachedMatchers;
function getMatchers() {
if (cachedMatchers === undefined) {
cachedMatchers = {
rgb: new RegExp("rgb" + call(NUMBER, NUMBER, NUMBER)),
rgba: new RegExp("rgba" + call(NUMBER, NUMBER, NUMBER, NUMBER)),
hsl: new RegExp("hsl" + call(NUMBER, PERCENTAGE, PERCENTAGE)),
hsla: new RegExp("hsla" + call(NUMBER, PERCENTAGE, PERCENTAGE, NUMBER)),
hex3: /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
hex4: /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
hex6: /^#([0-9a-fA-F]{6})$/,
hex8: /^#([0-9a-fA-F]{8})$/
};
}
return cachedMatchers;
}
function parse255(str) {
var int = parseInt(str, 10);
if (int < 0) {
return 0;
}
if (int > 255) {
return 255;
}
return int;
}
function parse360(str) {
var int = parseFloat(str);
return (int % 360 + 360) % 360 / 360;
}
function parse1(str) {
var num = parseFloat(str);
if (num < 0) {
return 0;
}
if (num > 1) {
return 255;
}
return Math.round(num * 255);
}
function parsePercentage(str) {
var int = parseFloat(str);
if (int < 0) {
return 0;
}
if (int > 100) {
return 1;
}
return int / 100;
}
var names = {
transparent: 0x00000000,
aliceblue: 0xf0f8ffff,
antiquewhite: 0xfaebd7ff,
aqua: 0x00ffffff,
aquamarine: 0x7fffd4ff,
azure: 0xf0ffffff,
beige: 0xf5f5dcff,
bisque: 0xffe4c4ff,
black: 0x000000ff,
blanchedalmond: 0xffebcdff,
blue: 0x0000ffff,
blueviolet: 0x8a2be2ff,
brown: 0xa52a2aff,
burlywood: 0xdeb887ff,
burntsienna: 0xea7e5dff,
cadetblue: 0x5f9ea0ff,
chartreuse: 0x7fff00ff,
chocolate: 0xd2691eff,
coral: 0xff7f50ff,
cornflowerblue: 0x6495edff,
cornsilk: 0xfff8dcff,
crimson: 0xdc143cff,
cyan: 0x00ffffff,
darkblue: 0x00008bff,
darkcyan: 0x008b8bff,
darkgoldenrod: 0xb8860bff,
darkgray: 0xa9a9a9ff,
darkgreen: 0x006400ff,
darkgrey: 0xa9a9a9ff,
darkkhaki: 0xbdb76bff,
darkmagenta: 0x8b008bff,
darkolivegreen: 0x556b2fff,
darkorange: 0xff8c00ff,
darkorchid: 0x9932ccff,
darkred: 0x8b0000ff,
darksalmon: 0xe9967aff,
darkseagreen: 0x8fbc8fff,
darkslateblue: 0x483d8bff,
darkslategray: 0x2f4f4fff,
darkslategrey: 0x2f4f4fff,
darkturquoise: 0x00ced1ff,
darkviolet: 0x9400d3ff,
deeppink: 0xff1493ff,
deepskyblue: 0x00bfffff,
dimgray: 0x696969ff,
dimgrey: 0x696969ff,
dodgerblue: 0x1e90ffff,
firebrick: 0xb22222ff,
floralwhite: 0xfffaf0ff,
forestgreen: 0x228b22ff,
fuchsia: 0xff00ffff,
gainsboro: 0xdcdcdcff,
ghostwhite: 0xf8f8ffff,
gold: 0xffd700ff,
goldenrod: 0xdaa520ff,
gray: 0x808080ff,
green: 0x008000ff,
greenyellow: 0xadff2fff,
grey: 0x808080ff,
honeydew: 0xf0fff0ff,
hotpink: 0xff69b4ff,
indianred: 0xcd5c5cff,
indigo: 0x4b0082ff,
ivory: 0xfffff0ff,
khaki: 0xf0e68cff,
lavender: 0xe6e6faff,
lavenderblush: 0xfff0f5ff,
lawngreen: 0x7cfc00ff,
lemonchiffon: 0xfffacdff,
lightblue: 0xadd8e6ff,
lightcoral: 0xf08080ff,
lightcyan: 0xe0ffffff,
lightgoldenrodyellow: 0xfafad2ff,
lightgray: 0xd3d3d3ff,
lightgreen: 0x90ee90ff,
lightgrey: 0xd3d3d3ff,
lightpink: 0xffb6c1ff,
lightsalmon: 0xffa07aff,
lightseagreen: 0x20b2aaff,
lightskyblue: 0x87cefaff,
lightslategray: 0x778899ff,
lightslategrey: 0x778899ff,
lightsteelblue: 0xb0c4deff,
lightyellow: 0xffffe0ff,
lime: 0x00ff00ff,
limegreen: 0x32cd32ff,
linen: 0xfaf0e6ff,
magenta: 0xff00ffff,
maroon: 0x800000ff,
mediumaquamarine: 0x66cdaaff,
mediumblue: 0x0000cdff,
mediumorchid: 0xba55d3ff,
mediumpurple: 0x9370dbff,
mediumseagreen: 0x3cb371ff,
mediumslateblue: 0x7b68eeff,
mediumspringgreen: 0x00fa9aff,
mediumturquoise: 0x48d1ccff,
mediumvioletred: 0xc71585ff,
midnightblue: 0x191970ff,
mintcream: 0xf5fffaff,
mistyrose: 0xffe4e1ff,
moccasin: 0xffe4b5ff,
navajowhite: 0xffdeadff,
navy: 0x000080ff,
oldlace: 0xfdf5e6ff,
olive: 0x808000ff,
olivedrab: 0x6b8e23ff,
orange: 0xffa500ff,
orangered: 0xff4500ff,
orchid: 0xda70d6ff,
palegoldenrod: 0xeee8aaff,
palegreen: 0x98fb98ff,
paleturquoise: 0xafeeeeff,
palevioletred: 0xdb7093ff,
papayawhip: 0xffefd5ff,
peachpuff: 0xffdab9ff,
peru: 0xcd853fff,
pink: 0xffc0cbff,
plum: 0xdda0ddff,
powderblue: 0xb0e0e6ff,
purple: 0x800080ff,
rebeccapurple: 0x663399ff,
red: 0xff0000ff,
rosybrown: 0xbc8f8fff,
royalblue: 0x4169e1ff,
saddlebrown: 0x8b4513ff,
salmon: 0xfa8072ff,
sandybrown: 0xf4a460ff,
seagreen: 0x2e8b57ff,
seashell: 0xfff5eeff,
sienna: 0xa0522dff,
silver: 0xc0c0c0ff,
skyblue: 0x87ceebff,
slateblue: 0x6a5acdff,
slategray: 0x708090ff,
slategrey: 0x708090ff,
snow: 0xfffafaff,
springgreen: 0x00ff7fff,
steelblue: 0x4682b4ff,
tan: 0xd2b48cff,
teal: 0x008080ff,
thistle: 0xd8bfd8ff,
tomato: 0xff6347ff,
turquoise: 0x40e0d0ff,
violet: 0xee82eeff,
wheat: 0xf5deb3ff,
white: 0xffffffff,
whitesmoke: 0xf5f5f5ff,
yellow: 0xffff00ff,
yellowgreen: 0x9acd32ff
};
module.exports = normalizeColor;
},14422,[14305,10005,10014,10998]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var ReactPropTypes = _$$_REQUIRE(_dependencyMap[0]);
var LayoutPropTypes = {
display: ReactPropTypes.oneOf(['none', 'flex']),
width: ReactPropTypes.oneOfType([ReactPropTypes.number, ReactPropTypes.string]),
height: ReactPropTypes.oneOfType([ReactPropTypes.number, ReactPropTypes.string]),
start: ReactPropTypes.oneOfType([ReactPropTypes.number, ReactPropTypes.string]),
end: ReactPropTypes.oneOfType([ReactPropTypes.number, ReactPropTypes.string]),
top: ReactPropTypes.oneOfType([ReactPropTypes.number, ReactPropTypes.string]),
left: ReactPropTypes.oneOfType([ReactPropTypes.number, ReactPropTypes.string]),
right: ReactPropTypes.oneOfType([ReactPropTypes.number, ReactPropTypes.string]),
bottom: ReactPropTypes.oneOfType([ReactPropTypes.number, ReactPropTypes.string]),
minWidth: ReactPropTypes.oneOfType([ReactPropTypes.number, ReactPropTypes.string]),
maxWidth: ReactPropTypes.oneOfType([ReactPropTypes.number, ReactPropTypes.string]),
minHeight: ReactPropTypes.oneOfType([ReactPropTypes.number, ReactPropTypes.string]),
maxHeight: ReactPropTypes.oneOfType([ReactPropTypes.number, ReactPropTypes.string]),
margin: ReactPropTypes.oneOfType([ReactPropTypes.number, ReactPropTypes.string]),
marginVertical: ReactPropTypes.oneOfType([ReactPropTypes.number, ReactPropTypes.string]),
marginHorizontal: ReactPropTypes.oneOfType([ReactPropTypes.number, ReactPropTypes.string]),
marginTop: ReactPropTypes.oneOfType([ReactPropTypes.number, ReactPropTypes.string]),
marginBottom: ReactPropTypes.oneOfType([ReactPropTypes.number, ReactPropTypes.string]),
marginLeft: ReactPropTypes.oneOfType([ReactPropTypes.number, ReactPropTypes.string]),
marginRight: ReactPropTypes.oneOfType([ReactPropTypes.number, ReactPropTypes.string]),
marginStart: ReactPropTypes.oneOfType([ReactPropTypes.number, ReactPropTypes.string]),
marginEnd: ReactPropTypes.oneOfType([ReactPropTypes.number, ReactPropTypes.string]),
padding: ReactPropTypes.oneOfType([ReactPropTypes.number, ReactPropTypes.string]),
paddingVertical: ReactPropTypes.oneOfType([ReactPropTypes.number, ReactPropTypes.string]),
paddingHorizontal: ReactPropTypes.oneOfType([ReactPropTypes.number, ReactPropTypes.string]),
paddingTop: ReactPropTypes.oneOfType([ReactPropTypes.number, ReactPropTypes.string]),
paddingBottom: ReactPropTypes.oneOfType([ReactPropTypes.number, ReactPropTypes.string]),
paddingLeft: ReactPropTypes.oneOfType([ReactPropTypes.number, ReactPropTypes.string]),
paddingRight: ReactPropTypes.oneOfType([ReactPropTypes.number, ReactPropTypes.string]),
paddingStart: ReactPropTypes.oneOfType([ReactPropTypes.number, ReactPropTypes.string]),
paddingEnd: ReactPropTypes.oneOfType([ReactPropTypes.number, ReactPropTypes.string]),
borderWidth: ReactPropTypes.number,
borderTopWidth: ReactPropTypes.number,
borderStartWidth: ReactPropTypes.number,
borderEndWidth: ReactPropTypes.number,
borderRightWidth: ReactPropTypes.number,
borderBottomWidth: ReactPropTypes.number,
borderLeftWidth: ReactPropTypes.number,
position: ReactPropTypes.oneOf(['absolute', 'relative']),
flexDirection: ReactPropTypes.oneOf(['row', 'row-reverse', 'column', 'column-reverse']),
flexWrap: ReactPropTypes.oneOf(['wrap', 'nowrap', 'wrap-reverse']),
justifyContent: ReactPropTypes.oneOf(['flex-start', 'flex-end', 'center', 'space-between', 'space-around', 'space-evenly']),
alignItems: ReactPropTypes.oneOf(['flex-start', 'flex-end', 'center', 'stretch', 'baseline']),
alignSelf: ReactPropTypes.oneOf(['auto', 'flex-start', 'flex-end', 'center', 'stretch', 'baseline']),
alignContent: ReactPropTypes.oneOf(['flex-start', 'flex-end', 'center', 'stretch', 'space-between', 'space-around']),
overflow: ReactPropTypes.oneOf(['visible', 'hidden', 'scroll']),
flex: ReactPropTypes.number,
flexGrow: ReactPropTypes.number,
flexShrink: ReactPropTypes.number,
flexBasis: ReactPropTypes.oneOfType([ReactPropTypes.number, ReactPropTypes.string]),
aspectRatio: ReactPropTypes.number,
zIndex: ReactPropTypes.number,
direction: ReactPropTypes.oneOf(['inherit', 'ltr', 'rtl'])
};
module.exports = LayoutPropTypes;
},14425,[10318]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var DeprecatedColorPropType = _$$_REQUIRE(_dependencyMap[0]);
var ReactPropTypes = _$$_REQUIRE(_dependencyMap[1]);
var DeprecatedShadowPropTypesIOS = {
shadowColor: DeprecatedColorPropType,
shadowOffset: ReactPropTypes.shape({
width: ReactPropTypes.number,
height: ReactPropTypes.number
}),
shadowOpacity: ReactPropTypes.number,
shadowRadius: ReactPropTypes.number
};
module.exports = DeprecatedShadowPropTypesIOS;
},14428,[14419,10318]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var ReactPropTypes = _$$_REQUIRE(_dependencyMap[0]);
var deprecatedPropType = _$$_REQUIRE(_dependencyMap[1]);
var TransformMatrixPropType = function TransformMatrixPropType(props, propName, componentName) {
if (props[propName]) {
return new Error("The transformMatrix style property is deprecated. Use `transform: [{ matrix: ... }]` instead.");
}
};
var DecomposedMatrixPropType = function DecomposedMatrixPropType(props, propName, componentName) {
if (props[propName]) {
return new Error("The decomposedMatrix style property is deprecated. Use `transform: [...]` instead.");
}
};
var DeprecatedTransformPropTypes = {
transform: ReactPropTypes.arrayOf(ReactPropTypes.oneOfType([ReactPropTypes.shape({
perspective: ReactPropTypes.number
}), ReactPropTypes.shape({
rotate: ReactPropTypes.string
}), ReactPropTypes.shape({
rotateX: ReactPropTypes.string
}), ReactPropTypes.shape({
rotateY: ReactPropTypes.string
}), ReactPropTypes.shape({
rotateZ: ReactPropTypes.string
}), ReactPropTypes.shape({
scale: ReactPropTypes.number
}), ReactPropTypes.shape({
scaleX: ReactPropTypes.number
}), ReactPropTypes.shape({
scaleY: ReactPropTypes.number
}), ReactPropTypes.shape({
translateX: ReactPropTypes.number
}), ReactPropTypes.shape({
translateY: ReactPropTypes.number
}), ReactPropTypes.shape({
skewX: ReactPropTypes.string
}), ReactPropTypes.shape({
skewY: ReactPropTypes.string
})])),
transformMatrix: TransformMatrixPropType,
decomposedMatrix: DecomposedMatrixPropType,
scaleX: deprecatedPropType(ReactPropTypes.number, 'Use the transform prop instead.'),
scaleY: deprecatedPropType(ReactPropTypes.number, 'Use the transform prop instead.'),
rotation: deprecatedPropType(ReactPropTypes.number, 'Use the transform prop instead.'),
translateX: deprecatedPropType(ReactPropTypes.number, 'Use the transform prop instead.'),
translateY: deprecatedPropType(ReactPropTypes.number, 'Use the transform prop instead.')
};
module.exports = DeprecatedTransformPropTypes;
},14431,[10318,10366]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var _objectSpread = _$$_REQUIRE(_dependencyMap[0]);
var DeprecatedColorPropType = _$$_REQUIRE(_dependencyMap[1]);
var DeprecatedViewStylePropTypes = _$$_REQUIRE(_dependencyMap[2]);
var ReactPropTypes = _$$_REQUIRE(_dependencyMap[3]);
var DeprecatedTextStylePropTypes = _objectSpread({}, DeprecatedViewStylePropTypes, {
color: DeprecatedColorPropType,
fontFamily: ReactPropTypes.string,
fontSize: ReactPropTypes.number,
fontStyle: ReactPropTypes.oneOf(['normal', 'italic']),
fontWeight: ReactPropTypes.oneOf(['normal', 'bold', '100', '200', '300', '400', '500', '600', '700', '800', '900']),
fontVariant: ReactPropTypes.arrayOf(ReactPropTypes.oneOf(['small-caps', 'oldstyle-nums', 'lining-nums', 'tabular-nums', 'proportional-nums'])),
textShadowOffset: ReactPropTypes.shape({
width: ReactPropTypes.number,
height: ReactPropTypes.number
}),
textShadowRadius: ReactPropTypes.number,
textShadowColor: DeprecatedColorPropType,
letterSpacing: ReactPropTypes.number,
lineHeight: ReactPropTypes.number,
textAlign: ReactPropTypes.oneOf(['auto', 'left', 'right', 'center', 'justify']),
textAlignVertical: ReactPropTypes.oneOf(['auto', 'top', 'bottom', 'center']),
includeFontPadding: ReactPropTypes.bool,
textDecorationLine: ReactPropTypes.oneOf(['none', 'underline', 'line-through', 'underline line-through']),
textDecorationStyle: ReactPropTypes.oneOf(['solid', 'double', 'dotted', 'dashed']),
textDecorationColor: DeprecatedColorPropType,
textTransform: ReactPropTypes.oneOf(['none', 'capitalize', 'uppercase', 'lowercase']),
writingDirection: ReactPropTypes.oneOf(['auto', 'ltr', 'rtl'])
});
module.exports = DeprecatedTextStylePropTypes;
},14434,[14314,14419,14437,10318]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var _objectSpread = _$$_REQUIRE(_dependencyMap[0]);
var DeprecatedColorPropType = _$$_REQUIRE(_dependencyMap[1]);
var DeprecatedLayoutPropTypes = _$$_REQUIRE(_dependencyMap[2]);
var DeprecatedShadowPropTypesIOS = _$$_REQUIRE(_dependencyMap[3]);
var DeprecatedTransformPropTypes = _$$_REQUIRE(_dependencyMap[4]);
var ReactPropTypes = _$$_REQUIRE(_dependencyMap[5]);
var DeprecatedViewStylePropTypes = _objectSpread({}, DeprecatedLayoutPropTypes, DeprecatedShadowPropTypesIOS, DeprecatedTransformPropTypes, {
backfaceVisibility: ReactPropTypes.oneOf(['visible', 'hidden']),
backgroundColor: DeprecatedColorPropType,
borderColor: DeprecatedColorPropType,
borderTopColor: DeprecatedColorPropType,
borderRightColor: DeprecatedColorPropType,
borderBottomColor: DeprecatedColorPropType,
borderLeftColor: DeprecatedColorPropType,
borderStartColor: DeprecatedColorPropType,
borderEndColor: DeprecatedColorPropType,
borderRadius: ReactPropTypes.number,
borderTopLeftRadius: ReactPropTypes.number,
borderTopRightRadius: ReactPropTypes.number,
borderTopStartRadius: ReactPropTypes.number,
borderTopEndRadius: ReactPropTypes.number,
borderBottomLeftRadius: ReactPropTypes.number,
borderBottomRightRadius: ReactPropTypes.number,
borderBottomStartRadius: ReactPropTypes.number,
borderBottomEndRadius: ReactPropTypes.number,
borderStyle: ReactPropTypes.oneOf(['solid', 'dotted', 'dashed']),
borderWidth: ReactPropTypes.number,
borderTopWidth: ReactPropTypes.number,
borderRightWidth: ReactPropTypes.number,
borderBottomWidth: ReactPropTypes.number,
borderLeftWidth: ReactPropTypes.number,
opacity: ReactPropTypes.number,
elevation: ReactPropTypes.number
});
module.exports = DeprecatedViewStylePropTypes;
},14437,[14314,14419,14425,14428,14431,10318]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = exports.__INTERNAL_VIEW_CONFIG = undefined;
var Platform = _$$_REQUIRE(_dependencyMap[0]);
var ReactNative = _$$_REQUIRE(_dependencyMap[1]);
var ReactNativeViewViewConfigAndroid = _$$_REQUIRE(_dependencyMap[2]);
var registerGeneratedViewConfig = _$$_REQUIRE(_dependencyMap[3]);
var requireNativeComponent = _$$_REQUIRE(_dependencyMap[4]);
var NativeViewComponent;
var viewConfig;
{
NativeViewComponent = requireNativeComponent('RCTView');
}
var __INTERNAL_VIEW_CONFIG = viewConfig;
exports.__INTERNAL_VIEW_CONFIG = __INTERNAL_VIEW_CONFIG;
var _default = NativeViewComponent;
exports.default = _default;
},14440,[10066,10114,14581,14584,10372]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
"use strict";
var _extends = _$$_REQUIRE(_dependencyMap[0]);
_$$_REQUIRE(_dependencyMap[1]);
var ReactNativePrivateInterface = _$$_REQUIRE(_dependencyMap[2]),
React = _$$_REQUIRE(_dependencyMap[3]),
Scheduler = _$$_REQUIRE(_dependencyMap[4]);
function ReactError(error) {
error.name = "Invariant Violation";
return error;
}
var eventPluginOrder = null,
namesToPlugins = {};
function recomputePluginOrdering() {
if (eventPluginOrder) for (var pluginName in namesToPlugins) {
var pluginModule = namesToPlugins[pluginName],
pluginIndex = eventPluginOrder.indexOf(pluginName);
if (!(-1 < pluginIndex)) throw ReactError(Error("EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `" + pluginName + "`."));
if (!plugins[pluginIndex]) {
if (!pluginModule.extractEvents) throw ReactError(Error("EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `" + pluginName + "` does not."));
plugins[pluginIndex] = pluginModule;
pluginIndex = pluginModule.eventTypes;
for (var eventName in pluginIndex) {
var JSCompiler_inline_result = undefined;
var dispatchConfig = pluginIndex[eventName],
pluginModule$jscomp$0 = pluginModule,
eventName$jscomp$0 = eventName;
if (eventNameDispatchConfigs.hasOwnProperty(eventName$jscomp$0)) throw ReactError(Error("EventPluginHub: More than one plugin attempted to publish the same event name, `" + eventName$jscomp$0 + "`."));
eventNameDispatchConfigs[eventName$jscomp$0] = dispatchConfig;
var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames;
if (phasedRegistrationNames) {
for (JSCompiler_inline_result in phasedRegistrationNames) {
phasedRegistrationNames.hasOwnProperty(JSCompiler_inline_result) && publishRegistrationName(phasedRegistrationNames[JSCompiler_inline_result], pluginModule$jscomp$0, eventName$jscomp$0);
}
JSCompiler_inline_result = true;
} else dispatchConfig.registrationName ? (publishRegistrationName(dispatchConfig.registrationName, pluginModule$jscomp$0, eventName$jscomp$0), JSCompiler_inline_result = true) : JSCompiler_inline_result = false;
if (!JSCompiler_inline_result) throw ReactError(Error("EventPluginRegistry: Failed to publish event `" + eventName + "` for plugin `" + pluginName + "`."));
}
}
}
}
function publishRegistrationName(registrationName, pluginModule) {
if (registrationNameModules[registrationName]) throw ReactError(Error("EventPluginHub: More than one plugin attempted to publish the same registration name, `" + registrationName + "`."));
registrationNameModules[registrationName] = pluginModule;
}
var plugins = [],
eventNameDispatchConfigs = {},
registrationNameModules = {};
function invokeGuardedCallbackImpl(name, func, context, a, b, c, d, e, f) {
var funcArgs = Array.prototype.slice.call(arguments, 3);
try {
func.apply(context, funcArgs);
} catch (error) {
this.onError(error);
}
}
var hasError = false,
caughtError = null,
hasRethrowError = false,
rethrowError = null,
reporter = {
onError: function onError(error) {
hasError = true;
caughtError = error;
}
};
function invokeGuardedCallback(name, func, context, a, b, c, d, e, f) {
hasError = false;
caughtError = null;
invokeGuardedCallbackImpl.apply(reporter, arguments);
}
function invokeGuardedCallbackAndCatchFirstError(name, func, context, a, b, c, d, e, f) {
invokeGuardedCallback.apply(this, arguments);
if (hasError) {
if (hasError) {
var error = caughtError;
hasError = false;
caughtError = null;
} else throw ReactError(Error("clearCaughtError was called but no error was captured. This error is likely caused by a bug in React. Please file an issue."));
hasRethrowError || (hasRethrowError = true, rethrowError = error);
}
}
var getFiberCurrentPropsFromNode = null,
getInstanceFromNode = null,
getNodeFromInstance = null;
function executeDispatch(event, listener, inst) {
var type = event.type || "unknown-event";
event.currentTarget = getNodeFromInstance(inst);
invokeGuardedCallbackAndCatchFirstError(type, listener, undefined, event);
event.currentTarget = null;
}
function executeDirectDispatch(event) {
var dispatchListener = event._dispatchListeners,
dispatchInstance = event._dispatchInstances;
if (Array.isArray(dispatchListener)) throw ReactError(Error("executeDirectDispatch(...): Invalid `event`."));
event.currentTarget = dispatchListener ? getNodeFromInstance(dispatchInstance) : null;
dispatchListener = dispatchListener ? dispatchListener(event) : null;
event.currentTarget = null;
event._dispatchListeners = null;
event._dispatchInstances = null;
return dispatchListener;
}
function accumulateInto(current, next) {
if (null == next) throw ReactError(Error("accumulateInto(...): Accumulated items must not be null or undefined."));
if (null == current) return next;
if (Array.isArray(current)) {
if (Array.isArray(next)) return current.push.apply(current, next), current;
current.push(next);
return current;
}
return Array.isArray(next) ? [current].concat(next) : [current, next];
}
function forEachAccumulated(arr, cb, scope) {
Array.isArray(arr) ? arr.forEach(cb, scope) : arr && cb.call(scope, arr);
}
var eventQueue = null;
function executeDispatchesAndReleaseTopLevel(e) {
if (e) {
var dispatchListeners = e._dispatchListeners,
dispatchInstances = e._dispatchInstances;
if (Array.isArray(dispatchListeners)) for (var i = 0; i < dispatchListeners.length && !e.isPropagationStopped(); i++) {
executeDispatch(e, dispatchListeners[i], dispatchInstances[i]);
} else dispatchListeners && executeDispatch(e, dispatchListeners, dispatchInstances);
e._dispatchListeners = null;
e._dispatchInstances = null;
e.isPersistent() || e.constructor.release(e);
}
}
var injection = {
injectEventPluginOrder: function injectEventPluginOrder(injectedEventPluginOrder) {
if (eventPluginOrder) throw ReactError(Error("EventPluginRegistry: Cannot inject event plugin ordering more than once. You are likely trying to load more than one copy of React."));
eventPluginOrder = Array.prototype.slice.call(injectedEventPluginOrder);
recomputePluginOrdering();
},
injectEventPluginsByName: function injectEventPluginsByName(injectedNamesToPlugins) {
var isOrderingDirty = false,
pluginName;
for (pluginName in injectedNamesToPlugins) {
if (injectedNamesToPlugins.hasOwnProperty(pluginName)) {
var pluginModule = injectedNamesToPlugins[pluginName];
if (!namesToPlugins.hasOwnProperty(pluginName) || namesToPlugins[pluginName] !== pluginModule) {
if (namesToPlugins[pluginName]) throw ReactError(Error("EventPluginRegistry: Cannot inject two different event plugins using the same name, `" + pluginName + "`."));
namesToPlugins[pluginName] = pluginModule;
isOrderingDirty = true;
}
}
}
isOrderingDirty && recomputePluginOrdering();
}
};
function getListener(inst, registrationName) {
var listener = inst.stateNode;
if (!listener) return null;
var props = getFiberCurrentPropsFromNode(listener);
if (!props) return null;
listener = props[registrationName];
a: switch (registrationName) {
case "onClick":
case "onClickCapture":
case "onDoubleClick":
case "onDoubleClickCapture":
case "onMouseDown":
case "onMouseDownCapture":
case "onMouseMove":
case "onMouseMoveCapture":
case "onMouseUp":
case "onMouseUpCapture":
(props = !props.disabled) || (inst = inst.type, props = !("button" === inst || "input" === inst || "select" === inst || "textarea" === inst));
inst = !props;
break a;
default:
inst = false;
}
if (inst) return null;
if (listener && "function" !== typeof listener) throw ReactError(Error("Expected `" + registrationName + "` listener to be a function, instead got a value of `" + typeof listener + "` type."));
return listener;
}
function getParent(inst) {
do {
inst = inst.return;
} while (inst && 5 !== inst.tag);
return inst ? inst : null;
}
function traverseTwoPhase(inst, fn, arg) {
for (var path = []; inst;) {
path.push(inst), inst = getParent(inst);
}
for (inst = path.length; 0 < inst--;) {
fn(path[inst], "captured", arg);
}
for (inst = 0; inst < path.length; inst++) {
fn(path[inst], "bubbled", arg);
}
}
function accumulateDirectionalDispatches(inst, phase, event) {
if (phase = getListener(inst, event.dispatchConfig.phasedRegistrationNames[phase])) event._dispatchListeners = accumulateInto(event._dispatchListeners, phase), event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);
}
function accumulateTwoPhaseDispatchesSingle(event) {
event && event.dispatchConfig.phasedRegistrationNames && traverseTwoPhase(event._targetInst, accumulateDirectionalDispatches, event);
}
function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {
if (event && event.dispatchConfig.phasedRegistrationNames) {
var targetInst = event._targetInst;
targetInst = targetInst ? getParent(targetInst) : null;
traverseTwoPhase(targetInst, accumulateDirectionalDispatches, event);
}
}
function accumulateDirectDispatchesSingle(event) {
if (event && event.dispatchConfig.registrationName) {
var inst = event._targetInst;
if (inst && event && event.dispatchConfig.registrationName) {
var listener = getListener(inst, event.dispatchConfig.registrationName);
listener && (event._dispatchListeners = accumulateInto(event._dispatchListeners, listener), event._dispatchInstances = accumulateInto(event._dispatchInstances, inst));
}
}
}
function functionThatReturnsTrue() {
return true;
}
function functionThatReturnsFalse() {
return false;
}
function SyntheticEvent(dispatchConfig, targetInst, nativeEvent, nativeEventTarget) {
this.dispatchConfig = dispatchConfig;
this._targetInst = targetInst;
this.nativeEvent = nativeEvent;
dispatchConfig = this.constructor.Interface;
for (var propName in dispatchConfig) {
dispatchConfig.hasOwnProperty(propName) && ((targetInst = dispatchConfig[propName]) ? this[propName] = targetInst(nativeEvent) : "target" === propName ? this.target = nativeEventTarget : this[propName] = nativeEvent[propName]);
}
this.isDefaultPrevented = (null != nativeEvent.defaultPrevented ? nativeEvent.defaultPrevented : false === nativeEvent.returnValue) ? functionThatReturnsTrue : functionThatReturnsFalse;
this.isPropagationStopped = functionThatReturnsFalse;
return this;
}
_extends(SyntheticEvent.prototype, {
preventDefault: function preventDefault() {
this.defaultPrevented = true;
var event = this.nativeEvent;
event && (event.preventDefault ? event.preventDefault() : "unknown" !== typeof event.returnValue && (event.returnValue = false), this.isDefaultPrevented = functionThatReturnsTrue);
},
stopPropagation: function stopPropagation() {
var event = this.nativeEvent;
event && (event.stopPropagation ? event.stopPropagation() : "unknown" !== typeof event.cancelBubble && (event.cancelBubble = true), this.isPropagationStopped = functionThatReturnsTrue);
},
persist: function persist() {
this.isPersistent = functionThatReturnsTrue;
},
isPersistent: functionThatReturnsFalse,
destructor: function destructor() {
var Interface = this.constructor.Interface,
propName;
for (propName in Interface) {
this[propName] = null;
}
this.nativeEvent = this._targetInst = this.dispatchConfig = null;
this.isPropagationStopped = this.isDefaultPrevented = functionThatReturnsFalse;
this._dispatchInstances = this._dispatchListeners = null;
}
});
SyntheticEvent.Interface = {
type: null,
target: null,
currentTarget: function currentTarget() {
return null;
},
eventPhase: null,
bubbles: null,
cancelable: null,
timeStamp: function timeStamp(event) {
return event.timeStamp || Date.now();
},
defaultPrevented: null,
isTrusted: null
};
SyntheticEvent.extend = function (Interface) {
function E() {}
function Class() {
return Super.apply(this, arguments);
}
var Super = this;
E.prototype = Super.prototype;
var prototype = new E();
_extends(prototype, Class.prototype);
Class.prototype = prototype;
Class.prototype.constructor = Class;
Class.Interface = _extends({}, Super.Interface, Interface);
Class.extend = Super.extend;
addEventPoolingTo(Class);
return Class;
};
addEventPoolingTo(SyntheticEvent);
function getPooledEvent(dispatchConfig, targetInst, nativeEvent, nativeInst) {
if (this.eventPool.length) {
var instance = this.eventPool.pop();
this.call(instance, dispatchConfig, targetInst, nativeEvent, nativeInst);
return instance;
}
return new this(dispatchConfig, targetInst, nativeEvent, nativeInst);
}
function releasePooledEvent(event) {
if (!(event instanceof this)) throw ReactError(Error("Trying to release an event instance into a pool of a different type."));
event.destructor();
10 > this.eventPool.length && this.eventPool.push(event);
}
function addEventPoolingTo(EventConstructor) {
EventConstructor.eventPool = [];
EventConstructor.getPooled = getPooledEvent;
EventConstructor.release = releasePooledEvent;
}
var ResponderSyntheticEvent = SyntheticEvent.extend({
touchHistory: function touchHistory() {
return null;
}
});
function isStartish(topLevelType) {
return "topTouchStart" === topLevelType;
}
function isMoveish(topLevelType) {
return "topTouchMove" === topLevelType;
}
var startDependencies = ["topTouchStart"],
moveDependencies = ["topTouchMove"],
endDependencies = ["topTouchCancel", "topTouchEnd"],
touchBank = [],
touchHistory = {
touchBank: touchBank,
numberActiveTouches: 0,
indexOfSingleActiveTouch: -1,
mostRecentTimeStamp: 0
};
function timestampForTouch(touch) {
return touch.timeStamp || touch.timestamp;
}
function getTouchIdentifier(_ref) {
_ref = _ref.identifier;
if (null == _ref) throw ReactError(Error("Touch object is missing identifier."));
return _ref;
}
function recordTouchStart(touch) {
var identifier = getTouchIdentifier(touch),
touchRecord = touchBank[identifier];
touchRecord ? (touchRecord.touchActive = true, touchRecord.startPageX = touch.pageX, touchRecord.startPageY = touch.pageY, touchRecord.startTimeStamp = timestampForTouch(touch), touchRecord.currentPageX = touch.pageX, touchRecord.currentPageY = touch.pageY, touchRecord.currentTimeStamp = timestampForTouch(touch), touchRecord.previousPageX = touch.pageX, touchRecord.previousPageY = touch.pageY, touchRecord.previousTimeStamp = timestampForTouch(touch)) : (touchRecord = {
touchActive: true,
startPageX: touch.pageX,
startPageY: touch.pageY,
startTimeStamp: timestampForTouch(touch),
currentPageX: touch.pageX,
currentPageY: touch.pageY,
currentTimeStamp: timestampForTouch(touch),
previousPageX: touch.pageX,
previousPageY: touch.pageY,
previousTimeStamp: timestampForTouch(touch)
}, touchBank[identifier] = touchRecord);
touchHistory.mostRecentTimeStamp = timestampForTouch(touch);
}
function recordTouchMove(touch) {
var touchRecord = touchBank[getTouchIdentifier(touch)];
touchRecord ? (touchRecord.touchActive = true, touchRecord.previousPageX = touchRecord.currentPageX, touchRecord.previousPageY = touchRecord.currentPageY, touchRecord.previousTimeStamp = touchRecord.currentTimeStamp, touchRecord.currentPageX = touch.pageX, touchRecord.currentPageY = touch.pageY, touchRecord.currentTimeStamp = timestampForTouch(touch), touchHistory.mostRecentTimeStamp = timestampForTouch(touch)) : undefined;
}
function recordTouchEnd(touch) {
var touchRecord = touchBank[getTouchIdentifier(touch)];
touchRecord ? (touchRecord.touchActive = false, touchRecord.previousPageX = touchRecord.currentPageX, touchRecord.previousPageY = touchRecord.currentPageY, touchRecord.previousTimeStamp = touchRecord.currentTimeStamp, touchRecord.currentPageX = touch.pageX, touchRecord.currentPageY = touch.pageY, touchRecord.currentTimeStamp = timestampForTouch(touch), touchHistory.mostRecentTimeStamp = timestampForTouch(touch)) : undefined;
}
var ResponderTouchHistoryStore = {
recordTouchTrack: function recordTouchTrack(topLevelType, nativeEvent) {
if (isMoveish(topLevelType)) nativeEvent.changedTouches.forEach(recordTouchMove);else if (isStartish(topLevelType)) nativeEvent.changedTouches.forEach(recordTouchStart), touchHistory.numberActiveTouches = nativeEvent.touches.length, 1 === touchHistory.numberActiveTouches && (touchHistory.indexOfSingleActiveTouch = nativeEvent.touches[0].identifier);else if ("topTouchEnd" === topLevelType || "topTouchCancel" === topLevelType) if (nativeEvent.changedTouches.forEach(recordTouchEnd), touchHistory.numberActiveTouches = nativeEvent.touches.length, 1 === touchHistory.numberActiveTouches) for (topLevelType = 0; topLevelType < touchBank.length; topLevelType++) {
if (nativeEvent = touchBank[topLevelType], null != nativeEvent && nativeEvent.touchActive) {
touchHistory.indexOfSingleActiveTouch = topLevelType;
break;
}
}
},
touchHistory: touchHistory
};
function accumulate(current, next) {
if (null == next) throw ReactError(Error("accumulate(...): Accumulated items must not be null or undefined."));
return null == current ? next : Array.isArray(current) ? current.concat(next) : Array.isArray(next) ? [current].concat(next) : [current, next];
}
var responderInst = null,
trackedTouchCount = 0;
function changeResponder(nextResponderInst, blockHostResponder) {
var oldResponderInst = responderInst;
responderInst = nextResponderInst;
if (null !== ResponderEventPlugin.GlobalResponderHandler) ResponderEventPlugin.GlobalResponderHandler.onChange(oldResponderInst, nextResponderInst, blockHostResponder);
}
var eventTypes = {
startShouldSetResponder: {
phasedRegistrationNames: {
bubbled: "onStartShouldSetResponder",
captured: "onStartShouldSetResponderCapture"
},
dependencies: startDependencies
},
scrollShouldSetResponder: {
phasedRegistrationNames: {
bubbled: "onScrollShouldSetResponder",
captured: "onScrollShouldSetResponderCapture"
},
dependencies: ["topScroll"]
},
selectionChangeShouldSetResponder: {
phasedRegistrationNames: {
bubbled: "onSelectionChangeShouldSetResponder",
captured: "onSelectionChangeShouldSetResponderCapture"
},
dependencies: ["topSelectionChange"]
},
moveShouldSetResponder: {
phasedRegistrationNames: {
bubbled: "onMoveShouldSetResponder",
captured: "onMoveShouldSetResponderCapture"
},
dependencies: moveDependencies
},
responderStart: {
registrationName: "onResponderStart",
dependencies: startDependencies
},
responderMove: {
registrationName: "onResponderMove",
dependencies: moveDependencies
},
responderEnd: {
registrationName: "onResponderEnd",
dependencies: endDependencies
},
responderRelease: {
registrationName: "onResponderRelease",
dependencies: endDependencies
},
responderTerminationRequest: {
registrationName: "onResponderTerminationRequest",
dependencies: []
},
responderGrant: {
registrationName: "onResponderGrant",
dependencies: []
},
responderReject: {
registrationName: "onResponderReject",
dependencies: []
},
responderTerminate: {
registrationName: "onResponderTerminate",
dependencies: []
}
},
ResponderEventPlugin = {
_getResponder: function _getResponder() {
return responderInst;
},
eventTypes: eventTypes,
extractEvents: function extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget) {
if (isStartish(topLevelType)) trackedTouchCount += 1;else if ("topTouchEnd" === topLevelType || "topTouchCancel" === topLevelType) if (0 <= trackedTouchCount) --trackedTouchCount;else return undefined, null;
ResponderTouchHistoryStore.recordTouchTrack(topLevelType, nativeEvent);
if (targetInst && ("topScroll" === topLevelType && !nativeEvent.responderIgnoreScroll || 0 < trackedTouchCount && "topSelectionChange" === topLevelType || isStartish(topLevelType) || isMoveish(topLevelType))) {
var JSCompiler_temp = isStartish(topLevelType) ? eventTypes.startShouldSetResponder : isMoveish(topLevelType) ? eventTypes.moveShouldSetResponder : "topSelectionChange" === topLevelType ? eventTypes.selectionChangeShouldSetResponder : eventTypes.scrollShouldSetResponder;
if (responderInst) b: {
var JSCompiler_temp$jscomp$0 = responderInst;
for (var depthA = 0, tempA = JSCompiler_temp$jscomp$0; tempA; tempA = getParent(tempA)) {
depthA++;
}
tempA = 0;
for (var tempB = targetInst; tempB; tempB = getParent(tempB)) {
tempA++;
}
for (; 0 < depthA - tempA;) {
JSCompiler_temp$jscomp$0 = getParent(JSCompiler_temp$jscomp$0), depthA--;
}
for (; 0 < tempA - depthA;) {
targetInst = getParent(targetInst), tempA--;
}
for (; depthA--;) {
if (JSCompiler_temp$jscomp$0 === targetInst || JSCompiler_temp$jscomp$0 === targetInst.alternate) break b;
JSCompiler_temp$jscomp$0 = getParent(JSCompiler_temp$jscomp$0);
targetInst = getParent(targetInst);
}
JSCompiler_temp$jscomp$0 = null;
} else JSCompiler_temp$jscomp$0 = targetInst;
targetInst = JSCompiler_temp$jscomp$0 === responderInst;
JSCompiler_temp$jscomp$0 = ResponderSyntheticEvent.getPooled(JSCompiler_temp, JSCompiler_temp$jscomp$0, nativeEvent, nativeEventTarget);
JSCompiler_temp$jscomp$0.touchHistory = ResponderTouchHistoryStore.touchHistory;
targetInst ? forEachAccumulated(JSCompiler_temp$jscomp$0, accumulateTwoPhaseDispatchesSingleSkipTarget) : forEachAccumulated(JSCompiler_temp$jscomp$0, accumulateTwoPhaseDispatchesSingle);
b: {
JSCompiler_temp = JSCompiler_temp$jscomp$0._dispatchListeners;
targetInst = JSCompiler_temp$jscomp$0._dispatchInstances;
if (Array.isArray(JSCompiler_temp)) for (depthA = 0; depthA < JSCompiler_temp.length && !JSCompiler_temp$jscomp$0.isPropagationStopped(); depthA++) {
if (JSCompiler_temp[depthA](JSCompiler_temp$jscomp$0, targetInst[depthA])) {
JSCompiler_temp = targetInst[depthA];
break b;
}
} else if (JSCompiler_temp && JSCompiler_temp(JSCompiler_temp$jscomp$0, targetInst)) {
JSCompiler_temp = targetInst;
break b;
}
JSCompiler_temp = null;
}
JSCompiler_temp$jscomp$0._dispatchInstances = null;
JSCompiler_temp$jscomp$0._dispatchListeners = null;
JSCompiler_temp$jscomp$0.isPersistent() || JSCompiler_temp$jscomp$0.constructor.release(JSCompiler_temp$jscomp$0);
JSCompiler_temp && JSCompiler_temp !== responderInst ? (JSCompiler_temp$jscomp$0 = undefined, targetInst = ResponderSyntheticEvent.getPooled(eventTypes.responderGrant, JSCompiler_temp, nativeEvent, nativeEventTarget), targetInst.touchHistory = ResponderTouchHistoryStore.touchHistory, forEachAccumulated(targetInst, accumulateDirectDispatchesSingle), depthA = true === executeDirectDispatch(targetInst), responderInst ? (tempA = ResponderSyntheticEvent.getPooled(eventTypes.responderTerminationRequest, responderInst, nativeEvent, nativeEventTarget), tempA.touchHistory = ResponderTouchHistoryStore.touchHistory, forEachAccumulated(tempA, accumulateDirectDispatchesSingle), tempB = !tempA._dispatchListeners || executeDirectDispatch(tempA), tempA.isPersistent() || tempA.constructor.release(tempA), tempB ? (tempA = ResponderSyntheticEvent.getPooled(eventTypes.responderTerminate, responderInst, nativeEvent, nativeEventTarget), tempA.touchHistory = ResponderTouchHistoryStore.touchHistory, forEachAccumulated(tempA, accumulateDirectDispatchesSingle), JSCompiler_temp$jscomp$0 = accumulate(JSCompiler_temp$jscomp$0, [targetInst, tempA]), changeResponder(JSCompiler_temp, depthA)) : (JSCompiler_temp = ResponderSyntheticEvent.getPooled(eventTypes.responderReject, JSCompiler_temp, nativeEvent, nativeEventTarget), JSCompiler_temp.touchHistory = ResponderTouchHistoryStore.touchHistory, forEachAccumulated(JSCompiler_temp, accumulateDirectDispatchesSingle), JSCompiler_temp$jscomp$0 = accumulate(JSCompiler_temp$jscomp$0, JSCompiler_temp))) : (JSCompiler_temp$jscomp$0 = accumulate(JSCompiler_temp$jscomp$0, targetInst), changeResponder(JSCompiler_temp, depthA)), JSCompiler_temp = JSCompiler_temp$jscomp$0) : JSCompiler_temp = null;
} else JSCompiler_temp = null;
JSCompiler_temp$jscomp$0 = responderInst && isStartish(topLevelType);
targetInst = responderInst && isMoveish(topLevelType);
depthA = responderInst && ("topTouchEnd" === topLevelType || "topTouchCancel" === topLevelType);
if (JSCompiler_temp$jscomp$0 = JSCompiler_temp$jscomp$0 ? eventTypes.responderStart : targetInst ? eventTypes.responderMove : depthA ? eventTypes.responderEnd : null) JSCompiler_temp$jscomp$0 = ResponderSyntheticEvent.getPooled(JSCompiler_temp$jscomp$0, responderInst, nativeEvent, nativeEventTarget), JSCompiler_temp$jscomp$0.touchHistory = ResponderTouchHistoryStore.touchHistory, forEachAccumulated(JSCompiler_temp$jscomp$0, accumulateDirectDispatchesSingle), JSCompiler_temp = accumulate(JSCompiler_temp, JSCompiler_temp$jscomp$0);
JSCompiler_temp$jscomp$0 = responderInst && "topTouchCancel" === topLevelType;
if (topLevelType = responderInst && !JSCompiler_temp$jscomp$0 && ("topTouchEnd" === topLevelType || "topTouchCancel" === topLevelType)) a: {
if ((topLevelType = nativeEvent.touches) && 0 !== topLevelType.length) for (targetInst = 0; targetInst < topLevelType.length; targetInst++) {
if (depthA = topLevelType[targetInst].target, null !== depthA && undefined !== depthA && 0 !== depthA) {
tempA = getInstanceFromNode(depthA);
b: {
for (depthA = responderInst; tempA;) {
if (depthA === tempA || depthA === tempA.alternate) {
depthA = true;
break b;
}
tempA = getParent(tempA);
}
depthA = false;
}
if (depthA) {
topLevelType = false;
break a;
}
}
}
topLevelType = true;
}
if (topLevelType = JSCompiler_temp$jscomp$0 ? eventTypes.responderTerminate : topLevelType ? eventTypes.responderRelease : null) nativeEvent = ResponderSyntheticEvent.getPooled(topLevelType, responderInst, nativeEvent, nativeEventTarget), nativeEvent.touchHistory = ResponderTouchHistoryStore.touchHistory, forEachAccumulated(nativeEvent, accumulateDirectDispatchesSingle), JSCompiler_temp = accumulate(JSCompiler_temp, nativeEvent), changeResponder(null);
return JSCompiler_temp;
},
GlobalResponderHandler: null,
injection: {
injectGlobalResponderHandler: function injectGlobalResponderHandler(GlobalResponderHandler) {
ResponderEventPlugin.GlobalResponderHandler = GlobalResponderHandler;
}
}
},
customBubblingEventTypes = ReactNativePrivateInterface.ReactNativeViewConfigRegistry.customBubblingEventTypes,
customDirectEventTypes = ReactNativePrivateInterface.ReactNativeViewConfigRegistry.customDirectEventTypes;
injection.injectEventPluginOrder(["ResponderEventPlugin", "ReactNativeBridgeEventPlugin"]);
injection.injectEventPluginsByName({
ResponderEventPlugin: ResponderEventPlugin,
ReactNativeBridgeEventPlugin: {
eventTypes: {},
extractEvents: function extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget) {
if (null == targetInst) return null;
var bubbleDispatchConfig = customBubblingEventTypes[topLevelType],
directDispatchConfig = customDirectEventTypes[topLevelType];
if (!bubbleDispatchConfig && !directDispatchConfig) throw ReactError(Error('Unsupported top level event type "' + topLevelType + '" dispatched'));
topLevelType = SyntheticEvent.getPooled(bubbleDispatchConfig || directDispatchConfig, targetInst, nativeEvent, nativeEventTarget);
if (bubbleDispatchConfig) forEachAccumulated(topLevelType, accumulateTwoPhaseDispatchesSingle);else if (directDispatchConfig) forEachAccumulated(topLevelType, accumulateDirectDispatchesSingle);else return null;
return topLevelType;
}
}
});
var instanceCache = new Map(),
instanceProps = new Map();
function getInstanceFromTag(tag) {
return instanceCache.get(tag) || null;
}
var restoreTarget = null,
restoreQueue = null;
function restoreStateOfTarget(target) {
if (getInstanceFromNode(target)) throw ReactError(Error("setRestoreImplementation() needs to be called to handle a target for controlled events. This error is likely caused by a bug in React. Please file an issue."));
}
function batchedUpdatesImpl(fn, bookkeeping) {
return fn(bookkeeping);
}
function flushDiscreteUpdatesImpl() {}
var isInsideEventHandler = false;
function batchedUpdates(fn, bookkeeping) {
if (isInsideEventHandler) return fn(bookkeeping);
isInsideEventHandler = true;
try {
return batchedUpdatesImpl(fn, bookkeeping);
} finally {
if (isInsideEventHandler = false, null !== restoreTarget || null !== restoreQueue) if (flushDiscreteUpdatesImpl(), restoreTarget && (bookkeeping = restoreTarget, fn = restoreQueue, restoreQueue = restoreTarget = null, restoreStateOfTarget(bookkeeping), fn)) for (bookkeeping = 0; bookkeeping < fn.length; bookkeeping++) {
restoreStateOfTarget(fn[bookkeeping]);
}
}
}
var EMPTY_NATIVE_EVENT = {};
function _receiveRootNodeIDEvent(rootNodeID, topLevelType, nativeEventParam) {
var nativeEvent = nativeEventParam || EMPTY_NATIVE_EVENT,
inst = getInstanceFromTag(rootNodeID);
batchedUpdates(function () {
var events = nativeEvent.target;
for (var events$jscomp$0 = null, i = 0; i < plugins.length; i++) {
var possiblePlugin = plugins[i];
possiblePlugin && (possiblePlugin = possiblePlugin.extractEvents(topLevelType, inst, nativeEvent, events)) && (events$jscomp$0 = accumulateInto(events$jscomp$0, possiblePlugin));
}
events = events$jscomp$0;
null !== events && (eventQueue = accumulateInto(eventQueue, events));
events = eventQueue;
eventQueue = null;
if (events) {
forEachAccumulated(events, executeDispatchesAndReleaseTopLevel);
if (eventQueue) throw ReactError(Error("processEventQueue(): Additional events were enqueued while processing an event queue. Support for this has not yet been implemented."));
if (hasRethrowError) throw events = rethrowError, hasRethrowError = false, rethrowError = null, events;
}
});
}
ReactNativePrivateInterface.RCTEventEmitter.register({
receiveEvent: function receiveEvent(rootNodeID, topLevelType, nativeEventParam) {
_receiveRootNodeIDEvent(rootNodeID, topLevelType, nativeEventParam);
},
receiveTouches: function receiveTouches(eventTopLevelType, touches, changedIndices) {
if ("topTouchEnd" === eventTopLevelType || "topTouchCancel" === eventTopLevelType) {
var JSCompiler_temp = [];
for (var i = 0; i < changedIndices.length; i++) {
var index = changedIndices[i];
JSCompiler_temp.push(touches[index]);
touches[index] = null;
}
for (i = changedIndices = 0; i < touches.length; i++) {
index = touches[i], null !== index && (touches[changedIndices++] = index);
}
touches.length = changedIndices;
} else for (JSCompiler_temp = [], i = 0; i < changedIndices.length; i++) {
JSCompiler_temp.push(touches[changedIndices[i]]);
}
for (changedIndices = 0; changedIndices < JSCompiler_temp.length; changedIndices++) {
i = JSCompiler_temp[changedIndices];
i.changedTouches = JSCompiler_temp;
i.touches = touches;
index = null;
var target = i.target;
null === target || undefined === target || 1 > target || (index = target);
_receiveRootNodeIDEvent(index, eventTopLevelType, i);
}
}
});
getFiberCurrentPropsFromNode = function getFiberCurrentPropsFromNode(stateNode) {
return instanceProps.get(stateNode._nativeTag) || null;
};
getInstanceFromNode = getInstanceFromTag;
getNodeFromInstance = function getNodeFromInstance(inst) {
var tag = inst.stateNode._nativeTag;
undefined === tag && (tag = inst.stateNode.canonical._nativeTag);
if (!tag) throw ReactError(Error("All native instances should have a tag."));
return tag;
};
ResponderEventPlugin.injection.injectGlobalResponderHandler({
onChange: function onChange(from, to, blockNativeResponder) {
null !== to ? ReactNativePrivateInterface.UIManager.setJSResponder(to.stateNode._nativeTag, blockNativeResponder) : ReactNativePrivateInterface.UIManager.clearJSResponder();
}
});
var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
ReactSharedInternals.hasOwnProperty("ReactCurrentDispatcher") || (ReactSharedInternals.ReactCurrentDispatcher = {
current: null
});
ReactSharedInternals.hasOwnProperty("ReactCurrentBatchConfig") || (ReactSharedInternals.ReactCurrentBatchConfig = {
suspense: null
});
var hasSymbol = "function" === typeof Symbol && (typeof Symbol === "function" ? Symbol.for : "@@for"),
REACT_ELEMENT_TYPE = hasSymbol ? (typeof Symbol === "function" ? Symbol.for : "@@for")("react.element") : 60103,
REACT_PORTAL_TYPE = hasSymbol ? (typeof Symbol === "function" ? Symbol.for : "@@for")("react.portal") : 60106,
REACT_FRAGMENT_TYPE = hasSymbol ? (typeof Symbol === "function" ? Symbol.for : "@@for")("react.fragment") : 60107,
REACT_STRICT_MODE_TYPE = hasSymbol ? (typeof Symbol === "function" ? Symbol.for : "@@for")("react.strict_mode") : 60108,
REACT_PROFILER_TYPE = hasSymbol ? (typeof Symbol === "function" ? Symbol.for : "@@for")("react.profiler") : 60114,
REACT_PROVIDER_TYPE = hasSymbol ? (typeof Symbol === "function" ? Symbol.for : "@@for")("react.provider") : 60109,
REACT_CONTEXT_TYPE = hasSymbol ? (typeof Symbol === "function" ? Symbol.for : "@@for")("react.context") : 60110,
REACT_CONCURRENT_MODE_TYPE = hasSymbol ? (typeof Symbol === "function" ? Symbol.for : "@@for")("react.concurrent_mode") : 60111,
REACT_FORWARD_REF_TYPE = hasSymbol ? (typeof Symbol === "function" ? Symbol.for : "@@for")("react.forward_ref") : 60112,
REACT_SUSPENSE_TYPE = hasSymbol ? (typeof Symbol === "function" ? Symbol.for : "@@for")("react.suspense") : 60113,
REACT_SUSPENSE_LIST_TYPE = hasSymbol ? (typeof Symbol === "function" ? Symbol.for : "@@for")("react.suspense_list") : 60120,
REACT_MEMO_TYPE = hasSymbol ? (typeof Symbol === "function" ? Symbol.for : "@@for")("react.memo") : 60115,
REACT_LAZY_TYPE = hasSymbol ? (typeof Symbol === "function" ? Symbol.for : "@@for")("react.lazy") : 60116;
hasSymbol && (typeof Symbol === "function" ? Symbol.for : "@@for")("react.fundamental");
hasSymbol && (typeof Symbol === "function" ? Symbol.for : "@@for")("react.responder");
var MAYBE_ITERATOR_SYMBOL = "function" === typeof Symbol && (typeof Symbol === "function" ? Symbol.iterator : "@@iterator");
function getIteratorFn(maybeIterable) {
if (null === maybeIterable || "object" !== typeof maybeIterable) return null;
maybeIterable = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable["@@iterator"];
return "function" === typeof maybeIterable ? maybeIterable : null;
}
function getComponentName(type) {
if (null == type) return null;
if ("function" === typeof type) return type.displayName || type.name || null;
if ("string" === typeof type) return type;
switch (type) {
case REACT_FRAGMENT_TYPE:
return "Fragment";
case REACT_PORTAL_TYPE:
return "Portal";
case REACT_PROFILER_TYPE:
return "Profiler";
case REACT_STRICT_MODE_TYPE:
return "StrictMode";
case REACT_SUSPENSE_TYPE:
return "Suspense";
case REACT_SUSPENSE_LIST_TYPE:
return "SuspenseList";
}
if ("object" === typeof type) switch (type.$$typeof) {
case REACT_CONTEXT_TYPE:
return "Context.Consumer";
case REACT_PROVIDER_TYPE:
return "Context.Provider";
case REACT_FORWARD_REF_TYPE:
var innerType = type.render;
innerType = innerType.displayName || innerType.name || "";
return type.displayName || ("" !== innerType ? "ForwardRef(" + innerType + ")" : "ForwardRef");
case REACT_MEMO_TYPE:
return getComponentName(type.type);
case REACT_LAZY_TYPE:
if (type = 1 === type._status ? type._result : null) return getComponentName(type);
}
return null;
}
function isFiberMountedImpl(fiber) {
var node = fiber;
if (fiber.alternate) for (; node.return;) {
node = node.return;
} else {
if (0 !== (node.effectTag & 2)) return 1;
for (; node.return;) {
if (node = node.return, 0 !== (node.effectTag & 2)) return 1;
}
}
return 3 === node.tag ? 2 : 3;
}
function assertIsMounted(fiber) {
if (2 !== isFiberMountedImpl(fiber)) throw ReactError(Error("Unable to find node on an unmounted component."));
}
function findCurrentFiberUsingSlowPath(fiber) {
var alternate = fiber.alternate;
if (!alternate) {
alternate = isFiberMountedImpl(fiber);
if (3 === alternate) throw ReactError(Error("Unable to find node on an unmounted component."));
return 1 === alternate ? null : fiber;
}
for (var a = fiber, b = alternate;;) {
var parentA = a.return;
if (null === parentA) break;
var parentB = parentA.alternate;
if (null === parentB) {
b = parentA.return;
if (null !== b) {
a = b;
continue;
}
break;
}
if (parentA.child === parentB.child) {
for (parentB = parentA.child; parentB;) {
if (parentB === a) return assertIsMounted(parentA), fiber;
if (parentB === b) return assertIsMounted(parentA), alternate;
parentB = parentB.sibling;
}
throw ReactError(Error("Unable to find node on an unmounted component."));
}
if (a.return !== b.return) a = parentA, b = parentB;else {
for (var didFindChild = false, _child = parentA.child; _child;) {
if (_child === a) {
didFindChild = true;
a = parentA;
b = parentB;
break;
}
if (_child === b) {
didFindChild = true;
b = parentA;
a = parentB;
break;
}
_child = _child.sibling;
}
if (!didFindChild) {
for (_child = parentB.child; _child;) {
if (_child === a) {
didFindChild = true;
a = parentB;
b = parentA;
break;
}
if (_child === b) {
didFindChild = true;
b = parentB;
a = parentA;
break;
}
_child = _child.sibling;
}
if (!didFindChild) throw ReactError(Error("Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue."));
}
}
if (a.alternate !== b) throw ReactError(Error("Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue."));
}
if (3 !== a.tag) throw ReactError(Error("Unable to find node on an unmounted component."));
return a.stateNode.current === a ? fiber : alternate;
}
function findCurrentHostFiber(parent) {
parent = findCurrentFiberUsingSlowPath(parent);
if (!parent) return null;
for (var node = parent;;) {
if (5 === node.tag || 6 === node.tag) return node;
if (node.child) node.child.return = node, node = node.child;else {
if (node === parent) break;
for (; !node.sibling;) {
if (!node.return || node.return === parent) return null;
node = node.return;
}
node.sibling.return = node.return;
node = node.sibling;
}
}
return null;
}
var emptyObject = {},
removedKeys = null,
removedKeyCount = 0;
function restoreDeletedValuesInNestedArray(updatePayload, node, validAttributes) {
if (Array.isArray(node)) for (var i = node.length; i-- && 0 < removedKeyCount;) {
restoreDeletedValuesInNestedArray(updatePayload, node[i], validAttributes);
} else if (node && 0 < removedKeyCount) for (i in removedKeys) {
if (removedKeys[i]) {
var nextProp = node[i];
if (undefined !== nextProp) {
var attributeConfig = validAttributes[i];
if (attributeConfig) {
"function" === typeof nextProp && (nextProp = true);
"undefined" === typeof nextProp && (nextProp = null);
if ("object" !== typeof attributeConfig) updatePayload[i] = nextProp;else if ("function" === typeof attributeConfig.diff || "function" === typeof attributeConfig.process) nextProp = "function" === typeof attributeConfig.process ? attributeConfig.process(nextProp) : nextProp, updatePayload[i] = nextProp;
removedKeys[i] = false;
removedKeyCount--;
}
}
}
}
}
function diffNestedProperty(updatePayload, prevProp, nextProp, validAttributes) {
if (!updatePayload && prevProp === nextProp) return updatePayload;
if (!prevProp || !nextProp) return nextProp ? addNestedProperty(updatePayload, nextProp, validAttributes) : prevProp ? clearNestedProperty(updatePayload, prevProp, validAttributes) : updatePayload;
if (!Array.isArray(prevProp) && !Array.isArray(nextProp)) return diffProperties(updatePayload, prevProp, nextProp, validAttributes);
if (Array.isArray(prevProp) && Array.isArray(nextProp)) {
var minLength = prevProp.length < nextProp.length ? prevProp.length : nextProp.length,
i;
for (i = 0; i < minLength; i++) {
updatePayload = diffNestedProperty(updatePayload, prevProp[i], nextProp[i], validAttributes);
}
for (; i < prevProp.length; i++) {
updatePayload = clearNestedProperty(updatePayload, prevProp[i], validAttributes);
}
for (; i < nextProp.length; i++) {
updatePayload = addNestedProperty(updatePayload, nextProp[i], validAttributes);
}
return updatePayload;
}
return Array.isArray(prevProp) ? diffProperties(updatePayload, ReactNativePrivateInterface.flattenStyle(prevProp), nextProp, validAttributes) : diffProperties(updatePayload, prevProp, ReactNativePrivateInterface.flattenStyle(nextProp), validAttributes);
}
function addNestedProperty(updatePayload, nextProp, validAttributes) {
if (!nextProp) return updatePayload;
if (!Array.isArray(nextProp)) return diffProperties(updatePayload, emptyObject, nextProp, validAttributes);
for (var i = 0; i < nextProp.length; i++) {
updatePayload = addNestedProperty(updatePayload, nextProp[i], validAttributes);
}
return updatePayload;
}
function clearNestedProperty(updatePayload, prevProp, validAttributes) {
if (!prevProp) return updatePayload;
if (!Array.isArray(prevProp)) return diffProperties(updatePayload, prevProp, emptyObject, validAttributes);
for (var i = 0; i < prevProp.length; i++) {
updatePayload = clearNestedProperty(updatePayload, prevProp[i], validAttributes);
}
return updatePayload;
}
function diffProperties(updatePayload, prevProps, nextProps, validAttributes) {
var attributeConfig, propKey;
for (propKey in nextProps) {
if (attributeConfig = validAttributes[propKey]) {
var prevProp = prevProps[propKey];
var nextProp = nextProps[propKey];
"function" === typeof nextProp && (nextProp = true, "function" === typeof prevProp && (prevProp = true));
"undefined" === typeof nextProp && (nextProp = null, "undefined" === typeof prevProp && (prevProp = null));
removedKeys && (removedKeys[propKey] = false);
if (updatePayload && undefined !== updatePayload[propKey]) {
if ("object" !== typeof attributeConfig) updatePayload[propKey] = nextProp;else {
if ("function" === typeof attributeConfig.diff || "function" === typeof attributeConfig.process) attributeConfig = "function" === typeof attributeConfig.process ? attributeConfig.process(nextProp) : nextProp, updatePayload[propKey] = attributeConfig;
}
} else if (prevProp !== nextProp) if ("object" !== typeof attributeConfig) ("object" !== typeof nextProp || null === nextProp || ReactNativePrivateInterface.deepDiffer(prevProp, nextProp)) && ((updatePayload || (updatePayload = {}))[propKey] = nextProp);else if ("function" === typeof attributeConfig.diff || "function" === typeof attributeConfig.process) {
if (undefined === prevProp || ("function" === typeof attributeConfig.diff ? attributeConfig.diff(prevProp, nextProp) : "object" !== typeof nextProp || null === nextProp || ReactNativePrivateInterface.deepDiffer(prevProp, nextProp))) attributeConfig = "function" === typeof attributeConfig.process ? attributeConfig.process(nextProp) : nextProp, (updatePayload || (updatePayload = {}))[propKey] = attributeConfig;
} else removedKeys = null, removedKeyCount = 0, updatePayload = diffNestedProperty(updatePayload, prevProp, nextProp, attributeConfig), 0 < removedKeyCount && updatePayload && (restoreDeletedValuesInNestedArray(updatePayload, nextProp, attributeConfig), removedKeys = null);
}
}
for (var _propKey in prevProps) {
undefined === nextProps[_propKey] && (!(attributeConfig = validAttributes[_propKey]) || updatePayload && undefined !== updatePayload[_propKey] || (prevProp = prevProps[_propKey], undefined !== prevProp && ("object" !== typeof attributeConfig || "function" === typeof attributeConfig.diff || "function" === typeof attributeConfig.process ? ((updatePayload || (updatePayload = {}))[_propKey] = null, removedKeys || (removedKeys = {}), removedKeys[_propKey] || (removedKeys[_propKey] = true, removedKeyCount++)) : updatePayload = clearNestedProperty(updatePayload, prevProp, attributeConfig))));
}
return updatePayload;
}
function mountSafeCallback_NOT_REALLY_SAFE(context, callback) {
return function () {
if (callback && ("boolean" !== typeof context.__isMounted || context.__isMounted)) return callback.apply(context, arguments);
};
}
var ReactNativeFiberHostComponent = function () {
function ReactNativeFiberHostComponent(tag, viewConfig) {
if (!(this instanceof ReactNativeFiberHostComponent)) throw new TypeError("Cannot call a class as a function");
this._nativeTag = tag;
this._children = [];
this.viewConfig = viewConfig;
}
ReactNativeFiberHostComponent.prototype.blur = function () {
ReactNativePrivateInterface.TextInputState.blurTextInput(this._nativeTag);
};
ReactNativeFiberHostComponent.prototype.focus = function () {
ReactNativePrivateInterface.TextInputState.focusTextInput(this._nativeTag);
};
ReactNativeFiberHostComponent.prototype.measure = function (callback) {
ReactNativePrivateInterface.UIManager.measure(this._nativeTag, mountSafeCallback_NOT_REALLY_SAFE(this, callback));
};
ReactNativeFiberHostComponent.prototype.measureInWindow = function (callback) {
ReactNativePrivateInterface.UIManager.measureInWindow(this._nativeTag, mountSafeCallback_NOT_REALLY_SAFE(this, callback));
};
ReactNativeFiberHostComponent.prototype.measureLayout = function (relativeToNativeNode, onSuccess, onFail) {
var relativeNode = undefined;
"number" === typeof relativeToNativeNode ? relativeNode = relativeToNativeNode : relativeToNativeNode._nativeTag ? relativeNode = relativeToNativeNode._nativeTag : relativeToNativeNode.canonical && relativeToNativeNode.canonical._nativeTag && (relativeNode = relativeToNativeNode.canonical._nativeTag);
null != relativeNode && ReactNativePrivateInterface.UIManager.measureLayout(this._nativeTag, relativeNode, mountSafeCallback_NOT_REALLY_SAFE(this, onFail), mountSafeCallback_NOT_REALLY_SAFE(this, onSuccess));
};
ReactNativeFiberHostComponent.prototype.setNativeProps = function (nativeProps) {
nativeProps = diffProperties(null, emptyObject, nativeProps, this.viewConfig.validAttributes);
null != nativeProps && ReactNativePrivateInterface.UIManager.updateView(this._nativeTag, this.viewConfig.uiViewClassName, nativeProps);
};
return ReactNativeFiberHostComponent;
}();
function shim$1() {
throw ReactError(Error("The current renderer does not support hydration. This error is likely caused by a bug in React. Please file an issue."));
}
var getViewConfigForType = ReactNativePrivateInterface.ReactNativeViewConfigRegistry.get,
UPDATE_SIGNAL = {},
nextReactTag = 3;
function allocateTag() {
var tag = nextReactTag;
1 === tag % 10 && (tag += 2);
nextReactTag = tag + 2;
return tag;
}
function recursivelyUncacheFiberNode(node) {
if ("number" === typeof node) instanceCache.delete(node), instanceProps.delete(node);else {
var tag = node._nativeTag;
instanceCache.delete(tag);
instanceProps.delete(tag);
node._children.forEach(recursivelyUncacheFiberNode);
}
}
function finalizeInitialChildren(parentInstance) {
if (0 === parentInstance._children.length) return false;
var nativeTags = parentInstance._children.map(function (child) {
return "number" === typeof child ? child : child._nativeTag;
});
ReactNativePrivateInterface.UIManager.setChildren(parentInstance._nativeTag, nativeTags);
return false;
}
var scheduleTimeout = setTimeout,
cancelTimeout = clearTimeout,
BEFORE_SLASH_RE = /^(.*)[\\\/]/;
function getStackByFiberInDevAndProd(workInProgress) {
var info = "";
do {
a: switch (workInProgress.tag) {
case 3:
case 4:
case 6:
case 7:
case 10:
case 9:
var JSCompiler_inline_result = "";
break a;
default:
var owner = workInProgress._debugOwner,
source = workInProgress._debugSource,
name = getComponentName(workInProgress.type);
JSCompiler_inline_result = null;
owner && (JSCompiler_inline_result = getComponentName(owner.type));
owner = name;
name = "";
source ? name = " (at " + source.fileName.replace(BEFORE_SLASH_RE, "") + ":" + source.lineNumber + ")" : JSCompiler_inline_result && (name = " (created by " + JSCompiler_inline_result + ")");
JSCompiler_inline_result = "\n in " + (owner || "Unknown") + name;
}
info += JSCompiler_inline_result;
workInProgress = workInProgress.return;
} while (workInProgress);
return info;
}
new Set();
var valueStack = [],
index = -1;
function pop(cursor) {
0 > index || (cursor.current = valueStack[index], valueStack[index] = null, index--);
}
function push(cursor, value) {
index++;
valueStack[index] = cursor.current;
cursor.current = value;
}
var emptyContextObject = {},
contextStackCursor = {
current: emptyContextObject
},
didPerformWorkStackCursor = {
current: false
},
previousContext = emptyContextObject;
function getMaskedContext(workInProgress, unmaskedContext) {
var contextTypes = workInProgress.type.contextTypes;
if (!contextTypes) return emptyContextObject;
var instance = workInProgress.stateNode;
if (instance && instance.__reactInternalMemoizedUnmaskedChildContext === unmaskedContext) return instance.__reactInternalMemoizedMaskedChildContext;
var context = {},
key;
for (key in contextTypes) {
context[key] = unmaskedContext[key];
}
instance && (workInProgress = workInProgress.stateNode, workInProgress.__reactInternalMemoizedUnmaskedChildContext = unmaskedContext, workInProgress.__reactInternalMemoizedMaskedChildContext = context);
return context;
}
function isContextProvider(type) {
type = type.childContextTypes;
return null !== type && undefined !== type;
}
function popContext(fiber) {
pop(didPerformWorkStackCursor, fiber);
pop(contextStackCursor, fiber);
}
function popTopLevelContextObject(fiber) {
pop(didPerformWorkStackCursor, fiber);
pop(contextStackCursor, fiber);
}
function pushTopLevelContextObject(fiber, context, didChange) {
if (contextStackCursor.current !== emptyContextObject) throw ReactError(Error("Unexpected context found on stack. This error is likely caused by a bug in React. Please file an issue."));
push(contextStackCursor, context, fiber);
push(didPerformWorkStackCursor, didChange, fiber);
}
function processChildContext(fiber, type, parentContext) {
var instance = fiber.stateNode;
fiber = type.childContextTypes;
if ("function" !== typeof instance.getChildContext) return parentContext;
instance = instance.getChildContext();
for (var contextKey in instance) {
if (!(contextKey in fiber)) throw ReactError(Error((getComponentName(type) || "Unknown") + '.getChildContext(): key "' + contextKey + '" is not defined in childContextTypes.'));
}
return _extends({}, parentContext, instance);
}
function pushContextProvider(workInProgress) {
var instance = workInProgress.stateNode;
instance = instance && instance.__reactInternalMemoizedMergedChildContext || emptyContextObject;
previousContext = contextStackCursor.current;
push(contextStackCursor, instance, workInProgress);
push(didPerformWorkStackCursor, didPerformWorkStackCursor.current, workInProgress);
return true;
}
function invalidateContextProvider(workInProgress, type, didChange) {
var instance = workInProgress.stateNode;
if (!instance) throw ReactError(Error("Expected to have an instance by this point. This error is likely caused by a bug in React. Please file an issue."));
didChange ? (type = processChildContext(workInProgress, type, previousContext), instance.__reactInternalMemoizedMergedChildContext = type, pop(didPerformWorkStackCursor, workInProgress), pop(contextStackCursor, workInProgress), push(contextStackCursor, type, workInProgress)) : pop(didPerformWorkStackCursor, workInProgress);
push(didPerformWorkStackCursor, didChange, workInProgress);
}
var Scheduler_runWithPriority = Scheduler.unstable_runWithPriority,
Scheduler_scheduleCallback = Scheduler.unstable_scheduleCallback,
Scheduler_cancelCallback = Scheduler.unstable_cancelCallback,
Scheduler_shouldYield = Scheduler.unstable_shouldYield,
Scheduler_requestPaint = Scheduler.unstable_requestPaint,
Scheduler_now = Scheduler.unstable_now,
Scheduler_getCurrentPriorityLevel = Scheduler.unstable_getCurrentPriorityLevel,
Scheduler_ImmediatePriority = Scheduler.unstable_ImmediatePriority,
Scheduler_UserBlockingPriority = Scheduler.unstable_UserBlockingPriority,
Scheduler_NormalPriority = Scheduler.unstable_NormalPriority,
Scheduler_LowPriority = Scheduler.unstable_LowPriority,
Scheduler_IdlePriority = Scheduler.unstable_IdlePriority,
fakeCallbackNode = {},
requestPaint = undefined !== Scheduler_requestPaint ? Scheduler_requestPaint : function () {},
syncQueue = null,
immediateQueueCallbackNode = null,
isFlushingSyncQueue = false,
initialTimeMs = Scheduler_now(),
now = 1e4 > initialTimeMs ? Scheduler_now : function () {
return Scheduler_now() - initialTimeMs;
};
function getCurrentPriorityLevel() {
switch (Scheduler_getCurrentPriorityLevel()) {
case Scheduler_ImmediatePriority:
return 99;
case Scheduler_UserBlockingPriority:
return 98;
case Scheduler_NormalPriority:
return 97;
case Scheduler_LowPriority:
return 96;
case Scheduler_IdlePriority:
return 95;
default:
throw ReactError(Error("Unknown priority level."));
}
}
function reactPriorityToSchedulerPriority(reactPriorityLevel) {
switch (reactPriorityLevel) {
case 99:
return Scheduler_ImmediatePriority;
case 98:
return Scheduler_UserBlockingPriority;
case 97:
return Scheduler_NormalPriority;
case 96:
return Scheduler_LowPriority;
case 95:
return Scheduler_IdlePriority;
default:
throw ReactError(Error("Unknown priority level."));
}
}
function runWithPriority(reactPriorityLevel, fn) {
reactPriorityLevel = reactPriorityToSchedulerPriority(reactPriorityLevel);
return Scheduler_runWithPriority(reactPriorityLevel, fn);
}
function scheduleCallback(reactPriorityLevel, callback, options) {
reactPriorityLevel = reactPriorityToSchedulerPriority(reactPriorityLevel);
return Scheduler_scheduleCallback(reactPriorityLevel, callback, options);
}
function scheduleSyncCallback(callback) {
null === syncQueue ? (syncQueue = [callback], immediateQueueCallbackNode = Scheduler_scheduleCallback(Scheduler_ImmediatePriority, flushSyncCallbackQueueImpl)) : syncQueue.push(callback);
return fakeCallbackNode;
}
function flushSyncCallbackQueue() {
null !== immediateQueueCallbackNode && Scheduler_cancelCallback(immediateQueueCallbackNode);
flushSyncCallbackQueueImpl();
}
function flushSyncCallbackQueueImpl() {
if (!isFlushingSyncQueue && null !== syncQueue) {
isFlushingSyncQueue = true;
var i = 0;
try {
var queue = syncQueue;
runWithPriority(99, function () {
for (; i < queue.length; i++) {
var callback = queue[i];
do {
callback = callback(true);
} while (null !== callback);
}
});
syncQueue = null;
} catch (error) {
throw null !== syncQueue && (syncQueue = syncQueue.slice(i + 1)), Scheduler_scheduleCallback(Scheduler_ImmediatePriority, flushSyncCallbackQueue), error;
} finally {
isFlushingSyncQueue = false;
}
}
}
function inferPriorityFromExpirationTime(currentTime, expirationTime) {
if (1073741823 === expirationTime) return 99;
if (1 === expirationTime) return 95;
currentTime = 10 * (1073741821 - expirationTime) - 10 * (1073741821 - currentTime);
return 0 >= currentTime ? 99 : 250 >= currentTime ? 98 : 5250 >= currentTime ? 97 : 95;
}
function is(x, y) {
return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
}
var hasOwnProperty = Object.prototype.hasOwnProperty;
function shallowEqual(objA, objB) {
if (is(objA, objB)) return true;
if ("object" !== typeof objA || null === objA || "object" !== typeof objB || null === objB) return false;
var keysA = Object.keys(objA),
keysB = Object.keys(objB);
if (keysA.length !== keysB.length) return false;
for (keysB = 0; keysB < keysA.length; keysB++) {
if (!hasOwnProperty.call(objB, keysA[keysB]) || !is(objA[keysA[keysB]], objB[keysA[keysB]])) return false;
}
return true;
}
function resolveDefaultProps(Component, baseProps) {
if (Component && Component.defaultProps) {
baseProps = _extends({}, baseProps);
Component = Component.defaultProps;
for (var propName in Component) {
undefined === baseProps[propName] && (baseProps[propName] = Component[propName]);
}
}
return baseProps;
}
function readLazyComponentType(lazyComponent) {
var result = lazyComponent._result;
switch (lazyComponent._status) {
case 1:
return result;
case 2:
throw result;
case 0:
throw result;
default:
lazyComponent._status = 0;
result = lazyComponent._ctor;
result = result();
result.then(function (moduleObject) {
0 === lazyComponent._status && (moduleObject = moduleObject.default, lazyComponent._status = 1, lazyComponent._result = moduleObject);
}, function (error) {
0 === lazyComponent._status && (lazyComponent._status = 2, lazyComponent._result = error);
});
switch (lazyComponent._status) {
case 1:
return lazyComponent._result;
case 2:
throw lazyComponent._result;
}
lazyComponent._result = result;
throw result;
}
}
var valueCursor = {
current: null
},
currentlyRenderingFiber = null,
lastContextDependency = null,
lastContextWithAllBitsObserved = null;
function resetContextDependencies() {
lastContextWithAllBitsObserved = lastContextDependency = currentlyRenderingFiber = null;
}
function pushProvider(providerFiber, nextValue) {
var context = providerFiber.type._context;
push(valueCursor, context._currentValue, providerFiber);
context._currentValue = nextValue;
}
function popProvider(providerFiber) {
var currentValue = valueCursor.current;
pop(valueCursor, providerFiber);
providerFiber.type._context._currentValue = currentValue;
}
function scheduleWorkOnParentPath(parent, renderExpirationTime) {
for (; null !== parent;) {
var alternate = parent.alternate;
if (parent.childExpirationTime < renderExpirationTime) parent.childExpirationTime = renderExpirationTime, null !== alternate && alternate.childExpirationTime < renderExpirationTime && (alternate.childExpirationTime = renderExpirationTime);else if (null !== alternate && alternate.childExpirationTime < renderExpirationTime) alternate.childExpirationTime = renderExpirationTime;else break;
parent = parent.return;
}
}
function prepareToReadContext(workInProgress, renderExpirationTime) {
currentlyRenderingFiber = workInProgress;
lastContextWithAllBitsObserved = lastContextDependency = null;
workInProgress = workInProgress.dependencies;
null !== workInProgress && null !== workInProgress.firstContext && (workInProgress.expirationTime >= renderExpirationTime && (didReceiveUpdate = true), workInProgress.firstContext = null);
}
function readContext(context, observedBits) {
if (lastContextWithAllBitsObserved !== context && false !== observedBits && 0 !== observedBits) {
if ("number" !== typeof observedBits || 1073741823 === observedBits) lastContextWithAllBitsObserved = context, observedBits = 1073741823;
observedBits = {
context: context,
observedBits: observedBits,
next: null
};
if (null === lastContextDependency) {
if (null === currentlyRenderingFiber) throw ReactError(Error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()."));
lastContextDependency = observedBits;
currentlyRenderingFiber.dependencies = {
expirationTime: 0,
firstContext: observedBits,
responders: null
};
} else lastContextDependency = lastContextDependency.next = observedBits;
}
return context._currentValue;
}
var hasForceUpdate = false;
function createUpdateQueue(baseState) {
return {
baseState: baseState,
firstUpdate: null,
lastUpdate: null,
firstCapturedUpdate: null,
lastCapturedUpdate: null,
firstEffect: null,
lastEffect: null,
firstCapturedEffect: null,
lastCapturedEffect: null
};
}
function cloneUpdateQueue(currentQueue) {
return {
baseState: currentQueue.baseState,
firstUpdate: currentQueue.firstUpdate,
lastUpdate: currentQueue.lastUpdate,
firstCapturedUpdate: null,
lastCapturedUpdate: null,
firstEffect: null,
lastEffect: null,
firstCapturedEffect: null,
lastCapturedEffect: null
};
}
function createUpdate(expirationTime, suspenseConfig) {
return {
expirationTime: expirationTime,
suspenseConfig: suspenseConfig,
tag: 0,
payload: null,
callback: null,
next: null,
nextEffect: null
};
}
function appendUpdateToQueue(queue, update) {
null === queue.lastUpdate ? queue.firstUpdate = queue.lastUpdate = update : (queue.lastUpdate.next = update, queue.lastUpdate = update);
}
function enqueueUpdate(fiber, update) {
var alternate = fiber.alternate;
if (null === alternate) {
var queue1 = fiber.updateQueue;
var queue2 = null;
null === queue1 && (queue1 = fiber.updateQueue = createUpdateQueue(fiber.memoizedState));
} else queue1 = fiber.updateQueue, queue2 = alternate.updateQueue, null === queue1 ? null === queue2 ? (queue1 = fiber.updateQueue = createUpdateQueue(fiber.memoizedState), queue2 = alternate.updateQueue = createUpdateQueue(alternate.memoizedState)) : queue1 = fiber.updateQueue = cloneUpdateQueue(queue2) : null === queue2 && (queue2 = alternate.updateQueue = cloneUpdateQueue(queue1));
null === queue2 || queue1 === queue2 ? appendUpdateToQueue(queue1, update) : null === queue1.lastUpdate || null === queue2.lastUpdate ? (appendUpdateToQueue(queue1, update), appendUpdateToQueue(queue2, update)) : (appendUpdateToQueue(queue1, update), queue2.lastUpdate = update);
}
function enqueueCapturedUpdate(workInProgress, update) {
var workInProgressQueue = workInProgress.updateQueue;
workInProgressQueue = null === workInProgressQueue ? workInProgress.updateQueue = createUpdateQueue(workInProgress.memoizedState) : ensureWorkInProgressQueueIsAClone(workInProgress, workInProgressQueue);
null === workInProgressQueue.lastCapturedUpdate ? workInProgressQueue.firstCapturedUpdate = workInProgressQueue.lastCapturedUpdate = update : (workInProgressQueue.lastCapturedUpdate.next = update, workInProgressQueue.lastCapturedUpdate = update);
}
function ensureWorkInProgressQueueIsAClone(workInProgress, queue) {
var current = workInProgress.alternate;
null !== current && queue === current.updateQueue && (queue = workInProgress.updateQueue = cloneUpdateQueue(queue));
return queue;
}
function getStateFromUpdate(workInProgress, queue, update, prevState, nextProps, instance) {
switch (update.tag) {
case 1:
return workInProgress = update.payload, "function" === typeof workInProgress ? workInProgress.call(instance, prevState, nextProps) : workInProgress;
case 3:
workInProgress.effectTag = workInProgress.effectTag & -2049 | 64;
case 0:
workInProgress = update.payload;
nextProps = "function" === typeof workInProgress ? workInProgress.call(instance, prevState, nextProps) : workInProgress;
if (null === nextProps || undefined === nextProps) break;
return _extends({}, prevState, nextProps);
case 2:
hasForceUpdate = true;
}
return prevState;
}
function processUpdateQueue(workInProgress, queue, props, instance, renderExpirationTime) {
hasForceUpdate = false;
queue = ensureWorkInProgressQueueIsAClone(workInProgress, queue);
for (var newBaseState = queue.baseState, newFirstUpdate = null, newExpirationTime = 0, update = queue.firstUpdate, resultState = newBaseState; null !== update;) {
var updateExpirationTime = update.expirationTime;
updateExpirationTime < renderExpirationTime ? (null === newFirstUpdate && (newFirstUpdate = update, newBaseState = resultState), newExpirationTime < updateExpirationTime && (newExpirationTime = updateExpirationTime)) : (markRenderEventTimeAndConfig(updateExpirationTime, update.suspenseConfig), resultState = getStateFromUpdate(workInProgress, queue, update, resultState, props, instance), null !== update.callback && (workInProgress.effectTag |= 32, update.nextEffect = null, null === queue.lastEffect ? queue.firstEffect = queue.lastEffect = update : (queue.lastEffect.nextEffect = update, queue.lastEffect = update)));
update = update.next;
}
updateExpirationTime = null;
for (update = queue.firstCapturedUpdate; null !== update;) {
var _updateExpirationTime = update.expirationTime;
_updateExpirationTime < renderExpirationTime ? (null === updateExpirationTime && (updateExpirationTime = update, null === newFirstUpdate && (newBaseState = resultState)), newExpirationTime < _updateExpirationTime && (newExpirationTime = _updateExpirationTime)) : (resultState = getStateFromUpdate(workInProgress, queue, update, resultState, props, instance), null !== update.callback && (workInProgress.effectTag |= 32, update.nextEffect = null, null === queue.lastCapturedEffect ? queue.firstCapturedEffect = queue.lastCapturedEffect = update : (queue.lastCapturedEffect.nextEffect = update, queue.lastCapturedEffect = update)));
update = update.next;
}
null === newFirstUpdate && (queue.lastUpdate = null);
null === updateExpirationTime ? queue.lastCapturedUpdate = null : workInProgress.effectTag |= 32;
null === newFirstUpdate && null === updateExpirationTime && (newBaseState = resultState);
queue.baseState = newBaseState;
queue.firstUpdate = newFirstUpdate;
queue.firstCapturedUpdate = updateExpirationTime;
workInProgress.expirationTime = newExpirationTime;
workInProgress.memoizedState = resultState;
}
function commitUpdateQueue(finishedWork, finishedQueue, instance) {
null !== finishedQueue.firstCapturedUpdate && (null !== finishedQueue.lastUpdate && (finishedQueue.lastUpdate.next = finishedQueue.firstCapturedUpdate, finishedQueue.lastUpdate = finishedQueue.lastCapturedUpdate), finishedQueue.firstCapturedUpdate = finishedQueue.lastCapturedUpdate = null);
commitUpdateEffects(finishedQueue.firstEffect, instance);
finishedQueue.firstEffect = finishedQueue.lastEffect = null;
commitUpdateEffects(finishedQueue.firstCapturedEffect, instance);
finishedQueue.firstCapturedEffect = finishedQueue.lastCapturedEffect = null;
}
function commitUpdateEffects(effect, instance) {
for (; null !== effect;) {
var _callback3 = effect.callback;
if (null !== _callback3) {
effect.callback = null;
var context = instance;
if ("function" !== typeof _callback3) throw ReactError(Error("Invalid argument passed as callback. Expected a function. Instead received: " + _callback3));
_callback3.call(context);
}
effect = effect.nextEffect;
}
}
var ReactCurrentBatchConfig = ReactSharedInternals.ReactCurrentBatchConfig,
emptyRefsObject = new React.Component().refs;
function applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, nextProps) {
ctor = workInProgress.memoizedState;
getDerivedStateFromProps = getDerivedStateFromProps(nextProps, ctor);
getDerivedStateFromProps = null === getDerivedStateFromProps || undefined === getDerivedStateFromProps ? ctor : _extends({}, ctor, getDerivedStateFromProps);
workInProgress.memoizedState = getDerivedStateFromProps;
nextProps = workInProgress.updateQueue;
null !== nextProps && 0 === workInProgress.expirationTime && (nextProps.baseState = getDerivedStateFromProps);
}
var classComponentUpdater = {
isMounted: function isMounted(component) {
return (component = component._reactInternalFiber) ? 2 === isFiberMountedImpl(component) : false;
},
enqueueSetState: function enqueueSetState(inst, payload, callback) {
inst = inst._reactInternalFiber;
var currentTime = requestCurrentTime(),
suspenseConfig = ReactCurrentBatchConfig.suspense;
currentTime = computeExpirationForFiber(currentTime, inst, suspenseConfig);
suspenseConfig = createUpdate(currentTime, suspenseConfig);
suspenseConfig.payload = payload;
undefined !== callback && null !== callback && (suspenseConfig.callback = callback);
enqueueUpdate(inst, suspenseConfig);
scheduleUpdateOnFiber(inst, currentTime);
},
enqueueReplaceState: function enqueueReplaceState(inst, payload, callback) {
inst = inst._reactInternalFiber;
var currentTime = requestCurrentTime(),
suspenseConfig = ReactCurrentBatchConfig.suspense;
currentTime = computeExpirationForFiber(currentTime, inst, suspenseConfig);
suspenseConfig = createUpdate(currentTime, suspenseConfig);
suspenseConfig.tag = 1;
suspenseConfig.payload = payload;
undefined !== callback && null !== callback && (suspenseConfig.callback = callback);
enqueueUpdate(inst, suspenseConfig);
scheduleUpdateOnFiber(inst, currentTime);
},
enqueueForceUpdate: function enqueueForceUpdate(inst, callback) {
inst = inst._reactInternalFiber;
var currentTime = requestCurrentTime(),
suspenseConfig = ReactCurrentBatchConfig.suspense;
currentTime = computeExpirationForFiber(currentTime, inst, suspenseConfig);
suspenseConfig = createUpdate(currentTime, suspenseConfig);
suspenseConfig.tag = 2;
undefined !== callback && null !== callback && (suspenseConfig.callback = callback);
enqueueUpdate(inst, suspenseConfig);
scheduleUpdateOnFiber(inst, currentTime);
}
};
function checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, oldState, newState, nextContext) {
workInProgress = workInProgress.stateNode;
return "function" === typeof workInProgress.shouldComponentUpdate ? workInProgress.shouldComponentUpdate(newProps, newState, nextContext) : ctor.prototype && ctor.prototype.isPureReactComponent ? !shallowEqual(oldProps, newProps) || !shallowEqual(oldState, newState) : true;
}
function constructClassInstance(workInProgress, ctor, props) {
var isLegacyContextConsumer = false,
unmaskedContext = emptyContextObject;
var context = ctor.contextType;
"object" === typeof context && null !== context ? context = readContext(context) : (unmaskedContext = isContextProvider(ctor) ? previousContext : contextStackCursor.current, isLegacyContextConsumer = ctor.contextTypes, context = (isLegacyContextConsumer = null !== isLegacyContextConsumer && undefined !== isLegacyContextConsumer) ? getMaskedContext(workInProgress, unmaskedContext) : emptyContextObject);
ctor = new ctor(props, context);
workInProgress.memoizedState = null !== ctor.state && undefined !== ctor.state ? ctor.state : null;
ctor.updater = classComponentUpdater;
workInProgress.stateNode = ctor;
ctor._reactInternalFiber = workInProgress;
isLegacyContextConsumer && (workInProgress = workInProgress.stateNode, workInProgress.__reactInternalMemoizedUnmaskedChildContext = unmaskedContext, workInProgress.__reactInternalMemoizedMaskedChildContext = context);
return ctor;
}
function callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext) {
workInProgress = instance.state;
"function" === typeof instance.componentWillReceiveProps && instance.componentWillReceiveProps(newProps, nextContext);
"function" === typeof instance.UNSAFE_componentWillReceiveProps && instance.UNSAFE_componentWillReceiveProps(newProps, nextContext);
instance.state !== workInProgress && classComponentUpdater.enqueueReplaceState(instance, instance.state, null);
}
function mountClassInstance(workInProgress, ctor, newProps, renderExpirationTime) {
var instance = workInProgress.stateNode;
instance.props = newProps;
instance.state = workInProgress.memoizedState;
instance.refs = emptyRefsObject;
var contextType = ctor.contextType;
"object" === typeof contextType && null !== contextType ? instance.context = readContext(contextType) : (contextType = isContextProvider(ctor) ? previousContext : contextStackCursor.current, instance.context = getMaskedContext(workInProgress, contextType));
contextType = workInProgress.updateQueue;
null !== contextType && (processUpdateQueue(workInProgress, contextType, newProps, instance, renderExpirationTime), instance.state = workInProgress.memoizedState);
contextType = ctor.getDerivedStateFromProps;
"function" === typeof contextType && (applyDerivedStateFromProps(workInProgress, ctor, contextType, newProps), instance.state = workInProgress.memoizedState);
"function" === typeof ctor.getDerivedStateFromProps || "function" === typeof instance.getSnapshotBeforeUpdate || "function" !== typeof instance.UNSAFE_componentWillMount && "function" !== typeof instance.componentWillMount || (ctor = instance.state, "function" === typeof instance.componentWillMount && instance.componentWillMount(), "function" === typeof instance.UNSAFE_componentWillMount && instance.UNSAFE_componentWillMount(), ctor !== instance.state && classComponentUpdater.enqueueReplaceState(instance, instance.state, null), contextType = workInProgress.updateQueue, null !== contextType && (processUpdateQueue(workInProgress, contextType, newProps, instance, renderExpirationTime), instance.state = workInProgress.memoizedState));
"function" === typeof instance.componentDidMount && (workInProgress.effectTag |= 4);
}
var isArray = Array.isArray;
function coerceRef(returnFiber, current$$1, element) {
returnFiber = element.ref;
if (null !== returnFiber && "function" !== typeof returnFiber && "object" !== typeof returnFiber) {
if (element._owner) {
element = element._owner;
var inst = undefined;
if (element) {
if (1 !== element.tag) throw ReactError(Error("Function components cannot have refs. Did you mean to use React.forwardRef()?"));
inst = element.stateNode;
}
if (!inst) throw ReactError(Error("Missing owner for string ref " + returnFiber + ". This error is likely caused by a bug in React. Please file an issue."));
var stringRef = "" + returnFiber;
if (null !== current$$1 && null !== current$$1.ref && "function" === typeof current$$1.ref && current$$1.ref._stringRef === stringRef) return current$$1.ref;
current$$1 = function current$$1(value) {
var refs = inst.refs;
refs === emptyRefsObject && (refs = inst.refs = {});
null === value ? delete refs[stringRef] : refs[stringRef] = value;
};
current$$1._stringRef = stringRef;
return current$$1;
}
if ("string" !== typeof returnFiber) throw ReactError(Error("Expected ref to be a function, a string, an object returned by React.createRef(), or null."));
if (!element._owner) throw ReactError(Error("Element ref was specified as a string (" + returnFiber + ") but no owner was set. This could happen for one of the following reasons:\n1. You may be adding a ref to a function component\n2. You may be adding a ref to a component that was not created inside a component's render method\n3. You have multiple copies of React loaded\nSee https://fb.me/react-refs-must-have-owner for more information."));
}
return returnFiber;
}
function throwOnInvalidObjectType(returnFiber, newChild) {
if ("textarea" !== returnFiber.type) throw ReactError(Error("Objects are not valid as a React child (found: " + ("[object Object]" === Object.prototype.toString.call(newChild) ? "object with keys {" + Object.keys(newChild).join(", ") + "}" : newChild) + ")."));
}
function ChildReconciler(shouldTrackSideEffects) {
function deleteChild(returnFiber, childToDelete) {
if (shouldTrackSideEffects) {
var last = returnFiber.lastEffect;
null !== last ? (last.nextEffect = childToDelete, returnFiber.lastEffect = childToDelete) : returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;
childToDelete.nextEffect = null;
childToDelete.effectTag = 8;
}
}
function deleteRemainingChildren(returnFiber, currentFirstChild) {
if (!shouldTrackSideEffects) return null;
for (; null !== currentFirstChild;) {
deleteChild(returnFiber, currentFirstChild), currentFirstChild = currentFirstChild.sibling;
}
return null;
}
function mapRemainingChildren(returnFiber, currentFirstChild) {
for (returnFiber = new Map(); null !== currentFirstChild;) {
null !== currentFirstChild.key ? returnFiber.set(currentFirstChild.key, currentFirstChild) : returnFiber.set(currentFirstChild.index, currentFirstChild), currentFirstChild = currentFirstChild.sibling;
}
return returnFiber;
}
function useFiber(fiber, pendingProps, expirationTime) {
fiber = createWorkInProgress(fiber, pendingProps, expirationTime);
fiber.index = 0;
fiber.sibling = null;
return fiber;
}
function placeChild(newFiber, lastPlacedIndex, newIndex) {
newFiber.index = newIndex;
if (!shouldTrackSideEffects) return lastPlacedIndex;
newIndex = newFiber.alternate;
if (null !== newIndex) return newIndex = newIndex.index, newIndex < lastPlacedIndex ? (newFiber.effectTag = 2, lastPlacedIndex) : newIndex;
newFiber.effectTag = 2;
return lastPlacedIndex;
}
function placeSingleChild(newFiber) {
shouldTrackSideEffects && null === newFiber.alternate && (newFiber.effectTag = 2);
return newFiber;
}
function updateTextNode(returnFiber, current$$1, textContent, expirationTime) {
if (null === current$$1 || 6 !== current$$1.tag) return current$$1 = createFiberFromText(textContent, returnFiber.mode, expirationTime), current$$1.return = returnFiber, current$$1;
current$$1 = useFiber(current$$1, textContent, expirationTime);
current$$1.return = returnFiber;
return current$$1;
}
function updateElement(returnFiber, current$$1, element, expirationTime) {
if (null !== current$$1 && current$$1.elementType === element.type) return expirationTime = useFiber(current$$1, element.props, expirationTime), expirationTime.ref = coerceRef(returnFiber, current$$1, element), expirationTime.return = returnFiber, expirationTime;
expirationTime = createFiberFromTypeAndProps(element.type, element.key, element.props, null, returnFiber.mode, expirationTime);
expirationTime.ref = coerceRef(returnFiber, current$$1, element);
expirationTime.return = returnFiber;
return expirationTime;
}
function updatePortal(returnFiber, current$$1, portal, expirationTime) {
if (null === current$$1 || 4 !== current$$1.tag || current$$1.stateNode.containerInfo !== portal.containerInfo || current$$1.stateNode.implementation !== portal.implementation) return current$$1 = createFiberFromPortal(portal, returnFiber.mode, expirationTime), current$$1.return = returnFiber, current$$1;
current$$1 = useFiber(current$$1, portal.children || [], expirationTime);
current$$1.return = returnFiber;
return current$$1;
}
function updateFragment(returnFiber, current$$1, fragment, expirationTime, key) {
if (null === current$$1 || 7 !== current$$1.tag) return current$$1 = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key), current$$1.return = returnFiber, current$$1;
current$$1 = useFiber(current$$1, fragment, expirationTime);
current$$1.return = returnFiber;
return current$$1;
}
function createChild(returnFiber, newChild, expirationTime) {
if ("string" === typeof newChild || "number" === typeof newChild) return newChild = createFiberFromText("" + newChild, returnFiber.mode, expirationTime), newChild.return = returnFiber, newChild;
if ("object" === typeof newChild && null !== newChild) {
switch (newChild.$$typeof) {
case REACT_ELEMENT_TYPE:
return expirationTime = createFiberFromTypeAndProps(newChild.type, newChild.key, newChild.props, null, returnFiber.mode, expirationTime), expirationTime.ref = coerceRef(returnFiber, null, newChild), expirationTime.return = returnFiber, expirationTime;
case REACT_PORTAL_TYPE:
return newChild = createFiberFromPortal(newChild, returnFiber.mode, expirationTime), newChild.return = returnFiber, newChild;
}
if (isArray(newChild) || getIteratorFn(newChild)) return newChild = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null), newChild.return = returnFiber, newChild;
throwOnInvalidObjectType(returnFiber, newChild);
}
return null;
}
function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {
var key = null !== oldFiber ? oldFiber.key : null;
if ("string" === typeof newChild || "number" === typeof newChild) return null !== key ? null : updateTextNode(returnFiber, oldFiber, "" + newChild, expirationTime);
if ("object" === typeof newChild && null !== newChild) {
switch (newChild.$$typeof) {
case REACT_ELEMENT_TYPE:
return newChild.key === key ? newChild.type === REACT_FRAGMENT_TYPE ? updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key) : updateElement(returnFiber, oldFiber, newChild, expirationTime) : null;
case REACT_PORTAL_TYPE:
return newChild.key === key ? updatePortal(returnFiber, oldFiber, newChild, expirationTime) : null;
}
if (isArray(newChild) || getIteratorFn(newChild)) return null !== key ? null : updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);
throwOnInvalidObjectType(returnFiber, newChild);
}
return null;
}
function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {
if ("string" === typeof newChild || "number" === typeof newChild) return existingChildren = existingChildren.get(newIdx) || null, updateTextNode(returnFiber, existingChildren, "" + newChild, expirationTime);
if ("object" === typeof newChild && null !== newChild) {
switch (newChild.$$typeof) {
case REACT_ELEMENT_TYPE:
return existingChildren = existingChildren.get(null === newChild.key ? newIdx : newChild.key) || null, newChild.type === REACT_FRAGMENT_TYPE ? updateFragment(returnFiber, existingChildren, newChild.props.children, expirationTime, newChild.key) : updateElement(returnFiber, existingChildren, newChild, expirationTime);
case REACT_PORTAL_TYPE:
return existingChildren = existingChildren.get(null === newChild.key ? newIdx : newChild.key) || null, updatePortal(returnFiber, existingChildren, newChild, expirationTime);
}
if (isArray(newChild) || getIteratorFn(newChild)) return existingChildren = existingChildren.get(newIdx) || null, updateFragment(returnFiber, existingChildren, newChild, expirationTime, null);
throwOnInvalidObjectType(returnFiber, newChild);
}
return null;
}
function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {
for (var resultingFirstChild = null, previousNewFiber = null, oldFiber = currentFirstChild, newIdx = currentFirstChild = 0, nextOldFiber = null; null !== oldFiber && newIdx < newChildren.length; newIdx++) {
oldFiber.index > newIdx ? (nextOldFiber = oldFiber, oldFiber = null) : nextOldFiber = oldFiber.sibling;
var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);
if (null === newFiber) {
null === oldFiber && (oldFiber = nextOldFiber);
break;
}
shouldTrackSideEffects && oldFiber && null === newFiber.alternate && deleteChild(returnFiber, oldFiber);
currentFirstChild = placeChild(newFiber, currentFirstChild, newIdx);
null === previousNewFiber ? resultingFirstChild = newFiber : previousNewFiber.sibling = newFiber;
previousNewFiber = newFiber;
oldFiber = nextOldFiber;
}
if (newIdx === newChildren.length) return deleteRemainingChildren(returnFiber, oldFiber), resultingFirstChild;
if (null === oldFiber) {
for (; newIdx < newChildren.length; newIdx++) {
oldFiber = createChild(returnFiber, newChildren[newIdx], expirationTime), null !== oldFiber && (currentFirstChild = placeChild(oldFiber, currentFirstChild, newIdx), null === previousNewFiber ? resultingFirstChild = oldFiber : previousNewFiber.sibling = oldFiber, previousNewFiber = oldFiber);
}
return resultingFirstChild;
}
for (oldFiber = mapRemainingChildren(returnFiber, oldFiber); newIdx < newChildren.length; newIdx++) {
nextOldFiber = updateFromMap(oldFiber, returnFiber, newIdx, newChildren[newIdx], expirationTime), null !== nextOldFiber && (shouldTrackSideEffects && null !== nextOldFiber.alternate && oldFiber.delete(null === nextOldFiber.key ? newIdx : nextOldFiber.key), currentFirstChild = placeChild(nextOldFiber, currentFirstChild, newIdx), null === previousNewFiber ? resultingFirstChild = nextOldFiber : previousNewFiber.sibling = nextOldFiber, previousNewFiber = nextOldFiber);
}
shouldTrackSideEffects && oldFiber.forEach(function (child) {
return deleteChild(returnFiber, child);
});
return resultingFirstChild;
}
function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {
var iteratorFn = getIteratorFn(newChildrenIterable);
if ("function" !== typeof iteratorFn) throw ReactError(Error("An object is not an iterable. This error is likely caused by a bug in React. Please file an issue."));
newChildrenIterable = iteratorFn.call(newChildrenIterable);
if (null == newChildrenIterable) throw ReactError(Error("An iterable object provided no iterator."));
for (var previousNewFiber = iteratorFn = null, oldFiber = currentFirstChild, newIdx = currentFirstChild = 0, nextOldFiber = null, step = newChildrenIterable.next(); null !== oldFiber && !step.done; newIdx++, step = newChildrenIterable.next()) {
oldFiber.index > newIdx ? (nextOldFiber = oldFiber, oldFiber = null) : nextOldFiber = oldFiber.sibling;
var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);
if (null === newFiber) {
null === oldFiber && (oldFiber = nextOldFiber);
break;
}
shouldTrackSideEffects && oldFiber && null === newFiber.alternate && deleteChild(returnFiber, oldFiber);
currentFirstChild = placeChild(newFiber, currentFirstChild, newIdx);
null === previousNewFiber ? iteratorFn = newFiber : previousNewFiber.sibling = newFiber;
previousNewFiber = newFiber;
oldFiber = nextOldFiber;
}
if (step.done) return deleteRemainingChildren(returnFiber, oldFiber), iteratorFn;
if (null === oldFiber) {
for (; !step.done; newIdx++, step = newChildrenIterable.next()) {
step = createChild(returnFiber, step.value, expirationTime), null !== step && (currentFirstChild = placeChild(step, currentFirstChild, newIdx), null === previousNewFiber ? iteratorFn = step : previousNewFiber.sibling = step, previousNewFiber = step);
}
return iteratorFn;
}
for (oldFiber = mapRemainingChildren(returnFiber, oldFiber); !step.done; newIdx++, step = newChildrenIterable.next()) {
step = updateFromMap(oldFiber, returnFiber, newIdx, step.value, expirationTime), null !== step && (shouldTrackSideEffects && null !== step.alternate && oldFiber.delete(null === step.key ? newIdx : step.key), currentFirstChild = placeChild(step, currentFirstChild, newIdx), null === previousNewFiber ? iteratorFn = step : previousNewFiber.sibling = step, previousNewFiber = step);
}
shouldTrackSideEffects && oldFiber.forEach(function (child) {
return deleteChild(returnFiber, child);
});
return iteratorFn;
}
return function (returnFiber, currentFirstChild, newChild, expirationTime) {
var isUnkeyedTopLevelFragment = "object" === typeof newChild && null !== newChild && newChild.type === REACT_FRAGMENT_TYPE && null === newChild.key;
isUnkeyedTopLevelFragment && (newChild = newChild.props.children);
var isObject = "object" === typeof newChild && null !== newChild;
if (isObject) switch (newChild.$$typeof) {
case REACT_ELEMENT_TYPE:
a: {
isObject = newChild.key;
for (isUnkeyedTopLevelFragment = currentFirstChild; null !== isUnkeyedTopLevelFragment;) {
if (isUnkeyedTopLevelFragment.key === isObject) {
if (7 === isUnkeyedTopLevelFragment.tag ? newChild.type === REACT_FRAGMENT_TYPE : isUnkeyedTopLevelFragment.elementType === newChild.type) {
deleteRemainingChildren(returnFiber, isUnkeyedTopLevelFragment.sibling);
currentFirstChild = useFiber(isUnkeyedTopLevelFragment, newChild.type === REACT_FRAGMENT_TYPE ? newChild.props.children : newChild.props, expirationTime);
currentFirstChild.ref = coerceRef(returnFiber, isUnkeyedTopLevelFragment, newChild);
currentFirstChild.return = returnFiber;
returnFiber = currentFirstChild;
break a;
}
deleteRemainingChildren(returnFiber, isUnkeyedTopLevelFragment);
break;
} else deleteChild(returnFiber, isUnkeyedTopLevelFragment);
isUnkeyedTopLevelFragment = isUnkeyedTopLevelFragment.sibling;
}
newChild.type === REACT_FRAGMENT_TYPE ? (currentFirstChild = createFiberFromFragment(newChild.props.children, returnFiber.mode, expirationTime, newChild.key), currentFirstChild.return = returnFiber, returnFiber = currentFirstChild) : (expirationTime = createFiberFromTypeAndProps(newChild.type, newChild.key, newChild.props, null, returnFiber.mode, expirationTime), expirationTime.ref = coerceRef(returnFiber, currentFirstChild, newChild), expirationTime.return = returnFiber, returnFiber = expirationTime);
}
return placeSingleChild(returnFiber);
case REACT_PORTAL_TYPE:
a: {
for (isUnkeyedTopLevelFragment = newChild.key; null !== currentFirstChild;) {
if (currentFirstChild.key === isUnkeyedTopLevelFragment) {
if (4 === currentFirstChild.tag && currentFirstChild.stateNode.containerInfo === newChild.containerInfo && currentFirstChild.stateNode.implementation === newChild.implementation) {
deleteRemainingChildren(returnFiber, currentFirstChild.sibling);
currentFirstChild = useFiber(currentFirstChild, newChild.children || [], expirationTime);
currentFirstChild.return = returnFiber;
returnFiber = currentFirstChild;
break a;
}
deleteRemainingChildren(returnFiber, currentFirstChild);
break;
} else deleteChild(returnFiber, currentFirstChild);
currentFirstChild = currentFirstChild.sibling;
}
currentFirstChild = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);
currentFirstChild.return = returnFiber;
returnFiber = currentFirstChild;
}
return placeSingleChild(returnFiber);
}
if ("string" === typeof newChild || "number" === typeof newChild) return newChild = "" + newChild, null !== currentFirstChild && 6 === currentFirstChild.tag ? (deleteRemainingChildren(returnFiber, currentFirstChild.sibling), currentFirstChild = useFiber(currentFirstChild, newChild, expirationTime), currentFirstChild.return = returnFiber, returnFiber = currentFirstChild) : (deleteRemainingChildren(returnFiber, currentFirstChild), currentFirstChild = createFiberFromText(newChild, returnFiber.mode, expirationTime), currentFirstChild.return = returnFiber, returnFiber = currentFirstChild), placeSingleChild(returnFiber);
if (isArray(newChild)) return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);
if (getIteratorFn(newChild)) return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);
isObject && throwOnInvalidObjectType(returnFiber, newChild);
if ("undefined" === typeof newChild && !isUnkeyedTopLevelFragment) switch (returnFiber.tag) {
case 1:
case 0:
throw returnFiber = returnFiber.type, ReactError(Error((returnFiber.displayName || returnFiber.name || "Component") + "(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null."));
}
return deleteRemainingChildren(returnFiber, currentFirstChild);
};
}
var reconcileChildFibers = ChildReconciler(true),
mountChildFibers = ChildReconciler(false),
NO_CONTEXT = {},
contextStackCursor$1 = {
current: NO_CONTEXT
},
contextFiberStackCursor = {
current: NO_CONTEXT
},
rootInstanceStackCursor = {
current: NO_CONTEXT
};
function requiredContext(c) {
if (c === NO_CONTEXT) throw ReactError(Error("Expected host context to exist. This error is likely caused by a bug in React. Please file an issue."));
return c;
}
function pushHostContainer(fiber, nextRootInstance) {
push(rootInstanceStackCursor, nextRootInstance, fiber);
push(contextFiberStackCursor, fiber, fiber);
push(contextStackCursor$1, NO_CONTEXT, fiber);
pop(contextStackCursor$1, fiber);
push(contextStackCursor$1, {
isInAParentText: false
}, fiber);
}
function popHostContainer(fiber) {
pop(contextStackCursor$1, fiber);
pop(contextFiberStackCursor, fiber);
pop(rootInstanceStackCursor, fiber);
}
function pushHostContext(fiber) {
requiredContext(rootInstanceStackCursor.current);
var context = requiredContext(contextStackCursor$1.current);
var nextContext = fiber.type;
nextContext = "AndroidTextInput" === nextContext || "RCTMultilineTextInputView" === nextContext || "RCTSinglelineTextInputView" === nextContext || "RCTText" === nextContext || "RCTVirtualText" === nextContext;
nextContext = context.isInAParentText !== nextContext ? {
isInAParentText: nextContext
} : context;
context !== nextContext && (push(contextFiberStackCursor, fiber, fiber), push(contextStackCursor$1, nextContext, fiber));
}
function popHostContext(fiber) {
contextFiberStackCursor.current === fiber && (pop(contextStackCursor$1, fiber), pop(contextFiberStackCursor, fiber));
}
var SubtreeSuspenseContextMask = 1,
InvisibleParentSuspenseContext = 1,
ForceSuspenseFallback = 2,
suspenseStackCursor = {
current: 0
};
function findFirstSuspended(row) {
for (var node = row; null !== node;) {
if (13 === node.tag) {
if (null !== node.memoizedState) return node;
} else if (19 === node.tag && undefined !== node.memoizedProps.revealOrder) {
if (0 !== (node.effectTag & 64)) return node;
} else if (null !== node.child) {
node.child.return = node;
node = node.child;
continue;
}
if (node === row) break;
for (; null === node.sibling;) {
if (null === node.return || node.return === row) return null;
node = node.return;
}
node.sibling.return = node.return;
node = node.sibling;
}
return null;
}
function createResponderListener(responder, props) {
return {
responder: responder,
props: props
};
}
var NoEffect$1 = 0,
UnmountSnapshot = 2,
UnmountMutation = 4,
MountMutation = 8,
UnmountLayout = 16,
MountLayout = 32,
MountPassive = 64,
UnmountPassive = 128,
ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher,
renderExpirationTime$1 = 0,
currentlyRenderingFiber$1 = null,
currentHook = null,
nextCurrentHook = null,
firstWorkInProgressHook = null,
workInProgressHook = null,
nextWorkInProgressHook = null,
remainingExpirationTime = 0,
componentUpdateQueue = null,
sideEffectTag = 0,
didScheduleRenderPhaseUpdate = false,
renderPhaseUpdates = null,
numberOfReRenders = 0;
function throwInvalidHookError() {
throw ReactError(Error("Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem."));
}
function areHookInputsEqual(nextDeps, prevDeps) {
if (null === prevDeps) return false;
for (var i = 0; i < prevDeps.length && i < nextDeps.length; i++) {
if (!is(nextDeps[i], prevDeps[i])) return false;
}
return true;
}
function renderWithHooks(current, workInProgress, Component, props, refOrContext, nextRenderExpirationTime) {
renderExpirationTime$1 = nextRenderExpirationTime;
currentlyRenderingFiber$1 = workInProgress;
nextCurrentHook = null !== current ? current.memoizedState : null;
ReactCurrentDispatcher$1.current = null === nextCurrentHook ? HooksDispatcherOnMount : HooksDispatcherOnUpdate;
workInProgress = Component(props, refOrContext);
if (didScheduleRenderPhaseUpdate) {
do {
didScheduleRenderPhaseUpdate = false, numberOfReRenders += 1, nextCurrentHook = null !== current ? current.memoizedState : null, nextWorkInProgressHook = firstWorkInProgressHook, componentUpdateQueue = workInProgressHook = currentHook = null, ReactCurrentDispatcher$1.current = HooksDispatcherOnUpdate, workInProgress = Component(props, refOrContext);
} while (didScheduleRenderPhaseUpdate);
renderPhaseUpdates = null;
numberOfReRenders = 0;
}
ReactCurrentDispatcher$1.current = ContextOnlyDispatcher;
current = currentlyRenderingFiber$1;
current.memoizedState = firstWorkInProgressHook;
current.expirationTime = remainingExpirationTime;
current.updateQueue = componentUpdateQueue;
current.effectTag |= sideEffectTag;
current = null !== currentHook && null !== currentHook.next;
renderExpirationTime$1 = 0;
nextWorkInProgressHook = workInProgressHook = firstWorkInProgressHook = nextCurrentHook = currentHook = currentlyRenderingFiber$1 = null;
remainingExpirationTime = 0;
componentUpdateQueue = null;
sideEffectTag = 0;
if (current) throw ReactError(Error("Rendered fewer hooks than expected. This may be caused by an accidental early return statement."));
return workInProgress;
}
function resetHooks() {
ReactCurrentDispatcher$1.current = ContextOnlyDispatcher;
renderExpirationTime$1 = 0;
nextWorkInProgressHook = workInProgressHook = firstWorkInProgressHook = nextCurrentHook = currentHook = currentlyRenderingFiber$1 = null;
remainingExpirationTime = 0;
componentUpdateQueue = null;
sideEffectTag = 0;
didScheduleRenderPhaseUpdate = false;
renderPhaseUpdates = null;
numberOfReRenders = 0;
}
function mountWorkInProgressHook() {
var hook = {
memoizedState: null,
baseState: null,
queue: null,
baseUpdate: null,
next: null
};
null === workInProgressHook ? firstWorkInProgressHook = workInProgressHook = hook : workInProgressHook = workInProgressHook.next = hook;
return workInProgressHook;
}
function updateWorkInProgressHook() {
if (null !== nextWorkInProgressHook) workInProgressHook = nextWorkInProgressHook, nextWorkInProgressHook = workInProgressHook.next, currentHook = nextCurrentHook, nextCurrentHook = null !== currentHook ? currentHook.next : null;else {
if (null === nextCurrentHook) throw ReactError(Error("Rendered more hooks than during the previous render."));
currentHook = nextCurrentHook;
var newHook = {
memoizedState: currentHook.memoizedState,
baseState: currentHook.baseState,
queue: currentHook.queue,
baseUpdate: currentHook.baseUpdate,
next: null
};
workInProgressHook = null === workInProgressHook ? firstWorkInProgressHook = newHook : workInProgressHook.next = newHook;
nextCurrentHook = currentHook.next;
}
return workInProgressHook;
}
function basicStateReducer(state, action) {
return "function" === typeof action ? action(state) : action;
}
function updateReducer(reducer) {
var hook = updateWorkInProgressHook(),
queue = hook.queue;
if (null === queue) throw ReactError(Error("Should have a queue. This is likely a bug in React. Please file an issue."));
queue.lastRenderedReducer = reducer;
if (0 < numberOfReRenders) {
var _dispatch = queue.dispatch;
if (null !== renderPhaseUpdates) {
var firstRenderPhaseUpdate = renderPhaseUpdates.get(queue);
if (undefined !== firstRenderPhaseUpdate) {
renderPhaseUpdates.delete(queue);
var newState = hook.memoizedState;
do {
newState = reducer(newState, firstRenderPhaseUpdate.action), firstRenderPhaseUpdate = firstRenderPhaseUpdate.next;
} while (null !== firstRenderPhaseUpdate);
is(newState, hook.memoizedState) || (didReceiveUpdate = true);
hook.memoizedState = newState;
hook.baseUpdate === queue.last && (hook.baseState = newState);
queue.lastRenderedState = newState;
return [newState, _dispatch];
}
}
return [hook.memoizedState, _dispatch];
}
_dispatch = queue.last;
var baseUpdate = hook.baseUpdate;
newState = hook.baseState;
null !== baseUpdate ? (null !== _dispatch && (_dispatch.next = null), _dispatch = baseUpdate.next) : _dispatch = null !== _dispatch ? _dispatch.next : null;
if (null !== _dispatch) {
var newBaseUpdate = firstRenderPhaseUpdate = null,
_update = _dispatch,
didSkip = false;
do {
var updateExpirationTime = _update.expirationTime;
updateExpirationTime < renderExpirationTime$1 ? (didSkip || (didSkip = true, newBaseUpdate = baseUpdate, firstRenderPhaseUpdate = newState), updateExpirationTime > remainingExpirationTime && (remainingExpirationTime = updateExpirationTime)) : (markRenderEventTimeAndConfig(updateExpirationTime, _update.suspenseConfig), newState = _update.eagerReducer === reducer ? _update.eagerState : reducer(newState, _update.action));
baseUpdate = _update;
_update = _update.next;
} while (null !== _update && _update !== _dispatch);
didSkip || (newBaseUpdate = baseUpdate, firstRenderPhaseUpdate = newState);
is(newState, hook.memoizedState) || (didReceiveUpdate = true);
hook.memoizedState = newState;
hook.baseUpdate = newBaseUpdate;
hook.baseState = firstRenderPhaseUpdate;
queue.lastRenderedState = newState;
}
return [hook.memoizedState, queue.dispatch];
}
function pushEffect(tag, create, destroy, deps) {
tag = {
tag: tag,
create: create,
destroy: destroy,
deps: deps,
next: null
};
null === componentUpdateQueue ? (componentUpdateQueue = {
lastEffect: null
}, componentUpdateQueue.lastEffect = tag.next = tag) : (create = componentUpdateQueue.lastEffect, null === create ? componentUpdateQueue.lastEffect = tag.next = tag : (destroy = create.next, create.next = tag, tag.next = destroy, componentUpdateQueue.lastEffect = tag));
return tag;
}
function mountEffectImpl(fiberEffectTag, hookEffectTag, create, deps) {
var hook = mountWorkInProgressHook();
sideEffectTag |= fiberEffectTag;
hook.memoizedState = pushEffect(hookEffectTag, create, undefined, undefined === deps ? null : deps);
}
function updateEffectImpl(fiberEffectTag, hookEffectTag, create, deps) {
var hook = updateWorkInProgressHook();
deps = undefined === deps ? null : deps;
var destroy = undefined;
if (null !== currentHook) {
var prevEffect = currentHook.memoizedState;
destroy = prevEffect.destroy;
if (null !== deps && areHookInputsEqual(deps, prevEffect.deps)) {
pushEffect(NoEffect$1, create, destroy, deps);
return;
}
}
sideEffectTag |= fiberEffectTag;
hook.memoizedState = pushEffect(hookEffectTag, create, destroy, deps);
}
function imperativeHandleEffect(create, ref) {
if ("function" === typeof ref) return create = create(), ref(create), function () {
ref(null);
};
if (null !== ref && undefined !== ref) return create = create(), ref.current = create, function () {
ref.current = null;
};
}
function mountDebugValue() {}
function dispatchAction(fiber, queue, action) {
if (!(25 > numberOfReRenders)) throw ReactError(Error("Too many re-renders. React limits the number of renders to prevent an infinite loop."));
var alternate = fiber.alternate;
if (fiber === currentlyRenderingFiber$1 || null !== alternate && alternate === currentlyRenderingFiber$1) {
if (didScheduleRenderPhaseUpdate = true, fiber = {
expirationTime: renderExpirationTime$1,
suspenseConfig: null,
action: action,
eagerReducer: null,
eagerState: null,
next: null
}, null === renderPhaseUpdates && (renderPhaseUpdates = new Map()), action = renderPhaseUpdates.get(queue), undefined === action) renderPhaseUpdates.set(queue, fiber);else {
for (queue = action; null !== queue.next;) {
queue = queue.next;
}
queue.next = fiber;
}
} else {
var currentTime = requestCurrentTime(),
_suspenseConfig = ReactCurrentBatchConfig.suspense;
currentTime = computeExpirationForFiber(currentTime, fiber, _suspenseConfig);
_suspenseConfig = {
expirationTime: currentTime,
suspenseConfig: _suspenseConfig,
action: action,
eagerReducer: null,
eagerState: null,
next: null
};
var _last = queue.last;
if (null === _last) _suspenseConfig.next = _suspenseConfig;else {
var first = _last.next;
null !== first && (_suspenseConfig.next = first);
_last.next = _suspenseConfig;
}
queue.last = _suspenseConfig;
if (0 === fiber.expirationTime && (null === alternate || 0 === alternate.expirationTime) && (alternate = queue.lastRenderedReducer, null !== alternate)) try {
var currentState = queue.lastRenderedState,
_eagerState = alternate(currentState, action);
_suspenseConfig.eagerReducer = alternate;
_suspenseConfig.eagerState = _eagerState;
if (is(_eagerState, currentState)) return;
} catch (error) {} finally {}
scheduleUpdateOnFiber(fiber, currentTime);
}
}
var ContextOnlyDispatcher = {
readContext: readContext,
useCallback: throwInvalidHookError,
useContext: throwInvalidHookError,
useEffect: throwInvalidHookError,
useImperativeHandle: throwInvalidHookError,
useLayoutEffect: throwInvalidHookError,
useMemo: throwInvalidHookError,
useReducer: throwInvalidHookError,
useRef: throwInvalidHookError,
useState: throwInvalidHookError,
useDebugValue: throwInvalidHookError,
useResponder: throwInvalidHookError
},
HooksDispatcherOnMount = {
readContext: readContext,
useCallback: function useCallback(callback, deps) {
mountWorkInProgressHook().memoizedState = [callback, undefined === deps ? null : deps];
return callback;
},
useContext: readContext,
useEffect: function useEffect(create, deps) {
return mountEffectImpl(516, 192, create, deps);
},
useImperativeHandle: function useImperativeHandle(ref, create, deps) {
deps = null !== deps && undefined !== deps ? deps.concat([ref]) : null;
return mountEffectImpl(4, 36, imperativeHandleEffect.bind(null, create, ref), deps);
},
useLayoutEffect: function useLayoutEffect(create, deps) {
return mountEffectImpl(4, 36, create, deps);
},
useMemo: function useMemo(nextCreate, deps) {
var hook = mountWorkInProgressHook();
deps = undefined === deps ? null : deps;
nextCreate = nextCreate();
hook.memoizedState = [nextCreate, deps];
return nextCreate;
},
useReducer: function useReducer(reducer, initialArg, init) {
var hook = mountWorkInProgressHook();
initialArg = undefined !== init ? init(initialArg) : initialArg;
hook.memoizedState = hook.baseState = initialArg;
reducer = hook.queue = {
last: null,
dispatch: null,
lastRenderedReducer: reducer,
lastRenderedState: initialArg
};
reducer = reducer.dispatch = dispatchAction.bind(null, currentlyRenderingFiber$1, reducer);
return [hook.memoizedState, reducer];
},
useRef: function useRef(initialValue) {
var hook = mountWorkInProgressHook();
initialValue = {
current: initialValue
};
return hook.memoizedState = initialValue;
},
useState: function useState(initialState) {
var hook = mountWorkInProgressHook();
"function" === typeof initialState && (initialState = initialState());
hook.memoizedState = hook.baseState = initialState;
initialState = hook.queue = {
last: null,
dispatch: null,
lastRenderedReducer: basicStateReducer,
lastRenderedState: initialState
};
initialState = initialState.dispatch = dispatchAction.bind(null, currentlyRenderingFiber$1, initialState);
return [hook.memoizedState, initialState];
},
useDebugValue: mountDebugValue,
useResponder: createResponderListener
},
HooksDispatcherOnUpdate = {
readContext: readContext,
useCallback: function useCallback(callback, deps) {
var hook = updateWorkInProgressHook();
deps = undefined === deps ? null : deps;
var prevState = hook.memoizedState;
if (null !== prevState && null !== deps && areHookInputsEqual(deps, prevState[1])) return prevState[0];
hook.memoizedState = [callback, deps];
return callback;
},
useContext: readContext,
useEffect: function useEffect(create, deps) {
return updateEffectImpl(516, 192, create, deps);
},
useImperativeHandle: function useImperativeHandle(ref, create, deps) {
deps = null !== deps && undefined !== deps ? deps.concat([ref]) : null;
return updateEffectImpl(4, 36, imperativeHandleEffect.bind(null, create, ref), deps);
},
useLayoutEffect: function useLayoutEffect(create, deps) {
return updateEffectImpl(4, 36, create, deps);
},
useMemo: function useMemo(nextCreate, deps) {
var hook = updateWorkInProgressHook();
deps = undefined === deps ? null : deps;
var prevState = hook.memoizedState;
if (null !== prevState && null !== deps && areHookInputsEqual(deps, prevState[1])) return prevState[0];
nextCreate = nextCreate();
hook.memoizedState = [nextCreate, deps];
return nextCreate;
},
useReducer: updateReducer,
useRef: function useRef() {
return updateWorkInProgressHook().memoizedState;
},
useState: function useState(initialState) {
return updateReducer(basicStateReducer, initialState);
},
useDebugValue: mountDebugValue,
useResponder: createResponderListener
},
hydrationParentFiber = null,
nextHydratableInstance = null,
isHydrating = false;
function tryHydrate(fiber, nextInstance) {
switch (fiber.tag) {
case 5:
return nextInstance = shim$1(nextInstance, fiber.type, fiber.pendingProps), null !== nextInstance ? (fiber.stateNode = nextInstance, true) : false;
case 6:
return nextInstance = shim$1(nextInstance, fiber.pendingProps), null !== nextInstance ? (fiber.stateNode = nextInstance, true) : false;
case 13:
return false;
default:
return false;
}
}
function tryToClaimNextHydratableInstance(fiber$jscomp$0) {
if (isHydrating) {
var nextInstance = nextHydratableInstance;
if (nextInstance) {
var firstAttemptedInstance = nextInstance;
if (!tryHydrate(fiber$jscomp$0, nextInstance)) {
nextInstance = shim$1(firstAttemptedInstance);
if (!nextInstance || !tryHydrate(fiber$jscomp$0, nextInstance)) {
fiber$jscomp$0.effectTag |= 2;
isHydrating = false;
hydrationParentFiber = fiber$jscomp$0;
return;
}
var returnFiber = hydrationParentFiber,
fiber = createFiber(5, null, null, 0);
fiber.elementType = "DELETED";
fiber.type = "DELETED";
fiber.stateNode = firstAttemptedInstance;
fiber.return = returnFiber;
fiber.effectTag = 8;
null !== returnFiber.lastEffect ? (returnFiber.lastEffect.nextEffect = fiber, returnFiber.lastEffect = fiber) : returnFiber.firstEffect = returnFiber.lastEffect = fiber;
}
hydrationParentFiber = fiber$jscomp$0;
nextHydratableInstance = shim$1(nextInstance);
} else fiber$jscomp$0.effectTag |= 2, isHydrating = false, hydrationParentFiber = fiber$jscomp$0;
}
}
var ReactCurrentOwner$3 = ReactSharedInternals.ReactCurrentOwner,
didReceiveUpdate = false;
function reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime) {
workInProgress.child = null === current$$1 ? mountChildFibers(workInProgress, null, nextChildren, renderExpirationTime) : reconcileChildFibers(workInProgress, current$$1.child, nextChildren, renderExpirationTime);
}
function updateForwardRef(current$$1, workInProgress, Component, nextProps, renderExpirationTime) {
Component = Component.render;
var ref = workInProgress.ref;
prepareToReadContext(workInProgress, renderExpirationTime);
nextProps = renderWithHooks(current$$1, workInProgress, Component, nextProps, ref, renderExpirationTime);
if (null !== current$$1 && !didReceiveUpdate) return workInProgress.updateQueue = current$$1.updateQueue, workInProgress.effectTag &= -517, current$$1.expirationTime <= renderExpirationTime && (current$$1.expirationTime = 0), bailoutOnAlreadyFinishedWork(current$$1, workInProgress, renderExpirationTime);
workInProgress.effectTag |= 1;
reconcileChildren(current$$1, workInProgress, nextProps, renderExpirationTime);
return workInProgress.child;
}
function updateMemoComponent(current$$1, workInProgress, Component, nextProps, updateExpirationTime, renderExpirationTime) {
if (null === current$$1) {
var type = Component.type;
if ("function" === typeof type && !shouldConstruct(type) && undefined === type.defaultProps && null === Component.compare && undefined === Component.defaultProps) return workInProgress.tag = 15, workInProgress.type = type, updateSimpleMemoComponent(current$$1, workInProgress, type, nextProps, updateExpirationTime, renderExpirationTime);
current$$1 = createFiberFromTypeAndProps(Component.type, null, nextProps, null, workInProgress.mode, renderExpirationTime);
current$$1.ref = workInProgress.ref;
current$$1.return = workInProgress;
return workInProgress.child = current$$1;
}
type = current$$1.child;
if (updateExpirationTime < renderExpirationTime && (updateExpirationTime = type.memoizedProps, Component = Component.compare, Component = null !== Component ? Component : shallowEqual, Component(updateExpirationTime, nextProps) && current$$1.ref === workInProgress.ref)) return bailoutOnAlreadyFinishedWork(current$$1, workInProgress, renderExpirationTime);
workInProgress.effectTag |= 1;
current$$1 = createWorkInProgress(type, nextProps, renderExpirationTime);
current$$1.ref = workInProgress.ref;
current$$1.return = workInProgress;
return workInProgress.child = current$$1;
}
function updateSimpleMemoComponent(current$$1, workInProgress, Component, nextProps, updateExpirationTime, renderExpirationTime) {
return null !== current$$1 && shallowEqual(current$$1.memoizedProps, nextProps) && current$$1.ref === workInProgress.ref && (didReceiveUpdate = false, updateExpirationTime < renderExpirationTime) ? bailoutOnAlreadyFinishedWork(current$$1, workInProgress, renderExpirationTime) : updateFunctionComponent(current$$1, workInProgress, Component, nextProps, renderExpirationTime);
}
function markRef(current$$1, workInProgress) {
var ref = workInProgress.ref;
if (null === current$$1 && null !== ref || null !== current$$1 && current$$1.ref !== ref) workInProgress.effectTag |= 128;
}
function updateFunctionComponent(current$$1, workInProgress, Component, nextProps, renderExpirationTime) {
var context = isContextProvider(Component) ? previousContext : contextStackCursor.current;
context = getMaskedContext(workInProgress, context);
prepareToReadContext(workInProgress, renderExpirationTime);
Component = renderWithHooks(current$$1, workInProgress, Component, nextProps, context, renderExpirationTime);
if (null !== current$$1 && !didReceiveUpdate) return workInProgress.updateQueue = current$$1.updateQueue, workInProgress.effectTag &= -517, current$$1.expirationTime <= renderExpirationTime && (current$$1.expirationTime = 0), bailoutOnAlreadyFinishedWork(current$$1, workInProgress, renderExpirationTime);
workInProgress.effectTag |= 1;
reconcileChildren(current$$1, workInProgress, Component, renderExpirationTime);
return workInProgress.child;
}
function updateClassComponent(current$$1, workInProgress, Component, nextProps, renderExpirationTime) {
if (isContextProvider(Component)) {
var hasContext = true;
pushContextProvider(workInProgress);
} else hasContext = false;
prepareToReadContext(workInProgress, renderExpirationTime);
if (null === workInProgress.stateNode) null !== current$$1 && (current$$1.alternate = null, workInProgress.alternate = null, workInProgress.effectTag |= 2), constructClassInstance(workInProgress, Component, nextProps, renderExpirationTime), mountClassInstance(workInProgress, Component, nextProps, renderExpirationTime), nextProps = true;else if (null === current$$1) {
var instance = workInProgress.stateNode,
oldProps = workInProgress.memoizedProps;
instance.props = oldProps;
var oldContext = instance.context,
contextType = Component.contextType;
"object" === typeof contextType && null !== contextType ? contextType = readContext(contextType) : (contextType = isContextProvider(Component) ? previousContext : contextStackCursor.current, contextType = getMaskedContext(workInProgress, contextType));
var getDerivedStateFromProps = Component.getDerivedStateFromProps,
hasNewLifecycles = "function" === typeof getDerivedStateFromProps || "function" === typeof instance.getSnapshotBeforeUpdate;
hasNewLifecycles || "function" !== typeof instance.UNSAFE_componentWillReceiveProps && "function" !== typeof instance.componentWillReceiveProps || (oldProps !== nextProps || oldContext !== contextType) && callComponentWillReceiveProps(workInProgress, instance, nextProps, contextType);
hasForceUpdate = false;
var oldState = workInProgress.memoizedState;
oldContext = instance.state = oldState;
var updateQueue = workInProgress.updateQueue;
null !== updateQueue && (processUpdateQueue(workInProgress, updateQueue, nextProps, instance, renderExpirationTime), oldContext = workInProgress.memoizedState);
oldProps !== nextProps || oldState !== oldContext || didPerformWorkStackCursor.current || hasForceUpdate ? ("function" === typeof getDerivedStateFromProps && (applyDerivedStateFromProps(workInProgress, Component, getDerivedStateFromProps, nextProps), oldContext = workInProgress.memoizedState), (oldProps = hasForceUpdate || checkShouldComponentUpdate(workInProgress, Component, oldProps, nextProps, oldState, oldContext, contextType)) ? (hasNewLifecycles || "function" !== typeof instance.UNSAFE_componentWillMount && "function" !== typeof instance.componentWillMount || ("function" === typeof instance.componentWillMount && instance.componentWillMount(), "function" === typeof instance.UNSAFE_componentWillMount && instance.UNSAFE_componentWillMount()), "function" === typeof instance.componentDidMount && (workInProgress.effectTag |= 4)) : ("function" === typeof instance.componentDidMount && (workInProgress.effectTag |= 4), workInProgress.memoizedProps = nextProps, workInProgress.memoizedState = oldContext), instance.props = nextProps, instance.state = oldContext, instance.context = contextType, nextProps = oldProps) : ("function" === typeof instance.componentDidMount && (workInProgress.effectTag |= 4), nextProps = false);
} else instance = workInProgress.stateNode, oldProps = workInProgress.memoizedProps, instance.props = workInProgress.type === workInProgress.elementType ? oldProps : resolveDefaultProps(workInProgress.type, oldProps), oldContext = instance.context, contextType = Component.contextType, "object" === typeof contextType && null !== contextType ? contextType = readContext(contextType) : (contextType = isContextProvider(Component) ? previousContext : contextStackCursor.current, contextType = getMaskedContext(workInProgress, contextType)), getDerivedStateFromProps = Component.getDerivedStateFromProps, (hasNewLifecycles = "function" === typeof getDerivedStateFromProps || "function" === typeof instance.getSnapshotBeforeUpdate) || "function" !== typeof instance.UNSAFE_componentWillReceiveProps && "function" !== typeof instance.componentWillReceiveProps || (oldProps !== nextProps || oldContext !== contextType) && callComponentWillReceiveProps(workInProgress, instance, nextProps, contextType), hasForceUpdate = false, oldContext = workInProgress.memoizedState, oldState = instance.state = oldContext, updateQueue = workInProgress.updateQueue, null !== updateQueue && (processUpdateQueue(workInProgress, updateQueue, nextProps, instance, renderExpirationTime), oldState = workInProgress.memoizedState), oldProps !== nextProps || oldContext !== oldState || didPerformWorkStackCursor.current || hasForceUpdate ? ("function" === typeof getDerivedStateFromProps && (applyDerivedStateFromProps(workInProgress, Component, getDerivedStateFromProps, nextProps), oldState = workInProgress.memoizedState), (getDerivedStateFromProps = hasForceUpdate || checkShouldComponentUpdate(workInProgress, Component, oldProps, nextProps, oldContext, oldState, contextType)) ? (hasNewLifecycles || "function" !== typeof instance.UNSAFE_componentWillUpdate && "function" !== typeof instance.componentWillUpdate || ("function" === typeof instance.componentWillUpdate && instance.componentWillUpdate(nextProps, oldState, contextType), "function" === typeof instance.UNSAFE_componentWillUpdate && instance.UNSAFE_componentWillUpdate(nextProps, oldState, contextType)), "function" === typeof instance.componentDidUpdate && (workInProgress.effectTag |= 4), "function" === typeof instance.getSnapshotBeforeUpdate && (workInProgress.effectTag |= 256)) : ("function" !== typeof instance.componentDidUpdate || oldProps === current$$1.memoizedProps && oldContext === current$$1.memoizedState || (workInProgress.effectTag |= 4), "function" !== typeof instance.getSnapshotBeforeUpdate || oldProps === current$$1.memoizedProps && oldContext === current$$1.memoizedState || (workInProgress.effectTag |= 256), workInProgress.memoizedProps = nextProps, workInProgress.memoizedState = oldState), instance.props = nextProps, instance.state = oldState, instance.context = contextType, nextProps = getDerivedStateFromProps) : ("function" !== typeof instance.componentDidUpdate || oldProps === current$$1.memoizedProps && oldContext === current$$1.memoizedState || (workInProgress.effectTag |= 4), "function" !== typeof instance.getSnapshotBeforeUpdate || oldProps === current$$1.memoizedProps && oldContext === current$$1.memoizedState || (workInProgress.effectTag |= 256), nextProps = false);
return finishClassComponent(current$$1, workInProgress, Component, nextProps, hasContext, renderExpirationTime);
}
function finishClassComponent(current$$1, workInProgress, Component, shouldUpdate, hasContext, renderExpirationTime) {
markRef(current$$1, workInProgress);
var didCaptureError = 0 !== (workInProgress.effectTag & 64);
if (!shouldUpdate && !didCaptureError) return hasContext && invalidateContextProvider(workInProgress, Component, false), bailoutOnAlreadyFinishedWork(current$$1, workInProgress, renderExpirationTime);
shouldUpdate = workInProgress.stateNode;
ReactCurrentOwner$3.current = workInProgress;
var nextChildren = didCaptureError && "function" !== typeof Component.getDerivedStateFromError ? null : shouldUpdate.render();
workInProgress.effectTag |= 1;
null !== current$$1 && didCaptureError ? (workInProgress.child = reconcileChildFibers(workInProgress, current$$1.child, null, renderExpirationTime), workInProgress.child = reconcileChildFibers(workInProgress, null, nextChildren, renderExpirationTime)) : reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime);
workInProgress.memoizedState = shouldUpdate.state;
hasContext && invalidateContextProvider(workInProgress, Component, true);
return workInProgress.child;
}
function pushHostRootContext(workInProgress) {
var root = workInProgress.stateNode;
root.pendingContext ? pushTopLevelContextObject(workInProgress, root.pendingContext, root.pendingContext !== root.context) : root.context && pushTopLevelContextObject(workInProgress, root.context, false);
pushHostContainer(workInProgress, root.containerInfo);
}
var SUSPENDED_MARKER = {};
function updateSuspenseComponent(current$$1, workInProgress, renderExpirationTime) {
var mode = workInProgress.mode,
nextProps = workInProgress.pendingProps,
suspenseContext = suspenseStackCursor.current,
nextState = null,
nextDidTimeout = false,
JSCompiler_temp;
(JSCompiler_temp = 0 !== (workInProgress.effectTag & 64)) || (JSCompiler_temp = 0 !== (suspenseContext & ForceSuspenseFallback) && (null === current$$1 || null !== current$$1.memoizedState));
JSCompiler_temp ? (nextState = SUSPENDED_MARKER, nextDidTimeout = true, workInProgress.effectTag &= -65) : null !== current$$1 && null === current$$1.memoizedState || undefined === nextProps.fallback || true === nextProps.unstable_avoidThisFallback || (suspenseContext |= InvisibleParentSuspenseContext);
suspenseContext &= SubtreeSuspenseContextMask;
push(suspenseStackCursor, suspenseContext, workInProgress);
if (null === current$$1) {
if (nextDidTimeout) {
nextProps = nextProps.fallback;
current$$1 = createFiberFromFragment(null, mode, 0, null);
current$$1.return = workInProgress;
if (0 === (workInProgress.mode & 2)) for (nextDidTimeout = null !== workInProgress.memoizedState ? workInProgress.child.child : workInProgress.child, current$$1.child = nextDidTimeout; null !== nextDidTimeout;) {
nextDidTimeout.return = current$$1, nextDidTimeout = nextDidTimeout.sibling;
}
renderExpirationTime = createFiberFromFragment(nextProps, mode, renderExpirationTime, null);
renderExpirationTime.return = workInProgress;
current$$1.sibling = renderExpirationTime;
mode = current$$1;
} else mode = renderExpirationTime = mountChildFibers(workInProgress, null, nextProps.children, renderExpirationTime);
} else {
if (null !== current$$1.memoizedState) {
if (suspenseContext = current$$1.child, mode = suspenseContext.sibling, nextDidTimeout) {
nextProps = nextProps.fallback;
renderExpirationTime = createWorkInProgress(suspenseContext, suspenseContext.pendingProps, 0);
renderExpirationTime.return = workInProgress;
if (0 === (workInProgress.mode & 2) && (nextDidTimeout = null !== workInProgress.memoizedState ? workInProgress.child.child : workInProgress.child, nextDidTimeout !== suspenseContext.child)) for (renderExpirationTime.child = nextDidTimeout; null !== nextDidTimeout;) {
nextDidTimeout.return = renderExpirationTime, nextDidTimeout = nextDidTimeout.sibling;
}
nextProps = createWorkInProgress(mode, nextProps, mode.expirationTime);
nextProps.return = workInProgress;
renderExpirationTime.sibling = nextProps;
mode = renderExpirationTime;
renderExpirationTime.childExpirationTime = 0;
renderExpirationTime = nextProps;
} else mode = renderExpirationTime = reconcileChildFibers(workInProgress, suspenseContext.child, nextProps.children, renderExpirationTime);
} else if (suspenseContext = current$$1.child, nextDidTimeout) {
nextDidTimeout = nextProps.fallback;
nextProps = createFiberFromFragment(null, mode, 0, null);
nextProps.return = workInProgress;
nextProps.child = suspenseContext;
null !== suspenseContext && (suspenseContext.return = nextProps);
if (0 === (workInProgress.mode & 2)) for (suspenseContext = null !== workInProgress.memoizedState ? workInProgress.child.child : workInProgress.child, nextProps.child = suspenseContext; null !== suspenseContext;) {
suspenseContext.return = nextProps, suspenseContext = suspenseContext.sibling;
}
renderExpirationTime = createFiberFromFragment(nextDidTimeout, mode, renderExpirationTime, null);
renderExpirationTime.return = workInProgress;
nextProps.sibling = renderExpirationTime;
renderExpirationTime.effectTag |= 2;
mode = nextProps;
nextProps.childExpirationTime = 0;
} else renderExpirationTime = mode = reconcileChildFibers(workInProgress, suspenseContext, nextProps.children, renderExpirationTime);
workInProgress.stateNode = current$$1.stateNode;
}
workInProgress.memoizedState = nextState;
workInProgress.child = mode;
return renderExpirationTime;
}
function initSuspenseListRenderState(workInProgress, isBackwards, tail, lastContentRow, tailMode) {
var renderState = workInProgress.memoizedState;
null === renderState ? workInProgress.memoizedState = {
isBackwards: isBackwards,
rendering: null,
last: lastContentRow,
tail: tail,
tailExpiration: 0,
tailMode: tailMode
} : (renderState.isBackwards = isBackwards, renderState.rendering = null, renderState.last = lastContentRow, renderState.tail = tail, renderState.tailExpiration = 0, renderState.tailMode = tailMode);
}
function updateSuspenseListComponent(current$$1, workInProgress, renderExpirationTime) {
var nextProps = workInProgress.pendingProps,
revealOrder = nextProps.revealOrder,
tailMode = nextProps.tail;
reconcileChildren(current$$1, workInProgress, nextProps.children, renderExpirationTime);
nextProps = suspenseStackCursor.current;
if (0 !== (nextProps & ForceSuspenseFallback)) nextProps = nextProps & SubtreeSuspenseContextMask | ForceSuspenseFallback, workInProgress.effectTag |= 64;else {
if (null !== current$$1 && 0 !== (current$$1.effectTag & 64)) a: for (current$$1 = workInProgress.child; null !== current$$1;) {
if (13 === current$$1.tag) {
if (null !== current$$1.memoizedState) {
current$$1.expirationTime < renderExpirationTime && (current$$1.expirationTime = renderExpirationTime);
var alternate = current$$1.alternate;
null !== alternate && alternate.expirationTime < renderExpirationTime && (alternate.expirationTime = renderExpirationTime);
scheduleWorkOnParentPath(current$$1.return, renderExpirationTime);
}
} else if (null !== current$$1.child) {
current$$1.child.return = current$$1;
current$$1 = current$$1.child;
continue;
}
if (current$$1 === workInProgress) break a;
for (; null === current$$1.sibling;) {
if (null === current$$1.return || current$$1.return === workInProgress) break a;
current$$1 = current$$1.return;
}
current$$1.sibling.return = current$$1.return;
current$$1 = current$$1.sibling;
}
nextProps &= SubtreeSuspenseContextMask;
}
push(suspenseStackCursor, nextProps, workInProgress);
if (0 === (workInProgress.mode & 2)) workInProgress.memoizedState = null;else switch (revealOrder) {
case "forwards":
renderExpirationTime = workInProgress.child;
for (revealOrder = null; null !== renderExpirationTime;) {
nextProps = renderExpirationTime.alternate, null !== nextProps && null === findFirstSuspended(nextProps) && (revealOrder = renderExpirationTime), renderExpirationTime = renderExpirationTime.sibling;
}
renderExpirationTime = revealOrder;
null === renderExpirationTime ? (revealOrder = workInProgress.child, workInProgress.child = null) : (revealOrder = renderExpirationTime.sibling, renderExpirationTime.sibling = null);
initSuspenseListRenderState(workInProgress, false, revealOrder, renderExpirationTime, tailMode);
break;
case "backwards":
renderExpirationTime = null;
revealOrder = workInProgress.child;
for (workInProgress.child = null; null !== revealOrder;) {
nextProps = revealOrder.alternate;
if (null !== nextProps && null === findFirstSuspended(nextProps)) {
workInProgress.child = revealOrder;
break;
}
nextProps = revealOrder.sibling;
revealOrder.sibling = renderExpirationTime;
renderExpirationTime = revealOrder;
revealOrder = nextProps;
}
initSuspenseListRenderState(workInProgress, true, renderExpirationTime, null, tailMode);
break;
case "together":
initSuspenseListRenderState(workInProgress, false, null, null, undefined);
break;
default:
workInProgress.memoizedState = null;
}
return workInProgress.child;
}
function bailoutOnAlreadyFinishedWork(current$$1, workInProgress, renderExpirationTime) {
null !== current$$1 && (workInProgress.dependencies = current$$1.dependencies);
if (workInProgress.childExpirationTime < renderExpirationTime) return null;
if (null !== current$$1 && workInProgress.child !== current$$1.child) throw ReactError(Error("Resuming work not yet implemented."));
if (null !== workInProgress.child) {
current$$1 = workInProgress.child;
renderExpirationTime = createWorkInProgress(current$$1, current$$1.pendingProps, current$$1.expirationTime);
workInProgress.child = renderExpirationTime;
for (renderExpirationTime.return = workInProgress; null !== current$$1.sibling;) {
current$$1 = current$$1.sibling, renderExpirationTime = renderExpirationTime.sibling = createWorkInProgress(current$$1, current$$1.pendingProps, current$$1.expirationTime), renderExpirationTime.return = workInProgress;
}
renderExpirationTime.sibling = null;
}
return workInProgress.child;
}
var appendAllChildren = undefined,
updateHostContainer = undefined,
updateHostComponent$1 = undefined,
updateHostText$1 = undefined;
appendAllChildren = function appendAllChildren(parent, workInProgress) {
for (var node = workInProgress.child; null !== node;) {
if (5 === node.tag || 6 === node.tag) parent._children.push(node.stateNode);else if (4 !== node.tag && null !== node.child) {
node.child.return = node;
node = node.child;
continue;
}
if (node === workInProgress) break;
for (; null === node.sibling;) {
if (null === node.return || node.return === workInProgress) return;
node = node.return;
}
node.sibling.return = node.return;
node = node.sibling;
}
};
updateHostContainer = function updateHostContainer() {};
updateHostComponent$1 = function updateHostComponent$1(current, workInProgress, type, newProps) {
current.memoizedProps !== newProps && (requiredContext(contextStackCursor$1.current), workInProgress.updateQueue = UPDATE_SIGNAL) && (workInProgress.effectTag |= 4);
};
updateHostText$1 = function updateHostText$1(current, workInProgress, oldText, newText) {
oldText !== newText && (workInProgress.effectTag |= 4);
};
function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) {
switch (renderState.tailMode) {
case "hidden":
hasRenderedATailFallback = renderState.tail;
for (var lastTailNode = null; null !== hasRenderedATailFallback;) {
null !== hasRenderedATailFallback.alternate && (lastTailNode = hasRenderedATailFallback), hasRenderedATailFallback = hasRenderedATailFallback.sibling;
}
null === lastTailNode ? renderState.tail = null : lastTailNode.sibling = null;
break;
case "collapsed":
lastTailNode = renderState.tail;
for (var _lastTailNode = null; null !== lastTailNode;) {
null !== lastTailNode.alternate && (_lastTailNode = lastTailNode), lastTailNode = lastTailNode.sibling;
}
null === _lastTailNode ? hasRenderedATailFallback || null === renderState.tail ? renderState.tail = null : renderState.tail.sibling = null : _lastTailNode.sibling = null;
}
}
function unwindWork(workInProgress) {
switch (workInProgress.tag) {
case 1:
isContextProvider(workInProgress.type) && popContext(workInProgress);
var effectTag = workInProgress.effectTag;
return effectTag & 2048 ? (workInProgress.effectTag = effectTag & -2049 | 64, workInProgress) : null;
case 3:
popHostContainer(workInProgress);
popTopLevelContextObject(workInProgress);
effectTag = workInProgress.effectTag;
if (0 !== (effectTag & 64)) throw ReactError(Error("The root failed to unmount after an error. This is likely a bug in React. Please file an issue."));
workInProgress.effectTag = effectTag & -2049 | 64;
return workInProgress;
case 5:
return popHostContext(workInProgress), null;
case 13:
return pop(suspenseStackCursor, workInProgress), effectTag = workInProgress.effectTag, effectTag & 2048 ? (workInProgress.effectTag = effectTag & -2049 | 64, workInProgress) : null;
case 18:
return null;
case 19:
return pop(suspenseStackCursor, workInProgress), null;
case 4:
return popHostContainer(workInProgress), null;
case 10:
return popProvider(workInProgress), null;
default:
return null;
}
}
function createCapturedValue(value, source) {
return {
value: value,
source: source,
stack: getStackByFiberInDevAndProd(source)
};
}
if ("function" !== typeof ReactNativePrivateInterface.ReactFiberErrorDialog.showErrorDialog) throw ReactError(Error("Expected ReactFiberErrorDialog.showErrorDialog to be a function."));
function logCapturedError(capturedError) {
false !== ReactNativePrivateInterface.ReactFiberErrorDialog.showErrorDialog(capturedError) && undefined;
}
var PossiblyWeakSet$1 = "function" === typeof WeakSet ? WeakSet : Set;
function logError(boundary, errorInfo) {
var source = errorInfo.source,
stack = errorInfo.stack;
null === stack && null !== source && (stack = getStackByFiberInDevAndProd(source));
errorInfo = {
componentName: null !== source ? getComponentName(source.type) : null,
componentStack: null !== stack ? stack : "",
error: errorInfo.value,
errorBoundary: null,
errorBoundaryName: null,
errorBoundaryFound: false,
willRetry: false
};
null !== boundary && 1 === boundary.tag && (errorInfo.errorBoundary = boundary.stateNode, errorInfo.errorBoundaryName = getComponentName(boundary.type), errorInfo.errorBoundaryFound = true, errorInfo.willRetry = true);
try {
logCapturedError(errorInfo);
} catch (e) {
setTimeout(function () {
throw e;
});
}
}
function safelyCallComponentWillUnmount(current$$1, instance) {
try {
instance.props = current$$1.memoizedProps, instance.state = current$$1.memoizedState, instance.componentWillUnmount();
} catch (unmountError) {
captureCommitPhaseError(current$$1, unmountError);
}
}
function safelyDetachRef(current$$1) {
var ref = current$$1.ref;
if (null !== ref) if ("function" === typeof ref) try {
ref(null);
} catch (refError) {
captureCommitPhaseError(current$$1, refError);
} else ref.current = null;
}
function commitHookEffectList(unmountTag, mountTag, finishedWork) {
finishedWork = finishedWork.updateQueue;
finishedWork = null !== finishedWork ? finishedWork.lastEffect : null;
if (null !== finishedWork) {
var effect = finishedWork = finishedWork.next;
do {
if ((effect.tag & unmountTag) !== NoEffect$1) {
var destroy = effect.destroy;
effect.destroy = undefined;
undefined !== destroy && destroy();
}
(effect.tag & mountTag) !== NoEffect$1 && (destroy = effect.create, effect.destroy = destroy());
effect = effect.next;
} while (effect !== finishedWork);
}
}
function commitUnmount(current$$1$jscomp$0, renderPriorityLevel) {
"function" === typeof onCommitFiberUnmount && onCommitFiberUnmount(current$$1$jscomp$0);
switch (current$$1$jscomp$0.tag) {
case 0:
case 11:
case 14:
case 15:
var updateQueue = current$$1$jscomp$0.updateQueue;
if (null !== updateQueue && (updateQueue = updateQueue.lastEffect, null !== updateQueue)) {
var firstEffect = updateQueue.next;
runWithPriority(97 < renderPriorityLevel ? 97 : renderPriorityLevel, function () {
var effect = firstEffect;
do {
var destroy = effect.destroy;
if (undefined !== destroy) {
var current$$1 = current$$1$jscomp$0;
try {
destroy();
} catch (error) {
captureCommitPhaseError(current$$1, error);
}
}
effect = effect.next;
} while (effect !== firstEffect);
});
}
break;
case 1:
safelyDetachRef(current$$1$jscomp$0);
renderPriorityLevel = current$$1$jscomp$0.stateNode;
"function" === typeof renderPriorityLevel.componentWillUnmount && safelyCallComponentWillUnmount(current$$1$jscomp$0, renderPriorityLevel);
break;
case 5:
safelyDetachRef(current$$1$jscomp$0);
break;
case 4:
unmountHostComponents(current$$1$jscomp$0, renderPriorityLevel);
}
}
function detachFiber(current$$1) {
var alternate = current$$1.alternate;
current$$1.return = null;
current$$1.child = null;
current$$1.memoizedState = null;
current$$1.updateQueue = null;
current$$1.dependencies = null;
current$$1.alternate = null;
current$$1.firstEffect = null;
current$$1.lastEffect = null;
current$$1.pendingProps = null;
current$$1.memoizedProps = null;
null !== alternate && detachFiber(alternate);
}
function isHostParent(fiber) {
return 5 === fiber.tag || 3 === fiber.tag || 4 === fiber.tag;
}
function commitPlacement(finishedWork) {
a: {
for (var parent = finishedWork.return; null !== parent;) {
if (isHostParent(parent)) {
var parentFiber = parent;
break a;
}
parent = parent.return;
}
throw ReactError(Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue."));
}
parent = parentFiber.stateNode;
switch (parentFiber.tag) {
case 5:
var isContainer = false;
break;
case 3:
parent = parent.containerInfo;
isContainer = true;
break;
case 4:
parent = parent.containerInfo;
isContainer = true;
break;
default:
throw ReactError(Error("Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue."));
}
parentFiber.effectTag & 16 && (parentFiber.effectTag &= -17);
a: b: for (parentFiber = finishedWork;;) {
for (; null === parentFiber.sibling;) {
if (null === parentFiber.return || isHostParent(parentFiber.return)) {
parentFiber = null;
break a;
}
parentFiber = parentFiber.return;
}
parentFiber.sibling.return = parentFiber.return;
for (parentFiber = parentFiber.sibling; 5 !== parentFiber.tag && 6 !== parentFiber.tag && 18 !== parentFiber.tag;) {
if (parentFiber.effectTag & 2) continue b;
if (null === parentFiber.child || 4 === parentFiber.tag) continue b;else parentFiber.child.return = parentFiber, parentFiber = parentFiber.child;
}
if (!(parentFiber.effectTag & 2)) {
parentFiber = parentFiber.stateNode;
break a;
}
}
for (var node = finishedWork;;) {
var isHost = 5 === node.tag || 6 === node.tag;
if (isHost) {
var stateNode = isHost ? node.stateNode : node.stateNode.instance;
if (parentFiber) {
if (isContainer) {
if ("number" === typeof parent) throw ReactError(Error("Container does not support insertBefore operation"));
} else {
isHost = parent;
var beforeChild = parentFiber,
children = isHost._children,
index = children.indexOf(stateNode);
0 <= index ? (children.splice(index, 1), beforeChild = children.indexOf(beforeChild), children.splice(beforeChild, 0, stateNode), ReactNativePrivateInterface.UIManager.manageChildren(isHost._nativeTag, [index], [beforeChild], [], [], [])) : (index = children.indexOf(beforeChild), children.splice(index, 0, stateNode), ReactNativePrivateInterface.UIManager.manageChildren(isHost._nativeTag, [], [], ["number" === typeof stateNode ? stateNode : stateNode._nativeTag], [index], []));
}
} else isContainer ? ReactNativePrivateInterface.UIManager.setChildren(parent, ["number" === typeof stateNode ? stateNode : stateNode._nativeTag]) : (isHost = parent, children = "number" === typeof stateNode ? stateNode : stateNode._nativeTag, index = isHost._children, beforeChild = index.indexOf(stateNode), 0 <= beforeChild ? (index.splice(beforeChild, 1), index.push(stateNode), ReactNativePrivateInterface.UIManager.manageChildren(isHost._nativeTag, [beforeChild], [index.length - 1], [], [], [])) : (index.push(stateNode), ReactNativePrivateInterface.UIManager.manageChildren(isHost._nativeTag, [], [], [children], [index.length - 1], [])));
} else if (4 !== node.tag && null !== node.child) {
node.child.return = node;
node = node.child;
continue;
}
if (node === finishedWork) break;
for (; null === node.sibling;) {
if (null === node.return || node.return === finishedWork) return;
node = node.return;
}
node.sibling.return = node.return;
node = node.sibling;
}
}
function unmountHostComponents(current$$1, renderPriorityLevel$jscomp$0) {
for (var node = current$$1, currentParentIsValid = false, currentParent = undefined, currentParentIsContainer = undefined;;) {
if (!currentParentIsValid) {
currentParentIsValid = node.return;
a: for (;;) {
if (null === currentParentIsValid) throw ReactError(Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue."));
currentParent = currentParentIsValid.stateNode;
switch (currentParentIsValid.tag) {
case 5:
currentParentIsContainer = false;
break a;
case 3:
currentParent = currentParent.containerInfo;
currentParentIsContainer = true;
break a;
case 4:
currentParent = currentParent.containerInfo;
currentParentIsContainer = true;
break a;
}
currentParentIsValid = currentParentIsValid.return;
}
currentParentIsValid = true;
}
if (5 === node.tag || 6 === node.tag) {
a: for (var root = node, renderPriorityLevel = renderPriorityLevel$jscomp$0, node$jscomp$0 = root;;) {
if (commitUnmount(node$jscomp$0, renderPriorityLevel), null !== node$jscomp$0.child && 4 !== node$jscomp$0.tag) node$jscomp$0.child.return = node$jscomp$0, node$jscomp$0 = node$jscomp$0.child;else {
if (node$jscomp$0 === root) break;
for (; null === node$jscomp$0.sibling;) {
if (null === node$jscomp$0.return || node$jscomp$0.return === root) break a;
node$jscomp$0 = node$jscomp$0.return;
}
node$jscomp$0.sibling.return = node$jscomp$0.return;
node$jscomp$0 = node$jscomp$0.sibling;
}
}
currentParentIsContainer ? (root = currentParent, recursivelyUncacheFiberNode(node.stateNode), ReactNativePrivateInterface.UIManager.manageChildren(root, [], [], [], [], [0])) : (root = currentParent, node$jscomp$0 = node.stateNode, recursivelyUncacheFiberNode(node$jscomp$0), renderPriorityLevel = root._children, node$jscomp$0 = renderPriorityLevel.indexOf(node$jscomp$0), renderPriorityLevel.splice(node$jscomp$0, 1), ReactNativePrivateInterface.UIManager.manageChildren(root._nativeTag, [], [], [], [], [node$jscomp$0]));
} else if (4 === node.tag) {
if (null !== node.child) {
currentParent = node.stateNode.containerInfo;
currentParentIsContainer = true;
node.child.return = node;
node = node.child;
continue;
}
} else if (commitUnmount(node, renderPriorityLevel$jscomp$0), null !== node.child) {
node.child.return = node;
node = node.child;
continue;
}
if (node === current$$1) break;
for (; null === node.sibling;) {
if (null === node.return || node.return === current$$1) return;
node = node.return;
4 === node.tag && (currentParentIsValid = false);
}
node.sibling.return = node.return;
node = node.sibling;
}
}
function commitWork(current$$1, finishedWork) {
switch (finishedWork.tag) {
case 0:
case 11:
case 14:
case 15:
commitHookEffectList(UnmountMutation, MountMutation, finishedWork);
break;
case 1:
break;
case 5:
var instance = finishedWork.stateNode;
if (null != instance) {
var newProps = finishedWork.memoizedProps;
current$$1 = null !== current$$1 ? current$$1.memoizedProps : newProps;
var updatePayload = finishedWork.updateQueue;
finishedWork.updateQueue = null;
null !== updatePayload && (finishedWork = instance.viewConfig, instanceProps.set(instance._nativeTag, newProps), newProps = diffProperties(null, current$$1, newProps, finishedWork.validAttributes), null != newProps && ReactNativePrivateInterface.UIManager.updateView(instance._nativeTag, finishedWork.uiViewClassName, newProps));
}
break;
case 6:
if (null === finishedWork.stateNode) throw ReactError(Error("This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue."));
ReactNativePrivateInterface.UIManager.updateView(finishedWork.stateNode, "RCTRawText", {
text: finishedWork.memoizedProps
});
break;
case 3:
break;
case 12:
break;
case 13:
instance = finishedWork;
null === finishedWork.memoizedState ? newProps = false : (newProps = true, instance = finishedWork.child, globalMostRecentFallbackTime = now());
if (null !== instance) a: for (current$$1 = instance;;) {
if (5 === current$$1.tag) {
if (updatePayload = current$$1.stateNode, newProps) {
var viewConfig = updatePayload.viewConfig;
var updatePayload$jscomp$0 = diffProperties(null, emptyObject, {
style: {
display: "none"
}
}, viewConfig.validAttributes);
ReactNativePrivateInterface.UIManager.updateView(updatePayload._nativeTag, viewConfig.uiViewClassName, updatePayload$jscomp$0);
} else {
updatePayload = current$$1.stateNode;
updatePayload$jscomp$0 = current$$1.memoizedProps;
viewConfig = updatePayload.viewConfig;
var prevProps = _extends({}, updatePayload$jscomp$0, {
style: [updatePayload$jscomp$0.style, {
display: "none"
}]
});
updatePayload$jscomp$0 = diffProperties(null, prevProps, updatePayload$jscomp$0, viewConfig.validAttributes);
ReactNativePrivateInterface.UIManager.updateView(updatePayload._nativeTag, viewConfig.uiViewClassName, updatePayload$jscomp$0);
}
} else {
if (6 === current$$1.tag) throw Error("Not yet implemented.");
if (13 === current$$1.tag && null !== current$$1.memoizedState) {
updatePayload = current$$1.child.sibling;
updatePayload.return = current$$1;
current$$1 = updatePayload;
continue;
} else if (null !== current$$1.child) {
current$$1.child.return = current$$1;
current$$1 = current$$1.child;
continue;
}
}
if (current$$1 === instance) break a;
for (; null === current$$1.sibling;) {
if (null === current$$1.return || current$$1.return === instance) break a;
current$$1 = current$$1.return;
}
current$$1.sibling.return = current$$1.return;
current$$1 = current$$1.sibling;
}
attachSuspenseRetryListeners(finishedWork);
break;
case 19:
attachSuspenseRetryListeners(finishedWork);
break;
case 17:
break;
case 20:
break;
default:
throw ReactError(Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue."));
}
}
function attachSuspenseRetryListeners(finishedWork) {
var thenables = finishedWork.updateQueue;
if (null !== thenables) {
finishedWork.updateQueue = null;
var retryCache = finishedWork.stateNode;
null === retryCache && (retryCache = finishedWork.stateNode = new PossiblyWeakSet$1());
thenables.forEach(function (thenable) {
var retry = resolveRetryThenable.bind(null, finishedWork, thenable);
retryCache.has(thenable) || (retryCache.add(thenable), thenable.then(retry, retry));
});
}
}
var PossiblyWeakMap = "function" === typeof WeakMap ? WeakMap : Map;
function createRootErrorUpdate(fiber, errorInfo, expirationTime) {
expirationTime = createUpdate(expirationTime, null);
expirationTime.tag = 3;
expirationTime.payload = {
element: null
};
var error = errorInfo.value;
expirationTime.callback = function () {
hasUncaughtError || (hasUncaughtError = true, firstUncaughtError = error);
logError(fiber, errorInfo);
};
return expirationTime;
}
function createClassErrorUpdate(fiber, errorInfo, expirationTime) {
expirationTime = createUpdate(expirationTime, null);
expirationTime.tag = 3;
var getDerivedStateFromError = fiber.type.getDerivedStateFromError;
if ("function" === typeof getDerivedStateFromError) {
var error = errorInfo.value;
expirationTime.payload = function () {
logError(fiber, errorInfo);
return getDerivedStateFromError(error);
};
}
var inst = fiber.stateNode;
null !== inst && "function" === typeof inst.componentDidCatch && (expirationTime.callback = function () {
"function" !== typeof getDerivedStateFromError && (null === legacyErrorBoundariesThatAlreadyFailed ? legacyErrorBoundariesThatAlreadyFailed = new Set([this]) : legacyErrorBoundariesThatAlreadyFailed.add(this), logError(fiber, errorInfo));
var stack = errorInfo.stack;
this.componentDidCatch(errorInfo.value, {
componentStack: null !== stack ? stack : ""
});
});
return expirationTime;
}
var ceil = Math.ceil,
ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher,
ReactCurrentOwner$2 = ReactSharedInternals.ReactCurrentOwner,
NoContext = 0,
LegacyUnbatchedContext = 8,
RenderContext = 16,
CommitContext = 32,
RootIncomplete = 0,
RootErrored = 1,
RootSuspended = 2,
RootSuspendedWithDelay = 3,
RootCompleted = 4,
executionContext = NoContext,
workInProgressRoot = null,
workInProgress = null,
renderExpirationTime = 0,
workInProgressRootExitStatus = RootIncomplete,
workInProgressRootLatestProcessedExpirationTime = 1073741823,
workInProgressRootLatestSuspenseTimeout = 1073741823,
workInProgressRootCanSuspendUsingConfig = null,
workInProgressRootHasPendingPing = false,
globalMostRecentFallbackTime = 0,
FALLBACK_THROTTLE_MS = 500,
nextEffect = null,
hasUncaughtError = false,
firstUncaughtError = null,
legacyErrorBoundariesThatAlreadyFailed = null,
rootDoesHavePassiveEffects = false,
rootWithPendingPassiveEffects = null,
pendingPassiveEffectsRenderPriority = 90,
pendingPassiveEffectsExpirationTime = 0,
rootsWithPendingDiscreteUpdates = null,
nestedUpdateCount = 0,
rootWithNestedUpdates = null,
currentEventTime = 0;
function requestCurrentTime() {
return (executionContext & 48) !== NoContext ? 1073741821 - (now() / 10 | 0) : 0 !== currentEventTime ? currentEventTime : currentEventTime = 1073741821 - (now() / 10 | 0);
}
function computeExpirationForFiber(currentTime, fiber, suspenseConfig) {
fiber = fiber.mode;
if (0 === (fiber & 2)) return 1073741823;
var priorityLevel = getCurrentPriorityLevel();
if (0 === (fiber & 4)) return 99 === priorityLevel ? 1073741823 : 1073741822;
if ((executionContext & RenderContext) !== NoContext) return renderExpirationTime;
if (null !== suspenseConfig) currentTime = 1073741821 - 25 * (((1073741821 - currentTime + (suspenseConfig.timeoutMs | 0 || 5e3) / 10) / 25 | 0) + 1);else switch (priorityLevel) {
case 99:
currentTime = 1073741823;
break;
case 98:
currentTime = 1073741821 - 10 * (((1073741821 - currentTime + 15) / 10 | 0) + 1);
break;
case 97:
case 96:
currentTime = 1073741821 - 25 * (((1073741821 - currentTime + 500) / 25 | 0) + 1);
break;
case 95:
currentTime = 1;
break;
default:
throw ReactError(Error("Expected a valid priority level"));
}
null !== workInProgressRoot && currentTime === renderExpirationTime && --currentTime;
return currentTime;
}
function scheduleUpdateOnFiber(fiber, expirationTime) {
if (50 < nestedUpdateCount) throw nestedUpdateCount = 0, rootWithNestedUpdates = null, ReactError(Error("Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops."));
fiber = markUpdateTimeFromFiberToRoot(fiber, expirationTime);
if (null !== fiber) {
fiber.pingTime = 0;
var priorityLevel = getCurrentPriorityLevel();
if (1073741823 === expirationTime) {
if ((executionContext & LegacyUnbatchedContext) !== NoContext && (executionContext & 48) === NoContext) for (var callback = renderRoot(fiber, 1073741823, true); null !== callback;) {
callback = callback(true);
} else scheduleCallbackForRoot(fiber, 99, 1073741823), executionContext === NoContext && flushSyncCallbackQueue();
} else scheduleCallbackForRoot(fiber, priorityLevel, expirationTime);
(executionContext & 4) === NoContext || 98 !== priorityLevel && 99 !== priorityLevel || (null === rootsWithPendingDiscreteUpdates ? rootsWithPendingDiscreteUpdates = new Map([[fiber, expirationTime]]) : (priorityLevel = rootsWithPendingDiscreteUpdates.get(fiber), (undefined === priorityLevel || priorityLevel > expirationTime) && rootsWithPendingDiscreteUpdates.set(fiber, expirationTime)));
}
}
function markUpdateTimeFromFiberToRoot(fiber, expirationTime) {
fiber.expirationTime < expirationTime && (fiber.expirationTime = expirationTime);
var alternate = fiber.alternate;
null !== alternate && alternate.expirationTime < expirationTime && (alternate.expirationTime = expirationTime);
var node = fiber.return,
root = null;
if (null === node && 3 === fiber.tag) root = fiber.stateNode;else for (; null !== node;) {
alternate = node.alternate;
node.childExpirationTime < expirationTime && (node.childExpirationTime = expirationTime);
null !== alternate && alternate.childExpirationTime < expirationTime && (alternate.childExpirationTime = expirationTime);
if (null === node.return && 3 === node.tag) {
root = node.stateNode;
break;
}
node = node.return;
}
null !== root && (expirationTime > root.firstPendingTime && (root.firstPendingTime = expirationTime), fiber = root.lastPendingTime, 0 === fiber || expirationTime < fiber) && (root.lastPendingTime = expirationTime);
return root;
}
function scheduleCallbackForRoot(root, priorityLevel, expirationTime) {
if (root.callbackExpirationTime < expirationTime) {
var existingCallbackNode = root.callbackNode;
null !== existingCallbackNode && existingCallbackNode !== fakeCallbackNode && Scheduler_cancelCallback(existingCallbackNode);
root.callbackExpirationTime = expirationTime;
1073741823 === expirationTime ? root.callbackNode = scheduleSyncCallback(runRootCallback.bind(null, root, renderRoot.bind(null, root, expirationTime))) : (existingCallbackNode = null, 1 !== expirationTime && (existingCallbackNode = {
timeout: 10 * (1073741821 - expirationTime) - now()
}), root.callbackNode = scheduleCallback(priorityLevel, runRootCallback.bind(null, root, renderRoot.bind(null, root, expirationTime)), existingCallbackNode));
}
}
function runRootCallback(root, callback, isSync) {
var prevCallbackNode = root.callbackNode,
continuation = null;
try {
return continuation = callback(isSync), null !== continuation ? runRootCallback.bind(null, root, continuation) : null;
} finally {
null === continuation && prevCallbackNode === root.callbackNode && (root.callbackNode = null, root.callbackExpirationTime = 0);
}
}
function resolveLocksOnRoot(root, expirationTime) {
var firstBatch = root.firstBatch;
return null !== firstBatch && firstBatch._defer && firstBatch._expirationTime >= expirationTime ? (scheduleCallback(97, function () {
firstBatch._onComplete();
return null;
}), true) : false;
}
function flushPendingDiscreteUpdates() {
if (null !== rootsWithPendingDiscreteUpdates) {
var roots = rootsWithPendingDiscreteUpdates;
rootsWithPendingDiscreteUpdates = null;
roots.forEach(function (expirationTime, root) {
scheduleSyncCallback(renderRoot.bind(null, root, expirationTime));
});
flushSyncCallbackQueue();
}
}
function prepareFreshStack(root, expirationTime) {
root.finishedWork = null;
root.finishedExpirationTime = 0;
var timeoutHandle = root.timeoutHandle;
-1 !== timeoutHandle && (root.timeoutHandle = -1, cancelTimeout(timeoutHandle));
if (null !== workInProgress) for (timeoutHandle = workInProgress.return; null !== timeoutHandle;) {
var interruptedWork = timeoutHandle;
switch (interruptedWork.tag) {
case 1:
var childContextTypes = interruptedWork.type.childContextTypes;
null !== childContextTypes && undefined !== childContextTypes && popContext(interruptedWork);
break;
case 3:
popHostContainer(interruptedWork);
popTopLevelContextObject(interruptedWork);
break;
case 5:
popHostContext(interruptedWork);
break;
case 4:
popHostContainer(interruptedWork);
break;
case 13:
pop(suspenseStackCursor, interruptedWork);
break;
case 19:
pop(suspenseStackCursor, interruptedWork);
break;
case 10:
popProvider(interruptedWork);
}
timeoutHandle = timeoutHandle.return;
}
workInProgressRoot = root;
workInProgress = createWorkInProgress(root.current, null, expirationTime);
renderExpirationTime = expirationTime;
workInProgressRootExitStatus = RootIncomplete;
workInProgressRootLatestSuspenseTimeout = workInProgressRootLatestProcessedExpirationTime = 1073741823;
workInProgressRootCanSuspendUsingConfig = null;
workInProgressRootHasPendingPing = false;
}
function renderRoot(root$jscomp$0, expirationTime, isSync) {
if ((executionContext & 48) !== NoContext) throw ReactError(Error("Should not already be working."));
if (root$jscomp$0.firstPendingTime < expirationTime) return null;
if (isSync && root$jscomp$0.finishedExpirationTime === expirationTime) return commitRoot.bind(null, root$jscomp$0);
flushPassiveEffects();
if (root$jscomp$0 !== workInProgressRoot || expirationTime !== renderExpirationTime) prepareFreshStack(root$jscomp$0, expirationTime);else if (workInProgressRootExitStatus === RootSuspendedWithDelay) if (workInProgressRootHasPendingPing) prepareFreshStack(root$jscomp$0, expirationTime);else {
var lastPendingTime = root$jscomp$0.lastPendingTime;
if (lastPendingTime < expirationTime) return renderRoot.bind(null, root$jscomp$0, lastPendingTime);
}
if (null !== workInProgress) {
lastPendingTime = executionContext;
executionContext |= RenderContext;
var prevDispatcher = ReactCurrentDispatcher.current;
null === prevDispatcher && (prevDispatcher = ContextOnlyDispatcher);
ReactCurrentDispatcher.current = ContextOnlyDispatcher;
if (isSync) {
if (1073741823 !== expirationTime) {
var currentTime = requestCurrentTime();
if (currentTime < expirationTime) return executionContext = lastPendingTime, resetContextDependencies(), ReactCurrentDispatcher.current = prevDispatcher, renderRoot.bind(null, root$jscomp$0, currentTime);
}
} else currentEventTime = 0;
do {
try {
if (isSync) for (; null !== workInProgress;) {
workInProgress = performUnitOfWork(workInProgress);
} else for (; null !== workInProgress && !Scheduler_shouldYield();) {
workInProgress = performUnitOfWork(workInProgress);
}
break;
} catch (thrownValue) {
resetContextDependencies();
resetHooks();
currentTime = workInProgress;
if (null === currentTime || null === currentTime.return) throw prepareFreshStack(root$jscomp$0, expirationTime), executionContext = lastPendingTime, thrownValue;
a: {
var root = root$jscomp$0,
returnFiber = currentTime.return,
sourceFiber = currentTime,
value = thrownValue,
renderExpirationTime$jscomp$0 = renderExpirationTime;
sourceFiber.effectTag |= 1024;
sourceFiber.firstEffect = sourceFiber.lastEffect = null;
if (null !== value && "object" === typeof value && "function" === typeof value.then) {
var thenable = value,
hasInvisibleParentBoundary = 0 !== (suspenseStackCursor.current & InvisibleParentSuspenseContext);
value = returnFiber;
do {
var JSCompiler_temp;
if (JSCompiler_temp = 13 === value.tag) null !== value.memoizedState ? JSCompiler_temp = false : (JSCompiler_temp = value.memoizedProps, JSCompiler_temp = undefined === JSCompiler_temp.fallback ? false : true !== JSCompiler_temp.unstable_avoidThisFallback ? true : hasInvisibleParentBoundary ? false : true);
if (JSCompiler_temp) {
returnFiber = value.updateQueue;
null === returnFiber ? (returnFiber = new Set(), returnFiber.add(thenable), value.updateQueue = returnFiber) : returnFiber.add(thenable);
if (0 === (value.mode & 2)) {
value.effectTag |= 64;
sourceFiber.effectTag &= -1957;
1 === sourceFiber.tag && (null === sourceFiber.alternate ? sourceFiber.tag = 17 : (renderExpirationTime$jscomp$0 = createUpdate(1073741823, null), renderExpirationTime$jscomp$0.tag = 2, enqueueUpdate(sourceFiber, renderExpirationTime$jscomp$0)));
sourceFiber.expirationTime = 1073741823;
break a;
}
sourceFiber = root;
root = renderExpirationTime$jscomp$0;
hasInvisibleParentBoundary = sourceFiber.pingCache;
null === hasInvisibleParentBoundary ? (hasInvisibleParentBoundary = sourceFiber.pingCache = new PossiblyWeakMap(), returnFiber = new Set(), hasInvisibleParentBoundary.set(thenable, returnFiber)) : (returnFiber = hasInvisibleParentBoundary.get(thenable), undefined === returnFiber && (returnFiber = new Set(), hasInvisibleParentBoundary.set(thenable, returnFiber)));
returnFiber.has(root) || (returnFiber.add(root), sourceFiber = pingSuspendedRoot.bind(null, sourceFiber, thenable, root), thenable.then(sourceFiber, sourceFiber));
value.effectTag |= 2048;
value.expirationTime = renderExpirationTime$jscomp$0;
break a;
}
value = value.return;
} while (null !== value);
value = Error((getComponentName(sourceFiber.type) || "A React component") + " suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display." + getStackByFiberInDevAndProd(sourceFiber));
}
workInProgressRootExitStatus !== RootCompleted && (workInProgressRootExitStatus = RootErrored);
value = createCapturedValue(value, sourceFiber);
sourceFiber = returnFiber;
do {
switch (sourceFiber.tag) {
case 3:
sourceFiber.effectTag |= 2048;
sourceFiber.expirationTime = renderExpirationTime$jscomp$0;
renderExpirationTime$jscomp$0 = createRootErrorUpdate(sourceFiber, value, renderExpirationTime$jscomp$0);
enqueueCapturedUpdate(sourceFiber, renderExpirationTime$jscomp$0);
break a;
case 1:
if (thenable = value, root = sourceFiber.type, returnFiber = sourceFiber.stateNode, 0 === (sourceFiber.effectTag & 64) && ("function" === typeof root.getDerivedStateFromError || null !== returnFiber && "function" === typeof returnFiber.componentDidCatch && (null === legacyErrorBoundariesThatAlreadyFailed || !legacyErrorBoundariesThatAlreadyFailed.has(returnFiber)))) {
sourceFiber.effectTag |= 2048;
sourceFiber.expirationTime = renderExpirationTime$jscomp$0;
renderExpirationTime$jscomp$0 = createClassErrorUpdate(sourceFiber, thenable, renderExpirationTime$jscomp$0);
enqueueCapturedUpdate(sourceFiber, renderExpirationTime$jscomp$0);
break a;
}
}
sourceFiber = sourceFiber.return;
} while (null !== sourceFiber);
}
workInProgress = completeUnitOfWork(currentTime);
}
} while (1);
executionContext = lastPendingTime;
resetContextDependencies();
ReactCurrentDispatcher.current = prevDispatcher;
if (null !== workInProgress) return renderRoot.bind(null, root$jscomp$0, expirationTime);
}
root$jscomp$0.finishedWork = root$jscomp$0.current.alternate;
root$jscomp$0.finishedExpirationTime = expirationTime;
if (resolveLocksOnRoot(root$jscomp$0, expirationTime)) return null;
workInProgressRoot = null;
switch (workInProgressRootExitStatus) {
case RootIncomplete:
throw ReactError(Error("Should have a work-in-progress."));
case RootErrored:
return lastPendingTime = root$jscomp$0.lastPendingTime, lastPendingTime < expirationTime ? renderRoot.bind(null, root$jscomp$0, lastPendingTime) : isSync ? commitRoot.bind(null, root$jscomp$0) : (prepareFreshStack(root$jscomp$0, expirationTime), scheduleSyncCallback(renderRoot.bind(null, root$jscomp$0, expirationTime)), null);
case RootSuspended:
if (1073741823 === workInProgressRootLatestProcessedExpirationTime && !isSync && (isSync = globalMostRecentFallbackTime + FALLBACK_THROTTLE_MS - now(), 10 < isSync)) {
if (workInProgressRootHasPendingPing) return prepareFreshStack(root$jscomp$0, expirationTime), renderRoot.bind(null, root$jscomp$0, expirationTime);
lastPendingTime = root$jscomp$0.lastPendingTime;
if (lastPendingTime < expirationTime) return renderRoot.bind(null, root$jscomp$0, lastPendingTime);
root$jscomp$0.timeoutHandle = scheduleTimeout(commitRoot.bind(null, root$jscomp$0), isSync);
return null;
}
return commitRoot.bind(null, root$jscomp$0);
case RootSuspendedWithDelay:
if (!isSync) {
if (workInProgressRootHasPendingPing) return prepareFreshStack(root$jscomp$0, expirationTime), renderRoot.bind(null, root$jscomp$0, expirationTime);
isSync = root$jscomp$0.lastPendingTime;
if (isSync < expirationTime) return renderRoot.bind(null, root$jscomp$0, isSync);
1073741823 !== workInProgressRootLatestSuspenseTimeout ? isSync = 10 * (1073741821 - workInProgressRootLatestSuspenseTimeout) - now() : 1073741823 === workInProgressRootLatestProcessedExpirationTime ? isSync = 0 : (isSync = 10 * (1073741821 - workInProgressRootLatestProcessedExpirationTime) - 5e3, lastPendingTime = now(), expirationTime = 10 * (1073741821 - expirationTime) - lastPendingTime, isSync = lastPendingTime - isSync, 0 > isSync && (isSync = 0), isSync = (120 > isSync ? 120 : 480 > isSync ? 480 : 1080 > isSync ? 1080 : 1920 > isSync ? 1920 : 3e3 > isSync ? 3e3 : 4320 > isSync ? 4320 : 1960 * ceil(isSync / 1960)) - isSync, expirationTime < isSync && (isSync = expirationTime));
if (10 < isSync) return root$jscomp$0.timeoutHandle = scheduleTimeout(commitRoot.bind(null, root$jscomp$0), isSync), null;
}
return commitRoot.bind(null, root$jscomp$0);
case RootCompleted:
return !isSync && 1073741823 !== workInProgressRootLatestProcessedExpirationTime && null !== workInProgressRootCanSuspendUsingConfig && (lastPendingTime = workInProgressRootLatestProcessedExpirationTime, prevDispatcher = workInProgressRootCanSuspendUsingConfig, expirationTime = prevDispatcher.busyMinDurationMs | 0, 0 >= expirationTime ? expirationTime = 0 : (isSync = prevDispatcher.busyDelayMs | 0, lastPendingTime = now() - (10 * (1073741821 - lastPendingTime) - (prevDispatcher.timeoutMs | 0 || 5e3)), expirationTime = lastPendingTime <= isSync ? 0 : isSync + expirationTime - lastPendingTime), 10 < expirationTime) ? (root$jscomp$0.timeoutHandle = scheduleTimeout(commitRoot.bind(null, root$jscomp$0), expirationTime), null) : commitRoot.bind(null, root$jscomp$0);
default:
throw ReactError(Error("Unknown root exit status."));
}
}
function markRenderEventTimeAndConfig(expirationTime, suspenseConfig) {
expirationTime < workInProgressRootLatestProcessedExpirationTime && 1 < expirationTime && (workInProgressRootLatestProcessedExpirationTime = expirationTime);
null !== suspenseConfig && expirationTime < workInProgressRootLatestSuspenseTimeout && 1 < expirationTime && (workInProgressRootLatestSuspenseTimeout = expirationTime, workInProgressRootCanSuspendUsingConfig = suspenseConfig);
}
function performUnitOfWork(unitOfWork) {
var next = beginWork$$1(unitOfWork.alternate, unitOfWork, renderExpirationTime);
unitOfWork.memoizedProps = unitOfWork.pendingProps;
null === next && (next = completeUnitOfWork(unitOfWork));
ReactCurrentOwner$2.current = null;
return next;
}
function completeUnitOfWork(unitOfWork) {
workInProgress = unitOfWork;
do {
var current$$1 = workInProgress.alternate;
unitOfWork = workInProgress.return;
if (0 === (workInProgress.effectTag & 1024)) {
a: {
var current = current$$1;
current$$1 = workInProgress;
var renderExpirationTime$jscomp$0 = renderExpirationTime,
newProps = current$$1.pendingProps;
switch (current$$1.tag) {
case 2:
break;
case 16:
break;
case 15:
case 0:
break;
case 1:
isContextProvider(current$$1.type) && popContext(current$$1);
break;
case 3:
popHostContainer(current$$1);
popTopLevelContextObject(current$$1);
newProps = current$$1.stateNode;
newProps.pendingContext && (newProps.context = newProps.pendingContext, newProps.pendingContext = null);
if (null === current || null === current.child) current$$1.effectTag &= -3;
updateHostContainer(current$$1);
break;
case 5:
popHostContext(current$$1);
renderExpirationTime$jscomp$0 = requiredContext(rootInstanceStackCursor.current);
var type = current$$1.type;
if (null !== current && null != current$$1.stateNode) updateHostComponent$1(current, current$$1, type, newProps, renderExpirationTime$jscomp$0), current.ref !== current$$1.ref && (current$$1.effectTag |= 128);else if (newProps) {
current = requiredContext(contextStackCursor$1.current);
var type$jscomp$0 = type;
var _instance6 = newProps;
var rootContainerInstance = renderExpirationTime$jscomp$0,
internalInstanceHandle = current$$1,
tag = allocateTag();
type$jscomp$0 = getViewConfigForType(type$jscomp$0);
var updatePayload = diffProperties(null, emptyObject, _instance6, type$jscomp$0.validAttributes);
ReactNativePrivateInterface.UIManager.createView(tag, type$jscomp$0.uiViewClassName, rootContainerInstance, updatePayload);
rootContainerInstance = new ReactNativeFiberHostComponent(tag, type$jscomp$0);
instanceCache.set(tag, internalInstanceHandle);
instanceProps.set(tag, _instance6);
_instance6 = rootContainerInstance;
appendAllChildren(_instance6, current$$1, false, false);
finalizeInitialChildren(_instance6, type, newProps, renderExpirationTime$jscomp$0, current) && (current$$1.effectTag |= 4);
current$$1.stateNode = _instance6;
null !== current$$1.ref && (current$$1.effectTag |= 128);
} else if (null === current$$1.stateNode) throw ReactError(Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue."));
break;
case 6:
if (current && null != current$$1.stateNode) updateHostText$1(current, current$$1, current.memoizedProps, newProps);else {
if ("string" !== typeof newProps && null === current$$1.stateNode) throw ReactError(Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue."));
type = requiredContext(rootInstanceStackCursor.current);
renderExpirationTime$jscomp$0 = requiredContext(contextStackCursor$1.current);
current = current$$1;
if (!renderExpirationTime$jscomp$0.isInAParentText) throw ReactError(Error("Text strings must be rendered within a <Text> component."));
renderExpirationTime$jscomp$0 = allocateTag();
ReactNativePrivateInterface.UIManager.createView(renderExpirationTime$jscomp$0, "RCTRawText", type, {
text: newProps
});
instanceCache.set(renderExpirationTime$jscomp$0, current$$1);
current.stateNode = renderExpirationTime$jscomp$0;
}
break;
case 11:
break;
case 13:
pop(suspenseStackCursor, current$$1);
newProps = current$$1.memoizedState;
if (0 !== (current$$1.effectTag & 64)) {
current$$1.expirationTime = renderExpirationTime$jscomp$0;
break a;
}
newProps = null !== newProps;
renderExpirationTime$jscomp$0 = false;
null !== current && (type = current.memoizedState, renderExpirationTime$jscomp$0 = null !== type, newProps || null === type || (type = current.child.sibling, null !== type && (_instance6 = current$$1.firstEffect, null !== _instance6 ? (current$$1.firstEffect = type, type.nextEffect = _instance6) : (current$$1.firstEffect = current$$1.lastEffect = type, type.nextEffect = null), type.effectTag = 8)));
if (newProps && !renderExpirationTime$jscomp$0 && 0 !== (current$$1.mode & 2)) if (null === current && true !== current$$1.memoizedProps.unstable_avoidThisFallback || 0 !== (suspenseStackCursor.current & InvisibleParentSuspenseContext)) workInProgressRootExitStatus === RootIncomplete && (workInProgressRootExitStatus = RootSuspended);else if (workInProgressRootExitStatus === RootIncomplete || workInProgressRootExitStatus === RootSuspended) workInProgressRootExitStatus = RootSuspendedWithDelay;
if (newProps || renderExpirationTime$jscomp$0) current$$1.effectTag |= 4;
break;
case 7:
break;
case 8:
break;
case 12:
break;
case 4:
popHostContainer(current$$1);
updateHostContainer(current$$1);
break;
case 10:
popProvider(current$$1);
break;
case 9:
break;
case 14:
break;
case 17:
isContextProvider(current$$1.type) && popContext(current$$1);
break;
case 18:
break;
case 19:
pop(suspenseStackCursor, current$$1);
newProps = current$$1.memoizedState;
if (null === newProps) break;
type = 0 !== (current$$1.effectTag & 64);
_instance6 = newProps.rendering;
if (null === _instance6) {
if (type) cutOffTailIfNeeded(newProps, false);else {
if (workInProgressRootExitStatus !== RootIncomplete || null !== current && 0 !== (current.effectTag & 64)) for (current = current$$1.child; null !== current;) {
_instance6 = findFirstSuspended(current);
if (null !== _instance6) {
current$$1.effectTag |= 64;
cutOffTailIfNeeded(newProps, false);
newProps = _instance6.updateQueue;
null !== newProps && (current$$1.updateQueue = newProps, current$$1.effectTag |= 4);
current$$1.firstEffect = current$$1.lastEffect = null;
newProps = renderExpirationTime$jscomp$0;
for (current = current$$1.child; null !== current;) {
renderExpirationTime$jscomp$0 = current, type = newProps, renderExpirationTime$jscomp$0.effectTag &= 2, renderExpirationTime$jscomp$0.nextEffect = null, renderExpirationTime$jscomp$0.firstEffect = null, renderExpirationTime$jscomp$0.lastEffect = null, _instance6 = renderExpirationTime$jscomp$0.alternate, null === _instance6 ? (renderExpirationTime$jscomp$0.childExpirationTime = 0, renderExpirationTime$jscomp$0.expirationTime = type, renderExpirationTime$jscomp$0.child = null, renderExpirationTime$jscomp$0.memoizedProps = null, renderExpirationTime$jscomp$0.memoizedState = null, renderExpirationTime$jscomp$0.updateQueue = null, renderExpirationTime$jscomp$0.dependencies = null) : (renderExpirationTime$jscomp$0.childExpirationTime = _instance6.childExpirationTime, renderExpirationTime$jscomp$0.expirationTime = _instance6.expirationTime, renderExpirationTime$jscomp$0.child = _instance6.child, renderExpirationTime$jscomp$0.memoizedProps = _instance6.memoizedProps, renderExpirationTime$jscomp$0.memoizedState = _instance6.memoizedState, renderExpirationTime$jscomp$0.updateQueue = _instance6.updateQueue, type = _instance6.dependencies, renderExpirationTime$jscomp$0.dependencies = null === type ? null : {
expirationTime: type.expirationTime,
firstContext: type.firstContext,
responders: type.responders
}), current = current.sibling;
}
push(suspenseStackCursor, suspenseStackCursor.current & SubtreeSuspenseContextMask | ForceSuspenseFallback, current$$1);
current$$1 = current$$1.child;
break a;
}
current = current.sibling;
}
}
} else {
if (!type) if (current = findFirstSuspended(_instance6), null !== current) {
if (current$$1.effectTag |= 64, type = true, cutOffTailIfNeeded(newProps, true), null === newProps.tail && "hidden" === newProps.tailMode) {
current = current.updateQueue;
null !== current && (current$$1.updateQueue = current, current$$1.effectTag |= 4);
current$$1 = current$$1.lastEffect = newProps.lastEffect;
null !== current$$1 && (current$$1.nextEffect = null);
break;
}
} else now() > newProps.tailExpiration && 1 < renderExpirationTime$jscomp$0 && (current$$1.effectTag |= 64, type = true, cutOffTailIfNeeded(newProps, false), current$$1.expirationTime = current$$1.childExpirationTime = renderExpirationTime$jscomp$0 - 1);
newProps.isBackwards ? (_instance6.sibling = current$$1.child, current$$1.child = _instance6) : (current = newProps.last, null !== current ? current.sibling = _instance6 : current$$1.child = _instance6, newProps.last = _instance6);
}
if (null !== newProps.tail) {
0 === newProps.tailExpiration && (newProps.tailExpiration = now() + 500);
current = newProps.tail;
newProps.rendering = current;
newProps.tail = current.sibling;
newProps.lastEffect = current$$1.lastEffect;
current.sibling = null;
newProps = suspenseStackCursor.current;
newProps = type ? newProps & SubtreeSuspenseContextMask | ForceSuspenseFallback : newProps & SubtreeSuspenseContextMask;
push(suspenseStackCursor, newProps, current$$1);
current$$1 = current;
break a;
}
break;
case 20:
break;
default:
throw ReactError(Error("Unknown unit of work tag. This error is likely caused by a bug in React. Please file an issue."));
}
current$$1 = null;
}
newProps = workInProgress;
if (1 === renderExpirationTime || 1 !== newProps.childExpirationTime) {
current = 0;
for (renderExpirationTime$jscomp$0 = newProps.child; null !== renderExpirationTime$jscomp$0;) {
type = renderExpirationTime$jscomp$0.expirationTime, _instance6 = renderExpirationTime$jscomp$0.childExpirationTime, type > current && (current = type), _instance6 > current && (current = _instance6), renderExpirationTime$jscomp$0 = renderExpirationTime$jscomp$0.sibling;
}
newProps.childExpirationTime = current;
}
if (null !== current$$1) return current$$1;
null !== unitOfWork && 0 === (unitOfWork.effectTag & 1024) && (null === unitOfWork.firstEffect && (unitOfWork.firstEffect = workInProgress.firstEffect), null !== workInProgress.lastEffect && (null !== unitOfWork.lastEffect && (unitOfWork.lastEffect.nextEffect = workInProgress.firstEffect), unitOfWork.lastEffect = workInProgress.lastEffect), 1 < workInProgress.effectTag && (null !== unitOfWork.lastEffect ? unitOfWork.lastEffect.nextEffect = workInProgress : unitOfWork.firstEffect = workInProgress, unitOfWork.lastEffect = workInProgress));
} else {
current$$1 = unwindWork(workInProgress, renderExpirationTime);
if (null !== current$$1) return current$$1.effectTag &= 1023, current$$1;
null !== unitOfWork && (unitOfWork.firstEffect = unitOfWork.lastEffect = null, unitOfWork.effectTag |= 1024);
}
current$$1 = workInProgress.sibling;
if (null !== current$$1) return current$$1;
workInProgress = unitOfWork;
} while (null !== workInProgress);
workInProgressRootExitStatus === RootIncomplete && (workInProgressRootExitStatus = RootCompleted);
return null;
}
function commitRoot(root) {
var renderPriorityLevel = getCurrentPriorityLevel();
runWithPriority(99, commitRootImpl.bind(null, root, renderPriorityLevel));
null !== rootWithPendingPassiveEffects && scheduleCallback(97, function () {
flushPassiveEffects();
return null;
});
return null;
}
function commitRootImpl(root, renderPriorityLevel) {
flushPassiveEffects();
if ((executionContext & 48) !== NoContext) throw ReactError(Error("Should not already be working."));
var finishedWork = root.finishedWork,
expirationTime = root.finishedExpirationTime;
if (null === finishedWork) return null;
root.finishedWork = null;
root.finishedExpirationTime = 0;
if (finishedWork === root.current) throw ReactError(Error("Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue."));
root.callbackNode = null;
root.callbackExpirationTime = 0;
var updateExpirationTimeBeforeCommit = finishedWork.expirationTime,
childExpirationTimeBeforeCommit = finishedWork.childExpirationTime;
updateExpirationTimeBeforeCommit = childExpirationTimeBeforeCommit > updateExpirationTimeBeforeCommit ? childExpirationTimeBeforeCommit : updateExpirationTimeBeforeCommit;
root.firstPendingTime = updateExpirationTimeBeforeCommit;
updateExpirationTimeBeforeCommit < root.lastPendingTime && (root.lastPendingTime = updateExpirationTimeBeforeCommit);
root === workInProgressRoot && (workInProgress = workInProgressRoot = null, renderExpirationTime = 0);
1 < finishedWork.effectTag ? null !== finishedWork.lastEffect ? (finishedWork.lastEffect.nextEffect = finishedWork, updateExpirationTimeBeforeCommit = finishedWork.firstEffect) : updateExpirationTimeBeforeCommit = finishedWork : updateExpirationTimeBeforeCommit = finishedWork.firstEffect;
if (null !== updateExpirationTimeBeforeCommit) {
childExpirationTimeBeforeCommit = executionContext;
executionContext |= CommitContext;
ReactCurrentOwner$2.current = null;
nextEffect = updateExpirationTimeBeforeCommit;
do {
try {
for (; null !== nextEffect;) {
if (0 !== (nextEffect.effectTag & 256)) {
var current$$1 = nextEffect.alternate,
finishedWork$jscomp$0 = nextEffect;
switch (finishedWork$jscomp$0.tag) {
case 0:
case 11:
case 15:
commitHookEffectList(UnmountSnapshot, NoEffect$1, finishedWork$jscomp$0);
break;
case 1:
if (finishedWork$jscomp$0.effectTag & 256 && null !== current$$1) {
var prevProps = current$$1.memoizedProps,
prevState = current$$1.memoizedState,
instance = finishedWork$jscomp$0.stateNode,
snapshot = instance.getSnapshotBeforeUpdate(finishedWork$jscomp$0.elementType === finishedWork$jscomp$0.type ? prevProps : resolveDefaultProps(finishedWork$jscomp$0.type, prevProps), prevState);
instance.__reactInternalSnapshotBeforeUpdate = snapshot;
}
break;
case 3:
case 5:
case 6:
case 4:
case 17:
break;
default:
throw ReactError(Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue."));
}
}
nextEffect = nextEffect.nextEffect;
}
} catch (error) {
if (null === nextEffect) throw ReactError(Error("Should be working on an effect."));
captureCommitPhaseError(nextEffect, error);
nextEffect = nextEffect.nextEffect;
}
} while (null !== nextEffect);
nextEffect = updateExpirationTimeBeforeCommit;
do {
try {
for (current$$1 = renderPriorityLevel; null !== nextEffect;) {
var effectTag = nextEffect.effectTag;
if (effectTag & 128) {
var current$$1$jscomp$0 = nextEffect.alternate;
if (null !== current$$1$jscomp$0) {
var currentRef = current$$1$jscomp$0.ref;
null !== currentRef && ("function" === typeof currentRef ? currentRef(null) : currentRef.current = null);
}
}
switch (effectTag & 14) {
case 2:
commitPlacement(nextEffect);
nextEffect.effectTag &= -3;
break;
case 6:
commitPlacement(nextEffect);
nextEffect.effectTag &= -3;
commitWork(nextEffect.alternate, nextEffect);
break;
case 4:
commitWork(nextEffect.alternate, nextEffect);
break;
case 8:
prevProps = nextEffect, unmountHostComponents(prevProps, current$$1), detachFiber(prevProps);
}
nextEffect = nextEffect.nextEffect;
}
} catch (error) {
if (null === nextEffect) throw ReactError(Error("Should be working on an effect."));
captureCommitPhaseError(nextEffect, error);
nextEffect = nextEffect.nextEffect;
}
} while (null !== nextEffect);
root.current = finishedWork;
nextEffect = updateExpirationTimeBeforeCommit;
do {
try {
for (effectTag = expirationTime; null !== nextEffect;) {
var effectTag$jscomp$0 = nextEffect.effectTag;
if (effectTag$jscomp$0 & 36) {
var current$$1$jscomp$1 = nextEffect.alternate;
current$$1$jscomp$0 = nextEffect;
currentRef = effectTag;
switch (current$$1$jscomp$0.tag) {
case 0:
case 11:
case 15:
commitHookEffectList(UnmountLayout, MountLayout, current$$1$jscomp$0);
break;
case 1:
var instance$jscomp$0 = current$$1$jscomp$0.stateNode;
if (current$$1$jscomp$0.effectTag & 4) if (null === current$$1$jscomp$1) instance$jscomp$0.componentDidMount();else {
var prevProps$jscomp$0 = current$$1$jscomp$0.elementType === current$$1$jscomp$0.type ? current$$1$jscomp$1.memoizedProps : resolveDefaultProps(current$$1$jscomp$0.type, current$$1$jscomp$1.memoizedProps);
instance$jscomp$0.componentDidUpdate(prevProps$jscomp$0, current$$1$jscomp$1.memoizedState, instance$jscomp$0.__reactInternalSnapshotBeforeUpdate);
}
var updateQueue = current$$1$jscomp$0.updateQueue;
null !== updateQueue && commitUpdateQueue(current$$1$jscomp$0, updateQueue, instance$jscomp$0, currentRef);
break;
case 3:
var _updateQueue = current$$1$jscomp$0.updateQueue;
if (null !== _updateQueue) {
current$$1 = null;
if (null !== current$$1$jscomp$0.child) switch (current$$1$jscomp$0.child.tag) {
case 5:
current$$1 = current$$1$jscomp$0.child.stateNode;
break;
case 1:
current$$1 = current$$1$jscomp$0.child.stateNode;
}
commitUpdateQueue(current$$1$jscomp$0, _updateQueue, current$$1, currentRef);
}
break;
case 5:
break;
case 6:
break;
case 4:
break;
case 12:
break;
case 13:
case 19:
case 17:
case 20:
break;
default:
throw ReactError(Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue."));
}
}
if (effectTag$jscomp$0 & 128) {
var ref = nextEffect.ref;
if (null !== ref) {
var instance$jscomp$1 = nextEffect.stateNode;
switch (nextEffect.tag) {
case 5:
var instanceToUse = instance$jscomp$1;
break;
default:
instanceToUse = instance$jscomp$1;
}
"function" === typeof ref ? ref(instanceToUse) : ref.current = instanceToUse;
}
}
effectTag$jscomp$0 & 512 && (rootDoesHavePassiveEffects = true);
nextEffect = nextEffect.nextEffect;
}
} catch (error) {
if (null === nextEffect) throw ReactError(Error("Should be working on an effect."));
captureCommitPhaseError(nextEffect, error);
nextEffect = nextEffect.nextEffect;
}
} while (null !== nextEffect);
nextEffect = null;
requestPaint();
executionContext = childExpirationTimeBeforeCommit;
} else root.current = finishedWork;
if (rootDoesHavePassiveEffects) rootDoesHavePassiveEffects = false, rootWithPendingPassiveEffects = root, pendingPassiveEffectsExpirationTime = expirationTime, pendingPassiveEffectsRenderPriority = renderPriorityLevel;else for (nextEffect = updateExpirationTimeBeforeCommit; null !== nextEffect;) {
renderPriorityLevel = nextEffect.nextEffect, nextEffect.nextEffect = null, nextEffect = renderPriorityLevel;
}
renderPriorityLevel = root.firstPendingTime;
0 !== renderPriorityLevel ? (effectTag$jscomp$0 = requestCurrentTime(), effectTag$jscomp$0 = inferPriorityFromExpirationTime(effectTag$jscomp$0, renderPriorityLevel), scheduleCallbackForRoot(root, effectTag$jscomp$0, renderPriorityLevel)) : legacyErrorBoundariesThatAlreadyFailed = null;
"function" === typeof onCommitFiberRoot && onCommitFiberRoot(finishedWork.stateNode, expirationTime);
1073741823 === renderPriorityLevel ? root === rootWithNestedUpdates ? nestedUpdateCount++ : (nestedUpdateCount = 0, rootWithNestedUpdates = root) : nestedUpdateCount = 0;
if (hasUncaughtError) throw hasUncaughtError = false, root = firstUncaughtError, firstUncaughtError = null, root;
if ((executionContext & LegacyUnbatchedContext) !== NoContext) return null;
flushSyncCallbackQueue();
return null;
}
function flushPassiveEffects() {
if (null === rootWithPendingPassiveEffects) return false;
var root = rootWithPendingPassiveEffects,
expirationTime = pendingPassiveEffectsExpirationTime,
renderPriorityLevel = pendingPassiveEffectsRenderPriority;
rootWithPendingPassiveEffects = null;
pendingPassiveEffectsExpirationTime = 0;
pendingPassiveEffectsRenderPriority = 90;
return runWithPriority(97 < renderPriorityLevel ? 97 : renderPriorityLevel, flushPassiveEffectsImpl.bind(null, root, expirationTime));
}
function flushPassiveEffectsImpl(root) {
if ((executionContext & 48) !== NoContext) throw ReactError(Error("Cannot flush passive effects while already rendering."));
var prevExecutionContext = executionContext;
executionContext |= CommitContext;
for (root = root.current.firstEffect; null !== root;) {
try {
var finishedWork = root;
if (0 !== (finishedWork.effectTag & 512)) switch (finishedWork.tag) {
case 0:
case 11:
case 15:
commitHookEffectList(UnmountPassive, NoEffect$1, finishedWork), commitHookEffectList(NoEffect$1, MountPassive, finishedWork);
}
} catch (error) {
if (null === root) throw ReactError(Error("Should be working on an effect."));
captureCommitPhaseError(root, error);
}
finishedWork = root.nextEffect;
root.nextEffect = null;
root = finishedWork;
}
executionContext = prevExecutionContext;
flushSyncCallbackQueue();
return true;
}
function captureCommitPhaseErrorOnRoot(rootFiber, sourceFiber, error) {
sourceFiber = createCapturedValue(error, sourceFiber);
sourceFiber = createRootErrorUpdate(rootFiber, sourceFiber, 1073741823);
enqueueUpdate(rootFiber, sourceFiber);
rootFiber = markUpdateTimeFromFiberToRoot(rootFiber, 1073741823);
null !== rootFiber && scheduleCallbackForRoot(rootFiber, 99, 1073741823);
}
function captureCommitPhaseError(sourceFiber, error) {
if (3 === sourceFiber.tag) captureCommitPhaseErrorOnRoot(sourceFiber, sourceFiber, error);else for (var fiber = sourceFiber.return; null !== fiber;) {
if (3 === fiber.tag) {
captureCommitPhaseErrorOnRoot(fiber, sourceFiber, error);
break;
} else if (1 === fiber.tag) {
var instance = fiber.stateNode;
if ("function" === typeof fiber.type.getDerivedStateFromError || "function" === typeof instance.componentDidCatch && (null === legacyErrorBoundariesThatAlreadyFailed || !legacyErrorBoundariesThatAlreadyFailed.has(instance))) {
sourceFiber = createCapturedValue(error, sourceFiber);
sourceFiber = createClassErrorUpdate(fiber, sourceFiber, 1073741823);
enqueueUpdate(fiber, sourceFiber);
fiber = markUpdateTimeFromFiberToRoot(fiber, 1073741823);
null !== fiber && scheduleCallbackForRoot(fiber, 99, 1073741823);
break;
}
}
fiber = fiber.return;
}
}
function pingSuspendedRoot(root, thenable, suspendedTime) {
var pingCache = root.pingCache;
null !== pingCache && pingCache.delete(thenable);
workInProgressRoot === root && renderExpirationTime === suspendedTime ? workInProgressRootExitStatus === RootSuspendedWithDelay || workInProgressRootExitStatus === RootSuspended && 1073741823 === workInProgressRootLatestProcessedExpirationTime && now() - globalMostRecentFallbackTime < FALLBACK_THROTTLE_MS ? prepareFreshStack(root, renderExpirationTime) : workInProgressRootHasPendingPing = true : root.lastPendingTime < suspendedTime || (thenable = root.pingTime, 0 !== thenable && thenable < suspendedTime || (root.pingTime = suspendedTime, root.finishedExpirationTime === suspendedTime && (root.finishedExpirationTime = 0, root.finishedWork = null), thenable = requestCurrentTime(), thenable = inferPriorityFromExpirationTime(thenable, suspendedTime), scheduleCallbackForRoot(root, thenable, suspendedTime)));
}
function resolveRetryThenable(boundaryFiber, thenable) {
var retryCache = boundaryFiber.stateNode;
null !== retryCache && retryCache.delete(thenable);
retryCache = requestCurrentTime();
thenable = computeExpirationForFiber(retryCache, boundaryFiber, null);
retryCache = inferPriorityFromExpirationTime(retryCache, thenable);
boundaryFiber = markUpdateTimeFromFiberToRoot(boundaryFiber, thenable);
null !== boundaryFiber && scheduleCallbackForRoot(boundaryFiber, retryCache, thenable);
}
var beginWork$$1 = undefined;
beginWork$$1 = function beginWork$$1(current$$1, workInProgress, renderExpirationTime) {
var updateExpirationTime = workInProgress.expirationTime;
if (null !== current$$1) {
if (current$$1.memoizedProps !== workInProgress.pendingProps || didPerformWorkStackCursor.current) didReceiveUpdate = true;else {
if (updateExpirationTime < renderExpirationTime) {
didReceiveUpdate = false;
switch (workInProgress.tag) {
case 3:
pushHostRootContext(workInProgress);
break;
case 5:
pushHostContext(workInProgress);
break;
case 1:
isContextProvider(workInProgress.type) && pushContextProvider(workInProgress);
break;
case 4:
pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);
break;
case 10:
pushProvider(workInProgress, workInProgress.memoizedProps.value);
break;
case 13:
if (null !== workInProgress.memoizedState) {
updateExpirationTime = workInProgress.child.childExpirationTime;
if (0 !== updateExpirationTime && updateExpirationTime >= renderExpirationTime) return updateSuspenseComponent(current$$1, workInProgress, renderExpirationTime);
push(suspenseStackCursor, suspenseStackCursor.current & SubtreeSuspenseContextMask, workInProgress);
workInProgress = bailoutOnAlreadyFinishedWork(current$$1, workInProgress, renderExpirationTime);
return null !== workInProgress ? workInProgress.sibling : null;
}
push(suspenseStackCursor, suspenseStackCursor.current & SubtreeSuspenseContextMask, workInProgress);
break;
case 19:
updateExpirationTime = workInProgress.childExpirationTime >= renderExpirationTime;
if (0 !== (current$$1.effectTag & 64)) {
if (updateExpirationTime) return updateSuspenseListComponent(current$$1, workInProgress, renderExpirationTime);
workInProgress.effectTag |= 64;
}
var renderState = workInProgress.memoizedState;
null !== renderState && (renderState.rendering = null, renderState.tail = null);
push(suspenseStackCursor, suspenseStackCursor.current, workInProgress);
if (!updateExpirationTime) return null;
}
return bailoutOnAlreadyFinishedWork(current$$1, workInProgress, renderExpirationTime);
}
}
} else didReceiveUpdate = false;
workInProgress.expirationTime = 0;
switch (workInProgress.tag) {
case 2:
updateExpirationTime = workInProgress.type;
null !== current$$1 && (current$$1.alternate = null, workInProgress.alternate = null, workInProgress.effectTag |= 2);
current$$1 = workInProgress.pendingProps;
renderState = getMaskedContext(workInProgress, contextStackCursor.current);
prepareToReadContext(workInProgress, renderExpirationTime);
renderState = renderWithHooks(null, workInProgress, updateExpirationTime, current$$1, renderState, renderExpirationTime);
workInProgress.effectTag |= 1;
if ("object" === typeof renderState && null !== renderState && "function" === typeof renderState.render && undefined === renderState.$$typeof) {
workInProgress.tag = 1;
resetHooks();
if (isContextProvider(updateExpirationTime)) {
var hasContext = true;
pushContextProvider(workInProgress);
} else hasContext = false;
workInProgress.memoizedState = null !== renderState.state && undefined !== renderState.state ? renderState.state : null;
var getDerivedStateFromProps = updateExpirationTime.getDerivedStateFromProps;
"function" === typeof getDerivedStateFromProps && applyDerivedStateFromProps(workInProgress, updateExpirationTime, getDerivedStateFromProps, current$$1);
renderState.updater = classComponentUpdater;
workInProgress.stateNode = renderState;
renderState._reactInternalFiber = workInProgress;
mountClassInstance(workInProgress, updateExpirationTime, current$$1, renderExpirationTime);
workInProgress = finishClassComponent(null, workInProgress, updateExpirationTime, true, hasContext, renderExpirationTime);
} else workInProgress.tag = 0, reconcileChildren(null, workInProgress, renderState, renderExpirationTime), workInProgress = workInProgress.child;
return workInProgress;
case 16:
renderState = workInProgress.elementType;
null !== current$$1 && (current$$1.alternate = null, workInProgress.alternate = null, workInProgress.effectTag |= 2);
current$$1 = workInProgress.pendingProps;
renderState = readLazyComponentType(renderState);
workInProgress.type = renderState;
hasContext = workInProgress.tag = resolveLazyComponentTag(renderState);
current$$1 = resolveDefaultProps(renderState, current$$1);
switch (hasContext) {
case 0:
workInProgress = updateFunctionComponent(null, workInProgress, renderState, current$$1, renderExpirationTime);
break;
case 1:
workInProgress = updateClassComponent(null, workInProgress, renderState, current$$1, renderExpirationTime);
break;
case 11:
workInProgress = updateForwardRef(null, workInProgress, renderState, current$$1, renderExpirationTime);
break;
case 14:
workInProgress = updateMemoComponent(null, workInProgress, renderState, resolveDefaultProps(renderState.type, current$$1), updateExpirationTime, renderExpirationTime);
break;
default:
throw ReactError(Error("Element type is invalid. Received a promise that resolves to: " + renderState + ". Lazy element type must resolve to a class or function."));
}
return workInProgress;
case 0:
return updateExpirationTime = workInProgress.type, renderState = workInProgress.pendingProps, renderState = workInProgress.elementType === updateExpirationTime ? renderState : resolveDefaultProps(updateExpirationTime, renderState), updateFunctionComponent(current$$1, workInProgress, updateExpirationTime, renderState, renderExpirationTime);
case 1:
return updateExpirationTime = workInProgress.type, renderState = workInProgress.pendingProps, renderState = workInProgress.elementType === updateExpirationTime ? renderState : resolveDefaultProps(updateExpirationTime, renderState), updateClassComponent(current$$1, workInProgress, updateExpirationTime, renderState, renderExpirationTime);
case 3:
pushHostRootContext(workInProgress);
updateExpirationTime = workInProgress.updateQueue;
if (null === updateExpirationTime) throw ReactError(Error("If the root does not have an updateQueue, we should have already bailed out. This error is likely caused by a bug in React. Please file an issue."));
renderState = workInProgress.memoizedState;
renderState = null !== renderState ? renderState.element : null;
processUpdateQueue(workInProgress, updateExpirationTime, workInProgress.pendingProps, null, renderExpirationTime);
updateExpirationTime = workInProgress.memoizedState.element;
updateExpirationTime === renderState ? workInProgress = bailoutOnAlreadyFinishedWork(current$$1, workInProgress, renderExpirationTime) : (reconcileChildren(current$$1, workInProgress, updateExpirationTime, renderExpirationTime), workInProgress = workInProgress.child);
return workInProgress;
case 5:
return pushHostContext(workInProgress), null === current$$1 && tryToClaimNextHydratableInstance(workInProgress), updateExpirationTime = workInProgress.pendingProps.children, markRef(current$$1, workInProgress), reconcileChildren(current$$1, workInProgress, updateExpirationTime, renderExpirationTime), workInProgress.child;
case 6:
return null === current$$1 && tryToClaimNextHydratableInstance(workInProgress), null;
case 13:
return updateSuspenseComponent(current$$1, workInProgress, renderExpirationTime);
case 4:
return pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo), updateExpirationTime = workInProgress.pendingProps, null === current$$1 ? workInProgress.child = reconcileChildFibers(workInProgress, null, updateExpirationTime, renderExpirationTime) : reconcileChildren(current$$1, workInProgress, updateExpirationTime, renderExpirationTime), workInProgress.child;
case 11:
return updateExpirationTime = workInProgress.type, renderState = workInProgress.pendingProps, renderState = workInProgress.elementType === updateExpirationTime ? renderState : resolveDefaultProps(updateExpirationTime, renderState), updateForwardRef(current$$1, workInProgress, updateExpirationTime, renderState, renderExpirationTime);
case 7:
return reconcileChildren(current$$1, workInProgress, workInProgress.pendingProps, renderExpirationTime), workInProgress.child;
case 8:
return reconcileChildren(current$$1, workInProgress, workInProgress.pendingProps.children, renderExpirationTime), workInProgress.child;
case 12:
return reconcileChildren(current$$1, workInProgress, workInProgress.pendingProps.children, renderExpirationTime), workInProgress.child;
case 10:
a: {
updateExpirationTime = workInProgress.type._context;
renderState = workInProgress.pendingProps;
getDerivedStateFromProps = workInProgress.memoizedProps;
hasContext = renderState.value;
pushProvider(workInProgress, hasContext);
if (null !== getDerivedStateFromProps) {
var oldValue = getDerivedStateFromProps.value;
hasContext = is(oldValue, hasContext) ? 0 : ("function" === typeof updateExpirationTime._calculateChangedBits ? updateExpirationTime._calculateChangedBits(oldValue, hasContext) : 1073741823) | 0;
if (0 === hasContext) {
if (getDerivedStateFromProps.children === renderState.children && !didPerformWorkStackCursor.current) {
workInProgress = bailoutOnAlreadyFinishedWork(current$$1, workInProgress, renderExpirationTime);
break a;
}
} else for (oldValue = workInProgress.child, null !== oldValue && (oldValue.return = workInProgress); null !== oldValue;) {
var list = oldValue.dependencies;
if (null !== list) {
getDerivedStateFromProps = oldValue.child;
for (var dependency = list.firstContext; null !== dependency;) {
if (dependency.context === updateExpirationTime && 0 !== (dependency.observedBits & hasContext)) {
1 === oldValue.tag && (dependency = createUpdate(renderExpirationTime, null), dependency.tag = 2, enqueueUpdate(oldValue, dependency));
oldValue.expirationTime < renderExpirationTime && (oldValue.expirationTime = renderExpirationTime);
dependency = oldValue.alternate;
null !== dependency && dependency.expirationTime < renderExpirationTime && (dependency.expirationTime = renderExpirationTime);
scheduleWorkOnParentPath(oldValue.return, renderExpirationTime);
list.expirationTime < renderExpirationTime && (list.expirationTime = renderExpirationTime);
break;
}
dependency = dependency.next;
}
} else getDerivedStateFromProps = 10 === oldValue.tag ? oldValue.type === workInProgress.type ? null : oldValue.child : oldValue.child;
if (null !== getDerivedStateFromProps) getDerivedStateFromProps.return = oldValue;else for (getDerivedStateFromProps = oldValue; null !== getDerivedStateFromProps;) {
if (getDerivedStateFromProps === workInProgress) {
getDerivedStateFromProps = null;
break;
}
oldValue = getDerivedStateFromProps.sibling;
if (null !== oldValue) {
oldValue.return = getDerivedStateFromProps.return;
getDerivedStateFromProps = oldValue;
break;
}
getDerivedStateFromProps = getDerivedStateFromProps.return;
}
oldValue = getDerivedStateFromProps;
}
}
reconcileChildren(current$$1, workInProgress, renderState.children, renderExpirationTime);
workInProgress = workInProgress.child;
}
return workInProgress;
case 9:
return renderState = workInProgress.type, hasContext = workInProgress.pendingProps, updateExpirationTime = hasContext.children, prepareToReadContext(workInProgress, renderExpirationTime), renderState = readContext(renderState, hasContext.unstable_observedBits), updateExpirationTime = updateExpirationTime(renderState), workInProgress.effectTag |= 1, reconcileChildren(current$$1, workInProgress, updateExpirationTime, renderExpirationTime), workInProgress.child;
case 14:
return renderState = workInProgress.type, hasContext = resolveDefaultProps(renderState, workInProgress.pendingProps), hasContext = resolveDefaultProps(renderState.type, hasContext), updateMemoComponent(current$$1, workInProgress, renderState, hasContext, updateExpirationTime, renderExpirationTime);
case 15:
return updateSimpleMemoComponent(current$$1, workInProgress, workInProgress.type, workInProgress.pendingProps, updateExpirationTime, renderExpirationTime);
case 17:
return updateExpirationTime = workInProgress.type, renderState = workInProgress.pendingProps, renderState = workInProgress.elementType === updateExpirationTime ? renderState : resolveDefaultProps(updateExpirationTime, renderState), null !== current$$1 && (current$$1.alternate = null, workInProgress.alternate = null, workInProgress.effectTag |= 2), workInProgress.tag = 1, isContextProvider(updateExpirationTime) ? (current$$1 = true, pushContextProvider(workInProgress)) : current$$1 = false, prepareToReadContext(workInProgress, renderExpirationTime), constructClassInstance(workInProgress, updateExpirationTime, renderState, renderExpirationTime), mountClassInstance(workInProgress, updateExpirationTime, renderState, renderExpirationTime), finishClassComponent(null, workInProgress, updateExpirationTime, true, current$$1, renderExpirationTime);
case 19:
return updateSuspenseListComponent(current$$1, workInProgress, renderExpirationTime);
}
throw ReactError(Error("Unknown unit of work tag. This error is likely caused by a bug in React. Please file an issue."));
};
var onCommitFiberRoot = null,
onCommitFiberUnmount = null;
function injectInternals(internals) {
if ("undefined" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) return false;
var hook = __REACT_DEVTOOLS_GLOBAL_HOOK__;
if (hook.isDisabled || !hook.supportsFiber) return true;
try {
var rendererID = hook.inject(internals);
onCommitFiberRoot = function onCommitFiberRoot(root) {
try {
hook.onCommitFiberRoot(rendererID, root, undefined, 64 === (root.current.effectTag & 64));
} catch (err) {}
};
onCommitFiberUnmount = function onCommitFiberUnmount(fiber) {
try {
hook.onCommitFiberUnmount(rendererID, fiber);
} catch (err) {}
};
} catch (err) {}
return true;
}
function FiberNode(tag, pendingProps, key, mode) {
this.tag = tag;
this.key = key;
this.sibling = this.child = this.return = this.stateNode = this.type = this.elementType = null;
this.index = 0;
this.ref = null;
this.pendingProps = pendingProps;
this.dependencies = this.memoizedState = this.updateQueue = this.memoizedProps = null;
this.mode = mode;
this.effectTag = 0;
this.lastEffect = this.firstEffect = this.nextEffect = null;
this.childExpirationTime = this.expirationTime = 0;
this.alternate = null;
}
function createFiber(tag, pendingProps, key, mode) {
return new FiberNode(tag, pendingProps, key, mode);
}
function shouldConstruct(Component) {
Component = Component.prototype;
return !(!Component || !Component.isReactComponent);
}
function resolveLazyComponentTag(Component) {
if ("function" === typeof Component) return shouldConstruct(Component) ? 1 : 0;
if (undefined !== Component && null !== Component) {
Component = Component.$$typeof;
if (Component === REACT_FORWARD_REF_TYPE) return 11;
if (Component === REACT_MEMO_TYPE) return 14;
}
return 2;
}
function createWorkInProgress(current, pendingProps) {
var workInProgress = current.alternate;
null === workInProgress ? (workInProgress = createFiber(current.tag, pendingProps, current.key, current.mode), workInProgress.elementType = current.elementType, workInProgress.type = current.type, workInProgress.stateNode = current.stateNode, workInProgress.alternate = current, current.alternate = workInProgress) : (workInProgress.pendingProps = pendingProps, workInProgress.effectTag = 0, workInProgress.nextEffect = null, workInProgress.firstEffect = null, workInProgress.lastEffect = null);
workInProgress.childExpirationTime = current.childExpirationTime;
workInProgress.expirationTime = current.expirationTime;
workInProgress.child = current.child;
workInProgress.memoizedProps = current.memoizedProps;
workInProgress.memoizedState = current.memoizedState;
workInProgress.updateQueue = current.updateQueue;
pendingProps = current.dependencies;
workInProgress.dependencies = null === pendingProps ? null : {
expirationTime: pendingProps.expirationTime,
firstContext: pendingProps.firstContext,
responders: pendingProps.responders
};
workInProgress.sibling = current.sibling;
workInProgress.index = current.index;
workInProgress.ref = current.ref;
return workInProgress;
}
function createFiberFromTypeAndProps(type, key, pendingProps, owner, mode, expirationTime) {
var fiberTag = 2;
owner = type;
if ("function" === typeof type) shouldConstruct(type) && (fiberTag = 1);else if ("string" === typeof type) fiberTag = 5;else a: switch (type) {
case REACT_FRAGMENT_TYPE:
return createFiberFromFragment(pendingProps.children, mode, expirationTime, key);
case REACT_CONCURRENT_MODE_TYPE:
fiberTag = 8;
mode |= 7;
break;
case REACT_STRICT_MODE_TYPE:
fiberTag = 8;
mode |= 1;
break;
case REACT_PROFILER_TYPE:
return type = createFiber(12, pendingProps, key, mode | 8), type.elementType = REACT_PROFILER_TYPE, type.type = REACT_PROFILER_TYPE, type.expirationTime = expirationTime, type;
case REACT_SUSPENSE_TYPE:
return type = createFiber(13, pendingProps, key, mode), type.type = REACT_SUSPENSE_TYPE, type.elementType = REACT_SUSPENSE_TYPE, type.expirationTime = expirationTime, type;
case REACT_SUSPENSE_LIST_TYPE:
return type = createFiber(19, pendingProps, key, mode), type.elementType = REACT_SUSPENSE_LIST_TYPE, type.expirationTime = expirationTime, type;
default:
if ("object" === typeof type && null !== type) switch (type.$$typeof) {
case REACT_PROVIDER_TYPE:
fiberTag = 10;
break a;
case REACT_CONTEXT_TYPE:
fiberTag = 9;
break a;
case REACT_FORWARD_REF_TYPE:
fiberTag = 11;
break a;
case REACT_MEMO_TYPE:
fiberTag = 14;
break a;
case REACT_LAZY_TYPE:
fiberTag = 16;
owner = null;
break a;
}
throw ReactError(Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: " + (null == type ? type : typeof type) + "."));
}
key = createFiber(fiberTag, pendingProps, key, mode);
key.elementType = type;
key.type = owner;
key.expirationTime = expirationTime;
return key;
}
function createFiberFromFragment(elements, mode, expirationTime, key) {
elements = createFiber(7, elements, key, mode);
elements.expirationTime = expirationTime;
return elements;
}
function createFiberFromText(content, mode, expirationTime) {
content = createFiber(6, content, null, mode);
content.expirationTime = expirationTime;
return content;
}
function createFiberFromPortal(portal, mode, expirationTime) {
mode = createFiber(4, null !== portal.children ? portal.children : [], portal.key, mode);
mode.expirationTime = expirationTime;
mode.stateNode = {
containerInfo: portal.containerInfo,
pendingChildren: null,
implementation: portal.implementation
};
return mode;
}
function FiberRootNode(containerInfo, tag, hydrate) {
this.tag = tag;
this.current = null;
this.containerInfo = containerInfo;
this.pingCache = this.pendingChildren = null;
this.finishedExpirationTime = 0;
this.finishedWork = null;
this.timeoutHandle = -1;
this.pendingContext = this.context = null;
this.hydrate = hydrate;
this.callbackNode = this.firstBatch = null;
this.pingTime = this.lastPendingTime = this.firstPendingTime = this.callbackExpirationTime = 0;
}
function findHostInstance(component) {
var fiber = component._reactInternalFiber;
if (undefined === fiber) {
if ("function" === typeof component.render) throw ReactError(Error("Unable to find node on an unmounted component."));
throw ReactError(Error("Argument appears to not be a ReactComponent. Keys: " + Object.keys(component)));
}
component = findCurrentHostFiber(fiber);
return null === component ? null : component.stateNode;
}
function updateContainer(element, container, parentComponent, callback) {
var current$$1 = container.current,
currentTime = requestCurrentTime(),
suspenseConfig = ReactCurrentBatchConfig.suspense;
current$$1 = computeExpirationForFiber(currentTime, current$$1, suspenseConfig);
currentTime = container.current;
a: if (parentComponent) {
parentComponent = parentComponent._reactInternalFiber;
b: {
if (2 !== isFiberMountedImpl(parentComponent) || 1 !== parentComponent.tag) throw ReactError(Error("Expected subtree parent to be a mounted class component. This error is likely caused by a bug in React. Please file an issue."));
var parentContext = parentComponent;
do {
switch (parentContext.tag) {
case 3:
parentContext = parentContext.stateNode.context;
break b;
case 1:
if (isContextProvider(parentContext.type)) {
parentContext = parentContext.stateNode.__reactInternalMemoizedMergedChildContext;
break b;
}
}
parentContext = parentContext.return;
} while (null !== parentContext);
throw ReactError(Error("Found unexpected detached subtree parent. This error is likely caused by a bug in React. Please file an issue."));
}
if (1 === parentComponent.tag) {
var Component = parentComponent.type;
if (isContextProvider(Component)) {
parentComponent = processChildContext(parentComponent, Component, parentContext);
break a;
}
}
parentComponent = parentContext;
} else parentComponent = emptyContextObject;
null === container.context ? container.context = parentComponent : container.pendingContext = parentComponent;
container = callback;
suspenseConfig = createUpdate(current$$1, suspenseConfig);
suspenseConfig.payload = {
element: element
};
container = undefined === container ? null : container;
null !== container && (suspenseConfig.callback = container);
enqueueUpdate(currentTime, suspenseConfig);
scheduleUpdateOnFiber(currentTime, current$$1);
return current$$1;
}
function _createPortal(children, containerInfo, implementation) {
var key = 3 < arguments.length && undefined !== arguments[3] ? arguments[3] : null;
return {
$$typeof: REACT_PORTAL_TYPE,
key: null == key ? null : "" + key,
children: children,
containerInfo: containerInfo,
implementation: implementation
};
}
function _inherits(subClass, superClass) {
if ("function" !== typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: false,
writable: true,
configurable: true
}
});
superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass);
}
var getInspectorDataForViewTag = undefined;
getInspectorDataForViewTag = function getInspectorDataForViewTag() {
throw ReactError(Error("getInspectorDataForViewTag() is not available in production"));
};
function findNodeHandle(componentOrHandle) {
if (null == componentOrHandle) return null;
if ("number" === typeof componentOrHandle) return componentOrHandle;
if (componentOrHandle._nativeTag) return componentOrHandle._nativeTag;
if (componentOrHandle.canonical && componentOrHandle.canonical._nativeTag) return componentOrHandle.canonical._nativeTag;
componentOrHandle = findHostInstance(componentOrHandle);
return null == componentOrHandle ? componentOrHandle : componentOrHandle.canonical ? componentOrHandle.canonical._nativeTag : componentOrHandle._nativeTag;
}
batchedUpdatesImpl = function batchedUpdatesImpl(fn, a) {
var prevExecutionContext = executionContext;
executionContext |= 1;
try {
return fn(a);
} finally {
executionContext = prevExecutionContext, executionContext === NoContext && flushSyncCallbackQueue();
}
};
flushDiscreteUpdatesImpl = function flushDiscreteUpdatesImpl() {
(executionContext & 49) === NoContext && (flushPendingDiscreteUpdates(), flushPassiveEffects());
};
var roots = new Map(),
ReactNativeRenderer = {
NativeComponent: function (findNodeHandle, findHostInstance) {
return function (_React$Component) {
function ReactNativeComponent() {
if (!(this instanceof ReactNativeComponent)) throw new TypeError("Cannot call a class as a function");
var call = _React$Component.apply(this, arguments);
if (!this) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !call || "object" !== typeof call && "function" !== typeof call ? this : call;
}
_inherits(ReactNativeComponent, _React$Component);
ReactNativeComponent.prototype.blur = function () {
ReactNativePrivateInterface.TextInputState.blurTextInput(findNodeHandle(this));
};
ReactNativeComponent.prototype.focus = function () {
ReactNativePrivateInterface.TextInputState.focusTextInput(findNodeHandle(this));
};
ReactNativeComponent.prototype.measure = function (callback) {
var maybeInstance = undefined;
try {
maybeInstance = findHostInstance(this);
} catch (error) {}
null != maybeInstance && (maybeInstance.canonical ? nativeFabricUIManager.measure(maybeInstance.node, mountSafeCallback_NOT_REALLY_SAFE(this, callback)) : ReactNativePrivateInterface.UIManager.measure(findNodeHandle(this), mountSafeCallback_NOT_REALLY_SAFE(this, callback)));
};
ReactNativeComponent.prototype.measureInWindow = function (callback) {
var maybeInstance = undefined;
try {
maybeInstance = findHostInstance(this);
} catch (error) {}
null != maybeInstance && (maybeInstance.canonical ? nativeFabricUIManager.measureInWindow(maybeInstance.node, mountSafeCallback_NOT_REALLY_SAFE(this, callback)) : ReactNativePrivateInterface.UIManager.measureInWindow(findNodeHandle(this), mountSafeCallback_NOT_REALLY_SAFE(this, callback)));
};
ReactNativeComponent.prototype.measureLayout = function (relativeToNativeNode, onSuccess, onFail) {
var maybeInstance = undefined;
try {
maybeInstance = findHostInstance(this);
} catch (error) {}
null == maybeInstance || maybeInstance.canonical || (maybeInstance = undefined, "number" === typeof relativeToNativeNode ? maybeInstance = relativeToNativeNode : relativeToNativeNode._nativeTag && (maybeInstance = relativeToNativeNode._nativeTag), null != maybeInstance && ReactNativePrivateInterface.UIManager.measureLayout(findNodeHandle(this), maybeInstance, mountSafeCallback_NOT_REALLY_SAFE(this, onFail), mountSafeCallback_NOT_REALLY_SAFE(this, onSuccess)));
};
ReactNativeComponent.prototype.setNativeProps = function (nativeProps) {
var maybeInstance = undefined;
try {
maybeInstance = findHostInstance(this);
} catch (error) {}
if (null != maybeInstance && !maybeInstance.canonical) {
var nativeTag = maybeInstance._nativeTag || maybeInstance.canonical._nativeTag;
maybeInstance = maybeInstance.viewConfig || maybeInstance.canonical.viewConfig;
nativeProps = diffProperties(null, emptyObject, nativeProps, maybeInstance.validAttributes);
null != nativeProps && ReactNativePrivateInterface.UIManager.updateView(nativeTag, maybeInstance.uiViewClassName, nativeProps);
}
};
return ReactNativeComponent;
}(React.Component);
}(findNodeHandle, findHostInstance),
findNodeHandle: findNodeHandle,
dispatchCommand: function dispatchCommand(handle, command, args) {
null != handle._nativeTag && ReactNativePrivateInterface.UIManager.dispatchViewManagerCommand(handle._nativeTag, command, args);
},
setNativeProps: function setNativeProps(handle, nativeProps) {
null != handle._nativeTag && (nativeProps = diffProperties(null, emptyObject, nativeProps, handle.viewConfig.validAttributes), null != nativeProps && ReactNativePrivateInterface.UIManager.updateView(handle._nativeTag, handle.viewConfig.uiViewClassName, nativeProps));
},
render: function render(element, containerTag, callback) {
var root = roots.get(containerTag);
if (!root) {
root = new FiberRootNode(containerTag, 0, false);
var uninitializedFiber = createFiber(3, null, null, 0);
root.current = uninitializedFiber;
uninitializedFiber.stateNode = root;
roots.set(containerTag, root);
}
updateContainer(element, root, null, callback);
a: if (element = root.current, element.child) switch (element.child.tag) {
case 5:
element = element.child.stateNode;
break a;
default:
element = element.child.stateNode;
} else element = null;
return element;
},
unmountComponentAtNode: function unmountComponentAtNode(containerTag) {
var root = roots.get(containerTag);
root && updateContainer(null, root, null, function () {
roots.delete(containerTag);
});
},
unmountComponentAtNodeAndRemoveContainer: function unmountComponentAtNodeAndRemoveContainer(containerTag) {
ReactNativeRenderer.unmountComponentAtNode(containerTag);
ReactNativePrivateInterface.UIManager.removeRootView(containerTag);
},
createPortal: function createPortal(children, containerTag) {
return _createPortal(children, containerTag, null, 2 < arguments.length && undefined !== arguments[2] ? arguments[2] : null);
},
unstable_batchedUpdates: batchedUpdates,
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: {
NativeMethodsMixin: function (findNodeHandle, findHostInstance) {
return {
measure: function measure(callback) {
var maybeInstance = undefined;
try {
maybeInstance = findHostInstance(this);
} catch (error) {}
null != maybeInstance && (maybeInstance.canonical ? nativeFabricUIManager.measure(maybeInstance.node, mountSafeCallback_NOT_REALLY_SAFE(this, callback)) : ReactNativePrivateInterface.UIManager.measure(findNodeHandle(this), mountSafeCallback_NOT_REALLY_SAFE(this, callback)));
},
measureInWindow: function measureInWindow(callback) {
var maybeInstance = undefined;
try {
maybeInstance = findHostInstance(this);
} catch (error) {}
null != maybeInstance && (maybeInstance.canonical ? nativeFabricUIManager.measureInWindow(maybeInstance.node, mountSafeCallback_NOT_REALLY_SAFE(this, callback)) : ReactNativePrivateInterface.UIManager.measureInWindow(findNodeHandle(this), mountSafeCallback_NOT_REALLY_SAFE(this, callback)));
},
measureLayout: function measureLayout(relativeToNativeNode, onSuccess, onFail) {
var maybeInstance = undefined;
try {
maybeInstance = findHostInstance(this);
} catch (error) {}
null == maybeInstance || maybeInstance.canonical || (maybeInstance = undefined, "number" === typeof relativeToNativeNode ? maybeInstance = relativeToNativeNode : relativeToNativeNode._nativeTag && (maybeInstance = relativeToNativeNode._nativeTag), null != maybeInstance && ReactNativePrivateInterface.UIManager.measureLayout(findNodeHandle(this), maybeInstance, mountSafeCallback_NOT_REALLY_SAFE(this, onFail), mountSafeCallback_NOT_REALLY_SAFE(this, onSuccess)));
},
setNativeProps: function setNativeProps(nativeProps) {
var maybeInstance = undefined;
try {
maybeInstance = findHostInstance(this);
} catch (error) {}
if (null != maybeInstance && !maybeInstance.canonical) {
var nativeTag = maybeInstance._nativeTag || maybeInstance.canonical._nativeTag;
maybeInstance = maybeInstance.viewConfig || maybeInstance.canonical.viewConfig;
nativeProps = diffProperties(null, emptyObject, nativeProps, maybeInstance.validAttributes);
null != nativeProps && ReactNativePrivateInterface.UIManager.updateView(nativeTag, maybeInstance.uiViewClassName, nativeProps);
}
},
focus: function focus() {
ReactNativePrivateInterface.TextInputState.focusTextInput(findNodeHandle(this));
},
blur: function blur() {
ReactNativePrivateInterface.TextInputState.blurTextInput(findNodeHandle(this));
}
};
}(findNodeHandle, findHostInstance),
computeComponentStackForErrorReporting: function computeComponentStackForErrorReporting(reactTag) {
return (reactTag = getInstanceFromTag(reactTag)) ? getStackByFiberInDevAndProd(reactTag) : "";
}
}
};
(function (devToolsConfig) {
var _findFiberByHostInstance = devToolsConfig.findFiberByHostInstance;
return injectInternals(_extends({}, devToolsConfig, {
overrideHookState: null,
overrideProps: null,
setSuspenseHandler: null,
scheduleUpdate: null,
currentDispatcherRef: ReactSharedInternals.ReactCurrentDispatcher,
findHostInstanceByFiber: function findHostInstanceByFiber(fiber) {
fiber = findCurrentHostFiber(fiber);
return null === fiber ? null : fiber.stateNode;
},
findFiberByHostInstance: function findFiberByHostInstance(instance) {
return _findFiberByHostInstance ? _findFiberByHostInstance(instance) : null;
},
findHostInstancesForRefresh: null,
scheduleRefresh: null,
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null
}));
})({
findFiberByHostInstance: getInstanceFromTag,
getInspectorDataForViewTag: getInspectorDataForViewTag,
bundleType: 0,
version: "16.8.6",
rendererPackageName: "react-native-renderer"
});
var ReactNativeRenderer$2 = {
default: ReactNativeRenderer
},
ReactNativeRenderer$3 = ReactNativeRenderer$2 && ReactNativeRenderer || ReactNativeRenderer$2;
module.exports = ReactNativeRenderer$3.default || ReactNativeRenderer$3;
},14443,[14344,14446,14566,10297,14575]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
_$$_REQUIRE(_dependencyMap[0]);
},14446,[10120]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
if (global.GLOBAL === undefined) {
global.GLOBAL = global;
}
if (global.window === undefined) {
global.window = global;
}
if (global.self === undefined) {
global.self = global;
}
global.process = global.process || {};
global.process.env = global.process.env || {};
if (!global.process.env.NODE_ENV) {
global.process.env.NODE_ENV = 'production';
}
},14449,[]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
if (global.__RCTProfileIsProfiling) {
var Systrace = _$$_REQUIRE(_dependencyMap[0]);
Systrace.installReactHook();
Systrace.setEnabled(true);
}
},14452,[10054]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var ExceptionsManager = _$$_REQUIRE(_dependencyMap[0]);
ExceptionsManager.installConsoleErrorReporter();
if (!global.__fbDisableExceptionsManager) {
var handleError = function handleError(e, isFatal) {
try {
ExceptionsManager.handleException(e, isFatal);
} catch (ee) {
throw e;
}
};
var ErrorUtils = _$$_REQUIRE(_dependencyMap[1]);
ErrorUtils.setGlobalHandler(handleError);
}
},14455,[10141,10051]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
var getPrototypeOf = _$$_REQUIRE(_dependencyMap[0]);
var setPrototypeOf = _$$_REQUIRE(_dependencyMap[1]);
var isNativeFunction = _$$_REQUIRE(_dependencyMap[2]);
var construct = _$$_REQUIRE(_dependencyMap[3]);
function _wrapNativeSuper(Class) {
var _cache = typeof Map === "function" ? new Map() : undefined;
module.exports = _wrapNativeSuper = function _wrapNativeSuper(Class) {
if (Class === null || !isNativeFunction(Class)) return Class;
if (typeof Class !== "function") {
throw new TypeError("Super expression must either be null or a function");
}
if (typeof _cache !== "undefined") {
if (_cache.has(Class)) return _cache.get(Class);
_cache.set(Class, Wrapper);
}
function Wrapper() {
return construct(Class, arguments, getPrototypeOf(this).constructor);
}
Wrapper.prototype = Object.create(Class.prototype, {
constructor: {
value: Wrapper,
enumerable: false,
writable: true,
configurable: true
}
});
return setPrototypeOf(Wrapper, Class);
};
return _wrapNativeSuper(Class);
}
module.exports = _wrapNativeSuper;
},14458,[14377,14389,14461,14464]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
function _isNativeFunction(fn) {
return Function.toString.call(fn).indexOf("[native code]") !== -1;
}
module.exports = _isNativeFunction;
},14461,[]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
var setPrototypeOf = _$$_REQUIRE(_dependencyMap[0]);
function isNativeReflectConstruct() {
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
if (Reflect.construct.sham) return false;
if (typeof Proxy === "function") return true;
try {
Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));
return true;
} catch (e) {
return false;
}
}
function _construct(Parent, args, Class) {
if (isNativeReflectConstruct()) {
module.exports = _construct = Reflect.construct;
} else {
module.exports = _construct = function _construct(Parent, args, Class) {
var a = [null];
a.push.apply(a, args);
var Constructor = Function.bind.apply(Parent, a);
var instance = new Constructor();
if (Class) setPrototypeOf(instance, Class.prototype);
return instance;
};
}
return _construct.apply(null, arguments);
}
module.exports = _construct;
},14464,[14389]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var _interopRequireWildcard = _$$_REQUIRE(_dependencyMap[0]);
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = undefined;
var TurboModuleRegistry = _interopRequireWildcard(_$$_REQUIRE(_dependencyMap[1]));
var Platform = _$$_REQUIRE(_dependencyMap[2]);
var NativeModule = TurboModuleRegistry.getEnforcing('ExceptionsManager');
var ExceptionsManager = {
reportFatalException: function reportFatalException(message, stack, exceptionId) {
NativeModule.reportFatalException(message, stack, exceptionId);
},
reportSoftException: function reportSoftException(message, stack, exceptionId) {
NativeModule.reportSoftException(message, stack, exceptionId);
},
updateExceptionMessage: function updateExceptionMessage(message, stack, exceptionId) {
NativeModule.updateExceptionMessage(message, stack, exceptionId);
},
dismissRedbox: function dismissRedbox() {
if (NativeModule.dismissRedbox) {
NativeModule.dismissRedbox();
}
},
reportException: function reportException(data) {
if (NativeModule.reportException) {
NativeModule.reportException(data);
return;
}
if (data.isFatal) {
ExceptionsManager.reportFatalException(data.message, data.stack, data.id);
} else {
ExceptionsManager.reportSoftException(data.message, data.stack, data.id);
}
}
};
var _default = ExceptionsManager;
exports.default = _default;
},14467,[14308,14341,10066]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var _require = _$$_REQUIRE(_dependencyMap[0]),
polyfillGlobal = _require.polyfillGlobal;
polyfillGlobal('Promise', function () {
return _$$_REQUIRE(_dependencyMap[1]);
});
},14470,[14473,10159]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var defineLazyObjectProperty = _$$_REQUIRE(_dependencyMap[0]);
function polyfillObjectProperty(object, name, getValue) {
var descriptor = Object.getOwnPropertyDescriptor(object, name);
var _ref = descriptor || {},
enumerable = _ref.enumerable,
writable = _ref.writable,
configurable = _ref.configurable;
if (descriptor && !configurable) {
return;
}
defineLazyObjectProperty(object, name, {
get: getValue,
enumerable: enumerable !== false,
writable: writable !== false
});
}
function polyfillGlobal(name, getValue) {
polyfillObjectProperty(global, name, getValue);
}
module.exports = {
polyfillObjectProperty: polyfillObjectProperty,
polyfillGlobal: polyfillGlobal
};
},14473,[10084]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var Promise = _$$_REQUIRE(_dependencyMap[0]);
module.exports = Promise;
Promise.prototype['finally'] = function (f) {
return this.then(function (value) {
return Promise.resolve(f()).then(function () {
return value;
});
}, function (err) {
return Promise.resolve(f()).then(function () {
throw err;
});
});
};
},14476,[10168]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var _require = _$$_REQUIRE(_dependencyMap[0]),
polyfillGlobal = _require.polyfillGlobal;
polyfillGlobal('regeneratorRuntime', function () {
delete global.regeneratorRuntime;
return _$$_REQUIRE(_dependencyMap[1]);
});
},14479,[14473,14482]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
var runtime = function (exports) {
"use strict";
var Op = Object.prototype;
var hasOwn = Op.hasOwnProperty;
var undefined;
var $Symbol = typeof Symbol === "function" ? Symbol : {};
var iteratorSymbol = $Symbol.iterator || "@@iterator";
var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
function wrap(innerFn, outerFn, self, tryLocsList) {
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
var generator = Object.create(protoGenerator.prototype);
var context = new Context(tryLocsList || []);
generator._invoke = makeInvokeMethod(innerFn, self, context);
return generator;
}
exports.wrap = wrap;
function tryCatch(fn, obj, arg) {
try {
return {
type: "normal",
arg: fn.call(obj, arg)
};
} catch (err) {
return {
type: "throw",
arg: err
};
}
}
var GenStateSuspendedStart = "suspendedStart";
var GenStateSuspendedYield = "suspendedYield";
var GenStateExecuting = "executing";
var GenStateCompleted = "completed";
var ContinueSentinel = {};
function Generator() {}
function GeneratorFunction() {}
function GeneratorFunctionPrototype() {}
var IteratorPrototype = {};
IteratorPrototype[iteratorSymbol] = function () {
return this;
};
var getProto = Object.getPrototypeOf;
var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
if (NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
IteratorPrototype = NativeIteratorPrototype;
}
var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
GeneratorFunctionPrototype.constructor = GeneratorFunction;
GeneratorFunctionPrototype[toStringTagSymbol] = GeneratorFunction.displayName = "GeneratorFunction";
function defineIteratorMethods(prototype) {
["next", "throw", "return"].forEach(function (method) {
prototype[method] = function (arg) {
return this._invoke(method, arg);
};
});
}
exports.isGeneratorFunction = function (genFun) {
var ctor = typeof genFun === "function" && genFun.constructor;
return ctor ? ctor === GeneratorFunction || (ctor.displayName || ctor.name) === "GeneratorFunction" : false;
};
exports.mark = function (genFun) {
if (Object.setPrototypeOf) {
Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
} else {
genFun.__proto__ = GeneratorFunctionPrototype;
if (!(toStringTagSymbol in genFun)) {
genFun[toStringTagSymbol] = "GeneratorFunction";
}
}
genFun.prototype = Object.create(Gp);
return genFun;
};
exports.awrap = function (arg) {
return {
__await: arg
};
};
function AsyncIterator(generator, PromiseImpl) {
function invoke(method, arg, resolve, reject) {
var record = tryCatch(generator[method], generator, arg);
if (record.type === "throw") {
reject(record.arg);
} else {
var result = record.arg;
var value = result.value;
if (value && typeof value === "object" && hasOwn.call(value, "__await")) {
return PromiseImpl.resolve(value.__await).then(function (value) {
invoke("next", value, resolve, reject);
}, function (err) {
invoke("throw", err, resolve, reject);
});
}
return PromiseImpl.resolve(value).then(function (unwrapped) {
result.value = unwrapped;
resolve(result);
}, function (error) {
return invoke("throw", error, resolve, reject);
});
}
}
var previousPromise;
function enqueue(method, arg) {
function callInvokeWithMethodAndArg() {
return new PromiseImpl(function (resolve, reject) {
invoke(method, arg, resolve, reject);
});
}
return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
}
this._invoke = enqueue;
}
defineIteratorMethods(AsyncIterator.prototype);
AsyncIterator.prototype[asyncIteratorSymbol] = function () {
return this;
};
exports.AsyncIterator = AsyncIterator;
exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
if (PromiseImpl === undefined) PromiseImpl = Promise;
var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
return result.done ? result.value : iter.next();
});
};
function makeInvokeMethod(innerFn, self, context) {
var state = GenStateSuspendedStart;
return function invoke(method, arg) {
if (state === GenStateExecuting) {
throw new Error("Generator is already running");
}
if (state === GenStateCompleted) {
if (method === "throw") {
throw arg;
}
return doneResult();
}
context.method = method;
context.arg = arg;
while (true) {
var delegate = context.delegate;
if (delegate) {
var delegateResult = maybeInvokeDelegate(delegate, context);
if (delegateResult) {
if (delegateResult === ContinueSentinel) continue;
return delegateResult;
}
}
if (context.method === "next") {
context.sent = context._sent = context.arg;
} else if (context.method === "throw") {
if (state === GenStateSuspendedStart) {
state = GenStateCompleted;
throw context.arg;
}
context.dispatchException(context.arg);
} else if (context.method === "return") {
context.abrupt("return", context.arg);
}
state = GenStateExecuting;
var record = tryCatch(innerFn, self, context);
if (record.type === "normal") {
state = context.done ? GenStateCompleted : GenStateSuspendedYield;
if (record.arg === ContinueSentinel) {
continue;
}
return {
value: record.arg,
done: context.done
};
} else if (record.type === "throw") {
state = GenStateCompleted;
context.method = "throw";
context.arg = record.arg;
}
}
};
}
function maybeInvokeDelegate(delegate, context) {
var method = delegate.iterator[context.method];
if (method === undefined) {
context.delegate = null;
if (context.method === "throw") {
if (delegate.iterator["return"]) {
context.method = "return";
context.arg = undefined;
maybeInvokeDelegate(delegate, context);
if (context.method === "throw") {
return ContinueSentinel;
}
}
context.method = "throw";
context.arg = new TypeError("The iterator does not provide a 'throw' method");
}
return ContinueSentinel;
}
var record = tryCatch(method, delegate.iterator, context.arg);
if (record.type === "throw") {
context.method = "throw";
context.arg = record.arg;
context.delegate = null;
return ContinueSentinel;
}
var info = record.arg;
if (!info) {
context.method = "throw";
context.arg = new TypeError("iterator result is not an object");
context.delegate = null;
return ContinueSentinel;
}
if (info.done) {
context[delegate.resultName] = info.value;
context.next = delegate.nextLoc;
if (context.method !== "return") {
context.method = "next";
context.arg = undefined;
}
} else {
return info;
}
context.delegate = null;
return ContinueSentinel;
}
defineIteratorMethods(Gp);
Gp[toStringTagSymbol] = "Generator";
Gp[iteratorSymbol] = function () {
return this;
};
Gp.toString = function () {
return "[object Generator]";
};
function pushTryEntry(locs) {
var entry = {
tryLoc: locs[0]
};
if (1 in locs) {
entry.catchLoc = locs[1];
}
if (2 in locs) {
entry.finallyLoc = locs[2];
entry.afterLoc = locs[3];
}
this.tryEntries.push(entry);
}
function resetTryEntry(entry) {
var record = entry.completion || {};
record.type = "normal";
delete record.arg;
entry.completion = record;
}
function Context(tryLocsList) {
this.tryEntries = [{
tryLoc: "root"
}];
tryLocsList.forEach(pushTryEntry, this);
this.reset(true);
}
exports.keys = function (object) {
var keys = [];
for (var key in object) {
keys.push(key);
}
keys.reverse();
return function next() {
while (keys.length) {
var key = keys.pop();
if (key in object) {
next.value = key;
next.done = false;
return next;
}
}
next.done = true;
return next;
};
};
function values(iterable) {
if (iterable) {
var iteratorMethod = iterable[iteratorSymbol];
if (iteratorMethod) {
return iteratorMethod.call(iterable);
}
if (typeof iterable.next === "function") {
return iterable;
}
if (!isNaN(iterable.length)) {
var i = -1,
next = function next() {
while (++i < iterable.length) {
if (hasOwn.call(iterable, i)) {
next.value = iterable[i];
next.done = false;
return next;
}
}
next.value = undefined;
next.done = true;
return next;
};
return next.next = next;
}
}
return {
next: doneResult
};
}
exports.values = values;
function doneResult() {
return {
value: undefined,
done: true
};
}
Context.prototype = {
constructor: Context,
reset: function reset(skipTempReset) {
this.prev = 0;
this.next = 0;
this.sent = this._sent = undefined;
this.done = false;
this.delegate = null;
this.method = "next";
this.arg = undefined;
this.tryEntries.forEach(resetTryEntry);
if (!skipTempReset) {
for (var name in this) {
if (name.charAt(0) === "t" && hasOwn.call(this, name) && !isNaN(+name.slice(1))) {
this[name] = undefined;
}
}
}
},
stop: function stop() {
this.done = true;
var rootEntry = this.tryEntries[0];
var rootRecord = rootEntry.completion;
if (rootRecord.type === "throw") {
throw rootRecord.arg;
}
return this.rval;
},
dispatchException: function dispatchException(exception) {
if (this.done) {
throw exception;
}
var context = this;
function handle(loc, caught) {
record.type = "throw";
record.arg = exception;
context.next = loc;
if (caught) {
context.method = "next";
context.arg = undefined;
}
return !!caught;
}
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
var entry = this.tryEntries[i];
var record = entry.completion;
if (entry.tryLoc === "root") {
return handle("end");
}
if (entry.tryLoc <= this.prev) {
var hasCatch = hasOwn.call(entry, "catchLoc");
var hasFinally = hasOwn.call(entry, "finallyLoc");
if (hasCatch && hasFinally) {
if (this.prev < entry.catchLoc) {
return handle(entry.catchLoc, true);
} else if (this.prev < entry.finallyLoc) {
return handle(entry.finallyLoc);
}
} else if (hasCatch) {
if (this.prev < entry.catchLoc) {
return handle(entry.catchLoc, true);
}
} else if (hasFinally) {
if (this.prev < entry.finallyLoc) {
return handle(entry.finallyLoc);
}
} else {
throw new Error("try statement without catch or finally");
}
}
}
},
abrupt: function abrupt(type, arg) {
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
var entry = this.tryEntries[i];
if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
var finallyEntry = entry;
break;
}
}
if (finallyEntry && (type === "break" || type === "continue") && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc) {
finallyEntry = null;
}
var record = finallyEntry ? finallyEntry.completion : {};
record.type = type;
record.arg = arg;
if (finallyEntry) {
this.method = "next";
this.next = finallyEntry.finallyLoc;
return ContinueSentinel;
}
return this.complete(record);
},
complete: function complete(record, afterLoc) {
if (record.type === "throw") {
throw record.arg;
}
if (record.type === "break" || record.type === "continue") {
this.next = record.arg;
} else if (record.type === "return") {
this.rval = this.arg = record.arg;
this.method = "return";
this.next = "end";
} else if (record.type === "normal" && afterLoc) {
this.next = afterLoc;
}
return ContinueSentinel;
},
finish: function finish(finallyLoc) {
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
var entry = this.tryEntries[i];
if (entry.finallyLoc === finallyLoc) {
this.complete(entry.completion, entry.afterLoc);
resetTryEntry(entry);
return ContinueSentinel;
}
}
},
"catch": function _catch(tryLoc) {
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
var entry = this.tryEntries[i];
if (entry.tryLoc === tryLoc) {
var record = entry.completion;
if (record.type === "throw") {
var thrown = record.arg;
resetTryEntry(entry);
}
return thrown;
}
}
throw new Error("illegal catch attempt");
},
delegateYield: function delegateYield(iterable, resultName, nextLoc) {
this.delegate = {
iterator: values(iterable),
resultName: resultName,
nextLoc: nextLoc
};
if (this.method === "next") {
this.arg = undefined;
}
return ContinueSentinel;
}
};
return exports;
}(typeof module === "object" ? module.exports : {});
try {
regeneratorRuntime = runtime;
} catch (accidentalStrictMode) {
Function("r", "regeneratorRuntime = r")(runtime);
}
},14482,[]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
if (!global.RN$Bridgeless) {
var _require = _$$_REQUIRE(_dependencyMap[0]),
polyfillGlobal = _require.polyfillGlobal;
var defineLazyTimer = function defineLazyTimer(name) {
polyfillGlobal(name, function () {
return _$$_REQUIRE(_dependencyMap[1])[name];
});
};
defineLazyTimer('setTimeout');
defineLazyTimer('setInterval');
defineLazyTimer('setImmediate');
defineLazyTimer('clearTimeout');
defineLazyTimer('clearInterval');
defineLazyTimer('clearImmediate');
defineLazyTimer('requestAnimationFrame');
defineLazyTimer('cancelAnimationFrame');
defineLazyTimer('requestIdleCallback');
defineLazyTimer('cancelIdleCallback');
}
},14485,[14473,10063]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var _interopRequireWildcard = _$$_REQUIRE(_dependencyMap[0]);
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = undefined;
var TurboModuleRegistry = _interopRequireWildcard(_$$_REQUIRE(_dependencyMap[1]));
var _default = TurboModuleRegistry.get('Timing');
exports.default = _default;
},14488,[14308,14341]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
"use strict";
var performance = _$$_REQUIRE(_dependencyMap[0]);
var performanceNow;
if (performance.now) {
performanceNow = function performanceNow() {
return performance.now();
};
} else {
performanceNow = function performanceNow() {
return Date.now();
};
}
module.exports = performanceNow;
},14491,[14494]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var ExecutionEnvironment = _$$_REQUIRE(_dependencyMap[0]);
var performance;
if (ExecutionEnvironment.canUseDOM) {
performance = window.performance || window.msPerformance || window.webkitPerformance;
}
module.exports = performance || {};
},14494,[14497]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
var ExecutionEnvironment = {
canUseDOM: canUseDOM,
canUseWorkers: typeof Worker !== 'undefined',
canUseEventListeners: canUseDOM && !!(window.addEventListener || window.attachEvent),
canUseViewport: canUseDOM && !!window.screen,
isInWorker: !canUseDOM
};
module.exports = ExecutionEnvironment;
},14497,[]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var _require = _$$_REQUIRE(_dependencyMap[0]),
polyfillGlobal = _require.polyfillGlobal;
polyfillGlobal('XMLHttpRequest', function () {
return _$$_REQUIRE(_dependencyMap[1]);
});
polyfillGlobal('FormData', function () {
return _$$_REQUIRE(_dependencyMap[2]);
});
polyfillGlobal('fetch', function () {
return _$$_REQUIRE(_dependencyMap[3]).fetch;
});
polyfillGlobal('Headers', function () {
return _$$_REQUIRE(_dependencyMap[3]).Headers;
});
polyfillGlobal('Request', function () {
return _$$_REQUIRE(_dependencyMap[3]).Request;
});
polyfillGlobal('Response', function () {
return _$$_REQUIRE(_dependencyMap[3]).Response;
});
polyfillGlobal('WebSocket', function () {
return _$$_REQUIRE(_dependencyMap[4]);
});
polyfillGlobal('Blob', function () {
return _$$_REQUIRE(_dependencyMap[5]);
});
polyfillGlobal('File', function () {
return _$$_REQUIRE(_dependencyMap[6]);
});
polyfillGlobal('FileReader', function () {
return _$$_REQUIRE(_dependencyMap[7]);
});
polyfillGlobal('URL', function () {
return _$$_REQUIRE(_dependencyMap[8]).URL;
});
polyfillGlobal('URLSearchParams', function () {
return _$$_REQUIRE(_dependencyMap[8]).URLSearchParams;
});
polyfillGlobal('AbortController', function () {
return _$$_REQUIRE(_dependencyMap[9]).AbortController;
});
polyfillGlobal('AbortSignal', function () {
return _$$_REQUIRE(_dependencyMap[9]).AbortSignal;
});
},14500,[14473,10177,10219,10222,10228,10210,10234,10237,10240,14521]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var _interopRequireWildcard = _$$_REQUIRE(_dependencyMap[0]);
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = undefined;
var TurboModuleRegistry = _interopRequireWildcard(_$$_REQUIRE(_dependencyMap[1]));
var _default = TurboModuleRegistry.get('BlobModule');
exports.default = _default;
},14503,[14308,14341]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
var privateData = new WeakMap();
var wrappers = new WeakMap();
function pd(event) {
var retv = privateData.get(event);
if (retv === null) {
throw new TypeError("'this' is expected an Event object, but got " + JSON.stringify(event));
}
return retv;
}
function setCancelFlag(data) {
if (data.passiveListener != null) {
if (typeof console !== "undefined" && true) {}
return;
}
if (!data.event.cancelable) {
return;
}
data.canceled = true;
if (typeof data.event.preventDefault === "function") {
data.event.preventDefault();
}
}
function Event(eventTarget, event) {
privateData.set(this, {
eventTarget: eventTarget,
event: event,
eventPhase: 2,
currentTarget: eventTarget,
canceled: false,
stopped: false,
immediateStopped: false,
passiveListener: null,
timeStamp: event.timeStamp || Date.now()
});
Object.defineProperty(this, "isTrusted", {
value: false,
enumerable: true
});
var keys = Object.keys(event);
for (var i = 0; i < keys.length; ++i) {
var key = keys[i];
if (!(key in this)) {
Object.defineProperty(this, key, defineRedirectDescriptor(key));
}
}
}
Event.prototype = {
get type() {
return pd(this).event.type;
},
get target() {
return pd(this).eventTarget;
},
get currentTarget() {
return pd(this).currentTarget;
},
composedPath: function composedPath() {
var currentTarget = pd(this).currentTarget;
if (currentTarget == null) {
return [];
}
return [currentTarget];
},
get NONE() {
return 0;
},
get CAPTURING_PHASE() {
return 1;
},
get AT_TARGET() {
return 2;
},
get BUBBLING_PHASE() {
return 3;
},
get eventPhase() {
return pd(this).eventPhase;
},
stopPropagation: function stopPropagation() {
var data = pd(this);
data.stopped = true;
if (typeof data.event.stopPropagation === "function") {
data.event.stopPropagation();
}
},
stopImmediatePropagation: function stopImmediatePropagation() {
var data = pd(this);
data.stopped = true;
data.immediateStopped = true;
if (typeof data.event.stopImmediatePropagation === "function") {
data.event.stopImmediatePropagation();
}
},
get bubbles() {
return Boolean(pd(this).event.bubbles);
},
get cancelable() {
return Boolean(pd(this).event.cancelable);
},
preventDefault: function preventDefault() {
setCancelFlag(pd(this));
},
get defaultPrevented() {
return pd(this).canceled;
},
get composed() {
return Boolean(pd(this).event.composed);
},
get timeStamp() {
return pd(this).timeStamp;
},
get srcElement() {
return pd(this).eventTarget;
},
get cancelBubble() {
return pd(this).stopped;
},
set cancelBubble(value) {
if (!value) {
return;
}
var data = pd(this);
data.stopped = true;
if (typeof data.event.cancelBubble === "boolean") {
data.event.cancelBubble = true;
}
},
get returnValue() {
return !pd(this).canceled;
},
set returnValue(value) {
if (!value) {
setCancelFlag(pd(this));
}
},
initEvent: function initEvent() {}
};
Object.defineProperty(Event.prototype, "constructor", {
value: Event,
configurable: true,
writable: true
});
if (typeof window !== "undefined" && typeof window.Event !== "undefined" && typeof window.Event.prototype === "object") {
Object.setPrototypeOf(Event.prototype, window.Event.prototype);
wrappers.set(window.Event.prototype, Event);
}
function defineRedirectDescriptor(key) {
return {
get: function get() {
return pd(this).event[key];
},
set: function set(value) {
pd(this).event[key] = value;
},
configurable: true,
enumerable: true
};
}
function defineCallDescriptor(key) {
return {
value: function value() {
var event = pd(this).event;
return event[key].apply(event, arguments);
},
configurable: true,
enumerable: true
};
}
function defineWrapper(BaseEvent, proto) {
var keys = Object.keys(proto);
if (keys.length === 0) {
return BaseEvent;
}
function CustomEvent(eventTarget, event) {
BaseEvent.call(this, eventTarget, event);
}
CustomEvent.prototype = Object.create(BaseEvent.prototype, {
constructor: {
value: CustomEvent,
configurable: true,
writable: true
}
});
for (var i = 0; i < keys.length; ++i) {
var key = keys[i];
if (!(key in BaseEvent.prototype)) {
var descriptor = Object.getOwnPropertyDescriptor(proto, key);
var isFunc = typeof descriptor.value === "function";
Object.defineProperty(CustomEvent.prototype, key, isFunc ? defineCallDescriptor(key) : defineRedirectDescriptor(key));
}
}
return CustomEvent;
}
function getWrapper(proto) {
if (proto == null || proto === Object.prototype) {
return Event;
}
var wrapper = wrappers.get(proto);
if (wrapper == null) {
wrapper = defineWrapper(getWrapper(Object.getPrototypeOf(proto)), proto);
wrappers.set(proto, wrapper);
}
return wrapper;
}
function wrapEvent(eventTarget, event) {
var Wrapper = getWrapper(Object.getPrototypeOf(event));
return new Wrapper(eventTarget, event);
}
function isStopped(event) {
return pd(event).immediateStopped;
}
function setEventPhase(event, eventPhase) {
pd(event).eventPhase = eventPhase;
}
function setCurrentTarget(event, currentTarget) {
pd(event).currentTarget = currentTarget;
}
function setPassiveListener(event, passiveListener) {
pd(event).passiveListener = passiveListener;
}
var listenersMap = new WeakMap();
var CAPTURE = 1;
var BUBBLE = 2;
var ATTRIBUTE = 3;
function isObject(x) {
return x !== null && typeof x === "object";
}
function getListeners(eventTarget) {
var listeners = listenersMap.get(eventTarget);
if (listeners == null) {
throw new TypeError("'this' is expected an EventTarget object, but got another value.");
}
return listeners;
}
function defineEventAttributeDescriptor(eventName) {
return {
get: function get() {
var listeners = getListeners(this);
var node = listeners.get(eventName);
while (node != null) {
if (node.listenerType === ATTRIBUTE) {
return node.listener;
}
node = node.next;
}
return null;
},
set: function set(listener) {
if (typeof listener !== "function" && !isObject(listener)) {
listener = null;
}
var listeners = getListeners(this);
var prev = null;
var node = listeners.get(eventName);
while (node != null) {
if (node.listenerType === ATTRIBUTE) {
if (prev !== null) {
prev.next = node.next;
} else if (node.next !== null) {
listeners.set(eventName, node.next);
} else {
listeners.delete(eventName);
}
} else {
prev = node;
}
node = node.next;
}
if (listener !== null) {
var newNode = {
listener: listener,
listenerType: ATTRIBUTE,
passive: false,
once: false,
next: null
};
if (prev === null) {
listeners.set(eventName, newNode);
} else {
prev.next = newNode;
}
}
},
configurable: true,
enumerable: true
};
}
function defineEventAttribute(eventTargetPrototype, eventName) {
Object.defineProperty(eventTargetPrototype, "on" + eventName, defineEventAttributeDescriptor(eventName));
}
function defineCustomEventTarget(eventNames) {
function CustomEventTarget() {
EventTarget.call(this);
}
CustomEventTarget.prototype = Object.create(EventTarget.prototype, {
constructor: {
value: CustomEventTarget,
configurable: true,
writable: true
}
});
for (var i = 0; i < eventNames.length; ++i) {
defineEventAttribute(CustomEventTarget.prototype, eventNames[i]);
}
return CustomEventTarget;
}
function EventTarget() {
if (this instanceof EventTarget) {
listenersMap.set(this, new Map());
return;
}
if (arguments.length === 1 && Array.isArray(arguments[0])) {
return defineCustomEventTarget(arguments[0]);
}
if (arguments.length > 0) {
var types = new Array(arguments.length);
for (var i = 0; i < arguments.length; ++i) {
types[i] = arguments[i];
}
return defineCustomEventTarget(types);
}
throw new TypeError("Cannot call a class as a function");
}
EventTarget.prototype = {
addEventListener: function addEventListener(eventName, listener, options) {
if (listener == null) {
return;
}
if (typeof listener !== "function" && !isObject(listener)) {
throw new TypeError("'listener' should be a function or an object.");
}
var listeners = getListeners(this);
var optionsIsObj = isObject(options);
var capture = optionsIsObj ? Boolean(options.capture) : Boolean(options);
var listenerType = capture ? CAPTURE : BUBBLE;
var newNode = {
listener: listener,
listenerType: listenerType,
passive: optionsIsObj && Boolean(options.passive),
once: optionsIsObj && Boolean(options.once),
next: null
};
var node = listeners.get(eventName);
if (node === undefined) {
listeners.set(eventName, newNode);
return;
}
var prev = null;
while (node != null) {
if (node.listener === listener && node.listenerType === listenerType) {
return;
}
prev = node;
node = node.next;
}
prev.next = newNode;
},
removeEventListener: function removeEventListener(eventName, listener, options) {
if (listener == null) {
return;
}
var listeners = getListeners(this);
var capture = isObject(options) ? Boolean(options.capture) : Boolean(options);
var listenerType = capture ? CAPTURE : BUBBLE;
var prev = null;
var node = listeners.get(eventName);
while (node != null) {
if (node.listener === listener && node.listenerType === listenerType) {
if (prev !== null) {
prev.next = node.next;
} else if (node.next !== null) {
listeners.set(eventName, node.next);
} else {
listeners.delete(eventName);
}
return;
}
prev = node;
node = node.next;
}
},
dispatchEvent: function dispatchEvent(event) {
if (event == null || typeof event.type !== "string") {
throw new TypeError('"event.type" should be a string.');
}
var listeners = getListeners(this);
var eventName = event.type;
var node = listeners.get(eventName);
if (node == null) {
return true;
}
var wrappedEvent = wrapEvent(this, event);
var prev = null;
while (node != null) {
if (node.once) {
if (prev !== null) {
prev.next = node.next;
} else if (node.next !== null) {
listeners.set(eventName, node.next);
} else {
listeners.delete(eventName);
}
} else {
prev = node;
}
setPassiveListener(wrappedEvent, node.passive ? node.listener : null);
if (typeof node.listener === "function") {
try {
node.listener.call(this, wrappedEvent);
} catch (err) {
if (typeof console !== "undefined" && true) {}
}
} else if (node.listenerType !== ATTRIBUTE && typeof node.listener.handleEvent === "function") {
node.listener.handleEvent(wrappedEvent);
}
if (isStopped(wrappedEvent)) {
break;
}
node = node.next;
}
setPassiveListener(wrappedEvent, null);
setEventPhase(wrappedEvent, 0);
setCurrentTarget(wrappedEvent, null);
return !wrappedEvent.defaultPrevented;
}
};
Object.defineProperty(EventTarget.prototype, "constructor", {
value: EventTarget,
configurable: true,
writable: true
});
if (typeof window !== "undefined" && typeof window.EventTarget !== "undefined") {
Object.setPrototypeOf(EventTarget.prototype, window.EventTarget.prototype);
}
exports.defineEventAttribute = defineEventAttribute;
exports.EventTarget = EventTarget;
exports.default = EventTarget;
module.exports = EventTarget;
module.exports.EventTarget = module.exports["default"] = EventTarget;
module.exports.defineEventAttribute = defineEventAttribute;
},14506,[]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var _interopRequireWildcard = _$$_REQUIRE(_dependencyMap[0]);
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = undefined;
var TurboModuleRegistry = _interopRequireWildcard(_$$_REQUIRE(_dependencyMap[1]));
var _default = TurboModuleRegistry.getEnforcing('Networking');
exports.default = _default;
},14509,[14308,14341]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : typeof define === 'function' && define.amd ? define(['exports'], factory) : factory(global.WHATWGFetch = {});
})(this, function (exports) {
'use strict';
var support = {
searchParams: 'URLSearchParams' in self,
iterable: 'Symbol' in self && 'iterator' in Symbol,
blob: 'FileReader' in self && 'Blob' in self && function () {
try {
new Blob();
return true;
} catch (e) {
return false;
}
}(),
formData: 'FormData' in self,
arrayBuffer: 'ArrayBuffer' in self
};
function isDataView(obj) {
return obj && DataView.prototype.isPrototypeOf(obj);
}
if (support.arrayBuffer) {
var viewClasses = ['[object Int8Array]', '[object Uint8Array]', '[object Uint8ClampedArray]', '[object Int16Array]', '[object Uint16Array]', '[object Int32Array]', '[object Uint32Array]', '[object Float32Array]', '[object Float64Array]'];
var isArrayBufferView = ArrayBuffer.isView || function (obj) {
return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1;
};
}
function normalizeName(name) {
if (typeof name !== 'string') {
name = String(name);
}
if (/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(name)) {
throw new TypeError('Invalid character in header field name');
}
return name.toLowerCase();
}
function normalizeValue(value) {
if (typeof value !== 'string') {
value = String(value);
}
return value;
}
function iteratorFor(items) {
var iterator = {
next: function next() {
var value = items.shift();
return {
done: value === undefined,
value: value
};
}
};
if (support.iterable) {
iterator[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"] = function () {
return iterator;
};
}
return iterator;
}
function Headers(headers) {
this.map = {};
if (headers instanceof Headers) {
headers.forEach(function (value, name) {
this.append(name, value);
}, this);
} else if (Array.isArray(headers)) {
headers.forEach(function (header) {
this.append(header[0], header[1]);
}, this);
} else if (headers) {
Object.getOwnPropertyNames(headers).forEach(function (name) {
this.append(name, headers[name]);
}, this);
}
}
Headers.prototype.append = function (name, value) {
name = normalizeName(name);
value = normalizeValue(value);
var oldValue = this.map[name];
this.map[name] = oldValue ? oldValue + ', ' + value : value;
};
Headers.prototype['delete'] = function (name) {
delete this.map[normalizeName(name)];
};
Headers.prototype.get = function (name) {
name = normalizeName(name);
return this.has(name) ? this.map[name] : null;
};
Headers.prototype.has = function (name) {
return this.map.hasOwnProperty(normalizeName(name));
};
Headers.prototype.set = function (name, value) {
this.map[normalizeName(name)] = normalizeValue(value);
};
Headers.prototype.forEach = function (callback, thisArg) {
for (var name in this.map) {
if (this.map.hasOwnProperty(name)) {
callback.call(thisArg, this.map[name], name, this);
}
}
};
Headers.prototype.keys = function () {
var items = [];
this.forEach(function (value, name) {
items.push(name);
});
return iteratorFor(items);
};
Headers.prototype.values = function () {
var items = [];
this.forEach(function (value) {
items.push(value);
});
return iteratorFor(items);
};
Headers.prototype.entries = function () {
var items = [];
this.forEach(function (value, name) {
items.push([name, value]);
});
return iteratorFor(items);
};
if (support.iterable) {
Headers.prototype[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"] = Headers.prototype.entries;
}
function consumed(body) {
if (body.bodyUsed) {
return Promise.reject(new TypeError('Already read'));
}
body.bodyUsed = true;
}
function fileReaderReady(reader) {
return new Promise(function (resolve, reject) {
reader.onload = function () {
resolve(reader.result);
};
reader.onerror = function () {
reject(reader.error);
};
});
}
function readBlobAsArrayBuffer(blob) {
var reader = new FileReader();
var promise = fileReaderReady(reader);
reader.readAsArrayBuffer(blob);
return promise;
}
function readBlobAsText(blob) {
var reader = new FileReader();
var promise = fileReaderReady(reader);
reader.readAsText(blob);
return promise;
}
function readArrayBufferAsText(buf) {
var view = new Uint8Array(buf);
var chars = new Array(view.length);
for (var i = 0; i < view.length; i++) {
chars[i] = String.fromCharCode(view[i]);
}
return chars.join('');
}
function bufferClone(buf) {
if (buf.slice) {
return buf.slice(0);
} else {
var view = new Uint8Array(buf.byteLength);
view.set(new Uint8Array(buf));
return view.buffer;
}
}
function Body() {
this.bodyUsed = false;
this._initBody = function (body) {
this._bodyInit = body;
if (!body) {
this._bodyText = '';
} else if (typeof body === 'string') {
this._bodyText = body;
} else if (support.blob && Blob.prototype.isPrototypeOf(body)) {
this._bodyBlob = body;
} else if (support.formData && FormData.prototype.isPrototypeOf(body)) {
this._bodyFormData = body;
} else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {
this._bodyText = body.toString();
} else if (support.arrayBuffer && support.blob && isDataView(body)) {
this._bodyArrayBuffer = bufferClone(body.buffer);
this._bodyInit = new Blob([this._bodyArrayBuffer]);
} else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) {
this._bodyArrayBuffer = bufferClone(body);
} else {
this._bodyText = body = Object.prototype.toString.call(body);
}
if (!this.headers.get('content-type')) {
if (typeof body === 'string') {
this.headers.set('content-type', 'text/plain;charset=UTF-8');
} else if (this._bodyBlob && this._bodyBlob.type) {
this.headers.set('content-type', this._bodyBlob.type);
} else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {
this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8');
}
}
};
if (support.blob) {
this.blob = function () {
var rejected = consumed(this);
if (rejected) {
return rejected;
}
if (this._bodyBlob) {
return Promise.resolve(this._bodyBlob);
} else if (this._bodyArrayBuffer) {
return Promise.resolve(new Blob([this._bodyArrayBuffer]));
} else if (this._bodyFormData) {
throw new Error('could not read FormData body as blob');
} else {
return Promise.resolve(new Blob([this._bodyText]));
}
};
this.arrayBuffer = function () {
if (this._bodyArrayBuffer) {
return consumed(this) || Promise.resolve(this._bodyArrayBuffer);
} else {
return this.blob().then(readBlobAsArrayBuffer);
}
};
}
this.text = function () {
var rejected = consumed(this);
if (rejected) {
return rejected;
}
if (this._bodyBlob) {
return readBlobAsText(this._bodyBlob);
} else if (this._bodyArrayBuffer) {
return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer));
} else if (this._bodyFormData) {
throw new Error('could not read FormData body as text');
} else {
return Promise.resolve(this._bodyText);
}
};
if (support.formData) {
this.formData = function () {
return this.text().then(decode);
};
}
this.json = function () {
return this.text().then(JSON.parse);
};
return this;
}
var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT'];
function normalizeMethod(method) {
var upcased = method.toUpperCase();
return methods.indexOf(upcased) > -1 ? upcased : method;
}
function Request(input, options) {
options = options || {};
var body = options.body;
if (input instanceof Request) {
if (input.bodyUsed) {
throw new TypeError('Already read');
}
this.url = input.url;
this.credentials = input.credentials;
if (!options.headers) {
this.headers = new Headers(input.headers);
}
this.method = input.method;
this.mode = input.mode;
this.signal = input.signal;
if (!body && input._bodyInit != null) {
body = input._bodyInit;
input.bodyUsed = true;
}
} else {
this.url = String(input);
}
this.credentials = options.credentials || this.credentials || 'same-origin';
if (options.headers || !this.headers) {
this.headers = new Headers(options.headers);
}
this.method = normalizeMethod(options.method || this.method || 'GET');
this.mode = options.mode || this.mode || null;
this.signal = options.signal || this.signal;
this.referrer = null;
if ((this.method === 'GET' || this.method === 'HEAD') && body) {
throw new TypeError('Body not allowed for GET or HEAD requests');
}
this._initBody(body);
}
Request.prototype.clone = function () {
return new Request(this, {
body: this._bodyInit
});
};
function decode(body) {
var form = new FormData();
body.trim().split('&').forEach(function (bytes) {
if (bytes) {
var split = bytes.split('=');
var name = split.shift().replace(/\+/g, ' ');
var value = split.join('=').replace(/\+/g, ' ');
form.append(decodeURIComponent(name), decodeURIComponent(value));
}
});
return form;
}
function parseHeaders(rawHeaders) {
var headers = new Headers();
var preProcessedHeaders = rawHeaders.replace(/\r?\n[\t ]+/g, ' ');
preProcessedHeaders.split(/\r?\n/).forEach(function (line) {
var parts = line.split(':');
var key = parts.shift().trim();
if (key) {
var value = parts.join(':').trim();
headers.append(key, value);
}
});
return headers;
}
Body.call(Request.prototype);
function Response(bodyInit, options) {
if (!options) {
options = {};
}
this.type = 'default';
this.status = options.status === undefined ? 200 : options.status;
this.ok = this.status >= 200 && this.status < 300;
this.statusText = 'statusText' in options ? options.statusText : 'OK';
this.headers = new Headers(options.headers);
this.url = options.url || '';
this._initBody(bodyInit);
}
Body.call(Response.prototype);
Response.prototype.clone = function () {
return new Response(this._bodyInit, {
status: this.status,
statusText: this.statusText,
headers: new Headers(this.headers),
url: this.url
});
};
Response.error = function () {
var response = new Response(null, {
status: 0,
statusText: ''
});
response.type = 'error';
return response;
};
var redirectStatuses = [301, 302, 303, 307, 308];
Response.redirect = function (url, status) {
if (redirectStatuses.indexOf(status) === -1) {
throw new RangeError('Invalid status code');
}
return new Response(null, {
status: status,
headers: {
location: url
}
});
};
exports.DOMException = self.DOMException;
try {
new exports.DOMException();
} catch (err) {
exports.DOMException = function (message, name) {
this.message = message;
this.name = name;
var error = Error(message);
this.stack = error.stack;
};
exports.DOMException.prototype = Object.create(Error.prototype);
exports.DOMException.prototype.constructor = exports.DOMException;
}
function fetch(input, init) {
return new Promise(function (resolve, reject) {
var request = new Request(input, init);
if (request.signal && request.signal.aborted) {
return reject(new exports.DOMException('Aborted', 'AbortError'));
}
var xhr = new XMLHttpRequest();
function abortXhr() {
xhr.abort();
}
xhr.onload = function () {
var options = {
status: xhr.status,
statusText: xhr.statusText,
headers: parseHeaders(xhr.getAllResponseHeaders() || '')
};
options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL');
var body = 'response' in xhr ? xhr.response : xhr.responseText;
resolve(new Response(body, options));
};
xhr.onerror = function () {
reject(new TypeError('Network request failed'));
};
xhr.ontimeout = function () {
reject(new TypeError('Network request failed'));
};
xhr.onabort = function () {
reject(new exports.DOMException('Aborted', 'AbortError'));
};
xhr.open(request.method, request.url, true);
if (request.credentials === 'include') {
xhr.withCredentials = true;
} else if (request.credentials === 'omit') {
xhr.withCredentials = false;
}
if ('responseType' in xhr && support.blob) {
xhr.responseType = 'blob';
}
request.headers.forEach(function (value, name) {
xhr.setRequestHeader(name, value);
});
if (request.signal) {
request.signal.addEventListener('abort', abortXhr);
xhr.onreadystatechange = function () {
if (xhr.readyState === 4) {
request.signal.removeEventListener('abort', abortXhr);
}
};
}
xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit);
});
}
fetch.polyfill = true;
if (!self.fetch) {
self.fetch = fetch;
self.Headers = Headers;
self.Request = Request;
self.Response = Response;
}
exports.Headers = Headers;
exports.Request = Request;
exports.Response = Response;
exports.fetch = fetch;
Object.defineProperty(exports, '__esModule', {
value: true
});
});
},14512,[]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var _interopRequireWildcard = _$$_REQUIRE(_dependencyMap[0]);
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = undefined;
var TurboModuleRegistry = _interopRequireWildcard(_$$_REQUIRE(_dependencyMap[1]));
var _default = TurboModuleRegistry.getEnforcing('WebSocketModule');
exports.default = _default;
},14515,[14308,14341]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var _interopRequireWildcard = _$$_REQUIRE(_dependencyMap[0]);
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = undefined;
var TurboModuleRegistry = _interopRequireWildcard(_$$_REQUIRE(_dependencyMap[1]));
var _default = TurboModuleRegistry.getEnforcing('FileReaderModule');
exports.default = _default;
},14518,[14308,14341]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var _classCallCheck = _$$_REQUIRE(_dependencyMap[0]);
var _createClass = _$$_REQUIRE(_dependencyMap[1]);
var _possibleConstructorReturn = _$$_REQUIRE(_dependencyMap[2]);
var _getPrototypeOf = _$$_REQUIRE(_dependencyMap[3]);
var _inherits = _$$_REQUIRE(_dependencyMap[4]);
Object.defineProperty(exports, '__esModule', {
value: true
});
var eventTargetShim = _$$_REQUIRE(_dependencyMap[5]);
var AbortSignal = function (_eventTargetShim$Even) {
_inherits(AbortSignal, _eventTargetShim$Even);
function AbortSignal() {
var _this;
_classCallCheck(this, AbortSignal);
_this = _possibleConstructorReturn(this, _getPrototypeOf(AbortSignal).call(this));
throw new TypeError("AbortSignal cannot be constructed directly");
return _this;
}
_createClass(AbortSignal, [{
key: "aborted",
get: function get() {
var aborted = abortedFlags.get(this);
if (typeof aborted !== "boolean") {
throw new TypeError("Expected 'this' to be an 'AbortSignal' object, but got " + (this === null ? "null" : typeof this));
}
return aborted;
}
}]);
return AbortSignal;
}(eventTargetShim.EventTarget);
eventTargetShim.defineEventAttribute(AbortSignal.prototype, "abort");
function createAbortSignal() {
var signal = Object.create(AbortSignal.prototype);
eventTargetShim.EventTarget.call(signal);
abortedFlags.set(signal, false);
return signal;
}
function abortSignal(signal) {
if (abortedFlags.get(signal) !== false) {
return;
}
abortedFlags.set(signal, true);
signal.dispatchEvent({
type: "abort"
});
}
var abortedFlags = new WeakMap();
Object.defineProperties(AbortSignal.prototype, {
aborted: {
enumerable: true
}
});
if (typeof Symbol === "function" && typeof (typeof Symbol === "function" ? Symbol.toStringTag : "@@toStringTag") === "symbol") {
Object.defineProperty(AbortSignal.prototype, typeof Symbol === "function" ? Symbol.toStringTag : "@@toStringTag", {
configurable: true,
value: "AbortSignal"
});
}
var AbortController = function () {
function AbortController() {
_classCallCheck(this, AbortController);
signals.set(this, createAbortSignal());
}
_createClass(AbortController, [{
key: "abort",
value: function abort() {
abortSignal(getSignal(this));
}
}, {
key: "signal",
get: function get() {
return getSignal(this);
}
}]);
return AbortController;
}();
var signals = new WeakMap();
function getSignal(controller) {
var signal = signals.get(controller);
if (signal == null) {
throw new TypeError("Expected 'this' to be an 'AbortController' object, but got " + (controller === null ? "null" : typeof controller));
}
return signal;
}
Object.defineProperties(AbortController.prototype, {
signal: {
enumerable: true
},
abort: {
enumerable: true
}
});
if (typeof Symbol === "function" && typeof (typeof Symbol === "function" ? Symbol.toStringTag : "@@toStringTag") === "symbol") {
Object.defineProperty(AbortController.prototype, typeof Symbol === "function" ? Symbol.toStringTag : "@@toStringTag", {
configurable: true,
value: "AbortController"
});
}
exports.AbortController = AbortController;
exports.AbortSignal = AbortSignal;
exports.default = AbortController;
module.exports = AbortController;
module.exports.AbortController = module.exports["default"] = AbortController;
module.exports.AbortSignal = AbortSignal;
},14521,[14320,14323,14371,14377,14386,14506]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
if (!global.alert) {
global.alert = function (text) {
_$$_REQUIRE(_dependencyMap[0]).alert('Alert', '' + text);
};
}
},14524,[10243]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var _interopRequireWildcard = _$$_REQUIRE(_dependencyMap[0]);
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = undefined;
var TurboModuleRegistry = _interopRequireWildcard(_$$_REQUIRE(_dependencyMap[1]));
var _default = TurboModuleRegistry.get('DialogManagerAndroid');
exports.default = _default;
},14527,[14308,14341]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var _interopRequireDefault = _$$_REQUIRE(_dependencyMap[0]);
var _NativeDialogManagerAndroid = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[1]));
function emptyCallback() {}
module.exports = {
alertWithArgs: function alertWithArgs(args, callback) {
if (!_NativeDialogManagerAndroid.default) {
return;
}
_NativeDialogManagerAndroid.default.showAlert(args, emptyCallback, callback || emptyCallback);
}
};
},14530,[14305,14527]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var _require = _$$_REQUIRE(_dependencyMap[0]),
polyfillObjectProperty = _require.polyfillObjectProperty;
var navigator = global.navigator;
if (navigator === undefined) {
global.navigator = navigator = {};
}
polyfillObjectProperty(navigator, 'product', function () {
return 'ReactNative';
});
},14533,[14473]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
if (!global.RN$Bridgeless) {
var BatchedBridge = _$$_REQUIRE(_dependencyMap[0]);
BatchedBridge.registerLazyCallableModule('Systrace', function () {
return _$$_REQUIRE(_dependencyMap[1]);
});
BatchedBridge.registerLazyCallableModule('JSTimers', function () {
return _$$_REQUIRE(_dependencyMap[2]);
});
BatchedBridge.registerLazyCallableModule('HeapCapture', function () {
return _$$_REQUIRE(_dependencyMap[3]);
});
BatchedBridge.registerLazyCallableModule('SamplingProfiler', function () {
return _$$_REQUIRE(_dependencyMap[4]);
});
BatchedBridge.registerLazyCallableModule('RCTLog', function () {
return _$$_REQUIRE(_dependencyMap[5]);
});
BatchedBridge.registerLazyCallableModule('RCTDeviceEventEmitter', function () {
return _$$_REQUIRE(_dependencyMap[6]);
});
BatchedBridge.registerLazyCallableModule('RCTNativeAppEventEmitter', function () {
return _$$_REQUIRE(_dependencyMap[7]);
});
BatchedBridge.registerLazyCallableModule('GlobalPerformanceLogger', function () {
return _$$_REQUIRE(_dependencyMap[8]);
});
BatchedBridge.registerLazyCallableModule('JSDevSupportModule', function () {
return _$$_REQUIRE(_dependencyMap[9]);
});
{
BatchedBridge.registerCallableModule('HMRClient', _$$_REQUIRE(_dependencyMap[10]));
}
}
},14536,[10045,10054,10063,14539,10261,10264,10087,10267,14548,10276,14557]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var _interopRequireDefault = _$$_REQUIRE(_dependencyMap[0]);
var _NativeHeapCapture = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[1]));
var HeapCapture = {
captureHeap: function captureHeap(path) {
var error = null;
try {
global.nativeCaptureHeap(path);
} catch (e) {
error = e.toString();
}
if (_NativeHeapCapture.default) {
_NativeHeapCapture.default.captureComplete(path, error);
}
}
};
module.exports = HeapCapture;
},14539,[14305,14542]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var _interopRequireWildcard = _$$_REQUIRE(_dependencyMap[0]);
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = undefined;
var TurboModuleRegistry = _interopRequireWildcard(_$$_REQUIRE(_dependencyMap[1]));
var _default = TurboModuleRegistry.get('HeapCapture');
exports.default = _default;
},14542,[14308,14341]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var _interopRequireWildcard = _$$_REQUIRE(_dependencyMap[0]);
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = undefined;
var TurboModuleRegistry = _interopRequireWildcard(_$$_REQUIRE(_dependencyMap[1]));
var _default = TurboModuleRegistry.get('JSCSamplingProfiler');
exports.default = _default;
},14545,[14308,14341]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var createPerformanceLogger = _$$_REQUIRE(_dependencyMap[0]);
var GlobalPerformanceLogger = createPerformanceLogger();
module.exports = GlobalPerformanceLogger;
},14548,[14551]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var Systrace = _$$_REQUIRE(_dependencyMap[0]);
var infoLog = _$$_REQUIRE(_dependencyMap[1]);
var performanceNow = global.nativeQPLTimestamp || global.nativePerformanceNow || _$$_REQUIRE(_dependencyMap[2]);
var _cookies = {};
var PRINT_TO_CONSOLE = false;
function createPerformanceLogger() {
var result = {
_timespans: {},
_extras: {},
_points: {},
addTimespan: function addTimespan(key, lengthInMs, description) {
if (this._timespans[key]) {
return;
}
this._timespans[key] = {
description: description,
totalTime: lengthInMs
};
},
startTimespan: function startTimespan(key, description) {
if (this._timespans[key]) {
return;
}
this._timespans[key] = {
description: description,
startTime: performanceNow()
};
_cookies[key] = Systrace.beginAsyncEvent(key);
},
stopTimespan: function stopTimespan(key) {
var timespan = this._timespans[key];
if (!timespan || !timespan.startTime) {
return;
}
if (timespan.endTime) {
return;
}
timespan.endTime = performanceNow();
timespan.totalTime = timespan.endTime - (timespan.startTime || 0);
Systrace.endAsyncEvent(key, _cookies[key]);
delete _cookies[key];
},
clear: function clear() {
this._timespans = {};
this._extras = {};
this._points = {};
},
clearCompleted: function clearCompleted() {
for (var _key in this._timespans) {
if (this._timespans[_key].totalTime) {
delete this._timespans[_key];
}
}
this._extras = {};
this._points = {};
},
clearExceptTimespans: function clearExceptTimespans(keys) {
this._timespans = Object.keys(this._timespans).reduce(function (previous, key) {
if (keys.indexOf(key) !== -1) {
previous[key] = this._timespans[key];
}
return previous;
}, {});
this._extras = {};
this._points = {};
},
currentTimestamp: function currentTimestamp() {
return performanceNow();
},
getTimespans: function getTimespans() {
return this._timespans;
},
hasTimespan: function hasTimespan(key) {
return !!this._timespans[key];
},
logTimespans: function logTimespans() {},
addTimespans: function addTimespans(newTimespans, labels) {
for (var ii = 0, l = newTimespans.length; ii < l; ii += 2) {
var label = labels[ii / 2];
this.addTimespan(label, newTimespans[ii + 1] - newTimespans[ii], label);
}
},
setExtra: function setExtra(key, value) {
if (this._extras[key]) {
return;
}
this._extras[key] = value;
},
getExtras: function getExtras() {
return this._extras;
},
removeExtra: function removeExtra(key) {
var value = this._extras[key];
delete this._extras[key];
return value;
},
logExtras: function logExtras() {},
markPoint: function markPoint(key, timestamp) {
var _timestamp;
if (this._points[key]) {
return;
}
this._points[key] = (_timestamp = timestamp) != null ? _timestamp : performanceNow();
},
getPoints: function getPoints() {
return this._points;
},
logPoints: function logPoints() {},
logEverything: function logEverything() {
this.logTimespans();
this.logExtras();
this.logPoints();
}
};
return result;
}
module.exports = createPerformanceLogger;
},14551,[10054,10273,14491]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var _interopRequireWildcard = _$$_REQUIRE(_dependencyMap[0]);
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = undefined;
var TurboModuleRegistry = _interopRequireWildcard(_$$_REQUIRE(_dependencyMap[1]));
var _default = TurboModuleRegistry.get('JSDevSupport');
exports.default = _default;
},14554,[14308,14341]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var HMRClientProdShim = {
setup: function setup() {},
enable: function enable() {},
disable: function disable() {},
registerBundle: function registerBundle() {},
log: function log() {}
};
module.exports = HMRClientProdShim;
},14557,[]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
function __fetchSegment(segmentId, options, callback) {
var SegmentFetcher = _$$_REQUIRE(_dependencyMap[0]).default;
SegmentFetcher.fetchSegment(segmentId, options, function (errorObject) {
if (errorObject) {
var error = new Error(errorObject.message);
error.code = errorObject.code;
callback(error);
}
callback(null);
});
}
global.__fetchSegment = __fetchSegment;
function __getSegment(segmentId, options, callback) {
var SegmentFetcher = _$$_REQUIRE(_dependencyMap[0]).default;
if (!SegmentFetcher.getSegment) {
throw new Error('SegmentFetcher.getSegment must be defined');
}
SegmentFetcher.getSegment(segmentId, options, function (errorObject, path) {
if (errorObject) {
var error = new Error(errorObject.message);
error.code = errorObject.code;
callback(error);
}
callback(null, path);
});
}
global.__getSegment = __getSegment;
},14560,[14563]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var _interopRequireWildcard = _$$_REQUIRE(_dependencyMap[0]);
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = undefined;
var TurboModuleRegistry = _interopRequireWildcard(_$$_REQUIRE(_dependencyMap[1]));
var _default = TurboModuleRegistry.getEnforcing('SegmentFetcher');
exports.default = _default;
},14563,[14308,14341]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
module.exports = {
get BatchedBridge() {
return _$$_REQUIRE(_dependencyMap[0]);
},
get ExceptionsManager() {
return _$$_REQUIRE(_dependencyMap[1]);
},
get Platform() {
return _$$_REQUIRE(_dependencyMap[2]);
},
get RCTEventEmitter() {
return _$$_REQUIRE(_dependencyMap[3]);
},
get ReactNativeViewConfigRegistry() {
return _$$_REQUIRE(_dependencyMap[4]);
},
get TextInputState() {
return _$$_REQUIRE(_dependencyMap[5]);
},
get UIManager() {
return _$$_REQUIRE(_dependencyMap[6]);
},
get deepDiffer() {
return _$$_REQUIRE(_dependencyMap[7]);
},
get deepFreezeAndThrowOnMutationInDev() {
return _$$_REQUIRE(_dependencyMap[8]);
},
get flattenStyle() {
return _$$_REQUIRE(_dependencyMap[9]);
},
get ReactFiberErrorDialog() {
return _$$_REQUIRE(_dependencyMap[10]);
}
};
},14566,[10045,10141,10066,10282,14569,10285,10279,10288,10057,10291,14572]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var invariant = _$$_REQUIRE(_dependencyMap[0]);
var customBubblingEventTypes = {};
var customDirectEventTypes = {};
exports.customBubblingEventTypes = customBubblingEventTypes;
exports.customDirectEventTypes = customDirectEventTypes;
var viewConfigCallbacks = new Map();
var viewConfigs = new Map();
function processEventTypes(viewConfig) {
var bubblingEventTypes = viewConfig.bubblingEventTypes,
directEventTypes = viewConfig.directEventTypes;
if (bubblingEventTypes != null) {
for (var _topLevelType in bubblingEventTypes) {
if (customBubblingEventTypes[_topLevelType] == null) {
customBubblingEventTypes[_topLevelType] = bubblingEventTypes[_topLevelType];
}
}
}
if (directEventTypes != null) {
for (var _topLevelType2 in directEventTypes) {
if (customDirectEventTypes[_topLevelType2] == null) {
customDirectEventTypes[_topLevelType2] = directEventTypes[_topLevelType2];
}
}
}
}
exports.register = function (name, callback) {
invariant(!viewConfigCallbacks.has(name), 'Tried to register two views with the same name %s', name);
viewConfigCallbacks.set(name, callback);
return name;
};
exports.get = function (name) {
var viewConfig;
if (!viewConfigs.has(name)) {
var callback = viewConfigCallbacks.get(name);
if (typeof callback !== 'function') {
invariant(false, 'View config not found for name %s.%s', name, typeof name[0] === 'string' && /[a-z]/.test(name[0]) ? ' Make sure to start component names with a capital letter.' : '');
}
viewConfigCallbacks.set(name, null);
viewConfig = callback();
processEventTypes(viewConfig);
viewConfigs.set(name, viewConfig);
} else {
viewConfig = viewConfigs.get(name);
}
invariant(viewConfig, 'View config not found for name %s', name);
return viewConfig;
};
},14569,[14326]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
var _ExceptionsManager = _$$_REQUIRE(_dependencyMap[0]);
function showErrorDialog(capturedError) {
var componentStack = capturedError.componentStack,
error = capturedError.error;
var errorToHandle;
if (error instanceof Error) {
errorToHandle = error;
} else if (typeof error === 'string') {
errorToHandle = new _ExceptionsManager.SyntheticError(error);
} else {
errorToHandle = new _ExceptionsManager.SyntheticError('Unspecified error');
}
try {
errorToHandle.componentStack = componentStack;
} catch (e) {}
(0, _ExceptionsManager.handleException)(errorToHandle, false);
return false;
}
module.exports = {
showErrorDialog: showErrorDialog
};
},14572,[10141]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
{
module.exports = _$$_REQUIRE(_dependencyMap[0]);
}
},14575,[14578]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
/** @license React v0.15.0
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _d = undefined,
e = undefined,
g = undefined,
m = undefined,
n = undefined;
exports.unstable_now = undefined;
exports.unstable_forceFrameRate = undefined;
if ("undefined" === typeof window || "function" !== typeof MessageChannel) {
var p = null,
q = null,
r = function r() {
if (null !== p) try {
var a = exports.unstable_now();
p(true, a);
p = null;
} catch (b) {
throw setTimeout(r, 0), b;
}
};
exports.unstable_now = function () {
return Date.now();
};
_d = function d(a) {
null !== p ? setTimeout(_d, 0, a) : (p = a, setTimeout(r, 0));
};
e = function e(a, b) {
q = setTimeout(a, b);
};
g = function g() {
clearTimeout(q);
};
m = function m() {
return false;
};
n = exports.unstable_forceFrameRate = function () {};
} else {
var t = window.performance,
u = window.Date,
v = window.setTimeout,
w = window.clearTimeout,
x = window.requestAnimationFrame,
y = window.cancelAnimationFrame;
"undefined" !== typeof console && ("function" !== typeof x && undefined, "function" !== typeof y && undefined);
exports.unstable_now = "object" === typeof t && "function" === typeof t.now ? function () {
return t.now();
} : function () {
return u.now();
};
var z = false,
A = null,
B = -1,
C = -1,
D = 33.33,
E = -1,
F = -1,
G = 0,
H = false;
m = function m() {
return exports.unstable_now() >= G;
};
n = function n() {};
exports.unstable_forceFrameRate = function (a) {
0 > a || 125 < a ? undefined : 0 < a ? (D = Math.floor(1E3 / a), H = true) : (D = 33.33, H = false);
};
var J = function J() {
if (null !== A) {
var a = exports.unstable_now(),
b = 0 < G - a;
try {
A(b, a) || (A = null);
} catch (c) {
throw I.postMessage(null), c;
}
}
},
K = new MessageChannel(),
I = K.port2;
K.port1.onmessage = J;
var L = function L(a) {
if (null === A) F = E = -1, z = false;else {
z = true;
x(function (a) {
w(B);
L(a);
});
var b = function b() {
G = exports.unstable_now() + D / 2;
J();
B = v(b, 3 * D);
};
B = v(b, 3 * D);
if (-1 !== E && .1 < a - E) {
var c = a - E;
!H && -1 !== F && c < D && F < D && (D = c < F ? F : c, 8.33 > D && (D = 8.33));
F = c;
}
E = a;
G = a + D;
I.postMessage(null);
}
};
_d = function _d(a) {
A = a;
z || (z = true, x(function (a) {
L(a);
}));
};
e = function e(a, b) {
C = v(function () {
a(exports.unstable_now());
}, b);
};
g = function g() {
w(C);
C = -1;
};
}
var M = null,
N = null,
O = null,
P = 3,
Q = false,
R = false,
S = false;
function T(a, b) {
var c = a.next;
if (c === a) M = null;else {
a === M && (M = c);
var f = a.previous;
f.next = c;
c.previous = f;
}
a.next = a.previous = null;
c = a.callback;
f = P;
var l = O;
P = a.priorityLevel;
O = a;
try {
var h = a.expirationTime <= b;
switch (P) {
case 1:
var k = c(h);
break;
case 2:
k = c(h);
break;
case 3:
k = c(h);
break;
case 4:
k = c(h);
break;
case 5:
k = c(h);
}
} catch (Z) {
throw Z;
} finally {
P = f, O = l;
}
if ("function" === typeof k) if (b = a.expirationTime, a.callback = k, null === M) M = a.next = a.previous = a;else {
k = null;
h = M;
do {
if (b <= h.expirationTime) {
k = h;
break;
}
h = h.next;
} while (h !== M);
null === k ? k = M : k === M && (M = a);
b = k.previous;
b.next = k.previous = a;
a.next = k;
a.previous = b;
}
}
function U(a) {
if (null !== N && N.startTime <= a) {
do {
var b = N,
c = b.next;
if (b === c) N = null;else {
N = c;
var f = b.previous;
f.next = c;
c.previous = f;
}
b.next = b.previous = null;
V(b, b.expirationTime);
} while (null !== N && N.startTime <= a);
}
}
function W(a) {
S = false;
U(a);
R || (null !== M ? (R = true, _d(X)) : null !== N && e(W, N.startTime - a));
}
function X(a, b) {
R = false;
S && (S = false, g());
U(b);
Q = true;
try {
if (!a) for (; null !== M && M.expirationTime <= b;) {
T(M, b), b = exports.unstable_now(), U(b);
} else if (null !== M) {
do {
T(M, b), b = exports.unstable_now(), U(b);
} while (null !== M && !m());
}
if (null !== M) return true;
null !== N && e(W, N.startTime - b);
return false;
} finally {
Q = false;
}
}
function Y(a) {
switch (a) {
case 1:
return -1;
case 2:
return 250;
case 5:
return 1073741823;
case 4:
return 1E4;
default:
return 5E3;
}
}
function V(a, b) {
if (null === M) M = a.next = a.previous = a;else {
var c = null,
f = M;
do {
if (b < f.expirationTime) {
c = f;
break;
}
f = f.next;
} while (f !== M);
null === c ? c = M : c === M && (M = a);
b = c.previous;
b.next = c.previous = a;
a.next = c;
a.previous = b;
}
}
var aa = n;
exports.unstable_ImmediatePriority = 1;
exports.unstable_UserBlockingPriority = 2;
exports.unstable_NormalPriority = 3;
exports.unstable_IdlePriority = 5;
exports.unstable_LowPriority = 4;
exports.unstable_runWithPriority = function (a, b) {
switch (a) {
case 1:
case 2:
case 3:
case 4:
case 5:
break;
default:
a = 3;
}
var c = P;
P = a;
try {
return b();
} finally {
P = c;
}
};
exports.unstable_next = function (a) {
switch (P) {
case 1:
case 2:
case 3:
var b = 3;
break;
default:
b = P;
}
var c = P;
P = b;
try {
return a();
} finally {
P = c;
}
};
exports.unstable_scheduleCallback = function (a, b, c) {
var f = exports.unstable_now();
if ("object" === typeof c && null !== c) {
var l = c.delay;
l = "number" === typeof l && 0 < l ? f + l : f;
c = "number" === typeof c.timeout ? c.timeout : Y(a);
} else c = Y(a), l = f;
c = l + c;
a = {
callback: b,
priorityLevel: a,
startTime: l,
expirationTime: c,
next: null,
previous: null
};
if (l > f) {
c = l;
if (null === N) N = a.next = a.previous = a;else {
b = null;
var h = N;
do {
if (c < h.startTime) {
b = h;
break;
}
h = h.next;
} while (h !== N);
null === b ? b = N : b === N && (N = a);
c = b.previous;
c.next = b.previous = a;
a.next = b;
a.previous = c;
}
null === M && N === a && (S ? g() : S = true, e(W, l - f));
} else V(a, c), R || Q || (R = true, _d(X));
return a;
};
exports.unstable_cancelCallback = function (a) {
var b = a.next;
if (null !== b) {
if (a === b) a === M ? M = null : a === N && (N = null);else {
a === M ? M = b : a === N && (N = b);
var c = a.previous;
c.next = b;
b.previous = c;
}
a.next = a.previous = null;
}
};
exports.unstable_wrapCallback = function (a) {
var b = P;
return function () {
var c = P;
P = b;
try {
return a.apply(this, arguments);
} finally {
P = c;
}
};
};
exports.unstable_getCurrentPriorityLevel = function () {
return P;
};
exports.unstable_shouldYield = function () {
var a = exports.unstable_now();
U(a);
return null !== O && null !== M && M.startTime <= a && M.expirationTime < O.expirationTime || m();
};
exports.unstable_requestPaint = aa;
exports.unstable_continueExecution = function () {
R || Q || (R = true, _d(X));
};
exports.unstable_pauseExecution = function () {};
exports.unstable_getFirstCallbackNode = function () {
return M;
};
},14578,[]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var ReactNativeViewViewConfigAndroid = {
uiViewClassName: 'RCTView',
bubblingEventTypes: {
topSelect: {
phasedRegistrationNames: {
bubbled: 'onSelect',
captured: 'onSelectCapture'
}
}
},
directEventTypes: {
topClick: {
registrationName: 'onClick'
},
topContentSizeChange: {
registrationName: 'onContentSizeChange'
},
topLoadingError: {
registrationName: 'onLoadingError'
},
topLoadingFinish: {
registrationName: 'onLoadingFinish'
},
topLoadingStart: {
registrationName: 'onLoadingStart'
},
topMessage: {
registrationName: 'onMessage'
},
topMomentumScrollBegin: {
registrationName: 'onMomentumScrollBegin'
},
topMomentumScrollEnd: {
registrationName: 'onMomentumScrollEnd'
},
topScroll: {
registrationName: 'onScroll'
},
topScrollBeginDrag: {
registrationName: 'onScrollBeginDrag'
},
topScrollEndDrag: {
registrationName: 'onScrollEndDrag'
},
topSelectionChange: {
registrationName: 'onSelectionChange'
}
},
validAttributes: {
hasTVPreferredFocus: true,
focusable: true,
nativeBackgroundAndroid: true,
nativeForegroundAndroid: true,
nextFocusDown: true,
nextFocusForward: true,
nextFocusLeft: true,
nextFocusRight: true,
nextFocusUp: true
}
};
module.exports = ReactNativeViewViewConfigAndroid;
},14581,[]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var _interopRequireDefault = _$$_REQUIRE(_dependencyMap[0]);
var _objectSpread2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[1]));
var _verifyComponentAttributeEquivalence = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[2]));
var ReactNativeViewConfigRegistry = _$$_REQUIRE(_dependencyMap[3]);
var ReactNativeViewViewConfig = _$$_REQUIRE(_dependencyMap[4]);
function registerGeneratedViewConfig(componentName, viewConfig) {
var mergedViewConfig = {
uiViewClassName: componentName,
Commands: {},
bubblingEventTypes: (0, _objectSpread2.default)({}, ReactNativeViewViewConfig.bubblingEventTypes, viewConfig.bubblingEventTypes || {}),
directEventTypes: (0, _objectSpread2.default)({}, ReactNativeViewViewConfig.directEventTypes, viewConfig.directEventTypes || {}),
validAttributes: (0, _objectSpread2.default)({}, ReactNativeViewViewConfig.validAttributes, viewConfig.validAttributes || {})
};
ReactNativeViewConfigRegistry.register(componentName, function () {
(0, _verifyComponentAttributeEquivalence.default)(componentName, mergedViewConfig);
return mergedViewConfig;
});
}
module.exports = registerGeneratedViewConfig;
},14584,[14305,14314,14587,14569,14590]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var _interopRequireDefault = _$$_REQUIRE(_dependencyMap[0]);
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.lefthandObjectDiff = lefthandObjectDiff;
exports.getConfigWithoutViewProps = getConfigWithoutViewProps;
exports.stringifyViewConfig = stringifyViewConfig;
exports.default = undefined;
var _ReactNativeViewViewConfig = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[1]));
var getNativeComponentAttributes = _$$_REQUIRE(_dependencyMap[2]);
var IGNORED_KEYS = ['transform', 'hitSlop'];
function verifyComponentAttributeEquivalence(componentName, config) {}
function lefthandObjectDiff(leftObj, rightObj) {
var differentKeys = {};
function compare(leftItem, rightItem, key) {
if (typeof leftItem !== typeof rightItem && leftItem != null) {
differentKeys[key] = rightItem;
return;
}
if (typeof leftItem === 'object') {
var objDiff = lefthandObjectDiff(leftItem, rightItem);
if (Object.keys(objDiff).length > 1) {
differentKeys[key] = objDiff;
}
return;
}
if (leftItem !== rightItem) {
differentKeys[key] = rightItem;
return;
}
}
for (var key in leftObj) {
if (IGNORED_KEYS.includes(key)) {
continue;
}
if (!rightObj) {
differentKeys[key] = {};
} else if (leftObj.hasOwnProperty(key)) {
compare(leftObj[key], rightObj[key], key);
}
}
return differentKeys;
}
function getConfigWithoutViewProps(viewConfig, propName) {
if (!viewConfig[propName]) {
return {};
}
return Object.keys(viewConfig[propName]).filter(function (prop) {
return !_ReactNativeViewViewConfig.default[propName][prop];
}).reduce(function (obj, prop) {
obj[prop] = viewConfig[propName][prop];
return obj;
}, {});
}
function stringifyViewConfig(viewConfig) {
return JSON.stringify(viewConfig, function (key, val) {
if (typeof val === 'function') {
return "\u0192 " + val.name;
}
return val;
}, 2);
}
var _default = verifyComponentAttributeEquivalence;
exports.default = _default;
},14587,[14305,14590,14593]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var _interopRequireDefault = _$$_REQUIRE(_dependencyMap[0]);
var _objectSpread2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[1]));
var _ReactNativeViewViewConfigAndroid = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[2]));
var ReactNativeViewConfig = {
uiViewClassName: 'RCTView',
baseModuleName: null,
Manager: 'ViewManager',
Commands: {},
Constants: {},
bubblingEventTypes: (0, _objectSpread2.default)({}, _ReactNativeViewViewConfigAndroid.default.bubblingEventTypes, {
topBlur: {
phasedRegistrationNames: {
bubbled: 'onBlur',
captured: 'onBlurCapture'
}
},
topChange: {
phasedRegistrationNames: {
bubbled: 'onChange',
captured: 'onChangeCapture'
}
},
topEndEditing: {
phasedRegistrationNames: {
bubbled: 'onEndEditing',
captured: 'onEndEditingCapture'
}
},
topFocus: {
phasedRegistrationNames: {
bubbled: 'onFocus',
captured: 'onFocusCapture'
}
},
topKeyPress: {
phasedRegistrationNames: {
bubbled: 'onKeyPress',
captured: 'onKeyPressCapture'
}
},
topPress: {
phasedRegistrationNames: {
bubbled: 'onPress',
captured: 'onPressCapture'
}
},
topSubmitEditing: {
phasedRegistrationNames: {
bubbled: 'onSubmitEditing',
captured: 'onSubmitEditingCapture'
}
},
topTouchCancel: {
phasedRegistrationNames: {
bubbled: 'onTouchCancel',
captured: 'onTouchCancelCapture'
}
},
topTouchEnd: {
phasedRegistrationNames: {
bubbled: 'onTouchEnd',
captured: 'onTouchEndCapture'
}
},
topTouchMove: {
phasedRegistrationNames: {
bubbled: 'onTouchMove',
captured: 'onTouchMoveCapture'
}
},
topTouchStart: {
phasedRegistrationNames: {
bubbled: 'onTouchStart',
captured: 'onTouchStartCapture'
}
}
}),
directEventTypes: (0, _objectSpread2.default)({}, _ReactNativeViewViewConfigAndroid.default.directEventTypes, {
topAccessibilityAction: {
registrationName: 'onAccessibilityAction'
},
topAccessibilityEscape: {
registrationName: 'onAccessibilityEscape'
},
topAccessibilityTap: {
registrationName: 'onAccessibilityTap'
},
topLayout: {
registrationName: 'onLayout'
},
topMagicTap: {
registrationName: 'onMagicTap'
},
onGestureHandlerEvent: {
registrationName: 'onGestureHandlerEvent'
},
onGestureHandlerStateChange: {
registrationName: 'onGestureHandlerStateChange'
}
}),
validAttributes: (0, _objectSpread2.default)({}, _ReactNativeViewViewConfigAndroid.default.validAttributes, {
accessibilityActions: true,
accessibilityElementsHidden: true,
accessibilityHint: true,
accessibilityIgnoresInvertColors: true,
accessibilityLabel: true,
accessibilityLiveRegion: true,
accessibilityRole: true,
accessibilityStates: true,
accessibilityState: true,
accessibilityViewIsModal: true,
accessible: true,
alignContent: true,
alignItems: true,
alignSelf: true,
aspectRatio: true,
backfaceVisibility: true,
backgroundColor: {
process: _$$_REQUIRE(_dependencyMap[3])
},
borderBottomColor: {
process: _$$_REQUIRE(_dependencyMap[3])
},
borderBottomEndRadius: true,
borderBottomLeftRadius: true,
borderBottomRightRadius: true,
borderBottomStartRadius: true,
borderBottomWidth: true,
borderColor: {
process: _$$_REQUIRE(_dependencyMap[3])
},
borderEndColor: {
process: _$$_REQUIRE(_dependencyMap[3])
},
borderEndWidth: true,
borderLeftColor: {
process: _$$_REQUIRE(_dependencyMap[3])
},
borderLeftWidth: true,
borderRadius: true,
borderRightColor: {
process: _$$_REQUIRE(_dependencyMap[3])
},
borderRightWidth: true,
borderStartColor: {
process: _$$_REQUIRE(_dependencyMap[3])
},
borderStartWidth: true,
borderStyle: true,
borderTopColor: {
process: _$$_REQUIRE(_dependencyMap[3])
},
borderTopEndRadius: true,
borderTopLeftRadius: true,
borderTopRightRadius: true,
borderTopStartRadius: true,
borderTopWidth: true,
borderWidth: true,
bottom: true,
clickable: true,
collapsable: true,
direction: true,
display: true,
elevation: true,
end: true,
flex: true,
flexBasis: true,
flexDirection: true,
flexGrow: true,
flexShrink: true,
flexWrap: true,
height: true,
hitSlop: {
diff: _$$_REQUIRE(_dependencyMap[4])
},
importantForAccessibility: true,
justifyContent: true,
left: true,
margin: true,
marginBottom: true,
marginEnd: true,
marginHorizontal: true,
marginLeft: true,
marginRight: true,
marginStart: true,
marginTop: true,
marginVertical: true,
maxHeight: true,
maxWidth: true,
minHeight: true,
minWidth: true,
nativeID: true,
needsOffscreenAlphaCompositing: true,
onAccessibilityAction: true,
onAccessibilityEscape: true,
onAccessibilityTap: true,
onLayout: true,
onMagicTap: true,
opacity: true,
overflow: true,
padding: true,
paddingBottom: true,
paddingEnd: true,
paddingHorizontal: true,
paddingLeft: true,
paddingRight: true,
paddingStart: true,
paddingTop: true,
paddingVertical: true,
pointerEvents: true,
position: true,
removeClippedSubviews: true,
renderToHardwareTextureAndroid: true,
right: true,
rotation: true,
scaleX: true,
scaleY: true,
shadowColor: {
process: _$$_REQUIRE(_dependencyMap[3])
},
shadowOffset: {
diff: _$$_REQUIRE(_dependencyMap[5])
},
shadowOpacity: true,
shadowRadius: true,
shouldRasterizeIOS: true,
start: true,
style: {
alignContent: true,
alignItems: true,
alignSelf: true,
aspectRatio: true,
backfaceVisibility: true,
backgroundColor: {
process: _$$_REQUIRE(_dependencyMap[3])
},
borderBottomColor: {
process: _$$_REQUIRE(_dependencyMap[3])
},
borderBottomEndRadius: true,
borderBottomLeftRadius: true,
borderBottomRightRadius: true,
borderBottomStartRadius: true,
borderBottomWidth: true,
borderColor: {
process: _$$_REQUIRE(_dependencyMap[3])
},
borderEndColor: {
process: _$$_REQUIRE(_dependencyMap[3])
},
borderEndWidth: true,
borderLeftColor: {
process: _$$_REQUIRE(_dependencyMap[3])
},
borderLeftWidth: true,
borderRadius: true,
borderRightColor: {
process: _$$_REQUIRE(_dependencyMap[3])
},
borderRightWidth: true,
borderStartColor: {
process: _$$_REQUIRE(_dependencyMap[3])
},
borderStartWidth: true,
borderStyle: true,
borderTopColor: {
process: _$$_REQUIRE(_dependencyMap[3])
},
borderTopEndRadius: true,
borderTopLeftRadius: true,
borderTopRightRadius: true,
borderTopStartRadius: true,
borderTopWidth: true,
borderWidth: true,
bottom: true,
color: {
process: _$$_REQUIRE(_dependencyMap[3])
},
decomposedMatrix: true,
direction: true,
display: true,
elevation: true,
end: true,
flex: true,
flexBasis: true,
flexDirection: true,
flexGrow: true,
flexShrink: true,
flexWrap: true,
fontFamily: true,
fontSize: true,
fontStyle: true,
fontVariant: true,
fontWeight: true,
height: true,
includeFontPadding: true,
justifyContent: true,
left: true,
letterSpacing: true,
lineHeight: true,
margin: true,
marginBottom: true,
marginEnd: true,
marginHorizontal: true,
marginLeft: true,
marginRight: true,
marginStart: true,
marginTop: true,
marginVertical: true,
maxHeight: true,
maxWidth: true,
minHeight: true,
minWidth: true,
opacity: true,
overflow: true,
overlayColor: {
process: _$$_REQUIRE(_dependencyMap[3])
},
padding: true,
paddingBottom: true,
paddingEnd: true,
paddingHorizontal: true,
paddingLeft: true,
paddingRight: true,
paddingStart: true,
paddingTop: true,
paddingVertical: true,
position: true,
resizeMode: true,
right: true,
rotation: true,
scaleX: true,
scaleY: true,
shadowColor: {
process: _$$_REQUIRE(_dependencyMap[3])
},
shadowOffset: {
diff: _$$_REQUIRE(_dependencyMap[5])
},
shadowOpacity: true,
shadowRadius: true,
start: true,
textAlign: true,
textAlignVertical: true,
textDecorationColor: {
process: _$$_REQUIRE(_dependencyMap[3])
},
textDecorationLine: true,
textDecorationStyle: true,
textShadowColor: {
process: _$$_REQUIRE(_dependencyMap[3])
},
textShadowOffset: true,
textShadowRadius: true,
textTransform: true,
tintColor: {
process: _$$_REQUIRE(_dependencyMap[3])
},
top: true,
transform: {
diff: _$$_REQUIRE(_dependencyMap[6])
},
transformMatrix: true,
translateX: true,
translateY: true,
width: true,
writingDirection: true,
zIndex: true
},
testID: true,
top: true,
transform: {
diff: _$$_REQUIRE(_dependencyMap[6])
},
translateX: true,
translateY: true,
width: true,
zIndex: true
})
};
module.exports = ReactNativeViewConfig;
},14590,[14305,14314,14581,10393,10408,10402,10411]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var _extends = _$$_REQUIRE(_dependencyMap[0]);
var _objectSpread = _$$_REQUIRE(_dependencyMap[1]);
var ReactNativeStyleAttributes = _$$_REQUIRE(_dependencyMap[2]);
var UIManager = _$$_REQUIRE(_dependencyMap[3]);
var insetsDiffer = _$$_REQUIRE(_dependencyMap[4]);
var invariant = _$$_REQUIRE(_dependencyMap[5]);
var matricesDiffer = _$$_REQUIRE(_dependencyMap[6]);
var pointsDiffer = _$$_REQUIRE(_dependencyMap[7]);
var processColor = _$$_REQUIRE(_dependencyMap[8]);
var processColorArray = _$$_REQUIRE(_dependencyMap[9]);
var resolveAssetSource = _$$_REQUIRE(_dependencyMap[10]);
var sizesDiffer = _$$_REQUIRE(_dependencyMap[11]);
var warning = _$$_REQUIRE(_dependencyMap[12]);
function getNativeComponentAttributes(uiViewClassName) {
var viewConfig = UIManager.getViewManagerConfig(uiViewClassName);
invariant(viewConfig != null && viewConfig.NativeProps != null, 'requireNativeComponent: "%s" was not found in the UIManager.', uiViewClassName);
var baseModuleName = viewConfig.baseModuleName,
bubblingEventTypes = viewConfig.bubblingEventTypes,
directEventTypes = viewConfig.directEventTypes;
var nativeProps = viewConfig.NativeProps;
while (baseModuleName) {
var baseModule = UIManager.getViewManagerConfig(baseModuleName);
if (!baseModule) {
warning(false, 'Base module "%s" does not exist', baseModuleName);
baseModuleName = null;
} else {
bubblingEventTypes = _objectSpread({}, baseModule.bubblingEventTypes, bubblingEventTypes);
directEventTypes = _objectSpread({}, baseModule.directEventTypes, directEventTypes);
nativeProps = _objectSpread({}, baseModule.NativeProps, nativeProps);
baseModuleName = baseModule.baseModuleName;
}
}
var validAttributes = {};
for (var key in nativeProps) {
var typeName = nativeProps[key];
var diff = getDifferForType(typeName);
var process = getProcessorForType(typeName);
validAttributes[key] = diff == null && process == null ? true : {
diff: diff,
process: process
};
}
validAttributes.style = ReactNativeStyleAttributes;
_extends(viewConfig, {
uiViewClassName: uiViewClassName,
validAttributes: validAttributes,
bubblingEventTypes: bubblingEventTypes,
directEventTypes: directEventTypes
});
if (!hasAttachedDefaultEventTypes) {
attachDefaultEventTypes(viewConfig);
hasAttachedDefaultEventTypes = true;
}
return viewConfig;
}
var hasAttachedDefaultEventTypes = false;
function attachDefaultEventTypes(viewConfig) {
var constants = UIManager.getConstants();
if (constants.ViewManagerNames || constants.LazyViewManagersEnabled) {
viewConfig = merge(viewConfig, UIManager.getDefaultEventTypes());
} else {
viewConfig.bubblingEventTypes = merge(viewConfig.bubblingEventTypes, constants.genericBubblingEventTypes);
viewConfig.directEventTypes = merge(viewConfig.directEventTypes, constants.genericDirectEventTypes);
}
}
function merge(destination, source) {
if (!source) {
return destination;
}
if (!destination) {
return source;
}
for (var key in source) {
if (!source.hasOwnProperty(key)) {
continue;
}
var sourceValue = source[key];
if (destination.hasOwnProperty(key)) {
var destinationValue = destination[key];
if (typeof sourceValue === 'object' && typeof destinationValue === 'object') {
sourceValue = merge(destinationValue, sourceValue);
}
}
destination[key] = sourceValue;
}
return destination;
}
function getDifferForType(typeName) {
switch (typeName) {
case 'CATransform3D':
return matricesDiffer;
case 'CGPoint':
return pointsDiffer;
case 'CGSize':
return sizesDiffer;
case 'UIEdgeInsets':
return insetsDiffer;
}
return null;
}
function getProcessorForType(typeName) {
switch (typeName) {
case 'CGColor':
case 'UIColor':
return processColor;
case 'CGColorArray':
case 'UIColorArray':
return processColorArray;
case 'CGImage':
case 'UIImage':
case 'RCTImageSource':
return resolveAssetSource;
case 'Color':
return processColor;
case 'ColorArray':
return processColorArray;
}
return null;
}
module.exports = getNativeComponentAttributes;
},14593,[14344,14314,10378,10279,10408,14326,10411,10414,10393,14596,10417,10402,14332]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var processColor = _$$_REQUIRE(_dependencyMap[0]);
function processColorArray(colors) {
return colors == null ? null : colors.map(processColor);
}
module.exports = processColorArray;
},14596,[10393]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var androidScaleSuffix = {
'0.75': 'ldpi',
'1': 'mdpi',
'1.5': 'hdpi',
'2': 'xhdpi',
'3': 'xxhdpi',
'4': 'xxxhdpi'
};
function getAndroidAssetSuffix(scale) {
if (scale.toString() in androidScaleSuffix) {
return androidScaleSuffix[scale.toString()];
}
throw new Error('no such scale ' + scale.toString());
}
var drawableFileTypes = new Set(['gif', 'jpeg', 'jpg', 'png', 'svg', 'webp', 'xml']);
function getAndroidResourceFolderName(asset, scale) {
if (!drawableFileTypes.has(asset.type)) {
return 'raw';
}
var suffix = getAndroidAssetSuffix(scale);
if (!suffix) {
throw new Error("Don't know which android drawable suffix to use for scale: " + scale + '\nAsset: ' + JSON.stringify(asset, null, '\t') + '\nPossible scales are:' + JSON.stringify(androidScaleSuffix, null, '\t'));
}
var androidFolder = 'drawable-' + suffix;
return androidFolder;
}
function getAndroidResourceIdentifier(asset) {
var folderPath = getBasePath(asset);
return (folderPath + '/' + asset.name).toLowerCase().replace(/\//g, '_').replace(/([^a-z0-9_])/g, '').replace(/^assets_/, '');
}
function getBasePath(asset) {
var basePath = asset.httpServerLocation;
if (basePath[0] === '/') {
basePath = basePath.substr(1);
}
return basePath;
}
module.exports = {
getAndroidAssetSuffix: getAndroidAssetSuffix,
getAndroidResourceFolderName: getAndroidResourceFolderName,
getAndroidResourceIdentifier: getAndroidResourceIdentifier,
getBasePath: getBasePath
};
},14599,[]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var _interopRequireWildcard = _$$_REQUIRE(_dependencyMap[0]);
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = undefined;
var TurboModuleRegistry = _interopRequireWildcard(_$$_REQUIRE(_dependencyMap[1]));
var _default = TurboModuleRegistry.getEnforcing('SourceCode');
exports.default = _default;
},14602,[14308,14341]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var _interopRequireDefault = _$$_REQUIRE(_dependencyMap[0]);
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = undefined;
var _codegenNativeComponent = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[1]));
var _default = (0, _codegenNativeComponent.default)('AndroidProgressBar');
exports.default = _default;
},14605,[14305,14608]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var _interopRequireDefault = _$$_REQUIRE(_dependencyMap[0]);
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = undefined;
var _requireNativeComponent = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[1]));
var _reactNative = _$$_REQUIRE(_dependencyMap[2]);
function codegenNativeComponent(componentName, options) {
var componentNameInUse = options && options.paperComponentName ? options.paperComponentName : componentName;
if (options != null && options.paperComponentNameDeprecated != null) {
if (_reactNative.UIManager.getViewManagerConfig(componentName)) {
componentNameInUse = componentName;
} else if (options.paperComponentNameDeprecated != null && _reactNative.UIManager.getViewManagerConfig(options.paperComponentNameDeprecated)) {
componentNameInUse = options.paperComponentNameDeprecated;
} else {
throw new Error("Failed to find native component for either " + componentName + " or " + (options.paperComponentNameDeprecated || '(unknown)'));
}
}
return (0, _requireNativeComponent.default)(componentNameInUse);
}
var _default = codegenNativeComponent;
exports.default = _default;
},14608,[14305,10372,10033]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var DeprecatedColorPropType = _$$_REQUIRE(_dependencyMap[0]);
var DeprecatedEdgeInsetsPropType = _$$_REQUIRE(_dependencyMap[1]);
var DeprecatedStyleSheetPropType = _$$_REQUIRE(_dependencyMap[2]);
var PropTypes = _$$_REQUIRE(_dependencyMap[3]);
var DeprecatedTextStylePropTypes = _$$_REQUIRE(_dependencyMap[4]);
var stylePropType = DeprecatedStyleSheetPropType(DeprecatedTextStylePropTypes);
var DataDetectorTypes = ['phoneNumber', 'link', 'email', 'none', 'all'];
module.exports = {
ellipsizeMode: PropTypes.oneOf(['head', 'middle', 'tail', 'clip']),
numberOfLines: PropTypes.number,
textBreakStrategy: PropTypes.oneOf(['simple', 'highQuality', 'balanced']),
onLayout: PropTypes.func,
onPress: PropTypes.func,
onLongPress: PropTypes.func,
pressRetentionOffset: DeprecatedEdgeInsetsPropType,
selectable: PropTypes.bool,
selectionColor: DeprecatedColorPropType,
suppressHighlighting: PropTypes.bool,
style: stylePropType,
testID: PropTypes.string,
nativeID: PropTypes.string,
allowFontScaling: PropTypes.bool,
maxFontSizeMultiplier: PropTypes.number,
accessible: PropTypes.bool,
adjustsFontSizeToFit: PropTypes.bool,
minimumFontScale: PropTypes.number,
disabled: PropTypes.bool,
dataDetectorType: PropTypes.oneOf(DataDetectorTypes)
};
},14611,[14419,14614,14617,10318,14434]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var PropTypes = _$$_REQUIRE(_dependencyMap[0]);
var DeprecatedEdgeInsetsPropType = PropTypes.shape({
top: PropTypes.number,
left: PropTypes.number,
bottom: PropTypes.number,
right: PropTypes.number
});
module.exports = DeprecatedEdgeInsetsPropType;
},14614,[10318]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var deprecatedCreateStrictShapeTypeChecker = _$$_REQUIRE(_dependencyMap[0]);
var flattenStyle = _$$_REQUIRE(_dependencyMap[1]);
function DeprecatedStyleSheetPropType(shape) {
var shapePropType = deprecatedCreateStrictShapeTypeChecker(shape);
return function (props, propName, componentName, location) {
var newProps = props;
if (props[propName]) {
newProps = {};
newProps[propName] = flattenStyle(props[propName]);
}
for (var _len = arguments.length, rest = new Array(_len > 4 ? _len - 4 : 0), _key = 4; _key < _len; _key++) {
rest[_key - 4] = arguments[_key];
}
return shapePropType.apply(undefined, [newProps, propName, componentName, location].concat(rest));
};
}
module.exports = DeprecatedStyleSheetPropType;
},14617,[14620,10291]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var invariant = _$$_REQUIRE(_dependencyMap[0]);
var merge = _$$_REQUIRE(_dependencyMap[1]);
function deprecatedCreateStrictShapeTypeChecker(shapeTypes) {
function checkType(isRequired, props, propName, componentName, location) {
if (!props[propName]) {
if (isRequired) {
invariant(false, "Required object `" + propName + "` was not specified in " + ("`" + componentName + "`."));
}
return;
}
var propValue = props[propName];
var propType = typeof propValue;
var locationName = location || '(unknown)';
if (propType !== 'object') {
invariant(false, "Invalid " + locationName + " `" + propName + "` of type `" + propType + "` " + ("supplied to `" + componentName + "`, expected `object`."));
}
var allKeys = merge(props[propName], shapeTypes);
for (var _len = arguments.length, rest = new Array(_len > 5 ? _len - 5 : 0), _key = 5; _key < _len; _key++) {
rest[_key - 5] = arguments[_key];
}
for (var _key2 in allKeys) {
var checker = shapeTypes[_key2];
if (!checker) {
invariant(false, "Invalid props." + propName + " key `" + _key2 + "` supplied to `" + componentName + "`." + '\nBad object: ' + JSON.stringify(props[propName], null, ' ') + '\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' '));
}
var error = checker.apply(undefined, [propValue, _key2, componentName, location].concat(rest));
if (error) {
invariant(false, error.message + '\nBad object: ' + JSON.stringify(props[propName], null, ' '));
}
}
}
function chainedCheckType(props, propName, componentName, location) {
for (var _len2 = arguments.length, rest = new Array(_len2 > 4 ? _len2 - 4 : 0), _key3 = 4; _key3 < _len2; _key3++) {
rest[_key3 - 4] = arguments[_key3];
}
return checkType.apply(undefined, [false, props, propName, componentName, location].concat(rest));
}
chainedCheckType.isRequired = checkType.bind(null, true);
return chainedCheckType;
}
module.exports = deprecatedCreateStrictShapeTypeChecker;
},14620,[14326,10339]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var React = _$$_REQUIRE(_dependencyMap[0]);
module.exports = React.createContext(false);
},14623,[10297]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var _interopRequireDefault = _$$_REQUIRE(_dependencyMap[0]);
var _NativeTVNavigationEventEmitter = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[1]));
var Platform = _$$_REQUIRE(_dependencyMap[2]);
var NativeEventEmitter = _$$_REQUIRE(_dependencyMap[3]);
function TVEventHandler() {
this.__nativeTVNavigationEventListener = null;
this.__nativeTVNavigationEventEmitter = null;
}
TVEventHandler.prototype.enable = function (component, callback) {
this.__nativeTVNavigationEventEmitter = new NativeEventEmitter(_NativeTVNavigationEventEmitter.default);
this.__nativeTVNavigationEventListener = this.__nativeTVNavigationEventEmitter.addListener('onHWKeyEvent', function (data) {
if (callback) {
callback(component, data);
}
});
};
TVEventHandler.prototype.disable = function () {
if (this.__nativeTVNavigationEventListener) {
this.__nativeTVNavigationEventListener.remove();
delete this.__nativeTVNavigationEventListener;
}
if (this.__nativeTVNavigationEventEmitter) {
delete this.__nativeTVNavigationEventEmitter;
}
};
module.exports = TVEventHandler;
},14626,[14305,14629,10066,10198]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var _interopRequireWildcard = _$$_REQUIRE(_dependencyMap[0]);
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = undefined;
var TurboModuleRegistry = _interopRequireWildcard(_$$_REQUIRE(_dependencyMap[1]));
var _default = TurboModuleRegistry.get('TVNavigationEventEmitter');
exports.default = _default;
},14629,[14308,14341]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var invariant = _$$_REQUIRE(_dependencyMap[0]);
var keyMirror = function keyMirror(obj) {
var ret = {};
var key;
!(obj instanceof Object && !Array.isArray(obj)) ? invariant(false) : undefined;
for (key in obj) {
if (!obj.hasOwnProperty(key)) {
continue;
}
ret[key] = key;
}
return ret;
};
module.exports = keyMirror;
},14632,[14635]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var validateFormat = function (format) {
if (format === undefined) {
throw new Error('invariant(...): Second argument must be a string.');
}
};
function invariant(condition, format) {
for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
args[_key - 2] = arguments[_key];
}
validateFormat(format);
if (!condition) {
var error;
if (format === undefined) {
error = new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");
} else {
var argIndex = 0;
error = new Error(format.replace(/%s/g, function () {
return String(args[argIndex++]);
}));
error.name = 'Invariant Violation';
}
error.framesToPop = 1;
throw error;
}
}
module.exports = invariant;
},14635,[]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
function nullthrows(x, message) {
if (x != null) {
return x;
}
var error = new Error(message !== undefined ? message : 'Got unexpected ' + x);
error.framesToPop = 1;
throw error;
}
module.exports = nullthrows;
module.exports.default = nullthrows;
Object.defineProperty(module.exports, '__esModule', {
value: true
});
},14638,[]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
module.exports = {
DeprecatedAccessibilityRoles: ['none', 'button', 'link', 'search', 'image', 'keyboardkey', 'text', 'adjustable', 'imagebutton', 'header', 'summary', 'alert', 'checkbox', 'combobox', 'menu', 'menubar', 'menuitem', 'progressbar', 'radio', 'radiogroup', 'scrollbar', 'spinbutton', 'switch', 'tab', 'tablist', 'timer', 'toolbar'],
DeprecatedAccessibilityStates: ['selected', 'disabled', 'checked', 'unchecked', 'busy', 'expanded', 'collapsed', 'hasPopup']
};
},14641,[]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var _objectSpread = _$$_REQUIRE(_dependencyMap[0]);
var _require = _$$_REQUIRE(_dependencyMap[1]),
AnimatedEvent = _require.AnimatedEvent,
attachNativeEvent = _require.attachNativeEvent;
var AnimatedImplementation = _$$_REQUIRE(_dependencyMap[2]);
var AnimatedInterpolation = _$$_REQUIRE(_dependencyMap[3]);
var AnimatedNode = _$$_REQUIRE(_dependencyMap[4]);
var AnimatedProps = _$$_REQUIRE(_dependencyMap[5]);
var AnimatedValue = _$$_REQUIRE(_dependencyMap[6]);
var AnimatedValueXY = _$$_REQUIRE(_dependencyMap[7]);
var createAnimatedComponent = _$$_REQUIRE(_dependencyMap[8]);
var emptyAnimation = {
start: function start() {},
stop: function stop() {},
reset: function reset() {},
_startNativeLoop: function _startNativeLoop() {},
_isUsingNativeDriver: function _isUsingNativeDriver() {
return false;
}
};
var spring = function spring(value, config) {
var anyValue = value;
return _objectSpread({}, emptyAnimation, {
start: function start(callback) {
anyValue.setValue(config.toValue);
callback && callback({
finished: true
});
}
});
};
var timing = function timing(value, config) {
var anyValue = value;
return _objectSpread({}, emptyAnimation, {
start: function start(callback) {
anyValue.setValue(config.toValue);
callback && callback({
finished: true
});
}
});
};
var decay = function decay(value, config) {
return emptyAnimation;
};
var sequence = function sequence(animations) {
return emptyAnimation;
};
var parallel = function parallel(animations, config) {
return emptyAnimation;
};
var delay = function delay(time) {
return emptyAnimation;
};
var stagger = function stagger(time, animations) {
return emptyAnimation;
};
var loop = function loop(animation) {
var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
_ref$iterations = _ref.iterations,
iterations = _ref$iterations === undefined ? -1 : _ref$iterations;
return emptyAnimation;
};
var event = function event(argMapping, config) {
return null;
};
module.exports = {
Value: AnimatedValue,
ValueXY: AnimatedValueXY,
Interpolation: AnimatedInterpolation,
Node: AnimatedNode,
decay: decay,
timing: timing,
spring: spring,
add: AnimatedImplementation.add,
subtract: AnimatedImplementation.subtract,
divide: AnimatedImplementation.divide,
multiply: AnimatedImplementation.multiply,
modulo: AnimatedImplementation.modulo,
diffClamp: AnimatedImplementation.diffClamp,
delay: delay,
sequence: sequence,
parallel: parallel,
stagger: stagger,
loop: loop,
event: event,
createAnimatedComponent: createAnimatedComponent,
attachNativeEvent: attachNativeEvent,
forkEvent: AnimatedImplementation.forkEvent,
unforkEvent: AnimatedImplementation.unforkEvent,
Event: AnimatedEvent,
__PropsOnlyForTests: AnimatedProps
};
},14644,[14314,10528,10525,10534,10537,10567,10531,10579,10603]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var _interopRequireWildcard = _$$_REQUIRE(_dependencyMap[0]);
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = undefined;
var TurboModuleRegistry = _interopRequireWildcard(_$$_REQUIRE(_dependencyMap[1]));
var _default = TurboModuleRegistry.get('NativeAnimatedModule');
exports.default = _default;
},14647,[14308,14341]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var _classCallCheck = _$$_REQUIRE(_dependencyMap[0]);
var _createClass = _$$_REQUIRE(_dependencyMap[1]);
var _possibleConstructorReturn = _$$_REQUIRE(_dependencyMap[2]);
var _getPrototypeOf = _$$_REQUIRE(_dependencyMap[3]);
var _get = _$$_REQUIRE(_dependencyMap[4]);
var _inherits = _$$_REQUIRE(_dependencyMap[5]);
var AnimatedInterpolation = _$$_REQUIRE(_dependencyMap[6]);
var AnimatedNode = _$$_REQUIRE(_dependencyMap[7]);
var AnimatedValue = _$$_REQUIRE(_dependencyMap[8]);
var AnimatedWithChildren = _$$_REQUIRE(_dependencyMap[9]);
var AnimatedSubtraction = function (_AnimatedWithChildren) {
_inherits(AnimatedSubtraction, _AnimatedWithChildren);
function AnimatedSubtraction(a, b) {
var _this;
_classCallCheck(this, AnimatedSubtraction);
_this = _possibleConstructorReturn(this, _getPrototypeOf(AnimatedSubtraction).call(this));
_this._a = typeof a === 'number' ? new AnimatedValue(a) : a;
_this._b = typeof b === 'number' ? new AnimatedValue(b) : b;
return _this;
}
_createClass(AnimatedSubtraction, [{
key: "__makeNative",
value: function __makeNative() {
this._a.__makeNative();
this._b.__makeNative();
_get(_getPrototypeOf(AnimatedSubtraction.prototype), "__makeNative", this).call(this);
}
}, {
key: "__getValue",
value: function __getValue() {
return this._a.__getValue() - this._b.__getValue();
}
}, {
key: "interpolate",
value: function interpolate(config) {
return new AnimatedInterpolation(this, config);
}
}, {
key: "__attach",
value: function __attach() {
this._a.__addChild(this);
this._b.__addChild(this);
}
}, {
key: "__detach",
value: function __detach() {
this._a.__removeChild(this);
this._b.__removeChild(this);
_get(_getPrototypeOf(AnimatedSubtraction.prototype), "__detach", this).call(this);
}
}, {
key: "__getNativeConfig",
value: function __getNativeConfig() {
return {
type: 'subtraction',
input: [this._a.__getNativeTag(), this._b.__getNativeTag()]
};
}
}]);
return AnimatedSubtraction;
}(AnimatedWithChildren);
module.exports = AnimatedSubtraction;
},14650,[14320,14323,14371,14377,14380,14386,10534,10537,10531,10543]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var FlatList = _$$_REQUIRE(_dependencyMap[0]);
var createAnimatedComponent = _$$_REQUIRE(_dependencyMap[1]);
module.exports = createAnimatedComponent(FlatList, {
scrollEventThrottle: 0.0001
});
},14653,[10657,10603]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var _interopRequireDefault = _$$_REQUIRE(_dependencyMap[0]);
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = undefined;
var _codegenNativeComponent = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[1]));
var _default = (0, _codegenNativeComponent.default)('AndroidSwipeRefreshLayout');
exports.default = _default;
},14656,[14305,14608]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var _interopRequireDefault = _$$_REQUIRE(_dependencyMap[0]);
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = undefined;
var _codegenNativeComponent = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[1]));
var _default = (0, _codegenNativeComponent.default)('PullToRefreshView', {
paperComponentName: 'RCTRefreshControl'
});
exports.default = _default;
},14659,[14305,14608]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
var _interopRequireWildcard = _$$_REQUIRE(_dependencyMap[0]);
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = undefined;
var TurboModuleRegistry = _interopRequireWildcard(_$$_REQUIRE(_dependencyMap[1]));
var _default = TurboModuleRegistry.get('FrameRateLogger');
exports.default = _default;
},14662,[14308,14341]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var _interopRequireWildcard = _$$_REQUIRE(_dependencyMap[0]);
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = undefined;
var TurboModuleRegistry = _interopRequireWildcard(_$$_REQUIRE(_dependencyMap[1]));
var _default = TurboModuleRegistry.get('KeyboardObserver');
exports.default = _default;
},14665,[14308,14341]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var _extends = _$$_REQUIRE(_dependencyMap[0]);
var OUTER_PROPS = _extends(Object.create(null), {
margin: true,
marginHorizontal: true,
marginVertical: true,
marginBottom: true,
marginTop: true,
marginLeft: true,
marginRight: true,
flex: true,
flexGrow: true,
flexShrink: true,
flexBasis: true,
alignSelf: true,
height: true,
minHeight: true,
maxHeight: true,
width: true,
minWidth: true,
maxWidth: true,
position: true,
left: true,
right: true,
bottom: true,
top: true
});
function splitLayoutProps(props) {
var inner = {};
var outer = {};
if (props) {
Object.keys(props).forEach(function (k) {
var value = props[k];
if (OUTER_PROPS[k]) {
outer[k] = value;
} else {
inner[k] = value;
}
});
}
return {
outer: outer,
inner: inner
};
}
module.exports = splitLayoutProps;
},14668,[14344]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var Image = _$$_REQUIRE(_dependencyMap[0]);
var createAnimatedComponent = _$$_REQUIRE(_dependencyMap[1]);
module.exports = createAnimatedComponent(Image);
},14671,[10606,10603]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
module.exports = _$$_REQUIRE(_dependencyMap[0]);
},14674,[14677]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
var runtime = function (exports) {
"use strict";
var Op = Object.prototype;
var hasOwn = Op.hasOwnProperty;
var undefined;
var $Symbol = typeof Symbol === "function" ? Symbol : {};
var iteratorSymbol = $Symbol.iterator || "@@iterator";
var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
function wrap(innerFn, outerFn, self, tryLocsList) {
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
var generator = Object.create(protoGenerator.prototype);
var context = new Context(tryLocsList || []);
generator._invoke = makeInvokeMethod(innerFn, self, context);
return generator;
}
exports.wrap = wrap;
function tryCatch(fn, obj, arg) {
try {
return {
type: "normal",
arg: fn.call(obj, arg)
};
} catch (err) {
return {
type: "throw",
arg: err
};
}
}
var GenStateSuspendedStart = "suspendedStart";
var GenStateSuspendedYield = "suspendedYield";
var GenStateExecuting = "executing";
var GenStateCompleted = "completed";
var ContinueSentinel = {};
function Generator() {}
function GeneratorFunction() {}
function GeneratorFunctionPrototype() {}
var IteratorPrototype = {};
IteratorPrototype[iteratorSymbol] = function () {
return this;
};
var getProto = Object.getPrototypeOf;
var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
if (NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
IteratorPrototype = NativeIteratorPrototype;
}
var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
GeneratorFunctionPrototype.constructor = GeneratorFunction;
GeneratorFunctionPrototype[toStringTagSymbol] = GeneratorFunction.displayName = "GeneratorFunction";
function defineIteratorMethods(prototype) {
["next", "throw", "return"].forEach(function (method) {
prototype[method] = function (arg) {
return this._invoke(method, arg);
};
});
}
exports.isGeneratorFunction = function (genFun) {
var ctor = typeof genFun === "function" && genFun.constructor;
return ctor ? ctor === GeneratorFunction || (ctor.displayName || ctor.name) === "GeneratorFunction" : false;
};
exports.mark = function (genFun) {
if (Object.setPrototypeOf) {
Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
} else {
genFun.__proto__ = GeneratorFunctionPrototype;
if (!(toStringTagSymbol in genFun)) {
genFun[toStringTagSymbol] = "GeneratorFunction";
}
}
genFun.prototype = Object.create(Gp);
return genFun;
};
exports.awrap = function (arg) {
return {
__await: arg
};
};
function AsyncIterator(generator, PromiseImpl) {
function invoke(method, arg, resolve, reject) {
var record = tryCatch(generator[method], generator, arg);
if (record.type === "throw") {
reject(record.arg);
} else {
var result = record.arg;
var value = result.value;
if (value && typeof value === "object" && hasOwn.call(value, "__await")) {
return PromiseImpl.resolve(value.__await).then(function (value) {
invoke("next", value, resolve, reject);
}, function (err) {
invoke("throw", err, resolve, reject);
});
}
return PromiseImpl.resolve(value).then(function (unwrapped) {
result.value = unwrapped;
resolve(result);
}, function (error) {
return invoke("throw", error, resolve, reject);
});
}
}
var previousPromise;
function enqueue(method, arg) {
function callInvokeWithMethodAndArg() {
return new PromiseImpl(function (resolve, reject) {
invoke(method, arg, resolve, reject);
});
}
return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
}
this._invoke = enqueue;
}
defineIteratorMethods(AsyncIterator.prototype);
AsyncIterator.prototype[asyncIteratorSymbol] = function () {
return this;
};
exports.AsyncIterator = AsyncIterator;
exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
if (PromiseImpl === undefined) PromiseImpl = Promise;
var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
return result.done ? result.value : iter.next();
});
};
function makeInvokeMethod(innerFn, self, context) {
var state = GenStateSuspendedStart;
return function invoke(method, arg) {
if (state === GenStateExecuting) {
throw new Error("Generator is already running");
}
if (state === GenStateCompleted) {
if (method === "throw") {
throw arg;
}
return doneResult();
}
context.method = method;
context.arg = arg;
while (true) {
var delegate = context.delegate;
if (delegate) {
var delegateResult = maybeInvokeDelegate(delegate, context);
if (delegateResult) {
if (delegateResult === ContinueSentinel) continue;
return delegateResult;
}
}
if (context.method === "next") {
context.sent = context._sent = context.arg;
} else if (context.method === "throw") {
if (state === GenStateSuspendedStart) {
state = GenStateCompleted;
throw context.arg;
}
context.dispatchException(context.arg);
} else if (context.method === "return") {
context.abrupt("return", context.arg);
}
state = GenStateExecuting;
var record = tryCatch(innerFn, self, context);
if (record.type === "normal") {
state = context.done ? GenStateCompleted : GenStateSuspendedYield;
if (record.arg === ContinueSentinel) {
continue;
}
return {
value: record.arg,
done: context.done
};
} else if (record.type === "throw") {
state = GenStateCompleted;
context.method = "throw";
context.arg = record.arg;
}
}
};
}
function maybeInvokeDelegate(delegate, context) {
var method = delegate.iterator[context.method];
if (method === undefined) {
context.delegate = null;
if (context.method === "throw") {
if (delegate.iterator["return"]) {
context.method = "return";
context.arg = undefined;
maybeInvokeDelegate(delegate, context);
if (context.method === "throw") {
return ContinueSentinel;
}
}
context.method = "throw";
context.arg = new TypeError("The iterator does not provide a 'throw' method");
}
return ContinueSentinel;
}
var record = tryCatch(method, delegate.iterator, context.arg);
if (record.type === "throw") {
context.method = "throw";
context.arg = record.arg;
context.delegate = null;
return ContinueSentinel;
}
var info = record.arg;
if (!info) {
context.method = "throw";
context.arg = new TypeError("iterator result is not an object");
context.delegate = null;
return ContinueSentinel;
}
if (info.done) {
context[delegate.resultName] = info.value;
context.next = delegate.nextLoc;
if (context.method !== "return") {
context.method = "next";
context.arg = undefined;
}
} else {
return info;
}
context.delegate = null;
return ContinueSentinel;
}
defineIteratorMethods(Gp);
Gp[toStringTagSymbol] = "Generator";
Gp[iteratorSymbol] = function () {
return this;
};
Gp.toString = function () {
return "[object Generator]";
};
function pushTryEntry(locs) {
var entry = {
tryLoc: locs[0]
};
if (1 in locs) {
entry.catchLoc = locs[1];
}
if (2 in locs) {
entry.finallyLoc = locs[2];
entry.afterLoc = locs[3];
}
this.tryEntries.push(entry);
}
function resetTryEntry(entry) {
var record = entry.completion || {};
record.type = "normal";
delete record.arg;
entry.completion = record;
}
function Context(tryLocsList) {
this.tryEntries = [{
tryLoc: "root"
}];
tryLocsList.forEach(pushTryEntry, this);
this.reset(true);
}
exports.keys = function (object) {
var keys = [];
for (var key in object) {
keys.push(key);
}
keys.reverse();
return function next() {
while (keys.length) {
var key = keys.pop();
if (key in object) {
next.value = key;
next.done = false;
return next;
}
}
next.done = true;
return next;
};
};
function values(iterable) {
if (iterable) {
var iteratorMethod = iterable[iteratorSymbol];
if (iteratorMethod) {
return iteratorMethod.call(iterable);
}
if (typeof iterable.next === "function") {
return iterable;
}
if (!isNaN(iterable.length)) {
var i = -1,
next = function next() {
while (++i < iterable.length) {
if (hasOwn.call(iterable, i)) {
next.value = iterable[i];
next.done = false;
return next;
}
}
next.value = undefined;
next.done = true;
return next;
};
return next.next = next;
}
}
return {
next: doneResult
};
}
exports.values = values;
function doneResult() {
return {
value: undefined,
done: true
};
}
Context.prototype = {
constructor: Context,
reset: function reset(skipTempReset) {
this.prev = 0;
this.next = 0;
this.sent = this._sent = undefined;
this.done = false;
this.delegate = null;
this.method = "next";
this.arg = undefined;
this.tryEntries.forEach(resetTryEntry);
if (!skipTempReset) {
for (var name in this) {
if (name.charAt(0) === "t" && hasOwn.call(this, name) && !isNaN(+name.slice(1))) {
this[name] = undefined;
}
}
}
},
stop: function stop() {
this.done = true;
var rootEntry = this.tryEntries[0];
var rootRecord = rootEntry.completion;
if (rootRecord.type === "throw") {
throw rootRecord.arg;
}
return this.rval;
},
dispatchException: function dispatchException(exception) {
if (this.done) {
throw exception;
}
var context = this;
function handle(loc, caught) {
record.type = "throw";
record.arg = exception;
context.next = loc;
if (caught) {
context.method = "next";
context.arg = undefined;
}
return !!caught;
}
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
var entry = this.tryEntries[i];
var record = entry.completion;
if (entry.tryLoc === "root") {
return handle("end");
}
if (entry.tryLoc <= this.prev) {
var hasCatch = hasOwn.call(entry, "catchLoc");
var hasFinally = hasOwn.call(entry, "finallyLoc");
if (hasCatch && hasFinally) {
if (this.prev < entry.catchLoc) {
return handle(entry.catchLoc, true);
} else if (this.prev < entry.finallyLoc) {
return handle(entry.finallyLoc);
}
} else if (hasCatch) {
if (this.prev < entry.catchLoc) {
return handle(entry.catchLoc, true);
}
} else if (hasFinally) {
if (this.prev < entry.finallyLoc) {
return handle(entry.finallyLoc);
}
} else {
throw new Error("try statement without catch or finally");
}
}
}
},
abrupt: function abrupt(type, arg) {
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
var entry = this.tryEntries[i];
if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
var finallyEntry = entry;
break;
}
}
if (finallyEntry && (type === "break" || type === "continue") && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc) {
finallyEntry = null;
}
var record = finallyEntry ? finallyEntry.completion : {};
record.type = type;
record.arg = arg;
if (finallyEntry) {
this.method = "next";
this.next = finallyEntry.finallyLoc;
return ContinueSentinel;
}
return this.complete(record);
},
complete: function complete(record, afterLoc) {
if (record.type === "throw") {
throw record.arg;
}
if (record.type === "break" || record.type === "continue") {
this.next = record.arg;
} else if (record.type === "return") {
this.rval = this.arg = record.arg;
this.method = "return";
this.next = "end";
} else if (record.type === "normal" && afterLoc) {
this.next = afterLoc;
}
return ContinueSentinel;
},
finish: function finish(finallyLoc) {
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
var entry = this.tryEntries[i];
if (entry.finallyLoc === finallyLoc) {
this.complete(entry.completion, entry.afterLoc);
resetTryEntry(entry);
return ContinueSentinel;
}
}
},
"catch": function _catch(tryLoc) {
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
var entry = this.tryEntries[i];
if (entry.tryLoc === tryLoc) {
var record = entry.completion;
if (record.type === "throw") {
var thrown = record.arg;
resetTryEntry(entry);
}
return thrown;
}
}
throw new Error("illegal catch attempt");
},
delegateYield: function delegateYield(iterable, resultName, nextLoc) {
this.delegate = {
iterator: values(iterable),
resultName: resultName,
nextLoc: nextLoc
};
if (this.method === "next") {
this.arg = undefined;
}
return ContinueSentinel;
}
};
return exports;
}(typeof module === "object" ? module.exports : {});
try {
regeneratorRuntime = runtime;
} catch (accidentalStrictMode) {
Function("r", "regeneratorRuntime = r")(runtime);
}
},14677,[]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var _objectSpread = _$$_REQUIRE(_dependencyMap[0]);
var DeprecatedEdgeInsetsPropType = _$$_REQUIRE(_dependencyMap[1]);
var DeprecatedStyleSheetPropType = _$$_REQUIRE(_dependencyMap[2]);
var DeprecatedViewStylePropTypes = _$$_REQUIRE(_dependencyMap[3]);
var PlatformViewPropTypes = _$$_REQUIRE(_dependencyMap[4]);
var PropTypes = _$$_REQUIRE(_dependencyMap[5]);
var _require = _$$_REQUIRE(_dependencyMap[6]),
DeprecatedAccessibilityRoles = _require.DeprecatedAccessibilityRoles,
DeprecatedAccessibilityStates = _require.DeprecatedAccessibilityStates;
var stylePropType = DeprecatedStyleSheetPropType(DeprecatedViewStylePropTypes);
module.exports = _objectSpread({
accessible: PropTypes.bool,
accessibilityLabel: PropTypes.node,
accessibilityHint: PropTypes.string,
accessibilityActions: PropTypes.arrayOf(PropTypes.string),
accessibilityIgnoresInvertColors: PropTypes.bool,
accessibilityRole: PropTypes.oneOf(DeprecatedAccessibilityRoles),
accessibilityStates: PropTypes.arrayOf(PropTypes.oneOf(DeprecatedAccessibilityStates)),
accessibilityState: PropTypes.object,
accessibilityLiveRegion: PropTypes.oneOf(['none', 'polite', 'assertive']),
importantForAccessibility: PropTypes.oneOf(['auto', 'yes', 'no', 'no-hide-descendants']),
accessibilityViewIsModal: PropTypes.bool,
accessibilityElementsHidden: PropTypes.bool,
onAccessibilityAction: PropTypes.func,
onAccessibilityTap: PropTypes.func,
onMagicTap: PropTypes.func,
testID: PropTypes.string,
nativeID: PropTypes.string,
onResponderGrant: PropTypes.func,
onResponderMove: PropTypes.func,
onResponderReject: PropTypes.func,
onResponderRelease: PropTypes.func,
onResponderTerminate: PropTypes.func,
onResponderTerminationRequest: PropTypes.func,
onStartShouldSetResponder: PropTypes.func,
onStartShouldSetResponderCapture: PropTypes.func,
onMoveShouldSetResponder: PropTypes.func,
onMoveShouldSetResponderCapture: PropTypes.func,
hitSlop: DeprecatedEdgeInsetsPropType,
onLayout: PropTypes.func,
pointerEvents: PropTypes.oneOf(['box-none', 'none', 'box-only', 'auto']),
style: stylePropType,
removeClippedSubviews: PropTypes.bool,
renderToHardwareTextureAndroid: PropTypes.bool,
shouldRasterizeIOS: PropTypes.bool,
collapsable: PropTypes.bool,
needsOffscreenAlphaCompositing: PropTypes.bool
}, PlatformViewPropTypes);
},14680,[14314,14614,14617,14437,10348,10318,14641]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var requireNativeComponent = _$$_REQUIRE(_dependencyMap[0]);
var ImageViewNativeComponent = requireNativeComponent('RCTImageView');
module.exports = ImageViewNativeComponent;
},14683,[10372]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var requireNativeComponent = _$$_REQUIRE(_dependencyMap[0]);
var TextInlineImage = requireNativeComponent('RCTTextInlineImage');
module.exports = TextInlineImage;
},14686,[10372]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var ScrollView = _$$_REQUIRE(_dependencyMap[0]);
var createAnimatedComponent = _$$_REQUIRE(_dependencyMap[1]);
module.exports = createAnimatedComponent(ScrollView, {
scrollEventThrottle: 0.0001
});
},14689,[10609,10603]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var SectionList = _$$_REQUIRE(_dependencyMap[0]);
var createAnimatedComponent = _$$_REQUIRE(_dependencyMap[1]);
module.exports = createAnimatedComponent(SectionList, {
scrollEventThrottle: 0.0001
});
},14692,[10744,10603]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var Text = _$$_REQUIRE(_dependencyMap[0]);
var createAnimatedComponent = _$$_REQUIRE(_dependencyMap[1]);
module.exports = createAnimatedComponent(Text);
},14695,[10483,10603]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var View = _$$_REQUIRE(_dependencyMap[0]);
var createAnimatedComponent = _$$_REQUIRE(_dependencyMap[1]);
module.exports = createAnimatedComponent(View);
},14698,[10447,10603]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var requireNativeComponent = _$$_REQUIRE(_dependencyMap[0]);
module.exports = requireNativeComponent('AndroidCheckBox');
},14701,[10372]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
function setAndForwardRef(_ref) {
var getForwardedRef = _ref.getForwardedRef,
setLocalRef = _ref.setLocalRef;
return function forwardRef(ref) {
var forwardedRef = getForwardedRef();
setLocalRef(ref);
if (typeof forwardedRef === 'function') {
forwardedRef(ref);
} else if (typeof forwardedRef === 'object' && forwardedRef != null) {
forwardedRef.current = ref;
}
};
}
module.exports = setAndForwardRef;
},14704,[]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var _interopRequireWildcard = _$$_REQUIRE(_dependencyMap[0]);
var _interopRequireDefault = _$$_REQUIRE(_dependencyMap[1]);
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = exports.Commands = undefined;
var _codegenNativeCommands = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[2]));
var _codegenNativeComponent = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[3]));
var React = _interopRequireWildcard(_$$_REQUIRE(_dependencyMap[4]));
var Commands = (0, _codegenNativeCommands.default)({
supportedCommands: ['openDrawer', 'closeDrawer']
});
exports.Commands = Commands;
var _default = (0, _codegenNativeComponent.default)('AndroidDrawerLayout');
exports.default = _default;
},14707,[14308,14305,14710,14608,10297]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = undefined;
var _ReactNative = _$$_REQUIRE(_dependencyMap[0]);
function codegenNativeCommands(options) {
var commandObj = {};
options.supportedCommands.forEach(function (command) {
commandObj[command] = function (ref) {
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
args[_key - 1] = arguments[_key];
}
(0, _ReactNative.dispatchCommand)(ref, command, args);
};
});
return commandObj;
}
var _default = codegenNativeCommands;
exports.default = _default;
},14710,[10114]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var _interopRequireWildcard = _$$_REQUIRE(_dependencyMap[0]);
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = undefined;
var TurboModuleRegistry = _interopRequireWildcard(_$$_REQUIRE(_dependencyMap[1]));
var _default = TurboModuleRegistry.getEnforcing('StatusBarManager');
exports.default = _default;
},14713,[14308,14341]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var _interopRequireDefault = _$$_REQUIRE(_dependencyMap[0]);
var _classCallCheck2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[1]));
var _createClass2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[2]));
var _possibleConstructorReturn2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[3]));
var _getPrototypeOf2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[4]));
var _inherits2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[5]));
var _RCTInputAccessoryViewNativeComponent = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[6]));
var DeprecatedColorPropType = _$$_REQUIRE(_dependencyMap[7]);
var Platform = _$$_REQUIRE(_dependencyMap[8]);
var React = _$$_REQUIRE(_dependencyMap[9]);
var StyleSheet = _$$_REQUIRE(_dependencyMap[10]);
var InputAccessoryView = function (_React$Component) {
(0, _inherits2.default)(InputAccessoryView, _React$Component);
function InputAccessoryView() {
(0, _classCallCheck2.default)(this, InputAccessoryView);
return (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(InputAccessoryView).apply(this, arguments));
}
(0, _createClass2.default)(InputAccessoryView, [{
key: "render",
value: function render() {
{}
if (React.Children.count(this.props.children) === 0) {
return null;
}
return React.createElement(_RCTInputAccessoryViewNativeComponent.default, {
style: [this.props.style, styles.container],
nativeID: this.props.nativeID,
backgroundColor: this.props.backgroundColor
}, this.props.children);
}
}]);
return InputAccessoryView;
}(React.Component);
var styles = StyleSheet.create({
container: {
position: 'absolute'
}
});
module.exports = InputAccessoryView;
},14746,[14305,14320,14323,14371,14377,14386,14749,14419,10066,10297,10441]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var _interopRequireDefault = _$$_REQUIRE(_dependencyMap[0]);
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = undefined;
var _codegenNativeComponent = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[1]));
var _default = (0, _codegenNativeComponent.default)('RCTInputAccessoryView');
exports.default = _default;
},14749,[14305,14608]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var _interopRequireWildcard = _$$_REQUIRE(_dependencyMap[0]);
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = undefined;
var TurboModuleRegistry = _interopRequireWildcard(_$$_REQUIRE(_dependencyMap[1]));
var _default = TurboModuleRegistry.get('ModalManager');
exports.default = _default;
},14752,[14308,14341]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var _interopRequireDefault = _$$_REQUIRE(_dependencyMap[0]);
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = undefined;
var _codegenNativeComponent = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[1]));
var _default = (0, _codegenNativeComponent.default)('ModalHostView', {
interfaceOnly: true,
paperComponentName: 'RCTModalHostView'
});
exports.default = _default;
},14755,[14305,14608]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var React = _$$_REQUIRE(_dependencyMap[0]);
module.exports = React.createContext(0);
},14758,[10297]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var _interopRequireWildcard = _$$_REQUIRE(_dependencyMap[0]);
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = undefined;
var TurboModuleRegistry = _interopRequireWildcard(_$$_REQUIRE(_dependencyMap[1]));
var _default = TurboModuleRegistry.get('I18nManager');
exports.default = _default;
},14761,[14308,14341]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var _reactNative = _$$_REQUIRE(_dependencyMap[0]);
module.exports = (0, _reactNative.requireNativeComponent)('AndroidDropdownPicker');
},14764,[10033]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var _reactNative = _$$_REQUIRE(_dependencyMap[0]);
module.exports = (0, _reactNative.requireNativeComponent)('AndroidDialogPicker');
},14767,[10033]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
var _extends = _$$_REQUIRE(_dependencyMap[0]);
var _objectWithoutProperties = _$$_REQUIRE(_dependencyMap[1]);
var Platform = _$$_REQUIRE(_dependencyMap[2]);
var React = _$$_REQUIRE(_dependencyMap[3]);
var View = _$$_REQUIRE(_dependencyMap[4]);
var exported;
{
var SafeAreaView = function SafeAreaView(props, forwardedRef) {
var emulateUnlessSupported = props.emulateUnlessSupported,
localProps = _objectWithoutProperties(props, ["emulateUnlessSupported"]);
return React.createElement(View, _extends({}, localProps, {
ref: forwardedRef
}));
};
var SafeAreaViewRef = React.forwardRef(SafeAreaView);
SafeAreaViewRef.displayName = 'SafeAreaView';
exported = SafeAreaViewRef;
}
module.exports = exported;
},14770,[14344,14407,10066,10297,10447]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var _interopRequireDefault = _$$_REQUIRE(_dependencyMap[0]);
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = undefined;
var _codegenNativeComponent = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[1]));
var _default = (0, _codegenNativeComponent.default)('Slider', {
interfaceOnly: true,
paperComponentName: 'RCTSlider'
});
exports.default = _default;
},14773,[14305,14608]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var _interopRequireDefault = _$$_REQUIRE(_dependencyMap[0]);
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = undefined;
var _codegenNativeComponent = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[1]));
var _default = (0, _codegenNativeComponent.default)('Switch', {
paperComponentName: 'RCTSwitch'
});
exports.default = _default;
},14776,[14305,14608]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var _require = _$$_REQUIRE(_dependencyMap[0]),
NativeComponent = _require.NativeComponent;
var requireNativeComponent = _$$_REQUIRE(_dependencyMap[1]);
module.exports = requireNativeComponent('AndroidSwitch');
},14779,[10114,10372]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var _objectSpread = _$$_REQUIRE(_dependencyMap[0]);
var PropTypes = _$$_REQUIRE(_dependencyMap[1]);
var DeprecatedColorPropType = _$$_REQUIRE(_dependencyMap[2]);
var DeprecatedViewPropTypes = _$$_REQUIRE(_dependencyMap[3]);
var DocumentSelectionState = _$$_REQUIRE(_dependencyMap[4]);
var Text = _$$_REQUIRE(_dependencyMap[5]);
var DataDetectorTypes = ['phoneNumber', 'link', 'address', 'calendarEvent', 'none', 'all'];
module.exports = _objectSpread({}, DeprecatedViewPropTypes, {
autoCapitalize: PropTypes.oneOf(['none', 'sentences', 'words', 'characters']),
autoCompleteType: PropTypes.oneOf(['cc-csc', 'cc-exp', 'cc-exp-month', 'cc-exp-year', 'cc-number', 'email', 'name', 'password', 'postal-code', 'street-address', 'tel', 'username', 'off']),
autoCorrect: PropTypes.bool,
spellCheck: PropTypes.bool,
autoFocus: PropTypes.bool,
allowFontScaling: PropTypes.bool,
maxFontSizeMultiplier: PropTypes.number,
editable: PropTypes.bool,
keyboardType: PropTypes.oneOf(['default', 'email-address', 'numeric', 'phone-pad', 'number-pad', 'ascii-capable', 'numbers-and-punctuation', 'url', 'name-phone-pad', 'decimal-pad', 'twitter', 'web-search', 'visible-password']),
keyboardAppearance: PropTypes.oneOf(['default', 'light', 'dark']),
returnKeyType: PropTypes.oneOf(['done', 'go', 'next', 'search', 'send', 'none', 'previous', 'default', 'emergency-call', 'google', 'join', 'route', 'yahoo']),
returnKeyLabel: PropTypes.string,
maxLength: PropTypes.number,
numberOfLines: PropTypes.number,
disableFullscreenUI: PropTypes.bool,
enablesReturnKeyAutomatically: PropTypes.bool,
multiline: PropTypes.bool,
textBreakStrategy: PropTypes.oneOf(['simple', 'highQuality', 'balanced']),
onBlur: PropTypes.func,
onFocus: PropTypes.func,
onChange: PropTypes.func,
onChangeText: PropTypes.func,
onContentSizeChange: PropTypes.func,
onTextInput: PropTypes.func,
onEndEditing: PropTypes.func,
onSelectionChange: PropTypes.func,
onSubmitEditing: PropTypes.func,
onKeyPress: PropTypes.func,
onLayout: PropTypes.func,
onScroll: PropTypes.func,
placeholder: PropTypes.string,
placeholderTextColor: DeprecatedColorPropType,
scrollEnabled: PropTypes.bool,
secureTextEntry: PropTypes.bool,
selectionColor: DeprecatedColorPropType,
selectionState: PropTypes.instanceOf(DocumentSelectionState),
selection: PropTypes.shape({
start: PropTypes.number.isRequired,
end: PropTypes.number
}),
value: PropTypes.string,
defaultValue: PropTypes.string,
clearButtonMode: PropTypes.oneOf(['never', 'while-editing', 'unless-editing', 'always']),
clearTextOnFocus: PropTypes.bool,
selectTextOnFocus: PropTypes.bool,
blurOnSubmit: PropTypes.bool,
style: Text.propTypes.style,
underlineColorAndroid: DeprecatedColorPropType,
inlineImageLeft: PropTypes.string,
inlineImagePadding: PropTypes.number,
rejectResponderTermination: PropTypes.bool,
dataDetectorTypes: PropTypes.oneOfType([PropTypes.oneOf(DataDetectorTypes), PropTypes.arrayOf(PropTypes.oneOf(DataDetectorTypes))]),
caretHidden: PropTypes.bool,
contextMenuHidden: PropTypes.bool,
inputAccessoryViewID: PropTypes.string,
textContentType: PropTypes.oneOf(['none', 'URL', 'addressCity', 'addressCityAndState', 'addressState', 'countryName', 'creditCardNumber', 'emailAddress', 'familyName', 'fullStreetAddress', 'givenName', 'jobTitle', 'location', 'middleName', 'name', 'namePrefix', 'nameSuffix', 'nickname', 'organizationName', 'postalCode', 'streetAddressLine1', 'streetAddressLine2', 'sublocality', 'telephoneNumber', 'username', 'password', 'newPassword', 'oneTimeCode']),
showSoftInputOnFocus: PropTypes.bool
});
},14782,[14314,10318,14419,14680,10789,10483]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
"use strict";
var keyOf = function keyOf(oneKeyObj) {
var key;
for (key in oneKeyObj) {
if (!oneKeyObj.hasOwnProperty(key)) {
continue;
}
return key;
}
return null;
};
module.exports = keyOf;
},14785,[]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var _interopRequireWildcard = _$$_REQUIRE(_dependencyMap[0]);
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = undefined;
var TurboModuleRegistry = _interopRequireWildcard(_$$_REQUIRE(_dependencyMap[1]));
var _default = TurboModuleRegistry.get('ActionSheetManager');
exports.default = _default;
},14788,[14308,14341]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var _interopRequireWildcard = _$$_REQUIRE(_dependencyMap[0]);
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = undefined;
var TurboModuleRegistry = _interopRequireWildcard(_$$_REQUIRE(_dependencyMap[1]));
var _default = TurboModuleRegistry.get('HeadlessJsTaskSupport');
exports.default = _default;
},14791,[14308,14341]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var _interopRequireDefault = _$$_REQUIRE(_dependencyMap[0]);
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = undefined;
var _classCallCheck2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[1]));
var _possibleConstructorReturn2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[2]));
var _getPrototypeOf2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[3]));
var _inherits2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[4]));
var _wrapNativeSuper2 = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[5]));
var HeadlessJsTaskError = function (_Error) {
(0, _inherits2.default)(HeadlessJsTaskError, _Error);
function HeadlessJsTaskError() {
(0, _classCallCheck2.default)(this, HeadlessJsTaskError);
return (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(HeadlessJsTaskError).apply(this, arguments));
}
return HeadlessJsTaskError;
}((0, _wrapNativeSuper2.default)(Error));
exports.default = HeadlessJsTaskError;
},14794,[14305,14320,14371,14377,14386,14458]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
var _interopRequireWildcard = _$$_REQUIRE(_dependencyMap[0]);
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = undefined;
var TurboModuleRegistry = _interopRequireWildcard(_$$_REQUIRE(_dependencyMap[1]));
var _default = TurboModuleRegistry.get('BugReporting');
exports.default = _default;
},14797,[14308,14341]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var _interopRequireWildcard = _$$_REQUIRE(_dependencyMap[0]);
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = undefined;
var TurboModuleRegistry = _interopRequireWildcard(_$$_REQUIRE(_dependencyMap[1]));
var _default = TurboModuleRegistry.get('RedBox');
exports.default = _default;
},14800,[14308,14341]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var _interopRequireDefault = _$$_REQUIRE(_dependencyMap[0]);
var _interopRequireWildcard = _$$_REQUIRE(_dependencyMap[1]);
var React = _interopRequireWildcard(_$$_REQUIRE(_dependencyMap[2]));
var _GlobalPerformanceLogger = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[3]));
var PerformanceLoggerContext = React.createContext(_GlobalPerformanceLogger.default);
module.exports = PerformanceLoggerContext;
},14803,[14305,14308,10297,14548]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var React = _$$_REQUIRE(_dependencyMap[0]);
var StyleSheet = _$$_REQUIRE(_dependencyMap[1]);
var Text = _$$_REQUIRE(_dependencyMap[2]);
var View = _$$_REQUIRE(_dependencyMap[3]);
function ReactFabricIndicator() {
return React.createElement(View, {
style: styles.container
}, React.createElement(Text, {
style: styles.text
}, "FABRIC"));
}
var styles = StyleSheet.create({
container: {
alignItems: 'center',
justifyContent: 'center',
backgroundColor: 'rgba(0,0,0, 0.25)',
position: 'absolute',
top: 0,
right: 0,
padding: 2
},
text: {
fontSize: 6,
color: '#ffffff'
}
});
module.exports = ReactFabricIndicator;
},14806,[10297,10441,10483,10447]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var _interopRequireWildcard = _$$_REQUIRE(_dependencyMap[0]);
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = undefined;
var TurboModuleRegistry = _interopRequireWildcard(_$$_REQUIRE(_dependencyMap[1]));
var _default = TurboModuleRegistry.get('DeviceEventManager');
exports.default = _default;
},14809,[14308,14341]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
'use strict';
var _ReactNativePrivateInterface = _$$_REQUIRE(_dependencyMap[0]);
var ReactFabric;
{
ReactFabric = _$$_REQUIRE(_dependencyMap[1]);
}
_ReactNativePrivateInterface.BatchedBridge.registerCallableModule('ReactFabric', ReactFabric);
module.exports = ReactFabric;
},14812,[14566,14815]);
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
"use strict";
var _extends = _$$_REQUIRE(_dependencyMap[0]);
_$$_REQUIRE(_dependencyMap[1]);
var ReactNativePrivateInterface = _$$_REQUIRE(_dependencyMap[2]),
React = _$$_REQUIRE(_dependencyMap[3]),
Scheduler = _$$_REQUIRE(_dependencyMap[4]);
function ReactError(error) {
error.name = "Invariant Violation";
return error;
}
var eventPluginOrder = null,
namesToPlugins = {};
function recomputePluginOrdering() {
if (eventPluginOrder) for (var pluginName in namesToPlugins) {
var pluginModule = namesToPlugins[pluginName],
pluginIndex = eventPluginOrder.indexOf(pluginName);
if (!(-1 < pluginIndex)) throw ReactError(Error("EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `" + pluginName + "`."));
if (!plugins[pluginIndex]) {
if (!pluginModule.extractEvents) throw ReactError(Error("EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `" + pluginName + "` does not."));
plugins[pluginIndex] = pluginModule;
pluginIndex = pluginModule.eventTypes;
for (var eventName in pluginIndex) {
var JSCompiler_inline_result = undefined;
var dispatchConfig = pluginIndex[eventName],
pluginModule$jscomp$0 = pluginModule,
eventName$jscomp$0 = eventName;
if (eventNameDispatchConfigs.hasOwnProperty(eventName$jscomp$0)) throw ReactError(Error("EventPluginHub: More than one plugin attempted to publish the same event name, `" + eventName$jscomp$0 + "`."));
eventNameDispatchConfigs[eventName$jscomp$0] = dispatchConfig;
var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames;
if (phasedRegistrationNames) {
for (JSCompiler_inline_result in phasedRegistrationNames) {
phasedRegistrationNames.hasOwnProperty(JSCompiler_inline_result) && publishRegistrationName(phasedRegistrationNames[JSCompiler_inline_result], pluginModule$jscomp$0, eventName$jscomp$0);
}
JSCompiler_inline_result = true;
} else dispatchConfig.registrationName ? (publishRegistrationName(dispatchConfig.registrationName, pluginModule$jscomp$0, eventName$jscomp$0), JSCompiler_inline_result = true) : JSCompiler_inline_result = false;
if (!JSCompiler_inline_result) throw ReactError(Error("EventPluginRegistry: Failed to publish event `" + eventName + "` for plugin `" + pluginName + "`."));
}
}
}
}
function publishRegistrationName(registrationName, pluginModule) {
if (registrationNameModules[registrationName]) throw ReactError(Error("EventPluginHub: More than one plugin attempted to publish the same registration name, `" + registrationName + "`."));
registrationNameModules[registrationName] = pluginModule;
}
var plugins = [],
eventNameDispatchConfigs = {},
registrationNameModules = {};
function invokeGuardedCallbackImpl(name, func, context, a, b, c, d, e, f) {
var funcArgs = Array.prototype.slice.call(arguments, 3);
try {
func.apply(context, funcArgs);
} catch (error) {
this.onError(error);
}
}
var hasError = false,
caughtError = null,
hasRethrowError = false,
rethrowError = null,
reporter = {
onError: function onError(error) {
hasError = true;
caughtError = e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment