You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
758 KiB
1 line
758 KiB
2 years ago
|
{"ast":null,"code":"import React, { useLayoutEffect, useEffect, useRef, useState, useContext } from 'react';\nimport _inheritsLoose from '@babel/runtime/helpers/esm/inheritsLoose';\nimport _extends from '@babel/runtime/helpers/esm/extends';\nimport { createStore as createStore$1, applyMiddleware, compose, bindActionCreators } from 'redux';\nimport { Provider, connect } from 'react-redux';\nimport { useMemo, useCallback } from 'use-memo-one';\nimport { getRect, expand, offset, withScroll, getBox, createBox, calculateBox } from 'css-box-model';\nimport memoizeOne from 'memoize-one';\nimport rafSchd from 'raf-schd';\nimport ReactDOM from 'react-dom';\nvar isProduction = process.env.NODE_ENV === 'production';\nvar spacesAndTabs = /[ \\t]{2,}/g;\nvar lineStartWithSpaces = /^[ \\t]*/gm;\n\nvar clean = function clean(value) {\n return value.replace(spacesAndTabs, ' ').replace(lineStartWithSpaces, '').trim();\n};\n\nvar getDevMessage = function getDevMessage(message) {\n return clean(\"\\n %creact-beautiful-dnd\\n\\n %c\" + clean(message) + \"\\n\\n %c\\uD83D\\uDC77\\u200D This is a development only message. It will be removed in production builds.\\n\");\n};\n\nvar getFormattedMessage = function getFormattedMessage(message) {\n return [getDevMessage(message), 'color: #00C584; font-size: 1.2em; font-weight: bold;', 'line-height: 1.5', 'color: #723874;'];\n};\n\nvar isDisabledFlag = '__react-beautiful-dnd-disable-dev-warnings';\n\nfunction log(type, message) {\n var _console;\n\n if (isProduction) {\n return;\n }\n\n if (typeof window !== 'undefined' && window[isDisabledFlag]) {\n return;\n }\n\n (_console = console)[type].apply(_console, getFormattedMessage(message));\n}\n\nvar warning = log.bind(null, 'warn');\nvar error = log.bind(null, 'error');\n\nfunction noop() {}\n\nfunction getOptions(shared, fromBinding) {\n return _extends({}, shared, {}, fromBinding);\n}\n\nfunction bindEvents(el, bindings, sharedOptions) {\n var unbindings = bindings.map(function (binding) {\n var options = getOptions(sharedOptions, binding.options);\n el.addEventListener(binding.eventName, binding.fn, options);\n return function unbind() {\n el.removeEventListener(binding.eventName, binding.fn, options);\n };\n });\n return function unbindAll() {\n unbindings.forEach(function (unbind) {\n unbind();\n });\n };\n}\n\nvar isProduction$1 = process.env.NODE_ENV === 'production';\nvar prefix = 'Invariant failed';\n\nfunction RbdInvariant(message) {\n this.message = message;\n}\n\nRbdInvariant.prototype.toString = function toString() {\n return this.message;\n};\n\nfunction invariant(condition, message) {\n if (condition) {\n return;\n }\n\n if (isProduction$1) {\n throw new RbdInvariant(prefix);\n } else {\n throw new RbdInvariant(prefix + \": \" + (message || ''));\n }\n}\n\nvar ErrorBoundary = function (_React$Component) {\n _inheritsLoose(ErrorBoundary, _React$Component);\n\n function ErrorBoundary() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n _this.callbacks = null;\n _this.unbind = noop;\n\n _this.onWindowError = function (event) {\n var callbacks = _this.getCallbacks();\n\n if (callbacks.isDragging()) {\n callbacks.tryAbort();\n process.env.NODE_ENV !== \"production\" ? warning(\"\\n An error was caught by our window 'error' event listener while a drag was occurring.\\n The active drag has been aborted.\\n \") : void 0;\n }\n\n var err = event.error;\n\n if (err instanceof RbdInvariant) {\n event.preventDefault();\n\n if (process.env.NODE_ENV !== 'production') {\n error(err.message);\n }\n }\n };\n\n _this.getCallbacks = function () {\n if (!_this.callbacks) {\n throw new Error('Unable to find AppCallbacks in <ErrorBoundary/>');\n }\n\n return _thi
|