/////////////////////// region Input Binding Data
198000
public void addParameterSources(List<ParameterBinding> parameters) {
        assert parameters != null;
        for (ParameterBinding parameter : parameters) {
        	DataSource<?> inputValue = rpcSourceFromParameter(parameter);            
            this.inputSources.put(parameter.getName(), inputValue);
        }
    }
1106958
private void registerLocalChildBinding(Key<?> key, GinjectorBindings binding) {
    boundLocallyInChildren.put(key, binding);
    if (parent != null) {
      parent.registerLocalChildBinding(key, binding);
    }
  }
406163
function($input) {
		var currentWidth = null;
	
		var update = function(e, options) {
			var value, keyCode, printable, placeholder, width;
			var shift, character, selection;
			e = e || window.event || {};
			options = options || {};
	
			if (e.metaKey || e.altKey) return;
			if (!options.force && $input.data('grow') === false) return;
	
			value = $input.val();
			if (e.type && e.type.toLowerCase() === 'keydown') {
				keyCode = e.keyCode;
				printable = (
					(keyCode >= 97 && keyCode <= 122) || // a-z
					(keyCode >= 65 && keyCode <= 90)  || // A-Z
					(keyCode >= 48 && keyCode <= 57)  || // 0-9
					keyCode === 32 // space
				);
	
				if (keyCode === KEY_DELETE || keyCode === KEY_BACKSPACE) {
					selection = getSelection($input[0]);
					if (selection.length) {
						value = value.substring(0, selection.start) + value.substring(selection.start + selection.length);
					} else if (keyCode === KEY_BACKSPACE && selection.start) {
						value = value.substring(0, selection.start - 1) + value.substring(selection.start + 1);
					} else if (keyCode === KEY_DELETE && typeof selection.start !== 'undefined') {
						value = value.substring(0, selection.start) + value.substring(selection.start + 1);
					}
				} else if (printable) {
					shift = e.shiftKey;
					character = String.fromCharCode(e.keyCode);
					if (shift) character = character.toUpperCase();
					else character = character.toLowerCase();
					value += character;
				}
			}
	
			placeholder = $input.attr('placeholder');
			if (!value && placeholder) {
				value = placeholder;
			}
	
			width = measureString(value, $input) + 4;
			if (width !== currentWidth) {
				currentWidth = width;
				$input.width(width);
				$input.triggerHandler('resize');
			}
		};
	
		$input.on('keydown keyup update blur', update);
		update();
	}
