Add files

This commit is contained in:
DoomRye 2022-07-26 10:06:20 -07:00
commit bb80829159
18195 changed files with 2122994 additions and 0 deletions

View file

@ -0,0 +1,27 @@
'use strict';
exports.__esModule = true;
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _lodashFunctionMemoize = require('lodash/function/memoize');
var _lodashFunctionMemoize2 = _interopRequireDefault(_lodashFunctionMemoize);
var isFirefox = _lodashFunctionMemoize2['default'](function () {
return (/firefox/i.test(navigator.userAgent)
);
});
exports.isFirefox = isFirefox;
var isSafari = _lodashFunctionMemoize2['default'](function () {
return Boolean(window.safari);
});
exports.isSafari = isSafari;
//////////////////
// WEBPACK FOOTER
// ./~/react-dnd-html5-backend/lib/BrowserDetector.js
// module id = 1114
// module chunks = 4

View file

@ -0,0 +1,59 @@
'use strict';
exports.__esModule = true;
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'); } }
var _lodashArrayUnion = require('lodash/array/union');
var _lodashArrayUnion2 = _interopRequireDefault(_lodashArrayUnion);
var _lodashArrayWithout = require('lodash/array/without');
var _lodashArrayWithout2 = _interopRequireDefault(_lodashArrayWithout);
var EnterLeaveCounter = (function () {
function EnterLeaveCounter() {
_classCallCheck(this, EnterLeaveCounter);
this.entered = [];
}
EnterLeaveCounter.prototype.enter = function enter(enteringNode) {
var previousLength = this.entered.length;
this.entered = _lodashArrayUnion2['default'](this.entered.filter(function (node) {
return document.documentElement.contains(node) && (!node.contains || node.contains(enteringNode));
}), [enteringNode]);
return previousLength === 0 && this.entered.length > 0;
};
EnterLeaveCounter.prototype.leave = function leave(leavingNode) {
var previousLength = this.entered.length;
this.entered = _lodashArrayWithout2['default'](this.entered.filter(function (node) {
return document.documentElement.contains(node);
}), leavingNode);
return previousLength > 0 && this.entered.length === 0;
};
EnterLeaveCounter.prototype.reset = function reset() {
this.entered = [];
};
return EnterLeaveCounter;
})();
exports['default'] = EnterLeaveCounter;
module.exports = exports['default'];
//////////////////
// WEBPACK FOOTER
// ./~/react-dnd-html5-backend/lib/EnterLeaveCounter.js
// module id = 2697
// module chunks = 4

View file

