//--- Object ----------------------------------------------------------------

if (!Object.assign) {
	//Object.assign = $.extend;
	Object.assign = function(dst, src) { return /** @type {!Object} */ ($.extend.apply(null, arguments)); };
}

//--- String ----------------------------------------------------------------

if (!String.prototype.trim) { // ??? only very old IE ???
	String.prototype.trim = function() { return this.replace(/^\s+|\s+$/g, ''); };
}
function _repeatTo(str, tLen) {
	var l1 = str.length;
	if (!l1 || !tLen) return '';
	if (tLen >= l1) {
		while (l1 < tLen) {
			var l2 = l1 << 1; // double it
			str += (tLen <= l2) ? str : str.substr(0, tLen - l1);
			l1 = l2;
		}
	} else { // target length < initial length
		str = str.substr(0, tLen);
	}
	return str;
}
if (!String.prototype.repeat) {
	String.prototype.repeat = function(cnt) {
		return _repeatTo(this, this.length*cnt); // Array(cnt+1).join(this);
	};
}
// from ECMAScript 2017
if (!String.prototype.padStart) {
	String.prototype.padStart = function padStart(tLen, padS) {
		tLen -= this.length;
		return (tLen > 0) ? (_repeatTo(padS || ' ', tLen) + this) : this;
	};
}
if (!String.prototype.padEnd) {
	String.prototype.padEnd = function padStart(tLen, padS) {
		tLen -= this.length;
		return (tLen > 0) ? (this + _repeatTo(padS || ' ', tLen)) : this;
	};
}

//--- Array -----------------------------------------------------------------

if (!Array.prototype.find) {
	//** @type function(Function, Object=) */
	Array.prototype.find = function(predicate, thisArg) {
		var o;
		this.some(function(item, i) {
			if (predicate.call(thisArg, item, i, this)) {
				o = item;
				return true;
			}
		}, this);
		return o;
	};
}

if (!Array.prototype.findIndex) {
	//** @type function(Function, Object=) */
	Array.prototype.findIndex = function(predicate, thisArg) {
		var idx = -1;
		this.some(function(item, i) {
			if (predicate.call(thisArg, item, i, this)) {
				idx = i;
				return true;
			}
		}, this);
		return idx;
	};
}

//--- Element ---------------------------------------------------------------

var pfFnMatches = null;
if (!Element.prototype.matches) {
	// does the element match the given selector
	Element.prototype.matches =
		Element.prototype.matchesSelector ||
		Element.prototype.mozMatchesSelector ||
		Element.prototype.msMatchesSelector ||
		Element.prototype.oMatchesSelector ||
		Element.prototype.webkitMatchesSelector ||
		(pfFnMatches = function(s) { return $(this).is(s); });
}

if (!Element.prototype.closest) {
	// find closest ancestor matching selector
	if (pfFnMatches) {
		// no native "matches", do not use it for closest()
		Element.prototype.closest = function(sel) {
			return $(this).closest(sel)[0];
		};
	} else {
		Element.prototype.closest = function(sel) {
			var el = this;
			while (el) {
				if (el.nodeType == 1 && el.matches(sel))
					break;
				el = el.parentNode;
			}
			return /** @type {Element} */ (el);
		};
	}
}

if (!Element.prototype.remove) {
	// remove this (current) element from dom
	Element.prototype.remove = function() {
		var p = this.parentElement || this.parentNode;
		p && p.removeChild(this);
	}
}

@@ -95,18 +95,16 @@
 ign) %7B%0A%09
-//
 Object.a
@@ -125,114 +125,8 @@
 nd;%0A
-%09Object.assign = function(dst, src) %7B return /** @type %7B!Object%7D */ ($.extend.apply(null, arguments)); %7D;%0A
 %7D%0A%0A/
@@ -1219,24 +1219,361 @@
 his;%0A%09%7D;%0A%7D%0A%0A
+if (!String.prototype.startsWith) %7B%0A%09String.prototype.startsWith = function(sub) %7B%0A%09%09return this.lastIndexOf(sub, 0) === 0;%0A%09%7D;%0A%7D%0A%0Aif (!String.prototype.endsWith) %7B%0A%09String.prototype.endsWith = function(sub) %7B%0A%09%09var l0 = this.length, l1 = sub && sub.length %7C%7C 0, dl = l0 - l1;%0A%09%09return (dl %3E= 0) && (this.indexOf(sub, dl) == dl);%0A%09%7D;%0A%7D%0A%0A
 //--- Array 

add poly for Object.assign, String#startsWith and String#endsWith