874639
@Override
    public Datatype createDatatype(String typeLocalName)
            throws DatatypeException {
        if ("ID".equals(typeLocalName)) {
            return new Id();
        } else if ("IDREF".equals(typeLocalName)) {
            return Idref.THE_INSTANCE;
        } else if ("IDREFS".equals(typeLocalName)) {
            return Idrefs.THE_INSTANCE;
        } else if ("datetime".equals(typeLocalName)) {
            return Datetime.THE_INSTANCE;
        } else if ("datetime-local".equals(typeLocalName)) {
            return DatetimeLocal.THE_INSTANCE;
        } else if ("datetime-tz".equals(typeLocalName)) {
            return DatetimeTz.THE_INSTANCE;
        } else if ("date-or-time".equals(typeLocalName)) {
            return DateOrTime.THE_INSTANCE;
        } else if ("date".equals(typeLocalName)) {
            return Date.THE_INSTANCE;
        } else if ("month".equals(typeLocalName)) {
            return Month.THE_INSTANCE;
        } else if ("week".equals(typeLocalName)) {
            return Week.THE_INSTANCE;
        } else if ("time".equals(typeLocalName)) {
            return Time.THE_INSTANCE;
        } else if ("iri".equals(typeLocalName)) {
            return Iri.THE_INSTANCE;
        } else if ("iri-ref".equals(typeLocalName)) {
            return IriRef.THE_INSTANCE;
        } else if ("iri-ref-http-or-https".equals(typeLocalName)) {
            return IriRefHttpOrHttps.THE_INSTANCE;
        } else if ("string".equals(typeLocalName)) {
            return AsciiCaseInsensitiveString.THE_INSTANCE;
        } else if ("language".equals(typeLocalName)) {
            return Language.THE_INSTANCE;
        } else if ("media-query".equals(typeLocalName)) {
            return MediaQuery.THE_INSTANCE;
        } else if ("media-condition".equals(typeLocalName)) {
            return MediaCondition.THE_INSTANCE;
        } else if ("mime-type".equals(typeLocalName)) {
            return MimeType.THE_INSTANCE;
        } else if ("script-type".equals(typeLocalName)) {
            return ScriptType.THE_INSTANCE;
        } else if ("browsing-context".equals(typeLocalName)) {
            return BrowsingContext.THE_INSTANCE;
        } else if ("browsing-context-or-keyword".equals(typeLocalName)) {
            return BrowsingContextOrKeyword.THE_INSTANCE;
        } else if ("hash-name".equals(typeLocalName)) {
            return HashName.THE_INSTANCE;
        } else if ("integer".equals(typeLocalName)) {
            return Int.THE_INSTANCE;
        } else if ("integer-non-negative".equals(typeLocalName)) {
            return IntNonNegative.THE_INSTANCE;
        } else if ("integer-positive".equals(typeLocalName)) {
            return IntPositive.THE_INSTANCE;
        } else if ("float".equals(typeLocalName)) {
            return FloatingPointExponent.THE_INSTANCE;
        } else if ("float-non-negative".equals(typeLocalName)) {
            return FloatingPointExponentNonNegative.THE_INSTANCE;
        } else if ("float-positive".equals(typeLocalName)) {
            return FloatingPointExponentPositive.THE_INSTANCE;
        } else if ("css-number-token".equals(typeLocalName)) {
            return CssNumberToken.THE_INSTANCE;
        } else if ("mime-type-list".equals(typeLocalName)) {
            return MimeTypeList.THE_INSTANCE;
        } else if ("circle".equals(typeLocalName)) {
            return Circle.THE_INSTANCE;
        } else if ("rectangle".equals(typeLocalName)) {
            return Rectangle.THE_INSTANCE;
        } else if ("polyline".equals(typeLocalName)) {
            return Polyline.THE_INSTANCE;
        } else if ("xml-name".equals(typeLocalName)) {
            return XmlName.THE_INSTANCE;
        } else if ("meta-charset".equals(typeLocalName)) {
            return MetaCharset.THE_INSTANCE;
        } else if ("microdata-property".equals(typeLocalName)) {
            return MicrodataProperty.THE_INSTANCE;
        } else if ("charset".equals(typeLocalName)) {
            return Charset.THE_INSTANCE;
        } else if ("refresh".equals(typeLocalName)) {
            return Refresh.THE_INSTANCE;
        } else if ("paren-start".equals(typeLocalName)) {
            return ParenthesisStart.THE_INSTANCE;
        } else if ("paren-end".equals(typeLocalName)) {
            return ParenthesisEnd.THE_INSTANCE;
        } else if ("email-address".equals(typeLocalName)) {
            return EmailAddress.THE_INSTANCE;
        } else if ("email-address-list".equals(typeLocalName)) {
            return EmailAddressList.THE_INSTANCE;
        } else if ("keylabellist".equals(typeLocalName)) {
            return KeyLabelList.THE_INSTANCE;
        } else if ("zero".equals(typeLocalName)) {
            return Zero.THE_INSTANCE;
        } else if ("script-documentation".equals(typeLocalName)) {
            return ScriptDocumentation.THE_INSTANCE;
        } else if ("a-rel".equals(typeLocalName)) {
            return ARel.THE_INSTANCE;
        } else if ("link-rel".equals(typeLocalName)) {
            return LinkRel.THE_INSTANCE;
        } else if ("non-empty-string".equals(typeLocalName)) {
            return NonEmptyString.THE_INSTANCE;
        } else if ("string-without-line-breaks".equals(typeLocalName)) {
            return StringWithoutLineBreaks.THE_INSTANCE;
        } else if ("simple-color".equals(typeLocalName)) {
            return SimpleColor.THE_INSTANCE;
        } else if ("color".equals(typeLocalName)) {
            return Color.THE_INSTANCE;
        } else if ("time-datetime".equals(typeLocalName)) {
            return TimeDatetime.THE_INSTANCE;
        } else if ("svg-pathdata".equals(typeLocalName)) {
            return new SvgPathData();
        } else if ("source-size-list".equals(typeLocalName)) {
            return SourceSizeList.THE_INSTANCE;
        } else if ("image-candidate-strings".equals(typeLocalName)) {
            return ImageCandidateStrings.THE_INSTANCE;
        } else if ("image-candidate-strings-width-required".equals(typeLocalName)) {
            return ImageCandidateStringsWidthRequired.THE_INSTANCE;
        } else if ("image-candidate-url".equals(typeLocalName)) {
            return ImageCandidateURL.THE_INSTANCE;
        } else if ("integrity-metadata".equals(typeLocalName)) {
            return IntegrityMetadata.THE_INSTANCE;
        } else if ("sandbox-allow-list".equals(typeLocalName)) {
            return SandboxAllowList.THE_INSTANCE;
        } else if ("content-security-policy".equals(typeLocalName)) {
            return ContentSecurityPolicy.THE_INSTANCE;
        } else if ("autocomplete-any".equals(typeLocalName)) {
            return AutocompleteDetailsAny.THE_INSTANCE;
        } else if ("autocomplete-text".equals(typeLocalName)) {
            return AutocompleteDetailsText.THE_INSTANCE;
        } else if ("autocomplete-password".equals(typeLocalName)) {
            return AutocompleteDetailsPassword.THE_INSTANCE;
        } else if ("autocomplete-url".equals(typeLocalName)) {
            return AutocompleteDetailsUrl.THE_INSTANCE;
        } else if ("autocomplete-email".equals(typeLocalName)) {
            return AutocompleteDetailsEmail.THE_INSTANCE;
        } else if ("autocomplete-tel".equals(typeLocalName)) {
            return AutocompleteDetailsTel.THE_INSTANCE;
        } else if ("autocomplete-numeric".equals(typeLocalName)) {
            return AutocompleteDetailsNumeric.THE_INSTANCE;
        } else if ("autocomplete-month".equals(typeLocalName)) {
            return AutocompleteDetailsMonth.THE_INSTANCE;
        } else if ("autocomplete-date".equals(typeLocalName)) {
            return AutocompleteDetailsDate.THE_INSTANCE;
        } else if ("custom-element-name".equals(typeLocalName)) {
            return CustomElementName.THE_INSTANCE;
        }
        throw new DatatypeException("Unknown local name for datatype: " + typeLocalName);
    }
