PromoCursed/node_modules/.cache/babel-loader/d4d279ad13d40bfe50b42d14034459dcf72f9b85afbaf08e1586b3f2f5474ff2.json
2024-08-20 23:25:37 +04:00

1 line
73 KiB
JSON

{"ast":null,"code":"import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _regeneratorRuntime from \"@babel/runtime/helpers/esm/regeneratorRuntime\";\nimport _asyncToGenerator from \"@babel/runtime/helpers/esm/asyncToGenerator\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nvar _excluded = [\"name\"];\nimport toChildrenArray from \"rc-util/es/Children/toArray\";\nimport isEqual from \"rc-util/es/isEqual\";\nimport warning from \"rc-util/es/warning\";\nimport * as React from 'react';\nimport FieldContext, { HOOK_MARK } from \"./FieldContext\";\nimport ListContext from \"./ListContext\";\nimport { toArray } from \"./utils/typeUtil\";\nimport { validateRules } from \"./utils/validateUtil\";\nimport { containsNamePath, defaultGetValueFromEvent, getNamePath, getValue } from \"./utils/valueUtil\";\nvar EMPTY_ERRORS = [];\nfunction requireUpdate(shouldUpdate, prev, next, prevValue, nextValue, info) {\n if (typeof shouldUpdate === 'function') {\n return shouldUpdate(prev, next, 'source' in info ? {\n source: info.source\n } : {});\n }\n return prevValue !== nextValue;\n}\n\n// eslint-disable-next-line @typescript-eslint/consistent-indexed-object-style\n// We use Class instead of Hooks here since it will cost much code by using Hooks.\nvar Field = /*#__PURE__*/function (_React$Component) {\n _inherits(Field, _React$Component);\n var _super = _createSuper(Field);\n // ============================== Subscriptions ==============================\n function Field(props) {\n var _this;\n _classCallCheck(this, Field);\n _this = _super.call(this, props);\n\n // Register on init\n _defineProperty(_assertThisInitialized(_this), \"state\", {\n resetCount: 0\n });\n _defineProperty(_assertThisInitialized(_this), \"cancelRegisterFunc\", null);\n _defineProperty(_assertThisInitialized(_this), \"mounted\", false);\n /**\n * Follow state should not management in State since it will async update by React.\n * This makes first render of form can not get correct state value.\n */\n _defineProperty(_assertThisInitialized(_this), \"touched\", false);\n /**\n * Mark when touched & validated. Currently only used for `dependencies`.\n * Note that we do not think field with `initialValue` is dirty\n * but this will be by `isFieldDirty` func.\n */\n _defineProperty(_assertThisInitialized(_this), \"dirty\", false);\n _defineProperty(_assertThisInitialized(_this), \"validatePromise\", void 0);\n _defineProperty(_assertThisInitialized(_this), \"prevValidating\", void 0);\n _defineProperty(_assertThisInitialized(_this), \"errors\", EMPTY_ERRORS);\n _defineProperty(_assertThisInitialized(_this), \"warnings\", EMPTY_ERRORS);\n _defineProperty(_assertThisInitialized(_this), \"cancelRegister\", function () {\n var _this$props = _this.props,\n preserve = _this$props.preserve,\n isListField = _this$props.isListField,\n name = _this$props.name;\n if (_this.cancelRegisterFunc) {\n _this.cancelRegisterFunc(isListField, preserve, getNamePath(name));\n }\n _this.cancelRegisterFunc = null;\n });\n // ================================== Utils ==================================\n _defineProperty(_assertThisInitialized(_this), \"getNamePath\", function () {\n var _this$props2 = _this.props,\n name = _this$props2.name,\n fieldContext = _this$props2.fieldContext;\n var _fieldContext$prefixN = fieldContext.prefixName,\n prefixName = _fieldContext$prefixN === void 0 ? [] : _fieldContext$prefixN;\n return name !== undefined ? [].concat(_toConsumableArray(prefixName), _toConsumableArray(name)) : [];\n });\n _defineProperty(_assertThisInitialized(_this), \"getRules\", function () {\n var _this$props3 = _this.props,\n _this$props3$rules = _this$props3.rules,\n rules = _this$props3$rules === void 0 ? [] : _this$props3$rules,\n fieldContext = _this$props3.fieldContext;\n return rules.map(function (rule) {\n if (typeof rule === 'function') {\n return rule(fieldContext);\n }\n return rule;\n });\n });\n _defineProperty(_assertThisInitialized(_this), \"refresh\", function () {\n if (!_this.mounted) return;\n\n /**\n * Clean up current node.\n */\n _this.setState(function (_ref) {\n var resetCount = _ref.resetCount;\n return {\n resetCount: resetCount + 1\n };\n });\n });\n // Event should only trigger when meta changed\n _defineProperty(_assertThisInitialized(_this), \"metaCache\", null);\n _defineProperty(_assertThisInitialized(_this), \"triggerMetaEvent\", function (destroy) {\n var onMetaChange = _this.props.onMetaChange;\n if (onMetaChange) {\n var _meta = _objectSpread(_objectSpread({}, _this.getMeta()), {}, {\n destroy: destroy\n });\n if (!isEqual(_this.metaCache, _meta)) {\n onMetaChange(_meta);\n }\n _this.metaCache = _meta;\n } else {\n _this.metaCache = null;\n }\n });\n // ========================= Field Entity Interfaces =========================\n // Trigger by store update. Check if need update the component\n _defineProperty(_assertThisInitialized(_this), \"onStoreChange\", function (prevStore, namePathList, info) {\n var _this$props4 = _this.props,\n shouldUpdate = _this$props4.shouldUpdate,\n _this$props4$dependen = _this$props4.dependencies,\n dependencies = _this$props4$dependen === void 0 ? [] : _this$props4$dependen,\n onReset = _this$props4.onReset;\n var store = info.store;\n var namePath = _this.getNamePath();\n var prevValue = _this.getValue(prevStore);\n var curValue = _this.getValue(store);\n var namePathMatch = namePathList && containsNamePath(namePathList, namePath);\n\n // `setFieldsValue` is a quick access to update related status\n if (info.type === 'valueUpdate' && info.source === 'external' && !isEqual(prevValue, curValue)) {\n _this.touched = true;\n _this.dirty = true;\n _this.validatePromise = null;\n _this.errors = EMPTY_ERRORS;\n _this.warnings = EMPTY_ERRORS;\n _this.triggerMetaEvent();\n }\n switch (info.type) {\n case 'reset':\n if (!namePathList || namePathMatch) {\n // Clean up state\n _this.touched = false;\n _this.dirty = false;\n _this.validatePromise = undefined;\n _this.errors = EMPTY_ERRORS;\n _this.warnings = EMPTY_ERRORS;\n _this.triggerMetaEvent();\n onReset === null || onReset === void 0 || onReset();\n _this.refresh();\n return;\n }\n break;\n\n /**\n * In case field with `preserve = false` nest deps like:\n * - A = 1 => show B\n * - B = 1 => show C\n * - Reset A, need clean B, C\n */\n case 'remove':\n {\n if (shouldUpdate && requireUpdate(shouldUpdate, prevStore, store, prevValue, curValue, info)) {\n _this.reRender();\n return;\n }\n break;\n }\n case 'setField':\n {\n var data = info.data;\n if (namePathMatch) {\n if ('touched' in data) {\n _this.touched = data.touched;\n }\n if ('validating' in data && !('originRCField' in data)) {\n _this.validatePromise = data.validating ? Promise.resolve([]) : null;\n }\n if ('errors' in data) {\n _this.errors = data.errors || EMPTY_ERRORS;\n }\n if ('warnings' in data) {\n _this.warnings = data.warnings || EMPTY_ERRORS;\n }\n _this.dirty = true;\n _this.triggerMetaEvent();\n _this.reRender();\n return;\n } else if ('value' in data && containsNamePath(namePathList, namePath, true)) {\n // Contains path with value should also check\n _this.reRender();\n return;\n }\n\n // Handle update by `setField` with `shouldUpdate`\n if (shouldUpdate && !namePath.length && requireUpdate(shouldUpdate, prevStore, store, prevValue, curValue, info)) {\n _this.reRender();\n return;\n }\n break;\n }\n case 'dependenciesUpdate':\n {\n /**\n * Trigger when marked `dependencies` updated. Related fields will all update\n */\n var dependencyList = dependencies.map(getNamePath);\n // No need for `namePathMath` check and `shouldUpdate` check, since `valueUpdate` will be\n // emitted earlier and they will work there\n // If set it may cause unnecessary twice rerendering\n if (dependencyList.some(function (dependency) {\n return containsNamePath(info.relatedFields, dependency);\n })) {\n _this.reRender();\n return;\n }\n break;\n }\n default:\n // 1. If `namePath` exists in `namePathList`, means it's related value and should update\n // For example <List name=\"list\"><Field name={['list', 0]}></List>\n // If `namePathList` is [['list']] (List value update), Field should be updated\n // If `namePathList` is [['list', 0]] (Field value update), List shouldn't be updated\n // 2.\n // 2.1 If `dependencies` is set, `name` is not set and `shouldUpdate` is not set,\n // don't use `shouldUpdate`. `dependencies` is view as a shortcut if `shouldUpdate`\n // is not provided\n // 2.2 If `shouldUpdate` provided, use customize logic to update the field\n // else to check if value changed\n if (namePathMatch || (!dependencies.length || namePath.length || shouldUpdate) && requireUpdate(shouldUpdate, prevStore, store, prevValue, curValue, info)) {\n _this.reRender();\n return;\n }\n break;\n }\n if (shouldUpdate === true) {\n _this.reRender();\n }\n });\n _defineProperty(_assertThisInitialized(_this), \"validateRules\", function (options) {\n // We should fixed namePath & value to avoid developer change then by form function\n var namePath = _this.getNamePath();\n var currentValue = _this.getValue();\n var _ref2 = options || {},\n triggerName = _ref2.triggerName,\n _ref2$validateOnly = _ref2.validateOnly,\n validateOnly = _ref2$validateOnly === void 0 ? false : _ref2$validateOnly;\n\n // Force change to async to avoid rule OOD under renderProps field\n var rootPromise = Promise.resolve().then( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {\n var _this$props5, _this$props5$validate, validateFirst, messageVariables, validateDebounce, filteredRules, promise;\n return _regeneratorRuntime().wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n if (_this.mounted) {\n _context.next = 2;\n break;\n }\n return _context.abrupt(\"return\", []);\n case 2:\n _this$props5 = _this.props, _this$props5$validate = _this$props5.validateFirst, validateFirst = _this$props5$validate === void 0 ? false : _this$props5$validate, messageVariables = _this$props5.messageVariables, validateDebounce = _this$props5.validateDebounce; // Start validate\n filteredRules = _this.getRules();\n if (triggerName) {\n filteredRules = filteredRules.filter(function (rule) {\n return rule;\n }).filter(function (rule) {\n var validateTrigger = rule.validateTrigger;\n if (!validateTrigger) {\n return true;\n }\n var triggerList = toArray(validateTrigger);\n return triggerList.includes(triggerName);\n });\n }\n\n // Wait for debounce. Skip if no `triggerName` since its from `validateFields / submit`\n if (!(validateDebounce && triggerName)) {\n _context.next = 10;\n break;\n }\n _context.next = 8;\n return new Promise(function (resolve) {\n setTimeout(resolve, validateDebounce);\n });\n case 8:\n if (!(_this.validatePromise !== rootPromise)) {\n _context.next = 10;\n break;\n }\n return _context.abrupt(\"return\", []);\n case 10:\n promise = validateRules(namePath, currentValue, filteredRules, options, validateFirst, messageVariables);\n promise.catch(function (e) {\n return e;\n }).then(function () {\n var ruleErrors = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : EMPTY_ERRORS;\n if (_this.validatePromise === rootPromise) {\n var _ruleErrors$forEach;\n _this.validatePromise = null;\n\n // Get errors & warnings\n var nextErrors = [];\n var nextWarnings = [];\n (_ruleErrors$forEach = ruleErrors.forEach) === null || _ruleErrors$forEach === void 0 || _ruleErrors$forEach.call(ruleErrors, function (_ref4) {\n var warningOnly = _ref4.rule.warningOnly,\n _ref4$errors = _ref4.errors,\n errors = _ref4$errors === void 0 ? EMPTY_ERRORS : _ref4$errors;\n if (warningOnly) {\n nextWarnings.push.apply(nextWarnings, _toConsumableArray(errors));\n } else {\n nextErrors.push.apply(nextErrors, _toConsumableArray(errors));\n }\n });\n _this.errors = nextErrors;\n _this.warnings = nextWarnings;\n _this.triggerMetaEvent();\n _this.reRender();\n }\n });\n return _context.abrupt(\"return\", promise);\n case 13:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n })));\n if (validateOnly) {\n return rootPromise;\n }\n _this.validatePromise = rootPromise;\n _this.dirty = true;\n _this.errors = EMPTY_ERRORS;\n _this.warnings = EMPTY_ERRORS;\n _this.triggerMetaEvent();\n\n // Force trigger re-render since we need sync renderProps with new meta\n _this.reRender();\n return rootPromise;\n });\n _defineProperty(_assertThisInitialized(_this), \"isFieldValidating\", function () {\n return !!_this.validatePromise;\n });\n _defineProperty(_assertThisInitialized(_this), \"isFieldTouched\", function () {\n return _this.touched;\n });\n _defineProperty(_assertThisInitialized(_this), \"isFieldDirty\", function () {\n // Touched or validate or has initialValue\n if (_this.dirty || _this.props.initialValue !== undefined) {\n return true;\n }\n\n // Form set initialValue\n var fieldContext = _this.props.fieldContext;\n var _fieldContext$getInte = fieldContext.getInternalHooks(HOOK_MARK),\n getInitialValue = _fieldContext$getInte.getInitialValue;\n if (getInitialValue(_this.getNamePath()) !== undefined) {\n return true;\n }\n return false;\n });\n _defineProperty(_assertThisInitialized(_this), \"getErrors\", function () {\n return _this.errors;\n });\n _defineProperty(_assertThisInitialized(_this), \"getWarnings\", function () {\n return _this.warnings;\n });\n _defineProperty(_assertThisInitialized(_this), \"isListField\", function () {\n return _this.props.isListField;\n });\n _defineProperty(_assertThisInitialized(_this), \"isList\", function () {\n return _this.props.isList;\n });\n _defineProperty(_assertThisInitialized(_this), \"isPreserve\", function () {\n return _this.props.preserve;\n });\n // ============================= Child Component =============================\n _defineProperty(_assertThisInitialized(_this), \"getMeta\", function () {\n // Make error & validating in cache to save perf\n _this.prevValidating = _this.isFieldValidating();\n var meta = {\n touched: _this.isFieldTouched(),\n validating: _this.prevValidating,\n errors: _this.errors,\n warnings: _this.warnings,\n name: _this.getNamePath(),\n validated: _this.validatePromise === null\n };\n return meta;\n });\n // Only return validate child node. If invalidate, will do nothing about field.\n _defineProperty(_assertThisInitialized(_this), \"getOnlyChild\", function (children) {\n // Support render props\n if (typeof children === 'function') {\n var _meta2 = _this.getMeta();\n return _objectSpread(_objectSpread({}, _this.getOnlyChild(children(_this.getControlled(), _meta2, _this.props.fieldContext))), {}, {\n isFunction: true\n });\n }\n\n // Filed element only\n var childList = toChildrenArray(children);\n if (childList.length !== 1 || ! /*#__PURE__*/React.isValidElement(childList[0])) {\n return {\n child: childList,\n isFunction: false\n };\n }\n return {\n child: childList[0],\n isFunction: false\n };\n });\n // ============================== Field Control ==============================\n _defineProperty(_assertThisInitialized(_this), \"getValue\", function (store) {\n var getFieldsValue = _this.props.fieldContext.getFieldsValue;\n var namePath = _this.getNamePath();\n return getValue(store || getFieldsValue(true), namePath);\n });\n _defineProperty(_assertThisInitialized(_this), \"getControlled\", function () {\n var childProps = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var _this$props6 = _this.props,\n name = _this$props6.name,\n trigger = _this$props6.trigger,\n validateTrigger = _this$props6.validateTrigger,\n getValueFromEvent = _this$props6.getValueFromEvent,\n normalize = _this$props6.normalize,\n valuePropName = _this$props6.valuePropName,\n getValueProps = _this$props6.getValueProps,\n fieldContext = _this$props6.fieldContext;\n var mergedValidateTrigger = validateTrigger !== undefined ? validateTrigger : fieldContext.validateTrigger;\n var namePath = _this.getNamePath();\n var getInternalHooks = fieldContext.getInternalHooks,\n getFieldsValue = fieldContext.getFieldsValue;\n var _getInternalHooks = getInternalHooks(HOOK_MARK),\n dispatch = _getInternalHooks.dispatch;\n var value = _this.getValue();\n var mergedGetValueProps = getValueProps || function (val) {\n return _defineProperty({}, valuePropName, val);\n };\n var originTriggerFunc = childProps[trigger];\n var valueProps = name !== undefined ? mergedGetValueProps(value) : {};\n\n // warning when prop value is function\n if (process.env.NODE_ENV !== 'production' && valueProps) {\n Object.keys(valueProps).forEach(function (key) {\n warning(typeof valueProps[key] !== 'function', \"It's not recommended to generate dynamic function prop by `getValueProps`. Please pass it to child component directly (prop: \".concat(key, \")\"));\n });\n }\n var control = _objectSpread(_objectSpread({}, childProps), valueProps);\n\n // Add trigger\n control[trigger] = function () {\n // Mark as touched\n _this.touched = true;\n _this.dirty = true;\n _this.triggerMetaEvent();\n var newValue;\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n if (getValueFromEvent) {\n newValue = getValueFromEvent.apply(void 0, args);\n } else {\n newValue = defaultGetValueFromEvent.apply(void 0, [valuePropName].concat(args));\n }\n if (normalize) {\n newValue = normalize(newValue, value, getFieldsValue(true));\n }\n dispatch({\n type: 'updateValue',\n namePath: namePath,\n value: newValue\n });\n if (originTriggerFunc) {\n originTriggerFunc.apply(void 0, args);\n }\n };\n\n // Add validateTrigger\n var validateTriggerList = toArray(mergedValidateTrigger || []);\n validateTriggerList.forEach(function (triggerName) {\n // Wrap additional function of component, so that we can get latest value from store\n var originTrigger = control[triggerName];\n control[triggerName] = function () {\n if (originTrigger) {\n originTrigger.apply(void 0, arguments);\n }\n\n // Always use latest rules\n var rules = _this.props.rules;\n if (rules && rules.length) {\n // We dispatch validate to root,\n // since it will update related data with other field with same name\n dispatch({\n type: 'validateField',\n namePath: namePath,\n triggerName: triggerName\n });\n }\n };\n });\n return control;\n });\n if (props.fieldContext) {\n var getInternalHooks = props.fieldContext.getInternalHooks;\n var _getInternalHooks2 = getInternalHooks(HOOK_MARK),\n initEntityValue = _getInternalHooks2.initEntityValue;\n initEntityValue(_assertThisInitialized(_this));\n }\n return _this;\n }\n _createClass(Field, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n var _this$props7 = this.props,\n shouldUpdate = _this$props7.shouldUpdate,\n fieldContext = _this$props7.fieldContext;\n this.mounted = true;\n\n // Register on init\n if (fieldContext) {\n var getInternalHooks = fieldContext.getInternalHooks;\n var _getInternalHooks3 = getInternalHooks(HOOK_MARK),\n registerField = _getInternalHooks3.registerField;\n this.cancelRegisterFunc = registerField(this);\n }\n\n // One more render for component in case fields not ready\n if (shouldUpdate === true) {\n this.reRender();\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.cancelRegister();\n this.triggerMetaEvent(true);\n this.mounted = false;\n }\n }, {\n key: \"reRender\",\n value: function reRender() {\n if (!this.mounted) return;\n this.forceUpdate();\n }\n }, {\n key: \"render\",\n value: function render() {\n var resetCount = this.state.resetCount;\n var children = this.props.children;\n var _this$getOnlyChild = this.getOnlyChild(children),\n child = _this$getOnlyChild.child,\n isFunction = _this$getOnlyChild.isFunction;\n\n // Not need to `cloneElement` since user can handle this in render function self\n var returnChildNode;\n if (isFunction) {\n returnChildNode = child;\n } else if ( /*#__PURE__*/React.isValidElement(child)) {\n returnChildNode = /*#__PURE__*/React.cloneElement(child, this.getControlled(child.props));\n } else {\n warning(!child, '`children` of Field is not validate ReactElement.');\n returnChildNode = child;\n }\n return /*#__PURE__*/React.createElement(React.Fragment, {\n key: resetCount\n }, returnChildNode);\n }\n }]);\n return Field;\n}(React.Component);\n_defineProperty(Field, \"contextType\", FieldContext);\n_defineProperty(Field, \"defaultProps\", {\n trigger: 'onChange',\n valuePropName: 'value'\n});\nfunction WrapperField(_ref6) {\n var name = _ref6.name,\n restProps = _objectWithoutProperties(_ref6, _excluded);\n var fieldContext = React.useContext(FieldContext);\n var listContext = React.useContext(ListContext);\n var namePath = name !== undefined ? getNamePath(name) : undefined;\n var key = 'keep';\n if (!restProps.isListField) {\n key = \"_\".concat((namePath || []).join('_'));\n }\n\n // Warning if it's a directly list field.\n // We can still support multiple level field preserve.\n if (process.env.NODE_ENV !== 'production' && restProps.preserve === false && restProps.isListField && namePath.length <= 1) {\n warning(false, '`preserve` should not apply on Form.List fields.');\n }\n return /*#__PURE__*/React.createElement(Field, _extends({\n key: key,\n name: namePath,\n isListField: !!listContext\n }, restProps, {\n fieldContext: fieldContext\n }));\n}\nexport default WrapperField;","map":{"version":3,"names":["_extends","_objectWithoutProperties","_regeneratorRuntime","_asyncToGenerator","_objectSpread","_toConsumableArray","_classCallCheck","_createClass","_assertThisInitialized","_inherits","_createSuper","_defineProperty","_excluded","toChildrenArray","isEqual","warning","React","FieldContext","HOOK_MARK","ListContext","toArray","validateRules","containsNamePath","defaultGetValueFromEvent","getNamePath","getValue","EMPTY_ERRORS","requireUpdate","shouldUpdate","prev","next","prevValue","nextValue","info","source","Field","_React$Component","_super","props","_this","call","resetCount","_this$props","preserve","isListField","name","cancelRegisterFunc","_this$props2","fieldContext","_fieldContext$prefixN","prefixName","undefined","concat","_this$props3","_this$props3$rules","rules","map","rule","mounted","setState","_ref","destroy","onMetaChange","_meta","getMeta","metaCache","prevStore","namePathList","_this$props4","_this$props4$dependen","dependencies","onReset","store","namePath","curValue","namePathMatch","type","touched","dirty","validatePromise","errors","warnings","triggerMetaEvent","refresh","reRender","data","validating","Promise","resolve","length","dependencyList","some","dependency","relatedFields","options","currentValue","_ref2","triggerName","_ref2$validateOnly","validateOnly","rootPromise","then","mark","_callee","_this$props5","_this$props5$validate","validateFirst","messageVariables","validateDebounce","filteredRules","promise","wrap","_callee$","_context","abrupt","getRules","filter","validateTrigger","triggerList","includes","setTimeout","catch","e","ruleErrors","arguments","_ruleErrors$forEach","nextErrors","nextWarnings","forEach","_ref4","warningOnly","_ref4$errors","push","apply","stop","initialValue","_fieldContext$getInte","getInternalHooks","getInitialValue","isList","prevValidating","isFieldValidating","meta","isFieldTouched","validated","children","_meta2","getOnlyChild","getControlled","isFunction","childList","isValidElement","child","getFieldsValue","childProps","_this$props6","trigger","getValueFromEvent","normalize","valuePropName","getValueProps","mergedValidateTrigger","_getInternalHooks","dispatch","value","mergedGetValueProps","val","originTriggerFunc","valueProps","process","env","NODE_ENV","Object","keys","key","control","newValue","_len","args","Array","_key","validateTriggerList","originTrigger","_getInternalHooks2","initEntityValue","componentDidMount","_this$props7","_getInternalHooks3","registerField","componentWillUnmount","cancelRegister","forceUpdate","render","state","_this$getOnlyChild","returnChildNode","cloneElement","createElement","Fragment","Component","WrapperField","_ref6","restProps","useContext","listContext","join"],"sources":["C:/Users/Аришина)/source/repos/PromoCursed/node_modules/rc-field-form/es/Field.js"],"sourcesContent":["import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _regeneratorRuntime from \"@babel/runtime/helpers/esm/regeneratorRuntime\";\nimport _asyncToGenerator from \"@babel/runtime/helpers/esm/asyncToGenerator\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nvar _excluded = [\"name\"];\nimport toChildrenArray from \"rc-util/es/Children/toArray\";\nimport isEqual from \"rc-util/es/isEqual\";\nimport warning from \"rc-util/es/warning\";\nimport * as React from 'react';\nimport FieldContext, { HOOK_MARK } from \"./FieldContext\";\nimport ListContext from \"./ListContext\";\nimport { toArray } from \"./utils/typeUtil\";\nimport { validateRules } from \"./utils/validateUtil\";\nimport { containsNamePath, defaultGetValueFromEvent, getNamePath, getValue } from \"./utils/valueUtil\";\nvar EMPTY_ERRORS = [];\nfunction requireUpdate(shouldUpdate, prev, next, prevValue, nextValue, info) {\n if (typeof shouldUpdate === 'function') {\n return shouldUpdate(prev, next, 'source' in info ? {\n source: info.source\n } : {});\n }\n return prevValue !== nextValue;\n}\n\n// eslint-disable-next-line @typescript-eslint/consistent-indexed-object-style\n// We use Class instead of Hooks here since it will cost much code by using Hooks.\nvar Field = /*#__PURE__*/function (_React$Component) {\n _inherits(Field, _React$Component);\n var _super = _createSuper(Field);\n // ============================== Subscriptions ==============================\n function Field(props) {\n var _this;\n _classCallCheck(this, Field);\n _this = _super.call(this, props);\n\n // Register on init\n _defineProperty(_assertThisInitialized(_this), \"state\", {\n resetCount: 0\n });\n _defineProperty(_assertThisInitialized(_this), \"cancelRegisterFunc\", null);\n _defineProperty(_assertThisInitialized(_this), \"mounted\", false);\n /**\n * Follow state should not management in State since it will async update by React.\n * This makes first render of form can not get correct state value.\n */\n _defineProperty(_assertThisInitialized(_this), \"touched\", false);\n /**\n * Mark when touched & validated. Currently only used for `dependencies`.\n * Note that we do not think field with `initialValue` is dirty\n * but this will be by `isFieldDirty` func.\n */\n _defineProperty(_assertThisInitialized(_this), \"dirty\", false);\n _defineProperty(_assertThisInitialized(_this), \"validatePromise\", void 0);\n _defineProperty(_assertThisInitialized(_this), \"prevValidating\", void 0);\n _defineProperty(_assertThisInitialized(_this), \"errors\", EMPTY_ERRORS);\n _defineProperty(_assertThisInitialized(_this), \"warnings\", EMPTY_ERRORS);\n _defineProperty(_assertThisInitialized(_this), \"cancelRegister\", function () {\n var _this$props = _this.props,\n preserve = _this$props.preserve,\n isListField = _this$props.isListField,\n name = _this$props.name;\n if (_this.cancelRegisterFunc) {\n _this.cancelRegisterFunc(isListField, preserve, getNamePath(name));\n }\n _this.cancelRegisterFunc = null;\n });\n // ================================== Utils ==================================\n _defineProperty(_assertThisInitialized(_this), \"getNamePath\", function () {\n var _this$props2 = _this.props,\n name = _this$props2.name,\n fieldContext = _this$props2.fieldContext;\n var _fieldContext$prefixN = fieldContext.prefixName,\n prefixName = _fieldContext$prefixN === void 0 ? [] : _fieldContext$prefixN;\n return name !== undefined ? [].concat(_toConsumableArray(prefixName), _toConsumableArray(name)) : [];\n });\n _defineProperty(_assertThisInitialized(_this), \"getRules\", function () {\n var _this$props3 = _this.props,\n _this$props3$rules = _this$props3.rules,\n rules = _this$props3$rules === void 0 ? [] : _this$props3$rules,\n fieldContext = _this$props3.fieldContext;\n return rules.map(function (rule) {\n if (typeof rule === 'function') {\n return rule(fieldContext);\n }\n return rule;\n });\n });\n _defineProperty(_assertThisInitialized(_this), \"refresh\", function () {\n if (!_this.mounted) return;\n\n /**\n * Clean up current node.\n */\n _this.setState(function (_ref) {\n var resetCount = _ref.resetCount;\n return {\n resetCount: resetCount + 1\n };\n });\n });\n // Event should only trigger when meta changed\n _defineProperty(_assertThisInitialized(_this), \"metaCache\", null);\n _defineProperty(_assertThisInitialized(_this), \"triggerMetaEvent\", function (destroy) {\n var onMetaChange = _this.props.onMetaChange;\n if (onMetaChange) {\n var _meta = _objectSpread(_objectSpread({}, _this.getMeta()), {}, {\n destroy: destroy\n });\n if (!isEqual(_this.metaCache, _meta)) {\n onMetaChange(_meta);\n }\n _this.metaCache = _meta;\n } else {\n _this.metaCache = null;\n }\n });\n // ========================= Field Entity Interfaces =========================\n // Trigger by store update. Check if need update the component\n _defineProperty(_assertThisInitialized(_this), \"onStoreChange\", function (prevStore, namePathList, info) {\n var _this$props4 = _this.props,\n shouldUpdate = _this$props4.shouldUpdate,\n _this$props4$dependen = _this$props4.dependencies,\n dependencies = _this$props4$dependen === void 0 ? [] : _this$props4$dependen,\n onReset = _this$props4.onReset;\n var store = info.store;\n var namePath = _this.getNamePath();\n var prevValue = _this.getValue(prevStore);\n var curValue = _this.getValue(store);\n var namePathMatch = namePathList && containsNamePath(namePathList, namePath);\n\n // `setFieldsValue` is a quick access to update related status\n if (info.type === 'valueUpdate' && info.source === 'external' && !isEqual(prevValue, curValue)) {\n _this.touched = true;\n _this.dirty = true;\n _this.validatePromise = null;\n _this.errors = EMPTY_ERRORS;\n _this.warnings = EMPTY_ERRORS;\n _this.triggerMetaEvent();\n }\n switch (info.type) {\n case 'reset':\n if (!namePathList || namePathMatch) {\n // Clean up state\n _this.touched = false;\n _this.dirty = false;\n _this.validatePromise = undefined;\n _this.errors = EMPTY_ERRORS;\n _this.warnings = EMPTY_ERRORS;\n _this.triggerMetaEvent();\n onReset === null || onReset === void 0 || onReset();\n _this.refresh();\n return;\n }\n break;\n\n /**\n * In case field with `preserve = false` nest deps like:\n * - A = 1 => show B\n * - B = 1 => show C\n * - Reset A, need clean B, C\n */\n case 'remove':\n {\n if (shouldUpdate && requireUpdate(shouldUpdate, prevStore, store, prevValue, curValue, info)) {\n _this.reRender();\n return;\n }\n break;\n }\n case 'setField':\n {\n var data = info.data;\n if (namePathMatch) {\n if ('touched' in data) {\n _this.touched = data.touched;\n }\n if ('validating' in data && !('originRCField' in data)) {\n _this.validatePromise = data.validating ? Promise.resolve([]) : null;\n }\n if ('errors' in data) {\n _this.errors = data.errors || EMPTY_ERRORS;\n }\n if ('warnings' in data) {\n _this.warnings = data.warnings || EMPTY_ERRORS;\n }\n _this.dirty = true;\n _this.triggerMetaEvent();\n _this.reRender();\n return;\n } else if ('value' in data && containsNamePath(namePathList, namePath, true)) {\n // Contains path with value should also check\n _this.reRender();\n return;\n }\n\n // Handle update by `setField` with `shouldUpdate`\n if (shouldUpdate && !namePath.length && requireUpdate(shouldUpdate, prevStore, store, prevValue, curValue, info)) {\n _this.reRender();\n return;\n }\n break;\n }\n case 'dependenciesUpdate':\n {\n /**\n * Trigger when marked `dependencies` updated. Related fields will all update\n */\n var dependencyList = dependencies.map(getNamePath);\n // No need for `namePathMath` check and `shouldUpdate` check, since `valueUpdate` will be\n // emitted earlier and they will work there\n // If set it may cause unnecessary twice rerendering\n if (dependencyList.some(function (dependency) {\n return containsNamePath(info.relatedFields, dependency);\n })) {\n _this.reRender();\n return;\n }\n break;\n }\n default:\n // 1. If `namePath` exists in `namePathList`, means it's related value and should update\n // For example <List name=\"list\"><Field name={['list', 0]}></List>\n // If `namePathList` is [['list']] (List value update), Field should be updated\n // If `namePathList` is [['list', 0]] (Field value update), List shouldn't be updated\n // 2.\n // 2.1 If `dependencies` is set, `name` is not set and `shouldUpdate` is not set,\n // don't use `shouldUpdate`. `dependencies` is view as a shortcut if `shouldUpdate`\n // is not provided\n // 2.2 If `shouldUpdate` provided, use customize logic to update the field\n // else to check if value changed\n if (namePathMatch || (!dependencies.length || namePath.length || shouldUpdate) && requireUpdate(shouldUpdate, prevStore, store, prevValue, curValue, info)) {\n _this.reRender();\n return;\n }\n break;\n }\n if (shouldUpdate === true) {\n _this.reRender();\n }\n });\n _defineProperty(_assertThisInitialized(_this), \"validateRules\", function (options) {\n // We should fixed namePath & value to avoid developer change then by form function\n var namePath = _this.getNamePath();\n var currentValue = _this.getValue();\n var _ref2 = options || {},\n triggerName = _ref2.triggerName,\n _ref2$validateOnly = _ref2.validateOnly,\n validateOnly = _ref2$validateOnly === void 0 ? false : _ref2$validateOnly;\n\n // Force change to async to avoid rule OOD under renderProps field\n var rootPromise = Promise.resolve().then( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {\n var _this$props5, _this$props5$validate, validateFirst, messageVariables, validateDebounce, filteredRules, promise;\n return _regeneratorRuntime().wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n if (_this.mounted) {\n _context.next = 2;\n break;\n }\n return _context.abrupt(\"return\", []);\n case 2:\n _this$props5 = _this.props, _this$props5$validate = _this$props5.validateFirst, validateFirst = _this$props5$validate === void 0 ? false : _this$props5$validate, messageVariables = _this$props5.messageVariables, validateDebounce = _this$props5.validateDebounce; // Start validate\n filteredRules = _this.getRules();\n if (triggerName) {\n filteredRules = filteredRules.filter(function (rule) {\n return rule;\n }).filter(function (rule) {\n var validateTrigger = rule.validateTrigger;\n if (!validateTrigger) {\n return true;\n }\n var triggerList = toArray(validateTrigger);\n return triggerList.includes(triggerName);\n });\n }\n\n // Wait for debounce. Skip if no `triggerName` since its from `validateFields / submit`\n if (!(validateDebounce && triggerName)) {\n _context.next = 10;\n break;\n }\n _context.next = 8;\n return new Promise(function (resolve) {\n setTimeout(resolve, validateDebounce);\n });\n case 8:\n if (!(_this.validatePromise !== rootPromise)) {\n _context.next = 10;\n break;\n }\n return _context.abrupt(\"return\", []);\n case 10:\n promise = validateRules(namePath, currentValue, filteredRules, options, validateFirst, messageVariables);\n promise.catch(function (e) {\n return e;\n }).then(function () {\n var ruleErrors = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : EMPTY_ERRORS;\n if (_this.validatePromise === rootPromise) {\n var _ruleErrors$forEach;\n _this.validatePromise = null;\n\n // Get errors & warnings\n var nextErrors = [];\n var nextWarnings = [];\n (_ruleErrors$forEach = ruleErrors.forEach) === null || _ruleErrors$forEach === void 0 || _ruleErrors$forEach.call(ruleErrors, function (_ref4) {\n var warningOnly = _ref4.rule.warningOnly,\n _ref4$errors = _ref4.errors,\n errors = _ref4$errors === void 0 ? EMPTY_ERRORS : _ref4$errors;\n if (warningOnly) {\n nextWarnings.push.apply(nextWarnings, _toConsumableArray(errors));\n } else {\n nextErrors.push.apply(nextErrors, _toConsumableArray(errors));\n }\n });\n _this.errors = nextErrors;\n _this.warnings = nextWarnings;\n _this.triggerMetaEvent();\n _this.reRender();\n }\n });\n return _context.abrupt(\"return\", promise);\n case 13:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n })));\n if (validateOnly) {\n return rootPromise;\n }\n _this.validatePromise = rootPromise;\n _this.dirty = true;\n _this.errors = EMPTY_ERRORS;\n _this.warnings = EMPTY_ERRORS;\n _this.triggerMetaEvent();\n\n // Force trigger re-render since we need sync renderProps with new meta\n _this.reRender();\n return rootPromise;\n });\n _defineProperty(_assertThisInitialized(_this), \"isFieldValidating\", function () {\n return !!_this.validatePromise;\n });\n _defineProperty(_assertThisInitialized(_this), \"isFieldTouched\", function () {\n return _this.touched;\n });\n _defineProperty(_assertThisInitialized(_this), \"isFieldDirty\", function () {\n // Touched or validate or has initialValue\n if (_this.dirty || _this.props.initialValue !== undefined) {\n return true;\n }\n\n // Form set initialValue\n var fieldContext = _this.props.fieldContext;\n var _fieldContext$getInte = fieldContext.getInternalHooks(HOOK_MARK),\n getInitialValue = _fieldContext$getInte.getInitialValue;\n if (getInitialValue(_this.getNamePath()) !== undefined) {\n return true;\n }\n return false;\n });\n _defineProperty(_assertThisInitialized(_this), \"getErrors\", function () {\n return _this.errors;\n });\n _defineProperty(_assertThisInitialized(_this), \"getWarnings\", function () {\n return _this.warnings;\n });\n _defineProperty(_assertThisInitialized(_this), \"isListField\", function () {\n return _this.props.isListField;\n });\n _defineProperty(_assertThisInitialized(_this), \"isList\", function () {\n return _this.props.isList;\n });\n _defineProperty(_assertThisInitialized(_this), \"isPreserve\", function () {\n return _this.props.preserve;\n });\n // ============================= Child Component =============================\n _defineProperty(_assertThisInitialized(_this), \"getMeta\", function () {\n // Make error & validating in cache to save perf\n _this.prevValidating = _this.isFieldValidating();\n var meta = {\n touched: _this.isFieldTouched(),\n validating: _this.prevValidating,\n errors: _this.errors,\n warnings: _this.warnings,\n name: _this.getNamePath(),\n validated: _this.validatePromise === null\n };\n return meta;\n });\n // Only return validate child node. If invalidate, will do nothing about field.\n _defineProperty(_assertThisInitialized(_this), \"getOnlyChild\", function (children) {\n // Support render props\n if (typeof children === 'function') {\n var _meta2 = _this.getMeta();\n return _objectSpread(_objectSpread({}, _this.getOnlyChild(children(_this.getControlled(), _meta2, _this.props.fieldContext))), {}, {\n isFunction: true\n });\n }\n\n // Filed element only\n var childList = toChildrenArray(children);\n if (childList.length !== 1 || ! /*#__PURE__*/React.isValidElement(childList[0])) {\n return {\n child: childList,\n isFunction: false\n };\n }\n return {\n child: childList[0],\n isFunction: false\n };\n });\n // ============================== Field Control ==============================\n _defineProperty(_assertThisInitialized(_this), \"getValue\", function (store) {\n var getFieldsValue = _this.props.fieldContext.getFieldsValue;\n var namePath = _this.getNamePath();\n return getValue(store || getFieldsValue(true), namePath);\n });\n _defineProperty(_assertThisInitialized(_this), \"getControlled\", function () {\n var childProps = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var _this$props6 = _this.props,\n name = _this$props6.name,\n trigger = _this$props6.trigger,\n validateTrigger = _this$props6.validateTrigger,\n getValueFromEvent = _this$props6.getValueFromEvent,\n normalize = _this$props6.normalize,\n valuePropName = _this$props6.valuePropName,\n getValueProps = _this$props6.getValueProps,\n fieldContext = _this$props6.fieldContext;\n var mergedValidateTrigger = validateTrigger !== undefined ? validateTrigger : fieldContext.validateTrigger;\n var namePath = _this.getNamePath();\n var getInternalHooks = fieldContext.getInternalHooks,\n getFieldsValue = fieldContext.getFieldsValue;\n var _getInternalHooks = getInternalHooks(HOOK_MARK),\n dispatch = _getInternalHooks.dispatch;\n var value = _this.getValue();\n var mergedGetValueProps = getValueProps || function (val) {\n return _defineProperty({}, valuePropName, val);\n };\n var originTriggerFunc = childProps[trigger];\n var valueProps = name !== undefined ? mergedGetValueProps(value) : {};\n\n // warning when prop value is function\n if (process.env.NODE_ENV !== 'production' && valueProps) {\n Object.keys(valueProps).forEach(function (key) {\n warning(typeof valueProps[key] !== 'function', \"It's not recommended to generate dynamic function prop by `getValueProps`. Please pass it to child component directly (prop: \".concat(key, \")\"));\n });\n }\n var control = _objectSpread(_objectSpread({}, childProps), valueProps);\n\n // Add trigger\n control[trigger] = function () {\n // Mark as touched\n _this.touched = true;\n _this.dirty = true;\n _this.triggerMetaEvent();\n var newValue;\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n if (getValueFromEvent) {\n newValue = getValueFromEvent.apply(void 0, args);\n } else {\n newValue = defaultGetValueFromEvent.apply(void 0, [valuePropName].concat(args));\n }\n if (normalize) {\n newValue = normalize(newValue, value, getFieldsValue(true));\n }\n dispatch({\n type: 'updateValue',\n namePath: namePath,\n value: newValue\n });\n if (originTriggerFunc) {\n originTriggerFunc.apply(void 0, args);\n }\n };\n\n // Add validateTrigger\n var validateTriggerList = toArray(mergedValidateTrigger || []);\n validateTriggerList.forEach(function (triggerName) {\n // Wrap additional function of component, so that we can get latest value from store\n var originTrigger = control[triggerName];\n control[triggerName] = function () {\n if (originTrigger) {\n originTrigger.apply(void 0, arguments);\n }\n\n // Always use latest rules\n var rules = _this.props.rules;\n if (rules && rules.length) {\n // We dispatch validate to root,\n // since it will update related data with other field with same name\n dispatch({\n type: 'validateField',\n namePath: namePath,\n triggerName: triggerName\n });\n }\n };\n });\n return control;\n });\n if (props.fieldContext) {\n var getInternalHooks = props.fieldContext.getInternalHooks;\n var _getInternalHooks2 = getInternalHooks(HOOK_MARK),\n initEntityValue = _getInternalHooks2.initEntityValue;\n initEntityValue(_assertThisInitialized(_this));\n }\n return _this;\n }\n _createClass(Field, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n var _this$props7 = this.props,\n shouldUpdate = _this$props7.shouldUpdate,\n fieldContext = _this$props7.fieldContext;\n this.mounted = true;\n\n // Register on init\n if (fieldContext) {\n var getInternalHooks = fieldContext.getInternalHooks;\n var _getInternalHooks3 = getInternalHooks(HOOK_MARK),\n registerField = _getInternalHooks3.registerField;\n this.cancelRegisterFunc = registerField(this);\n }\n\n // One more render for component in case fields not ready\n if (shouldUpdate === true) {\n this.reRender();\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.cancelRegister();\n this.triggerMetaEvent(true);\n this.mounted = false;\n }\n }, {\n key: \"reRender\",\n value: function reRender() {\n if (!this.mounted) return;\n this.forceUpdate();\n }\n }, {\n key: \"render\",\n value: function render() {\n var resetCount = this.state.resetCount;\n var children = this.props.children;\n var _this$getOnlyChild = this.getOnlyChild(children),\n child = _this$getOnlyChild.child,\n isFunction = _this$getOnlyChild.isFunction;\n\n // Not need to `cloneElement` since user can handle this in render function self\n var returnChildNode;\n if (isFunction) {\n returnChildNode = child;\n } else if ( /*#__PURE__*/React.isValidElement(child)) {\n returnChildNode = /*#__PURE__*/React.cloneElement(child, this.getControlled(child.props));\n } else {\n warning(!child, '`children` of Field is not validate ReactElement.');\n returnChildNode = child;\n }\n return /*#__PURE__*/React.createElement(React.Fragment, {\n key: resetCount\n }, returnChildNode);\n }\n }]);\n return Field;\n}(React.Component);\n_defineProperty(Field, \"contextType\", FieldContext);\n_defineProperty(Field, \"defaultProps\", {\n trigger: 'onChange',\n valuePropName: 'value'\n});\nfunction WrapperField(_ref6) {\n var name = _ref6.name,\n restProps = _objectWithoutProperties(_ref6, _excluded);\n var fieldContext = React.useContext(FieldContext);\n var listContext = React.useContext(ListContext);\n var namePath = name !== undefined ? getNamePath(name) : undefined;\n var key = 'keep';\n if (!restProps.isListField) {\n key = \"_\".concat((namePath || []).join('_'));\n }\n\n // Warning if it's a directly list field.\n // We can still support multiple level field preserve.\n if (process.env.NODE_ENV !== 'production' && restProps.preserve === false && restProps.isListField && namePath.length <= 1) {\n warning(false, '`preserve` should not apply on Form.List fields.');\n }\n return /*#__PURE__*/React.createElement(Field, _extends({\n key: key,\n name: namePath,\n isListField: !!listContext\n }, restProps, {\n fieldContext: fieldContext\n }));\n}\nexport default WrapperField;"],"mappings":"AAAA,OAAOA,QAAQ,MAAM,oCAAoC;AACzD,OAAOC,wBAAwB,MAAM,oDAAoD;AACzF,OAAOC,mBAAmB,MAAM,+CAA+C;AAC/E,OAAOC,iBAAiB,MAAM,6CAA6C;AAC3E,OAAOC,aAAa,MAAM,0CAA0C;AACpE,OAAOC,kB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