prototypo-library
Version:
This is prototypo parametric font library
1,797 lines (1,477 loc) • 730 kB
JavaScript
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory(require("bluebird"), require("node-fetch"), require("util"));
else if(typeof define === 'function' && define.amd)
define(["bluebird", "node-fetch", "util"], factory);
else if(typeof exports === 'object')
exports["Ptypo"] = factory(require("bluebird"), require("node-fetch"), require("util"));
else
root["Ptypo"] = factory(root["bluebird"], root["node-fetch"], root["util"]);
})(typeof self !== 'undefined' ? self : this, function(__WEBPACK_EXTERNAL_MODULE_1__, __WEBPACK_EXTERNAL_MODULE_2__, __WEBPACK_EXTERNAL_MODULE_474__) {
return /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, {
/******/ configurable: false,
/******/ enumerable: true,
/******/ get: getter
/******/ });
/******/ }
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 1024);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
if (true) {
module.exports = __webpack_require__(238);
} else {
module.exports = require('./dist/react-hot-loader.development.js');
}
/***/ }),
/* 1 */
/***/ (function(module, exports) {
module.exports = __WEBPACK_EXTERNAL_MODULE_1__;
/***/ }),
/* 2 */
/***/ (function(module, exports) {
module.exports = __WEBPACK_EXTERNAL_MODULE_2__;
/***/ }),
/* 3 */
/***/ (function(module, exports) {
module.exports = function(module) {
if(!module.webpackPolyfill) {
module.deprecate = function() {};
module.paths = [];
// module.parent = undefined by default
if(!module.children) module.children = [];
Object.defineProperty(module, "loaded", {
enumerable: true,
get: function() {
return module.l;
}
});
Object.defineProperty(module, "id", {
enumerable: true,
get: function() {
return module.i;
}
});
module.webpackPolyfill = 1;
}
return module;
};
/***/ }),
/* 4 */,
/* 5 */
/***/ (function(module, exports) {
module.exports = function(originalModule) {
if(!originalModule.webpackPolyfill) {
var module = Object.create(originalModule);
// module.parent = undefined by default
if(!module.children) module.children = [];
Object.defineProperty(module, "loaded", {
enumerable: true,
get: function() {
return module.l;
}
});
Object.defineProperty(module, "id", {
enumerable: true,
get: function() {
return module.i;
}
});
Object.defineProperty(module, "exports", {
enumerable: true,
});
module.webpackPolyfill = 1;
}
return module;
};
/***/ }),
/* 6 */,
/* 7 */,
/* 8 */,
/* 9 */,
/* 10 */,
/* 11 */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(module) {(function () {
var enterModule = __webpack_require__(0).enterModule;
enterModule && enterModule(module);
})();
/*** IMPORTS FROM imports-loader ***/
var fetch = __webpack_require__(2);
/*** IMPORTS FROM imports-loader ***/
var Promise = __webpack_require__(1);
/**
* Checks if `value` is classified as an `Array` object.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an array, else `false`.
* @example
*
* _.isArray([1, 2, 3]);
* // => true
*
* _.isArray(document.body.children);
* // => false
*
* _.isArray('abc');
* // => false
*
* _.isArray(_.noop);
* // => false
*/
var isArray = Array.isArray;
module.exports = isArray;
;
(function () {
var reactHotLoader = __webpack_require__(0).default;
var leaveModule = __webpack_require__(0).leaveModule;
if (!reactHotLoader) {
return;
}
reactHotLoader.register(isArray, "isArray", "/home/franzp/prototypo/app/scripts/prototypo.js/node_modules/lodash/isArray.js");
leaveModule(module);
})();
;
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3)(module)))
/***/ }),
/* 12 */
/***/ (function(module, exports, __webpack_require__) {
var freeGlobal = __webpack_require__(161);
/** Detect free variable `self`. */
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
/** Used as a reference to the global object. */
var root = freeGlobal || freeSelf || Function('return this')();
module.exports = root;
/***/ }),
/* 13 */
/***/ (function(module, exports) {
/**
* Checks if `value` is classified as an `Array` object.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an array, else `false`.
* @example
*
* _.isArray([1, 2, 3]);
* // => true
*
* _.isArray(document.body.children);
* // => false
*
* _.isArray('abc');
* // => false
*
* _.isArray(_.noop);
* // => false
*/
var isArray = Array.isArray;
module.exports = isArray;
/***/ }),
/* 14 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/**
* Copyright (c) 2014-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
var emptyFunction = __webpack_require__(86);
/**
* Similar to invariant but only logs a warning if the condition is not met.
* This can be used to log issues in development environments in critical
* paths. Removing the logging code for production environments will keep the
* same logic and follow the same code paths.
*/
var warning = emptyFunction;
if (Object({"LIBRARY":true}).NODE_ENV !== 'production') {
var printWarning = function printWarning(format) {
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
args[_key - 1] = arguments[_key];
}
var argIndex = 0;
var message = 'Warning: ' + format.replace(/%s/g, function () {
return args[argIndex++];
});
if (typeof console !== 'undefined') {
console.error(message);
}
try {
// --- Welcome to debugging React ---
// This error was thrown as a convenience so that you can use this stack
// to find the callsite that caused this warning to fire.
throw new Error(message);
} catch (x) {}
};
warning = function warning(condition, format) {
if (format === undefined) {
throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
}
if (format.indexOf('Failed Composite propType: ') === 0) {
return; // Ignore CompositeComponent proptype check.
}
if (!condition) {
for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
args[_key2 - 2] = arguments[_key2];
}
printWarning.apply(undefined, [format].concat(args));
}
};
}
module.exports = warning;
/***/ }),
/* 15 */,
/* 16 */,
/* 17 */,
/* 18 */,
/* 19 */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(module) {(function () {
var enterModule = __webpack_require__(0).enterModule;
enterModule && enterModule(module);
})();
/*** IMPORTS FROM imports-loader ***/
var fetch = __webpack_require__(2);
/*** IMPORTS FROM imports-loader ***/
var Promise = __webpack_require__(1);
var freeGlobal = __webpack_require__(143);
/** Detect free variable `self`. */
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
/** Used as a reference to the global object. */
var root = freeGlobal || freeSelf || Function('return this')();
module.exports = root;
;
(function () {
var reactHotLoader = __webpack_require__(0).default;
var leaveModule = __webpack_require__(0).leaveModule;
if (!reactHotLoader) {
return;
}
reactHotLoader.register(freeSelf, "freeSelf", "/home/franzp/prototypo/app/scripts/prototypo.js/node_modules/lodash/_root.js");
reactHotLoader.register(root, "root", "/home/franzp/prototypo/app/scripts/prototypo.js/node_modules/lodash/_root.js");
leaveModule(module);
})();
;
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3)(module)))
/***/ }),
/* 20 */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(module) {(function () {
var enterModule = __webpack_require__(0).enterModule;
enterModule && enterModule(module);
})();
/*** IMPORTS FROM imports-loader ***/
var fetch = __webpack_require__(2);
/*** IMPORTS FROM imports-loader ***/
var Promise = __webpack_require__(1);
/**
* Checks if `value` is the
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
*
* @static
* @memberOf _
* @since 0.1.0
* @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(_.noop);
* // => true
*
* _.isObject(null);
* // => false
*/
function isObject(value) {
var type = typeof value;
return !!value && (type == 'object' || type == 'function');
}
module.exports = isObject;
;
(function () {
var reactHotLoader = __webpack_require__(0).default;
var leaveModule = __webpack_require__(0).leaveModule;
if (!reactHotLoader) {
return;
}
reactHotLoader.register(isObject, "isObject", "/home/franzp/prototypo/app/scripts/prototypo.js/node_modules/lodash/isObject.js");
leaveModule(module);
})();
;
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3)(module)))
/***/ }),
/* 21 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/**
* Copyright (c) 2013-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*
*/
/**
* WARNING: DO NOT manually require this module.
* This is a replacement for `invariant(...)` used by the error code system
* and will _only_ be required by the corresponding babel pass.
* It always throws.
*/
function reactProdInvariant(code) {
var argCount = arguments.length - 1;
var message = 'Minified React error #' + code + '; visit ' + 'http://facebook.github.io/react/docs/error-decoder.html?invariant=' + code;
for (var argIdx = 0; argIdx < argCount; argIdx++) {
message += '&args[]=' + encodeURIComponent(arguments[argIdx + 1]);
}
message += ' for the full message or use the non-minified dev environment' + ' for full errors and additional helpful warnings.';
var error = new Error(message);
error.name = 'Invariant Violation';
error.framesToPop = 1; // we don't care about reactProdInvariant's own frame
throw error;
}
module.exports = reactProdInvariant;
/***/ }),
/* 22 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/**
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
/**
* Use invariant() to assert state which your program assumes to be true.
*
* Provide sprintf-style format (only %s is supported) and arguments
* to provide information about what broke and what you were
* expecting.
*
* The invariant message will be stripped in production, but the invariant
* will remain to ensure logic does not differ in production.
*/
var validateFormat = function validateFormat(format) {};
if (Object({"LIBRARY":true}).NODE_ENV !== 'production') {
validateFormat = function validateFormat(format) {
if (format === undefined) {
throw new Error('invariant requires an error message argument');
}
};
}
function invariant(condition, format, a, b, c, d, e, f) {
validateFormat(format);
if (!condition) {
var error;
if (format === undefined) {
error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
} else {
var args = [a, b, c, d, e, f];
var argIndex = 0;
error = new Error(format.replace(/%s/g, function () {
return args[argIndex++];
}));
error.name = 'Invariant Violation';
}
error.framesToPop = 1; // we don't care about invariant's own frame
throw error;
}
}
module.exports = invariant;
/***/ }),
/* 23 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/**
* Copyright 2014-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*/
var _assign = __webpack_require__(57);
var ReactCurrentOwner = __webpack_require__(58);
var warning = __webpack_require__(14);
var canDefineProperty = __webpack_require__(87);
var hasOwnProperty = Object.prototype.hasOwnProperty;
var REACT_ELEMENT_TYPE = __webpack_require__(137);
var RESERVED_PROPS = {
key: true,
ref: true,
__self: true,
__source: true
};
var specialPropKeyWarningShown, specialPropRefWarningShown;
function hasValidRef(config) {
if (Object({"LIBRARY":true}).NODE_ENV !== 'production') {
if (hasOwnProperty.call(config, 'ref')) {
var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;
if (getter && getter.isReactWarning) {
return false;
}
}
}
return config.ref !== undefined;
}
function hasValidKey(config) {
if (Object({"LIBRARY":true}).NODE_ENV !== 'production') {
if (hasOwnProperty.call(config, 'key')) {
var getter = Object.getOwnPropertyDescriptor(config, 'key').get;
if (getter && getter.isReactWarning) {
return false;
}
}
}
return config.key !== undefined;
}
function defineKeyPropWarningGetter(props, displayName) {
var warnAboutAccessingKey = function () {
if (!specialPropKeyWarningShown) {
specialPropKeyWarningShown = true;
Object({"LIBRARY":true}).NODE_ENV !== 'production' ? warning(false, '%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName) : void 0;
}
};
warnAboutAccessingKey.isReactWarning = true;
Object.defineProperty(props, 'key', {
get: warnAboutAccessingKey,
configurable: true
});
}
function defineRefPropWarningGetter(props, displayName) {
var warnAboutAccessingRef = function () {
if (!specialPropRefWarningShown) {
specialPropRefWarningShown = true;
Object({"LIBRARY":true}).NODE_ENV !== 'production' ? warning(false, '%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName) : void 0;
}
};
warnAboutAccessingRef.isReactWarning = true;
Object.defineProperty(props, 'ref', {
get: warnAboutAccessingRef,
configurable: true
});
}
/**
* Factory method to create a new React element. This no longer adheres to
* the class pattern, so do not use new to call it. Also, no instanceof check
* will work. Instead test $$typeof field against Symbol.for('react.element') to check
* if something is a React Element.
*
* @param {*} type
* @param {*} key
* @param {string|object} ref
* @param {*} self A *temporary* helper to detect places where `this` is
* different from the `owner` when React.createElement is called, so that we
* can warn. We want to get rid of owner and replace string `ref`s with arrow
* functions, and as long as `this` and owner are the same, there will be no
* change in behavior.
* @param {*} source An annotation object (added by a transpiler or otherwise)
* indicating filename, line number, and/or other information.
* @param {*} owner
* @param {*} props
* @internal
*/
var ReactElement = function (type, key, ref, self, source, owner, props) {
var element = {
// This tag allow us to uniquely identify this as a React Element
$$typeof: REACT_ELEMENT_TYPE,
// Built-in properties that belong on the element
type: type,
key: key,
ref: ref,
props: props,
// Record the component responsible for creating this element.
_owner: owner
};
if (Object({"LIBRARY":true}).NODE_ENV !== 'production') {
// The validation flag is currently mutative. We put it on
// an external backing store so that we can freeze the whole object.
// This can be replaced with a WeakMap once they are implemented in
// commonly used development environments.
element._store = {};
// To make comparing ReactElements easier for testing purposes, we make
// the validation flag non-enumerable (where possible, which should
// include every environment we run tests in), so the test framework
// ignores it.
if (canDefineProperty) {
Object.defineProperty(element._store, 'validated', {
configurable: false,
enumerable: false,
writable: true,
value: false
});
// self and source are DEV only properties.
Object.defineProperty(element, '_self', {
configurable: false,
enumerable: false,
writable: false,
value: self
});
// Two elements created in two different places should be considered
// equal for testing purposes and therefore we hide it from enumeration.
Object.defineProperty(element, '_source', {
configurable: false,
enumerable: false,
writable: false,
value: source
});
} else {
element._store.validated = false;
element._self = self;
element._source = source;
}
if (Object.freeze) {
Object.freeze(element.props);
Object.freeze(element);
}
}
return element;
};
/**
* Create and return a new ReactElement of the given type.
* See https://facebook.github.io/react/docs/top-level-api.html#react.createelement
*/
ReactElement.createElement = function (type, config, children) {
var propName;
// Reserved names are extracted
var props = {};
var key = null;
var ref = null;
var self = null;
var source = null;
if (config != null) {
if (hasValidRef(config)) {
ref = config.ref;
}
if (hasValidKey(config)) {
key = '' + config.key;
}
self = config.__self === undefined ? null : config.__self;
source = config.__source === undefined ? null : config.__source;
// Remaining properties are added to a new props object
for (propName in config) {
if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
props[propName] = config[propName];
}
}
}
// Children can be more than one argument, and those are transferred onto
// the newly allocated props object.
var childrenLength = arguments.length - 2;
if (childrenLength === 1) {
props.children = children;
} else if (childrenLength > 1) {
var childArray = Array(childrenLength);
for (var i = 0; i < childrenLength; i++) {
childArray[i] = arguments[i + 2];
}
if (Object({"LIBRARY":true}).NODE_ENV !== 'production') {
if (Object.freeze) {
Object.freeze(childArray);
}
}
props.children = childArray;
}
// Resolve default props
if (type && type.defaultProps) {
var defaultProps = type.defaultProps;
for (propName in defaultProps) {
if (props[propName] === undefined) {
props[propName] = defaultProps[propName];
}
}
}
if (Object({"LIBRARY":true}).NODE_ENV !== 'production') {
if (key || ref) {
if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {
var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
if (key) {
defineKeyPropWarningGetter(props, displayName);
}
if (ref) {
defineRefPropWarningGetter(props, displayName);
}
}
}
}
return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
};
/**
* Return a function that produces ReactElements of a given type.
* See https://facebook.github.io/react/docs/top-level-api.html#react.createfactory
*/
ReactElement.createFactory = function (type) {
var factory = ReactElement.createElement.bind(null, type);
// Expose the type on the factory and the prototype so that it can be
// easily accessed on elements. E.g. `<Foo />.type === Foo`.
// This should not be named `constructor` since this may not be the function
// that created the element, and it may not even be a constructor.
// Legacy hook TODO: Warn if this is accessed
factory.type = type;
return factory;
};
ReactElement.cloneAndReplaceKey = function (oldElement, newKey) {
var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);
return newElement;
};
/**
* Clone and return a new ReactElement using element as the starting point.
* See https://facebook.github.io/react/docs/top-level-api.html#react.cloneelement
*/
ReactElement.cloneElement = function (element, config, children) {
var propName;
// Original props are copied
var props = _assign({}, element.props);
// Reserved names are extracted
var key = element.key;
var ref = element.ref;
// Self is preserved since the owner is preserved.
var self = element._self;
// Source is preserved since cloneElement is unlikely to be targeted by a
// transpiler, and the original source is probably a better indicator of the
// true owner.
var source = element._source;
// Owner will be preserved, unless ref is overridden
var owner = element._owner;
if (config != null) {
if (hasValidRef(config)) {
// Silently steal the ref from the parent.
ref = config.ref;
owner = ReactCurrentOwner.current;
}
if (hasValidKey(config)) {
key = '' + config.key;
}
// Remaining properties override existing props
var defaultProps;
if (element.type && element.type.defaultProps) {
defaultProps = element.type.defaultProps;
}
for (propName in config) {
if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
if (config[propName] === undefined && defaultProps !== undefined) {
// Resolve default props
props[propName] = defaultProps[propName];
} else {
props[propName] = config[propName];
}
}
}
}
// Children can be more than one argument, and those are transferred onto
// the newly allocated props object.
var childrenLength = arguments.length - 2;
if (childrenLength === 1) {
props.children = children;
} else if (childrenLength > 1) {
var childArray = Array(childrenLength);
for (var i = 0; i < childrenLength; i++) {
childArray[i] = arguments[i + 2];
}
props.children = childArray;
}
return ReactElement(element.type, key, ref, self, source, owner, props);
};
/**
* Verifies the object is a ReactElement.
* See https://facebook.github.io/react/docs/top-level-api.html#react.isvalidelement
* @param {?object} object
* @return {boolean} True if `object` is a valid component.
* @final
*/
ReactElement.isValidElement = function (object) {
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
};
module.exports = ReactElement;
/***/ }),
/* 24 */,
/* 25 */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(module) {(function () {
var enterModule = __webpack_require__(0).enterModule;
enterModule && enterModule(module);
})();
/*** IMPORTS FROM imports-loader ***/
var fetch = __webpack_require__(2);
/*** IMPORTS FROM imports-loader ***/
var Promise = __webpack_require__(1);
var arrayLikeKeys = __webpack_require__(312),
baseKeys = __webpack_require__(314),
isArrayLike = __webpack_require__(35);
/**
* 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/7.0/#sec-object.keys)
* for more details.
*
* @static
* @since 0.1.0
* @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']
*/
function keys(object) {
return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
}
module.exports = keys;
;
(function () {
var reactHotLoader = __webpack_require__(0).default;
var leaveModule = __webpack_require__(0).leaveModule;
if (!reactHotLoader) {
return;
}
reactHotLoader.register(keys, "keys", "/home/franzp/prototypo/app/scripts/prototypo.js/node_modules/lodash/keys.js");
leaveModule(module);
})();
;
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3)(module)))
/***/ }),
/* 26 */
/***/ (function(module, exports) {
/**
* Checks if `value` is the
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
*
* @static
* @memberOf _
* @since 0.1.0
* @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(_.noop);
* // => true
*
* _.isObject(null);
* // => false
*/
function isObject(value) {
var type = typeof value;
return !!value && (type == 'object' || type == 'function');
}
module.exports = isObject;
/***/ }),
/* 27 */
/***/ (function(module, exports) {
/**
* Checks if `value` is object-like. A value is object-like if it's not `null`
* and has a `typeof` result of "object".
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
* @example
*
* _.isObjectLike({});
* // => true
*
* _.isObjectLike([1, 2, 3]);
* // => true
*
* _.isObjectLike(_.noop);
* // => false
*
* _.isObjectLike(null);
* // => false
*/
function isObjectLike(value) {
return !!value && typeof value == 'object';
}
module.exports = isObjectLike;
/***/ }),
/* 28 */
/***/ (function(module, exports, __webpack_require__) {
var baseIsNative = __webpack_require__(347),
getValue = __webpack_require__(350);
/**
* 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 = getValue(object, key);
return baseIsNative(value) ? value : undefined;
}
module.exports = getNative;
/***/ }),
/* 29 */,
/* 30 */,
/* 31 */,
/* 32 */,
/* 33 */,
/* 34 */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(module) {(function () {
var enterModule = __webpack_require__(0).enterModule;
enterModule && enterModule(module);
})();
/*** IMPORTS FROM imports-loader ***/
var fetch = __webpack_require__(2);
/*** IMPORTS FROM imports-loader ***/
var Promise = __webpack_require__(1);
var baseIsNative = __webpack_require__(283),
getValue = __webpack_require__(286);
/**
* 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 = getValue(object, key);
return baseIsNative(value) ? value : undefined;
}
module.exports = getNative;
;
(function () {
var reactHotLoader = __webpack_require__(0).default;
var leaveModule = __webpack_require__(0).leaveModule;
if (!reactHotLoader) {
return;
}
reactHotLoader.register(getNative, "getNative", "/home/franzp/prototypo/app/scripts/prototypo.js/node_modules/lodash/_getNative.js");
leaveModule(module);
})();
;
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3)(module)))
/***/ }),
/* 35 */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(module) {(function () {
var enterModule = __webpack_require__(0).enterModule;
enterModule && enterModule(module);
})();
/*** IMPORTS FROM imports-loader ***/
var fetch = __webpack_require__(2);
/*** IMPORTS FROM imports-loader ***/
var Promise = __webpack_require__(1);
var isFunction = __webpack_require__(107),
isLength = __webpack_require__(110);
/**
* Checks if `value` is array-like. A value is considered array-like if it's
* not a function and has a `value.length` that's an integer greater than or
* equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is array-like, else `false`.
* @example
*
* _.isArrayLike([1, 2, 3]);
* // => true
*
* _.isArrayLike(document.body.children);
* // => true
*
* _.isArrayLike('abc');
* // => true
*
* _.isArrayLike(_.noop);
* // => false
*/
function isArrayLike(value) {
return value != null && isLength(value.length) && !isFunction(value);
}
module.exports = isArrayLike;
;
(function () {
var reactHotLoader = __webpack_require__(0).default;
var leaveModule = __webpack_require__(0).leaveModule;
if (!reactHotLoader) {
return;
}
reactHotLoader.register(isArrayLike, "isArrayLike", "/home/franzp/prototypo/app/scripts/prototypo.js/node_modules/lodash/isArrayLike.js");
leaveModule(module);
})();
;
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3)(module)))
/***/ }),
/* 36 */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(module) {(function () {
var enterModule = __webpack_require__(0).enterModule;
enterModule && enterModule(module);
})();
/*** IMPORTS FROM imports-loader ***/
var fetch = __webpack_require__(2);
/*** IMPORTS FROM imports-loader ***/
var Promise = __webpack_require__(1);
var baseMatches = __webpack_require__(323),
baseMatchesProperty = __webpack_require__(333),
identity = __webpack_require__(341),
isArray = __webpack_require__(11),
property = __webpack_require__(342);
/**
* The base implementation of `_.iteratee`.
*
* @private
* @param {*} [value=_.identity] The value to convert to an iteratee.
* @returns {Function} Returns the iteratee.
*/
function baseIteratee(value) {
// Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.
// See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.
if (typeof value == 'function') {
return value;
}
if (value == null) {
return identity;
}
if (typeof value == 'object') {
return isArray(value) ? baseMatchesProperty(value[0], value[1]) : baseMatches(value);
}
return property(value);
}
module.exports = baseIteratee;
;
(function () {
var reactHotLoader = __webpack_require__(0).default;
var leaveModule = __webpack_require__(0).leaveModule;
if (!reactHotLoader) {
return;
}
reactHotLoader.register(baseIteratee, "baseIteratee", "/home/franzp/prototypo/app/scripts/prototypo.js/node_modules/lodash/_baseIteratee.js");
leaveModule(module);
})();
;
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3)(module)))
/***/ }),
/* 37 */
/***/ (function(module, exports, __webpack_require__) {
var arrayLikeKeys = __webpack_require__(360),
baseKeys = __webpack_require__(220),
isArrayLike = __webpack_require__(48);
/**
* 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/7.0/#sec-object.keys)
* for more details.
*
* @static
* @since 0.1.0
* @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']
*/
function keys(object) {
return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
}
module.exports = keys;
/***/ }),
/* 38 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* WEBPACK VAR INJECTION */(function(module) {/* harmony export (immutable) */ __webpack_exports__["a"] = constantOrFormula;
/* harmony export (immutable) */ __webpack_exports__["b"] = createContour;
/* unused harmony export changeTransformOrigin */
/* unused harmony export transformNode */
/* harmony export (immutable) */ __webpack_exports__["d"] = transformGlyph;
/* unused harmony export glyphBoundingBox */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__linear__ = __webpack_require__(77);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__precursor_Path__ = __webpack_require__(179);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__precursor_Formula__ = __webpack_require__(188);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__precursor_Constant__ = __webpack_require__(455);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_memoize_immutable__ = __webpack_require__(124);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_memoize_immutable___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_memoize_immutable__);
(function () {
var enterModule = __webpack_require__(0).enterModule;
enterModule && enterModule(module);
})();
/*** IMPORTS FROM imports-loader ***/
var fetch = __webpack_require__(2);
/*** IMPORTS FROM imports-loader ***/
var Promise = __webpack_require__(1);
function constantOrFormula(source, cursor) {
if (typeof source === 'object' && source !== null && source._operation) {
// eslint-disable-line no-underscore-dangle, max-len
return new __WEBPACK_IMPORTED_MODULE_2__precursor_Formula__["a" /* default */](source, cursor);
}
return new __WEBPACK_IMPORTED_MODULE_3__precursor_Constant__["a" /* default */](source, cursor);
}
function createContour(source, i) {
if (source.skeleton && source.closed) {
return new __WEBPACK_IMPORTED_MODULE_1__precursor_Path__["a" /* ClosedSkeletonPath */](source, i);
} else if (source.skeleton) {
return new __WEBPACK_IMPORTED_MODULE_1__precursor_Path__["c" /* SkeletonPath */](source, i);
}
return new __WEBPACK_IMPORTED_MODULE_1__precursor_Path__["b" /* SimplePath */](source, i);
}
function fastSplit(string) {
return string.split('.');
}
const memoizeSplit = __WEBPACK_IMPORTED_MODULE_4_memoize_immutable___default()(fastSplit, {
cache: new Map()
});
/* harmony export (immutable) */ __webpack_exports__["c"] = memoizeSplit;
const transformByName = {
skewX(node, deg, center = {
x: 0,
y: 0
}) {
const theta = deg;
const skew = [1, Math.tan(theta), 0, 1, 0, 0];
const matrix = changeTransformOrigin(center, skew);
return Object(__WEBPACK_IMPORTED_MODULE_0__linear__["h" /* transform2D */])(matrix, node);
},
skewY(node, deg, center = {
x: 0,
y: 0
}) {
const theta = deg;
const skew = [1, 0, Math.tan(theta), 1, 0, 0];
const matrix = changeTransformOrigin(center, skew);
return Object(__WEBPACK_IMPORTED_MODULE_0__linear__["h" /* transform2D */])(matrix, node);
},
rotate(node, deg, center = {
x: 0,
y: 0
}) {
const theta = deg;
const rotate = [Math.cos(theta), -Math.sin(theta), Math.sin(theta), Math.cos(theta), 0, 0];
const matrix = changeTransformOrigin(center, rotate);
return Object(__WEBPACK_IMPORTED_MODULE_0__linear__["h" /* transform2D */])(matrix, node);
},
translateX(node, offset) {
const translate = [1, 0, 0, 1, offset, 0];
return Object(__WEBPACK_IMPORTED_MODULE_0__linear__["h" /* transform2D */])(translate, node);
},
translateY(node, offset) {
const translate = [1, 0, 0, 1, 0, offset];
return Object(__WEBPACK_IMPORTED_MODULE_0__linear__["h" /* transform2D */])(translate, node);
},
scaleX(node, scale, center = {
x: 0,
y: 0
}) {
const scaleMatrix = [scale, 0, 0, 1, 0, 0];
const matrix = changeTransformOrigin(center, scaleMatrix);
return Object(__WEBPACK_IMPORTED_MODULE_0__linear__["h" /* transform2D */])(matrix, node);
},
scaleY(node, scale, center = {
x: 0,
y: 0
}) {
const scaleMatrix = [1, 0, 0, scale, 0, 0];
const matrix = changeTransformOrigin(center, scaleMatrix);
return Object(__WEBPACK_IMPORTED_MODULE_0__linear__["h" /* transform2D */])(matrix, node);
}
};
/* unused harmony export transformByName */
function changeTransformOrigin(origin, transform, z = 1) {
const preTransform = [z, 0, 0, z, -origin.x, -origin.y];
const postTransform = [z, 0, 0, z, origin.x, origin.y];
return Object(__WEBPACK_IMPORTED_MODULE_0__linear__["d" /* matrixMul */])(Object(__WEBPACK_IMPORTED_MODULE_0__linear__["d" /* matrixMul */])(preTransform, transform), postTransform);
}
/* eslint-disable */
function transformNode(node, transforms, origin) {
for (var i = 0; i < transforms.length; i++) {
var [name, param] = transforms[i];
exeTransformOnNode(name, node, param, origin);
node.addedTransform.push({
name,
param
});
if (node.handleIn) {
exeTransformOnNode(name, node.handleIn, param, origin);
}
if (node.handleOut) {
exeTransformOnNode(name, node.handleOut, param, origin);
}
}
}
function transformGlyph(opDone, transformTuples) {
for (var i = 0; i < opDone.contours.length; i++) {
var contour = opDone.contours[i];
for (var j = 0; j < contour.nodes.length; j++) {
var node = contour.nodes[j];
node.addedTransform = []; // eslint-disable-line no-param-reassign
if (node.expandedTo) {
node.expandedTo[0].addedTransform = []; // eslint-disable-line no-param-reassign
node.expandedTo[1].addedTransform = []; // eslint-disable-line no-param-reassign
}
var transforms = [...transformTuples, [contour.transforms || [], contour.transformOrigin]];
for (var k = 0; k < transforms.length; k++) {
var [transform, origin] = transforms[k];
if (node.expandedTo) {
transformNode(node.expandedTo[0], transform, origin);
transformNode(node.expandedTo[1], transform, origin);
transformNode(node, transform, origin);
} else {
transformNode(node, transform, origin);
}
}
}
}
}
/* eslint-enable */
function exeTransformOnNode(name, node, param, origin) {
const {
x,
y
} = transformByName[name](node, param, origin);
const {
x: xBase,
y: yBase
} = transformByName[name]({
x: node.xBase,
y: node.yBase
}, param, origin);
node.x = x; // eslint-disable-line no-param-reassign
node.y = y; // eslint-disable-line no-param-reassign
node.xBase = xBase; // eslint-disable-line no-param-reassign
node.yBase = yBase; // eslint-disable-line no-param-reassign
}
function glyphBoundingBox(glyph) {
let minX = Infinity;
let maxX = -Infinity;
let minY = Infinity;
let maxY = -Infinity;
glyph.otContours.forEach(contour => {
contour.forEach(bezier => {
bezier.forEach(node => {
minX = Math.min(node.x, minX);
maxX = Math.max(node.x, maxX);
minY = Math.min(node.y, minY);
maxY = Math.max(node.y, maxY);
});
});
});
return [{
x: minX,
y: minY
}, {
x: maxX,
y: maxY
}];
}
;
(function () {
var reactHotLoader = __webpack_require__(0).default;
var leaveModule = __webpack_require__(0).leaveModule;
if (!reactHotLoader) {
return;
}
reactHotLoader.register(constantOrFormula, "constantOrFormula", "/home/franzp/prototypo/app/scripts/prototypo.js/utils/generic.js");
reactHotLoader.register(createContour, "createContour", "/home/franzp/prototypo/app/scripts/prototypo.js/utils/generic.js");
reactHotLoader.register(fastSplit, "fastSplit", "/home/franzp/prototypo/app/scripts/prototypo.js/utils/generic.js");
reactHotLoader.register(memoizeSplit, "memoizeSplit", "/home/franzp/prototypo/app/scripts/prototypo.js/utils/generic.js");
reactHotLoader.register(transformByName, "transformByName", "/home/franzp/prototypo/app/scripts/prototypo.js/utils/generic.js");
reactHotLoader.register(changeTransformOrigin, "changeTransformOrigin", "/home/franzp/prototypo/app/scripts/prototypo.js/utils/generic.js");
reactHotLoader.register(transformNode, "transformNode", "/home/franzp/prototypo/app/scripts/prototypo.js/utils/generic.js");
reactHotLoader.register(transformGlyph, "transformGlyph", "/home/franzp/prototypo/app/scripts/prototypo.js/utils/generic.js");
reactHotLoader.register(exeTransformOnNode, "exeTransformOnNode", "/home/franzp/prototypo/app/scripts/prototypo.js/utils/generic.js");
reactHotLoader.register(glyphBoundingBox, "glyphBoundingBox", "/home/franzp/prototypo/app/scripts/prototypo.js/utils/generic.js");
leaveModule(module);
})();
;
/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(5)(module)))
/***/ }),
/* 39 */,
/* 40 */,
/* 41 */,
/* 42 */,
/* 43 */,
/* 44 */,
/* 45 */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(module) {(function () {
var enterModule = __webpack_require__(0).enterModule;
enterModule && enterModule(module);
})();
/*** IMPORTS FROM imports-loader ***/
var fetch = __webpack_require__(2);
/*** IMPORTS FROM imports-loader ***/
var Promise = __webpack_require__(1);
/**
* Checks if `value` is object-like. A value is object-like if it's not `null`
* and has a `typeof` result of "object".
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
* @example
*
* _.isObjectLike({});
* // => true
*
* _.isObjectLike([1, 2, 3]);
* // => true
*
* _.isObjectLike(_.noop);
* // => false
*
* _.isObjectLike(null);
* // => false
*/
function isObjectLike(value) {
return !!value && typeof value == 'object';
}
module.exports = isObjectLike;
;
(function () {
var reactHotLoader = __webpack_require__(0).default;
var leaveModule = __webpack_require__(0).leaveModule;
if (!reactHotLoader) {
return;
}
reactHotLoader.register(isObjectLike, "isObjectLike", "/home/franzp/prototypo/app/scripts/prototypo.js/node_modules/lodash/isObjectLike.js");
leaveModule(module);
})();
;
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3)(module)))
/***/ }),
/* 46 */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(module) {(function () {
var enterModule = __webpack_require__(0).enterModule;
enterModule && enterModule(module);
})();
/*** IMPORTS FROM imports-loader ***/
var fetch = __webpack_require__(2);
/*** IMPORTS FROM imports-loader ***/
var Promise = __webpack_require__(1);
var isArray = __webpack_require__(11),
isSymbol = __webpack_require__(68);
/** Used to match property names within property paths. */
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
reIsPlainProp = /^\w*$/;
/**
* Checks if `value` is a property name and not a property path.
*
* @private
* @param {*} value The value to check.
* @param {Object} [object] The object to query keys on.
* @returns {boolean} Returns `true` if `value` is a property name, else `false`.
*/
function isKey(value, object) {
if (isArray(value)) {
return false;
}
var type = typeof value;
if (type == 'number' || type == 'symbol' || type == 'boolean' || value == null || isSymbol(value)) {
return true;
}
return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object);
}
module.exports = isKey;
;
(function () {
var reactHotLoader = __webpack_require__(0).default;
var leaveModule = __webpack_require__(0).leaveModule;
if (!reactHotLoader) {
return;
}
reactHotLoader.register(reIsDeepProp, "reIsDeepProp", "/home/franzp/prototypo/app/scripts/prototypo.js/node_modules/lodash/_isKey.js");
reactHotLoader.register(reIsPlainProp, "reIsPlainProp", "/home/franzp/prototypo/app/scripts/prototypo.js/node_modules/lodash/_isKey.js");
reactHotLoader.register(isKey, "isKey", "/home/franzp/prototypo/app/scripts/prototypo.js/node_modules/lodash/_isKey.js");
leaveModule(module);
})();
;
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3)(module)))
/***/ }),
/* 47 */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(module) {(function () {
var enterModule = __webpack_require__(0).enterModule;
enterModule && enterModule(module);
})();
/*** IMPORTS FROM imports-loader ***/
var fetch = __webpack_require__(2);
/*** IMPORTS FROM imports-loader ***/
var Promise = __webpack_require__(1);
var isSymbol = __webpack_require__(68);
/** Used as references for various `Number` constants. */
var INFINITY = 1 / 0;
/**
* Converts `value` to a string key if it's not a string or symbol.
*
* @private
* @param {*} value The value to inspect.
* @returns {string|symbol} Returns the key.
*/
function toKey(value) {
if (typeof value == 'string' || isSymbol(value)) {
return value;
}
var result = value + '';
return result == '0' && 1 / value == -INFINITY ? '-0' : result;
}
module.exports = toKey;
;
(function () {
var reactHotLoader = __webpack_require__(0).default;
var leaveModule = __webpack_require__(0).leaveModule;
if (!reactHotLoader) {
return;
}
reactHotLoader.register(INFINITY, "INFINITY", "/home/franzp/prototypo/app/scripts/prototypo.js/node_modules/lodash/_toKey.js");
reactHotLoader.register(toKey, "toKey", "/home/franzp/prototypo/app/scripts/prototypo.js/node_modules/lodash/_toKey.js");
leaveModule(module);
})();
;
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3)(module)))
/***/ }),
/* 48 */
/***/ (function(module, exports, __webpack_require__) {
var isFunction = __webpack_require__(115),
isLength = __webpack_require__(116);
/**
* Checks if `value` is array-like. A value is considered array-like if it's
* not a function and has a `value.length` that's an integer greater than or
* equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is array-like, else `false`.
* @example
*
* _.isArrayLike([1, 2, 3]);
* // => true
*
* _.isArrayLike(document.body.children);
* // => true
*
* _.isArrayLike('abc');
* // => true
*
* _.isArrayLike(_.noop);
* // => false
*/
function isArrayLike(value) {
return value