1200142
public void process(GrayU8 input , GrayU8 output ) {
		InputSanityCheck.checkSameShape(input, output);

		regionWidth = regionWidthLength.computeI(Math.min(input.width,input.height));

		if (input.width < regionWidth || input.height < regionWidth) {
			regionWidth = Math.min(input.width,input.height);
		}

		numPixels = regionWidth*regionWidth;

		int y0 = regionWidth/2;
		int y1 = input.height-(regionWidth-y0);
		int x0 = regionWidth/2;
		int x1 = input.width-(regionWidth-x0);

		final byte a,b;
		if( down ) {
			a = 1; b = 0;
		} else {
			a = 0; b = 1;
		}

		process(input, output, x0, y0, x1, y1, a, b);
	}
192330
function(p) {

			var _this = this;
			var w = window;
			var data = p.data;

			// Is data a form object
			if (_this.domInstance('form', data)) {
				data = _this.nodeListToJSON(data.elements);
			}
			else if ('NodeList' in w && data instanceof NodeList) {
				data = _this.nodeListToJSON(data);
			}
			else if (_this.domInstance('input', data)) {
				data = _this.nodeListToJSON([data]);
			}

			// Is data a blob, File, FileList?
			if (('File' in w && data instanceof w.File) ||
				('Blob' in w && data instanceof w.Blob) ||
				('FileList' in w && data instanceof w.FileList)) {
				data = {file: data};
			}

			// Loop through data if it's not form data it must now be a JSON object
			if (!('FormData' in w && data instanceof w.FormData)) {

				for (var x in data) if (data.hasOwnProperty(x)) {

					if ('FileList' in w && data[x] instanceof w.FileList) {
						if (data[x].length === 1) {
							data[x] = data[x][0];
						}
					}
					else if (_this.domInstance('input', data[x]) && data[x].type === 'file') {
						continue;
					}
					else if (_this.domInstance('input', data[x]) ||
						_this.domInstance('select', data[x]) ||
						_this.domInstance('textArea', data[x])) {
						data[x] = data[x].value;
					}
					else if (_this.domInstance(null, data[x])) {
						data[x] = data[x].innerHTML || data[x].innerText;
					}
				}
			}

			p.data = data;
			return data;
		}
