!function(){!function(e){var t=this||(0,eval)("this"),n=t.document,a=t.navigator,r=t.jQuery,i=t.JSON;r||"undefined"==typeof jQuery||(r=jQuery),function(e){"function"==typeof define&&define.amd?define(["exports","require"],e):e("object"==typeof exports&&"object"==typeof module?module.exports||exports:t.ko={})}(function(s,o){function l(e,t){return(null===e||typeof e in p)&&e===t}function u(t,n){var a;return function(){a||(a=h.a.setTimeout(function(){a=e,t()},n))}}function c(e,t){var n;return function(){clearTimeout(n),n=h.a.setTimeout(e,t)}}function d(e,t){t&&"change"!==t?"beforeChange"===t?this.pc(e):this.gb(e,t):this.qc(e)}function f(e,t){null!==t&&t.s&&t.s()}function v(e,t){var n=this.qd,a=n[A];a.ra||(this.Qb&&this.mb[t]?(n.uc(t,e,this.mb[t]),this.mb[t]=null,--this.Qb):a.I[t]||n.uc(t,e,a.J?{da:e}:n.$c(e)),e.Ja&&e.gd())}var h="undefined"!=typeof s?s:{};h.b=function(e,t){for(var n=e.split("."),a=h,r=0;r",r[0];);return 4h.a.A(t,e)&&t.push(e)}),t},Mb:function(e,t,n){var a=[];if(e)for(var r=0,i=e.length;ra?n&&e.push(t):n||e.splice(a,1)},Ba:d,extend:o,setPrototypeOf:l,Ab:d?l:o,P:s,Ga:function(e,t,n){if(!e)return e;var a,r={};for(a in e)c.call(e,a)&&(r[a]=t.call(n,e[a],a,e));return r},Tb:function(e){for(;e.firstChild;)h.removeNode(e.firstChild)},Yb:function(e){e=h.a.la(e);for(var t=(e[0]&&e[0].ownerDocument||n).createElement("div"),a=0,r=e.length;ag?e.setAttribute("selected",t):e.selected=t},Db:function(t){return null===t||t===e?"":t.trim?t.trim():t.toString().replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")},Ud:function(e,t){return e=e||"",!(t.length>e.length)&&e.substring(0,t.length)===t},vd:function(e,t){if(e===t)return!0;if(11===e.nodeType)return!1;if(t.contains)return t.contains(1!==e.nodeType?e.parentNode:e);if(t.compareDocumentPosition)return 16==(16&t.compareDocumentPosition(e));for(;e&&e!=t;)e=e.parentNode;return!!e},Sb:function(e){return h.a.vd(e,e.ownerDocument.documentElement)},kd:function(e){return!!h.a.Lb(e,h.a.Sb)},R:function(e){return e&&e.tagName&&e.tagName.toLowerCase()},Ac:function(e){return h.onError?function(){try{return e.apply(this,arguments)}catch(t){throw h.onError&&h.onError(t),t}}:e},setTimeout:function(e,t){return setTimeout(h.a.Ac(e),t)},Gc:function(e){setTimeout(function(){throw h.onError&&h.onError(e),e},0)},B:function(e,t,n){var a=h.a.Ac(n);if(n=b[t],h.options.useOnlyNativeEvents||n||!r)if(n||"function"!=typeof e.addEventListener){if("undefined"==typeof e.attachEvent)throw Error("Browser doesn't support addEventListener or attachEvent");var i=function(t){a.call(e,t)},s="on"+t;e.attachEvent(s,i),h.a.K.za(e,function(){e.detachEvent(s,i)})}else e.addEventListener(t,a,!1);else m||(m="function"==typeof r(e).on?"on":"bind"),r(e)[m](t,a)},Fb:function(e,a){if(!e||!e.nodeType)throw Error("element must be a DOM node when calling triggerEvent");var i;if("input"===h.a.R(e)&&e.type&&"click"==a.toLowerCase()?(i=e.type,i="checkbox"==i||"radio"==i):i=!1,h.options.useOnlyNativeEvents||!r||i)if("function"==typeof n.createEvent){if("function"!=typeof e.dispatchEvent)throw Error("The supplied element doesn't support dispatchEvent");i=n.createEvent(p[a]||"HTMLEvents"),i.initEvent(a,!0,!0,t,0,0,0,0,0,!1,!1,!1,!1,0,e),e.dispatchEvent(i)}else if(i&&e.click)e.click();else{if("undefined"==typeof e.fireEvent)throw Error("Browser doesn't support triggering events");e.fireEvent("on"+a)}else r(e).trigger(a)},f:function(e){return h.O(e)?e():e},bc:function(e){return h.O(e)?e.v():e},Eb:function(e,t,n){var a;t&&("object"==typeof e.classList?(a=e.classList[n?"add":"remove"],h.a.D(t.match(y),function(t){a.call(e.classList,t)})):"string"==typeof e.className.baseVal?u(e.className,"baseVal",t,n):u(e,"className",t,n))},Bb:function(t,n){var a=h.a.f(n);null!==a&&a!==e||(a="");var r=h.h.firstChild(t);!r||3!=r.nodeType||h.h.nextSibling(r)?h.h.va(t,[t.ownerDocument.createTextNode(a)]):r.data=a,h.a.Ad(t)},Yc:function(e,t){if(e.name=t,7>=g)try{var a=e.name.replace(/[&<>'"]/g,function(e){return"&#"+e.charCodeAt(0)+";"});e.mergeAttributes(n.createElement(""),!1)}catch(r){}},Ad:function(e){9<=g&&(e=1==e.nodeType?e:e.parentNode,e.style&&(e.style.zoom=e.style.zoom))},wd:function(e){if(g){var t=e.style.width;e.style.width=0,e.style.width=t}},Pd:function(e,t){e=h.a.f(e),t=h.a.f(t);for(var n=[],a=e;a<=t;a++)n.push(a);return n},la:function(e){for(var t=[],n=0,a=e.length;n",""],s=[3,"","
"],o=[1,""],l={thead:i,tbody:i,tfoot:i,tr:[2,"","
"],td:s,th:s,option:o,optgroup:o},u=8>=h.a.W;h.a.ua=function(e,i){var s;if(r){if(r.parseHTML)s=r.parseHTML(e,i)||[];else if((s=r.clean([e],i))&&s[0]){for(var o=s[0];o.parentNode&&11!==o.parentNode.nodeType;)o=o.parentNode;o.parentNode&&o.parentNode.removeChild(o)}}else{(s=i)||(s=n);var c,o=s.parentWindow||s.defaultView||t,d=h.a.Db(e).toLowerCase(),f=s.createElement("div");for(c=(d=d.match(/^(?:\x3c!--.*?--\x3e\s*?)*?<([a-z]+)[\s>]/))&&l[d[1]]||a,d=c[0],c="ignored
"+c[1]+e+c[2]+"
","function"==typeof o.innerShiv?f.appendChild(o.innerShiv(c)):(u&&s.body.appendChild(f),f.innerHTML=c,u&&f.parentNode.removeChild(f));d--;)f=f.lastChild;s=h.a.la(f.lastChild.childNodes)}return s},h.a.Md=function(e,t){var n=h.a.ua(e,t);return n.length&&n[0].parentElement||h.a.Yb(n)},h.a.fc=function(t,n){if(h.a.Tb(t),n=h.a.f(n),null!==n&&n!==e)if("string"!=typeof n&&(n=n.toString()),r)r(t).html(n);else for(var a=h.a.ua(n,t.ownerDocument),i=0;i"},bd:function(t,a){var r=n[t];if(r===e)throw Error("Couldn't find any memo with ID "+t+". Perhaps it's already been unmemoized.");try{return r.apply(null,a||[]),!0}finally{delete n[t]}},cd:function(e,n){var a=[];t(e,a);for(var r=0,i=a.length;rt){if(5e3<=++n){l=s,h.a.Gc(Error("'Too much recursion' after processing "+n+" task groups."));break}t=s}try{e()}catch(a){h.a.Gc(a)}}}function a(){e(),l=s=i.length=0}var r,i=[],s=0,o=1,l=0;return r=t.MutationObserver?function(e){var t=n.createElement("div");return new MutationObserver(e).observe(t,{attributes:!0}),function(){t.classList.toggle("foo")}}(a):n&&"onreadystatechange"in n.createElement("script")?function(e){var t=n.createElement("script");t.onreadystatechange=function(){t.onreadystatechange=null,n.documentElement.removeChild(t),t=null,e()},n.documentElement.appendChild(t)}:function(e){setTimeout(e,0)},{scheduler:r,zb:function(e){return s||h.na.scheduler(a),i[s++]=e,o++},cancel:function(e){e-=o-s,e>=l&&en[0]?i+n[0]:n[0]),i);for(var i=1===s?i:Math.min(t+(n[1]||0),i),s=t+s-2,c=Math.max(i,s),d=[],f=[],v=2;tt;t++)e=e();return e})},h.toJSON=function(e,t,n){return e=h.ad(e),h.a.hc(e,t,n)},a.prototype={constructor:a,save:function(e,t){var n=h.a.A(this.keys,e);0<=n?this.values[n]=t:(this.keys.push(e),this.values.push(t))},get:function(t){return t=h.a.A(this.keys,t),0<=t?this.values[t]:e}}}(),h.b("toJS",h.ad),h.b("toJSON",h.toJSON),h.Wd=function(e,t,n){function a(t){var a=h.xb(e,n).extend({ma:"always"}),r=a.subscribe(function(e){e&&(r.s(),t(e))});return a.notifySubscribers(a.v()),r}return"function"!=typeof Promise||t?a(t.bind(n)):new Promise(a)},h.b("when",h.Wd),function(){h.w={M:function(t){switch(h.a.R(t)){case"option":return!0===t.__ko__hasDomDataOptionValue__?h.a.g.get(t,h.c.options.$b):7>=h.a.W?t.getAttributeNode("value")&&t.getAttributeNode("value").specified?t.value:t.text:t.value;case"select":return 0<=t.selectedIndex?h.w.M(t.options[t.selectedIndex]):e;default:return t.value}},cb:function(t,n,a){switch(h.a.R(t)){case"option":"string"==typeof n?(h.a.g.set(t,h.c.options.$b,e),"__ko__hasDomDataOptionValue__"in t&&delete t.__ko__hasDomDataOptionValue__,t.value=n):(h.a.g.set(t,h.c.options.$b,n),t.__ko__hasDomDataOptionValue__=!0,t.value="number"==typeof n?n:"");break;case"select":""!==n&&null!==n||(n=e);for(var r,i=-1,s=0,o=t.options.length;s=l){n.push(t&&o.length?{key:t,value:o.join("")}:{unknown:t||o.join("")}),t=l=0,o=[];continue}}else if(58===d){if(!l&&!t&&1===o.length){t=o.pop();continue}}else{if(47===d&&1"===n.createComment("test").text,s=i?/^\x3c!--\s*ko(?:\s+([\s\S]+))?\s*--\x3e$/:/^\s*ko(?:\s+([\s\S]+))?\s*$/,o=i?/^\x3c!--\s*\/ko\s*--\x3e$/:/^\s*\/ko\s*$/,l={ul:!0,ol:!0},u="__ko_matchedEndComment__";h.h={ea:{},childNodes:function(t){return e(t)?a(t):t.childNodes},Ea:function(t){if(e(t)){t=h.h.childNodes(t);for(var n=0,a=t.length;narguments.length){if(a=n.body,!a)throw Error("ko.applyBindings: could not find document.body; has the document been loaded?")}else if(!a||1!==a.nodeType&&8!==a.nodeType)throw Error("ko.applyBindings: first parameter should be your view model; second parameter should be a DOM node");f(m(e,i),a)},h.Dc=function(t){return!t||1!==t.nodeType&&8!==t.nodeType?e:h.Td(t)},h.Ec=function(t){return(t=h.Dc(t))?t.$data:e},h.b("bindingHandlers",h.c),h.b("bindingEvent",h.i),h.b("bindingEvent.subscribe",h.i.subscribe),h.b("bindingEvent.startPossiblyAsyncContentBinding",h.i.Cb),h.b("applyBindings",h.vc),h.b("applyBindingsToDescendants",h.Oa),h.b("applyBindingAccessorsToNode",h.ib),h.b("applyBindingsToNode",h.ld),h.b("contextFor",h.Dc),h.b("dataFor",h.Ec)}(),function(e){function t(t,a){var s,o=Object.prototype.hasOwnProperty.call(r,t)?r[t]:e;o?o.subscribe(a):(o=r[t]=new h.T,o.subscribe(a),n(t,function(e,n){var a=!(!n||!n.synchronous);i[t]={definition:e,Gd:a},delete r[t],s||a?o.notifySubscribers(e):h.na.zb(function(){o.notifySubscribers(e)})}),s=!0)}function n(e,t){a("getConfig",[e],function(n){n?a("loadComponent",[e,n],function(e){t(e,n)}):t(null,null)})}function a(t,n,r,i){i||(i=h.j.loaders.slice(0));var s=i.shift();if(s){var o=s[t];if(o){var l=!1;if(o.apply(s,n.concat(function(e){l?r(null):null!==e?r(e):a(t,n,r,i)}))!==e&&(l=!0,!s.suppressLoaderExceptions))throw Error("Component loaders must supply values by invoking the callback, not by returning values synchronously.")}else a(t,n,r,i)}else r(null)}var r={},i={};h.j={get:function(n,a){var r=Object.prototype.hasOwnProperty.call(i,n)?i[n]:e;r?r.Gd?h.u.G(function(){a(r.definition)}):h.na.zb(function(){a(r.definition)}):t(n,a)},Bc:function(e){delete i[e]},oc:a},h.j.loaders=[],h.b("components",h.j),h.b("components.get",h.j.get),h.b("components.clearCachedDefinition",h.j.Bc)}(),function(){function e(e,t,n,a){function r(){0===--o&&a(i)}var i={},o=2,l=n.template;n=n.viewModel,l?s(t,l,function(t){h.j.oc("loadTemplate",[e,t],function(e){i.template=e,r()})}):r(),n?s(t,n,function(t){h.j.oc("loadViewModel",[e,t],function(e){i[c]=e,r()})}):r()}function a(e,t,n){if("function"==typeof t)n(function(e){return new t(e)});else if("function"==typeof t[c])n(t[c]);else if("instance"in t){var r=t.instance;n(function(){return r})}else"viewModel"in t?a(e,t.viewModel,n):e("Unknown viewModel value: "+t)}function r(e){switch(h.a.R(e)){case"script":return h.a.ua(e.text);case"textarea":return h.a.ua(e.value);case"template":if(i(e.content))return h.a.Ca(e.content.childNodes)}return h.a.Ca(e.childNodes)}function i(e){return t.DocumentFragment?e instanceof DocumentFragment:e&&11===e.nodeType}function s(e,n,a){"string"==typeof n.require?o||t.require?(o||t.require)([n.require],function(e){e&&"object"==typeof e&&e.Xd&&e["default"]&&(e=e["default"]),a(e)}):e("Uses require, but no AMD loader is present"):a(n)}function l(e){return function(t){throw Error("Component '"+e+"': "+t)}}var u={};h.j.register=function(e,t){if(!t)throw Error("Invalid configuration for "+e);if(h.j.tb(e))throw Error("Component "+e+" is already registered");u[e]=t},h.j.tb=function(e){return Object.prototype.hasOwnProperty.call(u,e)},h.j.unregister=function(e){delete u[e],h.j.Bc(e)},h.j.Fc={getConfig:function(e,t){t(h.j.tb(e)?u[e]:null)},loadComponent:function(t,n,a){var r=l(t);s(r,n,function(n){e(t,r,n,a)})},loadTemplate:function(e,a,s){if(e=l(e),"string"==typeof a)s(h.a.ua(a));else if(a instanceof Array)s(a);else if(i(a))s(h.a.la(a.childNodes));else if(a.element)if(a=a.element,t.HTMLElement?a instanceof HTMLElement:a&&a.tagName&&1===a.nodeType)s(r(a));else if("string"==typeof a){var o=n.getElementById(a);o?s(r(o)):e("Cannot find element with ID "+a)}else e("Unknown element type: "+a);else e("Unknown template value: "+a)},loadViewModel:function(e,t,n){a(l(e),t,n)}};var c="createViewModel";h.b("components.register",h.j.register),h.b("components.isRegistered",h.j.tb),h.b("components.unregister",h.j.unregister),h.b("components.defaultLoader",h.j.Fc),h.j.loaders.push(h.j.Fc),h.j.dd=u}(),function(){function e(e,n){var a=e.getAttribute("params");if(a){var a=t.parseBindingsString(a,n,e,{valueAccessors:!0,bindingParams:!0}),a=h.a.Ga(a,function(t){return h.o(t,null,{l:e})}),r=h.a.Ga(a,function(t){var n=t.v();return t.ja()?h.o({read:function(){return h.a.f(t())},write:h.Za(n)&&function(e){t()(e)},l:e}):n});return Object.prototype.hasOwnProperty.call(r,"$raw")||(r.$raw=a),r}return{$raw:{}}}h.j.getComponentNameForNode=function(e){var t=h.a.R(e);if(h.j.tb(t)&&(-1!=t.indexOf("-")||"[object HTMLUnknownElement]"==""+e||8>=h.a.W&&e.tagName===t))return t},h.j.tc=function(t,n,a,r){if(1===n.nodeType){var i=h.j.getComponentNameForNode(n);if(i){if(t=t||{},t.component)throw Error('Cannot use the "component" binding on a custom element matching a component');var s={name:i,params:e(n,a)};t.component=r?function(){return s}:s}}return t};var t=new h.ga;9>h.a.W&&(h.j.register=function(e){return function(t){return e.apply(this,arguments)}}(h.j.register),n.createDocumentFragment=function(e){return function(){var t,n=e(),a=h.j.dd;for(t in a);return n}}(n.createDocumentFragment))}(),function(){function e(e,t,n){if(t=t.template,!t)throw Error("Component '"+e+"' has no template");e=h.a.Ca(t),h.h.va(n,e)}function t(e,t,n){var a=e.createViewModel;return a?a.call(e,t,n):t}var n=0;h.c.component={init:function(a,r,i,s,o){function l(){var e=u&&u.dispose;"function"==typeof e&&e.call(u),d&&d.s(),c=u=d=null}var u,c,d,f=h.a.la(h.h.childNodes(a));return h.h.Ea(a),h.a.K.za(a,l),h.o(function(){var i,s,v=h.a.f(r());if("string"==typeof v?i=v:(i=h.a.f(v.name),s=h.a.f(v.params)),!i)throw Error("No component name specified");var p=h.i.Cb(a,o),m=c=++n;h.j.get(i,function(n){if(c===m){if(l(),!n)throw Error("Unknown component '"+i+"'");e(i,n,a);var r=t(n,s,{element:a,templateNodes:f});n=p.createChildContext(r,{extend:function(e){e.$component=r,e.$componentTemplateNodes=f}}),r&&r.koDescendantsComplete&&(d=h.i.subscribe(a,h.i.pa,r.koDescendantsComplete,r)),u=r,h.Oa(n,a)}})},null,{l:a}),{controlsDescendantBindings:!0}}},h.h.ea.component=!0}();var w={"class":"className","for":"htmlFor"};h.c.attr={update:function(t,n){var a=h.a.f(n())||{};h.a.P(a,function(n,a){a=h.a.f(a);var r=n.indexOf(":"),r="lookupNamespaceURI"in t&&0=h.a.W&&n in w?(n=w[n],i?t.removeAttribute(n):t[n]=a):i||(r?t.setAttributeNS(r,n,a):t.setAttribute(n,a)),"name"===n&&h.a.Yc(t,i?"":a)})}},function(){h.c.checked={after:["value","attr"],init:function(t,n,a){function r(){var r=t.checked,i=s();if(!h.S.Ya()&&(r||!l&&!h.S.qa())){var u=h.u.G(n);if(c){var f=d?u.v():u,p=v;v=i,p!==i?r&&(h.a.Na(f,i,!0),h.a.Na(f,p,!1)):h.a.Na(f,i,r),d&&h.Za(u)&&u(f)}else o&&(i===e?i=r:r||(i=e)),h.m.eb(u,a,"checked",i,!0)}}function i(){var a=h.a.f(n()),r=s();c?(t.checked=0<=h.a.A(a,r),v=r):t.checked=o&&r===e?!!a:s()===a}var s=h.xb(function(){return a.has("checkedValue")?h.a.f(a.get("checkedValue")):f?a.has("value")?h.a.f(a.get("value")):t.value:void 0}),o="checkbox"==t.type,l="radio"==t.type;if(o||l){var u=n(),c=o&&h.a.f(u)instanceof Array,d=!(c&&u.push&&u.splice),f=l||c,v=c?s():e;l&&!t.name&&h.c.uniqueName.init(t,function(){return!0}),h.o(r,null,{l:t}),h.a.B(t,"click",r),h.o(i,null,{l:t}),u=e}}},h.m.wa.checked=!0,h.c.checkedValue={update:function(e,t){e.value=h.a.f(t())}}}(),h.c["class"]={update:function(e,t){var n=h.a.Db(h.a.f(t()));h.a.Eb(e,e.__ko__cssValue,!1),e.__ko__cssValue=n,h.a.Eb(e,n,!0)}},h.c.css={update:function(e,t){var n=h.a.f(t());null!==n&&"object"==typeof n?h.a.P(n,function(t,n){n=h.a.f(n),h.a.Eb(e,t,n)}):h.c["class"].update(e,t)}},h.c.enable={update:function(e,t){var n=h.a.f(t());n&&e.disabled?e.removeAttribute("disabled"):n||e.disabled||(e.disabled=!0)}},h.c.disable={update:function(e,t){h.c.enable.update(e,function(){return!h.a.f(t())})}},h.c.event={init:function(e,t,n,a,r){var i=t()||{};h.a.P(i,function(i){"string"==typeof i&&h.a.B(e,i,function(e){var s,o=t()[i];if(o){try{var l=h.a.la(arguments);a=r.$data,l.unshift(a),s=o.apply(a,l)}finally{!0!==s&&(e.preventDefault?e.preventDefault():e.returnValue=!1)}!1===n.get(i+"Bubble")&&(e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation())}})})}},h.c.foreach={Rc:function(e){return function(){var t=e(),n=h.a.bc(t);return n&&"number"!=typeof n.length?(h.a.f(t),{foreach:n.data,as:n.as,noChildContext:n.noChildContext,includeDestroyed:n.includeDestroyed,afterAdd:n.afterAdd,beforeRemove:n.beforeRemove,afterRender:n.afterRender,beforeMove:n.beforeMove,afterMove:n.afterMove,templateEngine:h.ba.Ma}):{foreach:t,templateEngine:h.ba.Ma}}},init:function(e,t){return h.c.template.init(e,h.c.foreach.Rc(t))},update:function(e,t,n,a,r){return h.c.template.update(e,h.c.foreach.Rc(t),n,a,r)}},h.m.Ra.foreach=!1,h.h.ea.foreach=!0,h.c.hasfocus={init:function(e,t,n){function a(a){e.__ko_hasfocusUpdating=!0;var r=e.ownerDocument;if("activeElement"in r){var i;try{i=r.activeElement}catch(s){i=r.body}a=i===e}r=t(),h.m.eb(r,n,"hasfocus",a,!0),e.__ko_hasfocusLastValue=a,e.__ko_hasfocusUpdating=!1}var r=a.bind(null,!0),i=a.bind(null,!1);h.a.B(e,"focus",r),h.a.B(e,"focusin",r),h.a.B(e,"blur",i),h.a.B(e,"focusout",i),e.__ko_hasfocusLastValue=!1},update:function(e,t){var n=!!h.a.f(t());e.__ko_hasfocusUpdating||e.__ko_hasfocusLastValue===n||(n?e.focus():e.blur(),!n&&e.__ko_hasfocusLastValue&&e.ownerDocument.body.focus(),h.u.G(h.a.Fb,null,[e,n?"focusin":"focusout"]))}},h.m.wa.hasfocus=!0,h.c.hasFocus=h.c.hasfocus,h.m.wa.hasFocus="hasfocus",h.c.html={init:function(){return{controlsDescendantBindings:!0}},update:function(e,t){h.a.fc(e,t())}},function(){function e(e,t,n){h.c[e]={init:function(e,a,r,i,s){var o,l,u,c,d,f={};if(t){i=r.get("as");var v=r.get("noChildContext");d=!(i&&v),f={as:i,noChildContext:v,exportDependencies:d}}return c=(u="render"==r.get("completeOn"))||r.has(h.i.pa),h.o(function(){var r,i=h.a.f(a()),v=!n!=!i,p=!l;(d||v!==o)&&(c&&(s=h.i.Cb(e,s)),v&&(t&&!d||(f.dataDependency=h.S.o()),r=t?s.createChildContext("function"==typeof i?i:a,f):h.S.qa()?s.extend(null,f):s),p&&h.S.qa()&&(l=h.a.Ca(h.h.childNodes(e),!0)),v?(p||h.h.va(e,h.a.Ca(l)),h.Oa(r,e)):(h.h.Ea(e),u||h.i.ma(e,h.i.H)),o=v)},null,{l:e}),{controlsDescendantBindings:!0}}},h.m.Ra[e]=!1,h.h.ea[e]=!0}e("if"),e("ifnot",!1,!0),e("with",!0)}(),h.c["let"]={init:function(e,t,n,a,r){return t=r.extend(t),h.Oa(t,e),{controlsDescendantBindings:!0}}},h.h.ea["let"]=!0;var O={};h.c.options={init:function(e){if("select"!==h.a.R(e))throw Error("options binding applies only to SELECT elements");for(;0i)var u=h.a.g.Z(),c=h.a.g.Z(),d=function(e){var t=this.activeElement;(t=t&&h.a.g.get(t,c))&&t(e)},f=function(e,t){var n=e.ownerDocument;h.a.g.get(n,u)||(h.a.g.set(n,u,!0),h.a.B(n,"selectionchange",d)),h.a.g.set(e,c,t)};h.c.textInput={init:function(t,o,l){function u(e,n){h.a.B(t,e,n)}function c(){var n=h.a.f(o());null!==n&&n!==e||(n=""),m!==e&&n===m?h.a.setTimeout(c,4):t.value!==n&&(y=!0,t.value=n,y=!1,b=t.value)}function d(){p||(m=t.value,p=h.a.setTimeout(v,4))}function v(){clearTimeout(p),m=p=e;var n=t.value;b!==n&&(b=n,h.m.eb(o(),l,"textInput",n))}var p,m,b=t.value,g=9==h.a.W?d:v,y=!1;i&&u("keypress",v),11>i&&u("propertychange",function(e){y||"value"!==e.propertyName||g(e)}),8==i&&(u("keyup",v),u("keydown",v)),f&&(f(t,g),u("dragend",d)),(!i||9<=i)&&u("input",g),5>a&&"textarea"===h.a.R(t)?(u("keydown",d),u("paste",d),u("cut",d)):11>n?u("keydown",d):4>r?(u("DOMAutoComplete",v),u("dragdrop",v),u("drop",v)):s&&"number"===t.type&&u("keydown",d),u("change",v),u("blur",v),h.o(c,null,{l:t})}},h.m.wa.textInput=!0,h.c.textinput={preprocess:function(e,t,n){n("textInput",e)}}}(),h.c.uniqueName={init:function(e,t){if(t()){var n="ko_unique_"+ ++h.c.uniqueName.rd;h.a.Yc(e,n)}}},h.c.uniqueName.rd=0,h.c.using={init:function(e,t,n,a,r){var i;return n.has("as")&&(i={as:n.get("as"),noChildContext:n.get("noChildContext")}),t=r.createChildContext(t,i),h.Oa(t,e),{controlsDescendantBindings:!0}}},h.h.ea.using=!0,h.c.value={init:function(t,n,a){var r=h.a.R(t),i="input"==r;if(!i||"checkbox"!=t.type&&"radio"!=t.type){var s=[],o=a.get("valueUpdate"),l=!1,u=null;o&&(s="string"==typeof o?[o]:h.a.wc(o),h.a.Pa(s,"change"));var c=function(){u=null,l=!1;var e=n(),r=h.w.M(t);h.m.eb(e,a,"value",r)};!h.a.W||!i||"text"!=t.type||"off"==t.autocomplete||t.form&&"off"==t.form.autocomplete||-1!=h.a.A(s,"propertychange")||(h.a.B(t,"propertychange",function(){l=!0}),h.a.B(t,"focus",function(){l=!1}),h.a.B(t,"blur",function(){l&&c()})),h.a.D(s,function(e){var n=c;h.a.Ud(e,"after")&&(n=function(){u=h.w.M(t),h.a.setTimeout(c,0)},e=e.substring(5)),h.a.B(t,e,n)});var d;if(d=i&&"file"==t.type?function(){var a=h.a.f(n());null===a||a===e||""===a?t.value="":h.u.G(c)}:function(){var i=h.a.f(n()),s=h.w.M(t);null!==u&&i===u?h.a.setTimeout(d,0):i===s&&s!==e||("select"===r?(s=a.get("valueAllowUnset"),h.w.cb(t,i,s),s||i===h.w.M(t)||h.u.G(c)):h.w.cb(t,i))},"select"===r){var f;h.i.subscribe(t,h.i.H,function(){f?a.get("valueAllowUnset")?d():c():(h.a.B(t,"change",c),f=h.o(d,null,{l:t}))},null,{notifyImmediately:!0})}else h.a.B(t,"change",c),h.o(d,null,{l:t})}else h.ib(t,{checkedValue:n})},update:function(){}},h.m.wa.value=!0,h.c.visible={update:function(e,t){var n=h.a.f(t()),a="none"!=e.style.display;n&&!a?e.style.display="":!n&&a&&(e.style.display="none")}},h.c.hidden={update:function(e,t){h.c.visible.update(e,function(){return!h.a.f(t())})}},function(e){h.c[e]={init:function(t,n,a,r,i){return h.c.event.init.call(this,t,function(){var t={};return t[e]=n(),t},a,r,i)}}}("click"),h.ca=function(){},h.ca.prototype.renderTemplateSource=function(){throw Error("Override renderTemplateSource")},h.ca.prototype.createJavaScriptEvaluatorBlock=function(){throw Error("Override createJavaScriptEvaluatorBlock")},h.ca.prototype.makeTemplateSource=function(e,t){if("string"==typeof e){t=t||n;var a=t.getElementById(e);if(!a)throw Error("Cannot find template with ID "+e);return new h.C.F(a)}if(1==e.nodeType||8==e.nodeType)return new h.C.ia(e);throw Error("Unknown template type: "+e)},h.ca.prototype.renderTemplate=function(e,t,n,a){return e=this.makeTemplateSource(e,a),this.renderTemplateSource(e,t,n,a)},h.ca.prototype.isTemplateRewritten=function(e,t){return!1===this.allowTemplateRewriting||this.makeTemplateSource(e,t).data("isRewritten")},h.ca.prototype.rewriteTemplate=function(e,t,n){e=this.makeTemplateSource(e,n),t=t(e.text()),e.text(t),e.data("isRewritten",!0)},h.b("templateEngine",h.ca),h.kc=function(){function e(e,t,n,a){e=h.m.ac(e);for(var r=h.m.Ra,i=0;i]*))?)*\s+)data-bind\s*=\s*(["'])([\s\S]*?)\3/gi,n=/\x3c!--\s*ko\b\s*([\s\S]*?)\s*--\x3e/g;return{xd:function(e,t,n){t.isTemplateRewritten(e,n)||t.rewriteTemplate(e,function(e){return h.kc.Ld(e,t)},n)},Ld:function(a,r){return a.replace(t,function(t,n,a,i,s){return e(s,n,a,r)}).replace(n,function(t,n){return e(n,"","#comment",r)})},md:function(e,t){return h.aa.Xb(function(n,a){var r=n.nextSibling;r&&r.nodeName.toLowerCase()===t&&h.ib(r,e,a)})}}}(),h.b("__tr_ambtns",h.kc.md),function(){h.C={},h.C.F=function(e){if(this.F=e){var t=h.a.R(e);this.ab="script"===t?1:"textarea"===t?2:"template"==t&&e.content&&11===e.content.nodeType?3:4}},h.C.F.prototype.text=function(){var e=1===this.ab?"text":2===this.ab?"value":"innerHTML";if(0==arguments.length)return this.F[e];var t=arguments[0];"innerHTML"===e?h.a.fc(this.F,t):this.F[e]=t};var t=h.a.g.Z()+"_";h.C.F.prototype.data=function(e){return 1===arguments.length?h.a.g.get(this.F,t+e):void h.a.g.set(this.F,t+e,arguments[1])};var n=h.a.g.Z();h.C.F.prototype.nodes=function(){var t=this.F;if(0==arguments.length){var a=h.a.g.get(t,n)||{},r=a.lb||(3===this.ab?t.content:4===this.ab?t:e);if(!r||a.jd){var i=this.text();i&&i!==a.bb&&(r=h.a.Md(i,t.ownerDocument),h.a.g.set(t,n,{lb:r,bb:i,jd:!0}))}return r}a=arguments[0],this.ab!==e&&this.text(""),h.a.g.set(t,n,{lb:a})},h.C.ia=function(e){this.F=e},h.C.ia.prototype=new h.C.F,h.C.ia.prototype.constructor=h.C.ia,h.C.ia.prototype.text=function(){if(0==arguments.length){var t=h.a.g.get(this.F,n)||{};return t.bb===e&&t.lb&&(t.bb=t.lb.innerHTML),t.bb}h.a.g.set(this.F,n,{bb:arguments[0]})},h.b("templateSources",h.C),h.b("templateSources.domElement",h.C.F),h.b("templateSources.anonymousTemplate",h.C.ia)}(),function(){function t(e,t,n){var a;for(t=h.h.nextSibling(t);e&&(a=e)!==t;)e=h.h.nextSibling(a),n(a,e)}function n(e,n){if(e.length){var a=e[0],r=e[e.length-1],i=a.parentNode,s=h.ga.instance,o=s.preprocessNode;if(o){if(t(a,r,function(e,t){var n=e.previousSibling,i=o.call(s,e);i&&(e===a&&(a=i[0]||t),e===r&&(r=i[i.length-1]||n))}),e.length=0,!a)return;a===r?e.push(a):(e.push(a,r),h.a.Ua(e,i))}t(a,r,function(e){1!==e.nodeType&&8!==e.nodeType||h.vc(n,e)}),t(a,r,function(e){1!==e.nodeType&&8!==e.nodeType||h.aa.cd(e,[n])}),h.a.Ua(e,i)}}function a(e){return e.nodeType?e:0h.a.W?0:e.nodes)?e.nodes():null)?h.a.la(t.cloneNode(!0).childNodes):(e=e.text(),h.a.ua(e,a))},h.ba.Ma=new h.ba,h.gc(h.ba.Ma),h.b("nativeTemplateEngine",h.ba),function(){h.$a=function(){var e=this.Hd=function(){if(!r||!r.tmpl)return 0;try{if(0<=r.tmpl.tag.tmpl.open.toString().indexOf("__"))return 2}catch(e){}return 1}();this.renderTemplateSource=function(t,a,i,s){if(s=s||n,i=i||{},2>e)throw Error("Your version of jQuery.tmpl is too old. Please upgrade to jQuery.tmpl 1.0.0pre or later.");var o=t.data("precompiled");return o||(o=t.text()||"",o=r.template(null,"{{ko_with $item.koBindingContext}}"+o+"{{/ko_with}}"),t.data("precompiled",o)),t=[a.$data],a=r.extend({koBindingContext:a},i.templateOptions),a=r.tmpl(o,t,a),a.appendTo(s.createElement("div")),r.fragments={},a},this.createJavaScriptEvaluatorBlock=function(e){return"{{ko_code ((function() { return "+e+" })()) }}"},this.addTemplate=function(e,t){n.write("")},0=0;u--)for(p=e[u][b],f=O.length-1;f>=0;f--)if(y=O[f],C=c(y),m=c(C[b]),m===p){if(y.___$mapCustom)ko.isObservable(y)?(w=y.___$mapCustom(e[u],y),d(w)&&w!=y&&y(c(w))):O[f]=y.___$mapCustom(e[u],y);else if(o){var $=function(e,t,n,a){return function(){s(e[n],O[a],{name:"[i]",parent:r.name+"[i]",full:r.full+"[i]"},void 0,o),o(o()-1)}}(e,t,u,f);o(o()+1),setTimeout($,0)}else s(e[u],O[f],{name:"[i]",parent:r.name+"[i]",full:r.full+"[i]"});h[f]=!0,v[u]=!0;break}for(f=O.length-1;f>=0;f--)h[f]||t.splice(f,1);for(u=e.length-1;u>=0;u--)v[u]||t.pushFromModel(e[u])}else if(k=[],A=t.___$mapCustom,"function"==typeof A){for(u=0,g=e.length;u=0;a--){var i=C[a];n[i]&&(n[""]instanceof Object||(n[""]={}),n[""][i]=n[i],delete n[i])}return t&&(n.ignore=s(t.ignore,n.ignore),n.include=s(t.include,n.include),n.copy=s(t.copy,n.copy),n.observe=s(t.observe,n.observe)),n.ignore=s(n.ignore,x.ignore),n.include=s(n.include,x.include),n.copy=s(n.copy,x.copy),n.observe=s(n.observe,x.observe),n.mappedProperties=n.mappedProperties||{},n.copiedProperties=n.copiedProperties||{},n}function s(n,a){return"array"!==t.getType(n)&&(n="undefined"===t.getType(n)?[]:[n]),"array"!==t.getType(a)&&(a="undefined"===t.getType(a)?[]:[a]),e.utils.arrayGetDistinctValues(n.concat(a))}function o(t,n){var a=e.dependentObservable;e.dependentObservable=function(n,a,r){r=r||{},n&&"object"==typeof n&&(r=n);var i=r.deferEvaluation,s=!1,o=function(n){var a=e.dependentObservable;e.dependentObservable=E;var r=e.isWriteableObservable(n);e.dependentObservable=a;var i=E({read:function(){return s||(e.utils.arrayRemoveItem(t,n),s=!0),n.apply(n,arguments)},write:r&&function(e){return n(e)},deferEvaluation:!0});return A&&(i._wrapper=!0),i.__DO=n,i};r.deferEvaluation=!0;var l=new E(n,a,r);return i||(l=o(l),t.push(l)),l},e.dependentObservable.fn=E.fn,e.computed=e.dependentObservable;var r=n();return e.dependentObservable=a,e.computed=e.dependentObservable,r}function l(n,a,i,s,c,p,m){var b="array"===t.getType(e.utils.unwrapObservable(a));if(p=p||"",t.isMapped(n)){var A=e.utils.unwrapObservable(n)[k];i=r(A,i)}var E={data:a,parent:m||c},I=function(){return i[s]&&i[s].create instanceof Function},C=function(t){return o(g,function(){return e.utils.unwrapObservable(c)instanceof Array?i[s].create({data:t||E.data,parent:E.parent,skip:w}):i[s].create({data:t||E.data,parent:E.parent})})},O=function(){return i[s]&&i[s].update instanceof Function},x=function(t,n){var a={data:n||E.data,parent:E.parent,target:e.utils.unwrapObservable(t)};return e.isWriteableObservable(t)&&(a.observable=t),i[s].update(a)},S=y.get(a);if(S)return S;if(s=s||"",b){var $=[],T=!1,N=function(e){return e};i[s]&&i[s].key&&(N=i[s].key,T=!0),e.isObservable(n)||(n=e.observableArray([]),n.mappedRemove=function(e){var t="function"==typeof e?e:function(t){return t===N(e)};return n.remove(function(e){return t(N(e))})},n.mappedRemoveAll=function(t){var a=f(t,N);return n.remove(function(t){return e.utils.arrayIndexOf(a,N(t))!=-1})},n.mappedDestroy=function(e){var t="function"==typeof e?e:function(t){return t===N(e)};return n.destroy(function(e){return t(N(e))})},n.mappedDestroyAll=function(t){var a=f(t,N);return n.destroy(function(t){return e.utils.arrayIndexOf(a,N(t))!=-1})},n.mappedIndexOf=function(t){var a=f(n(),N),r=N(t);return e.utils.arrayIndexOf(a,r)},n.mappedGet=function(e){return n()[n.mappedIndexOf(e)]},n.mappedCreate=function(t){if(n.mappedIndexOf(t)!==-1)throw new Error("There already is an object with the key that you specified.");var a=I()?C(t):t;if(O()){var r=x(a,t);e.isWriteableObservable(a)?a(r):a=r}return n.push(a),a});var F=f(e.utils.unwrapObservable(n),N).sort(),V=f(a,N);T&&V.sort();var M,H,D=e.utils.compareArrays(F,V),_={},L=e.utils.unwrapObservable(a),R={},B=!0;for(M=0,H=L.length;M0&&e.utils.arrayIndexOf(i.observe,r)==-1)return n[t]=a[t],void(i.copiedProperties[r]=!0);var s=y.get(a[t]),o=l(n[t],a[t],i,t,n,r,n),u=s||o;if(i.observe.length>0&&e.utils.arrayIndexOf(i.observe,r)==-1)return n[t]=e.utils.unwrapObservable(u),void(i.copiedProperties[r]=!0);e.isWriteableObservable(n[t])?(u=e.utils.unwrapObservable(u),n[t]()!==u&&n[t](u)):(u=void 0===n[t]?u:e.utils.unwrapObservable(u),n[t]=u),i.mappedProperties[r]=!0}})}else switch(t.getType(a)){case"function":O()?e.isWriteableObservable(a)?(a(x(a)),n=a):n=x(a):n=a;break;default:if(e.isWriteableObservable(n)){if(O()){var Y=x(n);return n(Y),Y}var Y=e.utils.unwrapObservable(a);return n(Y),Y}var W=I()||O();if(n=I()?C():e.observable(e.utils.unwrapObservable(a)),O()&&n(x(n)),W)return n}return n}function u(e,t,n){for(var a=0,r=e.length;a=0?n[i]=r:(t.push(a),n.push(r))},this.get=function(a){var r=e.utils.arrayIndexOf(t,a),i=r>=0?n[r]:void 0;return i}}function b(){var e={},t=function(t){var n;try{n=t}catch(a){n="$$$"}var r=e[n];return void 0===r&&(r=new m,e[n]=r),r};this.save=function(e,n){t(e).save(e,n)},this.get=function(e){return t(e).get(e)}}var g,y,A=!0,k="__ko_mapping__",E=e.dependentObservable,I=0,C=["create","update","key","arrayChanged"],w={},O={include:["_destroy"],ignore:[],copy:[],observe:[]},x=O;t.isMapped=function(t){var n=e.utils.unwrapObservable(t);return n&&n[k]},t.fromJS=function(e){if(0==arguments.length)throw new Error("When calling ko.fromJS, pass the object you want to convert.");try{I++||(g=[],y=new b);var t,n;2==arguments.length&&(arguments[1][k]?n=arguments[1]:t=arguments[1]),3==arguments.length&&(t=arguments[1],n=arguments[2]),n&&(t=r(t,n[k])),t=i(t);var a=l(n,e,t);if(n&&(a=n),!--I)for(;g.length;){var s=g.pop();s&&(s(),s.__DO.throttleEvaluation=s.throttleEvaluation)}return a[k]=r(a[k],t),a}catch(o){throw I=0,o}},t.fromJSON=function(n){var a=e.utils.parseJson(n);return arguments[0]=a,t.fromJS.apply(this,arguments)},t.updateFromJS=function(e){throw new Error("ko.mapping.updateFromJS, use ko.mapping.fromJS instead. Please note that the order of parameters is different!")},t.updateFromJSON=function(e){throw new Error("ko.mapping.updateFromJSON, use ko.mapping.fromJSON instead. Please note that the order of parameters is different!")},t.toJS=function(n,a){if(x||t.resetDefaultOptions(),0==arguments.length)throw new Error("When calling ko.mapping.toJS, pass the object you want to convert.");if("array"!==t.getType(x.ignore))throw new Error("ko.mapping.defaultOptions().ignore should be an array.");if("array"!==t.getType(x.include))throw new Error("ko.mapping.defaultOptions().include should be an array.");if("array"!==t.getType(x.copy))throw new Error("ko.mapping.defaultOptions().copy should be an array.");return a=i(a,n[k]),t.visitModel(n,function(t){return e.utils.unwrapObservable(t)},a)},t.toJSON=function(n,a){var r=t.toJS(n,a);return e.utils.stringifyJson(r)},t.defaultOptions=function(){return arguments.length>0?void(x=arguments[0]):x},t.resetDefaultOptions=function(){x={include:O.include.slice(0),ignore:O.ignore.slice(0),copy:O.copy.slice(0),observe:O.observe.slice(0)}},t.getType=function(e){if(e&&"object"==typeof e){if(e.constructor===Date)return"date";if(e.constructor===Array)return"array"}return typeof e},t.visitModel=function(n,a,r){r=r||{},r.visitedObjects=r.visitedObjects||new b;var s,o=e.utils.unwrapObservable(n);if(!h(o))return a(n,r.parentName);r=i(r,o[k]),a(n,r.parentName),s="array"===t.getType(o)?[]:{},r.visitedObjects.save(n,s);var l=r.parentName;return v(o,function(n){if(!r.ignore||e.utils.arrayIndexOf(r.ignore,n)==-1){var i=o[n];if(r.parentName=p(l,o,n),e.utils.arrayIndexOf(r.copy,n)!==-1||e.utils.arrayIndexOf(r.include,n)!==-1||!o[k]||!o[k].mappedProperties||o[k].mappedProperties[n]||!o[k].copiedProperties||o[k].copiedProperties[n]||"array"===t.getType(o)){switch(t.getType(e.utils.unwrapObservable(i))){case"object":case"array":case"undefined":var u=r.visitedObjects.get(i);s[n]="undefined"!==t.getType(u)?u:t.visitModel(i,a,r);break;default:s[n]=a(i,r.parentName)}}}}),s}}),ko.bindingHandlers.checkCheckBox={init:function(e,t,n){var a=$(e).val(),r=ko.utils.unwrapObservable(t()),i=ko.utils.unwrapObservable(n());if("checked"==$(e).attr("checked")){$(e).removeAttr("checked");var s=ko.utils.arrayFirst(r,function(e){return a===e});null==s&&r.push(a),$("[name='"+i.checkBoxName+"["+a+"]']").val(!0),$(e).closest("label").addClass("selected"),$(e).closest("label").find(".fa").addClass("fa-check-square")}else $("[name='"+i.checkBoxName+"["+a+"]']").val(!1),$(e).closest("label").removeClass("selected"),$(e).closest("label").find(".fa").addClass("fa-square-o")},update:function(e,t,n){var a=($(e).val(),ko.utils.unwrapObservable(t())),r=ko.utils.unwrapObservable(n());if($("[name*='"+r.checkBoxName+"']").val(!1).closest("label").removeClass("selected"),$("[name*='"+r.checkBoxName+"']").closest("label").find(".fa").addClass("fa-square-o").removeClass("fa-check-square"),1==$("[name*='"+r.checkBoxName+"']").length&&"undefined"!=typeof r.checked())("object"==typeof r.checked()&&r.checked().length>0||"object"!=typeof r.checked()&&r.checked())&&($("[name*='"+r.checkBoxName+"']").val(!0).closest("label").addClass("selected"),$("[name*='"+r.checkBoxName+"']").closest("label").find(".fa").addClass("fa-check-square"));else for(var i in a)$("[name='"+r.checkBoxName+"["+a[i]+"]']").val(!0).closest("label").addClass("selected"),$("[name='"+r.checkBoxName+"["+a[i]+"]']").closest("label").find(".fa").addClass("fa-check-square")}},ko.observable.fn.beforeAndAfterSubscribe=function(e,t){var n;this.subscribe(function(e){n=e},null,"beforeChange"),this.subscribe(function(a){e.call(t,n,a)})},ko.observableArray.fn.subscribeArrayChanged=function(e,t){var n=void 0;this.subscribe(function(e){n=e.slice(0)},void 0,"beforeChange"),this.subscribe(function(a){for(var r=ko.utils.compareArrays(n,a),i=0,s=r.length;i0}function n(e){for(var t=e.length,n=5,a=0;a1&&void 0!==arguments[1]?arguments[1]:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ",n=e.length,a=t.length,r=Math.floor(a/2),i=0;i1?t-1:0),a=1;a=0&&this.fns[e].splice(n,1)}},on:function(e,t){(this.fns[e]=this.fns[e]||[]).push(t)}}}function p(){return{filters:{},add:function(e,t){(this.filters[e]=this.filters[e]||[]).push(t)},clear:function(){this.filters={}},execute:function(e,t,n){if(!this.filters[e]||!this.filters[e].length)return t;for(var a=t,r=this.filters[e],i=r.length,s=0;s=0?s.options.item(o).value:"";case"input":if("radio"===r||"checkbox"===r){var l=a.filter(function(e){return e.checked}).length;return 0===l?"":l+""}return n.value;default:return""}}function b(e,t){var n=Array.isArray(t)?t:[t],a=e;return n.forEach(function(e){a=a.replace("%s",e)}),a}function g(){var e=function(e){return parseFloat("".concat(e).replace(",","."))};return{validate:function(t){var n=t.value;if(""===n)return{valid:!0};var a=Object.assign({},{inclusive:!0,message:""},t.options),r=e(a.min),i=e(a.max);return a.inclusive?{message:b(t.l10n?a.message||t.l10n.between["default"]:a.message,["".concat(r),"".concat(i)]),valid:parseFloat(n)>=r&&parseFloat(n)<=i}:{message:b(t.l10n?a.message||t.l10n.between.notInclusive:a.message,["".concat(r),"".concat(i)]),valid:parseFloat(n)>r&&parseFloat(n)parseInt(a,10));switch(!0){case!!n&&!!a:r=b(e.l10n?e.l10n.choice.between:e.options.message,[n,a]);break;case!!n:r=b(e.l10n?e.l10n.choice.more:e.options.message,n);break;case!!a:r=b(e.l10n?e.l10n.choice.less:e.options.message,a)}return{message:r,valid:i}}}}function I(){return{validate:function(e){if(""===e.value)return{meta:{type:null},valid:!0};if(/[^0-9-\s]+/.test(e.value))return{meta:{type:null},valid:!1};var n=e.value.replace(/\D/g,"");if(!t(n))return{meta:{type:null},valid:!1};for(var a=0,r=Object.keys(Wt);a9999||t<=0||t>12)return!1;var r=[31,e%400===0||e%100!==0&&e%4===0?29:28,31,30,31,30,31,31,30,31,30,31];if(n<=0||n>r[t-1])return!1;if(a===!0){var i=new Date,s=i.getFullYear(),o=i.getMonth(),l=i.getDate();return e1){var u=s[1].split(":");l.setHours(u.length>0?parseInt(u[0],10):0),l.setMinutes(u.length>1?parseInt(u[1],10):0),l.setSeconds(u.length>2?parseInt(u[2],10):0)}return l},t=function(e,t){var n=t.replace(/Y/g,"y").replace(/M/g,"m").replace(/D/g,"d").replace(/:m/g,":M").replace(/:mm/g,":MM").replace(/:S/,":s").replace(/:SS/,":ss"),a=e.getDate(),r=a<10?"0".concat(a):a,i=e.getMonth()+1,s=i<10?"0".concat(i):i,o="".concat(e.getFullYear()).substr(2),l=e.getFullYear(),u=e.getHours()%12||12,c=u<10?"0".concat(u):u,d=e.getHours(),f=d<10?"0".concat(d):d,v=e.getMinutes(),h=v<10?"0".concat(v):v,p=e.getSeconds(),m=p<10?"0".concat(p):p,b={H:"".concat(d),HH:"".concat(f),M:"".concat(v),MM:"".concat(h),d:"".concat(a),dd:"".concat(r),h:"".concat(u),hh:"".concat(c),m:"".concat(i),mm:"".concat(s),s:"".concat(p),ss:"".concat(m),yy:"".concat(o),yyyy:"".concat(l)};return n.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMs])\1?|"[^"]*"|'[^']*'/g,function(e){return b[e]?b[e]:e.slice(1,e.length-1)})};return{validate:function(n){if(""===n.value)return{meta:{date:null},valid:!0};var a=Object.assign({},{format:n.element&&"date"===n.element.getAttribute("type")?"YYYY-MM-DD":"MM/DD/YYYY",message:""},n.options),r=n.l10n?n.l10n.date["default"]:a.message,i={message:"".concat(r),meta:{date:null},valid:!1},s=a.format.split(" "),o=s.length>1?s[1]:null,l=s.length>2?s[2]:null,u=n.value.split(" "),c=u[0],d=u.length>1?u[1]:null;if(s.length!==u.length)return i;var f=a.separator||(c.indexOf("/")!==-1?"/":c.indexOf("-")!==-1?"-":c.indexOf(".")!==-1?".":"/");if(null===f||c.indexOf(f)===-1)return i;var v=c.split(f),h=s[0].split(f);if(v.length!==h.length)return i;var p=v[h.indexOf("YYYY")],m=v[h.indexOf("MM")],g=v[h.indexOf("DD")];if(!/^\d+$/.test(p)||!/^\d+$/.test(m)||!/^\d+$/.test(g)||p.length>4||m.length>2||g.length>2)return i;var y=parseInt(p,10),A=parseInt(m,10),k=parseInt(g,10);if(!C(y,A,k))return i;var E=new Date(y,A-1,k);if(o){var I=d.split(":");if(o.split(":").length!==I.length)return i;var w=I.length>0?I[0].length<=2&&/^\d+$/.test(I[0])?parseInt(I[0],10):-1:0,O=I.length>1?I[1].length<=2&&/^\d+$/.test(I[1])?parseInt(I[1],10):-1:0,x=I.length>2?I[2].length<=2&&/^\d+$/.test(I[2])?parseInt(I[2],10):-1:0;if(w===-1||O===-1||x===-1)return i;if(x<0||x>60)return i;if(w<0||w>=24||l&&w>12)return i;if(O<0||O>59)return i;E.setHours(w),E.setMinutes(O),E.setSeconds(x)}var S="function"==typeof a.min?a.min():a.min,$=S instanceof Date?S:S?e(S,h,f):E,T="function"==typeof a.max?a.max():a.max,N=T instanceof Date?T:T?e(T,h,f):E,F=S instanceof Date?t($,a.format):S,V=T instanceof Date?t(N,a.format):T;switch(!0){case!!F&&!V:return{message:b(n.l10n?n.l10n.date.min:r,F),meta:{date:E},valid:E.getTime()>=$.getTime()};case!!V&&!F:return{message:b(n.l10n?n.l10n.date.max:r,V),meta:{date:E},valid:E.getTime()<=N.getTime()};case!!V&&!!F:return{message:b(n.l10n?n.l10n.date.range:r,[F,V]),meta:{date:E},valid:E.getTime()<=N.getTime()&&E.getTime()>=$.getTime()};default:return{message:"".concat(r),meta:{date:E},valid:!0}}}}}function O(){return{validate:function(e){var t="function"==typeof e.options.compare?e.options.compare.call(this):e.options.compare;return{valid:""===t||e.value!==t }}}}function x(){return{validate:function(e){return{valid:""===e.value||/^\d+$/.test(e.value)}}}}function S(){var e=function(e,t){for(var n=e.split(/"/),a=n.length,r=[],i="",s=0;s()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,r=n.multiple===!0||"true"==="".concat(n.multiple);if(r){for(var i=n.separator||/[,;]/,s=e(t.value,i),o=s.length,l=0;lparseInt("".concat(e.options.maxFiles),10))return{meta:{error:"INVALID_MAX_FILES"},valid:!1};if(e.options.minFiles&&sparseInt("".concat(e.options.maxSize),10))return{meta:Object.assign({},{error:"INVALID_MAX_SIZE"},l),valid:!1};if(n&&n.indexOf(t.toLowerCase())===-1)return{meta:Object.assign({},{error:"INVALID_EXTENSION"},l),valid:!1};if(i[u].type&&a&&a.indexOf(i[u].type.toLowerCase())===-1)return{meta:Object.assign({},{error:"INVALID_TYPE"},l),valid:!1}}if(e.options.maxTotalSize&&o>parseInt("".concat(e.options.maxTotalSize),10))return{meta:Object.assign({},{error:"INVALID_MAX_TOTAL_SIZE",totalSize:o},l),valid:!1};if(e.options.minTotalSize&&o=n}:{message:b(e.l10n?t.message||e.l10n.greaterThan.notInclusive:t.message,"".concat(n)),valid:parseFloat(e.value)>n}}}}function N(){return{validate:function(e){var t="function"==typeof e.options.compare?e.options.compare.call(this):e.options.compare;return{valid:""===t||e.value===t}}}}function F(){return{validate:function(e){if(""===e.value)return{valid:!0};var t=Object.assign({},{decimalSeparator:".",thousandsSeparator:""},e.options),n="."===t.decimalSeparator?"\\.":t.decimalSeparator,a="."===t.thousandsSeparator?"\\.":t.thousandsSeparator,r=new RegExp("^-?[0-9]{1,3}(".concat(a,"[0-9]{3})*(").concat(n,"[0-9]+)?$")),i=new RegExp(a,"g"),s="".concat(e.value);if(!r.test(s))return{valid:!1};a&&(s=s.replace(i,"")),n&&(s=s.replace(n,"."));var o=parseFloat(s);return{valid:!isNaN(o)&&isFinite(o)&&Math.floor(o)===o}}}}function V(){return{validate:function(e){if(""===e.value)return{valid:!0};var t=Object.assign({},{ipv4:!0,ipv6:!0},e.options),n=/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\/([0-9]|[1-2][0-9]|3[0-2]))?$/,a=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*(\/(\d|\d\d|1[0-1]\d|12[0-8]))?$/;switch(!0){case t.ipv4&&!t.ipv6:return{message:e.l10n?t.message||e.l10n.ip.ipv4:t.message,valid:n.test(e.value)};case!t.ipv4&&t.ipv6:return{message:e.l10n?t.message||e.l10n.ip.ipv6:t.message,valid:a.test(e.value)};case t.ipv4&&t.ipv6:default:return{message:e.l10n?t.message||e.l10n.ip["default"]:t.message,valid:n.test(e.value)||a.test(e.value)}}}}}function M(){return{validate:function(e){if(""===e.value)return{valid:!0};var t=Object.assign({},{inclusive:!0,message:""},e.options),n=parseFloat("".concat(t.max).replace(",","."));return t.inclusive?{message:b(e.l10n?t.message||e.l10n.lessThan["default"]:t.message,"".concat(n)),valid:parseFloat(e.value)<=n}:{message:b(e.l10n?t.message||e.l10n.lessThan.notInclusive:t.message,"".concat(n)),valid:parseFloat(e.value)=0;n--){var a=e.charCodeAt(n);a>127&&a<=2047?t++:a>2047&&a<=65535&&(t+=2),a>=56320&&a<=57343&&n--}return"".concat(t)};return{validate:function(t){var n=Object.assign({},{message:"",trim:!1,utf8Bytes:!1},t.options),a=n.trim===!0||"true"==="".concat(n.trim)?t.value.trim():t.value;if(""===a)return{valid:!0};var r=n.min?"".concat(n.min):"",i=n.max?"".concat(n.max):"",s=n.utf8Bytes?e(a):a.length,o=!0,l=t.l10n?n.message||t.l10n.stringLength["default"]:n.message;switch((r&&sparseInt(i,10))&&(o=!1),!0){case!!r&&!!i:l=b(t.l10n?n.message||t.l10n.stringLength.between:n.message,[r,i]);break;case!!r:l=b(t.l10n?n.message||t.l10n.stringLength.more:n.message,"".concat(parseInt(r,10)-1));break;case!!i:l=b(t.l10n?n.message||t.l10n.stringLength.less:n.message,"".concat(parseInt(i,10)+1))}return{message:l,valid:o}}}}function Z(){var e={allowEmptyProtocol:!1,allowLocal:!1,protocol:"http, https, ftp"};return{validate:function(t){if(""===t.value)return{valid:!0};var n=Object.assign({},e,t.options),a=n.allowLocal===!0||"true"==="".concat(n.allowLocal),r=n.allowEmptyProtocol===!0||"true"==="".concat(n.allowEmptyProtocol),i=n.protocol.split(",").join("|").replace(/\s/g,""),s=new RegExp("^(?:(?:"+i+")://)"+(r?"?":"")+"(?:\\S+(?::\\S*)?@)?(?:"+(a?"":"(?!(?:10|127)(?:\\.\\d{1,3}){3})(?!(?:169\\.254|192\\.168)(?:\\.\\d{1,3}){2})(?!172\\.(?:1[6-9]|2\\d|3[0-1])(?:\\.\\d{1,3}){2})")+"(?:[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-z\\u00a1-\\uffff0-9]-?)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-?)*[a-z\\u00a1-\\uffff0-9])*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))"+(a?"?":"")+")(?::\\d{2,5})?(?:/[^\\s]*)?$","i");return{valid:s.test(t.value)}}}}function G(){return{validate:function(e){return{valid:""===e.value||/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=|[A-Za-z0-9+\/]{4})$/.test(e.value)}}}}function U(){return{validate:function(e){return{valid:""===e.value||/^[a-zA-Z]{6}[a-zA-Z0-9]{2}([a-zA-Z0-9]{3})?$/.test(e.value)}}}}function K(){var e=["hex","rgb","rgba","hsl","hsla","keyword"],t=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","green","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","transparent","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],n=function(e){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(e)},a=function(e){return/^hsl\((\s*(-?\d+)\s*,)(\s*(\b(0?\d{1,2}|100)\b%)\s*,)(\s*(\b(0?\d{1,2}|100)\b%)\s*)\)$/.test(e)},r=function(e){return/^hsla\((\s*(-?\d+)\s*,)(\s*(\b(0?\d{1,2}|100)\b%)\s*,){2}(\s*(0?(\.\d+)?|1(\.0+)?)\s*)\)$/.test(e)},i=function(e){return t.indexOf(e)>=0},s=function(e){return/^rgb\((\s*(\b([01]?\d{1,2}|2[0-4]\d|25[0-5])\b)\s*,){2}(\s*(\b([01]?\d{1,2}|2[0-4]\d|25[0-5])\b)\s*)\)$/.test(e)||/^rgb\((\s*(\b(0?\d{1,2}|100)\b%)\s*,){2}(\s*(\b(0?\d{1,2}|100)\b%)\s*)\)$/.test(e)},o=function(e){return/^rgba\((\s*(\b([01]?\d{1,2}|2[0-4]\d|25[0-5])\b)\s*,){3}(\s*(0?(\.\d+)?|1(\.0+)?)\s*)\)$/.test(e)||/^rgba\((\s*(\b(0?\d{1,2}|100)\b%)\s*,){3}(\s*(0?(\.\d+)?|1(\.0+)?)\s*)\)$/.test(e)};return{validate:function(t){if(""===t.value)return{valid:!0};var l="string"==typeof t.options.type?t.options.type.toString().replace(/s/g,"").split(","):t.options.type||e,u=!0,c=!1,d=void 0;try{for(var f,v=l[Symbol.iterator]();!(u=(f=v.next()).done);u=!0){var h=f.value,p=h.toLowerCase();if(e.indexOf(p)!==-1){var m=!0;switch(p){case"hex":m=n(t.value);break;case"hsl":m=a(t.value);break;case"hsla":m=r(t.value);break;case"keyword":m=i(t.value);break;case"rgb":m=s(t.value);break;case"rgba":m=o(t.value)}if(m)return{valid:!0}}}}catch(b){c=!0,d=b}finally{try{u||null==v["return"]||v["return"]()}finally{if(c)throw d}}return{valid:!1}}}}function J(){return{validate:function(e){if(""===e.value)return{valid:!0};var t=e.value.toUpperCase();if(!/^[0-9A-Z]{9}$/.test(t))return{valid:!1};for(var n=t.split("").map(function(e){var t=e.charCodeAt(0);return t>="A".charCodeAt(0)&&t<="Z".charCodeAt(0)?t-"A".charCodeAt(0)+10+"":e}),a=n.length,r=0,i=0;i9&&(s-=9),r+=s}return r=(10-r%10)%10,{valid:r===parseInt(n[a-1],10)}}}}function z(){return{validate:function(e){if(""===e.value)return{valid:!0};if(!/^(\d{8}|\d{12}|\d{13}|\d{14})$/.test(e.value))return{valid:!1};for(var t=e.value.length,n=0,a=8===t?[3,1]:[1,3],r=0;r="A".charCodeAt(0)&&t<="Z".charCodeAt(0)?t-"A".charCodeAt(0)+10:e}).join("");for(var l=parseInt(r.substr(0,1),10),u=r.length,c=1;c31||a>12)return!1;for(var s=0,o=0;o<6;o++)s+=(7-o)*(parseInt(e.charAt(o),10)+parseInt(e.charAt(o+6),10));if(s=11-s%11,10!==s&&11!==s||(s=0),s!==i)return!1;switch(t.toUpperCase()){case"BA":return 10<=r&&r<=19;case"MK":return 41<=r&&r<=49;case"ME":return 20<=r&&r<=29;case"RS":return 70<=r&&r<=99;case"SI":return 50<=r&&r<=59;default:return!0}}function te(e){return{meta:{},valid:ee(e,"BA")}}function ne(e){if(!/^\d{10}$/.test(e)&&!/^\d{6}\s\d{3}\s\d{1}$/.test(e))return{meta:{},valid:!1};var t=e.replace(/\s/g,""),n=parseInt(t.substr(0,2),10)+1900,a=parseInt(t.substr(2,2),10),r=parseInt(t.substr(4,2),10);if(a>40?(n+=100,a-=40):a>20&&(n-=100,a-=20),!C(n,a,r))return{meta:{},valid:!1};for(var i=0,s=[2,4,8,5,10,9,7,3,6],o=0;o<9;o++)i+=parseInt(t.charAt(o),10)*s[o];return i=i%11%10,{meta:{},valid:"".concat(i)===t.substr(9,1)}}function ae(e){var t=e.replace(/\D/g,"");if(!/^\d{11}$/.test(t)||/^1{11}|2{11}|3{11}|4{11}|5{11}|6{11}|7{11}|8{11}|9{11}|0{11}$/.test(t))return{meta:{},valid:!1};var n,a=0;for(n=0;n<9;n++)a+=(10-n)*parseInt(t.charAt(n),10);if(a=11-a%11,10!==a&&11!==a||(a=0),"".concat(a)!==t.charAt(9))return{meta:{},valid:!1};var r=0;for(n=0;n<10;n++)r+=(11-n)*parseInt(t.charAt(n),10);return r=11-r%11,10!==r&&11!==r||(r=0),{meta:{},valid:"".concat(r)===t.charAt(10)}}function re(e){if(!/^756[\.]{0,1}[0-9]{4}[\.]{0,1}[0-9]{4}[\.]{0,1}[0-9]{2}$/.test(e))return{meta:{},valid:!1};for(var t=e.replace(/\D/g,"").substr(3),n=t.length,a=8===n?[3,1]:[1,3],r=0,i=0;i=0;i--)r+=parseInt(t.charAt(i),10)*a[i];return r%=11,r>=2&&(r=11-r),{meta:{},valid:"".concat(r)===t.substr(n-1)}}function le(e){if(!/^\d{9,10}$/.test(e))return{meta:{},valid:!1 };var t=1900+parseInt(e.substr(0,2),10),n=parseInt(e.substr(2,2),10)%50%20,a=parseInt(e.substr(4,2),10);if(9===e.length){if(t>=1980&&(t-=100),t>1953)return{meta:{},valid:!1}}else t<1954&&(t+=100);if(!C(t,n,a))return{meta:{},valid:!1};if(10===e.length){var r=parseInt(e.substr(0,9),10)%11;return t<1985&&(r%=10),{meta:{},valid:"".concat(r)===e.substr(9,1)}}return{meta:{},valid:!0}}function ue(e){if(!/^[0-9]{6}[-]{0,1}[0-9]{4}$/.test(e))return{meta:{},valid:!1};var t=e.replace(/-/g,""),n=parseInt(t.substr(0,2),10),a=parseInt(t.substr(2,2),10),r=parseInt(t.substr(4,2),10);switch(!0){case"5678".indexOf(t.charAt(6))!==-1&&r>=58:r+=1800;break;case"0123".indexOf(t.charAt(6))!==-1:case"49".indexOf(t.charAt(6))!==-1&&r>=37:r+=1900;break;default:r+=2e3}return{meta:{},valid:C(r,a,n)}}function ce(e){var t=/^[0-9]{8}[-]{0,1}[A-HJ-NP-TV-Z]$/.test(e),n=/^[XYZ][-]{0,1}[0-9]{7}[-]{0,1}[A-HJ-NP-TV-Z]$/.test(e),a=/^[A-HNPQS][-]{0,1}[0-9]{7}[-]{0,1}[0-9A-J]$/.test(e);if(!t&&!n&&!a)return{meta:{},valid:!1};var r,i,s=e.replace(/-/g,""),o=!0;if(t||n){i="DNI";var l="XYZ".indexOf(s.charAt(0));return l!==-1&&(s=l+s.substr(1)+"",i="NIE"),r=parseInt(s.substr(0,8),10),r="TRWAGMYFPDXBNJZSQVHLCKE"[r%23],{meta:{type:i},valid:r===s.substr(8,1)}}r=s.substr(1,7),i="CIF";for(var u=s[0],c=s.substr(-1),d=0,f=0;f=0)return{meta:{},valid:!1};var r=parseInt(t.substr(4,2),10),i=parseInt(t.substr(6,2),10),s=parseInt(t.substr(6,2),10);if(r+=/^[0-9]$/.test(t.charAt(16))?1900:2e3,!C(r,i,s))return{meta:{},valid:!1};var o=t.charAt(10);if("H"!==o&&"M"!==o)return{meta:{},valid:!1};var l=t.substr(11,2),u=["AS","BC","BS","CC","CH","CL","CM","CS","DF","DG","GR","GT","HG","JC","MC","MN","MS","NE","NL","NT","OC","PL","QR","QT","SL","SP","SR","TC","TL","TS","VZ","YN","ZS"];if(u.indexOf(l)===-1)return{meta:{},valid:!1};for(var c="0123456789ABCDEFGHIJKLMN&OPQRSTUVWXYZ",d=0,f=t.length,v=0;v31&&a>12)return{meta:{},valid:!1};if(9!==t&&(n=i[t+""]+n,!C(n,a,r)))return{meta:{},valid:!1};for(var s=0,o=[2,7,9,1,4,6,3,5,8,2,7,9],l=e.length,u=0;u0&&(n=10-n),{meta:{},valid:"".concat(n)===e.charAt(7)}}function Re(e){if(!/^[0-9]{10}[0|1][8|9][0-9]$/.test(e))return{meta:{},valid:!1};var n=parseInt(e.substr(0,2),10),a=(new Date).getFullYear()%100,r=parseInt(e.substr(2,2),10),i=parseInt(e.substr(4,2),10);return n=n>=a?n+1900:n+2e3,C(n,r,i)?{meta:{},valid:t(e)}:{meta:{},valid:!1}}function Be(){var e=["AR","BA","BG","BR","CH","CL","CN","CO","CZ","DK","EE","ES","FI","FR","HK","HR","ID","IE","IL","IS","KR","LT","LV","ME","MK","MX","MY","NL","NO","PE","PL","RO","RS","SE","SI","SK","SM","TH","TR","TW","UY","ZA"];return{validate:function(t){if(""===t.value)return{valid:!0};var n=Object.assign({},{message:""},t.options),a=t.value.substr(0,2);if(a="function"==typeof n.country?n.country.call(this):n.country,e.indexOf(a)===-1)return{valid:!0};var r={meta:{},valid:!0};switch(a.toLowerCase()){case"ar":r=Q(t.value);break;case"ba":r=te(t.value);break;case"bg":r=ne(t.value);break;case"br":r=ae(t.value);break;case"ch":r=re(t.value);break;case"cl":r=ie(t.value);break;case"cn":r=se(t.value);break;case"co":r=oe(t.value);break;case"cz":r=le(t.value);break;case"dk":r=ue(t.value);break;case"ee":r=Ae(t.value);break;case"es":r=ce(t.value);break;case"fi":r=de(t.value);break;case"fr":r=fe(t.value);break;case"hk":r=ve(t.value);break;case"hr":r=he(t.value);break;case"id":r=pe(t.value);break;case"ie":r=me(t.value);break;case"il":r=be(t.value);break;case"is":r=ge(t.value);break;case"kr":r=ye(t.value);break;case"lt":r=Ae(t.value);break;case"lv":r=ke(t.value);break;case"me":r=Ee(t.value);break;case"mk":r=Ie(t.value);break;case"mx":r=Ce(t.value);break;case"my":r=we(t.value);break;case"nl":r=Oe(t.value);break;case"no":r=xe(t.value);break;case"pe":r=Se(t.value);break;case"pl":r=$e(t.value);break;case"ro":r=Te(t.value);break;case"rs":r=Ne(t.value);break;case"se":r=Fe(t.value);break;case"si":r=Ve(t.value);break;case"sk":r=le(t.value);break;case"sm":r=Me(t.value);break;case"th":r=He(t.value);break;case"tr":r=De(t.value);break;case"tw":r=_e(t.value);break;case"uy":r=Le(t.value);break;case"za":r=Re(t.value)}var i=b(t.l10n?n.message||t.l10n.id.country:n.message,t.l10n?t.l10n.id.countries[a.toUpperCase()]:a.toUpperCase());return Object.assign({},{message:i},r)}}}function Pe(){return{validate:function(e){if(""===e.value)return{valid:!0};switch(!0){case/^\d{15}$/.test(e.value):case/^\d{2}-\d{6}-\d{6}-\d{1}$/.test(e.value):case/^\d{2}\s\d{6}\s\d{6}\s\d{1}$/.test(e.value):var n=e.value.replace(/[^0-9]/g,"");return{valid:t(n)};case/^\d{14}$/.test(e.value):case/^\d{16}$/.test(e.value):case/^\d{2}-\d{6}-\d{6}(|-\d{2})$/.test(e.value):case/^\d{2}\s\d{6}\s\d{6}(|\s\d{2})$/.test(e.value):return{valid:!0};default:return{valid:!1}}}}}function je(){return{validate:function(e){if(""===e.value)return{valid:!0};if(!/^IMO \d{7}$/i.test(e.value))return{valid:!1};for(var t=e.value.replace(/^.*(\d{7})$/,"$1"),n=0,a=6;a>=1;a--)n+=parseInt(t.slice(6-a,-a),10)*(a+1);return{valid:n%10===parseInt(t.charAt(6),10)}}}}function Ze(){return{validate:function(e){if(""===e.value)return{meta:{type:null},valid:!0};var t;switch(!0){case/^\d{9}[\dX]$/.test(e.value):case 13===e.value.length&&/^(\d+)-(\d+)-(\d+)-([\dX])$/.test(e.value):case 13===e.value.length&&/^(\d+)\s(\d+)\s(\d+)\s([\dX])$/.test(e.value):t="ISBN10";break;case/^(978|979)\d{9}[\dX]$/.test(e.value):case 17===e.value.length&&/^(978|979)-(\d+)-(\d+)-(\d+)-([\dX])$/.test(e.value):case 17===e.value.length&&/^(978|979)\s(\d+)\s(\d+)\s(\d+)\s([\dX])$/.test(e.value):t="ISBN13";break;default:return{meta:{type:null},valid:!1}}var n,a,r=e.value.replace(/[^0-9X]/gi,"").split(""),i=r.length,s=0;switch(t){case"ISBN10":for(s=0,n=0;n57?(o-55).toString():n.charAt(r)}var l="",u=s.length,c=u%2!==0?0:1;for(r=0;r9&&(t-=9)),a+=t;return{valid:a%10===0}}}}function et(){var e=function(e,t){var n,a=Math.pow(10,t),r=e*a;switch(!0){case 0===r:n=0;break;case r>0:n=1;break;case r<0:n=-1}var i=r%1===.5*n;return i?(Math.floor(r)+(n>0?1:0))/a:Math.round(r)/a},t=function(t,n){if(0===n)return 1;var a="".concat(t).split("."),r="".concat(n).split("."),i=(1===a.length?0:a[1].length)+(1===r.length?0:r[1].length);return e(t-n*Math.floor(t/n),i)};return{validate:function(e){if(""===e.value)return{valid:!0};var n=parseFloat(e.value);if(isNaN(n)||!isFinite(n))return{valid:!1};var a=Object.assign({},{baseValue:0,message:"",step:1},e.options),r=t(n-a.baseValue,a.step);return{message:b(e.l10n?a.message||e.l10n.step["default"]:a.message,"".concat(a.step)),valid:0===r||r===a.step}}}}function tt(){return{validate:function(e){if(""===e.value)return{valid:!0};var t=Object.assign({},{message:""},e.options),n={3:/^[0-9A-F]{8}-[0-9A-F]{4}-3[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i,4:/^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,5:/^[0-9A-F]{8}-[0-9A-F]{4}-5[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,all:/^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i},a=t.version?"".concat(t.version):"all";return{message:t.version?b(e.l10n?t.message||e.l10n.uuid.version:t.message,t.version):e.l10n?e.l10n.uuid["default"]:t.message,valid:null===n[a]||n[a].test(e.value)}}}}function nt(e){var t=e.replace("-","");if(/^AR[0-9]{11}$/.test(t)&&(t=t.substr(2)),!/^[0-9]{11}$/.test(t))return{meta:{},valid:!1};for(var n=[5,4,3,2,7,6,5,4,3,2],a=0,r=0;r<10;r++)a+=parseInt(t.charAt(r),10)*n[r];return a=11-a%11,11===a&&(a=0),{meta:{},valid:"".concat(a)===t.substr(10)}}function at(e){var t=e;if(/^ATU[0-9]{8}$/.test(t)&&(t=t.substr(2)),!/^U[0-9]{8}$/.test(t))return{meta:{},valid:!1};t=t.substr(1);for(var n=[1,2,1,2,1,2,1],a=0,r=0,i=0;i<7;i++)r=parseInt(t.charAt(i),10)*n[i],r>9&&(r=Math.floor(r/10)+r%10),a+=r;return a=10-(a+4)%10,10===a&&(a=0),{meta:{},valid:"".concat(a)===t.substr(7,1)}}function rt(e){var t=e;if(/^BE[0]?[0-9]{9}$/.test(t)&&(t=t.substr(2)),!/^[0]?[0-9]{9}$/.test(t))return{meta:{},valid:!1};if(9===t.length&&(t="0".concat(t)),"0"===t.substr(1,1))return{meta:{},valid:!1};var n=parseInt(t.substr(0,8),10)+parseInt(t.substr(8,2),10);return{meta:{},valid:n%97===0}}function it(e){var t=e;if(/^BG[0-9]{9,10}$/.test(t)&&(t=t.substr(2)),!/^[0-9]{9,10}$/.test(t))return{meta:{},valid:!1};var n=0,a=0;if(9===t.length){for(a=0;a<8;a++)n+=parseInt(t.charAt(a),10)*(a+1);if(n%=11,10===n)for(n=0,a=0;a<8;a++)n+=parseInt(t.charAt(a),10)*(a+3);return n%=10,{meta:{},valid:"".concat(n)===t.substr(8)}}var r=function(e){var t=parseInt(e.substr(0,2),10)+1900,n=parseInt(e.substr(2,2),10),a=parseInt(e.substr(4,2),10);if(n>40?(t+=100,n-=40):n>20&&(t-=100,n-=20),!C(t,n,a))return!1;for(var r=[2,4,8,5,10,9,7,3,6],i=0,s=0;s<9;s++)i+=parseInt(e.charAt(s),10)*r[s];return i=i%11%10,"".concat(i)===e.substr(9,1)},i=function(e){for(var t=[21,19,17,13,11,9,7,3,1],n=0,a=0;a<9;a++)n+=parseInt(e.charAt(a),10)*t[a];return n%=10,"".concat(n)===e.substr(9,1)},s=function(e){for(var t=[4,3,2,7,6,5,4,3,2],n=0,a=0;a<9;a++)n+=parseInt(e.charAt(a),10)*t[a];return n=11-n%11,10!==n&&(11===n&&(n=0),"".concat(n)===e.substr(9,1))};return{meta:{},valid:r(t)||i(t)||s(t)}}function st(e){if(""===e)return{meta:{},valid:!0};var t=e.replace(/[^\d]+/g,"");if(""===t||14!==t.length)return{meta:{},valid:!1};if("00000000000000"===t||"11111111111111"===t||"22222222222222"===t||"33333333333333"===t||"44444444444444"===t||"55555555555555"===t||"66666666666666"===t||"77777777777777"===t||"88888888888888"===t||"99999999999999"===t)return{meta:{},valid:!1};var n,a=t.length-2,r=t.substring(0,a),i=t.substring(a),s=0,o=a-7;for(n=a;n>=1;n--)s+=parseInt(r.charAt(a-n),10)*o--,o<2&&(o=9);var l=s%11<2?0:11-s%11;if(l!==parseInt(i.charAt(0),10))return{meta:{},valid:!1};for(a+=1,r=t.substring(0,a),s=0,o=a-7,n=a;n>=1;n--)s+=parseInt(r.charAt(a-n),10)*o--,o<2&&(o=9);return l=s%11<2?0:11-s%11,{meta:{},valid:l===parseInt(i.charAt(1),10)}}function ot(e){var t=e;if(/^CHE[0-9]{9}(MWST|TVA|IVA|TPV)?$/.test(t)&&(t=t.substr(2)),!/^E[0-9]{9}(MWST|TVA|IVA|TPV)?$/.test(t))return{meta:{},valid:!1};t=t.substr(1);for(var n=[5,4,3,2,7,6,5,4],a=0,r=0;r<8;r++)a+=parseInt(t.charAt(r),10)*n[r];return a=11-a%11,10===a?{meta:{},valid:!1}:(11===a&&(a=0),{meta:{},valid:"".concat(a)===t.substr(8,1)})}function lt(e){var t=e;if(/^CY[0-5|9][0-9]{7}[A-Z]$/.test(t)&&(t=t.substr(2)),!/^[0-5|9][0-9]{7}[A-Z]$/.test(t))return{meta:{},valid:!1};if("12"===t.substr(0,2))return{meta:{},valid:!1};for(var n=0,a={0:1,1:0,2:5,3:7,4:9,5:13,6:15,7:17,8:19,9:21},r=0;r<8;r++){var i=parseInt(t.charAt(r),10);r%2===0&&(i=a["".concat(i)]),n+=i}return{meta:{},valid:"".concat("ABCDEFGHIJKLMNOPQRSTUVWXYZ"[n%26])===t.substr(8,1)}}function ut(e){var t=e;if(/^CZ[0-9]{8,10}$/.test(t)&&(t=t.substr(2)),!/^[0-9]{8,10}$/.test(t))return{meta:{},valid:!1};var n=0,a=0;if(8===t.length){if("9"==="".concat(t.charAt(0)))return{meta:{},valid:!1};for(n=0,a=0;a<7;a++)n+=parseInt(t.charAt(a),10)*(8-a);return n=11-n%11,10===n&&(n=0),11===n&&(n=1),{meta:{},valid:"".concat(n)===t.substr(7,1)}}if(9===t.length&&"6"==="".concat(t.charAt(0))){for(n=0,a=0;a<7;a++)n+=parseInt(t.charAt(a+1),10)*(8-a);return n=11-n%11,10===n&&(n=0),11===n&&(n=1),n=[8,7,6,5,4,3,2,1,0,9,10][n-1],{meta:{},valid:"".concat(n)===t.substr(8,1)}}if(9===t.length||10===t.length){var r=1900+parseInt(t.substr(0,2),10),i=parseInt(t.substr(2,2),10)%50%20,s=parseInt(t.substr(4,2),10);if(9===t.length){if(r>=1980&&(r-=100),r>1953)return{meta:{},valid:!1}}else r<1954&&(r+=100);if(!C(r,i,s))return{meta:{},valid:!1};if(10===t.length){var o=parseInt(t.substr(0,9),10)%11;return r<1985&&(o%=10),{meta:{},valid:"".concat(o)===t.substr(9,1)}}return{meta:{},valid:!0}}return{meta:{},valid:!1}}function ct(e){var t=e;return/^DE[0-9]{9}$/.test(t)&&(t=t.substr(2)),/^[0-9]{9}$/.test(t)?{meta:{},valid:n(t)}:{meta:{},valid:!1}}function dt(e){var t=e;if(/^DK[0-9]{8}$/.test(t)&&(t=t.substr(2)),!/^[0-9]{8}$/.test(t))return{meta:{},valid:!1};for(var n=0,a=[2,7,6,5,4,3,2,1],r=0;r<8;r++)n+=parseInt(t.charAt(r),10)*a[r];return{meta:{},valid:n%11===0}}function ft(e){var t=e;if(/^EE[0-9]{9}$/.test(t)&&(t=t.substr(2)),!/^[0-9]{9}$/.test(t))return{meta:{},valid:!1};for(var n=0,a=[3,7,1,3,7,1,3,7,1],r=0;r<9;r++)n+=parseInt(t.charAt(r),10)*a[r];return{meta:{},valid:n%10===0}}function vt(e){var t=e;if(/^ES[0-9A-Z][0-9]{7}[0-9A-Z]$/.test(t)&&(t=t.substr(2)),!/^[0-9A-Z][0-9]{7}[0-9A-Z]$/.test(t))return{meta:{},valid:!1};var n=function(e){var t=parseInt(e.substr(0,8),10);return"".concat("TRWAGMYFPDXBNJZSQVHLCKE"[t%23])===e.substr(8,1)},a=function(e){var t=["XYZ".indexOf(e.charAt(0)),e.substr(1)].join(""),n="TRWAGMYFPDXBNJZSQVHLCKE"[parseInt(t,10)%23];return"".concat(n)===e.substr(8,1)},r=function(e){var t,n=e.charAt(0);if("KLM".indexOf(n)!==-1)return t=parseInt(e.substr(1,8),10),t="TRWAGMYFPDXBNJZSQVHLCKE"[t%23],"".concat(t)===e.substr(8,1);if("ABCDEFGHJNPQRSUVW".indexOf(n)!==-1){for(var a=[2,1,2,1,2,1,2],r=0,i=0,s=0;s<7;s++)i=parseInt(e.charAt(s+1),10)*a[s],i>9&&(i=Math.floor(i/10)+i%10),r+=i;return r=10-r%10,10===r&&(r=0),"".concat(r)===e.substr(8,1)||"JABCDEFGHI"[r]===e.substr(8,1)}return!1},i=t.charAt(0);return/^[0-9]$/.test(i)?{meta:{type:"DNI"},valid:n(t)}:/^[XYZ]$/.test(i)?{meta:{type:"NIE"},valid:a(t)}:{meta:{type:"CIF"},valid:r(t)}}function ht(e){var t=e;if(/^FI[0-9]{8}$/.test(t)&&(t=t.substr(2)),!/^[0-9]{8}$/.test(t))return{meta:{},valid:!1};for(var n=[7,9,10,5,8,4,2,1],a=0,r=0;r<8;r++)a+=parseInt(t.charAt(r),10)*n[r];return{meta:{},valid:a%11===0}}function pt(e){var n=e;if(/^FR[0-9A-Z]{2}[0-9]{9}$/.test(n)&&(n=n.substr(2)),!/^[0-9A-Z]{2}[0-9]{9}$/.test(n))return{meta:{},valid:!1};if(!t(n.substr(2)))return{meta:{},valid:!1};if(/^[0-9]{2}$/.test(n.substr(0,2)))return{meta:{},valid:n.substr(0,2)==="".concat(parseInt(n.substr(2)+"12",10)%97)};var a,r="0123456789ABCDEFGHJKLMNPQRSTUVWXYZ";return a=/^[0-9]$/.test(n.charAt(0))?24*r.indexOf(n.charAt(0))+r.indexOf(n.charAt(1))-10:34*r.indexOf(n.charAt(0))+r.indexOf(n.charAt(1))-100,{meta:{},valid:(parseInt(n.substr(2),10)+1+Math.floor(a/11))%11===a%11}}function mt(e){var t=e;if((/^GB[0-9]{9}$/.test(t)||/^GB[0-9]{12}$/.test(t)||/^GBGD[0-9]{3}$/.test(t)||/^GBHA[0-9]{3}$/.test(t)||/^GB(GD|HA)8888[0-9]{5}$/.test(t))&&(t=t.substr(2)),!(/^[0-9]{9}$/.test(t)||/^[0-9]{12}$/.test(t)||/^GD[0-9]{3}$/.test(t)||/^HA[0-9]{3}$/.test(t)||/^(GD|HA)8888[0-9]{5}$/.test(t)))return{meta:{},valid:!1};var n=t.length;if(5===n){var a=t.substr(0,2),r=parseInt(t.substr(2),10);return{meta:{},valid:"GD"===a&&r<500||"HA"===a&&r>=500}}if(11===n&&("GD8888"===t.substr(0,6)||"HA8888"===t.substr(0,6)))return"GD"===t.substr(0,2)&&parseInt(t.substr(6,3),10)>=500||"HA"===t.substr(0,2)&&parseInt(t.substr(6,3),10)<500?{meta:{},valid:!1}:{meta:{},valid:parseInt(t.substr(6,3),10)%97===parseInt(t.substr(9,2),10)};if(9===n||12===n){for(var i=[8,7,6,5,4,3,2,10,1],s=0,o=0;o<9;o++)s+=parseInt(t.charAt(o),10)*i[o];s%=97;var l=parseInt(t.substr(0,3),10)>=100?0===s||42===s||55===s:0===s;return{meta:{},valid:l}}return{meta:{},valid:!0}}function bt(e){var t=e;if(/^(GR|EL)[0-9]{9}$/.test(t)&&(t=t.substr(2)),!/^[0-9]{9}$/.test(t))return{meta:{},valid:!1};8===t.length&&(t="0".concat(t));for(var n=[256,128,64,32,16,8,4,2],a=0,r=0;r<8;r++)a+=parseInt(t.charAt(r),10)*n[r];return a=a%11%10,{meta:{},valid:"".concat(a)===t.substr(8,1)}}function gt(e){var t=e;return/^HR[0-9]{11}$/.test(t)&&(t=t.substr(2)),/^[0-9]{11}$/.test(t)?{meta:{},valid:n(t)}:{meta:{},valid:!1}}function yt(e){var t=e;if(/^HU[0-9]{8}$/.test(t)&&(t=t.substr(2)),!/^[0-9]{8}$/.test(t))return{meta:{},valid:!1};for(var n=[9,7,3,1,9,7,3,1],a=0,r=0;r<8;r++)a+=parseInt(t.charAt(r),10)*n[r];return{meta:{},valid:a%10===0}}function At(e){var t=e;if(/^IE[0-9][0-9A-Z\*\+][0-9]{5}[A-Z]{1,2}$/.test(t)&&(t=t.substr(2)),!/^[0-9][0-9A-Z\*\+][0-9]{5}[A-Z]{1,2}$/.test(t))return{meta:{},valid:!1};var n=function(e){for(var t=e;t.length<7;)t="0".concat(t);for(var n="WABCDEFGHIJKLMNOPQRSTUV",a=0,r=0;r<7;r++)a+=parseInt(t.charAt(r),10)*(8-r);return a+=9*n.indexOf(t.substr(7)),n[a%23]};return/^[0-9]+$/.test(t.substr(0,7))?{meta:{},valid:t.charAt(7)===n("".concat(t.substr(0,7)).concat(t.substr(8)))}:"ABCDEFGHIJKLMNOPQRSTUVWXYZ+*".indexOf(t.charAt(1))!==-1?{meta:{},valid:t.charAt(7)===n("".concat(t.substr(2,5)).concat(t.substr(0,1))) }:{meta:{},valid:!0}}function kt(e){var t=e;return/^IS[0-9]{5,6}$/.test(t)&&(t=t.substr(2)),{meta:{},valid:/^[0-9]{5,6}$/.test(t)}}function Et(e){var n=e;if(/^IT[0-9]{11}$/.test(n)&&(n=n.substr(2)),!/^[0-9]{11}$/.test(n))return{meta:{},valid:!1};if(0===parseInt(n.substr(0,7),10))return{meta:{},valid:!1};var a=parseInt(n.substr(7,3),10);return a<1||a>201&&999!==a&&888!==a?{meta:{},valid:!1}:{meta:{},valid:t(n)}}function It(e){var t=e;if(/^LT([0-9]{7}1[0-9]|[0-9]{10}1[0-9])$/.test(t)&&(t=t.substr(2)),!/^([0-9]{7}1[0-9]|[0-9]{10}1[0-9])$/.test(t))return{meta:{},valid:!1};var n,a=t.length,r=0;for(n=0;n3){for(i=0,s=[9,1,4,8,3,10,2,5,7,6,1],n=0;n9&&(a=0),{meta:{},valid:"".concat(a)===t.substr(8,1)}}function St(e){var t=e;if(/^NO[0-9]{9}$/.test(t)&&(t=t.substr(2)),!/^[0-9]{9}$/.test(t))return{meta:{},valid:!1};for(var n=[3,2,7,6,5,4,3,2],a=0,r=0;r<8;r++)a+=parseInt(t.charAt(r),10)*n[r];return a=11-a%11,11===a&&(a=0),{meta:{},valid:"".concat(a)===t.substr(8,1)}}function $t(e){var t=e;if(/^PL[0-9]{10}$/.test(t)&&(t=t.substr(2)),!/^[0-9]{10}$/.test(t))return{meta:{},valid:!1};for(var n=[6,5,7,2,3,4,5,6,7,-1],a=0,r=0;r<10;r++)a+=parseInt(t.charAt(r),10)*n[r];return{meta:{},valid:a%11===0}}function Tt(e){var t=e;if(/^PT[0-9]{9}$/.test(t)&&(t=t.substr(2)),!/^[0-9]{9}$/.test(t))return{meta:{},valid:!1};for(var n=[9,8,7,6,5,4,3,2],a=0,r=0;r<8;r++)a+=parseInt(t.charAt(r),10)*n[r];return a=11-a%11,a>9&&(a=0),{meta:{},valid:"".concat(a)===t.substr(8,1)}}function Nt(e){var t=e;if(/^RO[1-9][0-9]{1,9}$/.test(t)&&(t=t.substr(2)),!/^[1-9][0-9]{1,9}$/.test(t))return{meta:{},valid:!1};for(var n=t.length,a=[7,5,3,2,1,7,5,3,2].slice(10-n),r=0,i=0;i9&&(r%=10),{meta:{},valid:"".concat(r)===t.substr(9,1)}}if(12===t.length){var i=[7,2,4,10,3,5,9,4,6,8,0],s=[3,7,2,4,10,3,5,9,4,6,8,0],o=0,l=0;for(n=0;n<11;n++)o+=parseInt(t.charAt(n),10)*i[n],l+=parseInt(t.charAt(n),10)*s[n];return o%=11,o>9&&(o%=10),l%=11,l>9&&(l%=10),{meta:{},valid:"".concat(o)===t.substr(10,1)&&"".concat(l)===t.substr(11,1)}}return{meta:{},valid:!0}}function Mt(e){var n=e;return/^SE[0-9]{10}01$/.test(n)&&(n=n.substr(2)),/^[0-9]{10}01$/.test(n)?(n=n.substr(0,10),{meta:{},valid:t(n)}):{meta:{},valid:!1}}function Ht(e){var t=e.match(/^(SI)?([1-9][0-9]{7})$/);if(!t)return{meta:{},valid:!1};for(var n=t[1]?e.substr(2):e,a=[8,7,6,5,4,3,2],r=0,i=0;i<7;i++)r+=parseInt(n.charAt(i),10)*a[i];return r=11-r%11,10===r&&(r=0),{meta:{},valid:"".concat(r)===n.substr(7,1)}}function Dt(e){var t=e;return/^SK[1-9][0-9][(2-4)|(6-9)][0-9]{7}$/.test(t)&&(t=t.substr(2)),/^[1-9][0-9][(2-4)|(6-9)][0-9]{7}$/.test(t)?{meta:{},valid:parseInt(t,10)%11===0}:{meta:{},valid:!1}}function _t(e){var t=e;if(/^VE[VEJPG][0-9]{9}$/.test(t)&&(t=t.substr(2)),!/^[VEJPG][0-9]{9}$/.test(t))return{meta:{},valid:!1};for(var n={E:8,G:20,J:12,P:16,V:4},a=[3,2,7,6,5,4,3,2],r=n[t.charAt(0)],i=0;i<8;i++)r+=parseInt(t.charAt(i+1),10)*a[i];return r=11-r%11,11!==r&&10!==r||(r=0),{meta:{},valid:"".concat(r)===t.substr(9,1)}}function Lt(e){var t=e;return/^ZA4[0-9]{9}$/.test(t)&&(t=t.substr(2)),{meta:{},valid:/^4[0-9]{9}$/.test(t)}}function Rt(){var e=["AR","AT","BE","BG","BR","CH","CY","CZ","DE","DK","EE","EL","ES","FI","FR","GB","GR","HR","HU","IE","IS","IT","LT","LU","LV","MT","NL","NO","PL","PT","RO","RU","RS","SE","SK","SI","VE","ZA"];return{validate:function(t){var n=t.value;if(""===n)return{valid:!0};var a=Object.assign({},{message:""},t.options),r=n.substr(0,2);if(r="function"==typeof a.country?a.country.call(this):a.country,e.indexOf(r)===-1)return{valid:!0};var i={meta:{},valid:!0};switch(r.toLowerCase()){case"ar":i=nt(n);break;case"at":i=at(n);break;case"be":i=rt(n);break;case"bg":i=it(n);break;case"br":i=st(n);break;case"ch":i=ot(n);break;case"cy":i=lt(n);break;case"cz":i=ut(n);break;case"de":i=ct(n);break;case"dk":i=dt(n);break;case"ee":i=ft(n);break;case"el":i=bt(n);break;case"es":i=vt(n);break;case"fi":i=ht(n);break;case"fr":i=pt(n);break;case"gb":i=mt(n);break;case"gr":i=bt(n);break;case"hr":i=gt(n);break;case"hu":i=yt(n);break;case"ie":i=At(n);break;case"is":i=kt(n);break;case"it":i=Et(n);break;case"lt":i=It(n);break;case"lu":i=Ct(n);break;case"lv":i=wt(n);break;case"mt":i=Ot(n);break;case"nl":i=xt(n);break;case"no":i=St(n);break;case"pl":i=$t(n);break;case"pt":i=Tt(n);break;case"ro":i=Nt(n);break;case"rs":i=Ft(n);break;case"ru":i=Vt(n);break;case"se":i=Mt(n);break;case"si":i=Ht(n);break;case"sk":i=Dt(n);break;case"ve":i=_t(n);break;case"za":i=Lt(n)}var s=b(t.l10n?a.message||t.l10n.vat.country:a.message,t.l10n?t.l10n.vat.countries[r.toUpperCase()]:r.toUpperCase());return Object.assign({},{message:s},i)}}}function Bt(){return{validate:function(e){if(""===e.value)return{valid:!0};if(!/^[a-hj-npr-z0-9]{8}[0-9xX][a-hj-npr-z0-9]{8}$/i.test(e.value))return{valid:!1};for(var t=e.value.toUpperCase(),n={A:1,B:2,C:3,D:4,E:5,F:6,G:7,H:8,J:1,K:2,L:3,M:4,N:5,P:7,R:9,S:2,T:3,U:4,V:5,W:6,X:7,Y:8,Z:9,0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9},a=[8,7,6,5,4,3,2,10,0,9,8,7,6,5,4,3,2],r=t.length,i=0,s=0;s=0}function Jt(e,t){for(var n=e;n&&!Kt(n,t);)n=n.parentElement;return n}function zt(e,t){return e.classList?e.classList.contains(t):new RegExp("(^| )".concat(t,"( |$)"),"gi").test(e.className)}var Yt={luhn:t,mod11And10:n,mod37And36:a,verhoeff:r},Wt={AMERICAN_EXPRESS:{length:[15],prefix:["34","37"]},DANKORT:{length:[16],prefix:["5019"]},DINERS_CLUB:{length:[14],prefix:["300","301","302","303","304","305","36"]},DINERS_CLUB_US:{length:[16],prefix:["54","55"]},DISCOVER:{length:[16],prefix:["6011","622126","622127","622128","622129","62213","62214","62215","62216","62217","62218","62219","6222","6223","6224","6225","6226","6227","6228","62290","62291","622920","622921","622922","622923","622924","622925","644","645","646","647","648","649","65"]},ELO:{length:[16],prefix:["4011","4312","4389","4514","4573","4576","5041","5066","5067","509","6277","6362","6363","650","6516","6550"]},FORBRUGSFORENINGEN:{length:[16],prefix:["600722"]},JCB:{length:[16],prefix:["3528","3529","353","354","355","356","357","358"]},LASER:{length:[16,17,18,19],prefix:["6304","6706","6771","6709"]},MAESTRO:{length:[12,13,14,15,16,17,18,19],prefix:["5018","5020","5038","5868","6304","6759","6761","6762","6763","6764","6765","6766"]},MASTERCARD:{length:[16],prefix:["51","52","53","54","55"]},SOLO:{length:[16,18,19],prefix:["6334","6767"]},UNIONPAY:{length:[16,17,18,19],prefix:["622126","622127","622128","622129","62213","62214","62215","62216","62217","62218","62219","6222","6223","6224","6225","6226","6227","6228","62290","62291","622920","622921","622922","622923","622924","622925"]},VISA:{length:[16],prefix:["4"]},VISA_ELECTRON:{length:[16],prefix:["4026","417500","4405","4508","4844","4913","4917"]}},qt={between:g,blank:y,callback:k,choice:E,creditCard:I,date:w,different:O,digits:x,emailAddress:S,file:$,greaterThan:T,identical:N,integer:F,ip:V,lessThan:M,notEmpty:H,numeric:D,promise:_,regexp:L,remote:B,stringCase:P,stringLength:j,uri:Z,base64:G,bic:U,color:K,cusip:J,ean:z,ein:Y,grid:W,hex:q,iban:X,id:Be,imei:Pe,imo:je,isbn:Ze,isin:Ge,ismn:Ue,issn:Ke,mac:Je,meid:ze,phone:Ye,rtn:We,sedol:qe,siren:Xe,siret:Qe,step:et,uuid:tt,vat:Rt,vin:Bt,zipCode:Pt},Xt=function(){function e(t,n){i(this,e),this.elements={},this.ee=h(),this.filter=p(),this.plugins={},this.results=new Map,this.validators={},this.form=t,this.fields=n}return o(e,[{key:"on",value:function(e,t){return this.ee.on(e,t),this}},{key:"off",value:function(e,t){return this.ee.off(e,t),this}},{key:"emit",value:function(e){for(var t,n=arguments.length,a=new Array(n>1?n-1:0),r=1;r=0?t.splice(n,1):e.result.valid||n!==-1||t.push(e.validator),this.invalidFields.set(e.element,t)}},{key:"onFieldAdded",value:function(e){e.elements&&this.clearInvalidFields(e.elements)}},{key:"onElementNotValidated",value:function(e){this.clearInvalidFields(e.elements)}},{key:"onElementValidating",value:function(e){this.clearInvalidFields(e.elements)}},{key:"clearInvalidFields",value:function(e){var t=this;e.forEach(function(e){return t.invalidFields["delete"](e)})}}]),t}(Qt),vn=function(e){function t(e){var n;return i(this,t),n=v(this,c(t).call(this,e)),n.isFormValid=!1,n.opts=Object.assign({},{aspNetButton:!1,selector:'[type="submit"]:not([formnovalidate])'},e),n.submitHandler=n.handleSubmitEvent.bind(f(n)),n.buttonClickHandler=n.handleClickEvent.bind(f(n)),n}return u(t,e),o(t,[{key:"install",value:function(){var e=this;if(this.core.getFormElement()instanceof HTMLFormElement){var t=this.core.getFormElement();this.selectorButtons=[].slice.call(t.querySelectorAll(this.opts.selector)),this.submitButtons=[].slice.call(t.querySelectorAll('[type="submit"]')),t.setAttribute("novalidate","novalidate"),t.addEventListener("submit",this.submitHandler),this.hiddenClickedEle=document.createElement("input"),this.hiddenClickedEle.setAttribute("type","hidden"),t.appendChild(this.hiddenClickedEle),this.submitButtons.forEach(function(t){t.addEventListener("click",e.buttonClickHandler)})}}},{key:"uninstall",value:function(){var e=this,t=this.core.getFormElement();t instanceof HTMLFormElement&&t.removeEventListener("submit",this.submitHandler),this.submitButtons.forEach(function(t){t.removeEventListener("click",e.buttonClickHandler)}),this.hiddenClickedEle.parentElement.removeChild(this.hiddenClickedEle)}},{key:"handleSubmitEvent",value:function(e){this.validateForm(e)}},{key:"handleClickEvent",value:function(e){var t=e.currentTarget;if(t instanceof HTMLElement&&this.selectorButtons.indexOf(t)!==-1)if(this.opts.aspNetButton&&this.isFormValid===!0);else{var n=this.core.getFormElement();n.removeEventListener("submit",this.submitHandler),this.clickedButton=e.target;var a=this.clickedButton.getAttribute("name"),r=this.clickedButton.getAttribute("value");a&&r&&(this.hiddenClickedEle.setAttribute("name",a),this.hiddenClickedEle.setAttribute("value",r)),this.validateForm(e)}}},{key:"validateForm",value:function(e){var t=this;e.preventDefault(),this.core.validate().then(function(e){"Valid"===e&&t.opts.aspNetButton&&!t.isFormValid&&t.clickedButton&&(t.isFormValid=!0,t.clickedButton.removeEventListener("click",t.buttonClickHandler),t.clickedButton.click())})}}]),t}(Qt),hn=function(e){function t(e){var n;return i(this,t),n=v(this,c(t).call(this,e)),n.messages=new Map,n.opts=Object.assign({},{placement:"top",trigger:"click"},e),n.iconPlacedHandler=n.onIconPlaced.bind(f(n)),n.validatorValidatedHandler=n.onValidatorValidated.bind(f(n)),n.elementValidatedHandler=n.onElementValidated.bind(f(n)),n.documentClickHandler=n.onDocumentClicked.bind(f(n)),n}return u(t,e),o(t,[{key:"install",value:function(){this.tip=document.createElement("div"),Ut(this.tip,l({"fv-plugins-tooltip":!0},"fv-plugins-tooltip--".concat(this.opts.placement),!0)),document.body.appendChild(this.tip),this.core.on("plugins.icon.placed",this.iconPlacedHandler).on("core.validator.validated",this.validatorValidatedHandler).on("core.element.validated",this.elementValidatedHandler),"click"===this.opts.trigger&&document.addEventListener("click",this.documentClickHandler)}},{key:"uninstall",value:function(){this.messages.clear(),document.body.removeChild(this.tip),this.core.off("plugins.icon.placed",this.iconPlacedHandler).off("core.validator.validated",this.validatorValidatedHandler).off("core.element.validated",this.elementValidatedHandler),"click"===this.opts.trigger&&document.removeEventListener("click",this.documentClickHandler)}},{key:"onIconPlaced",value:function(e){var t=this;switch(Ut(e.iconElement,{"fv-plugins-tooltip-icon":!0}),this.opts.trigger){case"hover":e.iconElement.addEventListener("mouseenter",function(n){return t.show(e.element,n)}),e.iconElement.addEventListener("mouseleave",function(e){return t.hide()});break;case"click":default:e.iconElement.addEventListener("click",function(n){return t.show(e.element,n)})}}},{key:"onValidatorValidated",value:function(e){if(!e.result.valid){var t=e.elements,n=e.element.getAttribute("type"),a="radio"===n||"checkbox"===n?t[0]:e.element,r="string"==typeof e.result.message?e.result.message:e.result.message[this.core.getLocale()];this.messages.set(a,r)}}},{key:"onElementValidated",value:function(e){if(e.valid){var t=e.elements,n=e.element.getAttribute("type"),a="radio"===n||"checkbox"===n?t[0]:e.element;this.messages["delete"](a)}}},{key:"onDocumentClicked",value:function(e){this.hide()}},{key:"show",value:function(e,t){if(t.preventDefault(),t.stopPropagation(),this.messages.has(e)){Ut(this.tip,{"fv-plugins-tooltip--hide":!1}),this.tip.innerHTML=''.concat(this.messages.get(e),"");var n=t.target,a=n.getBoundingClientRect(),r=0,i=0;switch(this.opts.placement){case"top":default:r=a.top-a.height,i=a.left+a.width/2-this.tip.clientWidth/2;break;case"top-left":r=a.top-a.height,i=a.left;break;case"top-right":r=a.top-a.height,i=a.left+a.width-this.tip.clientWidth;break;case"bottom":r=a.top+a.height,i=a.left+a.width/2-this.tip.clientWidth/2;break;case"bottom-left":r=a.top+a.height,i=a.left;break;case"bottom-right":r=a.top+a.height,i=a.left+a.width-this.tip.clientWidth;break;case"left":r=a.top+a.height/2-this.tip.clientHeight/2,i=a.left-this.tip.clientWidth;break;case"right":r=a.top+a.height/2-this.tip.clientHeight/2,i=a.left+a.width}var s=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,o=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0;r+=s,i+=o,this.tip.setAttribute("style","top: ".concat(r,"px; left: ").concat(i,"px"))}}},{key:"hide",value:function(){Ut(this.tip,{"fv-plugins-tooltip--hide":!0})}}]),t}(Qt),pn=function(e){function t(e){var n;i(this,t),n=v(this,c(t).call(this,e)),n.handlers=[],n.timers=new Map,n.ieVersion=function(){for(var e=3,t=document.createElement("div"),n=t.all||[];t.innerHTML="",n[0];);return e>4?e:document.documentMode}();var a=document.createElement("div");return n.defaultEvent=9!==n.ieVersion&&"oninput"in a?"input":"keyup",n.opts=Object.assign({},{delay:0,event:n.defaultEvent,threshold:0},e),n.fieldAddedHandler=n.onFieldAdded.bind(f(n)),n.fieldRemovedHandler=n.onFieldRemoved.bind(f(n)),n}return u(t,e),o(t,[{key:"install",value:function(){this.core.on("core.field.added",this.fieldAddedHandler).on("core.field.removed",this.fieldRemovedHandler)}},{key:"uninstall",value:function(){this.handlers.forEach(function(e){return e.element.removeEventListener(e.event,e.handler)}),this.handlers=[],this.timers.forEach(function(e){return window.clearTimeout(e)}),this.timers.clear(),this.core.off("core.field.added",this.fieldAddedHandler).off("core.field.removed",this.fieldRemovedHandler)}},{key:"prepareHandler",value:function(e,t){var n=this;t.forEach(function(t){var a=[];switch(!0){case!!n.opts.event&&n.opts.event[e]===!1:a=[];break;case!!n.opts.event&&!!n.opts.event[e]:a=n.opts.event[e].split(" ");break;case"string"==typeof n.opts.event&&n.opts.event!==n.defaultEvent:a=n.opts.event.split(" ");break;default:var r=t.getAttribute("type"),i=t.tagName.toLowerCase(),s="radio"===r||"checkbox"===r||"file"===r||"select"===i?"change":n.ieVersion>=10&&t.getAttribute("placeholder")?"keyup":n.defaultEvent;a=[s]}a.forEach(function(a){var r=function(a){return n.handleEvent(a,e,t)};n.handlers.push({element:t,event:a,field:e,handler:r}),t.addEventListener(a,r)})})}},{key:"handleEvent",value:function(e,t,n){var a=this;if(this.exceedThreshold(t,n)&&this.core.executeFilter("plugins-trigger-should-validate",!0,[t,n])){var r=function(){return a.core.validateElement(t,n).then(function(r){a.core.emit("plugins.trigger.executed",{element:n,event:e,field:t})})},i=this.opts.delay[t]||this.opts.delay;if(0===i)r();else{var s=this.timers.get(n);s&&window.clearTimeout(s),this.timers.set(n,window.setTimeout(r,1e3*i))}}}},{key:"onFieldAdded",value:function(e){this.handlers.filter(function(t){return t.field===e.field}).forEach(function(e){return e.element.removeEventListener(e.event,e.handler)}),this.prepareHandler(e.field,e.elements)}},{key:"onFieldRemoved",value:function(e){this.handlers.filter(function(t){return t.field===e.field&&e.elements.indexOf(t.element)>=0}).forEach(function(e){return e.element.removeEventListener(e.event,e.handler)})}},{key:"exceedThreshold",value:function(e,t){var n=0!==this.opts.threshold[e]&&0!==this.opts.threshold&&(this.opts.threshold[e]||this.opts.threshold);if(!n)return!0;var a=t.getAttribute("type");if(["button","checkbox","file","hidden","image","radio","reset","submit"].indexOf(a)!==-1)return!0;var r=this.core.getElementValue(e,t);return r.length>=n}}]),t}(Qt),mn={Alias:tn,Aria:nn,Declarative:an,DefaultSubmit:rn,Dependency:sn,Excluded:on,FieldStatus:ln,Framework:cn,Icon:dn,Message:un,Sequence:fn,SubmitButton:vn,Tooltip:hn,Trigger:pn},bn={call:A,classSet:Ut,closest:Jt,fetch:R,format:b,hasClass:zt,isValidDate:C},gn={};e.Plugin=Qt,e.algorithms=Yt,e.filters=en,e.formValidation=jt,e.locales=gn,e.plugins=mn,e.utils=bn,e.validators=qt,Object.defineProperty(e,"__esModule",{value:!0})}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self,e.FormValidation=e.FormValidation||{},e.FormValidation.plugins=e.FormValidation.plugins||{},e.FormValidation.plugins.Bootstrap=t())}(this,function(){"use strict";function e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function t(e,t){for(var n=0;nr?{valid:!0}:{valid:!1,message:a}}}},equalThan=function(){return{validate:function(e){var t=e.value,n=e.options,a=n.message,r=parseInt(n.number);return t=""==t?0:parseInt(String(t).replace(/,/g,"")),"undefined"!=typeof n.field&&(r=parseInt(String($("[name="+n.field+"]").val()).replace(/,/g,""))),"undefined"==typeof a&&(a="The value is not equal"),t==r?{valid:!0}:{valid:!1,message:a}}}},groupEqualThan=function(){return{validate:function(e){var t,n,a=(e.value,e.options),r=0,i=a.message,s="undefined"!=typeof a.zero&&(a.zero===!0||"true"===a.zero),o=$("input[data-fv-group-equal-than___group='"+a.group+"']:visible");return n=1==$("form").length?fv:fv[o.closest("form").attr("id")],t="undefined"==typeof a.field?parseInt(a.number):parseInt($("[name='"+a.field+"']").val().unformatMoney()),o.each(function(){isNaN(parseInt($(this).val().unformatMoney()))||(r+=parseInt($(this).val().unformatMoney()))}),r==t?(o.each(function(){s?n.updateFieldStatus($(this).attr("name"),"Valid","groupEqualThan"):0!==$(this).val().unformatMoney()&&$(this).val()?n.updateFieldStatus($(this).attr("name"),"Valid","groupEqualThan"):n.updateFieldStatus($(this).attr("name"),"Invalid","groupEqualThan")}),{valid:!0}):(o.each(function(){n.updateFieldStatus($(this).attr("name"),"Invalid","groupEqualThan")}),{valid:!1,message:i})}}},groupBiggerThan=function(){return{validate:function(e){var t,n,a=(e.value,e.options),r=0,i=a.message,s="undefined"!=typeof a.zero&&(a.zero===!0||"true"===a.zero),o="undefined"!=typeof a.equal&&(a.equal===!0||"true"===a.equal),l=$("input[data-fv-group-bigger-than___group='"+a.group+"']:visible");n=1==$("form").length?fv:fv[l.closest("form").attr("id")],t="undefined"==typeof a.field?parseInt(a.number):parseInt($("[name='"+a.field+"']").val().unformatMoney()),l.each(function(){isNaN(parseInt($(this).val().unformatMoney()))||""!=$(this).val()&&(r+=parseInt($(this).val().unformatMoney()))});var u=o?r>=t:r>t;return u?(l.each(function(){s?n.updateFieldStatus($(this).attr("name"),"Valid","groupBiggerThan"):0!==$(this).val().unformatMoney()&&$(this).val()?n.updateFieldStatus($(this).attr("name"),"Valid","groupBiggerThan"):n.updateFieldStatus($(this).attr("name"),"Invalid","groupBiggerThan")}),{valid:!0}):(l.each(function(){n.updateFieldStatus($(this).attr("name"),"Invalid","groupBiggerThan")}),{valid:!1,message:i})}}},groupSmallerThan=function(){return{validate:function(e){var t,n,a=(e.value,e.options),r=0,i=a.message,s="undefined"!=typeof a.zero&&(a.zero===!0||"true"===a.zero),o="undefined"!=typeof a.equal&&(a.equal===!0||"true"===a.equal),l=$("input[data-fv-group-smaller-than___group='"+a.group+"']:visible");n=1==$("form").length&&fv.hasOwnProperty("validators")?fv:fv[l.closest("form").attr("id")],t="undefined"==typeof a.field?parseInt(a.number):parseInt($("[name='"+a.field+"']").val().unformatMoney()),l.each(function(){isNaN(parseInt($(this).val().unformatMoney()))||""!=$(this).val()&&(r+=parseInt($(this).val().unformatMoney()))});var u=o?r<=t:r