@ -0,0 +1,567 @@
'use strict';
exports.__esModule = true;
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }
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'); } }
var _lodashObjectDefaults = require('lodash/object/defaults');
var _lodashObjectDefaults2 = _interopRequireDefault(_lodashObjectDefaults);
var _shallowEqual = require('./shallowEqual');
var _shallowEqual2 = _interopRequireDefault(_shallowEqual);
var _EnterLeaveCounter = require('./EnterLeaveCounter');
var _EnterLeaveCounter2 = _interopRequireDefault(_EnterLeaveCounter);
var _BrowserDetector = require('./BrowserDetector');
var _OffsetUtils = require('./OffsetUtils');
var _NativeDragSources = require('./NativeDragSources');
var _NativeTypes = require('./NativeTypes');
var NativeTypes = _interopRequireWildcard(_NativeTypes);
var HTML5Backend = (function () {
function HTML5Backend(manager) {
_classCallCheck(this, HTML5Backend);
this.actions = manager.getActions();
this.monitor = manager.getMonitor();
this.registry = manager.getRegistry();
this.sourcePreviewNodes = {};
this.sourcePreviewNodeOptions = {};
this.sourceNodes = {};
this.sourceNodeOptions = {};
this.enterLeaveCounter = new _EnterLeaveCounter2['default']();
this.getSourceClientOffset = this.getSourceClientOffset.bind(this);
this.handleTopDragStart = this.handleTopDragStart.bind(this);
this.handleTopDragStartCapture = this.handleTopDragStartCapture.bind(this);
this.handleTopDragEndCapture = this.handleTopDragEndCapture.bind(this);
this.handleTopDragEnter = this.handleTopDragEnter.bind(this);
this.handleTopDragEnterCapture = this.handleTopDragEnterCapture.bind(this);
this.handleTopDragLeaveCapture = this.handleTopDragLeaveCapture.bind(this);
this.handleTopDragOver = this.handleTopDragOver.bind(this);
this.handleTopDragOverCapture = this.handleTopDragOverCapture.bind(this);
this.handleTopDrop = this.handleTopDrop.bind(this);
this.handleTopDropCapture = this.handleTopDropCapture.bind(this);
this.handleSelectStart = this.handleSelectStart.bind(this);
this.endDragIfSourceWasRemovedFromDOM = this.endDragIfSourceWasRemovedFromDOM.bind(this);
this.endDragNativeItem = this.endDragNativeItem.bind(this);
}
HTML5Backend.prototype.setup = function setup() {
if (typeof window === 'undefined') {
return;
}
if (this.constructor.isSetUp) {
throw new Error('Cannot have two HTML5 backends at the same time.');
}
this.constructor.isSetUp = true;
this.addEventListeners(window);
};
HTML5Backend.prototype.teardown = function teardown() {
if (typeof window === 'undefined') {
return;
}
this.constructor.isSetUp = false;
this.removeEventListeners(window);
this.clearCurrentDragSourceNode();
};
HTML5Backend.prototype.addEventListeners = function addEventListeners(target) {
target.addEventListener('dragstart', this.handleTopDragStart);
target.addEventListener('dragstart', this.handleTopDragStartCapture, true);
target.addEventListener('dragend', this.handleTopDragEndCapture, true);
target.addEventListener('dragenter', this.handleTopDragEnter);
target.addEventListener('dragenter', this.handleTopDragEnterCapture, true);
target.addEventListener('dragleave', this.handleTopDragLeaveCapture, true);
target.addEventListener('dragover', this.handleTopDragOver);
target.addEventListener('dragover', this.handleTopDragOverCapture, true);
target.addEventListener('drop', this.handleTopDrop);
target.addEventListener('drop', this.handleTopDropCapture, true);
};
HTML5Backend.prototype.removeEventListeners = function removeEventListeners(target) {
target.removeEventListener('dragstart', this.handleTopDragStart);
target.removeEventListener('dragstart', this.handleTopDragStartCapture, true);
target.removeEventListener('dragend', this.handleTopDragEndCapture, true);
target.removeEventListener('dragenter', this.handleTopDragEnter);
target.removeEventListener('dragenter', this.handleTopDragEnterCapture, true);
target.removeEventListener('dragleave', this.handleTopDragLeaveCapture, true);
target.removeEventListener('dragover', this.handleTopDragOver);
target.removeEventListener('dragover', this.handleTopDragOverCapture, true);
target.removeEventListener('drop', this.handleTopDrop);
target.removeEventListener('drop', this.handleTopDropCapture, true);
};
HTML5Backend.prototype.connectDragPreview = function connectDragPreview(sourceId, node, options) {
var _this = this;
this.sourcePreviewNodeOptions[sourceId] = options;
this.sourcePreviewNodes[sourceId] = node;
return function () {
delete _this.sourcePreviewNodes[sourceId];
delete _this.sourcePreviewNodeOptions[sourceId];
};
};
HTML5Backend.prototype.connectDragSource = function connectDragSource(sourceId, node, options) {
var _this2 = this;
this.sourceNodes[sourceId] = node;
this.sourceNodeOptions[sourceId] = options;
var handleDragStart = function handleDragStart(e) {
return _this2.handleDragStart(e, sourceId);
};
var handleSelectStart = function handleSelectStart(e) {
return _this2.handleSelectStart(e, sourceId);
};
node.setAttribute('draggable', true);
node.addEventListener('dragstart', handleDragStart);
node.addEventListener('selectstart', handleSelectStart);
return function () {
delete _this2.sourceNodes[sourceId];
delete _this2.sourceNodeOptions[sourceId];
node.removeEventListener('dragstart', handleDragStart);
node.removeEventListener('selectstart', handleSelectStart);
node.setAttribute('draggable', false);
};
};
HTML5Backend.prototype.connectDropTarget = function connectDropTarget(targetId, node) {
var _this3 = this;
var handleDragEnter = function handleDragEnter(e) {
return _this3.handleDragEnter(e, targetId);
};
var handleDragOver = function handleDragOver(e) {
return _this3.handleDragOver(e, targetId);
};
var handleDrop = function handleDrop(e) {
return _this3.handleDrop(e, targetId);
};
node.addEventListener('dragenter', handleDragEnter);
node.addEventListener('dragover', handleDragOver);
node.addEventListener('drop', handleDrop);
return function () {
node.removeEventListener('dragenter', handleDragEnter);
node.removeEventListener('dragover', handleDragOver);
node.removeEventListener('drop', handleDrop);
};
};
HTML5Backend.prototype.getCurrentSourceNodeOptions = function getCurrentSourceNodeOptions() {
var sourceId = this.monitor.getSourceId();
var sourceNodeOptions = this.sourceNodeOptions[sourceId];
return _lodashObjectDefaults2['default'](sourceNodeOptions || {}, {
dropEffect: 'move'
});
};
HTML5Backend.prototype.getCurrentDropEffect = function getCurrentDropEffect() {
if (this.isDraggingNativeItem()) {
// It makes more sense to default to 'copy' for native resources
return 'copy';
}
return this.getCurrentSourceNodeOptions().dropEffect;
};
HTML5Backend.prototype.getCurrentSourcePreviewNodeOptions = function getCurrentSourcePreviewNodeOptions() {
var sourceId = this.monitor.getSourceId();
var sourcePreviewNodeOptions = this.sourcePreviewNodeOptions[sourceId];
return _lodashObjectDefaults2['default'](sourcePreviewNodeOptions || {}, {
anchorX: 0.5,
anchorY: 0.5,
captureDraggingState: false
});
};
HTML5Backend.prototype.getSourceClientOffset = function getSourceClientOffset(sourceId) {
return _OffsetUtils.getNodeClientOffset(this.sourceNodes[sourceId]);
};
HTML5Backend.prototype.isDraggingNativeItem = function isDraggingNativeItem() {
var itemType = this.monitor.getItemType();
return Object.keys(NativeTypes).some(function (key) {
return NativeTypes[key] === itemType;
});
};
HTML5Backend.prototype.beginDragNativeItem = function beginDragNativeItem(type) {
this.clearCurrentDragSourceNode();
var SourceType = _NativeDragSources.createNativeDragSource(type);
this.currentNativeSource = new SourceType();
this.currentNativeHandle = this.registry.addSource(type, this.currentNativeSource);
this.actions.beginDrag([this.currentNativeHandle]);
// If mousemove fires, the drag is over but browser failed to tell us.
window.addEventListener('mousemove', this.endDragNativeItem, true);
};
HTML5Backend.prototype.endDragNativeItem = function endDragNativeItem() {
if (!this.isDraggingNativeItem()) {
return;
}
window.removeEventListener('mousemove', this.endDragNativeItem, true);
this.actions.endDrag();
this.registry.removeSource(this.currentNativeHandle);
this.currentNativeHandle = null;
this.currentNativeSource = null;
};
HTML5Backend.prototype.endDragIfSourceWasRemovedFromDOM = function endDragIfSourceWasRemovedFromDOM() {
var node = this.currentDragSourceNode;
if (document.body.contains(node)) {
return;
}
if (this.clearCurrentDragSourceNode()) {
this.actions.endDrag();
}
};
HTML5Backend.prototype.setCurrentDragSourceNode = function setCurrentDragSourceNode(node) {
this.clearCurrentDragSourceNode();
this.currentDragSourceNode = node;
this.currentDragSourceNodeOffset = _OffsetUtils.getNodeClientOffset(node);
this.currentDragSourceNodeOffsetChanged = false;
// Receiving a mouse event in the middle of a dragging operation
// means it has ended and the drag source node disappeared from DOM,
// so the browser didn't dispatch the dragend event.
window.addEventListener('mousemove', this.endDragIfSourceWasRemovedFromDOM, true);
};
HTML5Backend.prototype.clearCurrentDragSourceNode = function clearCurrentDragSourceNode() {
if (this.currentDragSourceNode) {
this.currentDragSourceNode = null;
this.currentDragSourceNodeOffset = null;
this.currentDragSourceNodeOffsetChanged = false;
window.removeEventListener('mousemove', this.endDragIfSourceWasRemovedFromDOM, true);
return true;
}
return false;
};
HTML5Backend.prototype.checkIfCurrentDragSourceRectChanged = function checkIfCurrentDragSourceRectChanged() {
var node = this.currentDragSourceNode;
if (!node) {
return false;
}
if (this.currentDragSourceNodeOffsetChanged) {
return true;
}
this.currentDragSourceNodeOffsetChanged = !_shallowEqual2['default'](_OffsetUtils.getNodeClientOffset(node), this.currentDragSourceNodeOffset);
return this.currentDragSourceNodeOffsetChanged;
};
HTML5Backend.prototype.handleTopDragStartCapture = function handleTopDragStartCapture() {
this.clearCurrentDragSourceNode();
this.dragStartSourceIds = [];
};
HTML5Backend.prototype.handleDragStart = function handleDragStart(e, sourceId) {
this.dragStartSourceIds.unshift(sourceId);
};
HTML5Backend.prototype.handleTopDragStart = function handleTopDragStart(e) {
var _this4 = this;
var dragStartSourceIds = this.dragStartSourceIds;
this.dragStartSourceIds = null;
var clientOffset = _OffsetUtils.getEventClientOffset(e);
// Don't publish the source just yet (see why below)
this.actions.beginDrag(dragStartSourceIds, {
publishSource: false,
getSourceClientOffset: this.getSourceClientOffset,
clientOffset: clientOffset
});
var dataTransfer = e.dataTransfer;
var nativeType = _NativeDragSources.matchNativeItemType(dataTransfer);
if (this.monitor.isDragging()) {
if (typeof dataTransfer.setDragImage === 'function') {
// Use custom drag image if user specifies it.
// If child drag source refuses drag but parent agrees,
// use parent's node as drag image. Neither works in IE though.
var sourceId = this.monitor.getSourceId();
var sourceNode = this.sourceNodes[sourceId];
var dragPreview = this.sourcePreviewNodes[sourceId] || sourceNode;
var _getCurrentSourcePreviewNodeOptions = this.getCurrentSourcePreviewNodeOptions();
var anchorX = _getCurrentSourcePreviewNodeOptions.anchorX;
var anchorY = _getCurrentSourcePreviewNodeOptions.anchorY;
var anchorPoint = { anchorX: anchorX, anchorY: anchorY };
var dragPreviewOffset = _OffsetUtils.getDragPreviewOffset(sourceNode, dragPreview, clientOffset, anchorPoint);
dataTransfer.setDragImage(dragPreview, dragPreviewOffset.x, dragPreviewOffset.y);
}
try {
// Firefox won't drag without setting data
dataTransfer.setData('application/json', {});
} catch (err) {}
// IE doesn't support MIME types in setData
// Store drag source node so we can check whether
// it is removed from DOM and trigger endDrag manually.
this.setCurrentDragSourceNode(e.target);
// Now we are ready to publish the drag source.. or are we not?
var _getCurrentSourcePreviewNodeOptions2 = this.getCurrentSourcePreviewNodeOptions();
var captureDraggingState = _getCurrentSourcePreviewNodeOptions2.captureDraggingState;
if (!captureDraggingState) {
// Usually we want to publish it in the next tick so that browser
// is able to screenshot the current (not yet dragging) state.
//
// It also neatly avoids a situation where render() returns null
// in the same tick for the source element, and browser freaks out.
setTimeout(function () {
return _this4.actions.publishDragSource();
});
} else {
// In some cases the user may want to override this behavior, e.g.
// to work around IE not supporting custom drag previews.
//
// When using a custom drag layer, the only way to prevent
// the default drag preview from drawing in IE is to screenshot
// the dragging state in which the node itself has zero opacity
// and height. In this case, though, returning null from render()
// will abruptly end the dragging, which is not obvious.
//
// This is the reason such behavior is strictly opt-in.
this.actions.publishDragSource();
}
} else if (nativeType) {
// A native item (such as URL) dragged from inside the document
this.beginDragNativeItem(nativeType);
} else if (!dataTransfer.types && (!e.target.hasAttribute || !e.target.hasAttribute('draggable'))) {
// Looks like a Safari bug: dataTransfer.types is null, but there was no draggable.
// Just let it drag. It's a native type (URL or text) and will be picked up in dragenter handler.
return;
} else {
// If by this time no drag source reacted, tell browser not to drag.
e.preventDefault();
}
};
HTML5Backend.prototype.handleTopDragEndCapture = function handleTopDragEndCapture() {
if (this.clearCurrentDragSourceNode()) {
// Firefox can dispatch this event in an infinite loop
// if dragend handler does something like showing an alert.
// Only proceed if we have not handled it already.
this.actions.endDrag();
}
};
HTML5Backend.prototype.handleTopDragEnterCapture = function handleTopDragEnterCapture(e) {
this.dragEnterTargetIds = [];
var isFirstEnter = this.enterLeaveCounter.enter(e.target);
if (!isFirstEnter || this.monitor.isDragging()) {
return;
}
var dataTransfer = e.dataTransfer;
var nativeType = _NativeDragSources.matchNativeItemType(dataTransfer);
if (nativeType) {
// A native item (such as file or URL) dragged from outside the document
this.beginDragNativeItem(nativeType);
}
};
HTML5Backend.prototype.handleDragEnter = function handleDragEnter(e, targetId) {
this.dragEnterTargetIds.unshift(targetId);
};
HTML5Backend.prototype.handleTopDragEnter = function handleTopDragEnter(e) {
var _this5 = this;
var dragEnterTargetIds = this.dragEnterTargetIds;
this.dragEnterTargetIds = [];
if (!this.monitor.isDragging()) {
// This is probably a native item type we don't understand.
return;
}
if (!_BrowserDetector.isFirefox()) {
// Don't emit hover in `dragenter` on Firefox due to an edge case.
// If the target changes position as the result of `dragenter`, Firefox
// will still happily dispatch `dragover` despite target being no longer
// there. The easy solution is to only fire `hover` in `dragover` on FF.
this.actions.hover(dragEnterTargetIds, {
clientOffset: _OffsetUtils.getEventClientOffset(e)
});
}
var canDrop = dragEnterTargetIds.some(function (targetId) {
return _this5.monitor.canDropOnTarget(targetId);
});
if (canDrop) {
// IE requires this to fire dragover events
e.preventDefault();
e.dataTransfer.dropEffect = this.getCurrentDropEffect();
}
};
HTML5Backend.prototype.handleTopDragOverCapture = function handleTopDragOverCapture() {
this.dragOverTargetIds = [];
};
HTML5Backend.prototype.handleDragOver = function handleDragOver(e, targetId) {
this.dragOverTargetIds.unshift(targetId);
};
HTML5Backend.prototype.handleTopDragOver = function handleTopDragOver(e) {
var _this6 = this;
var dragOverTargetIds = this.dragOverTargetIds;
this.dragOverTargetIds = [];
if (!this.monitor.isDragging()) {
// This is probably a native item type we don't understand.
// Prevent default "drop and blow away the whole document" action.
e.preventDefault();
e.dataTransfer.dropEffect = 'none';
return;
}
this.actions.hover(dragOverTargetIds, {
clientOffset: _OffsetUtils.getEventClientOffset(e)
});
var canDrop = dragOverTargetIds.some(function (targetId) {
return _this6.monitor.canDropOnTarget(targetId);
});
if (canDrop) {
// Show user-specified drop effect.
e.preventDefault();
e.dataTransfer.dropEffect = this.getCurrentDropEffect();
} else if (this.isDraggingNativeItem()) {
// Don't show a nice cursor but still prevent default
// "drop and blow away the whole document" action.
e.preventDefault();
e.dataTransfer.dropEffect = 'none';
} else if (this.checkIfCurrentDragSourceRectChanged()) {
// Prevent animating to incorrect position.
// Drop effect must be other than 'none' to prevent animation.
e.preventDefault();
e.dataTransfer.dropEffect = 'move';
}
};
HTML5Backend.prototype.handleTopDragLeaveCapture = function handleTopDragLeaveCapture(e) {
if (this.isDraggingNativeItem()) {
e.preventDefault();
}
var isLastLeave = this.enterLeaveCounter.leave(e.target);
if (!isLastLeave) {
return;
}
if (this.isDraggingNativeItem()) {
this.endDragNativeItem();
}
};
HTML5Backend.prototype.handleTopDropCapture = function handleTopDropCapture(e) {
this.dropTargetIds = [];
e.preventDefault();
if (this.isDraggingNativeItem()) {
this.currentNativeSource.mutateItemByReadingDataTransfer(e.dataTransfer);
}
this.enterLeaveCounter.reset();
};
HTML5Backend.prototype.handleDrop = function handleDrop(e, targetId) {
this.dropTargetIds.unshift(targetId);
};
HTML5Backend.prototype.handleTopDrop = function handleTopDrop(e) {
var dropTargetIds = this.dropTargetIds;
this.dropTargetIds = [];
this.actions.hover(dropTargetIds, {
clientOffset: _OffsetUtils.getEventClientOffset(e)
});
this.actions.drop();
if (this.isDraggingNativeItem()) {
this.endDragNativeItem();
} else {
this.endDragIfSourceWasRemovedFromDOM();
}
};
HTML5Backend.prototype.handleSelectStart = function handleSelectStart(e) {
// Prevent selection on IE
// and instead ask it to consider dragging.
if (typeof e.target.dragDrop === 'function') {
e.preventDefault();
e.target.dragDrop();
}
};
return HTML5Backend;
})();
exports['default'] = HTML5Backend;
module.exports = exports['default'];
//////////////////
// WEBPACK FOOTER
// ./~/react-dnd-html5-backend/lib/HTML5Backend.js
// module id = 2698
// module chunks = 4

