app.js 13 KB

1
  1. (()=>{"use strict";var e,t,n={400:(e,t,n)=>{n.r(t),n.d(t,{Component:()=>k,Fragment:()=>x,cloneElement:()=>$,createContext:()=>G,createElement:()=>m,createRef:()=>g,h:()=>m,hydrate:()=>V,isValidElement:()=>_,options:()=>l,render:()=>B,toChildArray:()=>O});var o,l,r,_,u,i,s,c,p,f={},a=[],d=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,h=Array.isArray;function y(e,t){for(var n in t)e[n]=t[n];return e}function v(e){var t=e.parentNode;t&&t.removeChild(e)}function m(e,t,n){var l,r,_,u={};for(_ in t)"key"==_?l=t[_]:"ref"==_?r=t[_]:u[_]=t[_];if(arguments.length>2&&(u.children=arguments.length>3?o.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(_ in e.defaultProps)void 0===u[_]&&(u[_]=e.defaultProps[_]);return b(e,u,l,r,null)}function b(e,t,n,o,_){var u={type:e,props:t,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==_?++r:_};return null==_&&null!=l.vnode&&l.vnode(u),u}function g(){return{current:null}}function x(e){return e.children}function k(e,t){this.props=e,this.context=t}function w(e,t){if(null==t)return e.__?w(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?w(e):null}function P(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return P(e)}}function S(e){(!e.__d&&(e.__d=!0)&&u.push(e)&&!C.__r++||i!==l.debounceRendering)&&((i=l.debounceRendering)||s)(C)}function C(){var e,t,n,o,l,r,_,i;for(u.sort(c);e=u.shift();)e.__d&&(t=u.length,o=void 0,l=void 0,_=(r=(n=e).__v).__e,(i=n.__P)&&(o=[],(l=y({},r)).__v=r.__v+1,A(i,r,l,n.__n,void 0!==i.ownerSVGElement,null!=r.__h?[_]:null,o,null==_?w(r):_,r.__h),L(o,r),r.__e!=_&&P(r)),u.length>t&&u.sort(c));C.__r=0}function E(e,t,n,o,l,r,_,u,i,s){var c,p,d,y,v,m,g,k=o&&o.__k||a,P=k.length;for(n.__k=[],c=0;c<t.length;c++)if(null!=(y=n.__k[c]=null==(y=t[c])||"boolean"==typeof y||"function"==typeof y?null:"string"==typeof y||"number"==typeof y||"bigint"==typeof y?b(null,y,null,null,y):h(y)?b(x,{children:y},null,null,null):y.__b>0?b(y.type,y.props,y.key,y.ref?y.ref:null,y.__v):y)){if(y.__=n,y.__b=n.__b+1,null===(d=k[c])||d&&y.key==d.key&&y.type===d.type)k[c]=void 0;else for(p=0;p<P;p++){if((d=k[p])&&y.key==d.key&&y.type===d.type){k[p]=void 0;break}d=null}A(e,y,d=d||f,l,r,_,u,i,s),v=y.__e,(p=y.ref)&&d.ref!=p&&(g||(g=[]),d.ref&&g.push(d.ref,null,y),g.push(p,y.__c||v,y)),null!=v?(null==m&&(m=v),"function"==typeof y.type&&y.__k===d.__k?y.__d=i=U(y,i,e):i=T(e,y,d,k,v,i),"function"==typeof n.type&&(n.__d=i)):i&&d.__e==i&&i.parentNode!=e&&(i=w(d))}for(n.__e=m,c=P;c--;)null!=k[c]&&("function"==typeof n.type&&null!=k[c].__e&&k[c].__e==n.__d&&(n.__d=D(o).nextSibling),I(k[c],k[c]));if(g)for(c=0;c<g.length;c++)H(g[c],g[++c],g[++c])}function U(e,t,n){for(var o,l=e.__k,r=0;l&&r<l.length;r++)(o=l[r])&&(o.__=e,t="function"==typeof o.type?U(o,t,n):T(n,o,o,l,o.__e,t));return t}function O(e,t){return t=t||[],null==e||"boolean"==typeof e||(h(e)?e.some((function(e){O(e,t)})):t.push(e)),t}function T(e,t,n,o,l,r){var _,u,i;if(void 0!==t.__d)_=t.__d,t.__d=void 0;else if(null==n||l!=r||null==l.parentNode)e:if(null==r||r.parentNode!==e)e.appendChild(l),_=null;else{for(u=r,i=0;(u=u.nextSibling)&&i<o.length;i+=1)if(u==l)break e;e.insertBefore(l,r),_=r}return void 0!==_?_:l.nextSibling}function D(e){var t,n,o;if(null==e.type||"string"==typeof e.type)return e.__e;if(e.__k)for(t=e.__k.length-1;t>=0;t--)if((n=e.__k[t])&&(o=D(n)))return o;return null}function M(e,t,n){"-"===t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||d.test(t)?n:n+"px"}function W(e,t,n,o,l){var r;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof o&&(e.style.cssText=o=""),o)for(t in o)n&&t in n||M(e.style,t,"");if(n)for(t in n)o&&n[t]===o[t]||M(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])r=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+r]=n,n?o||e.addEventListener(t,r?N:j,r):e.removeEventListener(t,r?N:j,r);else if("dangerouslySetInnerHTML"!==t){if(l)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==t&&"height"!==t&&"href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&"rowSpan"!==t&&"colSpan"!==t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&"-"!==t[4]?e.removeAttribute(t):e.setAttribute(t,n))}}function j(e){return this.l[e.type+!1](l.event?l.event(e):e)}function N(e){return this.l[e.type+!0](l.event?l.event(e):e)}function A(e,t,n,o,r,_,u,i,s){var c,p,f,a,d,v,m,b,g,w,P,S,C,U,O,T=t.type;if(void 0!==t.constructor)return null;null!=n.__h&&(s=n.__h,i=t.__e=n.__e,t.__h=null,_=[i]),(c=l.__b)&&c(t);try{e:if("function"==typeof T){if(b=t.props,g=(c=T.contextType)&&o[c.__c],w=c?g?g.props.value:c.__:o,n.__c?m=(p=t.__c=n.__c).__=p.__E:("prototype"in T&&T.prototype.render?t.__c=p=new T(b,w):(t.__c=p=new k(b,w),p.constructor=T,p.render=R),g&&g.sub(p),p.props=b,p.state||(p.state={}),p.context=w,p.__n=o,f=p.__d=!0,p.__h=[],p._sb=[]),null==p.__s&&(p.__s=p.state),null!=T.getDerivedStateFromProps&&(p.__s==p.state&&(p.__s=y({},p.__s)),y(p.__s,T.getDerivedStateFromProps(b,p.__s))),a=p.props,d=p.state,p.__v=t,f)null==T.getDerivedStateFromProps&&null!=p.componentWillMount&&p.componentWillMount(),null!=p.componentDidMount&&p.__h.push(p.componentDidMount);else{if(null==T.getDerivedStateFromProps&&b!==a&&null!=p.componentWillReceiveProps&&p.componentWillReceiveProps(b,w),!p.__e&&null!=p.shouldComponentUpdate&&!1===p.shouldComponentUpdate(b,p.__s,w)||t.__v===n.__v){for(t.__v!==n.__v&&(p.props=b,p.state=p.__s,p.__d=!1),p.__e=!1,t.__e=n.__e,t.__k=n.__k,t.__k.forEach((function(e){e&&(e.__=t)})),P=0;P<p._sb.length;P++)p.__h.push(p._sb[P]);p._sb=[],p.__h.length&&u.push(p);break e}null!=p.componentWillUpdate&&p.componentWillUpdate(b,p.__s,w),null!=p.componentDidUpdate&&p.__h.push((function(){p.componentDidUpdate(a,d,v)}))}if(p.context=w,p.props=b,p.__P=e,S=l.__r,C=0,"prototype"in T&&T.prototype.render){for(p.state=p.__s,p.__d=!1,S&&S(t),c=p.render(p.props,p.state,p.context),U=0;U<p._sb.length;U++)p.__h.push(p._sb[U]);p._sb=[]}else do{p.__d=!1,S&&S(t),c=p.render(p.props,p.state,p.context),p.state=p.__s}while(p.__d&&++C<25);p.state=p.__s,null!=p.getChildContext&&(o=y(y({},o),p.getChildContext())),f||null==p.getSnapshotBeforeUpdate||(v=p.getSnapshotBeforeUpdate(a,d)),E(e,h(O=null!=c&&c.type===x&&null==c.key?c.props.children:c)?O:[O],t,n,o,r,_,u,i,s),p.base=t.__e,t.__h=null,p.__h.length&&u.push(p),m&&(p.__E=p.__=null),p.__e=!1}else null==_&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=F(n.__e,t,n,o,r,_,u,s);(c=l.diffed)&&c(t)}catch(e){t.__v=null,(s||null!=_)&&(t.__e=i,t.__h=!!s,_[_.indexOf(i)]=null),l.__e(e,t,n)}}function L(e,t){l.__c&&l.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){l.__e(e,t.__v)}}))}function F(e,t,n,l,r,_,u,i){var s,c,p,a=n.props,d=t.props,y=t.type,m=0;if("svg"===y&&(r=!0),null!=_)for(;m<_.length;m++)if((s=_[m])&&"setAttribute"in s==!!y&&(y?s.localName===y:3===s.nodeType)){e=s,_[m]=null;break}if(null==e){if(null===y)return document.createTextNode(d);e=r?document.createElementNS("http://www.w3.org/2000/svg",y):document.createElement(y,d.is&&d),_=null,i=!1}if(null===y)a===d||i&&e.data===d||(e.data=d);else{if(_=_&&o.call(e.childNodes),c=(a=n.props||f).dangerouslySetInnerHTML,p=d.dangerouslySetInnerHTML,!i){if(null!=_)for(a={},m=0;m<e.attributes.length;m++)a[e.attributes[m].name]=e.attributes[m].value;(p||c)&&(p&&(c&&p.__html==c.__html||p.__html===e.innerHTML)||(e.innerHTML=p&&p.__html||""))}if(function(e,t,n,o,l){var r;for(r in n)"children"===r||"key"===r||r in t||W(e,r,null,n[r],o);for(r in t)l&&"function"!=typeof t[r]||"children"===r||"key"===r||"value"===r||"checked"===r||n[r]===t[r]||W(e,r,t[r],n[r],o)}(e,d,a,r,i),p)t.__k=[];else if(E(e,h(m=t.props.children)?m:[m],t,n,l,r&&"foreignObject"!==y,_,u,_?_[0]:n.__k&&w(n,0),i),null!=_)for(m=_.length;m--;)null!=_[m]&&v(_[m]);i||("value"in d&&void 0!==(m=d.value)&&(m!==e.value||"progress"===y&&!m||"option"===y&&m!==a.value)&&W(e,"value",m,a.value,!1),"checked"in d&&void 0!==(m=d.checked)&&m!==e.checked&&W(e,"checked",m,a.checked,!1))}return e}function H(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){l.__e(e,n)}}function I(e,t,n){var o,r;if(l.unmount&&l.unmount(e),(o=e.ref)&&(o.current&&o.current!==e.__e||H(o,null,t)),null!=(o=e.__c)){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(e){l.__e(e,t)}o.base=o.__P=null,e.__c=void 0}if(o=e.__k)for(r=0;r<o.length;r++)o[r]&&I(o[r],t,n||"function"!=typeof e.type);n||null==e.__e||v(e.__e),e.__=e.__e=e.__d=void 0}function R(e,t,n){return this.constructor(e,n)}function B(e,t,n){var r,_,u;l.__&&l.__(e,t),_=(r="function"==typeof n)?null:n&&n.__k||t.__k,u=[],A(t,e=(!r&&n||t).__k=m(x,null,[e]),_||f,f,void 0!==t.ownerSVGElement,!r&&n?[n]:_?null:t.firstChild?o.call(t.childNodes):null,u,!r&&n?n:_?_.__e:t.firstChild,r),L(u,e)}function V(e,t){B(e,t,V)}function $(e,t,n){var l,r,_,u,i=y({},e.props);for(_ in e.type&&e.type.defaultProps&&(u=e.type.defaultProps),t)"key"==_?l=t[_]:"ref"==_?r=t[_]:i[_]=void 0===t[_]&&void 0!==u?u[_]:t[_];return arguments.length>2&&(i.children=arguments.length>3?o.call(arguments,2):n),b(e.type,i,l||e.key,r||e.ref,null)}function G(e,t){var n={__c:t="__cC"+p++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,o;return this.getChildContext||(n=[],(o={})[t]=this,this.getChildContext=function(){return o},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some((function(e){e.__e=!0,S(e)}))},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}o=a.slice,l={__e:function(e,t,n,o){for(var l,r,_;t=t.__;)if((l=t.__c)&&!l.__)try{if((r=l.constructor)&&null!=r.getDerivedStateFromError&&(l.setState(r.getDerivedStateFromError(e)),_=l.__d),null!=l.componentDidCatch&&(l.componentDidCatch(e,o||{}),_=l.__d),_)return l.__E=l}catch(t){e=t}throw e}},r=0,_=function(e){return null!=e&&void 0===e.constructor},k.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=y({},this.state),"function"==typeof e&&(e=e(y({},n),this.props)),e&&y(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),S(this))},k.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),S(this))},k.prototype.render=x,u=[],s="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,c=function(e,t){return e.__v.__b-t.__v.__b},C.__r=0,p=0},949:function(e,t,n){var o,l=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var r=n(400),_=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={value:""},t.onSubmit=function(e){alert("Submited a todo"),e.preventDefault()},t}return l(t,e),t.prototype.render=function(e,t){return t.value,(0,r.h)("div",{class:"w-full max-w-xs"},(0,r.h)("form",{class:"bg-white shadow-md rounded px-8 pt-6 pb-8 mb-4"},(0,r.h)("div",{class:"mb-4"},(0,r.h)("label",{class:"block text-gray-700 text-sm font-bold mb-2",for:"username"},"Username"),(0,r.h)("input",{class:"shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline",id:"username",type:"text",placeholder:"Username"})),(0,r.h)("div",{class:"mb-6"},(0,r.h)("label",{class:"block text-gray-700 text-sm font-bold mb-2",for:"password"},"Password"),(0,r.h)("input",{class:"shadow appearance-none border border-red-500 rounded w-full py-2 px-3 text-gray-700 mb-3 leading-tight focus:outline-none focus:shadow-outline",id:"password",type:"password",placeholder:"******************"}),(0,r.h)("p",{class:"text-red-500 text-xs italic"},"Please choose a password.")),(0,r.h)("div",{class:"flex items-center justify-between"},(0,r.h)("button",{class:"bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded focus:outline-none focus:shadow-outline",type:"button"},"Sign In"),(0,r.h)("a",{class:"inline-block align-baseline font-bold text-sm text-blue-500 hover:text-blue-800",href:"#"},"Forgot Password?"))),(0,r.h)("p",{class:"text-center text-gray-500 text-xs"},"©2020 Acme Corp. All rights reserved."))},t}(r.Component);t.default=_}},o={};function l(e){var t=o[e];if(void 0!==t)return t.exports;var r=o[e]={exports:{}};return n[e].call(r.exports,r,r.exports,l),r.exports}l.d=(e,t)=>{for(var n in t)l.o(t,n)&&!l.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},l.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),l.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},e=l(400),t=l(949),(0,e.render)((0,e.h)((function(){return(0,e.h)("div",{class:"w-full max-w-xs"},(0,e.h)("p",{class:"text-3xl"},"aHello ",(0,e.h)("em",null,"World!"),"!",(0,e.h)(t.default,null)))}),null),document.getElementById("app"))})();