/*tslint:disable 
Polyfill for `elementsFromPoint`

https://developer.mozilla.org/en-US/docs/Web/API/Document/elementsFromPoint
https://gist.github.com/iddan/54d5d9e58311b0495a91bf06de661380
https://gist.github.com/oslego/7265412
167886
function elementsFromPoint(x, y) {
    var elements = [];
    var previousPointerEvents = [];
    var current; // TODO: window.getComputedStyle should be used with inferred type (Element)
    var i;
    var d;
    //if (document === undefined) return elements;
    // get all elements via elementFromPoint, and remove them from hit-testing in order
    while ((current = document.elementFromPoint(x, y)) && elements.indexOf(current) === -1 && current != null) {
        // push the element and its current style
        elements.push(current);
        previousPointerEvents.push({
            value: current.style.getPropertyValue('pointer-events'),
            priority: current.style.getPropertyPriority('pointer-events')
        });
        // add "pointer-events: none", to get to the underlying element
        current.style.setProperty('pointer-events', 'none', 'important');
    }
    // restore the previous pointer-events values
    for (i = previousPointerEvents.length; d = previousPointerEvents[--i];) {
        elements[i].style.setProperty('pointer-events', d.value ? d.value : '', d.priority);
    }
    // return our results
    return elements;
}
1364748
function betterTrim(snippetEl) {
		// Helper functions
		function trimLeft(val) {
			// Adapted from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/Trim#Polyfill
			return val.replace(/^[\s\uFEFF\xA0]+/g, '');
		}
		function trimLineBreaks(input) {
			var lines = input.split('\n');

			// Trim line-breaks from the beginning
			for (var i = 0; i < lines.length; i++) {
				if (lines[i].trim() === '') {
					lines.splice(i--, 1);
				} else break;
			}

			// Trim line-breaks from the end
			for (var i = lines.length-1; i >= 0; i--) {
				if (lines[i].trim() === '') {
					lines.splice(i, 1);
				} else break;
			}

			return lines.join('\n');
		}

		// Main function for betterTrim()
		return (function(snippetEl) {
			var content = trimLineBreaks(snippetEl.innerHTML);
			var lines = content.split('\n');
			// Calculate the minimum amount to remove on each line start of the snippet (can be 0)
			var pad = lines.reduce(function(acc, line) {
				if (line.length > 0 && trimLeft(line).length > 0 && acc > line.length - trimLeft(line).length) {
					return line.length - trimLeft(line).length;
				}
				return acc;
			}, Number.POSITIVE_INFINITY);
			// Slice each line with this amount
			return lines.map(function(line, index) {
				return line.slice(pad);
			})
			.join('\n');
		})(snippetEl);
	}
336455
function(el, fn) {
	  	if(!el || el === document) {
	  		return false;
	  	}

	  	// don't search elements above pswp__scroll-wrap
	  	if(el.getAttribute('class') && el.getAttribute('class').indexOf('pswp__scroll-wrap') > -1 ) {
	  		return false;
	  	}

	  	if( fn(el) ) {
	  		return el;
	  	}

	  	return _closestElement(el.parentNode, fn);
	}
145046
function targetsElementPseudo (element, selector) {
  const selectors = simpleSelectorParser.process(selector).res

  return selectors.filter((selector) => {
    let selectorNodes = selector.nodes.concat([]).reverse() // clone the array

    for (const node of selectorNodes) {
      if (node.type === 'cominator') { break }

      if (node.type === 'pseudo' && node.value.replace(/::?/, '') in element.pseudos) {
        return true
      }

      if (node.type === 'tag' && node.value === element.tag) { break }
    }

    return false
  }).length > 0
}
28129
function elementAt(index, defaultValue) {
    if (index < 0) {
        throw new _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_0__["ArgumentOutOfRangeError"]();
    }
    var hasDefaultValue = arguments.length >= 2;
    return function (source) {
        return source.pipe(Object(_filter__WEBPACK_IMPORTED_MODULE_1__["filter"])(function (v, i) { return i === index; }), Object(_take__WEBPACK_IMPORTED_MODULE_4__["take"])(1), hasDefaultValue
            ? Object(_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__["defaultIfEmpty"])(defaultValue)
            : Object(_throwIfEmpty__WEBPACK_IMPORTED_MODULE_2__["throwIfEmpty"])(function () { return new _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_0__["ArgumentOutOfRangeError"](); }));
    };
}
1102173
function (endpoint, placeholder, _jsPlumb) {
		var stopped = false;
		return {
			drag: function () {
				if (stopped) {
					stopped = false;
					return true;
				}

				if (placeholder.element) {
					var _ui = _jsPlumb.getUIPosition(arguments, _jsPlumb.getZoom());
					jsPlumb.setPosition(placeholder.element, _ui);
					_jsPlumb.repaint(placeholder.element, _ui);
					// always repaint the source endpoint, because only continuous/dynamic anchors cause the endpoint
					// to be repainted, so static anchors need to be told (or the endpoint gets dragged around)
					endpoint.paint({anchorPoint:endpoint.anchor.getCurrentLocation({element:endpoint.element})});
				}
			},
			stopDrag: function () {
				stopped = true;
			}
		};
	}
182692
function (featureStringCommaSeparated) {
  var arrayFeatures = featureStringCommaSeparated
    .split(',')
    .filter(function (x) { return x.length })
    .map(function (x) { return x.replace(/[\*\/]/g, '') }); // Eliminate XSS vuln
  var arrayUnsupportedFeatures = [];
  for (var i = 0; i < arrayFeatures.length; i++) {
    var supportedFeature = true;
    var fullFeature = arrayFeatures[i];
    if (contains(fullFeature, "~")) {
      if (contains(fullFeature, "Intl.~locale")) {
        supportedFeature = checkIntlLocale(window, fullFeature);
      } else {
        console.warn('Feature ' + fullFeature + ' can not be detected because it has not JavaScript API.');
      }
    } else {
      // Get the feature and the container Object
      var featureString = fullFeature.substring(fullFeature.lastIndexOf('.') + 1);
      if (contains(featureString, "@@")) {
        console.warn('Feature ' + featureString + ' can not be detected because it depends on Symbol.');
      } else {
        var objectString = fullFeature.substring(0, fullFeature.lastIndexOf('.'));
        var object = getDescendantProp(window, objectString);
        if (object !== undefined) {
          //if ((object.hasOwnProperty(featureString)) === false) {
          if ((featureString in object) === false) {
            supportedFeature = false;
          }
        } else {
          supportedFeature = false;
        }
      }
    }
    // If the feature is not supported by the browser, then add it to polyfill it
    if (supportedFeature === false) {
      arrayUnsupportedFeatures.push(fullFeature);
    }
  }
  return arrayUnsupportedFeatures;
}
1326092
function Polyfills() {

    Promise.create = function () {
        let resolve, reject;
        const promise = new Promise(function (res, rej) {
            resolve = res;
            reject = rej;
        });
        promise.resolve = resolve;
        promise.reject = reject;
        return promise;
    };

    Math.sign = function (x) {
        x = +x;
        if (x === 0 || isNaN(x)) return Number(x);
        return x > 0 ? 1 : -1;
    };

    Math.degrees = function (radians) {
        return radians * (180 / Math.PI);
    };

    Math.radians = function (degrees) {
        return degrees * (Math.PI / 180);
    };

    Math.clamp = function (value, min, max) {
        return Math.max(min, Math.min(max, value));
    };

    Math.range = function (value, oldMin, oldMax, newMin, newMax, isClamp) {
        const newValue = (value - oldMin) * (newMax - newMin) / (oldMax - oldMin) + newMin;
        if (isClamp) return Math.clamp(newValue, newMin, newMax);
        return newValue;
    };

    Math.mix = function (a, b, alpha) {
        return a * (1 - alpha) + b * alpha;
    };

    Math.step = function (edge, value) {
        return value < edge ? 0 : 1;
    };

    Math.smoothStep = function (min, max, value) {
        const x = Math.max(0, Math.min(1, (value - min) / (max - min)));
        return x * x * (3 - 2 * x);
    };

    Math.fract = function (value) {
        return value - Math.floor(value);
    };

    Math.mod = function (value, n) {
        return (value % n + n) % n;
    };

    Array.prototype.shuffle = function () {
        let i = this.length,
            temp, r;
        while (i !== 0) {
            r = Math.floor(Math.random() * i);
            i -= 1;
            temp = this[i];
            this[i] = this[r];
            this[r] = temp;
        }
        return this;
    };

    Array.prototype.random = function (range) {
        let value = Math.floor(Math.random() * this.length);
        if (range && !this.randomStore) this.randomStore = [];
        if (!this.randomStore) return this[value];
        if (range > this.length) range = this.length;
        if (range > 1) {
            while (~this.randomStore.indexOf(value)) if (++value > this.length - 1) value = 0;
            this.randomStore.push(value);
            if (this.randomStore.length >= range) this.randomStore.shift();
        }
        return this[value];
    };

    Array.prototype.remove = function (element) {
        const index = this.indexOf(element);
        if (~index) return this.splice(index, 1);
    };

    Array.prototype.last = function () {
        return this[this.length - 1];
    };

    String.prototype.includes = function (str) {
        if (!Array.isArray(str)) return ~this.indexOf(str);
        for (let i = 0; i < str.length; i++) if (~this.indexOf(str[i])) return true;
        return false;
    };

    String.prototype.clip = function (num, end) {
        return this.length > num ? this.slice(0, num) + end : this;
    };

    String.prototype.capitalize = function () {
        return this.charAt(0).toUpperCase() + this.slice(1);
    };

    String.prototype.replaceAll = function (find, replace) {
        return this.split(find).join(replace);
    };

    Date.prototype.addDays = function (days) {
        const date = new Date(this.valueOf());
        date.setDate(date.getDate() + days);
        return date;
    };

    window.get = function (url, options = {}) {
        const promise = Promise.create();
        options.method = 'GET';
        window.fetch(url, options).then(handleResponse).catch(promise.reject);

        function handleResponse(e) {
            if (!e.ok) return promise.reject(e);
            e.text().then(function (text) {
                if (text.charAt(0).includes(['[', '{'])) {
                    try {
                        promise.resolve(JSON.parse(text));
                    } catch (err) {
                        promise.resolve(text);
                    }
                } else {
                    promise.resolve(text);
                }
            });
        }
        return promise;
    };

    window.post = function (url, body, options = {}) {
        const promise = Promise.create();
        options.method = 'POST';
        options.body = JSON.stringify(body);
        window.fetch(url, options).then(handleResponse).catch(promise.reject);

        function handleResponse(e) {
            if (!e.ok) return promise.reject(e);
            e.text().then(function (text) {
                if (text.charAt(0).includes(['[', '{'])) {
                    try {
                        promise.resolve(JSON.parse(text));
                    } catch (err) {
                        promise.resolve(text);
                    }
                } else {
                    promise.resolve(text);
                }
            });
        }
        return promise;
    };

    window.defer = function (callback) {
        if (!callback) {
            const promise = Promise.create();
            TweenLite.delayedCall(0.001, promise.resolve);
            return promise;
        }
        TweenLite.delayedCall(0.001, callback);
    };

    window.tween = function (object, props, time, ease, delay, complete, update) {
        if (typeof delay !== 'number') {
            update = complete;
            complete = delay;
            delay = 0;
        }
        const promise = Promise.create();
        if (complete) promise.then(complete);
        complete = promise.resolve;
        const CustomEase = window.CustomEase;
        props.ease = typeof ease === 'object' ? ease : (CustomEase && CustomEase.get(ease)) || Interpolation.get(ease);
        if (props.spring || props.damping) {
            props.ease = props.ease.config(props.spring || 1, props.damping || 0.3);
            delete props.spring;
            delete props.damping;
        }
        props.delay = delay * 0.001;
        props.onComplete = complete;
        props.onUpdate = update;
        TweenLite.to(object, time * 0.001, props);
        return promise;
    };

    window.clearTween = function (object) {
        TweenLite.killTweensOf(object);
    };

    if (!window.Config) window.Config = {};
    if (!window.Global) window.Global = {};
}
1330737
function disallowNodeType(type) {

  return function() {

    function check(node, reporter) {

      if (is(node, type)) {
        reporter.report(node.id, 'Element has disallowed type <' + type + '>');
      }
    }

    return {
      check
    };

  };

}
622440
function (event, point, win) {
		var el = elementFromPoint(point, win);
		syn.trigger(el || win, event, point);
		return el;
	}
207300
function fixClonedDom(clone, source) {
      // do nothing if cloned node is not an element
      if (!source.querySelectorAll) return;
      // these two lists should be coincident
      var s$ = QSA(source, TEMPLATE_TAG);
      if (s$.length === 0) {
        return;
      }
      var t$ = QSA(clone, TEMPLATE_TAG);
      for (var i=0, l=t$.length, t, s; i<l; i++) {
        s = s$[i];
        t = t$[i];
        if (PolyfilledHTMLTemplateElement && PolyfilledHTMLTemplateElement.decorate) {
          PolyfilledHTMLTemplateElement.decorate(s);
        }
        capturedReplaceChild.call(t.parentNode, cloneNode.call(s, true), t);
      }
    }
635068
function fixPolymerInvocation (src, elementName) {
  var match    = /Polymer\(([^,{]+)?(,\s*)?({|\))/.exec(src);
  if(!match) return src;
  var name     = match[1] || '';
  var split    = match[2] || '';
  var trailing = match[3];

  var nameIsString = /^['"]/.test(name);
  if (!split) {
    // assume "name" is actually the prototype if it is not a string literal
    if (!name || (name && !nameIsString)) {
      trailing = name + trailing;
      name = '\'' + elementName + '\'';
    }
    if (trailing !== ')') {
      split = ',';
    }
  }
  return src.replace(match[0], 'Polymer(' + name + split + trailing);
}
404484
function compile($compileNodes, transcludeFn, maxPriority, ignoreDirective,
                        previousCompileContext) {
      if (!($compileNodes instanceof jqLite)) {
        // jquery always rewraps, whereas we need to preserve the original selector so that we can
        // modify it.
        $compileNodes = jqLite($compileNodes);
      }
      // We can not compile top level text elements since text nodes can be merged and we will
      // not be able to attach scope data to them, so we will wrap them in <span>
      forEach($compileNodes, function(node, index) {
        if (node.nodeType == NODE_TYPE_TEXT && node.nodeValue.match(/\S+/) /* non-empty */ ) {
          $compileNodes[index] = jqLite(node).wrap('<span></span>').parent()[0];
        }
      });
      var compositeLinkFn =
              compileNodes($compileNodes, transcludeFn, $compileNodes,
                           maxPriority, ignoreDirective, previousCompileContext);
      compile.$$addScopeClass($compileNodes);
      var namespace = null;
      return function publicLinkFn(scope, cloneConnectFn, options) {
        assertArg(scope, 'scope');

        options = options || {};
        var parentBoundTranscludeFn = options.parentBoundTranscludeFn,
          transcludeControllers = options.transcludeControllers,
          futureParentElement = options.futureParentElement;

        // When `parentBoundTranscludeFn` is passed, it is a
        // `controllersBoundTransclude` function (it was previously passed
        // as `transclude` to directive.link) so we must unwrap it to get
        // its `boundTranscludeFn`
        if (parentBoundTranscludeFn && parentBoundTranscludeFn.$$boundTransclude) {
          parentBoundTranscludeFn = parentBoundTranscludeFn.$$boundTransclude;
        }

        if (!namespace) {
          namespace = detectNamespaceForChildElements(futureParentElement);
        }
        var $linkNode;
        if (namespace !== 'html') {
          // When using a directive with replace:true and templateUrl the $compileNodes
          // (or a child element inside of them)
          // might change, so we need to recreate the namespace adapted compileNodes
          // for call to the link function.
          // Note: This will already clone the nodes...
          $linkNode = jqLite(
            wrapTemplate(namespace, jqLite('<div>').append($compileNodes).html())
          );
        } else if (cloneConnectFn) {
          // important!!: we must call our jqLite.clone() since the jQuery one is trying to be smart
          // and sometimes changes the structure of the DOM.
          $linkNode = JQLitePrototype.clone.call($compileNodes);
        } else {
          $linkNode = $compileNodes;
        }

        if (transcludeControllers) {
          for (var controllerName in transcludeControllers) {
            $linkNode.data('$' + controllerName + 'Controller', transcludeControllers[controllerName].instance);
          }
        }

        compile.$$addScopeInfo($linkNode, scope);

        if (cloneConnectFn) cloneConnectFn($linkNode, scope);
        if (compositeLinkFn) compositeLinkFn(scope, $linkNode, $linkNode, parentBoundTranscludeFn);
        return $linkNode;
      };
    }