720616
Map<String, String> parseJsStringMap(String input) throws ParseException {
    input = CharMatcher.whitespace().trimFrom(input);
    check(
        !input.isEmpty() && input.charAt(0) == '{' && input.charAt(input.length() - 1) == '}',
        "Syntax error when parsing JS object");
    input = input.substring(1, input.length() - 1).trim();

    Map<String, String> results = new LinkedHashMap<>();
    boolean done = input.isEmpty();
    valueMatcher.reset(input);
    while (!done) {
      // Parse the next key (TODO(sdh): need to support non-quoted keys?).
      check(valueMatcher.lookingAt(), "Bad key in JS object literal");
      String key = valueMatcher.group(1) != null ? valueMatcher.group(1) : valueMatcher.group(2);
      check(!valueMatcher.hitEnd(), "Missing value in JS object literal");
      check(input.charAt(valueMatcher.end()) == ':', "Missing colon in JS object literal");
      valueMatcher.region(valueMatcher.end() + 1, valueMatcher.regionEnd());

      // Parse the corresponding value.
      check(valueMatcher.lookingAt(), "Bad value in JS object literal");
      String val = valueMatcher.group(1) != null ? valueMatcher.group(1) : valueMatcher.group(2);
      results.put(key, val);
      if (!valueMatcher.hitEnd()) {
        check(input.charAt(valueMatcher.end()) == ',', "Missing comma in JS object literal");
        valueMatcher.region(valueMatcher.end() + 1, valueMatcher.regionEnd());
      } else {
        done = true;
      }
    }
    return results;
  }
502529
function () {
            var inputElm = this.getTextInputField();
            // only react if some DOM is available
            if (inputElm) {
                this._updateState();
                // sets the readOnly disabled flags in the input according to
                // the recently changed cfg object
                inputElm.readOnly = this.isTextInputReadOnly();
                inputElm.disabled = this._cfg.disabled;

                if (this._cfg.waiAria) {
                    if (this._cfg.formatError || this._cfg.error) {
                        inputElm.setAttribute("aria-invalid", "");
                    } else {
                        inputElm.removeAttribute("aria-invalid");
                    }
                }

            }
        }
298523
@Override
	public void setData(final Object data) {
		if (isRichTextArea() && data instanceof String) {
			super.setData(sanitizeInputText((String) data));
		} else {
			super.setData(data);
		}
	}
241239
private void doGetRegional() throws PageException {
	Struct sct = new StructImpl();
	pageContext.setVariable(getString("admin", action, "returnVariable"), sct);
	sct.set("locale", Caster.toString(config.getLocale()));
	sct.set("timezone", toStringTimeZone(config.getTimeZone()));
	sct.set("timeserver", config.getTimeServer());
	sct.set("usetimeserver", config.getUseTimeServer());
	// replaced with encoding outputsct.set("defaultencoding", config.get DefaultEncoding());
    }
262816
function () {
		this.regional = []; // Available regional settings, indexed by language code
		this.regional[''] = { // Default regional settings
			currentText: 'Now',
			closeText: 'Done',
			amNames: ['AM', 'A'],
			pmNames: ['PM', 'P'],
			timeFormat: 'HH:mm',
			timeSuffix: '',
			timeOnlyTitle: 'Choose Time',
			timeText: 'Time',
			hourText: 'Hour',
			minuteText: 'Minute',
			secondText: 'Second',
			millisecText: 'Millisecond',
			microsecText: 'Microsecond',
			timezoneText: 'Time Zone',
			isRTL: false
		};
		this._defaults = { // Global defaults for all the datetime picker instances
			showButtonPanel: true,
			timeOnly: false,
			timeOnlyShowDate: false,
			showHour: null,
			showMinute: null,
			showSecond: null,
			showMillisec: null,
			showMicrosec: null,
			showTimezone: null,
			showTime: true,
			stepHour: 1,
			stepMinute: 1,
			stepSecond: 1,
			stepMillisec: 1,
			stepMicrosec: 1,
			hour: 0,
			minute: 0,
			second: 0,
			millisec: 0,
			microsec: 0,
			timezone: null,
			hourMin: 0,
			minuteMin: 0,
			secondMin: 0,
			millisecMin: 0,
			microsecMin: 0,
			hourMax: 23,
			minuteMax: 59,
			secondMax: 59,
			millisecMax: 999,
			microsecMax: 999,
			minDateTime: null,
			maxDateTime: null,
			maxTime: null,
			minTime: null,
			onSelect: null,
			hourGrid: 0,
			minuteGrid: 0,
			secondGrid: 0,
			millisecGrid: 0,
			microsecGrid: 0,
			alwaysSetTime: true,
			separator: ' ',
			altFieldTimeOnly: true,
			altTimeFormat: null,
			altSeparator: null,
			altTimeSuffix: null,
			altRedirectFocus: true,
			pickerTimeFormat: null,
			pickerTimeSuffix: null,
			showTimepicker: true,
			timezoneList: null,
			addSliderAccess: false,
			sliderAccessArgs: null,
			controlType: 'slider',
			oneLine: false,
			defaultValue: null,
			parse: 'strict',
			afterInject: null
		};
		$.extend(this._defaults, this.regional['']);
	}