View file

@ -0,0 +1,119 @@
"use strict";
exports.__esModule = true;
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var MonotonicInterpolant = (function () {
function MonotonicInterpolant(xs, ys) {
_classCallCheck(this, MonotonicInterpolant);
var length = xs.length;
// Rearrange xs and ys so that xs is sorted
var indexes = [];
for (var i = 0; i < length; i++) {
indexes.push(i);
}
indexes.sort(function (a, b) {
return xs[a] < xs[b] ? -1 : 1;
});
// Get consecutive differences and slopes
var dys = [];
var dxs = [];
var ms = [];
var dx = undefined;
var dy = undefined;
for (var i = 0; i < length - 1; i++) {
dx = xs[i + 1] - xs[i];
dy = ys[i + 1] - ys[i];
dxs.push(dx);
dys.push(dy);
ms.push(dy / dx);
}
// Get degree-1 coefficients
var c1s = [ms[0]];
for (var i = 0; i < dxs.length - 1; i++) {
var _m = ms[i];
var mNext = ms[i + 1];
if (_m * mNext <= 0) {
c1s.push(0);
} else {
dx = dxs[i];
var dxNext = dxs[i + 1];
var common = dx + dxNext;
c1s.push(3 * common / ((common + dxNext) / _m + (common + dx) / mNext));
}
}
c1s.push(ms[ms.length - 1]);
// Get degree-2 and degree-3 coefficients
var c2s = [];
var c3s = [];
var m = undefined;
for (var i = 0; i < c1s.length - 1; i++) {
m = ms[i];
var c1 = c1s[i];
var invDx = 1 / dxs[i];
var common = c1 + c1s[i + 1] - m - m;
c2s.push((m - c1 - common) * invDx);
c3s.push(common * invDx * invDx);
}
this.xs = xs;
this.ys = ys;
this.c1s = c1s;
this.c2s = c2s;
this.c3s = c3s;
}
MonotonicInterpolant.prototype.interpolate = function interpolate(x) {
var xs = this.xs;
var ys = this.ys;
var c1s = this.c1s;
var c2s = this.c2s;
var c3s = this.c3s;
// The rightmost point in the dataset should give an exact result
var i = xs.length - 1;
if (x === xs[i]) {
return ys[i];
}
// Search for the interval x is in, returning the corresponding y if x is one of the original xs
var low = 0;
var high = c3s.length - 1;
var mid = undefined;
while (low <= high) {
mid = Math.floor(0.5 * (low + high));
var xHere = xs[mid];
if (xHere < x) {
low = mid + 1;
} else if (xHere > x) {
high = mid - 1;
} else {
return ys[mid];
}
}
i = Math.max(0, high);
// Interpolate
var diff = x - xs[i];
var diffSq = diff * diff;
return ys[i] + c1s[i] * diff + c2s[i] * diffSq + c3s[i] * diff * diffSq;
};
return MonotonicInterpolant;
})();
exports["default"] = MonotonicInterpolant;
module.exports = exports["default"];
//////////////////
// WEBPACK FOOTER
// ./~/react-dnd-html5-backend/lib/MonotonicInterpolant.js
// module id = 2699
// module chunks = 4

View file

@ -0,0 +1,110 @@
'use strict';
exports.__esModule = true;
var _nativeTypesConfig;
exports.createNativeDragSource = createNativeDragSource;
exports.matchNativeItemType = matchNativeItemType;
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
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; }
var _NativeTypes = require('./NativeTypes');
var NativeTypes = _interopRequireWildcard(_NativeTypes);
function getDataFromDataTransfer(dataTransfer, typesToTry, defaultValue) {
var result = typesToTry.reduce(function (resultSoFar, typeToTry) {
return resultSoFar || dataTransfer.getData(typeToTry);
}, null);
return result != null ? // eslint-disable-line eqeqeq
result : defaultValue;
}
var nativeTypesConfig = (_nativeTypesConfig = {}, _defineProperty(_nativeTypesConfig, NativeTypes.FILE, {
exposeProperty: 'files',
matchesTypes: ['Files'],
getData: function getData(dataTransfer) {
return Array.prototype.slice.call(dataTransfer.files);
}
}), _defineProperty(_nativeTypesConfig, NativeTypes.URL, {
exposeProperty: 'urls',
matchesTypes: ['Url', 'text/uri-list'],
getData: function getData(dataTransfer, matchesTypes) {
return getDataFromDataTransfer(dataTransfer, matchesTypes, '').split('\n');
}
}), _defineProperty(_nativeTypesConfig, NativeTypes.TEXT, {
exposeProperty: 'text',
matchesTypes: ['Text', 'text/plain'],
getData: function getData(dataTransfer, matchesTypes) {
return getDataFromDataTransfer(dataTransfer, matchesTypes, '');
}
}), _nativeTypesConfig);
function createNativeDragSource(type) {
var _nativeTypesConfig$type = nativeTypesConfig[type];
var exposeProperty = _nativeTypesConfig$type.exposeProperty;
var matchesTypes = _nativeTypesConfig$type.matchesTypes;
var getData = _nativeTypesConfig$type.getData;
return (function () {
function NativeDragSource() {
_classCallCheck(this, NativeDragSource);
this.item = Object.defineProperties({}, _defineProperty({}, exposeProperty, {
get: function get() {
console.warn( // eslint-disable-line no-console
'Browser doesn\'t allow reading "' + exposeProperty + '" until the drop event.');
return null;
},
configurable: true,
enumerable: true
}));
}
NativeDragSource.prototype.mutateItemByReadingDataTransfer = function mutateItemByReadingDataTransfer(dataTransfer) {
delete this.item[exposeProperty];
this.item[exposeProperty] = getData(dataTransfer, matchesTypes);
};
NativeDragSource.prototype.canDrag = function canDrag() {
return true;
};
NativeDragSource.prototype.beginDrag = function beginDrag() {
return this.item;
};
NativeDragSource.prototype.isDragging = function isDragging(monitor, handle) {
return handle === monitor.getSourceId();
};
NativeDragSource.prototype.endDrag = function endDrag() {};
return NativeDragSource;
})();
}
function matchNativeItemType(dataTransfer) {
var dataTransferTypes = Array.prototype.slice.call(dataTransfer.types || []);
return Object.keys(nativeTypesConfig).filter(function (nativeItemType) {
var matchesTypes = nativeTypesConfig[nativeItemType].matchesTypes;
return matchesTypes.some(function (t) {
return dataTransferTypes.indexOf(t) > -1;
});
})[0] || null;
}
//////////////////
// WEBPACK FOOTER
// ./~/react-dnd-html5-backend/lib/NativeDragSources.js
// module id = 2700
// module chunks = 4