301820
function handleContent(element, spaces, marker) {
  let renderedContent = '';
  let objectLike = null;

  if (element.content === undefined) {
    return [renderedContent, objectLike];
  }

  for (const item of element.content) {
    // Note: the `initialIndent` option above works because we specifically
    //       do *not* pass it down the rabbit hole here.
    if (item.element === 'member') {
      // This is an object type or something similar.
      objectLike = true;
      /* eslint-disable no-use-before-define */
      renderedContent += handle(item.key.content, item.value, {
        parent: element,
        spaces,
        marker,
        attributesElement: item,
      });
      /* eslint-enable no-use-before-define */
    } else if (item.element === 'ref') {
      renderedContent += `${marker} Include ${item.content.href}\n`;
    } else if (item.element === 'select') {
      // This is a `OneOf` mutually exclusive type. Currently not
      // supported as it needs some support upstream in Minim.
      console.warn('MSON select/option elements are not yet supported!');
    } else {
      // This is an array type or something similar.
      objectLike = false;
      /* eslint-disable no-use-before-define */
      renderedContent += handle(item.title, item, {
        parent: element,
        spaces,
        marker,
      });
      /* eslint-enable no-use-before-define */
    }
  }

  return [renderedContent, objectLike];
}
380081
private static Element createILFCopy(
            Element compViewNode,
            Element compViewParent,
            boolean includeChildNodes,
            Document plf,
            Element plfParent,
            IPerson person)
            throws PortalException {
        Element plfNode = (Element) plf.importNode(compViewNode, includeChildNodes);
        // make sure that we don't include ILF restriction params in the PLF if
        // this ILF node contained any.
        plfNode.removeAttributeNS(Constants.NS_URI, Constants.LCL_ADD_CHILD_ALLOWED);
        plfNode.removeAttributeNS(Constants.NS_URI, Constants.LCL_DELETE_ALLOWED);
        plfNode.removeAttributeNS(Constants.NS_URI, Constants.LCL_EDIT_ALLOWED);
        plfNode.removeAttributeNS(Constants.NS_URI, Constants.LCL_MOVE_ALLOWED);

        String ID = plfNode.getAttribute(Constants.ATT_ID);
        plfNode.setIdAttribute(Constants.ATT_ID, true);

        IUserLayoutStore uls = null;
        uls = UserLayoutStoreLocator.getUserLayoutStore();

        if (plfNode.getAttribute(Constants.ATT_PLF_ID).equals("")) {
            String plfID = null;

            try {
                if (!plfNode.getAttribute(Constants.ATT_CHANNEL_ID)
                        .equals("")) // dealing with a channel
                plfID = uls.generateNewChannelSubscribeId(person);
                else plfID = uls.generateNewFolderId(person);
            } catch (Exception e) {
                throw new PortalException(
                        "Exception encountered while "
                                + "generating new user layout node "
                                + "Id for userId="
                                + person.getID(),
                        e);
            }

            plfNode.setAttributeNS(Constants.NS_URI, Constants.ATT_PLF_ID, plfID);
            plfNode.setAttributeNS(Constants.NS_URI, Constants.ATT_ORIGIN, ID);
        }

        plfParent.appendChild(plfNode);
        PositionManager.updatePositionSet(compViewParent, plfParent, person);
        return plfNode;
    }
590356
function( point, element, last ) {
			var el = elementFromPoint(point, element)
			if ( last != el && el && last ) {
				var options = Syn.helpers.extend({}, point);
				options.relatedTarget = el;
				Syn.trigger("mouseout", options, last);
				options.relatedTarget = last;
				Syn.trigger("mouseover", options, el);
			}

			Syn.trigger("mousemove", point, el || element)
			return el;
		}
1209759
function ruleApplies(node) {
            if (node.type === "JSXElement" || node.type === "JSXFragment") {
                const isSingleLine = node.loc.start.line === node.loc.end.line;

                switch (IGNORE_JSX) {

                    // Exclude this JSX element from linting
                    case "all":
                        return false;

                    // Exclude this JSX element if it is multi-line element
                    case "multi-line":
                        return isSingleLine;

                    // Exclude this JSX element if it is single-line element
                    case "single-line":
                        return !isSingleLine;

                    // Nothing special to be done for JSX elements
                    case "none":
                        break;

                    // no default
                }
            }

            return ALL_NODES || node.type === "FunctionExpression" || node.type === "ArrowFunctionExpression";
        }