1266393
function _inputChar(char) {
    if(_charIsPrintable(char.charCodeAt(0))
      &&utils.isSelectable(document.activeElement)) {
      // add the char
      // FIXME: put at caretPosition/replace selected content
      document.activeElement.value += char;
      // fire an input event
      utils.dispatch(document.activeElement, {type: 'input'});
    }
  }
333934
function (charCode, keyCode, currentText, caretPosStart, caretPosEnd, event) {
            var dataModel = this._dataModel, domEvent = ariaDomEvent, report, selectionKey;

            if (this._listWidget) {
                selectionKey = this.checkSelectionKeys(event);
            }
            if (!domEvent.isNavigationKey(keyCode) && !selectionKey) {
                // value that should be in the input after this keystroke and also the caret positions
                var nextValueObject;
                var isDelKey = (keyCode == domEvent.KC_DELETE || keyCode == domEvent.KC_BACKSPACE);
                if (isDelKey) {
                    nextValueObject = this._getTypedValueOnDelete(keyCode, currentText, caretPosStart, caretPosEnd);
                } else {
                    nextValueObject = this._getTypedValue(charCode, currentText, caretPosStart, caretPosEnd);
                }

                dataModel.initialInput = nextValueObject.nextValue;

                return this._checkInputKey(charCode, keyCode, nextValueObject.nextValue, nextValueObject.caretPosStart, nextValueObject.caretPosEnd);
            }

            // Handling for navigation. First if dropdown list is opened
            if (this._listWidget) {
                if (!selectionKey && keyCode == domEvent.KC_ESCAPE) {
                    report = this.checkText(dataModel.initialInput);
                    if (!report) {
                        report = new ariaWidgetsControllersReportsDropDownControllerReport();
                    }
                    report.displayDropDown = false; // close the dropdown
                    report.text = dataModel.initialInput;
                    // data Model value reset on escape to retain error no escape PTR 05163905
                    report.value = report.text;
                    report.cancelKeyStroke = true;
                    dataModel.value = null;
                    return report;

                } else if (selectionKey || keyCode == domEvent.KC_TAB) {
                    if (dataModel.selectedIdx != -1) {
                        if (dataModel.selectedIdx != null) {
                            dataModel.text = this._getLabelFromListValue(dataModel.listContent[dataModel.selectedIdx]);
                            dataModel.value = dataModel.listContent[dataModel.selectedIdx].value;
                        }
                        report = this.checkDropdownValue(dataModel.value);
                    } else {
                        var report = new ariaWidgetsControllersReportsDropDownControllerReport();
                    }
                    report.displayDropDown = false; // close the dropdown
                    if (keyCode != domEvent.KC_TAB) {
                        report.cancelKeyStroke = true; // prevent fieldset onSubmit when typing ENTER
                    }
                    return report;
                } else if (keyCode == domEvent.KC_ARROW_LEFT) {
                    return;
                } else {
                    report = new ariaWidgetsControllersReportsDropDownControllerReport();

                    var oldIdx = dataModel.selectedIdx;
                    this._listWidget.sendKey(0, keyCode);
                    var newIdx = dataModel.selectedIdx;
                    if (oldIdx != newIdx) {
                        report.ok = true;
                        if (newIdx == -1) {
                            dataModel.value = null;
                            dataModel.text = dataModel.initialInput;
                        } else {
                            dataModel.value = dataModel.listContent[newIdx].value;
                            dataModel.text = this._getLabelFromListValue(dataModel.listContent[newIdx]);
                        }
                        report.text = dataModel.text;
                    }
                    return report;
                }
            } else {
                // otherwise open list dropdown on arrow down if needed
                if (keyCode == domEvent.KC_ARROW_DOWN) {
                    report = this._checkInputKey(charCode, keyCode, currentText, caretPosStart, caretPosEnd);
                } else {
                    report = new ariaWidgetsControllersReportsDropDownControllerReport();
                }
                // domEvent.KC_ESCAPE for issue#697 on FF
                if (report && keyCode != domEvent.KC_TAB && keyCode != domEvent.KC_ARROW_DOWN) {
                    // domEvent.KC_ESCAPE for issue#697 on FF
                    report.cancelKeyStrokeDefaultBehavior = (keyCode == domEvent.KC_ESCAPE);
                }
                return report;
            }
        }
