1(()=>{"use strict";const t=t=>{const e=t.trim().match(/^([a-z][0-9a-z:_-]*)((?:\[\s*(?:[a-z][0-9a-z:_-]*|[0-9]*)\s*\])*)$/i);if(!e)return[];const o=e[1],i=e[2].match(/\[.*?\]/gi);return i?[o,...i.map(t=>t.slice(1,-1).trim())]:[o]};function e(){this.trunk={},this.largestIndex=0}e.prototype={filter(t){if(!(t instanceof Function))throw new TypeError("'callback' is not a function");const o=new e;for(let[i,r]of Object.entries(this.trunk))r instanceof e?(r=r.filter(t),r.size&&o.set(i,r)):t(r)&&o.set(i,r);return o},getAll(o,i="string"){const r=t(o);if(!r.length)return{};let s,n=this;for("string"===i?n=n.filter(t=>"string"==typeof t):"file"===i&&(n=n.filter(t=>t instanceof File));s=r.shift();){if(/^[0-9]*$/.test(s)||void 0===n.trunk[s])return{};n=n.trunk[s]}return n instanceof e?n.valueOf():{0:n}},getAllFiles(t){return this.getAll(t,"file")},set(t,o){return(o=e.excludeBlank(o))?(""===t?t=this.largestIndex++:/^[0-9]+$/.test(t)&&(t=parseInt(t),this.largestIndex<=t&&(this.largestIndex=t+1)),this.trunk[t.toString()]=o,this):this},valueOf(){const t={};for(let[e,o]of Object.entries(this.trunk))t[e]=o.valueOf();return t},get size(){return Object.keys(this.trunk).length}},e.excludeBlank=t=>{if(t instanceof e)return t;if(t instanceof Blob){if(t.size)return t}else if(t=t.toString().trim())return t},e.from=o=>{if(!(o instanceof FormData))throw new TypeError("'formData' is not a FormData object");const i=new e;for(let[r,s]of o){const o=t(r);if(!o.length)continue;if(s=e.excludeBlank(s),!s)continue;const n=o.pop();o.reduce((t,o)=>{if(t.trunk[o]instanceof e)return t.trunk[o];const i=new e;return t.set(o,i),i},i).set(n,s)}return i};const o=t=>{const e=[];if(Object===t.constructor)for(const i of Object.values(t))e.push(...o(i));else if(t instanceof Map)for(const[i,r]of t)e.push(...o(r));else if(Array.isArray(t))for(const i of t)e.push(...o(i));else e.push(t);return e};function i(t,e={}){Error.call(this,t.error??""),this.cause=e.cause,this.rule=t}function r(){}function s(){r.call(this),this.rules=[]}function n(t){s.call(this),this.field=t.field,this.error=t.error}function a(t){s.call(this),this.field=t.field,this.error=t.error}function l(t){r.call(this),this.field=t.field,this.error=t.error}function p(t){r.call(this),this.field=t.field,this.error=t.error,this.accept=t.accept}function c(t){r.call(this),this.field=t.field,this.error=t.error}function h(t){r.call(this),this.field=t.field,this.error=t.error,this.accept=t.accept}function f(t){r.call(this),this.field=t.field,this.error=t.error,this.accept=t.accept}function d(t){r.call(this),this.field=t.field,this.error=t.error,this.threshold=t.threshold}function u(t){r.call(this),this.field=t.field,this.error=t.error,this.threshold=t.threshold}function m(t){r.call(this),this.field=t.field,this.error=t.error,this.threshold=t.threshold}function g(t){r.call(this),this.field=t.field,this.error=t.error,this.threshold=t.threshold}function y(t){r.call(this),this.field=t.field,this.error=t.error}function v(t){r.call(this),this.field=t.field,this.error=t.error,this.threshold=t.threshold}function w(t){r.call(this),this.field=t.field,this.error=t.error,this.threshold=t.threshold}function x(t){r.call(this),this.field=t.field,this.error=t.error,this.threshold=t.threshold}function b(t){r.call(this),this.field=t.field,this.error=t.error,this.threshold=t.threshold}function E(t){r.call(this),this.field=t.field,this.error=t.error,this.threshold=t.threshold}function O(t){r.call(this),this.field=t.field,this.error=t.error,this.threshold=t.threshold}function N(t){r.call(this),this.field=t.field,this.error=t.error}function A(t){r.call(this),this.field=t.field,this.error=t.error}function j(t){r.call(this),this.field=t.field,this.error=t.error,this.base=t.base,this.interval=t.interval}function M(t){r.call(this),this.field=t.field,this.error=t.error}function L(t){r.call(this),this.field=t.field,this.error=t.error}function R(t){r.call(this),this.field=t.field,this.error=t.error}i.prototype={get name(){return"InvalidityException"},get message(){return this.cause instanceof i?this.cause.message:this.rule.error??""},get field(){return this.cause instanceof i?this.cause.field:this.rule.field??""}},Object.setPrototypeOf(i.prototype,Error.prototype),r.prototype={matches:t=>!0,validate:(t,e)=>!0,toJSON(){const t=[];
1return Object.entries(this).forEach(([e,o])=>{t.push([e,o])}),this.constructor.RULE_NAME&&t.unshift(["rule",this.constructor.RULE_NAME]),Object.fromEntries(t)}},s.prototype={addRule(t){if(!(t instanceof r))throw new TypeError("'rule' is not a rule object");return this.rules.push(t),!0},toJSON(){const t=[];return Object.entries(this).forEach(([e,o])=>{"rules"===e?t.push([e,o.map(t=>t.toJSON())]):t.push([e,o])}),this.constructor.RULE_NAME&&t.unshift(["rule",this.constructor.RULE_NAME]),Object.fromEntries(t)}},Object.setPrototypeOf(s.prototype,r.prototype),n.RULE_NAME="all",n.prototype={validate(t,e){const o=(this.rules??[]).filter(t=>t.matches(e));if(!o.length)return!0;for(const r of o)try{r.validate(t,e)}catch(t){throw t instanceof i?new i(this,{cause:t}):t}return!0}},Object.setPrototypeOf(n.prototype,s.prototype),a.RULE_NAME="any",a.prototype={validate(t,e){const o=(this.rules??[]).filter(t=>t.matches(e));if(!o.length)return!0;let r=null;for(const s of o){try{r=!0,s.validate(t,e)}catch(t){if(!(t instanceof i))throw t;r=!1}if(r)break}if(!1===r)throw new i(this);return!0}},Object.setPrototypeOf(a.prototype,s.prototype),l.RULE_NAME="date",l.prototype={validate(t,e){const r=o(t.getAll(this.field));if(!r.length)return!0;for(const t of r)if(!l.isDate(t))throw new i(this,{cause:t});return!0}},Object.setPrototypeOf(l.prototype,r.prototype),l.isDate=t=>{const e=/^(?<y>[0-9]{4,})-(?<m>[0-9]{2})-(?<d>[0-9]{2})$/.exec(t);if(null===e)return!1;const o=new Date(t);return!Number.isNaN(o.valueOf())&&e.groups.y==o.getFullYear()&&e.groups.m==o.getMonth()+1&&e.groups.d==o.getDate()},p.RULE_NAME="dayofweek",p.prototype={validate(t,e){const r=o(t.getAll(this.field));if(!r.length)return!0;const s=t=>0===t?7:t;for(const t of r)if(l.isDate(t)){const e=s(new Date(t).getDay());if(!this.accept?.map(String).includes(String(e)))throw new i(this,{cause:t})}return!0}},Object.setPrototypeOf(p.prototype,r.prototype),c.RULE_NAME="email",c.prototype={validate(t,e){const r=o(t.getAll(this.field));if(!r.length)return!0;for(const t of r)if(!c.isEmail(t))throw new i(this,{cause:t});return!0}},Object.setPrototypeOf(c.prototype,r.prototype),c.isEmail=t=>{if(t.length<6)return!1;if(-1===t.indexOf("@",1))return!1;if(t.indexOf("@")!==t.lastIndexOf("@"))return!1;const[e,o]=t.split("@",2);if(!/^[a-zA-Z0-9!#$%&\'*+\/=?^_`{|}~\.-]+$/.test(e))return!1;if(/\.{2,}/.test(o))return!1;if(/(?:^[ \t\n\r\0\x0B.]|[ \t\n\r\0\x0B.]$)/.test(o))return!1;const i=o.split(".");if(i.length<2)return!1;for(const t of i){if(/(?:^[ \t\n\r\0\x0B-]|[ \t\n\r\0\x0B-]$)/.test(t))return!1;if(!/^[a-z0-9-]+$/i.test(t))return!1}return!0},h.RULE_NAME="enum",h.prototype={validate(t,e){const r=o(t.getAll(this.field));if(!r.length)return!0;for(const t of r)if(!this.accept?.map(String).includes(t))throw new i(this,{cause:t});return!0}},Object.setPrototypeOf(h.prototype,r.prototype),f.RULE_NAME="file",f.prototype={validate(t,e){const r=o(t.getAllFiles(this.field));if(!r.length)return!0;const s=t=>t instanceof File&&this.accept?.some(e=>/^\.[a-z0-9]+$/i.test(e)?t.name.toLowerCase().endsWith(e.toLowerCase()):f.convertMimeToExt(e).some(e=>(e="."+e.trim(),t.name.toLowerCase().endsWith(e.toLowerCase()))));for(const t of r)if(!s(t))throw new i(this,{cause:t});return!0}},Object.setPrototypeOf(f.prototype,r.prototype),f.mimeTypes=new Map([["application/java",["class"]],["application/javascript",["js"]],["application/msword",["doc"]],["application/octet-stream",["psd","xcf"]],["application/onenote",["onetoc","onetoc2","onetmp","onepkg"]],["application/oxps",["oxps"]],["application/pdf",["pdf"]],["application/rar",["rar"]],["application/rtf",["rtf"]],["application/ttaf+xml",["dfxp"]],["application/vnd.apple.keynote",["key"]],["application/vnd.apple.numbers",["numbers"]],["application/vnd.apple.pages",["pages"]],["application/vnd.ms-access",["mdb"]],["application/vnd.ms-excel",["xla","xls","xlt","xlw"]],["application/vnd.ms-excel.addin.macroEnabled.12",["xlam"]],["application/vnd.ms-excel.sheet.binary.macroEnabled.12",["xlsb"]],["application/vnd.ms-excel.sheet.macroEnabled.12",["xlsm"]],["application/vnd.ms-excel.template.macroEnabled.12",["xltm"]],["a
1pplication/vnd.ms-powerpoint",["pot","pps","ppt"]],["application/vnd.ms-powerpoint.addin.macroEnabled.12",["ppam"]],["application/vnd.ms-powerpoint.presentation.macroEnabled.12",["pptm"]],["application/vnd.ms-powerpoint.slide.macroEnabled.12",["sldm"]],["application/vnd.ms-powerpoint.slideshow.macroEnabled.12",["ppsm"]],["application/vnd.ms-powerpoint.template.macroEnabled.12",["potm"]],["application/vnd.ms-project",["mpp"]],["application/vnd.ms-word.document.macroEnabled.12",["docm"]],["application/vnd.ms-word.template.macroEnabled.12",["dotm"]],["application/vnd.ms-write",["wri"]],["application/vnd.ms-xpsdocument",["xps"]],["application/vnd.oasis.opendocument.chart",["odc"]],["application/vnd.oasis.opendocument.database",["odb"]],["application/vnd.oasis.opendocument.formula",["odf"]],["application/vnd.oasis.opendocument.graphics",["odg"]],["application/vnd.oasis.opendocument.presentation",["odp"]],["application/vnd.oasis.opendocument.spreadsheet",["ods"]],["application/vnd.oasis.opendocument.text",["odt"]],["application/vnd.openxmlformats-officedocument.presentationml.presentation",["pptx"]],["application/vnd.openxmlformats-officedocument.presentationml.slide",["sldx"]],["application/vnd.openxmlformats-officedocument.presentationml.slideshow",["ppsx"]],["application/vnd.openxmlformats-officedocument.presentationml.template",["potx"]],["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",["xlsx"]],["application/vnd.openxmlformats-officedocument.spreadsheetml.template",["xltx"]],["application/vnd.openxmlformats-officedocument.wordprocessingml.document",["docx"]],["application/vnd.openxmlformats-officedocument.wordprocessingml.template",["dotx"]],["application/wordperfect",["wp","wpd"]],["application/x-7z-compressed",["7z"]],["application/x-gzip",["gz","gzip"]],["application/x-msdownload",["exe"]],["application/x-shockwave-flash",["swf"]],["application/x-tar",["tar"]],["application/zip",["zip"]],["audio/3gpp",["3gp","3gpp"]],["audio/3gpp2",["3g2","3gp2"]],["audio/aac",["aac"]],["audio/flac",["flac"]],["audio/midi",["mid","midi"]],["audio/mpeg",["mp3","m4a","m4b"]],["audio/ogg",["ogg","oga"]],["audio/wav",["wav","x-wav"]],["audio/x-matroska",["mka"]],["audio/x-ms-wax",["wax"]],["audio/x-ms-wma",["wma"]],["audio/x-realaudio",["ra","ram"]],["image/avif",["avif"]],["image/bmp",["bmp"]],["image/gif",["gif"]],["image/heic",["heic"]],["image/heic-sequence",["heic","heics"]],["image/heif",["heic","heif"]],["image/heif-sequence",["heic","heifs"]],["image/jpeg",["jpg","jpeg","jpe"]],["image/png",["png"]],["image/tiff",["tiff","tif"]],["image/webp",["webp"]],["image/x-icon",["ico"]],["text/calendar",["ics"]],["text/css",["css"]],["text/csv",["csv"]],["text/html",["htm","html"]],["text/plain",["txt","asc","c","cc","h","srt"]],["text/richtext",["rtx"]],["text/tab-separated-values",["tsv"]],["text/vtt",["vtt"]],["video/3gpp",["3gp","3gpp"]],["video/3gpp2",["3g2","3gp2"]],["video/avi",["avi"]],["video/divx",["divx"]],["video/mp4",["mp4","m4v"]],["video/mpeg",["mpeg","mpg","mpe"]],["video/ogg",["ogv"]],["video/quicktime",["mov","qt"]],["video/webm",["webm"]],["video/x-flv",["flv"]],["video/x-matroska",["mkv"]],["video/x-ms-asf",["asf","asx"]],["video/x-ms-wm",["wm"]],["video/x-ms-wmv",["wmv"]],["video/x-ms-wmx",["wmx"]]]),f.convertMimeToExt=t=>{const e=[],o=t.match(/^(?<toplevel>[a-z]+)\/(?<sub>[*]|[a-z0-9.+-]+)$/i);if(o){const t=o.groups.toplevel.toLowerCase(),i=o.groups.sub.toLowerCase();for(const[r,s]of f.mimeTypes)(r===o[0]||"*"===i&&r.startsWith(t+"/"))&&e.push(...s)}return e},d.RULE_NAME="maxdate",d.prototype={validate(t,e){const r=o(t.getAll(this.field));if(!r.length||!l.isDate(this.threshold))return!0;for(const t of r)if(l.isDate(t)&&this.threshold<t)throw new i(this,{cause:t});return!0}},Object.setPrototypeOf(d.prototype,r.prototype),u.RULE_NAME="maxfilesize",u.prototype={validate(t,e){const r=o(t.getAllFiles(this.field));if(!r.length)return!0;const s=parseInt(this.threshold),n=r.reduce((t,e)=>(e instanceof File&&(t+=e.size),t),0);if(!Number.isNaN(s)&&s<n)throw new i(this,{cause:n});return!0}},Object.setPrototypeOf(u.prototype,r.prototype),m.RULE_NAME="maxitems",m.prototype={validate(t,e){const r=o(t.getAll(this.field));if(!r.length)return!0;const s=parseInt(this.threshold);if(!Number.isNaN(s)&&s<r.length)throw new i(this,{cause:r.length});return!0}},Object.setPrototypeOf(m.prototype,r.prototype),g.RULE_NAME="maxlength",g.prototype={validate(t,e){const r=o(t.getAll(this.field));if(!r.length)return!0;const s=parseInt(this.threshold),n=r.reduce((t,e)=>t+e.length,0);if(!Number.isNaN(s)&&s<n)throw new i(this,{cause:n});return!0}},Object.setPrototypeOf(g.prototype,r.prototype),y.RULE_NAME="number",y.prototype={validate(t,e){const r=o(t.getAll(this.field));if(!r.length)return!0;for(const t of r)if(!y.isNumber(t))throw new i(this,{cause:t});return!0}},Object.setPrototypeOf(y.prototype,r.prototype),y.isNumber=t=>!!/^[-]?[0-9]+(?:[eE][+-]?[0-9]+)?$/.test(t)||!!/^[-]?(?:[0-9]+)?[.][0-9]+(?:[eE][+-]?[0-9]+)?$/.test(t),v.RULE_NAME="maxnumber",v.prototype={validate(t,e){const r=o(t.getAll(this.field));if(!r.length)return!0;const s=parseFloat(this.threshold);if(Number.isNaN(s))return!0;for(const t of r)if(y.isNumber(t)&&s<parseFloat(t))throw new i(this,{cause:t});return!0}},Object.setPrototypeOf(v.prototype,r.prototype),w.RULE_NAME="mindate",w.prototype={validate(t,e){const r=o(t.getAll(this.field));if(!r.length||!l.isDate(this.threshold))return!0;for(const t of r)if(l.isDate(t)&&t<this.threshold)throw new i(this,{cause:t});return!0}},Object.setPrototypeOf(w.prototype,r.prototype),x.RULE_NAME="minfilesize",x.prototype={validate(t,e){const r=o(t.getAllFiles(this.field));if(!r.length)return!0;const s=parseInt(this.threshold),n=r.reduce((t,e)=>(e instanceof File&&(t+=e.size),t),0);if(!Number.isNaN(s)&&n<s)throw new i(this,{cause:n});return!0}},Object.setPrototypeOf(x.prototype,r.prototype),b.RULE_NAME="minitems",b.prototype={validate(t,e){const r=o(t.getAll(this.field));if(!r.length)return!0;const s=parseInt(this.threshold);if(!Number.isNaN(s)&&r.length<s)throw new i(this,{cause:r.length});return!0}},Object.setPrototypeOf(b.prototype,r.prototype),E.RULE_NAME="minlength",E.prototype={validate(t,e){const r=o(t.getAll(this.field));if(!r.length)return!0;const s=parseInt(this.threshold),n=r.reduce((t,e)=>t+e.length,0);if(!Number.isNaN(s)&&n<s)throw new i(this,{cause:n});return!0}},Object.setPrototypeOf(E.prototype,r.prototype),O.RULE_NAME="minnumber",O.prototype={validate(t,e){const r=o(t.getAll(this.field));if(!r.length)return!0;const s=parseFloat(this.threshold);if(Number.isNaN(s))return!0;for(const t of r)if(y.isNumber(t)&&parseFloat(t)<s)throw new i(this,{cause:t});return!0}},Object.setPrototypeOf(O.prototype,r.prototype),N.RULE_NAME="required",N.prototype={validate(t,e){if(!o(t.getAll(this.field)).length)throw new i(this);return!0}},Object.setPrototypeOf(N.prototype,r.prototype),A.RULE_NAME="requiredfile",A.prototype={validate(t,e){if(!o(t.getAllFiles(this.field)).length)throw new i(this);return!0}},Object.setPrototypeOf(A.prototype,r.prototype),j.RULE_NAME="stepnumber",j.prototype={validate(t,e){const r=o(t.getAll(this.field));if(!r.length)return!0;const s=parseFloat(this.base),n=parseFloat(this.interval);if(Number.isNaN(s)||Number.isNaN(n)||!(0<n))return!0;const a=t=>{const e=(parseFloat(t)-s)%n;return"0.000000"===Math.abs(e).toFixed(6)||"0.000000"===Math.abs(e-n).toFixed(6)};for(const t of r)if(y.isNumber(t)&&!a(t))throw new i(this,{cause:t});return!0}},Object.setPrototypeOf(j.prototype,r.prototype),M.RULE_NAME="tel",M.prototype={validate(t,e){const r=o(t.getAll(this.field));if(!r.length)return!0;for(const t of r)if(!M.isTel(t))throw new i(this,{cause:t});return!0}},Object.setPrototypeOf(M.prototype,r.prototype),M.isTel=t=>(((t=(t=t.replace(/[#*].*$/,"")).replaceAll(/[()/.*#\s-]+/g,"")).startsWith("+")||t.startsWith("00"))&&(t=`+${t.replace(/^[+0]+/,"")}`),!!/^[+]?[0-9]+$/.test(t)&&5<t.length&&t.length<16),L.RULE_NAME="time",L.prototype={validate(t,e){const r=o(t.getAll(this.field));if(!r.length)return!0;for(const t of r)if(!L.isTime(t))throw new i(this,{cause:t});return!0}},Object.setPrototypeOf(L.prototype,r.prototype),L.isTime=t=>{const e=t.match(/^([0-9]{2})\:([0-9]{2})(?:\:([0-9]{2}))?$/);if(!e)return!1;const o=parseInt(e[1]),i=parseInt(e[2]),r=e[3]?parseInt(e[3]):0;return 0<=o&&o<=23&&0<=i&&i<=59&&0<=r&&r<=59},R.RULE_NAME="url",R.prototype={validate(t,e){const r=o(t.getAll(this.field));if(!r.length)return!0;for(const t of r)if(!R.isUrl(t))throw new i(this,{cause:t});return!0}},Object.setPrototypeOf(R.prototype,r.prototype),R.isUrl=t=>{const e=["http","https"];try{const o=new URL(t).protocol.replace(/:$/,"");return e.includes(o)}catch{return!1}};const U=new Map([["all",n],["any",a],["date",l],["dayofweek",p],["email",c],["enum",h],["file",f],["maxdate",d],["maxfilesize",u],["maxitems",m],["maxlength",g],["maxnumber",v],["mindate",w],["minfilesize",x],["minitems",b],["minlength",E],["minnumber",O],["number",y],["required",N],["requiredfile",A],["stepnumber",j],["tel",M],["time",L],["url",R]]);
1function _(t){s.call(this),t.rules.forEach(t=>{const e=_.createRule(t);e&&this.addRule(e)})}_.prototype={*validate(t,e){const o=this.rules.filter(t=>t.matches(e));for(const r of o)try{r.validate(t,e)}catch(t){if(!(t instanceof i))throw t;yield{field:t.field,message:t.message}}}},Object.setPrototypeOf(_.prototype,s.prototype),_.createRule=t=>{if(U.has(t.rule)){const e=new(U.get(t.rule))(t);return e instanceof s&&t.rules.forEach(t=>{const o=_.createRule(t);o&&e.addRule(o)}),e}},window.swv={rulesDictionary:U,validate:(t,i,r)=>{const s=new _(t),n=e.from(i),a={};for(const{field:t,message:e}of s.validate(n))a[t]??={error:e};for(const t in n.trunk){if(void 0===a[t]){const e=o(n.getAll(t));e.length&&(a[t]={validInputs:e})}if(void 0===a[t]){const e=o(n.getAllFiles(t));e.length&&(a[t]={validInputs:e})}}return a}}})()
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.