From 02ec50532516691efb6ae37768dbaab5bdf6a707 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn?= Date: Thu, 14 Jan 2021 11:14:05 +0100 Subject: [PATCH] adding --- README.md | 1 + demo/demo.css | 1 + demo/demo.js | 8 ++++---- main.js | 4 ++++ mix-manifest.json | 3 ++- package-lock.json | 6 +++--- package.json | 16 ++++++++-------- 7 files changed, 23 insertions(+), 16 deletions(-) create mode 100644 demo/demo.css create mode 100644 main.js diff --git a/README.md b/README.md index 77237e8..cf539ba 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,7 @@ npm install tiny-validator --save ## How to use + ```javascript
{ state.validator.handle(event) }} novalidate>
diff --git a/demo/demo.css b/demo/demo.css new file mode 100644 index 0000000..87f5300 --- /dev/null +++ b/demo/demo.css @@ -0,0 +1 @@ +/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}[hidden],template{display:none} diff --git a/demo/demo.js b/demo/demo.js index c0ff618..ae699d7 100644 --- a/demo/demo.js +++ b/demo/demo.js @@ -1,4 +1,6 @@ -(()=>{var e={422:e=>{var t=/^(?:submit|button|image|reset|file)$/i,n=/^(?:input|select|textarea|keygen)/i,r=/(\[[^\[\]]*\])/g;function i(e,t,n){if(0===t.length)return e=n;var r=t.shift(),o=r.match(/^\[(.+?)\]$/);if("[]"===r)return e=e||[],Array.isArray(e)?e.push(i(null,t,n)):(e._values=e._values||[],e._values.push(i(null,t,n))),e;if(o){var s=o[1],a=+s;isNaN(a)?(e=e||{})[s]=i(e[s],t,n):(e=e||[])[a]=i(e[a],t,n)}else e[r]=i(e[r],t,n);return e}function o(e,t,n){if(t.match(r)){i(e,function(e){var t=[],n=new RegExp(r),i=/^([^\[\]]*)/.exec(e);for(i[1]&&t.push(i[1]);null!==(i=n.exec(e));)t.push(i[1]);return t}(t),n)}else{var o=e[t];o?(Array.isArray(o)||(e[t]=[o]),e[t].push(n)):e[t]=n}return e}function s(e,t,n){return n=n.replace(/(\r)?\n/g,"\r\n"),n=(n=encodeURIComponent(n)).replace(/%20/g,"+"),e+(e?"&":"")+encodeURIComponent(t)+"="+n}e.exports=function(e,r){"object"!=typeof r?r={hash:!!r}:void 0===r.hash&&(r.hash=!0);for(var i=r.hash?{}:"",a=r.serializer||(r.hash?o:s),u=e&&e.elements?e.elements:[],l=Object.create(null),c=0;c{var e={619:(e,t,n)=>{"use strict";function r(e){return e.replace(/-(\w)/g,((e,t)=>t.toUpperCase()))}function i(e,t){e.firstChild&&(t.appendChild(e.firstChild),i(e,t))}function o(e){Array.from(e).forEach(s)}const s=e=>e&&e.parentNode&&e.parentNode.removeChild(e),a=(e,t)=>t&&t.parentNode&&t.parentNode.insertBefore(e,t),u=new Map,l=Symbol("riot-component"),c=new Set,f="is",p="mount",d="update",h="unmount",m="shouldUpdate",g="onBeforeMount",b="onMounted",v="onBeforeUpdate",y="onUpdated",E="onBeforeUnmount",x="onUnmounted",O="props",N="state",T="slots",w="root",A=Symbol.for("pure"),j=Symbol("parent"),_=Symbol("attributes"),S=Symbol("template");var M=Object.freeze({__proto__:null,COMPONENTS_IMPLEMENTATION_MAP:u,DOM_COMPONENT_INSTANCE_PROPERTY:l,PLUGINS_SET:c,IS_DIRECTIVE:f,VALUE_ATTRIBUTE:"value",MOUNT_METHOD_KEY:p,UPDATE_METHOD_KEY:d,UNMOUNT_METHOD_KEY:h,SHOULD_UPDATE_KEY:m,ON_BEFORE_MOUNT_KEY:g,ON_MOUNTED_KEY:b,ON_BEFORE_UPDATE_KEY:v,ON_UPDATED_KEY:y,ON_BEFORE_UNMOUNT_KEY:E,ON_UNMOUNTED_KEY:x,PROPS_KEY:O,STATE_KEY:N,SLOTS_KEY:T,ROOT_KEY:w,IS_PURE_SYMBOL:A,PARENT_KEY_SYMBOL:j,ATTRIBUTES_KEY_SYMBOL:_,TEMPLATE_KEY_SYMBOL:S});var D={EACH:0,IF:1,SIMPLE:2,TAG:3,SLOT:4};var P={ATTRIBUTE:0,EVENT:1,TEXT:2,VALUE:3};function I(e,t){return typeof e===t}function U(e){const t=e.ownerSVGElement;return!!t||null===t}function C(e){return!L(e.content)}function k(e){return I(e,"function")}function R(e){return!L(e)&&I(e,"object")}function L(e){return null==e}const z=Symbol("unmount"),V={nodes:[],mount(e,t){return this.update(e,t)},update(e,t){const{placeholder:n,nodes:r,childrenMap:i}=this,o=e===z?null:this.evaluate(e),u=o?Array.from(o):[],{newChildrenMap:l,batches:c,futureNodes:f}=(n.parentNode,function(e,t,n,r){const{condition:i,template:o,childrenMap:s,itemName:a,getKey:u,indexName:l,root:c,isTemplateTag:f}=r,p=new Map,d=[],h=[];return e.forEach(((e,r)=>{const m=function(e,t){let{itemName:n,indexName:r,index:i,item:o}=t;e[n]=o,r&&(e[r]=i);return e}(Object.create(t),{itemName:a,indexName:l,index:r,item:e}),g=u?u(m):r,b=s.get(g);if(function(e,t){return!!e&&!1===Boolean(e(t))}(i,m))return;const v=b?b.template:o.clone(),y=b?v.el:c.cloneNode(),E=!b,x=f&&E?function(e){const t=e.dom.cloneNode(!0);return{avoidDOMInjection:!0,fragment:t,children:Array.from(t.childNodes)}}(v):{};if(E?d.push((()=>v.mount(y,m,n,x))):d.push((()=>v.update(m,n))),f){const e=x.children||v.children;h.push(...e)}else h.push(y);s.delete(g),p.set(g,{template:v,context:m,index:r})})),{newChildrenMap:p,batches:d,futureNodes:h}}(u,e,t,this));return((e,t,n,r,i)=>{const o=n.length;let u=t.length,l=o,c=0,f=0,p=null;for(;ce-f){const i=r(t[c],0);for(;f{if(r<0){const n=e.pop();if(n){const{template:e,context:r}=n;e.unmount(r,t,null)}}return n}}(Array.from(i.values()),t),n),c.forEach((e=>e())),this.childrenMap=l,this.nodes=f,this},unmount(e,t){return this.update(z,t),this}};const B={mount(e,t){return this.update(e,t)},update(e,t){const n=!!this.evaluate(e),r=!this.value&&n,i=this.value&&!n,o=()=>{const n=this.node.cloneNode();a(n,this.placeholder),this.template=this.template.clone(),this.template.mount(n,e,t)};switch(!0){case r:o();break;case i:this.unmount(e);break;default:n&&this.template.update(e,t)}return this.value=n,this},unmount(e,t){return this.template.unmount(e,t,!0),this}};function F(e){throw new Error(e)}function K(e){return e.reduce(((e,t)=>{const{value:n,type:i}=t;switch(!0){case!t.name&&0===i:return Object.assign({},e,n);case 3===i:e.value=t.value;break;default:e[r(t.name)]=t.value}return e}),{})}const Y="removeAttribute",$="setAttribute",q="undefined"==typeof Element?{}:Element.prototype,G=function(e){const t=new Map,n=n=>(t.has(n)||t.set(n,e.call(this,n)))&&t.get(n);return n.cache=t,n}((e=>q.hasOwnProperty(e)));function H(e,t,n,r){let{name:i}=t;if(!i)return r&&function(e,t,n){const r=t?Object.keys(t):[];Object.keys(n).filter((e=>!r.includes(e))).forEach((t=>e.removeAttribute(t)))}(e,n,r),void(n&&function(e,t){Object.entries(t).forEach((t=>{let[n,r]=t;return H(e,{name:n},r)}))}(e,n));!G(i)&&(function(e){return I(e,"boolean")}(n)||R(n)||k(n))&&(e[i]=n),e[function(e){return L(e)||!1===e||""===e||R(e)||k(e)?Y:$}(n)](i,function(e,t){return!0===t?e:t}(i,n))}const X=/^on/,J={handleEvent(e){this[e.type](e)}},Z=new WeakMap;function W(e){return L(e)?"":e}const Q=(e,t)=>{const n=e.childNodes[t];if(n.nodeType===Node.COMMENT_NODE){const t=document.createTextNode("");return e.replaceChild(t,n),t}return n};var ee={0:H,1:function(e,t,n){let{name:r}=t;const i=r.replace(X,""),o=Z.get(e)||(e=>{const t=Object.create(J);return Z.set(e,t),t})(e),[s,a]=(e=>Array.isArray(e)?e:[e,!1])(n),u=o[i],l=s&&!u;u&&!s&&e.removeEventListener(i,o),l&&e.addEventListener(i,o,a),o[i]=s},2:function(e,t,n){e.data=W(n)},3:function(e,t,n){e.value=W(n)}};const te={mount(e){return this.value=this.evaluate(e),ne(this,this.value),this},update(e){const t=this.evaluate(e);return this.value!==t&&(ne(this,t),this.value=t),this},unmount(){return 1===this.type&&ne(this,null),this}};function ne(e,t){return ee[e.type](e.node,e,t,e.value)}function re(e,t){return Object.assign({},te,t,{node:2===t.type?Q(e,t.childNodeIndex):e})}const ie=(e,t)=>e[j]||t,oe={attributes:[],getTemplateScope(e,t){return function(e,t,n){if(!e||!e.length)return n;const r=e.map((e=>Object.assign({},e,{value:e.evaluate(t)})));return Object.assign(Object.create(n||null),K(r))}(this.attributes,e,t)},mount(e,t){const n=!!e.slots&&e.slots.find((e=>{let{id:t}=e;return t===this.name})),{parentNode:r}=this.node,i=ie(e,t);return this.template=n&&me(n.html,n.bindings).createDOM(r),this.template&&(this.template.mount(this.node,this.getTemplateScope(e,i),i),this.template.children=Array.from(this.node.childNodes),se(this.node)),s(this.node),this},update(e,t){if(this.template){const n=ie(e,t);this.template.update(this.getTemplateScope(e,n),n)}return this},unmount(e,t,n){return this.template&&this.template.unmount(this.getTemplateScope(e,t),null,n),this}};function se(e){const t=e&&e.firstChild;t&&(a(t,e),se(e))}function ae(e){return e.reduce(((e,t)=>{let{bindings:n}=t;return e.concat(n)}),[])}const ue={mount(e){return this.update(e)},update(e,t){const n=this.evaluate(e);return n===this.name?this.tag.update(e):(this.unmount(e,t,!0),this.name=n,this.tag=function(e,t,n){return void 0===t&&(t=[]),void 0===n&&(n=[]),e?e({slots:t,attributes:n}):me(function(e){return e.reduce(((e,t)=>e+t.html),"")}(t),[...ae(t),{expressions:n.map((e=>Object.assign({type:0},e)))}])}(this.getComponent(n),this.slots,this.attributes),this.tag.mount(this.node,e)),this},unmount(e,t,n){return this.tag&&this.tag.unmount(n),this}};var le={1:function(e,t){let{evaluate:n,template:r}=t;const i=document.createTextNode("");return a(i,e),s(e),Object.assign({},B,{node:e,evaluate:n,placeholder:i,template:r.createDOM(e)})},2:function(e,t){let{expressions:n}=t;return Object.assign({},(r=n.map((t=>re(e,t))),["mount","update","unmount"].reduce(((e,t)=>Object.assign({},e,{[t]:e=>r.map((n=>n[t](e)))&&i})),{})));var r,i},0:function(e,t){let{evaluate:n,condition:r,itemName:i,indexName:o,getKey:u,template:l}=t;const c=document.createTextNode(""),f=e.cloneNode();return a(c,e),s(e),Object.assign({},V,{childrenMap:new Map,node:e,root:f,condition:r,evaluate:n,isTemplateTag:C(f),template:l.createDOM(e),getKey:u,indexName:o,itemName:i,placeholder:c})},3:function(e,t){let{evaluate:n,getComponent:r,slots:i,attributes:o}=t;return Object.assign({},ue,{node:e,evaluate:n,slots:i,attributes:o,getComponent:r})},4:function(e,t){let{name:n,attributes:r}=t;return Object.assign({},oe,{attributes:r,node:e,name:n})}};function ce(e,t){return e.map((e=>2===e.type?Object.assign({},e,{childNodeIndex:e.childNodeIndex+t}):e))}function fe(e,t,n){const{selector:r,type:i,redundantAttribute:o,expressions:s}=t,a=r?e.querySelector(r):e;o&&a.removeAttribute(o);const u=s||[];return(le[i]||le[2])(a,Object.assign({},t,{expressions:n&&!r?ce(u,n):u}))}function pe(e,t){return U(e)?function(e,t){return t.ownerDocument.importNode((new window.DOMParser).parseFromString(`${e}`,"application/xml").documentElement,!0)}(t,e):function(e,t){const n=C(t)?t:document.createElement("template");return n.innerHTML=e,n.content}(t,e)}function de(e,t){switch(!0){case U(e):i(t,e);break;case C(e):e.parentNode.replaceChild(t,e);break;default:e.appendChild(t)}}const he=Object.freeze({createDOM(e){return this.dom=this.dom||function(e,t){return t&&("string"==typeof t?pe(e,t):t)}(e,this.html),this},mount(e,t,n,r){if(void 0===r&&(r={}),!e)throw new Error("Please provide DOM node to mount properly your template");this.el&&this.unmount(t);const{fragment:i,children:o,avoidDOMInjection:s}=r,{parentNode:a}=o?o[0]:e,u=C(e),l=u?Math.max(Array.from(a.childNodes).indexOf(e),0):null;return this.isTemplateTag=u,this.createDOM(e),this.dom&&(this.fragment=i||this.dom.cloneNode(!0)),this.el=this.isTemplateTag?a:e,this.children=this.isTemplateTag?o||Array.from(this.fragment.childNodes):null,!s&&this.fragment&&de(e,this.fragment),this.bindings=this.bindingsData.map((e=>fe(this.el,e,l))),this.bindings.forEach((e=>e.mount(t,n))),this},update(e,t){return this.bindings.forEach((n=>n.update(e,t))),this},unmount(e,t,n){if(this.el){switch(this.bindings.forEach((r=>r.unmount(e,t,n))),!0){case this.el[A]:break;case this.children&&null!==n:o(this.children);break;case!0===n:s(this.el);break;case null!==n:o(this.el.childNodes)}this.el=null}return this},clone(){return Object.assign({},this,{el:null})}});function me(e,t){return void 0===t&&(t=[]),Object.assign({},he,{html:e,bindingsData:t})}function ge(){return this}function be(e){return k(e)?e.prototype&&e.prototype.constructor?new e:e():e}function ve(e,t,n,r){return void 0===r&&(r={}),Object.defineProperty(e,t,Object.assign({value:n,enumerable:!1,writable:!1,configurable:!0},r)),e}function ye(e,t,n){return Object.entries(t).forEach((t=>{let[r,i]=t;ve(e,r,i,n)})),e}function Ee(e,t){return Object.entries(t).forEach((t=>{let[n,r]=t;e[n]||(e[n]=r)})),e}function xe(e){return Array.isArray(e)?e:/^\[object (HTMLCollection|NodeList|Object)\]$/.test(Object.prototype.toString.call(e))&&"number"==typeof e.length?Array.from(e):[e]}function Oe(e,t){return xe("string"==typeof e?(t||document).querySelectorAll(e):e)}const Ne=e=>1===e.length?e[0]:e;function Te(e,t,n){const r="object"==typeof t?t:{[t]:n},i=Object.keys(r);return xe(e).forEach((e=>{i.forEach((t=>e.setAttribute(t,r[t])))})),e}function we(e,t){return function(e,t,n){const r="string"==typeof t?[t]:t;return Ne(xe(e).map((e=>Ne(r.map((t=>e[n](t)))))))}(e,t,"getAttribute")}const Ae=new Map,je=()=>_e||(Te(_e=Oe("style[riot]")[0]||document.createElement("style"),"type","text/css"),_e.parentNode||document.head.appendChild(_e),_e);var _e,Se={CSS_BY_NAME:Ae,add(e,t){return Ae.has(e)||(Ae.set(e,t),this.inject()),this},inject(){return je().innerHTML=[...Ae.values()].join("\n"),this},remove(e){return Ae.has(e)&&(Ae.delete(e),this.inject()),this}};function Me(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r(e[r(t.name)]=t.value,e)),{})}(e),be(t))}const Re=(e,t)=>e[l]=t;function Le(e){return[p,d,h].reduce(((t,n)=>(t[n]=e(n),t)),{})}function ze(e){let{css:t,template:n,exports:r,name:i}=e;const o=n?function(e,t){return e(me,P,D,(e=>t[e]||u.get(e)))}(n,r?function(e){void 0===e&&(e={});return Object.entries(be(e)).reduce(((e,t)=>{let[n,r]=t; +/* Riot v5.1.2, @license MIT */ +var i;return e[(i=n,i.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase())]=ze(r),e}),{})}(r.components):{}):Ce;return e=>{let{slots:s,attributes:a,props:u}=e;if(r&&r[A])return function(e,t){let{slots:n,attributes:r,props:i,css:o,template:s}=t;s&&F("Pure components can not have html"),o&&F("Pure components do not have css");const a=Ee(e({slots:n,attributes:r,props:i}),Ie);return Le((e=>function(){for(var t=arguments.length,n=new Array(t),r=0;rc.mount(e,n,t),update:(e,t)=>c.update(t,e),unmount:e=>c.unmount(e)}}}function Ve(e){let{css:t,template:n,componentAPI:r,name:i}=e;return t&&i&&Se.add(i,t),Me(Fe)(ye(Ee(r,Object.assign({},Ue,{[N]:{}})),Object.assign({[T]:null,[w]:null},Pe,{name:i,css:t,template:n})))}function Be(e,t){return Object.assign({},e,be(t))}function Fe(e,t){let{slots:n,attributes:r,props:i}=t;return o=function(e){return[...c].reduce(((e,t)=>t(e)||e),e)}(ye(Object.create(e),{mount(t,o,s){return void 0===o&&(o={}),this[_]=function(e,t){void 0===t&&(t=[]);const n=t.map((t=>re(e,t))),r={};return Object.assign(r,Object.assign({expressions:n},Le((e=>t=>(n.forEach((n=>n[e](t))),r)))))}(t,r).mount(s),ve(this,O,Object.freeze(Object.assign({},ke(t,i),K(this[_].expressions)))),this.state=Be(this.state,o),this[S]=this.template.createDOM(t).clone(),Re(t,this),e.name&&function(e,t){De(e)!==t&&Te(e,f,t)}(t,e.name),ve(this,w,t),ve(this,T,n),this.onBeforeMount(this.props,this.state),this[j]=s,this[S].mount(t,this,s),this.onMounted(this.props,this.state),this},update(e,t){void 0===e&&(e={}),t&&(this[j]=t,this[_].update(t));const n=K(this[_].expressions);if(!1!==this.shouldUpdate(n,this.props))return ve(this,O,Object.freeze(Object.assign({},this.props,n))),this.state=Be(this.state,e),this.onBeforeUpdate(this.props,this.state),this[S].update(this,this[j]),this.onUpdated(this.props,this.state),this},unmount(e){return this.onBeforeUnmount(this.props,this.state),this[_].unmount(),this[S].unmount(this,this[j],null===e?null:!e),this.onUnmounted(this.props,this.state),this}})),Object.keys(e).filter((t=>k(e[t]))).forEach((e=>{o[e]=o[e].bind(o)})),o;var o}const{DOM_COMPONENT_INSTANCE_PROPERTY:Ke,COMPONENTS_IMPLEMENTATION_MAP:Ye,PLUGINS_SET:$e}=M;function qe(e,t){let{css:n,template:r,exports:i}=t;return Ye.has(e)&&F(`The component "${e}" was already registered`),Ye.set(e,ze({name:e,css:n,template:r,exports:i})),Ye}function Ge(e,t,n){return Oe(e).map((e=>function(e,t,n){const r=n||De(e);return u.has(r)||F(`The component named "${r}" was never registered`),u.get(r)({props:t}).mount(e)}(e,t,n)))}var He=n(765),Xe=n.n(He),Je=n(422),Ze=n.n(Je);function We(e,t){for(var n=0;n
',[{redundantAttribute:"expr2",selector:"[expr2]",expressions:[{type:t.EVENT,name:"onsubmit",evaluate:function(e){return t=>{e.state.validator.handle(t)}}}]},{redundantAttribute:"expr3",selector:"[expr3]",expressions:[{type:t.EVENT,name:"onkeyup",evaluate:function(e){return t=>{e.state.validator.handle(t,"email")}}}]},{type:n.TAG,getComponent:r,evaluate:function(e){return"field-error"},slots:[],attributes:[{type:t.ATTRIBUTE,name:"errors",evaluate:function(e){return e.state.validator.errors("email")}}],redundantAttribute:"expr4",selector:"[expr4]"},{redundantAttribute:"expr5",selector:"[expr5]",expressions:[{type:t.EVENT,name:"onkeyup",evaluate:function(e){return t=>{e.state.validator.handle(t,"password")}}}]},{type:n.TAG,getComponent:r,evaluate:function(e){return"field-error"},slots:[],attributes:[{type:t.ATTRIBUTE,name:"errors",evaluate:function(e){return e.state.validator.errors("password")}}],redundantAttribute:"expr6",selector:"[expr6]"}])},name:"demo"};qe("field-error",{css:null,exports:{state:{errors:[]},onBeforeUpdate(e,t){e.errors&&e.errors.length>0?t.errors=e.errors:t.errors=[]}},template:function(e,t,n,r){return e('
',[{type:n.IF,evaluate:function(e){return e.state.errors.length>0},redundantAttribute:"expr0",selector:"[expr0]",template:e('
',[{type:n.EACH,getKey:null,condition:null,template:e(" ",[{expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:function(e){return e.error}}]}]),redundantAttribute:"expr1",selector:"[expr1]",itemName:"error",indexName:null,evaluate:function(e){return e.state.errors}}])}])},name:"field-error"}),Ge("field-error"),qe("demo",et),Ge("demo")},422:e=>{var t=/^(?:submit|button|image|reset|file)$/i,n=/^(?:input|select|textarea|keygen)/i,r=/(\[[^\[\]]*\])/g;function i(e,t,n){if(0===t.length)return e=n;var r=t.shift(),o=r.match(/^\[(.+?)\]$/);if("[]"===r)return e=e||[],Array.isArray(e)?e.push(i(null,t,n)):(e._values=e._values||[],e._values.push(i(null,t,n))),e;if(o){var s=o[1],a=+s;isNaN(a)?(e=e||{})[s]=i(e[s],t,n):(e=e||[])[a]=i(e[a],t,n)}else e[r]=i(e[r],t,n);return e}function o(e,t,n){if(t.match(r)){i(e,function(e){var t=[],n=new RegExp(r),i=/^([^\[\]]*)/.exec(e);for(i[1]&&t.push(i[1]);null!==(i=n.exec(e));)t.push(i[1]);return t}(t),n)}else{var o=e[t];o?(Array.isArray(o)||(e[t]=[o]),e[t].push(n)):e[t]=n}return e}function s(e,t,n){return n=n.replace(/(\r)?\n/g,"\r\n"),n=(n=encodeURIComponent(n)).replace(/%20/g,"+"),e+(e?"&":"")+encodeURIComponent(t)+"="+n}e.exports=function(e,r){"object"!=typeof r?r={hash:!!r}:void 0===r.hash&&(r.hash=!0);for(var i=r.hash?{}:"",a=r.serializer||(r.hash?o:s),u=e&&e.elements?e.elements:[],l=Object.create(null),c=0;c{},765:function(e,t,n){e=n.nmd(e), /*! * validate.js 0.13.1 * @@ -7,6 +9,4 @@ * For all details and documentation: * http://validatejs.org/ */ -function(e,t,r){"use strict";var i=function(e,t,n){n=o.extend({},o.options,n);var r=o.runValidations(e,t,n);if(r.some((function(e){return o.isPromise(e.error)})))throw new Error("Use validate.async if you want support for promises");return i.processValidationResults(r,n)},o=i;o.extend=function(e){return[].slice.call(arguments,1).forEach((function(t){for(var n in t)e[n]=t[n]})),e},o.extend(i,{version:{major:0,minor:13,patch:1,metadata:null,toString:function(){var e=o.format("%{major}.%{minor}.%{patch}",o.version);return o.isEmpty(o.version.metadata)||(e+="+"+o.version.metadata),e}},Promise:"undefined"!=typeof Promise?Promise:null,EMPTY_STRING_REGEXP:/^\s*$/,runValidations:function(e,t,n){var r,i,s,a,u,l,c,f=[];for(r in(o.isDomElement(e)||o.isJqueryElement(e))&&(e=o.collectFormValues(e)),t)for(i in s=o.getDeepObjectValue(e,r),a=o.result(t[r],s,e,r,n,t)){if(!(u=o.validators[i]))throw c=o.format("Unknown validator %{name}",{name:i}),new Error(c);l=a[i],(l=o.result(l,s,e,r,n,t))&&f.push({attribute:r,value:s,validator:i,globalOptions:n,attributes:e,options:l,error:u.call(u,s,l,r,e,n)})}return f},processValidationResults:function(e,t){e=o.pruneEmptyErrors(e,t),e=o.expandMultipleErrors(e,t),e=o.convertErrorMessages(e,t);var n=t.format||"grouped";if("function"!=typeof o.formatters[n])throw new Error(o.format("Unknown format %{format}",t));return e=o.formatters[n](e),o.isEmpty(e)?void 0:e},async:function(e,t,n){var r=(n=o.extend({},o.async.options,n)).wrapErrors||function(e){return e};!1!==n.cleanAttributes&&(e=o.cleanAttributes(e,t));var i=o.runValidations(e,t,n);return new o.Promise((function(s,a){o.waitForResults(i).then((function(){var u=o.processValidationResults(i,n);u?a(new r(u,n,e,t)):s(e)}),(function(e){a(e)}))}))},single:function(e,t,n){return n=o.extend({},o.single.options,n,{format:"flat",fullMessages:!1}),o({single:e},{single:t},n)},waitForResults:function(e){return e.reduce((function(e,t){return o.isPromise(t.error)?e.then((function(){return t.error.then((function(e){t.error=e||null}))})):e}),new o.Promise((function(e){e()})))},result:function(e){var t=[].slice.call(arguments,1);return"function"==typeof e&&(e=e.apply(null,t)),e},isNumber:function(e){return"number"==typeof e&&!isNaN(e)},isFunction:function(e){return"function"==typeof e},isInteger:function(e){return o.isNumber(e)&&e%1==0},isBoolean:function(e){return"boolean"==typeof e},isObject:function(e){return e===Object(e)},isDate:function(e){return e instanceof Date},isDefined:function(e){return null!=e},isPromise:function(e){return!!e&&o.isFunction(e.then)},isJqueryElement:function(e){return e&&o.isString(e.jquery)},isDomElement:function(e){return!!e&&(!(!e.querySelectorAll||!e.querySelector)&&(!(!o.isObject(document)||e!==document)||("object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&null!==e&&1===e.nodeType&&"string"==typeof e.nodeName)))},isEmpty:function(e){var t;if(!o.isDefined(e))return!0;if(o.isFunction(e))return!1;if(o.isString(e))return o.EMPTY_STRING_REGEXP.test(e);if(o.isArray(e))return 0===e.length;if(o.isDate(e))return!1;if(o.isObject(e)){for(t in e)return!1;return!0}return!1},format:o.extend((function(e,t){return o.isString(e)?e.replace(o.format.FORMAT_REGEXP,(function(e,n,r){return"%"===n?"%{"+r+"}":String(t[r])})):e}),{FORMAT_REGEXP:/(%?)%\{([^\}]+)\}/g}),prettify:function(e){return o.isNumber(e)?100*e%1==0?""+e:parseFloat(Math.round(100*e)/100).toFixed(2):o.isArray(e)?e.map((function(e){return o.prettify(e)})).join(", "):o.isObject(e)?o.isDefined(e.toString)?e.toString():JSON.stringify(e):(e=""+e).replace(/([^\s])\.([^\s])/g,"$1 $2").replace(/\\+/g,"").replace(/[_-]/g," ").replace(/([a-z])([A-Z])/g,(function(e,t,n){return t+" "+n.toLowerCase()})).toLowerCase()},stringifyValue:function(e,t){return(t&&t.prettify||o.prettify)(e)},isString:function(e){return"string"==typeof e},isArray:function(e){return"[object Array]"==={}.toString.call(e)},isHash:function(e){return o.isObject(e)&&!o.isArray(e)&&!o.isFunction(e)},contains:function(e,t){return!!o.isDefined(e)&&(o.isArray(e)?-1!==e.indexOf(t):t in e)},unique:function(e){return o.isArray(e)?e.filter((function(e,t,n){return n.indexOf(e)==t})):e},forEachKeyInKeypath:function(e,t,n){if(o.isString(t)){var r,i="",s=!1;for(r=0;rs&&(r=t.tooLong||this.tooLong||"is too long (maximum is %{count} characters)",u.push(o.format(r,{count:s}))),u.length>0?t.message||u:void 0):t.message||this.notValid||"has an incorrect length"}},numericality:function(e,t,n,r,i){if(o.isDefined(e)){var s,a,u=[],l={greaterThan:function(e,t){return e>t},greaterThanOrEqualTo:function(e,t){return e>=t},equalTo:function(e,t){return e===t},lessThan:function(e,t){return es&&(n=t.tooLate||t.message||this.tooLate||"must be no later than %{date}",n=o.format(n,{date:this.format(s,t),value:this.format(e,t)}),r.push(n)),r.length?o.unique(r):void 0)}}),{parse:null,format:null}),date:function(e,t){return t=o.extend({},t,{dateOnly:!0}),o.validators.datetime.call(o.validators.datetime,e,t)},format:function(e,t){(o.isString(t)||t instanceof RegExp)&&(t={pattern:t});var n,r=(t=o.extend({},this.options,t)).message||this.message||"is invalid",i=t.pattern;if(o.isDefined(e))return o.isString(e)?(o.isString(i)&&(i=new RegExp(t.pattern,t.flags)),(n=i.exec(e))&&n[0].length==e.length?void 0:r):r},inclusion:function(e,t){if(o.isDefined(e)&&(o.isArray(t)&&(t={within:t}),t=o.extend({},this.options,t),!o.contains(t.within,e))){var n=t.message||this.message||"^%{value} is not included in the list";return o.format(n,{value:e})}},exclusion:function(e,t){if(o.isDefined(e)&&(o.isArray(t)&&(t={within:t}),t=o.extend({},this.options,t),o.contains(t.within,e))){var n=t.message||this.message||"^%{value} is restricted";return o.isString(t.within[e])&&(e=t.within[e]),o.format(n,{value:e})}},email:o.extend((function(e,t){var n=(t=o.extend({},this.options,t)).message||this.message||"is not a valid email";if(o.isDefined(e))return o.isString(e)&&this.PATTERN.exec(e)?void 0:n}),{PATTERN:/^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?: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]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$/i}),equality:function(e,t,n,r,i){if(o.isDefined(e)){o.isString(t)&&(t={attribute:t});var s=(t=o.extend({},this.options,t)).message||this.message||"is not equal to %{attribute}";if(o.isEmpty(t.attribute)||!o.isString(t.attribute))throw new Error("The attribute must be a non empty string");var a=o.getDeepObjectValue(r,t.attribute),u=t.comparator||function(e,t){return e===t},l=t.prettify||i&&i.prettify||o.prettify;return u(e,a,t,n,r)?void 0:o.format(s,{attribute:l(t.attribute)})}},url:function(e,t){if(o.isDefined(e)){var n=(t=o.extend({},this.options,t)).message||this.message||"is not a valid url",r=t.schemes||this.schemes||["http","https"],i=t.allowLocal||this.allowLocal||!1,s=t.allowDataUrl||this.allowDataUrl||!1;if(!o.isString(e))return n;var a="^(?:(?:"+r.join("|")+")://)(?:\\S+(?::\\S*)?@)?(?:",u="(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))";if(i?u+="?":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})",a+="(?:[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]+)*"+u+")(?::\\d{2,5})?(?:[/?#]\\S*)?$",s){a="(?:"+a+")|(?:^data:(?:\\w+\\/[-+.\\w]+(?:;[\\w=]+)*)?(?:;base64)?,[A-Za-z0-9-_.!~\\*'();\\/?:@&=+$,%]*$)"}return new RegExp(a,"i").exec(e)?void 0:n}},type:o.extend((function(e,t,n,r,i){if(o.isString(t)&&(t={type:t}),o.isDefined(e)){var s,a=o.extend({},this.options,t),u=a.type;if(!o.isDefined(u))throw new Error("No type was specified");if(s=o.isFunction(u)?u:this.types[u],!o.isFunction(s))throw new Error("validate.validators.type.types."+u+" must be a function.");if(!s(e,a,n,r,i)){var l=t.message||this.messages[u]||this.message||a.message||(o.isFunction(u)?"must be of the correct type":"must be of type %{type}");return o.isFunction(l)&&(l=l(e,t,n,r,i)),o.format(l,{attribute:o.prettify(n),type:u})}}}),{types:{object:function(e){return o.isObject(e)&&!o.isArray(e)},array:o.isArray,integer:o.isInteger,number:o.isNumber,string:o.isString,date:o.isDate,boolean:o.isBoolean},messages:{}})},i.formatters={detailed:function(e){return e},flat:o.flattenErrorsToArray,grouped:function(e){var t;for(t in e=o.groupErrorsByAttribute(e))e[t]=o.flattenErrorsToArray(e[t]);return e},constraint:function(e){var t;for(t in e=o.groupErrorsByAttribute(e))e[t]=e[t].map((function(e){return e.validator})).sort();return e}},i.exposeModule(i,this,e,t,n.amdD)}.call(this,t,e,n.amdD)}},t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={id:r,loaded:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}n.amdD=function(){throw new Error("define cannot be used indirect")},n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{"use strict";function e(e){return e.replace(/-(\w)/g,((e,t)=>t.toUpperCase()))}function t(e,n){e.firstChild&&(n.appendChild(e.firstChild),t(e,n))}function r(e){Array.from(e).forEach(i)}const i=e=>e&&e.parentNode&&e.parentNode.removeChild(e),o=(e,t)=>t&&t.parentNode&&t.parentNode.insertBefore(e,t),s=new Map,a=Symbol("riot-component"),u=new Set,l="is",c="mount",f="update",p="unmount",d="shouldUpdate",h="onBeforeMount",m="onMounted",g="onBeforeUpdate",b="onUpdated",v="onBeforeUnmount",y="onUnmounted",E="props",x="state",O="slots",N="root",T=Symbol.for("pure"),w=Symbol("parent"),A=Symbol("attributes"),j=Symbol("template");var _=Object.freeze({__proto__:null,COMPONENTS_IMPLEMENTATION_MAP:s,DOM_COMPONENT_INSTANCE_PROPERTY:a,PLUGINS_SET:u,IS_DIRECTIVE:l,VALUE_ATTRIBUTE:"value",MOUNT_METHOD_KEY:c,UPDATE_METHOD_KEY:f,UNMOUNT_METHOD_KEY:p,SHOULD_UPDATE_KEY:d,ON_BEFORE_MOUNT_KEY:h,ON_MOUNTED_KEY:m,ON_BEFORE_UPDATE_KEY:g,ON_UPDATED_KEY:b,ON_BEFORE_UNMOUNT_KEY:v,ON_UNMOUNTED_KEY:y,PROPS_KEY:E,STATE_KEY:x,SLOTS_KEY:O,ROOT_KEY:N,IS_PURE_SYMBOL:T,PARENT_KEY_SYMBOL:w,ATTRIBUTES_KEY_SYMBOL:A,TEMPLATE_KEY_SYMBOL:j});var S={EACH:0,IF:1,SIMPLE:2,TAG:3,SLOT:4};var M={ATTRIBUTE:0,EVENT:1,TEXT:2,VALUE:3};function D(e,t){return typeof e===t}function P(e){const t=e.ownerSVGElement;return!!t||null===t}function I(e){return!C(e.content)}function U(e){return D(e,"function")}function R(e){return!C(e)&&D(e,"object")}function C(e){return null==e}const k=Symbol("unmount"),L={nodes:[],mount(e,t){return this.update(e,t)},update(e,t){const{placeholder:n,nodes:r,childrenMap:s}=this,a=e===k?null:this.evaluate(e),u=a?Array.from(a):[],{newChildrenMap:l,batches:c,futureNodes:f}=(n.parentNode,function(e,t,n,r){const{condition:i,template:o,childrenMap:s,itemName:a,getKey:u,indexName:l,root:c,isTemplateTag:f}=r,p=new Map,d=[],h=[];return e.forEach(((e,r)=>{const m=function(e,t){let{itemName:n,indexName:r,index:i,item:o}=t;e[n]=o,r&&(e[r]=i);return e}(Object.create(t),{itemName:a,indexName:l,index:r,item:e}),g=u?u(m):r,b=s.get(g);if(function(e,t){return!!e&&!1===Boolean(e(t))}(i,m))return;const v=b?b.template:o.clone(),y=b?v.el:c.cloneNode(),E=!b,x=f&&E?function(e){const t=e.dom.cloneNode(!0);return{avoidDOMInjection:!0,fragment:t,children:Array.from(t.childNodes)}}(v):{};if(E?d.push((()=>v.mount(y,m,n,x))):d.push((()=>v.update(m,n))),f){const e=x.children||v.children;h.push(...e)}else h.push(y);s.delete(g),p.set(g,{template:v,context:m,index:r})})),{newChildrenMap:p,batches:d,futureNodes:h}}(u,e,t,this));return((e,t,n,r,s)=>{const a=n.length;let u=t.length,l=a,c=0,f=0,p=null;for(;ce-f){const i=r(t[c],0);for(;f{if(r<0){const n=e.pop();if(n){const{template:e,context:r}=n;e.unmount(r,t,null)}}return n}}(Array.from(s.values()),t),n),c.forEach((e=>e())),this.childrenMap=l,this.nodes=f,this},unmount(e,t){return this.update(k,t),this}};const z={mount(e,t){return this.update(e,t)},update(e,t){const n=!!this.evaluate(e),r=!this.value&&n,i=this.value&&!n,s=()=>{const n=this.node.cloneNode();o(n,this.placeholder),this.template=this.template.clone(),this.template.mount(n,e,t)};switch(!0){case r:s();break;case i:this.unmount(e);break;default:n&&this.template.update(e,t)}return this.value=n,this},unmount(e,t){return this.template.unmount(e,t,!0),this}};function V(e){throw new Error(e)}function B(t){return t.reduce(((t,n)=>{const{value:r,type:i}=n;switch(!0){case!n.name&&0===i:return Object.assign({},t,r);case 3===i:t.value=n.value;break;default:t[e(n.name)]=n.value}return t}),{})}const F="removeAttribute",K="setAttribute",Y="undefined"==typeof Element?{}:Element.prototype,$=function(e){const t=new Map,n=n=>(t.has(n)||t.set(n,e.call(this,n)))&&t.get(n);return n.cache=t,n}((e=>Y.hasOwnProperty(e)));function q(e,t,n,r){let{name:i}=t;if(!i)return r&&function(e,t,n){const r=t?Object.keys(t):[];Object.keys(n).filter((e=>!r.includes(e))).forEach((t=>e.removeAttribute(t)))}(e,n,r),void(n&&function(e,t){Object.entries(t).forEach((t=>{let[n,r]=t;return q(e,{name:n},r)}))}(e,n));!$(i)&&(function(e){return D(e,"boolean")}(n)||R(n)||U(n))&&(e[i]=n),e[function(e){return C(e)||!1===e||""===e||R(e)||U(e)?F:K}(n)](i,function(e,t){return!0===t?e:t}(i,n))}const G=/^on/,H={handleEvent(e){this[e.type](e)}},X=new WeakMap;function J(e){return C(e)?"":e}const Z=(e,t)=>{const n=e.childNodes[t];if(n.nodeType===Node.COMMENT_NODE){const t=document.createTextNode("");return e.replaceChild(t,n),t}return n};var W={0:q,1:function(e,t,n){let{name:r}=t;const i=r.replace(G,""),o=X.get(e)||(e=>{const t=Object.create(H);return X.set(e,t),t})(e),[s,a]=(e=>Array.isArray(e)?e:[e,!1])(n),u=o[i],l=s&&!u;u&&!s&&e.removeEventListener(i,o),l&&e.addEventListener(i,o,a),o[i]=s},2:function(e,t,n){e.data=J(n)},3:function(e,t,n){e.value=J(n)}};const Q={mount(e){return this.value=this.evaluate(e),ee(this,this.value),this},update(e){const t=this.evaluate(e);return this.value!==t&&(ee(this,t),this.value=t),this},unmount(){return 1===this.type&&ee(this,null),this}};function ee(e,t){return W[e.type](e.node,e,t,e.value)}function te(e,t){return Object.assign({},Q,t,{node:2===t.type?Z(e,t.childNodeIndex):e})}const ne=(e,t)=>e[w]||t,re={attributes:[],getTemplateScope(e,t){return function(e,t,n){if(!e||!e.length)return n;const r=e.map((e=>Object.assign({},e,{value:e.evaluate(t)})));return Object.assign(Object.create(n||null),B(r))}(this.attributes,e,t)},mount(e,t){const n=!!e.slots&&e.slots.find((e=>{let{id:t}=e;return t===this.name})),{parentNode:r}=this.node,o=ne(e,t);return this.template=n&&de(n.html,n.bindings).createDOM(r),this.template&&(this.template.mount(this.node,this.getTemplateScope(e,o),o),this.template.children=Array.from(this.node.childNodes),ie(this.node)),i(this.node),this},update(e,t){if(this.template){const n=ne(e,t);this.template.update(this.getTemplateScope(e,n),n)}return this},unmount(e,t,n){return this.template&&this.template.unmount(this.getTemplateScope(e,t),null,n),this}};function ie(e){const t=e&&e.firstChild;t&&(o(t,e),ie(e))}function oe(e){return e.reduce(((e,t)=>{let{bindings:n}=t;return e.concat(n)}),[])}const se={mount(e){return this.update(e)},update(e,t){const n=this.evaluate(e);return n===this.name?this.tag.update(e):(this.unmount(e,t,!0),this.name=n,this.tag=function(e,t,n){return void 0===t&&(t=[]),void 0===n&&(n=[]),e?e({slots:t,attributes:n}):de(function(e){return e.reduce(((e,t)=>e+t.html),"")}(t),[...oe(t),{expressions:n.map((e=>Object.assign({type:0},e)))}])}(this.getComponent(n),this.slots,this.attributes),this.tag.mount(this.node,e)),this},unmount(e,t,n){return this.tag&&this.tag.unmount(n),this}};var ae={1:function(e,t){let{evaluate:n,template:r}=t;const s=document.createTextNode("");return o(s,e),i(e),Object.assign({},z,{node:e,evaluate:n,placeholder:s,template:r.createDOM(e)})},2:function(e,t){let{expressions:n}=t;return Object.assign({},(r=n.map((t=>te(e,t))),["mount","update","unmount"].reduce(((e,t)=>Object.assign({},e,{[t]:e=>r.map((n=>n[t](e)))&&i})),{})));var r,i},0:function(e,t){let{evaluate:n,condition:r,itemName:s,indexName:a,getKey:u,template:l}=t;const c=document.createTextNode(""),f=e.cloneNode();return o(c,e),i(e),Object.assign({},L,{childrenMap:new Map,node:e,root:f,condition:r,evaluate:n,isTemplateTag:I(f),template:l.createDOM(e),getKey:u,indexName:a,itemName:s,placeholder:c})},3:function(e,t){let{evaluate:n,getComponent:r,slots:i,attributes:o}=t;return Object.assign({},se,{node:e,evaluate:n,slots:i,attributes:o,getComponent:r})},4:function(e,t){let{name:n,attributes:r}=t;return Object.assign({},re,{attributes:r,node:e,name:n})}};function ue(e,t){return e.map((e=>2===e.type?Object.assign({},e,{childNodeIndex:e.childNodeIndex+t}):e))}function le(e,t,n){const{selector:r,type:i,redundantAttribute:o,expressions:s}=t,a=r?e.querySelector(r):e;o&&a.removeAttribute(o);const u=s||[];return(ae[i]||ae[2])(a,Object.assign({},t,{expressions:n&&!r?ue(u,n):u}))}function ce(e,t){return P(e)?function(e,t){return t.ownerDocument.importNode((new window.DOMParser).parseFromString(`${e}`,"application/xml").documentElement,!0)}(t,e):function(e,t){const n=I(t)?t:document.createElement("template");return n.innerHTML=e,n.content}(t,e)}function fe(e,n){switch(!0){case P(e):t(n,e);break;case I(e):e.parentNode.replaceChild(n,e);break;default:e.appendChild(n)}}const pe=Object.freeze({createDOM(e){return this.dom=this.dom||function(e,t){return t&&("string"==typeof t?ce(e,t):t)}(e,this.html),this},mount(e,t,n,r){if(void 0===r&&(r={}),!e)throw new Error("Please provide DOM node to mount properly your template");this.el&&this.unmount(t);const{fragment:i,children:o,avoidDOMInjection:s}=r,{parentNode:a}=o?o[0]:e,u=I(e),l=u?Math.max(Array.from(a.childNodes).indexOf(e),0):null;return this.isTemplateTag=u,this.createDOM(e),this.dom&&(this.fragment=i||this.dom.cloneNode(!0)),this.el=this.isTemplateTag?a:e,this.children=this.isTemplateTag?o||Array.from(this.fragment.childNodes):null,!s&&this.fragment&&fe(e,this.fragment),this.bindings=this.bindingsData.map((e=>le(this.el,e,l))),this.bindings.forEach((e=>e.mount(t,n))),this},update(e,t){return this.bindings.forEach((n=>n.update(e,t))),this},unmount(e,t,n){if(this.el){switch(this.bindings.forEach((r=>r.unmount(e,t,n))),!0){case this.el[T]:break;case this.children&&null!==n:r(this.children);break;case!0===n:i(this.el);break;case null!==n:r(this.el.childNodes)}this.el=null}return this},clone(){return Object.assign({},this,{el:null})}});function de(e,t){return void 0===t&&(t=[]),Object.assign({},pe,{html:e,bindingsData:t})}function he(){return this}function me(e){return U(e)?e.prototype&&e.prototype.constructor?new e:e():e}function ge(e,t,n,r){return void 0===r&&(r={}),Object.defineProperty(e,t,Object.assign({value:n,enumerable:!1,writable:!1,configurable:!0},r)),e}function be(e,t,n){return Object.entries(t).forEach((t=>{let[r,i]=t;ge(e,r,i,n)})),e}function ve(e,t){return Object.entries(t).forEach((t=>{let[n,r]=t;e[n]||(e[n]=r)})),e}function ye(e){return Array.isArray(e)?e:/^\[object (HTMLCollection|NodeList|Object)\]$/.test(Object.prototype.toString.call(e))&&"number"==typeof e.length?Array.from(e):[e]}function Ee(e,t){return ye("string"==typeof e?(t||document).querySelectorAll(e):e)}const xe=e=>1===e.length?e[0]:e;function Oe(e,t,n){const r="object"==typeof t?t:{[t]:n},i=Object.keys(r);return ye(e).forEach((e=>{i.forEach((t=>e.setAttribute(t,r[t])))})),e}function Ne(e,t){return function(e,t,n){const r="string"==typeof t?[t]:t;return xe(ye(e).map((e=>xe(r.map((t=>e[n](t)))))))}(e,t,"getAttribute")}const Te=new Map,we=()=>Ae||(Oe(Ae=Ee("style[riot]")[0]||document.createElement("style"),"type","text/css"),Ae.parentNode||document.head.appendChild(Ae),Ae);var Ae,je={CSS_BY_NAME:Te,add(e,t){return Te.has(e)||(Te.set(e,t),this.inject()),this},inject(){return we().innerHTML=[...Te.values()].join("\n"),this},remove(e){return Te.has(e)&&(Te.delete(e),this.inject()),this}};function _e(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r(t[e(n.name)]=n.value,t)),{})}(t),me(n))}const Re=(e,t)=>e[a]=t;function Ce(e){return[c,f,p].reduce(((t,n)=>(t[n]=e(n),t)),{})}function ke(e){let{css:t,template:n,exports:r,name:i}=e;const o=n?function(e,t){return e(de,M,S,(e=>t[e]||s.get(e)))}(n,r?function(e){void 0===e&&(e={});return Object.entries(me(e)).reduce(((e,t)=>{let[n,r]=t; -/* Riot v5.1.2, @license MIT */ -var i;return e[(i=n,i.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase())]=ke(r),e}),{})}(r.components):{}):Ie;return e=>{let{slots:s,attributes:a,props:u}=e;if(r&&r[T])return function(e,t){let{slots:n,attributes:r,props:i,css:o,template:s}=t;s&&V("Pure components can not have html"),o&&V("Pure components do not have css");const a=ve(e({slots:n,attributes:r,props:i}),De);return Ce((e=>function(){for(var t=arguments.length,n=new Array(t),r=0;rf.mount(e,n,t),update:(e,t)=>f.update(t,e),unmount:e=>f.unmount(e)}}}function Le(e){let{css:t,template:n,componentAPI:r,name:i}=e;return t&&i&&je.add(i,t),_e(Ve)(be(ve(r,Object.assign({},Pe,{[x]:{}})),Object.assign({[O]:null,[N]:null},Me,{name:i,css:t,template:n})))}function ze(e,t){return Object.assign({},e,me(t))}function Ve(e,t){let{slots:n,attributes:r,props:i}=t;return o=function(e){return[...u].reduce(((e,t)=>t(e)||e),e)}(be(Object.create(e),{mount(t,o,s){return void 0===o&&(o={}),this[A]=function(e,t){void 0===t&&(t=[]);const n=t.map((t=>te(e,t))),r={};return Object.assign(r,Object.assign({expressions:n},Ce((e=>t=>(n.forEach((n=>n[e](t))),r)))))}(t,r).mount(s),ge(this,E,Object.freeze(Object.assign({},Ue(t,i),B(this[A].expressions)))),this.state=ze(this.state,o),this[j]=this.template.createDOM(t).clone(),Re(t,this),e.name&&function(e,t){Se(e)!==t&&Oe(e,l,t)}(t,e.name),ge(this,N,t),ge(this,O,n),this.onBeforeMount(this.props,this.state),this[w]=s,this[j].mount(t,this,s),this.onMounted(this.props,this.state),this},update(e,t){void 0===e&&(e={}),t&&(this[w]=t,this[A].update(t));const n=B(this[A].expressions);if(!1!==this.shouldUpdate(n,this.props))return ge(this,E,Object.freeze(Object.assign({},this.props,n))),this.state=ze(this.state,e),this.onBeforeUpdate(this.props,this.state),this[j].update(this,this[w]),this.onUpdated(this.props,this.state),this},unmount(e){return this.onBeforeUnmount(this.props,this.state),this[A].unmount(),this[j].unmount(this,this[w],null===e?null:!e),this.onUnmounted(this.props,this.state),this}})),Object.keys(e).filter((t=>U(e[t]))).forEach((e=>{o[e]=o[e].bind(o)})),o;var o}const{DOM_COMPONENT_INSTANCE_PROPERTY:Be,COMPONENTS_IMPLEMENTATION_MAP:Fe,PLUGINS_SET:Ke}=_;function Ye(e,t){let{css:n,template:r,exports:i}=t;return Fe.has(e)&&V(`The component "${e}" was already registered`),Fe.set(e,ke({name:e,css:n,template:r,exports:i})),Fe}function $e(e,t,n){return Ee(e).map((e=>function(e,t,n){const r=n||Se(e);return s.has(r)||V(`The component named "${r}" was never registered`),s.get(r)({props:t}).mount(e)}(e,t,n)))}var qe=n(765),Ge=n.n(qe),He=n(422),Xe=n.n(He);function Je(e,t){for(var n=0;n
',[{redundantAttribute:"expr2",selector:"[expr2]",expressions:[{type:t.EVENT,name:"onsubmit",evaluate:function(e){return t=>{e.state.validator.handle(t)}}}]},{redundantAttribute:"expr3",selector:"[expr3]",expressions:[{type:t.EVENT,name:"onkeyup",evaluate:function(e){return t=>{e.state.validator.handle(t,"email")}}}]},{type:n.TAG,getComponent:r,evaluate:function(e){return"field-error"},slots:[],attributes:[{type:t.ATTRIBUTE,name:"errors",evaluate:function(e){return e.state.validator.errors("email")}}],redundantAttribute:"expr4",selector:"[expr4]"},{redundantAttribute:"expr5",selector:"[expr5]",expressions:[{type:t.EVENT,name:"onkeyup",evaluate:function(e){return t=>{e.state.validator.handle(t,"password")}}}]},{type:n.TAG,getComponent:r,evaluate:function(e){return"field-error"},slots:[],attributes:[{type:t.ATTRIBUTE,name:"errors",evaluate:function(e){return e.state.validator.errors("password")}}],redundantAttribute:"expr6",selector:"[expr6]"}])},name:"demo"};Ye("field-error",{css:null,exports:{state:{errors:[]},onBeforeUpdate(e,t){e.errors&&e.errors.length>0?t.errors=e.errors:t.errors=[]}},template:function(e,t,n,r){return e('
',[{type:n.IF,evaluate:function(e){return e.state.errors.length>0},redundantAttribute:"expr0",selector:"[expr0]",template:e('
',[{type:n.EACH,getKey:null,condition:null,template:e(" ",[{expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:function(e){return e.error}}]}]),redundantAttribute:"expr1",selector:"[expr1]",itemName:"error",indexName:null,evaluate:function(e){return e.state.errors}}])}])},name:"field-error"}),$e("field-error"),Ye("demo",We),$e("demo")})()})(); \ No newline at end of file +function(e,t,r){"use strict";var i=function(e,t,n){n=o.extend({},o.options,n);var r=o.runValidations(e,t,n);if(r.some((function(e){return o.isPromise(e.error)})))throw new Error("Use validate.async if you want support for promises");return i.processValidationResults(r,n)},o=i;o.extend=function(e){return[].slice.call(arguments,1).forEach((function(t){for(var n in t)e[n]=t[n]})),e},o.extend(i,{version:{major:0,minor:13,patch:1,metadata:null,toString:function(){var e=o.format("%{major}.%{minor}.%{patch}",o.version);return o.isEmpty(o.version.metadata)||(e+="+"+o.version.metadata),e}},Promise:"undefined"!=typeof Promise?Promise:null,EMPTY_STRING_REGEXP:/^\s*$/,runValidations:function(e,t,n){var r,i,s,a,u,l,c,f=[];for(r in(o.isDomElement(e)||o.isJqueryElement(e))&&(e=o.collectFormValues(e)),t)for(i in s=o.getDeepObjectValue(e,r),a=o.result(t[r],s,e,r,n,t)){if(!(u=o.validators[i]))throw c=o.format("Unknown validator %{name}",{name:i}),new Error(c);l=a[i],(l=o.result(l,s,e,r,n,t))&&f.push({attribute:r,value:s,validator:i,globalOptions:n,attributes:e,options:l,error:u.call(u,s,l,r,e,n)})}return f},processValidationResults:function(e,t){e=o.pruneEmptyErrors(e,t),e=o.expandMultipleErrors(e,t),e=o.convertErrorMessages(e,t);var n=t.format||"grouped";if("function"!=typeof o.formatters[n])throw new Error(o.format("Unknown format %{format}",t));return e=o.formatters[n](e),o.isEmpty(e)?void 0:e},async:function(e,t,n){var r=(n=o.extend({},o.async.options,n)).wrapErrors||function(e){return e};!1!==n.cleanAttributes&&(e=o.cleanAttributes(e,t));var i=o.runValidations(e,t,n);return new o.Promise((function(s,a){o.waitForResults(i).then((function(){var u=o.processValidationResults(i,n);u?a(new r(u,n,e,t)):s(e)}),(function(e){a(e)}))}))},single:function(e,t,n){return n=o.extend({},o.single.options,n,{format:"flat",fullMessages:!1}),o({single:e},{single:t},n)},waitForResults:function(e){return e.reduce((function(e,t){return o.isPromise(t.error)?e.then((function(){return t.error.then((function(e){t.error=e||null}))})):e}),new o.Promise((function(e){e()})))},result:function(e){var t=[].slice.call(arguments,1);return"function"==typeof e&&(e=e.apply(null,t)),e},isNumber:function(e){return"number"==typeof e&&!isNaN(e)},isFunction:function(e){return"function"==typeof e},isInteger:function(e){return o.isNumber(e)&&e%1==0},isBoolean:function(e){return"boolean"==typeof e},isObject:function(e){return e===Object(e)},isDate:function(e){return e instanceof Date},isDefined:function(e){return null!=e},isPromise:function(e){return!!e&&o.isFunction(e.then)},isJqueryElement:function(e){return e&&o.isString(e.jquery)},isDomElement:function(e){return!!e&&(!(!e.querySelectorAll||!e.querySelector)&&(!(!o.isObject(document)||e!==document)||("object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&null!==e&&1===e.nodeType&&"string"==typeof e.nodeName)))},isEmpty:function(e){var t;if(!o.isDefined(e))return!0;if(o.isFunction(e))return!1;if(o.isString(e))return o.EMPTY_STRING_REGEXP.test(e);if(o.isArray(e))return 0===e.length;if(o.isDate(e))return!1;if(o.isObject(e)){for(t in e)return!1;return!0}return!1},format:o.extend((function(e,t){return o.isString(e)?e.replace(o.format.FORMAT_REGEXP,(function(e,n,r){return"%"===n?"%{"+r+"}":String(t[r])})):e}),{FORMAT_REGEXP:/(%?)%\{([^\}]+)\}/g}),prettify:function(e){return o.isNumber(e)?100*e%1==0?""+e:parseFloat(Math.round(100*e)/100).toFixed(2):o.isArray(e)?e.map((function(e){return o.prettify(e)})).join(", "):o.isObject(e)?o.isDefined(e.toString)?e.toString():JSON.stringify(e):(e=""+e).replace(/([^\s])\.([^\s])/g,"$1 $2").replace(/\\+/g,"").replace(/[_-]/g," ").replace(/([a-z])([A-Z])/g,(function(e,t,n){return t+" "+n.toLowerCase()})).toLowerCase()},stringifyValue:function(e,t){return(t&&t.prettify||o.prettify)(e)},isString:function(e){return"string"==typeof e},isArray:function(e){return"[object Array]"==={}.toString.call(e)},isHash:function(e){return o.isObject(e)&&!o.isArray(e)&&!o.isFunction(e)},contains:function(e,t){return!!o.isDefined(e)&&(o.isArray(e)?-1!==e.indexOf(t):t in e)},unique:function(e){return o.isArray(e)?e.filter((function(e,t,n){return n.indexOf(e)==t})):e},forEachKeyInKeypath:function(e,t,n){if(o.isString(t)){var r,i="",s=!1;for(r=0;rs&&(r=t.tooLong||this.tooLong||"is too long (maximum is %{count} characters)",u.push(o.format(r,{count:s}))),u.length>0?t.message||u:void 0):t.message||this.notValid||"has an incorrect length"}},numericality:function(e,t,n,r,i){if(o.isDefined(e)){var s,a,u=[],l={greaterThan:function(e,t){return e>t},greaterThanOrEqualTo:function(e,t){return e>=t},equalTo:function(e,t){return e===t},lessThan:function(e,t){return es&&(n=t.tooLate||t.message||this.tooLate||"must be no later than %{date}",n=o.format(n,{date:this.format(s,t),value:this.format(e,t)}),r.push(n)),r.length?o.unique(r):void 0)}}),{parse:null,format:null}),date:function(e,t){return t=o.extend({},t,{dateOnly:!0}),o.validators.datetime.call(o.validators.datetime,e,t)},format:function(e,t){(o.isString(t)||t instanceof RegExp)&&(t={pattern:t});var n,r=(t=o.extend({},this.options,t)).message||this.message||"is invalid",i=t.pattern;if(o.isDefined(e))return o.isString(e)?(o.isString(i)&&(i=new RegExp(t.pattern,t.flags)),(n=i.exec(e))&&n[0].length==e.length?void 0:r):r},inclusion:function(e,t){if(o.isDefined(e)&&(o.isArray(t)&&(t={within:t}),t=o.extend({},this.options,t),!o.contains(t.within,e))){var n=t.message||this.message||"^%{value} is not included in the list";return o.format(n,{value:e})}},exclusion:function(e,t){if(o.isDefined(e)&&(o.isArray(t)&&(t={within:t}),t=o.extend({},this.options,t),o.contains(t.within,e))){var n=t.message||this.message||"^%{value} is restricted";return o.isString(t.within[e])&&(e=t.within[e]),o.format(n,{value:e})}},email:o.extend((function(e,t){var n=(t=o.extend({},this.options,t)).message||this.message||"is not a valid email";if(o.isDefined(e))return o.isString(e)&&this.PATTERN.exec(e)?void 0:n}),{PATTERN:/^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?: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]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$/i}),equality:function(e,t,n,r,i){if(o.isDefined(e)){o.isString(t)&&(t={attribute:t});var s=(t=o.extend({},this.options,t)).message||this.message||"is not equal to %{attribute}";if(o.isEmpty(t.attribute)||!o.isString(t.attribute))throw new Error("The attribute must be a non empty string");var a=o.getDeepObjectValue(r,t.attribute),u=t.comparator||function(e,t){return e===t},l=t.prettify||i&&i.prettify||o.prettify;return u(e,a,t,n,r)?void 0:o.format(s,{attribute:l(t.attribute)})}},url:function(e,t){if(o.isDefined(e)){var n=(t=o.extend({},this.options,t)).message||this.message||"is not a valid url",r=t.schemes||this.schemes||["http","https"],i=t.allowLocal||this.allowLocal||!1,s=t.allowDataUrl||this.allowDataUrl||!1;if(!o.isString(e))return n;var a="^(?:(?:"+r.join("|")+")://)(?:\\S+(?::\\S*)?@)?(?:",u="(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))";if(i?u+="?":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})",a+="(?:[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]+)*"+u+")(?::\\d{2,5})?(?:[/?#]\\S*)?$",s){a="(?:"+a+")|(?:^data:(?:\\w+\\/[-+.\\w]+(?:;[\\w=]+)*)?(?:;base64)?,[A-Za-z0-9-_.!~\\*'();\\/?:@&=+$,%]*$)"}return new RegExp(a,"i").exec(e)?void 0:n}},type:o.extend((function(e,t,n,r,i){if(o.isString(t)&&(t={type:t}),o.isDefined(e)){var s,a=o.extend({},this.options,t),u=a.type;if(!o.isDefined(u))throw new Error("No type was specified");if(s=o.isFunction(u)?u:this.types[u],!o.isFunction(s))throw new Error("validate.validators.type.types."+u+" must be a function.");if(!s(e,a,n,r,i)){var l=t.message||this.messages[u]||this.message||a.message||(o.isFunction(u)?"must be of the correct type":"must be of type %{type}");return o.isFunction(l)&&(l=l(e,t,n,r,i)),o.format(l,{attribute:o.prettify(n),type:u})}}}),{types:{object:function(e){return o.isObject(e)&&!o.isArray(e)},array:o.isArray,integer:o.isInteger,number:o.isNumber,string:o.isString,date:o.isDate,boolean:o.isBoolean},messages:{}})},i.formatters={detailed:function(e){return e},flat:o.flattenErrorsToArray,grouped:function(e){var t;for(t in e=o.groupErrorsByAttribute(e))e[t]=o.flattenErrorsToArray(e[t]);return e},constraint:function(e){var t;for(t in e=o.groupErrorsByAttribute(e))e[t]=e[t].map((function(e){return e.validator})).sort();return e}},i.exposeModule(i,this,e,t,n.amdD)}.call(this,t,e,n.amdD)}},t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={id:r,loaded:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}n.m=e,n.x=e=>{},n.amdD=function(){throw new Error("define cannot be used indirect")},n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e={669:0},t=[[619],[837]],r=e=>{},i=(i,o)=>{for(var s,a,[u,l,c,f]=o,p=0,d=[];p{}),r}o.forEach(i.bind(null,0)),o.push=i.bind(null,o.push.bind(o));var a=n.x;n.x=()=>(n.x=a||(e=>{}),(r=s)())})(),n.x()})(); \ No newline at end of file diff --git a/main.js b/main.js new file mode 100644 index 0000000..9967aa3 --- /dev/null +++ b/main.js @@ -0,0 +1,4 @@ +/******/ (() => { // webpackBootstrap +/******/ "use strict"; +/******/ })() +; \ No newline at end of file diff --git a/mix-manifest.json b/mix-manifest.json index b92b42e..9671d60 100644 --- a/mix-manifest.json +++ b/mix-manifest.json @@ -1,3 +1,4 @@ { - "/demo/demo.js": "/demo/demo.js" + "/demo/demo.js": "/demo/demo.js", + "/demo/demo.css": "/demo/demo.css" } diff --git a/package-lock.json b/package-lock.json index 456a17a..56eb4c6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9340,9 +9340,9 @@ "dev": true }, "sass": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.32.0.tgz", - "integrity": "sha512-fhyqEbMIycQA4blrz/C0pYhv2o4x2y6FYYAH0CshBw3DXh5D5wyERgxw0ptdau1orc/GhNrhF7DFN2etyOCEng==", + "version": "1.32.4", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.32.4.tgz", + "integrity": "sha512-N0BT0PI/t3+gD8jKa83zJJUb7ssfQnRRfqN+GIErokW6U4guBpfYl8qYB+OFLEho+QvnV5ZH1R9qhUC/Z2Ch9w==", "dev": true, "requires": { "chokidar": ">=2.0.0 <4.0.0" diff --git a/package.json b/package.json index 805d4d8..4c97a44 100644 --- a/package.json +++ b/package.json @@ -2,14 +2,14 @@ "name": "tiny-validator", "version": "1.0.0", "description": "Form Validator with validator.js for riotjs", - "scripts": { - "dev": "npm run development", - "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --config=node_modules/laravel-mix/setup/webpack.config.js", - "watch": "npm run development -- --watch", - "watch-poll": "npm run watch -- --watch-poll", - "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js", - "prod": "npm run production", - "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --config=node_modules/laravel-mix/setup/webpack.config.js" + "repository": { + "type": "git", + "url": "git@github.com:tentakelfabrik/tiny-validator.git" + }, + "author": "Björn Hase", + "license": "MIT", + "dependencies": { + "riot": "^5.1.2" }, "dependencies": { "form-serialize": "^0.7.2",