Creates ECMA5 shims if the browser does not implement them.
774118
function createECMA5Shims() {
  // from: https://github.com/kriskowal/es5-shim/blob/master/es5-shim.js

  // ES-5 15.3.4.5
  // http://www.ecma-international.org/publications/files/drafts/tc39-2009-025.pdf
  if (!Function.prototype.bind) {
    var slice = Array.prototype.slice;
    Function.prototype.bind = function bind(that) { // .length is 1
      var target = this;
      if (typeof target.apply !== "function"
      || typeof target.call !== "function")
      return new TypeError();
      var args = slice.call(arguments);

      function bound() {

        if (this instanceof bound) {

          var self = Object.create(target.prototype);
          target.apply(self, args.concat(slice.call(arguments)));
          return self;
        } else {
          return target.call.apply(target, args.concat(slice
            .call(arguments)));
        }

      }
      bound.length = (typeof target === "function" ? Math.max(
      target.length - args.length, 0) : 0);
      return bound;
    };
  }

  // ES5 15.4.3.2
  if (!Array.isArray) {
    Array.isArray = function isArray(obj) {
      return Object.prototype.toString.call(obj) === "[object Array]";
    };
  }

  // ES5 15.4.4.18
  if (!Array.prototype.forEach) {
    Array.prototype.forEach = function forEach(block, thisObject) {
      var len = +this.length;
      for ( var i = 0; i < len; i++) {
        if (i in this) {
          block.call(thisObject, this[i], i, this);
        }
      }
    };
  }

  // ES5 15.4.4.19
  // https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/map
  if (!Array.prototype.map) {
    Array.prototype.map = function map(fun /* , thisp */) {
      var len = +this.length;
      if (typeof fun !== "function")
        throw new TypeError();

      var res = new Array(len);
      var thisp = arguments[1];
      for ( var i = 0; i < len; i++) {
        if (i in this)
          res[i] = fun.call(thisp, this[i], i, this);
      }

      return res;
    };
  }

  // ES5 15.4.4.20
  if (!Array.prototype.filter) {
    Array.prototype.filter = function filter(block /* , thisp */) {
      var values = [];
      var thisp = arguments[1];
      for ( var i = 0; i < this.length; i++)
        if (block.call(thisp, this[i]))
          values.push(this[i]);
        return values;
    };
  }

  // ES5 15.4.4.16
  if (!Array.prototype.every) {
    Array.prototype.every = function every(block /* , thisp */) {
      var thisp = arguments[1];
      for ( var i = 0; i < this.length; i++)
        if (!block.call(thisp, this[i]))
          return false;
        return true;
    };
  }

  // ES5 15.4.4.17
  if (!Array.prototype.some) {
    Array.prototype.some = function some(block /* , thisp */) {
      var thisp = arguments[1];
      for ( var i = 0; i < this.length; i++)
        if (block.call(thisp, this[i]))
          return true;
        return false;
    };
  }

  // ES5 15.4.4.21
  // https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/reduce
  if (!Array.prototype.reduce) {
    Array.prototype.reduce = function reduce(fun /* , initial */) {
      var len = +this.length;
      if (typeof fun !== "function")
        throw new TypeError();

      // no value to return if no initial value and an empty array
      if (len === 0 && arguments.length === 1)
        throw new TypeError();

      var i = 0;
      if (arguments.length >= 2) {
        var rv = arguments[1];
      } else {
        do {
          if (i in this) {
            rv = this[i++];
            break;
          }

          // if array contains no values, no initial value to return
          if (++i >= len)
            throw new TypeError();
        } while (true);
      }

      for (; i < len; i++) {
        if (i in this)
          rv = fun.call(null, rv, this[i], i, this);
      }

      return rv;
    };
  }

  // ES5 15.4.4.22
  // https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/reduceRight
  if (!Array.prototype.reduceRight) {
    Array.prototype.reduceRight = function reduceRight(fun /* , initial */) {
      var len = +this.length;
      if (typeof fun !== "function")
        throw new TypeError();

      // no value to return if no initial value, empty array
      if (len === 0 && arguments.length === 1)
        throw new TypeError();

      var rv, i = len - 1;
      if (arguments.length >= 2) {
        rv = arguments[1];
      } else {
        do {
          if (i in this) {
            rv = this[i--];
            break;
          }

          // if array contains no values, no initial value to return
          if (--i < 0)
            throw new TypeError();
        } while (true);
      }

      for (; i >= 0; i--) {
        if (i in this)
          rv = fun.call(null, rv, this[i], i, this);
      }

      return rv;
    };
  }

  // ES5 15.4.4.14
  if (!Array.prototype.indexOf) {
    Array.prototype.indexOf = function indexOf(value /* , fromIndex */) {
      var length = this.length;
      if (!length)
        return -1;
      var i = arguments[1] || 0;
      if (i >= length)
        return -1;
      if (i < 0)
        i += length;
      for (; i < length; i++) {
        if (!(i in this))
          continue;
        if (value === this[i])
          return i;
      }
      return -1;
    };
  }

  // ES5 15.4.4.15
  if (!Array.prototype.lastIndexOf) {
    Array.prototype.lastIndexOf = function lastIndexOf(value) {
      var length = this.length;
      if (!length)
        return -1;
      var i = arguments[1] || length;
      if (i < 0)
        i += length;
      i = Math.min(i, length - 1);
      for (; i >= 0; i--) {
        if (!(i in this))
          continue;
        if (value === this[i])
          return i;
      }
      return -1;
    };
  }

  // ES5 15.9.4.4
  if (!Date.now) {
    Date.now = function now() {
      return new Date().getTime();
    };
  }
}
893194
function (modName) {
            var mods = Env.mods,
                status,
                m = mods[modName];
            status = m.status;
            // attached or circular dependency
            if (status >= ATTACHING) {
                return;
            }
            m.status = ATTACHING;
            if (m.cjs) {
                // commonjs format will call require in module code again
                Utils.attachMod(m);
            } else {
                Utils.attachModsRecursively(m.getNormalizedRequires());
                Utils.attachMod(m);
            }
        }