View file

@ -0,0 +1,16 @@
'use strict';
exports.__esModule = true;
var FILE = '__NATIVE_FILE__';
exports.FILE = FILE;
var URL = '__NATIVE_URL__';
exports.URL = URL;
var TEXT = '__NATIVE_TEXT__';
exports.TEXT = TEXT;
//////////////////
// WEBPACK FOOTER
// ./~/react-dnd-html5-backend/lib/NativeTypes.js
// module id = 645
// module chunks = 4

View file

@ -0,0 +1,102 @@
'use strict';
exports.__esModule = true;
exports.getNodeClientOffset = getNodeClientOffset;
exports.getEventClientOffset = getEventClientOffset;
exports.getDragPreviewOffset = getDragPreviewOffset;
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _BrowserDetector = require('./BrowserDetector');
var _MonotonicInterpolant = require('./MonotonicInterpolant');
var _MonotonicInterpolant2 = _interopRequireDefault(_MonotonicInterpolant);
var ELEMENT_NODE = 1;
function getNodeClientOffset(node) {
var el = node.nodeType === ELEMENT_NODE ? node : node.parentElement;
if (!el) {
return null;
}
var _el$getBoundingClientRect = el.getBoundingClientRect();
var top = _el$getBoundingClientRect.top;
var left = _el$getBoundingClientRect.left;
return { x: left, y: top };
}
function getEventClientOffset(e) {
return {
x: e.clientX,
y: e.clientY
};
}
function getDragPreviewOffset(sourceNode, dragPreview, clientOffset, anchorPoint) {
// The browsers will use the image intrinsic size under different conditions.
// Firefox only cares if it's an image, but WebKit also wants it to be detached.
var isImage = dragPreview.nodeName === 'IMG' && (_BrowserDetector.isFirefox() || !document.documentElement.contains(dragPreview));
var dragPreviewNode = isImage ? sourceNode : dragPreview;
var dragPreviewNodeOffsetFromClient = getNodeClientOffset(dragPreviewNode);
var offsetFromDragPreview = {
x: clientOffset.x - dragPreviewNodeOffsetFromClient.x,
y: clientOffset.y - dragPreviewNodeOffsetFromClient.y
};
var sourceWidth = sourceNode.offsetWidth;
var sourceHeight = sourceNode.offsetHeight;
var anchorX = anchorPoint.anchorX;
var anchorY = anchorPoint.anchorY;
var dragPreviewWidth = isImage ? dragPreview.width : sourceWidth;
var dragPreviewHeight = isImage ? dragPreview.height : sourceHeight;
// Work around @2x coordinate discrepancies in browsers
if (_BrowserDetector.isSafari() && isImage) {
dragPreviewHeight /= window.devicePixelRatio;
dragPreviewWidth /= window.devicePixelRatio;
} else if (_BrowserDetector.isFirefox() && !isImage) {
dragPreviewHeight *= window.devicePixelRatio;
dragPreviewWidth *= window.devicePixelRatio;
}
// Interpolate coordinates depending on anchor point
// If you know a simpler way to do this, let me know
var interpolantX = new _MonotonicInterpolant2['default']([0, 0.5, 1], [
// Dock to the left
offsetFromDragPreview.x,
// Align at the center
offsetFromDragPreview.x / sourceWidth * dragPreviewWidth,
// Dock to the right
offsetFromDragPreview.x + dragPreviewWidth - sourceWidth]);
var interpolantY = new _MonotonicInterpolant2['default']([0, 0.5, 1], [
// Dock to the top
offsetFromDragPreview.y,
// Align at the center
offsetFromDragPreview.y / sourceHeight * dragPreviewHeight,
// Dock to the bottom
offsetFromDragPreview.y + dragPreviewHeight - sourceHeight]);
var x = interpolantX.interpolate(anchorX);
var y = interpolantY.interpolate(anchorY);
// Work around Safari 8 positioning bug
if (_BrowserDetector.isSafari() && isImage) {
// We'll have to wait for @3x to see if this is entirely correct
y += (window.devicePixelRatio - 1) * dragPreviewHeight;
}
return { x: x, y: y };
}
//////////////////
// WEBPACK FOOTER
// ./~/react-dnd-html5-backend/lib/OffsetUtils.js
// module id = 2701
// module chunks = 4

View file

@ -0,0 +1,23 @@
'use strict';
exports.__esModule = true;
exports['default'] = getEmptyImage;
var emptyImage = undefined;
function getEmptyImage() {
if (!emptyImage) {
emptyImage = new Image();
emptyImage.src = 'data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==';
}
return emptyImage;
}
module.exports = exports['default'];
//////////////////
// WEBPACK FOOTER
// ./~/react-dnd-html5-backend/lib/getEmptyImage.js
// module id = 2702
// module chunks = 4

View file

@ -0,0 +1,34 @@
'use strict';
exports.__esModule = true;
exports['default'] = createHTML5Backend;
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _HTML5Backend = require('./HTML5Backend');
var _HTML5Backend2 = _interopRequireDefault(_HTML5Backend);
var _getEmptyImage = require('./getEmptyImage');
var _getEmptyImage2 = _interopRequireDefault(_getEmptyImage);
var _NativeTypes = require('./NativeTypes');
var NativeTypes = _interopRequireWildcard(_NativeTypes);
exports.NativeTypes = NativeTypes;
exports.getEmptyImage = _getEmptyImage2['default'];
function createHTML5Backend(manager) {
return new _HTML5Backend2['default'](manager);
}
//////////////////
// WEBPACK FOOTER
// ./~/react-dnd-html5-backend/lib/index.js
// module id = 479
// module chunks = 4

View file

@ -0,0 +1,43 @@
"use strict";
exports.__esModule = true;
exports["default"] = shallowEqual;
function shallowEqual(objA, objB) {
if (objA === objB) {
return true;
}
var keysA = Object.keys(objA);
var keysB = Object.keys(objB);
if (keysA.length !== keysB.length) {
return false;
}
// Test for A's keys different from B.
var hasOwn = Object.prototype.hasOwnProperty;
for (var i = 0; i < keysA.length; i++) {
if (!hasOwn.call(objB, keysA[i]) || objA[keysA[i]] !== objB[keysA[i]]) {
return false;
}
var valA = objA[keysA[i]];
var valB = objB[keysA[i]];
if (valA !== valB) {
return false;
}
}
return true;
}
module.exports = exports["default"];
//////////////////
// WEBPACK FOOTER
// ./~/react-dnd-html5-backend/lib/shallowEqual.js
// module id = 2703
// module chunks = 4

View file

@ -0,0 +1,32 @@
var baseFlatten = require('../internal/baseFlatten'),
baseUniq = require('../internal/baseUniq'),
restParam = require('../function/restParam');
/**
* Creates an array of unique values, in order, from all of the provided arrays
* using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
* for equality comparisons.
*
* @static
* @memberOf _
* @category Array
* @param {...Array} [arrays] The arrays to inspect.
* @returns {Array} Returns the new array of combined values.
* @example
*
* _.union([1, 2], [4, 2], [2, 1]);
* // => [1, 2, 4]
*/
var union = restParam(function(arrays) {
return baseUniq(baseFlatten(arrays, false, true));
});
module.exports = union;
//////////////////
// WEBPACK FOOTER
// ./~/react-dnd-html5-backend/~/lodash/array/union.js
// module id = 2704
// module chunks = 4

View file

@ -0,0 +1,35 @@
var baseDifference = require('../internal/baseDifference'),
isArrayLike = require('../internal/isArrayLike'),
restParam = require('../function/restParam');
/**
* Creates an array excluding all provided values using
* [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
* for equality comparisons.
*
* @static
* @memberOf _
* @category Array
* @param {Array} array The array to filter.
* @param {...*} [values] The values to exclude.
* @returns {Array} Returns the new array of filtered values.
* @example
*
* _.without([1, 2, 1, 3], 1, 2);
* // => [3]
*/
var without = restParam(function(array, values) {
return isArrayLike(array)
? baseDifference(array, values)
: [];
});
module.exports = without;
//////////////////
// WEBPACK FOOTER
// ./~/react-dnd-html5-backend/~/lodash/array/without.js
// module id = 2705
// module chunks = 4

View file

@ -0,0 +1,88 @@
var MapCache = require('../internal/MapCache');
/** Used as the `TypeError` message for "Functions" methods. */
var FUNC_ERROR_TEXT = 'Expected a function';
/**
* Creates a function that memoizes the result of `func`. If `resolver` is
* provided it determines the cache key for storing the result based on the
* arguments provided to the memoized function. By default, the first argument
* provided to the memoized function is coerced to a string and used as the
* cache key. The `func` is invoked with the `this` binding of the memoized
* function.
*
* **Note:** The cache is exposed as the `cache` property on the memoized
* function. Its creation may be customized by replacing the `_.memoize.Cache`
* constructor with one whose instances implement the [`Map`](http://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-map-prototype-object)
* method interface of `get`, `has`, and `set`.
*
* @static
* @memberOf _
* @category Function
* @param {Function} func The function to have its output memoized.
* @param {Function} [resolver] The function to resolve the cache key.
* @returns {Function} Returns the new memoizing function.
* @example
*
* var upperCase = _.memoize(function(string) {
* return string.toUpperCase();
* });
*
* upperCase('fred');
* // => 'FRED'
*
* // modifying the result cache
* upperCase.cache.set('fred', 'BARNEY');
* upperCase('fred');
* // => 'BARNEY'
*
* // replacing `_.memoize.Cache`
* var object = { 'user': 'fred' };
* var other = { 'user': 'barney' };
* var identity = _.memoize(_.identity);
*
* identity(object);
* // => { 'user': 'fred' }
* identity(other);
* // => { 'user': 'fred' }
*
* _.memoize.Cache = WeakMap;
* var identity = _.memoize(_.identity);
*
* identity(object);
* // => { 'user': 'fred' }
* identity(other);
* // => { 'user': 'barney' }
*/
function memoize(func, resolver) {
if (typeof func != 'function' || (resolver && typeof resolver != 'function')) {
throw new TypeError(FUNC_ERROR_TEXT);
}
var memoized = function() {
var args = arguments,
key = resolver ? resolver.apply(this, args) : args[0],
cache = memoized.cache;
if (cache.has(key)) {
return cache.get(key);
}
var result = func.apply(this, args);
memoized.cache = cache.set(key, result);
return result;
};
memoized.cache = new memoize.Cache;
return memoized;
}
// Assign cache to `_.memoize`.
memoize.Cache = MapCache;
module.exports = memoize;
//////////////////
// WEBPACK FOOTER
// ./~/react-dnd-html5-backend/~/lodash/function/memoize.js
// module id = 2706
// module chunks = 4