19117
function (control, element, key, path, twoWays, jq, vf, events) {
/*Line 8 - 'AtomBinding.js' */            this.element = element;
/*Line 9 - 'AtomBinding.js' */            this.control = control;
/*Line 10 - 'AtomBinding.js' */            this.vf = vf;
/*Line 11 - 'AtomBinding.js' */            this.key = key;
/*Line 12 - 'AtomBinding.js' */            this.events = events;

/*Line 14 - 'AtomBinding.js' */            if ($.isArray(path)) {
/*Line 15 - 'AtomBinding.js' */                this.pathList = [];
/*Line 16 - 'AtomBinding.js' */                this.path = [];
/*Line 17 - 'AtomBinding.js' */                var ae = new AtomEnumerator(path);
/*Line 18 - 'AtomBinding.js' */                while (ae.next()) {
/*Line 19 - 'AtomBinding.js' */                    var item = ae.current();
/*Line 20 - 'AtomBinding.js' */                    if (!$.isArray(item)) {
/*Line 21 - 'AtomBinding.js' */                        this.path.push({ path: item, value: null });
/*Line 22 - 'AtomBinding.js' */                        continue;
/*Line 23 - 'AtomBinding.js' */                    }
/*Line 24 - 'AtomBinding.js' */                    var pe = new AtomEnumerator(item);
/*Line 25 - 'AtomBinding.js' */                    var p = [];
/*Line 26 - 'AtomBinding.js' */                    while (pe.next()) {
/*Line 27 - 'AtomBinding.js' */                        p.push({ path: pe.current(), value: null });
/*Line 28 - 'AtomBinding.js' */                    }
/*Line 29 - 'AtomBinding.js' */                    this.pathList.push(p);
/*Line 30 - 'AtomBinding.js' */                }
/*Line 31 - 'AtomBinding.js' */                if (this.path.length) {
/*Line 32 - 'AtomBinding.js' */                    this.pathList = null;
/*Line 33 - 'AtomBinding.js' */                } else {
/*Line 34 - 'AtomBinding.js' */                    this.path = null;
/*Line 35 - 'AtomBinding.js' */                }

/*Line 37 - 'AtomBinding.js' */            } else {
/*Line 38 - 'AtomBinding.js' */                var ae = new AtomEnumerator(path.split("."));
/*Line 39 - 'AtomBinding.js' */                this.path = [];
/*Line 40 - 'AtomBinding.js' */                while (ae.next()) {
/*Line 41 - 'AtomBinding.js' */                    this.path.push({ path: ae.current(), value: null });
/*Line 42 - 'AtomBinding.js' */                }
/*Line 43 - 'AtomBinding.js' */            }
/*Line 44 - 'AtomBinding.js' */            this.twoWays = twoWays;
/*Line 45 - 'AtomBinding.js' */            this.jq = jq;
/*Line 46 - 'AtomBinding.js' */            this._isUpdating = false;
/*Line 47 - 'AtomBinding.js' */        }
1027971
function bind(html, data, map) {
      if (Array.isArray(data)) {
        var output = '';

        for (var i = 0, l = data.length; i<l; i++) {
          output += this.bind(html, data[i], map);
        }

        return output;
      }

      html = (html || '').toString();
      data = data || {};

      var that = this;

      var openers = 0,
          remove = 0,
          components,
          attributes,
          mappings = map && compileMappings(map.mappings),
          intag = false,
          tagname = '',
          isClosing = false,
          isSelfClosing = false,
          selfClosing = false,
          matchmode = false,
          createAttribute = map && map.conf && map.conf.create,
          closing,
          tagbody;

      var c,
          buffer = '',
          left;

      for (var i = 0, l = html.length; i < l; i++) {
        c = html.charAt(i);

        //
        // Figure out which part of the HTML we are currently processing. And if
        // we have queued up enough HTML to process it's data.
        //
        if (c === '!' && intag && !matchmode) {
          intag = false;
          buffer += html.slice(left, i + 1);
        } else if (c === '<' && !intag) {
          closing = true;
          intag = true;
          left = i;
        } else if (c === '>' && intag) {
          intag = false;
          tagbody = html.slice(left, i + 1);
          components = this.tag.exec(tagbody);

          if(!components) {
            intag = true;
            continue;
          }

          isClosing = components[1];
          tagname = components[2];
          attributes = components[3];
          selfClosing = components[4];
          isSelfClosing = this.selfClosing.test(tagname);

          if (matchmode) {
            //
            // and its a closing.
            //
            if (!!isClosing) {
              if (openers <= 0) {
                matchmode = false;
              } else {
                --openers;
              }
            } else if (!isSelfClosing) {
              //
              // and its not a self-closing tag
              //
              ++openers;
            }
          }

          if (!isClosing && !matchmode) {
            //
            // if there is a match in progress and
            //
            if (mappings && mappings.length > 0) {
              for (var ii = mappings.length - 1; ii >= 0; ii--) {
                var setAttribute = false
                  , mapping = mappings[ii]
                  , shouldSetAttribute = mapping.re && attributes.match(mapping.re);

                //
                // check if we are targetting a element only or attributes
                //
                if ('tag' in mapping && !this.attr.test(tagbody) && mapping.tag === tagname) {
                  tagbody = tagbody + fetch(data, mapping, '', tagbody);
                  continue;
                }

                tagbody = tagbody.replace(this.attr, function(str, key, q, value, a) {
                  var newdata;

                  if (shouldSetAttribute && mapping.replace !== key || remove) {
                    return str;
                  } else if (shouldSetAttribute || typeof mapping.replacePartial1 !== 'undefined') {
                    setAttribute = true;

                    //
                    // determine if we should use the replace argument or some value from the data object.
                    //
                    if (typeof mapping.replacePartial2 !== 'undefined') {
                      newdata = value.replace(mapping.replacePartial1, mapping.replacePartial2);
                    } else if (typeof mapping.replacePartial1 !== 'undefined' && mapping.dataKey) {
                      newdata = value.replace(mapping.replacePartial1, fetch(data, mapping, value, tagbody, key));
                    } else {
                      newdata = fetch(data, mapping, value, tagbody, key);
                    }

                    return key + '="' + (newdata || '') + '"';
                  } else if (!mapping.replace && mapping.attribute === key) {
                    if (
                      mapping.value === value ||
                      that.hasClass(value, mapping.value ||
                      mappings.conf.where === key) ||
                      (_toString.call(mapping.value) === '[object RegExp]' &&
                        mapping.value.exec(value) !== null)
                    ) {
                      if (mapping.remove) {
                        //
                        // only increase the remove counter if it's not a self
                        // closing element. As matchmode is suffectient to
                        // remove tose
                        //
                        if (!isSelfClosing) remove++;
                        matchmode = true;
                      } else if (mapping.plates) {
                        var partial = that.bind(
                            mapping.plates
                          , typeof mapping.data === 'string' ? fetch(data, { dataKey: mapping.data }) : mapping.data || data
                          , mapping.mapper
                        );

                        buffer += tagbody + that.iterate(html, partial, components, tagname, undefined, map);
                        matchmode = true;
                      } else {
                        var v = newdata = fetch(data, mapping, value, tagbody, key);
                        newdata = tagbody + newdata;

                        if (Array.isArray(v)) {
                          newdata = that.iterate(html, v, components, tagname, value, map);
                          // If the item is an array, then we need to tell
                          // Plates that we're dealing with nests
                          that.nest.push(tagname);
                        } else if (typeof v === 'object') {
                          newdata = tagbody + that.iterate(html, v, components, tagname, value, map);
                        }

                        buffer += newdata || '';
                        matchmode = true;
                      }
                    }
                  }

                  return str;
                });

                //
                // Do we need to create the attributes if they don't exist.
                //
                if (createAttribute && shouldSetAttribute && !setAttribute) {
                  var spliced = selfClosing ? 2 : 1
                    , close = selfClosing ? '/>': '>'
                    , left = tagbody.substr(0, tagbody.length - spliced);

                  if (left[left.length - 1] === ' ') {
                    left = left.substr(0, left.length - 1);

                    if (selfClosing) {
                      close = ' ' + close;
                    }
                  }

                  tagbody = [
                    left,
                    ' ',
                    mapping.replace,
                    '="',
                    fetch(data, mapping),
                    '"',
                    close
                  ].join('');
                }
              }
            } else {
              //
              // if there is no map, we are just looking to match
              // the specified id to a data key in the data object.
              //
              tagbody.replace(this.attr, function (attr, key, q, value, idx) {
                if (key === map && map.conf.where || 'id' && data[value]) {
                  var v = data[value],
                      nest = Array.isArray(v),
                      output = nest || typeof v === 'object'
                        ? that.iterate(html.substr(left), v, components, tagname, value, map)
                        : v;

                  // If the item is an array, then we need to tell
                  // Plates that we're dealing with nests
                  if (nest) { that.nest.push(tagname); }

                  buffer += nest ? output : tagbody + output;
                  matchmode = true;
                }
              });
            }
          }

          //
          // if there is currently no match in progress
          // just write the tagbody to the buffer.
          //
          if (!matchmode && that.nest.length === 0) {
            if (!remove) buffer += tagbody;

            if (remove && !!isClosing) --remove;
          } else if (!matchmode && that.nest.length) {
              this.nest.pop();
          }
        } else if (!intag && !matchmode) {
          //
          // currently not inside a tag and there is no
          // match in progress, we can write the char to
          // the buffer.
          //
          if (!remove) buffer += c;
        }
      }
      return buffer;
    }
