Invert a value curve to make it work for the release
@private
438107
function invertCurve(curve){
		var out = new Array(curve.length);
		for (var j = 0; j < curve.length; j++){
			out[j] = 1 - curve[j];
		}
		return out;
	}
1351385
function (obj) {
            var curleft = 0, curtop = 0;
            if (obj.offsetParent) {
                do {
                    curleft += obj.offsetLeft;
                    curtop += obj.offsetTop;
                } while (obj = obj.offsetParent);
                return {x: curleft, y: curtop};
            }
        }
867213
function(fun) {
      return function(/* args */) {
        var flipped = __slice.call(arguments);
        flipped[0] = arguments[1];
        flipped[1] = arguments[0];

        return fun.apply(this, flipped);
      };
    }
143309
function TransformTo(element_from, element_to, duration = 500, easing = Animation.easing.linear, HIDE_OTHER) {
    let rect = element_from.getBoundingClientRect();
    let cs = window.getComputedStyle(element_from, null);
    let margin_left = parseFloat(cs.getPropertyValue("margin"));

    let seq = Animation.createSequence({
        obj: element_from,
        width: { value: "0px"},
        height: { value: "0px"},
        backgroundColor: { value: "rgb(1,1,1)"},
        left: [{value:rect.left+"px"},{ value: "0px"}],
        top: [{value:rect.top+"px"},{ value: "0px"}]
    });

    if (!element_to) {

        let a = (seq) => (element_to, duration = 500, easing = Animation.easing.linear,  HIDE_OTHER = false) => {
            setTo(element_to, seq, duration, easing);
            seq.duration = duration;
            return seq;
        };

        return a(seq);
    }

    setTo(element_to, duration, easing);
    seq.duration = duration;
    return seq;
}
313502
function(rawValue) {
		if (rawValue && rawValue.t !== undefined) {
			rawValue = rawValue.t;
		}
		return Scale.prototype.getRightValue.call(this, rawValue);
	}
74763
private static Map<TypeVariable<?>, Type> invert(Map<TypeVariable<?>, Type> m) {
        final TypeVariableMap result = new TypeVariableMap();
        for (Map.Entry<TypeVariable<?>, Type> e : m.entrySet()) {
            if (e.getValue() instanceof TypeVariable<?>) {
                result.put((TypeVariable<?>) e.getValue(), e.getKey());
            }
        }
        return result;
    }
454136
function inverse$10(p) {
        var u, deltav, s, d, eps, ro, fi1;
        var ok;

        /* Transformation */
        /* revert y, x*/
        var tmp = p.x;
        p.x = p.y;
        p.y = tmp;
        if (!this.czech) {
            p.y *= -1;
            p.x *= -1;
        }
        ro = Math.sqrt(p.x * p.x + p.y * p.y);
        eps = Math.atan2(p.y, p.x);
        d = eps / Math.sin(this.s0);
        s = 2 * (Math.atan(Math.pow(this.ro0 / ro, 1 / this.n) * Math.tan(this.s0 / 2 + this.s45)) - this.s45);
        u = Math.asin(Math.cos(this.ad) * Math.sin(s) - Math.sin(this.ad) * Math.cos(s) * Math.cos(d));
        deltav = Math.asin(Math.cos(s) * Math.sin(d) / Math.cos(u));
        p.x = this.long0 - deltav / this.alfa;
        fi1 = u;
        ok = 0;
        var iter = 0;
        do {
            p.y = 2 * (Math.atan(Math.pow(this.k, - 1 / this.alfa) * Math.pow(Math.tan(u / 2 + this.s45), 1 / this.alfa) * Math.pow((1 + this.e * Math.sin(fi1)) / (1 - this.e * Math.sin(fi1)), this.e / 2)) - this.s45);
            if (Math.abs(fi1 - p.y) < 0.0000000001) {
                ok = 1;
            }
            fi1 = p.y;
            iter += 1;
        } while (ok === 0 && iter < 15);
        if (iter >= 15) {
            return null;
        }

        return (p);
    }