View file

@ -0,0 +1,66 @@
/** Used as the `TypeError` message for "Functions" methods. */
var FUNC_ERROR_TEXT = 'Expected a function';
/* Native method references for those with the same name as other `lodash` methods. */
var nativeMax = Math.max;
/**
* Creates a function that invokes `func` with the `this` binding of the
* created function and arguments from `start` and beyond provided as an array.
*
* **Note:** This method is based on the [rest parameter](https://developer.mozilla.org/Web/JavaScript/Reference/Functions/rest_parameters).
*
* @static
* @memberOf _
* @category Function
* @param {Function} func The function to apply a rest parameter to.
* @param {number} [start=func.length-1] The start position of the rest parameter.
* @returns {Function} Returns the new function.
* @example
*
* var say = _.restParam(function(what, names) {
* return what + ' ' + _.initial(names).join(', ') +
* (_.size(names) > 1 ? ', & ' : '') + _.last(names);
* });
*
* say('hello', 'fred', 'barney', 'pebbles');
* // => 'hello fred, barney, & pebbles'
*/
function restParam(func, start) {
if (typeof func != 'function') {
throw new TypeError(FUNC_ERROR_TEXT);
}
start = nativeMax(start === undefined ? (func.length - 1) : (+start || 0), 0);
return function() {
var args = arguments,
index = -1,
length = nativeMax(args.length - start, 0),
rest = Array(length);
while (++index < length) {
rest[index] = args[start + index];
}
switch (start) {
case 0: return func.call(this, rest);
case 1: return func.call(this, args[0], rest);
case 2: return func.call(this, args[0], args[1], rest);
}
var otherArgs = Array(start + 1);
index = -1;
while (++index < start) {
otherArgs[index] = args[index];
}
otherArgs[start] = rest;
return func.apply(this, otherArgs);
};
}
module.exports = restParam;
//////////////////
// WEBPACK FOOTER
// ./~/react-dnd-html5-backend/~/lodash/function/restParam.js
// module id = 435
// module chunks = 4

View file

@ -0,0 +1,32 @@
var mapDelete = require('./mapDelete'),
mapGet = require('./mapGet'),
mapHas = require('./mapHas'),
mapSet = require('./mapSet');
/**
* Creates a cache object to store key/value pairs.
*
* @private
* @static
* @name Cache
* @memberOf _.memoize
*/
function MapCache() {
this.__data__ = {};
}
// Add functions to the `Map` cache.
MapCache.prototype['delete'] = mapDelete;
MapCache.prototype.get = mapGet;
MapCache.prototype.has = mapHas;
MapCache.prototype.set = mapSet;
module.exports = MapCache;
//////////////////
// WEBPACK FOOTER
// ./~/react-dnd-html5-backend/~/lodash/internal/MapCache.js
// module id = 2707
// module chunks = 4

View file

@ -0,0 +1,37 @@
var cachePush = require('./cachePush'),
getNative = require('./getNative');
/** Native method references. */
var Set = getNative(global, 'Set');
/* Native method references for those with the same name as other `lodash` methods. */
var nativeCreate = getNative(Object, 'create');
/**
*
* Creates a cache object to store unique values.
*
* @private
* @param {Array} [values] The values to cache.
*/
function SetCache(values) {
var length = values ? values.length : 0;
this.data = { 'hash': nativeCreate(null), 'set': new Set };
while (length--) {
this.push(values[length]);
}
}
// Add functions to the `Set` cache.
SetCache.prototype.push = cachePush;
module.exports = SetCache;
//////////////////
// WEBPACK FOOTER
// ./~/react-dnd-html5-backend/~/lodash/internal/SetCache.js
// module id = 2708
// module chunks = 4

View file

@ -0,0 +1,28 @@
/**
* Appends the elements of `values` to `array`.
*
* @private
* @param {Array} array The array to modify.
* @param {Array} values The values to append.
* @returns {Array} Returns `array`.
*/
function arrayPush(array, values) {
var index = -1,
length = values.length,
offset = array.length;
while (++index < length) {
array[offset + index] = values[index];
}
return array;
}
module.exports = arrayPush;
//////////////////
// WEBPACK FOOTER
// ./~/react-dnd-html5-backend/~/lodash/internal/arrayPush.js
// module id = 2709
// module chunks = 4

View file

@ -0,0 +1,21 @@
/**
* Used by `_.defaults` to customize its `_.assign` use.
*
* @private
* @param {*} objectValue The destination object property value.
* @param {*} sourceValue The source object property value.
* @returns {*} Returns the value to assign to the destination object.
*/
function assignDefaults(objectValue, sourceValue) {
return objectValue === undefined ? sourceValue : objectValue;
}
module.exports = assignDefaults;
//////////////////
// WEBPACK FOOTER
// ./~/react-dnd-html5-backend/~/lodash/internal/assignDefaults.js
// module id = 2710
// module chunks = 4

View file

@ -0,0 +1,40 @@
var keys = require('../object/keys');
/**
* A specialized version of `_.assign` for customizing assigned values without
* support for argument juggling, multiple sources, and `this` binding `customizer`
* functions.
*
* @private
* @param {Object} object The destination object.
* @param {Object} source The source object.
* @param {Function} customizer The function to customize assigned values.
* @returns {Object} Returns `object`.
*/
function assignWith(object, source, customizer) {
var index = -1,
props = keys(source),
length = props.length;
while (++index < length) {
var key = props[index],
value = object[key],
result = customizer(value, source[key], key, object, source);
if ((result === result ? (result !== value) : (value === value)) ||
(value === undefined && !(key in object))) {
object[key] = result;
}
}
return object;
}
module.exports = assignWith;
//////////////////
// WEBPACK FOOTER
// ./~/react-dnd-html5-backend/~/lodash/internal/assignWith.js
// module id = 2711
// module chunks = 4

View file

@ -0,0 +1,27 @@
var baseCopy = require('./baseCopy'),
keys = require('../object/keys');
/**
* The base implementation of `_.assign` without support for argument juggling,
* multiple sources, and `customizer` functions.
*
* @private
* @param {Object} object The destination object.
* @param {Object} source The source object.
* @returns {Object} Returns `object`.
*/
function baseAssign(object, source) {
return source == null
? object
: baseCopy(source, keys(source), object);
}
module.exports = baseAssign;
//////////////////
// WEBPACK FOOTER
// ./~/react-dnd-html5-backend/~/lodash/internal/baseAssign.js
// module id = 2712
// module chunks = 4

View file

@ -0,0 +1,31 @@
/**
* Copies properties of `source` to `object`.
*
* @private
* @param {Object} source The object to copy properties from.
* @param {Array} props The property names to copy.
* @param {Object} [object={}] The object to copy properties to.
* @returns {Object} Returns `object`.
*/
function baseCopy(source, props, object) {
object || (object = {});
var index = -1,
length = props.length;
while (++index < length) {
var key = props[index];
object[key] = source[key];
}
return object;
}
module.exports = baseCopy;
//////////////////
// WEBPACK FOOTER
// ./~/react-dnd-html5-backend/~/lodash/internal/baseCopy.js
// module id = 2713
// module chunks = 4

View file

@ -0,0 +1,63 @@
var baseIndexOf = require('./baseIndexOf'),
cacheIndexOf = require('./cacheIndexOf'),
createCache = require('./createCache');
/** Used as the size to enable large array optimizations. */
var LARGE_ARRAY_SIZE = 200;
/**
* The base implementation of `_.difference` which accepts a single array
* of values to exclude.
*
* @private
* @param {Array} array The array to inspect.
* @param {Array} values The values to exclude.
* @returns {Array} Returns the new array of filtered values.
*/
function baseDifference(array, values) {
var length = array ? array.length : 0,
result = [];
if (!length) {
return result;
}
var index = -1,
indexOf = baseIndexOf,
isCommon = true,
cache = (isCommon && values.length >= LARGE_ARRAY_SIZE) ? createCache(values) : null,
valuesLength = values.length;
if (cache) {
indexOf = cacheIndexOf;
isCommon = false;
values = cache;
}
outer:
while (++index < length) {
var value = array[index];
if (isCommon && value === value) {
var valuesIndex = valuesLength;
while (valuesIndex--) {
if (values[valuesIndex] === value) {
continue outer;
}
}
result.push(value);
}
else if (indexOf(values, value, 0) < 0) {
result.push(value);
}
}
return result;
}
module.exports = baseDifference;
//////////////////
// WEBPACK FOOTER
// ./~/react-dnd-html5-backend/~/lodash/internal/baseDifference.js
// module id = 2714
// module chunks = 4