248975
URI getUrlAttribute(org.w3c.dom.Node attribute) throws InvalidInputException {
    String s = getStringAttribute(attribute);

    if (s == null) {
      return null;
    }

    try {
      return new URI(s);
    } catch (URISyntaxException e) {
      throw new InvalidInputException("Invalid input: " + attribute.getLocalName()
          + " must be a URI value not \"" + s + "\"");
    }
  }
1337106
function(){

      // Indicates is user did select a result from the dropdown.
      var selected = false;

      var options = {
        types: this.options.types,
        bounds: this.options.bounds === true ? null : this.options.bounds,
        componentRestrictions: this.options.componentRestrictions,
        strictBounds: this.options.strictBounds
      };

      if (this.options.country){
        options.componentRestrictions = {country: this.options.country};
      }

      this.autocomplete = new google.maps.places.Autocomplete(
        this.input, options
      );

      this.geocoder = new google.maps.Geocoder();

      // Bind autocomplete to map bounds but only if there is a map
      // and `options.bindToMap` is set to true.
      if (this.map && this.options.bounds === true){
        this.autocomplete.bindTo('bounds', this.map);
      }

      // Watch `place_changed` events on the autocomplete input field.
      google.maps.event.addListener(
        this.autocomplete,
        'place_changed',
        $.proxy(this.placeChanged, this)
      );

      // Prevent parent form from being submitted if user hit enter.
      this.$input.on('keypress.' + this._name, function(event){
        if (event.keyCode === 13){ return false; }
      });

      // Assume that if user types anything after having selected a result,
      // the selected location is not valid any more.
      if (this.options.geocodeAfterResult === true){
        this.$input.bind('keypress.' + this._name, $.proxy(function(){
          if (event.keyCode != 9 && this.selected === true){
              this.selected = false;
          }
        }, this));
      }

      // Listen for "geocode" events and trigger find action.
      this.$input.bind('geocode.' + this._name, $.proxy(function(){
        this.find();
      }, this));

      // Saves the previous input value
      this.$input.bind('geocode:result.' + this._name, $.proxy(function(){
        this.lastInputVal = this.$input.val();
      }, this));

      // Trigger find action when input element is blurred out and user has
      // not explicitly selected a result.
      // (Useful for typing partial location and tabbing to the next field
      // or clicking somewhere else.)
      if (this.options.blur === true){
        this.$input.on('blur.' + this._name, $.proxy(function(){
          if (this.options.geocodeAfterResult === true && this.selected === true) { return; }

          if (this.options.restoreValueAfterBlur === true && this.selected === true) {
            setTimeout($.proxy(this.restoreLastValue, this), 0);
          } else {
            this.find();
          }
        }, this));
      }
    }