257702
function({_t0, arg, keys, inv}) {
		const key = keys && makeKey(opts, keys);
		const lay = layers.map(l => l.instantiate({key, ttl, ttr, inv}));
		const fix = lay.slice();
		const ret = Q.defer();
		const bld = () => {
			const _t1 = new Date;
			return Q()
				.then(() => func.apply(this, arg))
				.then(val => {
					time('build', new Date - _t1);
					return val;
				});
		}

		const set = (layer, val) => {
			if (shouldCache(val)) {
				layer.set(val);
			}
		}

		const pump = () => {

			// Get the next layer.
			const cur = lay.shift();
			const _t1 = new Date;

			// If we couldn't make a key, then we force a miss.
			// If we're out of layers, then we'll just have to
			// build.  It's a full miss.
			// We can _force_ a miss with the `_bust` parameter.
			if (!key || !cur || force()) {
				bld().then(val => {

					// Hand it off.
					ret.resolve(val)

					// Sob about it.
					time('miss', new Date - _t0);

				// Patch rejection through to return promise.
				}).catch(err => ret.reject(err));
				return;
			}

			Q().then(() => cur.get()).then(() => {

				// If we found a value and it's not expired.
				if (cur.val && !cur.exp) {

					// Hand it off.
					ret.resolve(cur.val);

					// Brag about it.
					time('hit', new Date - _t0);
					time(`layer.${cur.name()}.hit.fromStart`,  new Date - _t0);
					time(`layer.${cur.name()}.hit.individual`, new Date - _t1);

					// If our time-to-rebuild has elapsed,
					// we'll rebuild in the background and
					// populate the new value into all
					// layers.
					if (cur.red) {
						bld().then((val) => {
							fix.forEach(layer => set(layer, val));
						}).catch(() => {
							time('error.background', new Date - _t0);
						});

					}
				} else {

					// Miss.  Populate this layer later
					// when we get a value.
					ret.promise.then(val => set(cur, val));

					time(`layer.${cur.name()}.miss.fromStart`,  new Date - _t0);
					time(`layer.${cur.name()}.miss.individual`, new Date - _t1);

					// Try the next layer.
					pump();
				}
			});
		}

		if (inv) {
			// Invalidate.
			Q.all(fix.map(l => l.set())).then(ret.resolve);
		} else {
			// Start looking!
			pump();
		}

		// Log if we reject.
		ret.promise.catch(() => time('error.returned', new Date - _t0));

		// We'll find it, we promise!
		return ret.promise

			// Post-processing on the way out of the cache.
			.then(after)

			// Down and to the right!
			.then(v => (time('overall', new Date - _t0), v))
	}
628273
function(returnNew) {
      var length = this.length();

      // Collect a ratio to shrink the x and y coords
      var invertedLength = (length < Number.MIN_VALUE) ? 0 : 1/length;

      if (!returnNew) {
        // Convert the coords to be greater than zero
        // but smaller than or equal to 1.0
        return this.set(this.x * invertedLength, this.y * invertedLength);
      } else {
        return new Vec2(this.x * invertedLength, this.y * invertedLength);
      }
    }
465937
def _invert_all(self):
        """"""
        set = self._datastore.setbyte
        get = self._datastore.getbyte
        for p in xrange(self._datastore.byteoffset, self._datastore.byteoffset + self._datastore.bytelength):
            set(p, 256 + ~get(p))
637792
def _transform_i(self, x, i):
        """"""
        x = self._shift_or_mirror_into_invertible_i(x, i)
        lb = self._lb[self._index(i)]
        ub = self._ub[self._index(i)]
        al = self._al[self._index(i)]
        au = self._au[self._index(i)]
        if x < lb + al:
            return lb + (x - (lb - al))**2 / 4 / al
        elif x < ub - au:
            return x
        elif x < ub + 3 * au:
            return ub - (x - (ub + au))**2 / 4 / au
        else:
            assert False  # shift removes this case
            return ub + au - (x - (ub + au))
849753
function retransformValueAST(root, customProperties, withoutProperty) {
	const nextCustomProperties = Object.assign({}, customProperties);

	delete nextCustomProperties[withoutProperty];

	return transformValueAST(root, nextCustomProperties);
}
1372698
function(offset, composite, easing) {
  ASSERT_ENABLED && assert(
      typeof offset === 'number' || offset === null,
      'Invalid offset value');
  ASSERT_ENABLED && assert(
      composite === 'add' || composite === 'replace' || composite === null,
      'Invalid composite value');
  this.offset = offset;
  this.composite = composite;
  this.easing = easing;
  this.cssValues = {};
}
1075609
function reverse(obj) {
    if (!is_1.isValue(obj))
        return null;
    // Reverse an array.
    if (is_1.isArray(obj))
        return obj.reverse();
    // Reverse a string.
    if (is_1.isString(obj)) {
        var i = obj.toString().length;
        var tmpStr = '';
        while (i--)
            tmpStr += obj[i];
        return tmpStr;
    }
    // Reverse an object.
    var result = {};
    for (var p in obj) {
        if (is_1.isObject(obj[p]))
            continue;
        result[obj[p]] = p;
    }
    return result;
}
655951
function fixNestedCalc(value) {
    const reCalcVal = /calc\(([^)]+)\)/g;

    (value.match(reCalcVal) || []).forEach(match => {
        const newVal = `calc${match.split('calc').join('')}`;
        value = value.replace(match, newVal);
    });

    return value;
}
1253562
def invert(self):
        
        keys = self._clean.keys()
        inverted = {}
        for key in keys:
            inverted[self.obj[key]] = key

        return self._wrap(inverted)
440772
function set(value) {
      var transform = mutator(Glide, Components).mutate(value);

      Components.Html.wrapper.style.transform = 'translate3d(' + -1 * transform + 'px, 0px, 0px)';
    }