View file

@ -0,0 +1,49 @@
var arrayPush = require('./arrayPush'),
isArguments = require('../lang/isArguments'),
isArray = require('../lang/isArray'),
isArrayLike = require('./isArrayLike'),
isObjectLike = require('./isObjectLike');
/**
* The base implementation of `_.flatten` with added support for restricting
* flattening and specifying the start index.
*
* @private
* @param {Array} array The array to flatten.
* @param {boolean} [isDeep] Specify a deep flatten.
* @param {boolean} [isStrict] Restrict flattening to arrays-like objects.
* @param {Array} [result=[]] The initial result value.
* @returns {Array} Returns the new flattened array.
*/
function baseFlatten(array, isDeep, isStrict, result) {
result || (result = []);
var index = -1,
length = array.length;
while (++index < length) {
var value = array[index];
if (isObjectLike(value) && isArrayLike(value) &&
(isStrict || isArray(value) || isArguments(value))) {
if (isDeep) {
// Recursively flatten arrays (susceptible to call stack limits).
baseFlatten(value, isDeep, isStrict, result);
} else {
arrayPush(result, value);
}
} else if (!isStrict) {
result[result.length] = value;
}
}
return result;
}
module.exports = baseFlatten;
//////////////////
// WEBPACK FOOTER
// ./~/react-dnd-html5-backend/~/lodash/internal/baseFlatten.js
// module id = 2715
// module chunks = 4

View file

@ -0,0 +1,35 @@
var indexOfNaN = require('./indexOfNaN');
/**
* The base implementation of `_.indexOf` without support for binary searches.
*
* @private
* @param {Array} array The array to search.
* @param {*} value The value to search for.
* @param {number} fromIndex The index to search from.
* @returns {number} Returns the index of the matched value, else `-1`.
*/
function baseIndexOf(array, value, fromIndex) {
if (value !== value) {
return indexOfNaN(array, fromIndex);
}
var index = fromIndex - 1,
length = array.length;
while (++index < length) {
if (array[index] === value) {
return index;
}
}
return -1;
}
module.exports = baseIndexOf;
//////////////////
// WEBPACK FOOTER
// ./~/react-dnd-html5-backend/~/lodash/internal/baseIndexOf.js
// module id = 1115
// module chunks = 4

View file

@ -0,0 +1,22 @@
/**
* The base implementation of `_.property` without support for deep paths.
*
* @private
* @param {string} key The key of the property to get.
* @returns {Function} Returns the new function.
*/
function baseProperty(key) {
return function(object) {
return object == null ? undefined : object[key];
};
}
module.exports = baseProperty;
//////////////////
// WEBPACK FOOTER
// ./~/react-dnd-html5-backend/~/lodash/internal/baseProperty.js
// module id = 2716
// module chunks = 4

View file

@ -0,0 +1,68 @@
var baseIndexOf = require('./baseIndexOf'),
cacheIndexOf = require('./cacheIndexOf'),
createCache = require('./createCache');
/** Used as the size to enable large array optimizations. */
var LARGE_ARRAY_SIZE = 200;
/**
* The base implementation of `_.uniq` without support for callback shorthands
* and `this` binding.
*
* @private
* @param {Array} array The array to inspect.
* @param {Function} [iteratee] The function invoked per iteration.
* @returns {Array} Returns the new duplicate free array.
*/
function baseUniq(array, iteratee) {
var index = -1,
indexOf = baseIndexOf,
length = array.length,
isCommon = true,
isLarge = isCommon && length >= LARGE_ARRAY_SIZE,
seen = isLarge ? createCache() : null,
result = [];
if (seen) {
indexOf = cacheIndexOf;
isCommon = false;
} else {
isLarge = false;
seen = iteratee ? [] : result;
}
outer:
while (++index < length) {
var value = array[index],
computed = iteratee ? iteratee(value, index, array) : value;
if (isCommon && value === value) {
var seenIndex = seen.length;
while (seenIndex--) {
if (seen[seenIndex] === computed) {
continue outer;
}
}
if (iteratee) {
seen.push(computed);
}
result.push(value);
}
else if (indexOf(seen, computed, 0) < 0) {
if (iteratee || isLarge) {
seen.push(computed);
}
result.push(value);
}
}
return result;
}
module.exports = baseUniq;
//////////////////
// WEBPACK FOOTER
// ./~/react-dnd-html5-backend/~/lodash/internal/baseUniq.js
// module id = 2717
// module chunks = 4

View file

@ -0,0 +1,47 @@
var identity = require('../utility/identity');
/**
* A specialized version of `baseCallback` which only supports `this` binding
* and specifying the number of arguments to provide to `func`.
*
* @private
* @param {Function} func The function to bind.
* @param {*} thisArg The `this` binding of `func`.
* @param {number} [argCount] The number of arguments to provide to `func`.
* @returns {Function} Returns the callback.
*/
function bindCallback(func, thisArg, argCount) {
if (typeof func != 'function') {
return identity;
}
if (thisArg === undefined) {
return func;
}
switch (argCount) {
case 1: return function(value) {
return func.call(thisArg, value);
};
case 3: return function(value, index, collection) {
return func.call(thisArg, value, index, collection);
};
case 4: return function(accumulator, value, index, collection) {
return func.call(thisArg, accumulator, value, index, collection);
};
case 5: return function(value, other, key, object, source) {
return func.call(thisArg, value, other, key, object, source);
};
}
return function() {
return func.apply(thisArg, arguments);
};
}
module.exports = bindCallback;
//////////////////
// WEBPACK FOOTER
// ./~/react-dnd-html5-backend/~/lodash/internal/bindCallback.js
// module id = 2718
// module chunks = 4

View file

@ -0,0 +1,27 @@
var isObject = require('../lang/isObject');
/**
* Checks if `value` is in `cache` mimicking the return signature of
* `_.indexOf` by returning `0` if the value is found, else `-1`.
*
* @private
* @param {Object} cache The cache to search.
* @param {*} value The value to search for.
* @returns {number} Returns `0` if `value` is found, else `-1`.
*/
function cacheIndexOf(cache, value) {
var data = cache.data,
result = (typeof value == 'string' || isObject(value)) ? data.set.has(value) : data.hash[value];
return result ? 0 : -1;
}
module.exports = cacheIndexOf;
//////////////////
// WEBPACK FOOTER
// ./~/react-dnd-html5-backend/~/lodash/internal/cacheIndexOf.js
// module id = 1116
// module chunks = 4

View file

@ -0,0 +1,28 @@
var isObject = require('../lang/isObject');
/**
* Adds `value` to the cache.
*
* @private
* @name push
* @memberOf SetCache
* @param {*} value The value to cache.
*/
function cachePush(value) {
var data = this.data;
if (typeof value == 'string' || isObject(value)) {
data.set.add(value);
} else {
data.hash[value] = true;
}
}
module.exports = cachePush;
//////////////////
// WEBPACK FOOTER
// ./~/react-dnd-html5-backend/~/lodash/internal/cachePush.js
// module id = 2719
// module chunks = 4

View file

@ -0,0 +1,49 @@
var bindCallback = require('./bindCallback'),
isIterateeCall = require('./isIterateeCall'),
restParam = require('../function/restParam');
/**
* Creates a `_.assign`, `_.defaults`, or `_.merge` function.
*
* @private
* @param {Function} assigner The function to assign values.
* @returns {Function} Returns the new assigner function.
*/
function createAssigner(assigner) {
return restParam(function(object, sources) {
var index = -1,
length = object == null ? 0 : sources.length,
customizer = length > 2 ? sources[length - 2] : undefined,
guard = length > 2 ? sources[2] : undefined,
thisArg = length > 1 ? sources[length - 1] : undefined;
if (typeof customizer == 'function') {
customizer = bindCallback(customizer, thisArg, 5);
length -= 2;
} else {
customizer = typeof thisArg == 'function' ? thisArg : undefined;
length -= (customizer ? 1 : 0);
}
if (guard && isIterateeCall(sources[0], sources[1], guard)) {
customizer = length < 3 ? undefined : customizer;
length = 1;
}
while (++index < length) {
var source = sources[index];
if (source) {
assigner(object, source, customizer);
}
}
return object;
});
}
module.exports = createAssigner;
//////////////////
// WEBPACK FOOTER
// ./~/react-dnd-html5-backend/~/lodash/internal/createAssigner.js
// module id = 2720
// module chunks = 4

View file

@ -0,0 +1,29 @@
var SetCache = require('./SetCache'),
getNative = require('./getNative');
/** Native method references. */
var Set = getNative(global, 'Set');
/* Native method references for those with the same name as other `lodash` methods. */
var nativeCreate = getNative(Object, 'create');
/**
* Creates a `Set` cache object to optimize linear searches of large arrays.
*
* @private
* @param {Array} [values] The values to cache.
* @returns {null|Object} Returns the new cache object if `Set` is supported, else `null`.
*/
function createCache(values) {
return (nativeCreate && Set) ? new SetCache(values) : null;
}
module.exports = createCache;
//////////////////
// WEBPACK FOOTER
// ./~/react-dnd-html5-backend/~/lodash/internal/createCache.js
// module id = 1117
// module chunks = 4

View file

@ -0,0 +1,30 @@
var restParam = require('../function/restParam');
/**
* Creates a `_.defaults` or `_.defaultsDeep` function.
*
* @private
* @param {Function} assigner The function to assign values.
* @param {Function} customizer The function to customize assigned values.
* @returns {Function} Returns the new defaults function.
*/
function createDefaults(assigner, customizer) {
return restParam(function(args) {
var object = args[0];
if (object == null) {
return object;
}
args.push(customizer);
return assigner.apply(undefined, args);
});
}
module.exports = createDefaults;
//////////////////
// WEBPACK FOOTER
// ./~/react-dnd-html5-backend/~/lodash/internal/createDefaults.js
// module id = 2721
// module chunks = 4

