- Build: Update
- npm: Add `prepare` script to update license-badges, copy, and prep (leaving prepublishOnly to handle build-docs) - npm: Make license badge prep. in series as getting too many files open error running in parallel - npm: Update devDeps
This commit is contained in:
115
editor/external/jamilih/jml-es.js
vendored
115
editor/external/jamilih/jml-es.js
vendored
@@ -116,7 +116,7 @@ function _setPrototypeOf(o, p) {
|
||||
return _setPrototypeOf(o, p);
|
||||
}
|
||||
|
||||
function isNativeReflectConstruct() {
|
||||
function _isNativeReflectConstruct() {
|
||||
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
||||
if (Reflect.construct.sham) return false;
|
||||
if (typeof Proxy === "function") return true;
|
||||
@@ -130,7 +130,7 @@ function isNativeReflectConstruct() {
|
||||
}
|
||||
|
||||
function _construct(Parent, args, Class) {
|
||||
if (isNativeReflectConstruct()) {
|
||||
if (_isNativeReflectConstruct()) {
|
||||
_construct = Reflect.construct;
|
||||
} else {
|
||||
_construct = function _construct(Parent, args, Class) {
|
||||
@@ -200,6 +200,23 @@ function _possibleConstructorReturn(self, call) {
|
||||
return _assertThisInitialized(self);
|
||||
}
|
||||
|
||||
function _createSuper(Derived) {
|
||||
return function () {
|
||||
var Super = _getPrototypeOf(Derived),
|
||||
result;
|
||||
|
||||
if (_isNativeReflectConstruct()) {
|
||||
var NewTarget = _getPrototypeOf(this).constructor;
|
||||
|
||||
result = Reflect.construct(Super, arguments, NewTarget);
|
||||
} else {
|
||||
result = Super.apply(this, arguments);
|
||||
}
|
||||
|
||||
return _possibleConstructorReturn(this, result);
|
||||
};
|
||||
}
|
||||
|
||||
function _superPropBase(object, property) {
|
||||
while (!Object.prototype.hasOwnProperty.call(object, property)) {
|
||||
object = _getPrototypeOf(object);
|
||||
@@ -231,19 +248,15 @@ function _get(target, property, receiver) {
|
||||
}
|
||||
|
||||
function _slicedToArray(arr, i) {
|
||||
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest();
|
||||
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
||||
}
|
||||
|
||||
function _toConsumableArray(arr) {
|
||||
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread();
|
||||
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
||||
}
|
||||
|
||||
function _arrayWithoutHoles(arr) {
|
||||
if (Array.isArray(arr)) {
|
||||
for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];
|
||||
|
||||
return arr2;
|
||||
}
|
||||
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
||||
}
|
||||
|
||||
function _arrayWithHoles(arr) {
|
||||
@@ -251,14 +264,11 @@ function _arrayWithHoles(arr) {
|
||||
}
|
||||
|
||||
function _iterableToArray(iter) {
|
||||
if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter);
|
||||
if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);
|
||||
}
|
||||
|
||||
function _iterableToArrayLimit(arr, i) {
|
||||
if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;
|
||||
var _arr = [];
|
||||
var _n = true;
|
||||
var _d = false;
|
||||
@@ -284,12 +294,29 @@ function _iterableToArrayLimit(arr, i) {
|
||||
return _arr;
|
||||
}
|
||||
|
||||
function _unsupportedIterableToArray(o, minLen) {
|
||||
if (!o) return;
|
||||
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
||||
var n = Object.prototype.toString.call(o).slice(8, -1);
|
||||
if (n === "Object" && o.constructor) n = o.constructor.name;
|
||||
if (n === "Map" || n === "Set") return Array.from(n);
|
||||
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
||||
}
|
||||
|
||||
function _arrayLikeToArray(arr, len) {
|
||||
if (len == null || len > arr.length) len = arr.length;
|
||||
|
||||
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
||||
|
||||
return arr2;
|
||||
}
|
||||
|
||||
function _nonIterableSpread() {
|
||||
throw new TypeError("Invalid attempt to spread non-iterable instance");
|
||||
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
||||
}
|
||||
|
||||
function _nonIterableRest() {
|
||||
throw new TypeError("Invalid attempt to destructure non-iterable instance");
|
||||
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -333,6 +360,8 @@ var possibleOptions = ['$plugins', // '$mode', // Todo (SVG/XML)
|
||||
var NS_HTML = 'http://www.w3.org/1999/xhtml',
|
||||
hyphenForCamelCase = /\x2D([a-z])/g;
|
||||
var ATTR_MAP = {
|
||||
maxlength: 'maxLength',
|
||||
minlength: 'minLength',
|
||||
readonly: 'readOnly'
|
||||
}; // We define separately from ATTR_DOM for clarity (and parity with JsonML) but no current need
|
||||
// We don't set attribute esp. for boolean atts as we want to allow setting of `undefined`
|
||||
@@ -356,7 +385,7 @@ var ATTR_DOM = BOOL_ATTS.concat(['accessKey', // HTMLElement
|
||||
var NULLABLES = ['autocomplete', 'dir', // HTMLElement
|
||||
'integrity', // script, link
|
||||
'lang', // HTMLElement
|
||||
'max', 'min', 'title' // HTMLElement
|
||||
'max', 'min', 'minLength', 'maxLength', 'title' // HTMLElement
|
||||
];
|
||||
|
||||
var $ = function $(sel) {
|
||||
@@ -910,21 +939,21 @@ var jml = function jml() {
|
||||
|
||||
var def = customizedBuiltIn ? is : localName;
|
||||
|
||||
if (customElements.get(def)) {
|
||||
if (window.customElements.get(def)) {
|
||||
return "break";
|
||||
}
|
||||
|
||||
var getConstructor = function getConstructor(cnstrct) {
|
||||
var baseClass = options && options["extends"] ? doc.createElement(options["extends"]).constructor : customizedBuiltIn ? doc.createElement(localName).constructor : HTMLElement;
|
||||
var baseClass = options && options["extends"] ? doc.createElement(options["extends"]).constructor : customizedBuiltIn ? doc.createElement(localName).constructor : window.HTMLElement;
|
||||
/**
|
||||
* Class wrapping base class.
|
||||
*/
|
||||
|
||||
return cnstrct ?
|
||||
/*#__PURE__*/
|
||||
function (_baseClass) {
|
||||
return cnstrct ? /*#__PURE__*/function (_baseClass) {
|
||||
_inherits(_class, _baseClass);
|
||||
|
||||
var _super = _createSuper(_class);
|
||||
|
||||
/**
|
||||
* Calls user constructor.
|
||||
*/
|
||||
@@ -933,21 +962,21 @@ var jml = function jml() {
|
||||
|
||||
_classCallCheck(this, _class);
|
||||
|
||||
_this = _possibleConstructorReturn(this, _getPrototypeOf(_class).call(this));
|
||||
_this = _super.call(this);
|
||||
cnstrct.call(_assertThisInitialized(_this));
|
||||
return _this;
|
||||
}
|
||||
|
||||
return _class;
|
||||
}(baseClass) :
|
||||
/*#__PURE__*/
|
||||
function (_baseClass2) {
|
||||
}(baseClass) : /*#__PURE__*/function (_baseClass2) {
|
||||
_inherits(_class2, _baseClass2);
|
||||
|
||||
var _super2 = _createSuper(_class2);
|
||||
|
||||
function _class2() {
|
||||
_classCallCheck(this, _class2);
|
||||
|
||||
return _possibleConstructorReturn(this, _getPrototypeOf(_class2).apply(this, arguments));
|
||||
return _super2.apply(this, arguments);
|
||||
}
|
||||
|
||||
return _class2;
|
||||
@@ -1025,7 +1054,7 @@ var jml = function jml() {
|
||||
} // console.log('def', def, '::', typeof options === 'object' ? options : undefined);
|
||||
|
||||
|
||||
customElements.define(def, cnstrctr, _typeof(options) === 'object' ? options : undefined);
|
||||
window.customElements.define(def, cnstrctr, _typeof(options) === 'object' ? options : undefined);
|
||||
return "break";
|
||||
}();
|
||||
|
||||
@@ -1700,11 +1729,11 @@ jml.toJML = function (dom) {
|
||||
/**
|
||||
* Polyfill for `DOMException`.
|
||||
*/
|
||||
var DOMException =
|
||||
/*#__PURE__*/
|
||||
function (_Error) {
|
||||
var DOMException = /*#__PURE__*/function (_Error) {
|
||||
_inherits(DOMException, _Error);
|
||||
|
||||
var _super3 = _createSuper(DOMException);
|
||||
|
||||
/* eslint-enable no-shadow, unicorn/custom-error-definition */
|
||||
|
||||
/**
|
||||
@@ -1716,14 +1745,14 @@ jml.toJML = function (dom) {
|
||||
|
||||
_classCallCheck(this, DOMException);
|
||||
|
||||
_this2 = _possibleConstructorReturn(this, _getPrototypeOf(DOMException).call(this, message)); // eslint-disable-next-line unicorn/custom-error-definition
|
||||
_this2 = _super3.call(this, message); // eslint-disable-next-line unicorn/custom-error-definition
|
||||
|
||||
_this2.name = name;
|
||||
return _this2;
|
||||
}
|
||||
|
||||
return DOMException;
|
||||
}(_wrapNativeSuper(Error));
|
||||
}( /*#__PURE__*/_wrapNativeSuper(Error));
|
||||
|
||||
if (reportInvalidState) {
|
||||
// INVALID_STATE_ERR per section 9.3 XHTML 5: http://www.w3.org/TR/html5/the-xhtml-syntax.html
|
||||
@@ -2110,15 +2139,15 @@ jml.toXMLDOMString = function () {
|
||||
*/
|
||||
|
||||
|
||||
var JamilihMap =
|
||||
/*#__PURE__*/
|
||||
function (_Map) {
|
||||
var JamilihMap = /*#__PURE__*/function (_Map) {
|
||||
_inherits(JamilihMap, _Map);
|
||||
|
||||
var _super4 = _createSuper(JamilihMap);
|
||||
|
||||
function JamilihMap() {
|
||||
_classCallCheck(this, JamilihMap);
|
||||
|
||||
return _possibleConstructorReturn(this, _getPrototypeOf(JamilihMap).apply(this, arguments));
|
||||
return _super4.apply(this, arguments);
|
||||
}
|
||||
|
||||
_createClass(JamilihMap, [{
|
||||
@@ -2167,21 +2196,21 @@ function (_Map) {
|
||||
}]);
|
||||
|
||||
return JamilihMap;
|
||||
}(_wrapNativeSuper(Map));
|
||||
}( /*#__PURE__*/_wrapNativeSuper(Map));
|
||||
/**
|
||||
* Element-aware wrapper for `WeakMap`.
|
||||
*/
|
||||
|
||||
|
||||
var JamilihWeakMap =
|
||||
/*#__PURE__*/
|
||||
function (_WeakMap) {
|
||||
var JamilihWeakMap = /*#__PURE__*/function (_WeakMap) {
|
||||
_inherits(JamilihWeakMap, _WeakMap);
|
||||
|
||||
var _super5 = _createSuper(JamilihWeakMap);
|
||||
|
||||
function JamilihWeakMap() {
|
||||
_classCallCheck(this, JamilihWeakMap);
|
||||
|
||||
return _possibleConstructorReturn(this, _getPrototypeOf(JamilihWeakMap).apply(this, arguments));
|
||||
return _super5.apply(this, arguments);
|
||||
}
|
||||
|
||||
_createClass(JamilihWeakMap, [{
|
||||
@@ -2230,7 +2259,7 @@ function (_WeakMap) {
|
||||
}]);
|
||||
|
||||
return JamilihWeakMap;
|
||||
}(_wrapNativeSuper(WeakMap));
|
||||
}( /*#__PURE__*/_wrapNativeSuper(WeakMap));
|
||||
|
||||
jml.Map = JamilihMap;
|
||||
jml.WeakMap = JamilihWeakMap;
|
||||
|
||||
Reference in New Issue
Block a user