1131915
protected <V extends ATSecDBValidator> Set<ATError> createError(V validator, String key, String suffix, String defaultMessagePrefix, Object... arguments ) {
		Set<ATError> errors = new HashSet<>(1);
		if (null != validator) {
			errors.add(new ATError(key, 
					validator.getMessageWithSuffix(suffix, arguments, defaultMessagePrefix + StringUtils.join(arguments, ','))));
		} else if (null != messageSource) {
			errors.add(new ATError(key, 
					messageSource.getMessage(key, null, defaultMessagePrefix, LocaleContextHolder.getLocale())));
		} else {
			errors.add(new ATError(key, defaultMessagePrefix));
		}
		return errors;
	}
1193584
function addValidElements(validElements) {
        var ei, el, ai, al, matches, element, attr, attrData, elementName, attrName, attrType, attributes, attributesOrder,
          prefix, outputName, globalAttributes, globalAttributesOrder, key, value,
          elementRuleRegExp = /^([#+\-])?([^\[!\/]+)(?:\/([^\[!]+))?(?:(!?)\[([^\]]+)\])?$/,
          attrRuleRegExp = /^([!\-])?(\w+::\w+|[^=:<]+)?(?:([=:<])(.*))?$/,
          hasPatternsRegExp = /[*?+]/;

        if (validElements) {
          // Split valid elements into an array with rules
          validElements = split(validElements, ',');

          if (elements['@']) {
            globalAttributes = elements['@'].attributes;
            globalAttributesOrder = elements['@'].attributesOrder;
          }

          // Loop all rules
          for (ei = 0, el = validElements.length; ei < el; ei++) {
            // Parse element rule
            matches = elementRuleRegExp.exec(validElements[ei]);
            if (matches) {
              // Setup local names for matches
              prefix = matches[1];
              elementName = matches[2];
              outputName = matches[3];
              attrData = matches[5];

              // Create new attributes and attributesOrder
              attributes = {};
              attributesOrder = [];

              // Create the new element
              element = {
                attributes: attributes,
                attributesOrder: attributesOrder
              };

              // Padd empty elements prefix
              if (prefix === '#') {
                element.paddEmpty = true;
              }

              // Remove empty elements prefix
              if (prefix === '-') {
                element.removeEmpty = true;
              }

              if (matches[4] === '!') {
                element.removeEmptyAttrs = true;
              }

              // Copy attributes from global rule into current rule
              if (globalAttributes) {
                for (key in globalAttributes) {
                  attributes[key] = globalAttributes[key];
                }

                attributesOrder.push.apply(attributesOrder, globalAttributesOrder);
              }

              // Attributes defined
              if (attrData) {
                attrData = split(attrData, '|');
                for (ai = 0, al = attrData.length; ai < al; ai++) {
                  matches = attrRuleRegExp.exec(attrData[ai]);
                  if (matches) {
                    attr = {};
                    attrType = matches[1];
                    attrName = matches[2].replace(/::/g, ':');
                    prefix = matches[3];
                    value = matches[4];

                    // Required
                    if (attrType === '!') {
                      element.attributesRequired = element.attributesRequired || [];
                      element.attributesRequired.push(attrName);
                      attr.required = true;
                    }

                    // Denied from global
                    if (attrType === '-') {
                      delete attributes[attrName];
                      attributesOrder.splice(inArray(attributesOrder, attrName), 1);
                      continue;
                    }

                    // Default value
                    if (prefix) {
                      // Default value
                      if (prefix === '=') {
                        element.attributesDefault = element.attributesDefault || [];
                        element.attributesDefault.push({ name: attrName, value: value });
                        attr.defaultValue = value;
                      }

                      // Forced value
                      if (prefix === ':') {
                        element.attributesForced = element.attributesForced || [];
                        element.attributesForced.push({ name: attrName, value: value });
                        attr.forcedValue = value;
                      }

                      // Required values
                      if (prefix === '<') {
                        attr.validValues = makeMap(value, '?');
                      }
                    }

                    // Check for attribute patterns
                    if (hasPatternsRegExp.test(attrName)) {
                      element.attributePatterns = element.attributePatterns || [];
                      attr.pattern = patternToRegExp(attrName);
                      element.attributePatterns.push(attr);
                    } else {
                      // Add attribute to order list if it doesn't already exist
                      if (!attributes[attrName]) {
                        attributesOrder.push(attrName);
                      }

                      attributes[attrName] = attr;
                    }
                  }
                }
              }

              // Global rule, store away these for later usage
              if (!globalAttributes && elementName == '@') {
                globalAttributes = attributes;
                globalAttributesOrder = attributesOrder;
              }

              // Handle substitute elements such as b/strong
              if (outputName) {
                element.outputName = elementName;
                elements[outputName] = element;
              }

              // Add pattern or exact element
              if (hasPatternsRegExp.test(elementName)) {
                element.pattern = patternToRegExp(elementName);
                patternElements.push(element);
              } else {
                elements[elementName] = element;
              }
            }
          }
        }
      }
731987
function inject (tag, shims){
      var added = shims.some(function(shim){
        var i = html.lastIndexOf(shim);
        if (i !== -1) {
          html = html.substr(0, i) + tag + html.substr(i);
          return true;
        }
        return false;
      });
      // Failing that, just append it.
      if (! added) {
        html += tag;
      }
    }
1120108
function fixDefaultChecked( elem ) {
	if ( rcheckableType.test( elem.type ) ) {
		elem.defaultChecked = elem.checked;
	}
}
361570
function generateSchemas() {
  // this.ajv.addMetaSchema(_generate.call(this, 'evaluate_metaschema'));
  this._validate = this.ajv.compile(_generate.call(this, 'schema'));
  this._expandMacros = this.ajv.compile(_generate.call(this, 'expand_macros'));
  this._evaluate = this.ajv.compile(_generate.call(this, 'evaluate'));
  // console.log(this._validate.toString().length, this._evaluate.toString().length);
}
707828
function() {
		var s = document.createElement('p').style, // 's' for style. better to create an element if body yet to exist
			v = ['ms','O','Moz','Webkit']; // 'v' for vendor

		if( s['transition'] !== undefined ) {
			return true; 
		}
			
		while( v.length ) {
			if( v.pop() + 'Transition' in s ) {
				return true;
			}
		}
				
		return false;
	}
1146636
function _createMaskRect() {
  const element = document.createElementNS(svgNS, 'rect');

  _setAttributes(element, {
    fill: '#FFFFFF',
    height: '100%',
    id: elementIds.modalOverlayMaskRect,
    width: '100%',
    x: '0',
    y: '0'
  });

  return element;
}
1088053
function createDirIfIsNotDefined(dirPath, dirName, cb) {
    if (!fs.existsSync(dirPath + '/' + dirName)){
        fs.mkdirSync(dirPath + '/' + dirName);
        console.info(cliStyles.cyan + '\tcreate' + cliStyles.reset + ': ' + dirPath + '/' + dirName);
    }

    cb();
}
571003
function createCssyBrowser (src, imports) {
  imports = imports || []

  var changeListeners = []

  var instances = []

  function findInstance (to, media) {
    for (var i = 0, len = instances.length; i < len; i++) {
      if (instances[i].to === to && instances[i].media === media) {
        return instances[i]
      }
    }
    return null
  }

  function removeInstance (instance) {
    var result = []
    for (var i = 0, len = instances.length; i < len; i++) {
      if (instances[i] !== instance) {
        result.push(instances[i])
      }
    }
    instances = result
  }

  /**
   * CssyBrowser is the object exported by a module handled by cssy:
   *
   * ```javascript
   * var myCss = require('./my.css')
   * // myCss is a CssyBrowser
   * ```
   *
   * A CssyBrowser instance can be used as:
   *
   * - **An string** when used in a context that imply a string: thanks to
   *   `CssyBrowser.toString()` that return the css source.
   * - **A function**, alias of CssyBrowser.insert([to, [media]]), to inject
   *   the css source in the document: `myCss()`,
   *   `myCss(element)` or `myCss(element, 'media query')`.
   * - **An object** with the methods described below.
   *
   * @return {Object}
   *         See [CssyBrowser.insert()](#cssybrowserinsertto-media)
   */
  function CssyBrowser () {
    return CssyBrowser.insert.apply(null, arguments)
  }

  /**
   * Insert css source in the DOM
   *
   * Create and append a `<style>` element in the dom at `to`. If the source contain
   * `@import` at-rules, imported CssyBrowser modules are injected too.
   *
   * The content of all the injected `<style>` element is binded to css source
   * change: When `.update()` is called by you or by the cssy's live source
   * reload server.
   *
   * If a style element with the same parent (`to`) and the same media query
   * already exists, then this function only increment a counter for this kind
   * of pair (parent/media-query). And remove() calls only decrement this
   * counter until no more consumer require this style to be inserted.
   *
   *
   * @param  {HTMLElement|ShadowRoot} [to]
   *         Where to inject the style. Default to document's head.
   *
   * @param  {String} [media]
   *         Set the media attribute of the injected style tag
   *
   * @return {Object}
   *         An object with:
   *         - `element` **{HTMLElement}**: The `style` element inserted
   *         - `children` **{Array}**: The other CssyBrowser instances imported
   *           and injected by this instance
   *         - `remove` **{Function}**: Remove injected `style` element and all
   *           other CssyBrowser instances imported
   */
  CssyBrowser.insert = function (to, media) {
    var children, element, instance

    // Parent for style element (default is document's head)
    to = to || document.getElementsByTagName('head')[0]

    // Insert each imported styles
    children = imports.map(function (imp) {
      var submodule = imp.module
      var child

      var submedia = []
      if (media) { submedia.push(media) }
      if (imp.media) { submedia.push(imp.media) }
      submedia = submedia.join(' and ')

      if (typeof (submodule.insert) === 'function') {
        child = submodule.insert(to, submedia)
      } else if (typeof (submodule.toString) === 'function') {
        // A string or any thing that provide a string
        // we crate and inject a new CssyBrowser instance.
        // As this module is not bundler with cssy's transform
        // we can not provide live source update.
        child = createCssyBrowser(submodule.toString()).insert(to, submedia)
      }
      return child
    })

    // Source content update (used as listener for change event)
    function update (src) {
      if (element.styleSheet) {
        element.styleSheet.cssText = src
      } else {
        element.textContent = src
      }
    }

    // Is this parent (to) contain already an instance of this css source
    // with the same media query ?
    instance = findInstance(to, media)

    if (instance) {
      element = instance.element
      instance.counter++
    } else {
      element = document.createElement('style')
      element.setAttribute('type', 'text/css')
      if (media) {
        element.setAttribute('media', media)
      }
      to.appendChild(element)
      instances.push({
        element: element,
        to: to,
        media: media,
        counter: 1
      })
      // Initialize:
      update(CssyBrowser.toString())
      CssyBrowser.onChange(update)
    }

    function remove () {
      var instance = findInstance(to, media)
      if (!instance) return
      instance.counter--
      if (instance.counter === 0) {
        removeInstance(instance)
        CssyBrowser.offChange(update)
        try {
          element.parentNode.removeChild(element)
        } catch (_) {}
      }
      children.forEach(function (child) {
        if (typeof (child.remove) === 'function') {
          child.remove()
        }
      })
    }

    return {
      element: element,
      children: children,
      remove: remove
    }
  }

  /**
   * Update current css source
   *
   * Each inject style element are updated too
   *
   * @param  {String} src
   */
  CssyBrowser.update = function (src) {
    CssyBrowser.src = src
    changeListeners.forEach(function (listener) {
      listener(src)
    })
    return CssyBrowser
  }

  /**
   * Listen for css source changes
   *
   * @param {Function} listener
   *        Change listener. Receive new css source
   */
  CssyBrowser.onChange = function (listener) {
    changeListeners.push(listener)
    return CssyBrowser
  }

  /**
   * Detach change listener
   *
   * @param {Function} listener
   */
  CssyBrowser.offChange = function (listener) {
    changeListeners = changeListeners.filter(function (l) { return l !== listener })
    return CssyBrowser
  }

  /**
   * Get the imported CssyBrowser instance (based on `@import` at-rules)
   *
   * @return {Array}
   *         Array of CssyBrowser instance
   */
  CssyBrowser.getImports = function () {
    return imports
  }

  /**
   * Override default toString()
   *
   * @return {String}
   *         The current css source
   */
  CssyBrowser.toString = function () {
    return CssyBrowser.src
  }

  CssyBrowser.src = src

  return CssyBrowser
}
884939
private static Object jsConstructor(Context cx, Scriptable scope,
                                        Object[] args)
    {
        if (args.length == 0)
            return new NativeArray(0);

        // Only use 1 arg as first element for version 1.2; for
        // any other version (including 1.3) follow ECMA and use it as
        // a length.
        if (cx.getLanguageVersion() == Context.VERSION_1_2) {
            return new NativeArray(args);
        }
        Object arg0 = args[0];
        if (args.length > 1 || !(arg0 instanceof Number)) {
            return new NativeArray(args);
        }
        long len = ScriptRuntime.toUint32(arg0);
        if (len != ((Number)arg0).doubleValue()) {
            String msg = ScriptRuntime.getMessage0("msg.arraylength.bad");
            throw ScriptRuntime.constructError("RangeError", msg);
        }
        return new NativeArray(len);
    }
1111673
function createFSM() {
  return {
    _stack: [],
    enter: function(state) {
      this._stack.push(state);
      return this;
    },
    leave: function(state) {
      var stack = this._stack;
      // if state is falsy or state equals to last item in stack
      if(!state || stack[stack.length-1] === state) {
        stack.pop();
      }
      return this;
    },
    get: function() {
      var stack = this._stack;
      return stack[stack.length - 1];
    },
    all: function() {
      return this._stack;
    },
    is: function(state) {
      var stack = this._stack;
      return stack[stack.length - 1] === state
    }
  }
}
1175236
function (fieldDefinition, fieldName) {
		const fieldType = propertyHelper.getFieldType(fieldDefinition);

		if (fieldType === 'boolean') {
			// it is a boolean field. Create the cehcks
			return createChecks(fieldDefinition, fieldName);
		}
	}
232337
function shim () {
    if (!Function.prototype.bind) {
      Function.prototype.bind = function (oThis) {
        if (typeof this !== 'function') {
          // closest thing possible to the ECMAScript 5 internal IsCallable function
          throw new TypeError('Function.prototype.bind - what is trying to be bound is not callable');
        }

        var aArgs = Array.prototype.slice.call(arguments, 1),
            fToBind = this,
            FNOP = function () {},
            fBound = function () {
              return fToBind.apply(this instanceof FNOP && oThis ?
                            this : oThis, aArgs.concat(Array.prototype.slice.call(arguments)));
            };

        FNOP.prototype = this.prototype;
        fBound.prototype = new FNOP();

        return fBound;
      };
    }

    if(!Array.isArray) {
      Array.isArray = function (vArg) {
        return Object.prototype.toString.call(vArg) === '[object Array]';
      };
    }

    if (!Array.prototype.indexOf) {
      Array.prototype.indexOf = function (searchElement, fromIndex) {
        var i,
            pivot = (fromIndex) ? fromIndex : 0,
            length;

        if (!this) {
          throw new TypeError();
        }

        length = this.length;

        if (length === 0 || pivot >= length) {
          return -1;
        }

        if (pivot < 0) {
          pivot = length - Math.abs(pivot);
        }

        for (i = pivot; i < length; i++) {
          if (this[i] === searchElement) {
            return i;
          }
        }
        return -1;
      };
    }

    if (!Array.prototype.map)
    {
      Array.prototype.map = function(fun /*, thisArg */)
      {
        'use strict';

        if (this === void 0 || this === null)
          throw new TypeError();

        var t = Object(this);
        var len = t.length >>> 0;
        if (typeof fun !== 'function') {
          throw new TypeError();
        }

        var res = new Array(len);
        var thisArg = arguments.length >= 2 ? arguments[1] : void 0;
        for (var i = 0; i < len; i++)
        {
          // NOTE: Absolute correctness would demand Object.defineProperty
          //       be used.  But this method is fairly new, and failure is
          //       possible only if Object.prototype or Array.prototype
          //       has a property |i| (very unlikely), so use a less-correct
          //       but more portable alternative.
          if (i in t)
            res[i] = fun.call(thisArg, t[i], i, t);
        }

        return res;
      };
    }
  }
912307
function() {
				var container, shimContainer = Dom.get(this.shimid);

				// if no container for shim, create one
				if (!shimContainer) {
					container = this.options.container ? Dom.get(this.options.container) : document.body;

					// create shim container and insert it at an absolute position into the outer container
					shimContainer = document.createElement('div');
					shimContainer.id = this.shimid;
					shimContainer.className = 'moxie-shim moxie-shim-' + this.type;

					Basic.extend(shimContainer.style, {
						position: 'absolute',
						top: '0px',
						left: '0px',
						width: '1px',
						height: '1px',
						overflow: 'hidden'
					});

					container.appendChild(shimContainer);
					container = null;
				}

				return shimContainer;
			}
426814
function valErrsChanged(newValue) {

                    // HTML5 custom validity
                    // http://dev.w3.org/html5/spec-preview/constraints.html#the-constraint-validation-api
                    if (domEl.setCustomValidity) {
                        /* only works in HTML 5. Maybe should throw if not available. */
                        domEl.setCustomValidity(newValue || '');
                    }

                    var errorHtml = newValue ? valTemplate.replace(/%error%/, newValue) : "";
                    var isRequired = info.getIsRequired();
                    var requiredHtml = isRequired ? requiredTemplate : '';
                    decorator.innerHTML = (isRequired || !!errorHtml) ? requiredHtml + errorHtml : "";
                }