View file

@ -0,0 +1,23 @@
var baseProperty = require('./baseProperty');
/**
* Gets the "length" property value of `object`.
*
* **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792)
* that affects Safari on at least iOS 8.1-8.3 ARM64.
*
* @private
* @param {Object} object The object to query.
* @returns {*} Returns the "length" value.
*/
var getLength = baseProperty('length');
module.exports = getLength;
//////////////////
// WEBPACK FOOTER
// ./~/react-dnd-html5-backend/~/lodash/internal/getLength.js
// module id = 2722
// module chunks = 4

View file

@ -0,0 +1,24 @@
var isNative = require('../lang/isNative');
/**
* Gets the native function at `key` of `object`.
*
* @private
* @param {Object} object The object to query.
* @param {string} key The key of the method to get.
* @returns {*} Returns the function if it's native, else `undefined`.
*/
function getNative(object, key) {
var value = object == null ? undefined : object[key];
return isNative(value) ? value : undefined;
}
module.exports = getNative;
//////////////////
// WEBPACK FOOTER
// ./~/react-dnd-html5-backend/~/lodash/internal/getNative.js
// module id = 436
// module chunks = 4

View file

@ -0,0 +1,31 @@
/**
* Gets the index at which the first occurrence of `NaN` is found in `array`.
*
* @private
* @param {Array} array The array to search.
* @param {number} fromIndex The index to search from.
* @param {boolean} [fromRight] Specify iterating from right to left.
* @returns {number} Returns the index of the matched `NaN`, else `-1`.
*/
function indexOfNaN(array, fromIndex, fromRight) {
var length = array.length,
index = fromIndex + (fromRight ? 0 : -1);
while ((fromRight ? index-- : ++index < length)) {
var other = array[index];
if (other !== other) {
return index;
}
}
return -1;
}
module.exports = indexOfNaN;
//////////////////
// WEBPACK FOOTER
// ./~/react-dnd-html5-backend/~/lodash/internal/indexOfNaN.js
// module id = 2723
// module chunks = 4

View file

@ -0,0 +1,23 @@
var getLength = require('./getLength'),
isLength = require('./isLength');
/**
* Checks if `value` is array-like.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is array-like, else `false`.
*/
function isArrayLike(value) {
return value != null && isLength(getLength(value));
}
module.exports = isArrayLike;
//////////////////
// WEBPACK FOOTER
// ./~/react-dnd-html5-backend/~/lodash/internal/isArrayLike.js
// module id = 336
// module chunks = 4

View file

@ -0,0 +1,32 @@
/** Used to detect unsigned integer values. */
var reIsUint = /^\d+$/;
/**
* Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer)
* of an array-like value.
*/
var MAX_SAFE_INTEGER = 9007199254740991;
/**
* Checks if `value` is a valid array-like index.
*
* @private
* @param {*} value The value to check.
* @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
*/
function isIndex(value, length) {
value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1;
length = length == null ? MAX_SAFE_INTEGER : length;
return value > -1 && value % 1 == 0 && value < length;
}
module.exports = isIndex;
//////////////////
// WEBPACK FOOTER
// ./~/react-dnd-html5-backend/~/lodash/internal/isIndex.js
// module id = 646
// module chunks = 4

View file

@ -0,0 +1,36 @@
var isArrayLike = require('./isArrayLike'),
isIndex = require('./isIndex'),
isObject = require('../lang/isObject');
/**
* Checks if the provided arguments are from an iteratee call.
*
* @private
* @param {*} value The potential iteratee value argument.
* @param {*} index The potential iteratee index or key argument.
* @param {*} object The potential iteratee object argument.
* @returns {boolean} Returns `true` if the arguments are from an iteratee call, else `false`.
*/
function isIterateeCall(value, index, object) {
if (!isObject(object)) {
return false;
}
var type = typeof index;
if (type == 'number'
? (isArrayLike(object) && isIndex(index, object.length))
: (type == 'string' && index in object)) {
var other = object[index];
return value === value ? (value === other) : (other !== other);
}
return false;
}
module.exports = isIterateeCall;
//////////////////
// WEBPACK FOOTER
// ./~/react-dnd-html5-backend/~/lodash/internal/isIterateeCall.js
// module id = 2724
// module chunks = 4

View file

@ -0,0 +1,28 @@
/**
* Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer)
* of an array-like value.
*/
var MAX_SAFE_INTEGER = 9007199254740991;
/**
* Checks if `value` is a valid array-like length.
*
* **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
*/
function isLength(value) {
return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
}
module.exports = isLength;
//////////////////
// WEBPACK FOOTER
// ./~/react-dnd-html5-backend/~/lodash/internal/isLength.js
// module id = 437
// module chunks = 4

View file

@ -0,0 +1,20 @@
/**
* Checks if `value` is object-like.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
*/
function isObjectLike(value) {
return !!value && typeof value == 'object';
}
module.exports = isObjectLike;
//////////////////
// WEBPACK FOOTER
// ./~/react-dnd-html5-backend/~/lodash/internal/isObjectLike.js
// module id = 438
// module chunks = 4

View file

@ -0,0 +1,22 @@
/**
* Removes `key` and its value from the cache.
*
* @private
* @name delete
* @memberOf _.memoize.Cache
* @param {string} key The key of the value to remove.
* @returns {boolean} Returns `true` if the entry was removed successfully, else `false`.
*/
function mapDelete(key) {
return this.has(key) && delete this.__data__[key];
}
module.exports = mapDelete;
//////////////////
// WEBPACK FOOTER
// ./~/react-dnd-html5-backend/~/lodash/internal/mapDelete.js
// module id = 2725
// module chunks = 4

View file

@ -0,0 +1,22 @@
/**
* Gets the cached value for `key`.
*
* @private
* @name get
* @memberOf _.memoize.Cache
* @param {string} key The key of the value to get.
* @returns {*} Returns the cached value.
*/
function mapGet(key) {
return key == '__proto__' ? undefined : this.__data__[key];
}
module.exports = mapGet;
//////////////////
// WEBPACK FOOTER
// ./~/react-dnd-html5-backend/~/lodash/internal/mapGet.js
// module id = 2726
// module chunks = 4

View file

@ -0,0 +1,28 @@
/** Used for native method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* Checks if a cached value for `key` exists.
*
* @private
* @name has
* @memberOf _.memoize.Cache
* @param {string} key The key of the entry to check.
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
*/
function mapHas(key) {
return key != '__proto__' && hasOwnProperty.call(this.__data__, key);
}
module.exports = mapHas;
//////////////////
// WEBPACK FOOTER
// ./~/react-dnd-html5-backend/~/lodash/internal/mapHas.js
// module id = 2727
// module chunks = 4

View file

@ -0,0 +1,26 @@
/**
* Sets `value` to `key` of the cache.
*
* @private
* @name set
* @memberOf _.memoize.Cache
* @param {string} key The key of the value to cache.
* @param {*} value The value to cache.
* @returns {Object} Returns the cache object.
*/
function mapSet(key, value) {
if (key != '__proto__') {
this.__data__[key] = value;
}
return this;
}
module.exports = mapSet;
//////////////////
// WEBPACK FOOTER
// ./~/react-dnd-html5-backend/~/lodash/internal/mapSet.js
// module id = 2728
// module chunks = 4

View file

@ -0,0 +1,49 @@
var isArguments = require('../lang/isArguments'),
isArray = require('../lang/isArray'),
isIndex = require('./isIndex'),
isLength = require('./isLength'),
keysIn = require('../object/keysIn');
/** Used for native method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* A fallback implementation of `Object.keys` which creates an array of the
* own enumerable property names of `object`.
*
* @private
* @param {Object} object The object to query.
* @returns {Array} Returns the array of property names.
*/
function shimKeys(object) {
var props = keysIn(object),
propsLength = props.length,
length = propsLength && object.length;
var allowIndexes = !!length && isLength(length) &&
(isArray(object) || isArguments(object));
var index = -1,
result = [];
while (++index < propsLength) {
var key = props[index];
if ((allowIndexes && isIndex(key, length)) || hasOwnProperty.call(object, key)) {
result.push(key);
}
}
return result;
}
module.exports = shimKeys;
//////////////////
// WEBPACK FOOTER
// ./~/react-dnd-html5-backend/~/lodash/internal/shimKeys.js
// module id = 2729
// module chunks = 4

View file

@ -0,0 +1,42 @@
var isArrayLike = require('../internal/isArrayLike'),
isObjectLike = require('../internal/isObjectLike');
/** Used for native method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/** Native method references. */
var propertyIsEnumerable = objectProto.propertyIsEnumerable;
/**
* Checks if `value` is classified as an `arguments` object.
*
* @static
* @memberOf _
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
* @example
*
* _.isArguments(function() { return arguments; }());
* // => true
*
* _.isArguments([1, 2, 3]);
* // => false
*/
function isArguments(value) {
return isObjectLike(value) && isArrayLike(value) &&
hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee');
}
module.exports = isArguments;
//////////////////
// WEBPACK FOOTER
// ./~/react-dnd-html5-backend/~/lodash/lang/isArguments.js
// module id = 647
// module chunks = 4

View file

