PageSourceSearch

https://umfm.com/assets/build/js/parsley-min.js

js umfm.com collected 2026-10-03 21:42:48 UTC 42,861 bytes, 18 lines download raw bytes

1/*!
2* Parsley.js
3* Version 2.8.1 - built Sat, Feb 3rd 2018, 2:27 pm
4* http://parsleyjs.org
5* Guillaume Potier - <[email protected]>
6* Marc-Andre Lafortune - <[email protected]>
7* MIT Licensed
8*/
9function _toConsumableArray(t){if(Array.isArray(t)){for(var e=0,i=Array(t.length);e<t.length;e++)i[e]=t[e];return i}return Array.from(t)}var _slice=Array.prototype.slice,_slicedToArray=function(){function t(t,e){var i=[],r=!0,n=!1,s=void 0;try{for(var a=t[Symbol.iterator](),o;!(r=(o=a.next()).done)&&(i.push(o.value),!e||i.length!==e);r=!0);}catch(t){n=!0,s=t}finally{try{!r&&a.return&&a.return()}finally{if(n)throw s}}return i}return function(e,i){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_extends=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(t[r]=i[r])}return t};!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],e):t.parsley=e(t.jQuery)}(this,(function($){"use strict";function t(t,e){return t.parsleyAdaptedCallback||(t.parsleyAdaptedCallback=function(){var i=Array.prototype.slice.call(arguments,0);i.unshift(this),t.apply(e||M,i)}),t.parsleyAdaptedCallback}function e(t){return 0===t.lastIndexOf(D,0)?t.substr(8):t}
10/**
11   * inputevent - Alleviate browser bugs for input events
12   * https://github.com/marcandre/inputevent
13   * @version v0.0.3 - (built Thu, Apr 14th 2016, 5:58 pm)
14   * @author Marc-Andre Lafortune <[email protected]>
15   * @license MIT
16   */
17function i(){var t=this,e=window||global;_extends(this,{isNativeEvent:function t(e){return e.originalEvent&&!1!==e.originalEvent.isTrusted},fakeInputEvent:function e(i){t.isNativeEvent(i)&&$(i.target).trigger("input")},misbehaves:function e(i){t.isNativeEvent(i)&&(t.behavesOk(i),$(document).on("change.inputevent",i.data.selector,t.fakeInputEvent),t.fakeInputEvent(i))},behavesOk:function e(i){t.isNativeEvent(i)&&$(document).off("input.inputevent",i.data.selector,t.behavesOk).off("change.inputevent",i.data.selector,t.misbehaves)},install:function i(){if(!e.inputEventPatched){e.inputEventPatched="0.0.3";for(var r=["select",'input[type="checkbox"]','input[type="radio"]','input[type="file"]'],n=0;n<r.length;n++){var s=r[n];$(document).on("input.inputevent",s,{selector:s},t.behavesOk).on("change.inputevent",s,{selector:s},t.misbehaves)}}},uninstall:function t(){delete e.inputEventPatched,$(document).off(".inputevent")}})}var r=1,n={},s={attr:function t(e,i,r){var n,s,a,o=new RegExp("^"+i,"i");if(void 0===r)r={};else for(n in r)r.hasOwnProperty(n)&&delete r[n];if(!e)return r;for(n=(a=e.attributes).length;n--;)(s=a[n])&&s.specified&&o.test(s.name)&&(r[this.camelize(s.name.slice(i.length))]=this.deserializeValue(s.value));return r},checkAttr:function t(e,i,r){return e.hasAttribute(i+r)},setAttr:function t(e,i,r,n){e.setAttribute(this.dasherize(i+r),String(n))},getType:function t(e){return e.getAttribute("type")||"text"},generateID:function t(){return""+r++},deserializeValue:function t(e){var i;try{return e?"true"==e||"false"!=e&&("null"==e?null:isNaN(i=Number(e))?/^[\[\{]/.test(e)?JSON.parse(e):e:i):e}catch(t){return e}},camelize:function t(e){return e.replace(/-+(.)?/g,(function(t,e){return e?e.toUpperCase():""}))},dasherize:function t(e){return e.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()},warn:function t(){var e;window.console&&"function"==typeof window.console.warn&&(e=window.console).warn.apply(e,arguments)},warnOnce:function t(e){n[e]||(n[e]=!0,this.warn.apply(this,arguments))},_resetWarnings:function t(){n={}},trimString:function t(e){return e.replace(/^\s+|\s+$/g,"")},parse:{date:function t(e){var i=e.match(/^(\d{4,})-(\d\d)-(\d\d)$/);if(!i)return null;var r=i.map((function(t){return parseInt(t,10)})),n=_slicedToArray(r,4),s=n[0],a=n[1],o=n[2],l=n[3],t=new Date(a,o-1,l);return t.getFullYear()!==a||t.getMonth()+1!==o||t.getDate()!==l?null:t},string:function t(e){return e},integer:function t(e){return isNaN(e)?null:parseInt(e,10)},number:function t(e){if(isNaN(e))throw null;return parseFloat(e)},boolean:function t(e){return!/^\s*false\s*$/i.test(e)},object:function t(e){return s.deserializeValue(e)},regexp:function t(e){var i="";return/^\/.*\/(?:[gimy]*)$/.test(e)?(i=e.replace(/.*\/([gimy]*)$/,"$1"),e=e.replace(new RegExp("^/(.*?)/"+i+"$"),"$1")):e="^"+e+"$",new RegExp(e,i)}},parseRequirement:function t(e,i){var r=this.parse[e||"string"];if(!r)throw'Unknown requirement specification: "'+e+'"';var n=r(i);if(null===n)throw"Requirement is not a "+e+': "'+i+'"';return n},namespaceEvents:function t(e,i){return(e=this.trimString(e||"").split(/\s+/))[0]?$.map(e,(function(t){return t+"."+i})).join(" "):""},difference:function t(e,i){var r=[];return $.each(e,(function(t,e){-1==i.indexOf(e)&&r.push(e)})),r},all:function t(e){return $.when.apply($,_toConsumableArray(e).concat([42,42]))},objectCreate:Object.create||function(){var t=function t(){};return function(e){if(arguments.length>1)throw Error("Second argument not supported");if("object"!=typeof e)throw TypeError("Argument must be an object");t.prototype=e;var i=new t;return t.prototype=null,i}}(),_SubmitSelector:'input[type="submit"], button:submit'},a={namespace:"data-parsley-",inputs:"input, textarea, select",excluded:"input[type=button], input[type=submit], input[type=reset], input[type=hidden]",priorityEnabled:!0,multiple:null,group:null,uiEnabled:!0,validationThreshold:3,focu
17s:"first",trigger:!1,triggerAfterFailure:"input",errorClass:"parsley-error",successClass:"parsley-success",classHandler:function t(e){},errorsContainer:function t(e){},errorsWrapper:'<ul class="parsley-errors-list"></ul>',errorTemplate:"<li></li>"},o=function t(){this.__id__=s.generateID()};o.prototype={asyncSupport:!0,_pipeAccordingToValidationResult:function t(){var e=this,i=function t(){var i=$.Deferred();return!0!==e.validationResult&&i.reject(),i.resolve().promise()};return[i,i]},actualizeOptions:function t(){return s.attr(this.element,this.options.namespace,this.domOptions),this.parent&&this.parent.actualizeOptions&&this.parent.actualizeOptions(),this},_resetOptions:function t(e){for(var i in this.domOptions=s.objectCreate(this.parent.options),this.options=s.objectCreate(this.domOptions),e)e.hasOwnProperty(i)&&(this.options[i]=e[i]);this.actualizeOptions()},_listeners:null,on:function t(e,i){var r;return this._listeners=this._listeners||{},(this._listeners[e]=this._listeners[e]||[]).push(i),this},subscribe:function t(e,i){$.listenTo(this,e.toLowerCase(),i)},off:function t(e,i){var r=this._listeners&&this._listeners[e];if(r)if(i)for(var n=r.length;n--;)r[n]===i&&r.splice(n,1);else delete this._listeners[e];return this},unsubscribe:function t(e,i){$.unsubscribeTo(this,e.toLowerCase())},trigger:function t(e,i,r){i=i||this;var n=this._listeners&&this._listeners[e],s,a;if(n)for(var o=n.length;o--;)if(!1===(s=n[o].call(i,i,r)))return s;return!this.parent||this.parent.trigger(e,i,r)},asyncIsValid:function t(e,i){return s.warnOnce("asyncIsValid is deprecated; please use whenValid instead"),this.whenValid({group:e,force:i})},_findRelated:function t(){return this.options.multiple?$(this.parent.element.querySelectorAll("["+this.options.namespace+'multiple="'+this.options.multiple+'"]')):this.$element}};var l=function t(e,i){var r=e.match(/^\s*\[(.*)\]\s*$/);if(!r)throw'Requirement is not an array: "'+e+'"';var n=r[1].split(",").map(s.trimString);if(n.length!==i)throw"Requirement has "+n.length+" values when "+i+" are needed";return n},u=function t(e,i,r){var n=null,a={};for(var o in e)if(o){var l=r(o);"string"==typeof l&&(l=s.parseRequirement(e[o],l)),a[o]=l}else n=s.parseRequirement(e[o],i);return[n,a]},d=function t(e){$.extend(!0,this,e)};d.prototype={validate:function t(e,i){if(this.fn)return arguments.length>3&&(i=[].slice.call(arguments,1,-1)),this.fn(e,i);if(Array.isArray(e)){if(!this.validateMultiple)throw"Validator `"+this.name+"` does not handle multiple values";return this.validateMultiple.apply(this,arguments)}var r=arguments[arguments.length-1];if(this.validateDate&&r._isDateInput())return null!==(e=s.parse.date(e))&&this.validateDate.apply(this,arguments);if(this.validateNumber)return!isNaN(e)&&(e=parseFloat(e),this.validateNumber.apply(this,arguments));if(this.validateString)return this.validateString.apply(this,arguments);throw"Validator `"+this.name+"` only handles multiple values"},parseRequirements:function t(e,i){if("string"!=typeof e)return Array.isArray(e)?e:[e];var r=this.requirementType;if(Array.isArray(r)){for(var n=l(e,r.length),a=0;a<n.length;a++)n[a]=s.parseRequirement(r[a],n[a]);return n}return $.isPlainObject(r)?u(r,e,i):[s.parseRequirement(r,e)]},requirementType:"string",priority:2};var h=function t(e,i){this.__class__="ValidatorRegistry",this.locale="en",this.init(e||{},i||{})},p={email:/^((([a-zA-Z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-zA-Z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-zA-Z]|\d|-|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-zA-Z]|\d|-|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/,number:/^-?(\d*\.)?\d+(e[-+]?\d+)?$/i,integer:/^-?\d+$/,digits:/^\d+$/,alphanum:/^\w+$/i,date:{test:function t(e){return null!==s.parse.date(e)}},url:new RegExp("^(?:(?:https?|ftp)://)?(?:\\S+(?::\\S*)?@)?(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-zA-Z\\u00a1-\\uffff0-9]-*)*[a-zA-Z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-zA-Z\\u00a1-\\uffff0-9]-*)*[a-zA-Z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-zA-Z\\u00a1-\\uffff]{2,})))(?::\\d{2,5})?(?:/\\S*)?$")};p.range=p.number;var c=function t(e){var i=(""+e).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return i?Math.max(0,(i[1]?i[1].length:0)-(i[2]?+i[2]:0)):0},f=function t(e,i){return i.map(s.parse[e])},m=function t(e,i){return function(t){for(var r=arguments.length,n=Array(r>1?r-1:0),s=1;s<r;s++)n[s-1]=arguments[s];return n.pop(),i.apply(void 0,[t].concat(_toConsumableArray(f(e,n))))}},g=function t(e){return{validateDate:m("date",e),validateNumber:m("number",e),requirementType:e.length<=2?"string":["string","string"],priority:30}};h.prototype={init:function t(e,i){for(var r in this.catalog=i,this.validators=_extends({},this.validators),e)this.addValidator(r,e[r].fn,e[r].priority);window.Parsley.trigger("parsley:validator:init")},setLocale:function t(e){if(void 0===this.catalog[e])throw new Error(e+" is not available in the catalog");return this.locale=e,this},addCatalog:function t(e,i,r){return"object"==typeof i&&(this.catalog[e]=i),!0===r?this.setLocale(e):this},addMessage:function t(e,i,r){return void 0===this.catalog[e]&&(this.catalog[e]={}),this.catalog[e][i]=r,this},addMessages:function t(e,i){for(var r in i)this.addMessage(e,r,i[r]);return this},addValidator:function t(e,i,r){if(this.validators[e])s.warn('Validator "'+e+'" is already defined.');else if(a.hasOwnProperty(e))return void s.warn('"'+e+'" is a restricted keyword and is not a valid validator name.');return this._setValidator.apply(this,arguments)},hasValidator:function t(e){return!!this.validators[e]}
17,updateValidator:function t(e,i,r){return this.validators[e]?this._setValidator.apply(this,arguments):(s.warn('Validator "'+e+'" is not already defined.'),this.addValidator.apply(this,arguments))},removeValidator:function t(e){return this.validators[e]||s.warn('Validator "'+e+'" is not defined.'),delete this.validators[e],this},_setValidator:function t(e,i,r){for(var n in"object"!=typeof i&&(i={fn:i,priority:r}),i.validate||(i=new d(i)),this.validators[e]=i,i.messages||{})this.addMessage(n,e,i.messages[n]);return this},getErrorMessage:function t(e){var i,r;"type"===e.name?i=(this.catalog[this.locale][e.name]||{})[e.requirements]:i=this.formatMessage(this.catalog[this.locale][e.name],e.requirements);return i||this.catalog[this.locale].defaultMessage||this.catalog.en.defaultMessage},formatMessage:function t(e,i){if("object"==typeof i){for(var r in i)e=this.formatMessage(e,i[r]);return e}return"string"==typeof e?e.replace(/%s/i,i):""},validators:{notblank:{validateString:function t(e){return/\S/.test(e)},priority:2},required:{validateMultiple:function t(e){return e.length>0},validateString:function t(e){return/\S/.test(e)},priority:512},type:{validateString:function t(e,i,r){var n=arguments.length<=2||void 0===r?{}:r,s=n.step,a=void 0===s?"any":s,o=n.base,l=void 0===o?0:o,u=p[i];if(!u)throw new Error("validator type `"+i+"` is not supported");if(!u.test(e))return!1;if("number"===i&&!/^any$/i.test(a||"")){var d=Number(e),h=Math.max(c(a),c(l));if(c(d)>h)return!1;var f=function t(e){return Math.round(e*Math.pow(10,h))};if((f(d)-f(l))%f(a)!=0)return!1}return!0},requirementType:{"":"string",step:"string",base:"number"},priority:256},pattern:{validateString:function t(e,i){return i.test(e)},requirementType:"regexp",priority:64},minlength:{validateString:function t(e,i){return e.length>=i},requirementType:"integer",priority:30},maxlength:{validateString:function t(e,i){return e.length<=i},requirementType:"integer",priority:30},length:{validateString:function t(e,i,r){return e.length>=i&&e.length<=r},requirementType:["integer","integer"],priority:30},mincheck:{validateMultiple:function t(e,i){return e.length>=i},requirementType:"integer",priority:30},maxcheck:{validateMultiple:function t(e,i){return e.length<=i},requirementType:"integer",priority:30},check:{validateMultiple:function t(e,i,r){return e.length>=i&&e.length<=r},requirementType:["integer","integer"],priority:30},min:g((function(t,e){return t>=e})),max:g((function(t,e){return t<=e})),range:g((function(t,e,i){return t>=e&&t<=i})),equalto:{validateString:function t(e,i){var r=$(i);return r.length?e===r.val():e===i},priority:256}}};var v={},y=function t(e,i,r){for(var n=[],s=[],a=0;a<e.length;a++){for(var o=!1,l=0;l<i.length;l++)if(e[a].assert.name===i[l].assert.name){o=!0;break}o?s.push(e[a]):n.push(e[a])}return{kept:s,added:n,removed:r?[]:t(i,e,!0).added}};v.Form={_actualizeTriggers:function t(){var e=this;this.$element.on("submit.Parsley",(function(t){e.onSubmitValidate(t)})),this.$element.on("click.Parsley",s._SubmitSelector,(function(t){e.onSubmitButton(t)})),!1!==this.options.uiEnabled&&this.element.setAttribute("novalidate","")},focus:function t(){if(this._focusedField=null,!0===this.validationResult||"none"===this.options.focus)return null;for(var e=0;e<this.fields.length;e++){var i=this.fields[e];if(!0!==i.validationResult&&i.validationResult.length>0&&void 0===i.options.noFocus&&(this._focusedField=i.$element,"first"===this.options.focus))break}return null===this._focusedField?null:this._focusedField.focus()},_destroyUI:function t(){this.$element.off(".Parsley")}},v.Field={_reflowUI:function t(){if(this._buildUI(),this._ui){var e=y(this.validationResult,this._ui.lastValidationResult);this._ui.lastValidationResult=this.validationResult,this._manageStatusClass(),this._manageErrorsMessages(e),this._actualizeTriggers(),!e.kept.length&&!e.added.length||this._failedOnce||(this._failedOnce=!0,this._actualizeTriggers())}},getErrorsMessages:function t(){if(!0===this.validationResult)return[];for(var e=[],i=0;i<this.validationResult.length;i++)e.push(this.validationResult[i].errorMessage||this._getErrorMessage(this.validationResult[i].assert));return e},addError:function t(e,i){var r=arguments.length<=1||void 0===i?{}:i,n=r.message,s=r.assert,a=r.updateClass,o=void 0===a||a;this._buildUI(),this._addError(e,{message:n,assert:s}),o&&this._errorClass()},updateError:function t(e,i){var r=arguments.length<=1||void 0===i?{}:i,n=r.message,s=r.assert,a=r.updateClass,o=void 0===a||a;this._buildUI(),this._updateError(e,{message:n,assert:s}),o&&this._errorClass()},removeError:function t(e,i){var r,n=(arguments.length<=1||void 0===i?{}:i).updateClass,s=void 0===n||n;this._buildUI(),this._removeError(e),s&&this._manageStatusClass()},_manageStatusClass:function t(){this.hasConstraints()&&this.needsValidation()&&
17!0===this.validationResult?this._successClass():this.validationResult.length>0?this._errorClass():this._resetClass()},_manageErrorsMessages:function t(e){if(void 0===this.options.errorsMessagesDisabled){if(void 0!==this.options.errorMessage)return e.added.length||e.kept.length?(this._insertErrorWrapper(),0===this._ui.$errorsWrapper.find(".parsley-custom-error-message").length&&this._ui.$errorsWrapper.append($(this.options.errorTemplate).addClass("parsley-custom-error-message")),this._ui.$errorsWrapper.addClass("filled").find(".parsley-custom-error-message").html(this.options.errorMessage)):this._ui.$errorsWrapper.removeClass("filled").find(".parsley-custom-error-message").remove();for(var i=0;i<e.removed.length;i++)this._removeError(e.removed[i].assert.name);for(i=0;i<e.added.length;i++)this._addError(e.added[i].assert.name,{message:e.added[i].errorMessage,assert:e.added[i].assert});for(i=0;i<e.kept.length;i++)this._updateError(e.kept[i].assert.name,{message:e.kept[i].errorMessage,assert:e.kept[i].assert})}},_addError:function t(e,i){var r=i.message,n=i.assert;this._insertErrorWrapper(),this._ui.$errorClassHandler.attr("aria-describedby",this._ui.errorsWrapperId),this._ui.$errorsWrapper.addClass("filled").append($(this.options.errorTemplate).addClass("parsley-"+e).html(r||this._getErrorMessage(n)))},_updateError:function t(e,i){var r=i.message,n=i.assert;this._ui.$errorsWrapper.addClass("filled").find(".parsley-"+e).html(r||this._getErrorMessage(n))},_removeError:function t(e){this._ui.$errorClassHandler.removeAttr("aria-describedby"),this._ui.$errorsWrapper.removeClass("filled").find(".parsley-"+e).remove()},_getErrorMessage:function t(e){var i=e.name+"Message";return void 0!==this.options[i]?window.Parsley.formatMessage(this.options[i],e.requirements):window.Parsley.getErrorMessage(e)},_buildUI:function t(){if(!this._ui&&!1!==this.options.uiEnabled){var e={};this.element.setAttribute(this.options.namespace+"id",this.__id__),e.$errorClassHandler=this._manageClassHandler(),e.errorsWrapperId="parsley-id-"+(this.options.multiple?"multiple-"+this.options.multiple:this.__id__),e.$errorsWrapper=$(this.options.errorsWrapper).attr("id",e.errorsWrapperId),e.lastValidationResult=[],e.validationInformationVisible=!1,this._ui=e}},_manageClassHandler:function t(){if("string"==typeof this.options.classHandler&&$(this.options.classHandler).length)return $(this.options.classHandler);var e=this.options.classHandler;if("string"==typeof this.options.classHandler&&"function"==typeof window[this.options.classHandler]&&(e=window[this.options.classHandler]),"function"==typeof e){var i=e.call(this,this);if(void 0!==i&&i.length)return i}else{if("object"==typeof e&&e instanceof jQuery&&e.length)return e;e&&s.warn("The class handler `"+e+"` does not exist in DOM nor as a global JS function")}return this._inputHolder()},_inputHolder:function t(){return this.options.multiple&&"SELECT"!==this.element.nodeName?this.$element.parent():this.$element},_insertErrorWrapper:function t(){var e=this.options.errorsContainer;if(0!==this._ui.$errorsWrapper.parent().length)return this._ui.$errorsWrapper.parent();if("string"==typeof e){if($(e).length)return $(e).append(this._ui.$errorsWrapper);"function"==typeof window[e]?e=window[e]:s.warn("The errors container `"+e+"` does not exist in DOM nor as a global JS function")}return"function"==typeof e&&(e=e.call(this,this)),"object"==typeof e&&e.length?e.append(this._ui.$errorsWrapper):this._inputHolder().after(this._ui.$errorsWrapper)},_actualizeTriggers:function t(){var e=this,i=this._findRelated(),r;i.off(".Parsley"),this._failedOnce?i.on(s.namespaceEvents(this.options.triggerAfterFailure,"Parsley"),(function(){e._validateIfNeeded()})):(r=s.namespaceEvents(this.options.trigger,"Parsley"))&&i.on(r,(function(t){e._validateIfNeeded(t)}))},_validateIfNeeded:function t(e){var i=this;e&&/key|input/.test(e.type)&&(!this._ui||!this._ui.validationInformationVisible)&&this.getValue().length<=this.options.validationThreshold||(this.options.debounce?(window.clearTimeout(this._debounced),this._debounced=window.setTimeout((function(){return i.validate()}),this.options.debounce)):this.validate())},_resetUI:function t(){this._failedOnce=!1,this._actualizeTriggers(),void 0!==this._ui&&(this._ui.$errorsWrapper.removeClass("filled").children().remove(),this._resetClass(),this._ui.lastValidationResult=[],this._ui.validationInformationVisible=!1)},_destroyUI:function t(){this._resetUI(),void 0!==this._ui&&this._ui.$errorsWrapper.remove(),delete this._ui},_successClass:function t(){this._ui.validationInformationVisible=!0,this._ui.$errorClassHandler.removeClass(this.options.errorClass).addClass(this.options.successClass)},_errorClass:function t(){this._ui.validationInformationVisible=!0,this._ui.$errorClassHandler.removeClass(this.options.successClass).addClass(this.options.errorClass)},_resetClass:function t(){this._ui.$errorClassHandler.removeClass(this.options.successClass).removeClass(this.options.errorClass)}};var _=function t(e,i,r){this.__class__="Form",this.element=e,this.$element=$(e),this.domOptions=i,this.options=r,this.parent=window.Parsley,this.fields=[],this.validationResult=null},w={pending:null,resolved:!0,rejected:!1};_.prototype={onSubmitValidate:function t(e){var i=this;if(!0!==e.parsley){var r=this._submitSource||this.$element.find(s._SubmitSelector)[0];if(this._submitSource=null,this.$element.find(".parsley-synthetic-submit-button").prop("disabled",!0),!r||null===r.getAttribute("formnovalidate")){window.Parsley._remoteCache={};var n=this.whenValidate({event:e});"resolved"===n.state()&&!1!==this._trigger("submit")||(e.stopImmediatePropagation(),e.preventDefault(),"pending"===n.state()&&n.done((function(){i._submit(r)})))}}},onSubmitButton:function t(e){this._submitSource=e.currentTarget},_submit:function t(e){if(!1!==this._trigger("submit")){if(e){var i=this.$element.find(".parsley-synthetic-submit-button").prop("disabled",!1);0===i.length&&(i=$('<input class="parsley-synthetic-submit-button" type="hidden">').appendTo(this.$element)),i.attr({name:e.getAttribute("name"),value:e.getAttribute("value")})}this.$element.trigger(_extends($.Event("submit"),{parsley:!0}))}},validate:function t(e){if(arguments.length>=1&&!$.isPlainObject(e)){s.warnOnce("Calling validate on a parsley form without passing arguments as an object is deprecated.");var i=_slice.call(arguments),r,n,a;e={group:i[0],force:i[1],event:i[2]}}return w[this.whenValidate(e).state()]},whenValidate:function t(e){var i,r=this,n=arguments.length<=0||void 0===e?{}:e,a=n.group,o=n.force,l=n.event;this.submitEvent=l,l&&(this.submitEvent=_extends({},l,{preventDefault:function t(){s.warnOnce("Using `this.submitEvent.preventDefault()` is deprecated; instead, call `this.validationResult = false`"),r.validationResult=!1}})),this.validationResult=!0,this._trigger("validate"),this._refreshFields();var u=this._withoutReactualizingFormOptions((function(){return $.map(r.fields,(function(t){return t.whenValidate({force:o,group:a})}))}));return(i=s.all(u).done((function(){r._trigger("success")})).fail((function(){r.validationResult=!1,r.focus(),r._trigger("error")})).always((function(){r._trigger("validated")}))).pipe.apply(i,_toConsumableArray(this._pipeAccordingToValidationResult()))},isValid:function t(e){if(arguments.length>=1&&!$.isPlainObject(e)){s.warnOnce("Calling isValid on a parsley form without passing arguments as an object is deprecated.");var i=_slice.call(arguments),r,n;e={group:i[0],force:i[1]}}return w[this.whenValid(e).state()]},whenValid:function t(e){var i=this,r=arguments.length<=0||void 0===e?{}:e,n=r.group,a=r.force;this._refreshFields();var o=this._withoutReactualizingFormOptions((function(){return $.map(i.fields,
17(function(t){return t.whenValid({group:n,force:a})}))}));return s.all(o)},refresh:function t(){return this._refreshFields(),this},reset:function t(){for(var e=0;e<this.fields.length;e++)this.fields[e].reset();this._trigger("reset")},destroy:function t(){this._destroyUI();for(var e=0;e<this.fields.length;e++)this.fields[e].destroy();this.$element.removeData("Parsley"),this._trigger("destroy")},_refreshFields:function t(){return this.actualizeOptions()._bindFields()},_bindFields:function t(){var e=this,i=this.fields;return this.fields=[],this.fieldsMappedById={},this._withoutReactualizingFormOptions((function(){e.$element.find(e.options.inputs).not(e.options.excluded).each((function(t,i){var r=new window.Parsley.Factory(i,{},e);if(("Field"===r.__class__||"FieldMultiple"===r.__class__)&&!0!==r.options.excluded){var n=r.__class__+"-"+r.__id__;void 0===e.fieldsMappedById[n]&&(e.fieldsMappedById[n]=r,e.fields.push(r))}})),$.each(s.difference(i,e.fields),(function(t,e){e.reset()}))})),this},_withoutReactualizingFormOptions:function t(e){var i=this.actualizeOptions;this.actualizeOptions=function(){return this};var r=e();return this.actualizeOptions=i,r},_trigger:function t(e){return this.trigger("form:"+e)}};var b=function t(e,i,r,n,s){var a=window.Parsley._validatorRegistry.validators[i],o=new d(a);n=n||e.options[i+"Priority"]||o.priority,_extends(this,{validator:o,name:i,requirements:r,priority:n,isDomConstraint:s=!0===s}),this._parseRequirements(e.options)},F=function t(e){var i;return e[0].toUpperCase()+e.slice(1)};b.prototype={validate:function t(e,i){var r;return(r=this.validator).validate.apply(r,[e].concat(_toConsumableArray(this.requirementList),[i]))},_parseRequirements:function t(e){var i=this;this.requirementList=this.validator.parseRequirements(this.requirements,(function(t){return e[i.name+F(t)]}))}};var C=function t(e,i,r,n){this.__class__="Field",this.element=e,this.$element=$(e),void 0!==n&&(this.parent=n),this.options=r,this.domOptions=i,this.constraints=[],this.constraintsByName={},this.validationResult=!0,this._bindConstraints()},A={pending:null,resolved:!0,rejected:!1};C.prototype={validate:function t(e){arguments.length>=1&&!$.isPlainObject(e)&&(s.warnOnce("Calling validate on a parsley field without passing arguments as an object is deprecated."),e={options:e});var i=this.whenValidate(e);if(!i)return!0;switch(i.state()){case"pending":return null;case"resolved":return!0;case"rejected":return this.validationResult}},whenValidate:function t(e){var i,r=this,n=arguments.length<=0||void 0===e?{}:e,s=n.force,a=n.group;if(this.refresh(),!a||this._isInGroup(a))return this.value=this.getValue(),this._trigger("validate"),(i=this.whenValid({force:s,value:this.value,_refreshed:!0}).always((function(){r._reflowUI()})).done((function(){r._trigger("success")})).fail((function(){r._trigger("error")})).always((function(){r._trigger("validated")}))).pipe.apply(i,_toConsumableArray(this._pipeAccordingToValidationResult()))},hasConstraints:function t(){return 0!==this.constraints.length},needsValidation:function t(e){return void 0===e&&(e=this.getValue()),!(!e.length&&!this._isRequired()&&void 0===this.options.validateIfEmpty)},_isInGroup:function t(e){return Array.isArray(this.options.group)?-1!==$.inArray(e,this.options.group):this.options.group===e},isValid:function t(e){if(arguments.length>=1&&!$.isPlainObject(e)){s.warnOnce("Calling isValid on a parsley field without passing arguments as an object is deprecated.");var i=_slice.call(arguments),r,n;e={force:i[0],value:i[1]}}var a=this.whenValid(e);return!a||A[a.state()]},whenValid:function t(e){var i=this,r=arguments.length<=0||void 0===e?{}:e,n=r.force,a=void 0!==n&&n,o=r.value,l=r.group,u;if(r._refreshed||this.refresh(),!l||this._isInGroup(l)){if(this.validationResult=!0,!this.hasConstraints())return $.when();if(null==o&&(o=this.getValue()),!this.needsValidation(o)&&!0!==a)return $.when();var d=this._getGroupedConstraints(),h=[];return $.each(d,(function(t,e){var r=s.all($.map(e,(function(t){return i._validateConstraint(o,t)})));if(h.push(r),"rejected"===r.state())return!1})),s.all(h)}},_validateConstraint:function t(e,i){var r=this,n=i.validate(e,this);return!1===n&&(n=$.Deferred().reject()),s.all([n]).fail((function(t){r.validationResult instanceof Array||(r.validationResult=[]),r.validationResult.push({assert:i,errorMessage:"string"==typeof t&&t})}))},getValue:function t(){var e;return null==(e="function"==typeof this.options.value?this.options.value(this):void 0!==this.options.value?this.options.value:this.$element.val())?"":this._handleWhitespace(e)},reset:function t(){return this._resetUI(),this._trigger("reset")},destroy:function t(){this._destroyUI(),this.$element.removeData("Parsley"),this.$element.removeData("FieldMultiple"),this._trigger("destroy")},refresh:function t(){return this._refreshConstraints(),this},_refreshConstraints:function t(){return this.actualizeOptions()._bindConstraints()},refreshConstraints:function t(){return s.warnOnce("Parsley's refreshConstraints is deprecated. Please use refresh"),this.refresh()},addConstraint:function t(e,i,r,n){if(window.Parsley._validatorRegistry.validators[e]){var s=new b(this,e,i,r,n);"undefined"!==this.constraintsByName[s.name]&&this.removeConstraint(s.name),this.constraints.push(s),this.constraintsByName[s.name]=s}return this},removeConstraint:function t(e){for(var i=0;i<this.constraints.length;i++)if(e===this.constraints[i].name){this.constraints.splice(i,1);break}return delete this.constraintsByName[e],this},updateConstraint:function t(e,i,r){return this.removeConstraint(e).addConstraint(e,i,r)},_bindConstraints:function t(){for(var e=[],i={},r=0;r<this.constraints.length;r++)!1===this.constraints[r].isDomConstraint&&(e.push(this.constraints[r]),i[this.constraints[r].name]=this.constraints[r]);for(var n in this.constraints=e,this.constraintsByName=i,this.options)this.addConstraint(n,this.options[n],void 0,!0);return this._bindHtml5Constraints()},_bindHtml5Constraints:function t(){null!==this.element.getAttribute("required")&&this.addConstraint("required",!0,void 0,!0),null!==this.element.getAttribute("pattern")&&this.addConstraint("pattern",this.element.getAttribute("pattern"),void 0,!0);var e=this.element.getAttribute("min"),i=this.element.getAttribute("max");
17null!==e&&null!==i?this.addConstraint("range",[e,i],void 0,!0):null!==e?this.addConstraint("min",e,void 0,!0):null!==i&&this.addConstraint("max",i,void 0,!0),null!==this.element.getAttribute("minlength")&&null!==this.element.getAttribute("maxlength")?this.addConstraint("length",[this.element.getAttribute("minlength"),this.element.getAttribute("maxlength")],void 0,!0):null!==this.element.getAttribute("minlength")?this.addConstraint("minlength",this.element.getAttribute("minlength"),void 0,!0):null!==this.element.getAttribute("maxlength")&&this.addConstraint("maxlength",this.element.getAttribute("maxlength"),void 0,!0);var r=s.getType(this.element);return"number"===r?this.addConstraint("type",["number",{step:this.element.getAttribute("step")||"1",base:e||this.element.getAttribute("value")}],void 0,!0):/^(email|url|range|date)$/i.test(r)?this.addConstraint("type",r,void 0,!0):this},_isRequired:function t(){return void 0!==this.constraintsByName.required&&!1!==this.constraintsByName.required.requirements},_trigger:function t(e){return this.trigger("field:"+e)},_handleWhitespace:function t(e){return!0===this.options.trimValue&&s.warnOnce('data-parsley-trim-value="true" is deprecated, please use data-parsley-whitespace="trim"'),"squish"===this.options.whitespace&&(e=e.replace(/\s{2,}/g," ")),"trim"!==this.options.whitespace&&"squish"!==this.options.whitespace&&!0!==this.options.trimValue||(e=s.trimString(e)),e},_isDateInput:function t(){var e=this.constraintsByName.type;return e&&"date"===e.requirements},_getGroupedConstraints:function t(){if(!1===this.options.priorityEnabled)return[this.constraints];for(var e=[],i={},r=0;r<this.constraints.length;r++){var n=this.constraints[r].priority;i[n]||e.push(i[n]=[]),i[n].push(this.constraints[r])}return e.sort((function(t,e){return e[0].priority-t[0].priority})),e}};var E=C,x=function t(){this.__class__="FieldMultiple"};x.prototype={addElement:function t(e){return this.$elements.push(e),this},_refreshConstraints:function t(){var e;if(this.constraints=[],"SELECT"===this.element.nodeName)return this.actualizeOptions()._bindConstraints(),this;for(var i=0;i<this.$elements.length;i++)if($("html").has(this.$elements[i]).length){e=this.$elements[i].data("FieldMultiple")._refreshConstraints().constraints;for(var r=0;r<e.length;r++)this.addConstraint(e[r].name,e[r].requirements,e[r].priority,e[r].isDomConstraint)}else this.$elements.splice(i,1);return this},getValue:function t(){if("function"==typeof this.options.value)return this.options.value(this);if(void 0!==this.options.value)return this.options.value;if("INPUT"===this.element.nodeName){var e=s.getType(this.element);if("radio"===e)return this._findRelated().filter(":checked").val()||"";if("checkbox"===e){var i=[];return this._findRelated().filter(":checked").each((function(){i.push($(this).val())})),i}}
18return"SELECT"===this.element.nodeName&&null===this.$element.val()?[]:this.$element.val()},_init:function t(){return this.$elements=[this.$element],this}};var P=function t(e,i,r){this.element=e,this.$element=$(e);var n=this.$element.data("Parsley");if(n)return void 0!==r&&n.parent===window.Parsley&&(n.parent=r,n._resetOptions(n.options)),"object"==typeof i&&_extends(n.options,i),n;if(!this.$element.length)throw new Error("You must bind Parsley on an existing element.");if(void 0!==r&&"Form"!==r.__class__)throw new Error("Parent instance must be a Form instance");return this.parent=r||window.Parsley,this.init(i)};P.prototype={init:function t(e){return this.__class__="Parsley",this.__version__="2.8.1",this.__id__=s.generateID(),this._resetOptions(e),"FORM"===this.element.nodeName||s.checkAttr(this.element,this.options.namespace,"validate")&&!this.$element.is(this.options.inputs)?this.bind("parsleyForm"):this.isMultiple()?this.handleMultiple():this.bind("parsleyField")},isMultiple:function t(){var e=s.getType(this.element);return"radio"===e||"checkbox"===e||"SELECT"===this.element.nodeName&&null!==this.element.getAttribute("multiple")},handleMultiple:function t(){var e=this,i,r,n;if(this.options.multiple=this.options.multiple||(i=this.element.getAttribute("name"))||this.element.getAttribute("id"),"SELECT"===this.element.nodeName&&null!==this.element.getAttribute("multiple"))return this.options.multiple=this.options.multiple||this.__id__,this.bind("parsleyFieldMultiple");if(!this.options.multiple)return s.warn("To be bound by Parsley, a radio, a checkbox and a multiple select input must have either a name or a multiple option.",this.$element),this;this.options.multiple=this.options.multiple.replace(/(:|\.|\[|\]|\{|\}|\$)/g,""),i&&$('input[name="'+i+'"]').each((function(t,i){var r=s.getType(i);"radio"!==r&&"checkbox"!==r||i.setAttribute(e.options.namespace+"multiple",e.options.multiple)}));for(var a=this._findRelated(),o=0;o<a.length;o++)if(void 0!==(n=$(a.get(o)).data("Parsley"))){this.$element.data("FieldMultiple")||n.addElement(this.$element);break}return this.bind("parsleyField",!0),n||this.bind("parsleyFieldMultiple")},bind:function t(e,i){var r;switch(e){case"parsleyForm":r=$.extend(new _(this.element,this.domOptions,this.options),new o,window.ParsleyExtend)._bindFields();break;case"parsleyField":r=$.extend(new E(this.element,this.domOptions,this.options,this.parent),new o,window.ParsleyExtend);break;case"parsleyFieldMultiple":r=$.extend(new E(this.element,this.domOptions,this.options,this.parent),new x,new o,window.ParsleyExtend)._init();break;default:throw new Error(e+"is not a supported Parsley type")}return this.options.multiple&&s.setAttr(this.element,this.options.namespace,"multiple",this.options.multiple),void 0!==i?(this.$element.data("FieldMultiple",r),r):(this.$element.data("Parsley",r),r._actualizeTriggers(),r._trigger("init"),r)}};var V=$.fn.jquery.split(".");if(parseInt(V[0])<=1&&parseInt(V[1])<8)throw"The loaded version of jQuery is too old. Please upgrade to 1.8.x or better.";
18V.forEach||s.warn("Parsley requires ES5 to run properly. Please include https://github.com/es-shims/es5-shim");var T=_extends(new o,{element:document,$element:$(document),actualizeOptions:null,_resetOptions:null,Factory:P,version:"2.8.1"});_extends(E.prototype,v.Field,o.prototype),_extends(_.prototype,v.Form,o.prototype),_extends(P.prototype,o.prototype),$.fn.parsley=$.fn.psly=function(t){if(this.length>1){var e=[];return this.each((function(){e.push($(this).parsley(t))})),e}if(0!=this.length)return new P(this[0],t)},void 0===window.ParsleyExtend&&(window.ParsleyExtend={}),T.options=_extends(s.objectCreate(a),window.ParsleyConfig),window.ParsleyConfig=T.options,window.Parsley=window.psly=T,T.Utils=s,window.ParsleyUtils={},$.each(s,(function(t,e){"function"==typeof e&&(window.ParsleyUtils[t]=function(){return s.warnOnce("Accessing `window.ParsleyUtils` is deprecated. Use `window.Parsley.Utils` instead."),s[t].apply(s,arguments)})}));var O=window.Parsley._validatorRegistry=new h(window.ParsleyConfig.validators,window.ParsleyConfig.i18n);window.ParsleyValidator={},$.each("setLocale addCatalog addMessage addMessages getErrorMessage formatMessage addValidator updateValidator removeValidator hasValidator".split(" "),(function(t,e){window.Parsley[e]=function(){return O[e].apply(O,arguments)},window.ParsleyValidator[e]=function(){var t;return s.warnOnce("Accessing the method '"+e+"' through Validator is deprecated. Simply call 'window.Parsley."+e+"(...)'"),(t=window.Parsley)[e].apply(t,arguments)}})),window.Parsley.UI=v,window.ParsleyUI={removeError:function t(e,i,r){var n=!0!==r;return s.warnOnce("Accessing UI is deprecated. Call 'removeError' on the instance directly. Please comment in issue 1073 as to your need to call this method."),e.removeError(i,{updateClass:n})},getErrorsMessages:function t(e){return s.warnOnce("Accessing UI is deprecated. Call 'getErrorsMessages' on the instance directly."),e.getErrorsMessages()}},$.each("addError updateError".split(" "),(function(t,e){window.ParsleyUI[e]=function(t,i,r,n,a){var o=!0!==a;return s.warnOnce("Accessing UI is deprecated. Call '"+e+"' on the instance directly. Please comment in issue 1073 as to your need to call this method."),t[e](i,{message:r,assert:n,updateClass:o})}})),!1!==window.ParsleyConfig.autoBind&&$((function(){$("[data-parsley-validate]").length&&$("[data-parsley-validate]").parsley()}));var M=$({}),R=function t(){s.warnOnce("Parsley's pubsub module is deprecated; use the 'on' and 'off' methods on parsley instances or window.Parsley")},D="parsley:",I,q;return $.listen=function(i,r,n){var s;if(R(),"object"==typeof arguments[1]&&"function"==typeof n&&(s=arguments[1],r=n),"function"!=typeof r)throw new Error("Wrong parameters");window.Parsley.on(e(i),t(r,s))},$.listenTo=function(i,r,n){if(R(),!(i instanceof E||i instanceof _))throw new Error("Mu
18st give Parsley instance");if("string"!=typeof r||"function"!=typeof n)throw new Error("Wrong parameters");i.on(e(r),t(n))},$.unsubscribe=function(t,i){if(R(),"string"!=typeof t||"function"!=typeof i)throw new Error("Wrong arguments");window.Parsley.off(e(t),i.parsleyAdaptedCallback)},$.unsubscribeTo=function(t,i){if(R(),!(t instanceof E||t instanceof _))throw new Error("Must give Parsley instance");t.off(e(i))},$.unsubscribeAll=function(t){R(),window.Parsley.off(e(t)),$("form,input,textarea,select").each((function(){var i=$(this).data("Parsley");i&&i.off(e(t))}))},$.emit=function(t,i){var r;R();var n=i instanceof E||i instanceof _,s=Array.prototype.slice.call(arguments,n?2:1);s.unshift(e(t)),n||(i=window.Parsley),(r=i).trigger.apply(r,_toConsumableArray(s))},$.extend(!0,T,{asyncValidators:{default:{fn:function t(e){return e.status>=200&&e.status<300},url:!1},reverse:{fn:function t(e){return e.status<200||e.status>=300},url:!1}},addAsyncValidator:function t(e,i,r,n){return T.asyncValidators[e]={fn:i,url:r||!1,options:n||{}},this}}),T.addValidator("remote",{requirementType:{"":"string",validator:"string",reverse:"boolean",options:"object"},validateString:function t(e,i,r,n){var s={},a,o,l=r.validator||(!0===r.reverse?"reverse":"default");if(void 0===T.asyncValidators[l])throw new Error("Calling an undefined async validator: `"+l+"`");(i=T.asyncValidators[l].url||i).indexOf("{value}")>-1?i=i.replace("{value}",encodeURIComponent(e)):s[n.element.getAttribute("name")||n.element.getAttribute("id")]=e;var u=$.extend(!0,r.options||{},T.asyncValidators[l].options);a=$.extend(!0,{},{url:i,data:s,type:"GET"},u),n.trigger("field:ajaxoptions",n,a),o=$.param(a),void 0===T._remoteCache&&(T._remoteCache={});var d=T._remoteCache[o]=T._remoteCache[o]||$.ajax(a),h=function t(){var e=T.asyncValidators[l].fn.call(n,d,i,r);return e||(e=$.Deferred().reject()),$.when(e)};return d.then(h,h)},priority:-1}),T.on("form:submit",(function(){T._remoteCache={}})),o.prototype.addAsyncValidator=function(){return s.warnOnce("Accessing the method `addAsyncValidator` through an instance is deprecated. Simply call `Parsley.addAsyncValidator(...)`"),T.addAsyncValidator.apply(T,arguments)},T.addMessages("en",{defaultMessage:"This value seems to be invalid.",type:{email:"This value should be a valid email.",url:"This value should be a valid url.",number:"This value should be a valid number.",integer:"This value should be a valid integer.",digits:"This value should be digits.",alphanum:"This value should be alphanumeric."},notblank:"This value should not be blank.",required:"This value is required.",pattern:"This value seems to be invalid.",min:"This value should be greater than or equal to %s.",max:"This value should be lower than or equal to %s.",range:"This value should be between %s and %s.",minlength:"This value is too short. It should have %s characters or more.",maxlength:"This value is too long. It should have %s characters or fewer.",length:"This value length is invalid. It should be between %s and %s characters long.",mincheck:"You must select at least %s choices.",maxcheck:"You must select %s choices or fewer.",check:"You must select between %s and %s choices.",equalto:"This value should be the same."}),T.setLocale("en"),(new i).install(),T}));

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.