@ -0,0 +1,48 @@
var getNative = require('../internal/getNative'),
isLength = require('../internal/isLength'),
isObjectLike = require('../internal/isObjectLike');
/** `Object#toString` result references. */
var arrayTag = '[object Array]';
/** Used for native method references. */
var objectProto = Object.prototype;
/**
* Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
* of values.
*/
var objToString = objectProto.toString;
/* Native method references for those with the same name as other `lodash` methods. */
var nativeIsArray = getNative(Array, 'isArray');
/**
* Checks if `value` is classified as an `Array` object.
*
* @static
* @memberOf _
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
* @example
*
* _.isArray([1, 2, 3]);
* // => true
*
* _.isArray(function() { return arguments; }());
* // => false
*/
var isArray = nativeIsArray || function(value) {
return isObjectLike(value) && isLength(value.length) && objToString.call(value) == arrayTag;
};
module.exports = isArray;
//////////////////
// WEBPACK FOOTER
// ./~/react-dnd-html5-backend/~/lodash/lang/isArray.js
// module id = 648
// module chunks = 4

View file

@ -0,0 +1,46 @@
var isObject = require('./isObject');
/** `Object#toString` result references. */
var funcTag = '[object Function]';
/** Used for native method references. */
var objectProto = Object.prototype;
/**
* Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
* of values.
*/
var objToString = objectProto.toString;
/**
* Checks if `value` is classified as a `Function` object.
*
* @static
* @memberOf _
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
* @example
*
* _.isFunction(_);
* // => true
*
* _.isFunction(/abc/);
* // => false
*/
function isFunction(value) {
// The use of `Object#toString` avoids issues with the `typeof` operator
// in older versions of Chrome and Safari which return 'function' for regexes
// and Safari 8 which returns 'object' for typed array constructors.
return isObject(value) && objToString.call(value) == funcTag;
}
module.exports = isFunction;
//////////////////
// WEBPACK FOOTER
// ./~/react-dnd-html5-backend/~/lodash/lang/isFunction.js
// module id = 2730
// module chunks = 4

View file

@ -0,0 +1,56 @@
var isFunction = require('./isFunction'),
isObjectLike = require('../internal/isObjectLike');
/** Used to detect host constructors (Safari > 5). */
var reIsHostCtor = /^\[object .+?Constructor\]$/;
/** Used for native method references. */
var objectProto = Object.prototype;
/** Used to resolve the decompiled source of functions. */
var fnToString = Function.prototype.toString;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/** Used to detect if a method is native. */
var reIsNative = RegExp('^' +
fnToString.call(hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g, '\\$&')
.replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
);
/**
* Checks if `value` is a native function.
*
* @static
* @memberOf _
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a native function, else `false`.
* @example
*
* _.isNative(Array.prototype.push);
* // => true
*
* _.isNative(_);
* // => false
*/
function isNative(value) {
if (value == null) {
return false;
}
if (isFunction(value)) {
return reIsNative.test(fnToString.call(value));
}
return isObjectLike(value) && reIsHostCtor.test(value);
}
module.exports = isNative;
//////////////////
// WEBPACK FOOTER
// ./~/react-dnd-html5-backend/~/lodash/lang/isNative.js
// module id = 2731
// module chunks = 4

View file

@ -0,0 +1,36 @@
/**
* Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
* (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
*
* @static
* @memberOf _
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
* @example
*
* _.isObject({});
* // => true
*
* _.isObject([1, 2, 3]);
* // => true
*
* _.isObject(1);
* // => false
*/
function isObject(value) {
// Avoid a V8 JIT bug in Chrome 19-20.
// See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
var type = typeof value;
return !!value && (type == 'object' || type == 'function');
}
module.exports = isObject;
//////////////////
// WEBPACK FOOTER
// ./~/react-dnd-html5-backend/~/lodash/lang/isObject.js
// module id = 284
// module chunks = 4

View file

@ -0,0 +1,51 @@
var assignWith = require('../internal/assignWith'),
baseAssign = require('../internal/baseAssign'),
createAssigner = require('../internal/createAssigner');
/**
* Assigns own enumerable properties of source object(s) to the destination
* object. Subsequent sources overwrite property assignments of previous sources.
* If `customizer` is provided it's invoked to produce the assigned values.
* The `customizer` is bound to `thisArg` and invoked with five arguments:
* (objectValue, sourceValue, key, object, source).
*
* **Note:** This method mutates `object` and is based on
* [`Object.assign`](http://ecma-international.org/ecma-262/6.0/#sec-object.assign).
*
* @static
* @memberOf _
* @alias extend
* @category Object
* @param {Object} object The destination object.
* @param {...Object} [sources] The source objects.
* @param {Function} [customizer] The function to customize assigned values.
* @param {*} [thisArg] The `this` binding of `customizer`.
* @returns {Object} Returns `object`.
* @example
*
* _.assign({ 'user': 'barney' }, { 'age': 40 }, { 'user': 'fred' });
* // => { 'user': 'fred', 'age': 40 }
*
* // using a customizer callback
* var defaults = _.partialRight(_.assign, function(value, other) {
* return _.isUndefined(value) ? other : value;
* });
*
* defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' });
* // => { 'user': 'barney', 'age': 36 }
*/
var assign = createAssigner(function(object, source, customizer) {
return customizer
? assignWith(object, source, customizer)
: baseAssign(object, source);
});
module.exports = assign;
//////////////////
// WEBPACK FOOTER
// ./~/react-dnd-html5-backend/~/lodash/object/assign.js
// module id = 2732
// module chunks = 4

View file

@ -0,0 +1,33 @@
var assign = require('./assign'),
assignDefaults = require('../internal/assignDefaults'),
createDefaults = require('../internal/createDefaults');
/**
* Assigns own enumerable properties of source object(s) to the destination
* object for all destination properties that resolve to `undefined`. Once a
* property is set, additional values of the same property are ignored.
*
* **Note:** This method mutates `object`.
*
* @static
* @memberOf _
* @category Object
* @param {Object} object The destination object.
* @param {...Object} [sources] The source objects.
* @returns {Object} Returns `object`.
* @example
*
* _.defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' });
* // => { 'user': 'barney', 'age': 36 }
*/
var defaults = createDefaults(assign, assignDefaults);
module.exports = defaults;
//////////////////
// WEBPACK FOOTER
// ./~/react-dnd-html5-backend/~/lodash/object/defaults.js
// module id = 2733
// module chunks = 4

View file

@ -0,0 +1,53 @@
var getNative = require('../internal/getNative'),
isArrayLike = require('../internal/isArrayLike'),
isObject = require('../lang/isObject'),
shimKeys = require('../internal/shimKeys');
/* Native method references for those with the same name as other `lodash` methods. */
var nativeKeys = getNative(Object, 'keys');
/**
* Creates an array of the own enumerable property names of `object`.
*
* **Note:** Non-object values are coerced to objects. See the
* [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys)
* for more details.
*
* @static
* @memberOf _
* @category Object
* @param {Object} object The object to query.
* @returns {Array} Returns the array of property names.
* @example
*
* function Foo() {
* this.a = 1;
* this.b = 2;
* }
*
* Foo.prototype.c = 3;
*
* _.keys(new Foo);
* // => ['a', 'b'] (iteration order is not guaranteed)
*
* _.keys('hi');
* // => ['0', '1']
*/
var keys = !nativeKeys ? shimKeys : function(object) {
var Ctor = object == null ? undefined : object.constructor;
if ((typeof Ctor == 'function' && Ctor.prototype === object) ||
(typeof object != 'function' && isArrayLike(object))) {
return shimKeys(object);
}
return isObject(object) ? nativeKeys(object) : [];
};
module.exports = keys;
//////////////////
// WEBPACK FOOTER
// ./~/react-dnd-html5-backend/~/lodash/object/keys.js
// module id = 1118
// module chunks = 4

View file

@ -0,0 +1,72 @@
var isArguments = require('../lang/isArguments'),
isArray = require('../lang/isArray'),
isIndex = require('../internal/isIndex'),
isLength = require('../internal/isLength'),
isObject = require('../lang/isObject');
/** Used for native method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* Creates an array of the own and inherited enumerable property names of `object`.
*
* **Note:** Non-object values are coerced to objects.
*
* @static
* @memberOf _
* @category Object
* @param {Object} object The object to query.
* @returns {Array} Returns the array of property names.
* @example
*
* function Foo() {
* this.a = 1;
* this.b = 2;
* }
*
* Foo.prototype.c = 3;
*
* _.keysIn(new Foo);
* // => ['a', 'b', 'c'] (iteration order is not guaranteed)
*/
function keysIn(object) {
if (object == null) {
return [];
}
if (!isObject(object)) {
object = Object(object);
}
var length = object.length;
length = (length && isLength(length) &&
(isArray(object) || isArguments(object)) && length) || 0;
var Ctor = object.constructor,
index = -1,
isProto = typeof Ctor == 'function' && Ctor.prototype === object,
result = Array(length),
skipIndexes = length > 0;
while (++index < length) {
result[index] = (index + '');
}
for (var key in object) {
if (!(skipIndexes && isIndex(key, length)) &&
!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
result.push(key);
}
}
return result;
}
module.exports = keysIn;
//////////////////
// WEBPACK FOOTER
// ./~/react-dnd-html5-backend/~/lodash/object/keysIn.js
// module id = 2734
// module chunks = 4

View file

@ -0,0 +1,28 @@
/**
* This method returns the first argument provided to it.
*
* @static
* @memberOf _
* @category Utility
* @param {*} value Any value.
* @returns {*} Returns `value`.
* @example
*
* var object = { 'user': 'fred' };
*
* _.identity(object) === object;
* // => true
*/
function identity(value) {
return value;
}
module.exports = identity;
//////////////////
// WEBPACK FOOTER
// ./~/react-dnd-html5-backend/~/lodash/utility/identity.js
// module id = 2735
// module chunks = 4