diff --git a/dist/index.js b/dist/index.js index 34dcb92..57c69e0 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1 +1 @@ -!function(e){var t={};function r(n){if(t[n])return t[n].exports;var a=t[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,r),a.l=!0,a.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)r.d(n,a,function(t){return e[t]}.bind(null,a));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=23)}([function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r1?t-1:0),n=1;n=0;a--){var i=r[a],o=new e;i.__hash={};for(var s=["on","once","off","emit"],u=s.length-1;u>=0;u--){var l=s[u];i[l]=o[l]}}}}]),e}();a.DOM="DOM",a.DESTROY="DESTROY",a.DATA="DATA",t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(r(2)),a=i(r(3));function i(e){return e&&e.__esModule?e:{default:e}}var o={}.toString;function s(e){return function(t){return o.call(t)=="[object "+e+"]"}}function u(e){return void 0===e||null===e||c.isBoolean(e)||c.isNumber(e)||c.isString(e)}function l(e){return null===e||void 0===e?"":e.toString()}function f(e,t){return t?e.replace(/"/g,"""):e.replace(/&/g,"&").replace(/1&&void 0!==arguments[1]?arguments[1]:[];return t.__children.forEach(function(t){t instanceof migi.VirtualDom?(e(t,r),r.push(t)):t instanceof migi.Component&&(e(t.__virtualDom,r),r.push(t.__virtualDom))}),r}};t.default=c},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r=0;o--){var s=i[o];t[s]=a[s]}}return t}(r),this.__props=function(e){for(var t=0,r=e.length;t1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var a=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,null,r,n)),i=a,o=Object.getPrototypeOf(i);return["on","once","emit","off","clean","inTo","appendTo","prependTo","before","after","replace","top","parent","children","dom","toString","preString","findChild","findChildren","find","findAll","stopPropagation","element","style","model","virtualDom","ref"].forEach(function(e){if(o.hasOwnProperty(e))throw new Error("cannot overwrite method of '"+e+"'")}),i.constructor.__migiName&&(i.__name=i.constructor.__migiName),i.__virtualDom=null,i.__ref={},i.__bindHash={},i.__ob=[],i.__bindProperty={},i.__props.forEach(function(e,t){var r=e[0],n=e[1];i.__init(r,n,t)}),a}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),n(t,[{key:"__init",value:function(e,t,r){var n=this;if(/^on[a-zA-Z]/.test(e)){var i=e.slice(2).toLowerCase();n.once(a.default.DOM,function(){n.virtualDom.__addEvt(i,t)})}else if(/^on-[a-zA-Z\d_]/.test(e)){i=e.slice(3);n.on(i,function(){for(var e=arguments.length,r=Array(e),n=0;n-1&&(t.__ob__.splice(r,1),t.__cb__.splice(r,1))});var r=e.virtualDom.__destroy();return e.emit(a.default.DESTROY),e.__hash={},e.__bindProperty=null,r}},{key:"__initBind",value:function(e){return!this.__bindHash.hasOwnProperty(e)}},{key:"__getBind",value:function(e){return this.__bindHash[e]}},{key:"__setBind",value:function(e,t){this.__bindHash[e]=t,this.__array(e,t)}},{key:"__array",value:function(e,t){var r=this;Array.isArray(t)&&(t.__proto__=c.default,t.__ob__=t.__ob__||[],t.__cb__=t.__cb__||[],-1==t.__ob__.indexOf(r)&&(r.__ob.push(t),t.__ob__.push(r),t.__cb__.push(function(t){r.__data(e,t)})))}},{key:"stopPropagation",get:function(){return this.__stopPropagation},set:function(e){this.__stopPropagation=e}},{key:"element",get:function(){return this.virtualDom?this.virtualDom.element:null}},{key:"style",get:function(){return this.__style},set:function(e){this.__style=e}},{key:"model",get:function(){return this.__model},set:function(e){if(!(e instanceof f.default))throw new Error("can not set model to a non Model: "+e);this.__model=e,e.__add(this)}},{key:"virtualDom",get:function(){return this.__virtualDom}},{key:"ref",get:function(){return this.__ref}}]),t}();t.default=p},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={};t.default={get:function(e){return n[e]},set:function(e){return n[e.__uid]=e,e}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=t,this.cb=r}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r-1&&this.__ref.splice(t,1)}},{key:"name",get:function(){return this.__name}}]),t}();["__data","__record","__unRecord","__initBind","__getBind","__setBind","__array"].forEach(function(e){u.prototype[e]=i.default.prototype[e]}),t.default=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r";(e+=">",this.props.dangerouslySetInnerHTML)?e+=n=(n=this.props.dangerouslySetInnerHTML)instanceof l.default?n.toSourceString():Array.isArray(n)?u.default.joinSourceArray(n):u.default.stringify(n):e+=this.__renderChildren();return e+=""}},{key:"preString",value:function(){for(var e=0,t=this.__props.length;e=0;r--){var n=e[r];if(Array.isArray(n)&&n.length)return this.isLast(n);if(n==this)return!0;if(n instanceof t)return!1;if(n instanceof l.default&&(n=n.v,Array.isArray(n)&&n.length))return this.isLast(n)}}},{key:"isEmpty",value:function(){return function e(t){var r=!0;if(Array.isArray(t))for(var n=0,a=t.length;n1&&void 0!==arguments[1]?arguments[1]:[];if(Array.isArray(t))for(var n=0,a=t.length;n-1?e?t.length-r-1:r:-1}},{key:"getIdxOfType",value:function(e,t){var r=t?this.nextAll(e):this.prevAll(e);t?r.unshift(this):r.push(this);var n=r.indexOf(this);return n>-1?t?r.length-n-1:n:-1}},{key:"closest",value:function(e){for(var t=this;t&&t!=this.top;){if(!m.default.nci(e,t))return t;t=t.parent}}},{key:"__renderProp",value:function(e,t){var r=this,n="";if(/^on[a-zA-Z]/.test(e))r.__renderPropEventDelay=r.__renderPropEventDelay||[],r.__renderPropEventDelay.push({k:e.slice(2).toLowerCase(),v:t});else if(t instanceof l.default){if("dangerouslySetInnerHTML"==e)return"";var a=t.toString(!0);switch("className"==e?e="class":"htmlFor"==e&&(e="for"),r.__cache[e]=a,v.default.special(r.__name,e)){case v.default.RENDER_EXIST:t.v&&(n=" "+e+'="'+a+'"');break;case v.default.RENDER_DOM:r.once(i.default.DOM,function(){r.__updateAttr(e,t.v)});break;default:n=" "+e+'="'+a+'"'}}else{a=Array.isArray(t)?u.default.joinSourceArray(t):u.default.stringify(t);if("dangerouslySetInnerHTML"==e)return"";switch("className"==e?e="class":"htmlFor"==e&&(e="for"),r.__cache[e]=a,v.default.special(r.__name,e)){case v.default.RENDER_EXIST:t&&(n=" "+e+'="'+u.default.encodeHtml(a,!0)+'"');break;case v.default.RENDER_DOM:r.once(i.default.DOM,function(){r.__updateAttr(e,t)});break;default:n=" "+e+'="'+u.default.encodeHtml(a,!0)+'"'}}if(r.__style)switch(e){case"class":case"id":n=" migi-"+n.slice(1)}return n}},{key:"__renderChildren",value:function(){for(var e="",t=0,r=this.children.length;t=0;t--){var r=this.__listener[t];e.removeEventListener(r[0],r[1])}this.__listener=null}}},{key:"find",value:function(e){if(u.default.isFunction(e))return function(e,t){return M(e,t,!0)[0]||null}(e,this.children);if(this.element){var t=this.element.querySelector(D(e)).getAttribute("migi-uid");return y.default.get(t)||null}return null}},{key:"findAll",value:function(e){if(u.default.isFunction(e))return M(e,this.children);var t=[];if(this.element){var r=this.element.querySelectorAll(D(e));Array.from(r).forEach(function(e){if(e){var r=e.getAttribute("migi-uid"),n=y.default.get(r)||null;n&&t.push(n)}})}return t}},{key:"__onDom",value:function(){a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"__onDom",this).call(this);var e={start:0,first:!0};this.__checkBlank(this.children,e),(e.empty||e.first)&&this.__insertBlank(e.start)}},{key:"__checkBlank",value:function(e,t){if(Array.isArray(e)&&e.length)for(var r=0,n=e.length;r=a?r.appendChild(t):r.insertBefore(t,n[e])}},{key:"__onData",value:function(e,t){if(this.dom){for(var r=0,n=this.__props.length;r-1;break;case 2:o=a.k.indexOf(e)>-1;break;case 3:for(var s={},u=e.length-1;u>=0;u--)s[e[u]]=!0;var f=a.k;for(u=0,n=f.length;u-1;break;case 2:i=r.k.indexOf(e)>-1;break;case 3:for(var o={},s=e.length-1;s>=0;s--)o[e[s]]=!0;for(var f=r.k,c=(s=0,f.length);s=0;n--){var a=this.children[n];a instanceof t&&a.__updateStyle()}}},{key:"__init",value:function(e,t){this.__selfClose=T.default.hasOwnProperty(e),function e(t,r){if(Array.isArray(t))for(var n=0,a=t.length;n2&&void 0!==arguments[2]?arguments[2]:[],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];return a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"__reset",this).call(this,e,r,n,i),this.__init(r,i),this.__hasDes=!1,this}},{key:"__destroy",value:function(){return(this.__onHover||this.__outHover)&&this.element&&(this.element.removeEventListener("mouseenter",this.__onHover),this.element.removeEventListener("mouseleave",this.__outHover)),this.__hash={},this.__cache=null,this.__names=null,this.__classes=null,this.__ids=null,this.__hover=!1,this.__active=!1,this.__listener=null,this.__parent=null,this.__top=null,this.__dom=!1,this.__style=null,this.__element=null,this.__renderPropEventDelay=null,this}},{key:"clean",value:function(){a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"clean",this).call(this),this.__renderPropEventDelay=null,this.__removeListener(),this.__names=null,this.__classes=null,this.__ids=null,this.__hover=!1,this.__active=!1}},{key:"names",get:function(){return this.__names||(this.__names=[])}},{key:"element",get:function(){return this.__element||(this.__element=document.querySelector(this.__name+'[migi-uid="'+this.__uid+'"]'))}},{key:"style",get:function(){return this.__style},set:function(e){this.__style=e,this.parent instanceof t?this.__names=this.parent.names.slice():this.__names=[],this.__names.push(this.__name);for(var r=0,n=this.children.length;r=a)return;var o=r,s=a,u=o,l=t[u],f=!0;for(;ot}),e):""},preId:function(e){return void 0!==e&&null!==e||(e=""),(e=e.toString().trim())?"#"+e:""},combo:function(e,t,r,n){var a=0,i=0;if(e&&e.length){var o=function e(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;if(r-a>1){e(t,r,n,a+1);for(var i=0,o=n.length;i=s.length&&o.indexOf(s)==o.length-s.length;break;case"~=":r=new RegExp("\\b"+s+"\\b").test(o);break;case"*=":r=o.indexOf(s)>-1;break;case"|=":r=0==o.indexOf(s)||0==o.indexOf(s+"-");break;default:r=!1;break e}if(!r)break}}return r},nci:function(e,t){var r=/^[a-z\d]+/i.exec(e);if(r&&r[0].toUpperCase()!=t.__name.toUpperCase())return!0;var n=e.match(/\.[a-z\d_-]+/gi);if(n&&t.__cache.class)for(var a=n.length-1;a>=0;a--)if(!new RegExp("\\b"+n[a].slice(1)+"\\b","i").test(t.__cache.class))return!0;var i=/#[a-z\d_-]+/i.exec(e);return!(!i||!t.__cache.id||i[0].toUpperCase()==t.__cache.id.toUpperCase())||void 0}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){3==e.target.nodeType&&(e.target=e.target.parentNode)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(r(2)),a=(o(r(8)),o(r(3))),i=o(r(1));o(r(9)),o(r(10));function o(e){return e&&e.__esModule?e:{default:e}}function s(e,t,r){for(var o="",l=e.shift(),f=t.length;l=0;m--)l(m,t,r,a,O,c.parent,d,_);if(O.hasOwnProperty("_v")&&f(d,O),_&&O.hasOwnProperty("_:")&&O["_:"].forEach(function(e){e[0].forEach(function(e){var t=c.__uid;switch(e){case"hover":var r=function(){i.default.get(t).__hover=!0,i.default.get(t).__updateStyle()},a=function(){i.default.get(t).__hover=!1,i.default.get(t).__updateStyle()},s=function(){c.element.addEventListener("mouseenter",r),c.element.addEventListener("mouseleave",a)};c.__dom?s():c.once(n.default.DOM,s),c.__onHover=r,c.__outHover=a;break;case"active":var u=function(){i.default.get(t).__active=!0,i.default.get(t).__updateStyle()},l=function(){i.default.get(t).__active=!1,i.default.get(t).__updateStyle()},f=function(){c.element.addEventListener("mousedown",u),window.addEventListener("mouseup",l,!0),window.addEventListener("touchend",l,!0),window.addEventListener("touchcancel",l,!0),window.addEventListener("blur",l),window.addEventListener("dragend",l)};c.__dom?f():c.once(n.default.DOM,f),o.default.add(t,l)}})}),O.hasOwnProperty("_:")||O.hasOwnProperty("_[")){var b=function(n){if(n&&n.hasOwnProperty("_[")){var i=n["_["];i.forEach(function(n){s.default.attr(n[0],c)&&(i=n[1],e&&l(e-1,t,r,a,i,c.parent,d,_),i.hasOwnProperty("_v")&&f(d,i))})}};O.hasOwnProperty("_:")&&(T=O["_:"]).forEach(function(n){s.default.pseudo(n[0],c,g)&&(T=n[1],e&&l(e-1,t,r,a,T,c.parent,d,_),T.hasOwnProperty("_v")&&f(d,T))}),b(O),b(T)}if(O.hasOwnProperty("_>")){var T=O["_>"];l(e-1,t,r,a,T,c.parent,d,!1,h)}if(O.hasOwnProperty("_+")){T=O["_+"];(E=c.prev())&&Object.keys(T).forEach(function(n){s.default.nci(n,E)||(T[n].hasOwnProperty("_v")&&f(d,T[n]),l(e-1,t,r,a,T[n],c.parent,d,!1,h))})}if(O.hasOwnProperty("_~")){T=O["_~"];var k=c.prevAll();if(k.length){var w=!1;for(v=k.length-1;v>=0;v--){var E=k[v];if(Object.keys(T).forEach(function(n){s.default.nci(n,E)||(T[n].hasOwnProperty("_v")&&f(d,T[n]),w=!0,l(e-1,t,r,a,T[n],c.parent,d,!1,h))}),w)break}}}}}}function f(e,t){t._v.forEach(function(r){r[2]=t._p,e.push(r)})}function c(e){var t=e.charAt(0).toUpperCase()+e.slice(1);return window["inner"+t]||document.documentElement["client"+t]||document.body["client"+t]}t.default=function(e,t,r,n,s,u){var f=[];if(l(e.length-1,e,t,r,n.default,s,f,u),n.media&&(n.media.forEach(function(n){var a=!1;n.query.forEach(function(i){if(!a)for(var o=0,d=i.length;o=p)return a=!0,void l(e.length-1,e,t,r,n.style,s,f,u)}else if(v<=p)return a=!0,void l(e.length-1,e,t,r,n.style,s,f,u);break;case"device-width":case"device-height":(v=window.screen[h.slice(7)])==p&&(a=!0,l(e.length-1,e,t,r,n.style,s,f,u));break;case"min-device-width":case"min-device-height":case"max-device-width":case"max-device-height":if(v=window.screen[h.slice(11)],0==h.indexOf("min-")){if(v>=p)return a=!0,void l(e.length-1,e,t,r,n.style,s,f,u)}else if(v<=p)return a=!0,void l(e.length-1,e,t,r,n.style,s,f,u);break;case"aspect-ratio":if((v=c("width")/c("height"))==(y=(y=p.split("/"))[0]/y[1]))return a=!0,void l(e.length-1,e,t,r,n.style,s,f,u);break;case"min-aspect-ratio":case"max-aspect-ratio":if(v=c("width")/c("height"),y=(y=p.split("/"))[0]/y[1],0==h.indexOf("min-")){if(v>=p)return a=!0,void l(e.length-1,e,t,r,n.style,s,f,u)}else if(v<=p)return a=!0,void l(e.length-1,e,t,r,n.style,s,f,u);break;case"device-aspect-ratio":if((v=window.screen.width/window.screen.height)==(y=(y=p.split("/"))[0]/y[1]))return a=!0,void l(e.length-1,e,t,r,n.style,s,f,u);break;case"min-device-aspect-ratio":case"max-device-aspect-ratio":var y;if(v=window.screen.width/window.screen.height,y=(y=p.split("/"))[0]/y[1],0==h.indexOf("min-")){if(v>=p)return a=!0,void l(e.length-1,e,t,r,n.style,s,f,u)}else if(v<=p)return a=!0,void l(e.length-1,e,t,r,n.style,s,f,u);break;case"device-pixel-ratio":if((v=window.devicePixelRatio)==p)return a=!0,void l(e.length-1,e,t,r,n.style,s,f,u);break;case"min-device-pixel-ratio":case"max-device-pixel-ratio":if(v=window.devicePixelRatio,0==h.indexOf("min-")){if(v>=p)return a=!0,void l(e.length-1,e,t,r,n.style,s,f,u)}else if(v<=p)return a=!0,void l(e.length-1,e,t,r,n.style,s,f,u)}}}})}),u)){var d,_=function(){d&&clearTimeout(d),d=setTimeout(function(){i.default.get(s.__uid).__updateStyle()},100)};window.addEventListener("resize",_),o.default.add(s.__uid,_)}(0,a.default)(f,function(e,t){var r=e[2],n=t[2];if(r==n)return e[0]>t[0];for(var a=0;a<3;a++)if(r[a]!=n[a])return r[a]>n[a];return e[0]>t[0]});var h="";return f.forEach(function(e){h+=e[1]+";"}),h}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=new Array(4096),a={index:0,add:function(e){!e.__hasDes&&this.index<4096&&(n[this.index++]=e,e.__hasDes=!0)},get:function(){return n[--this.index]}};t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,a=o(r(5)),i=o(r(13));function o(e){return e&&e.__esModule?e:{default:e}}function s(e,t,r,n){t.unshift(e.__name),r.unshift(i.default.splitClass(e.__cache.class)),n.unshift(i.default.preId(e.__cache.id))}function u(e,t,r,a,o,s){if(!n)for(var l=i.default.combo(r[e],t[e],a[e],o),f=0,c=l.length;f=0;h--)u(h,t,r,a,_,s.parent)}if(_.hasOwnProperty("_v"))return void(n=!0);if(_.hasOwnProperty("_:")||_.hasOwnProperty("_[")){var p=function(o){if(o&&o.hasOwnProperty("_[")){var l=o["_["];l.forEach(function(o){i.default.attr(o[0],s)&&(l=o[1],e&&u(e-1,t,r,a,l,s.parent),l.hasOwnProperty("_v")&&(n=!0))})}};_.hasOwnProperty("_:")&&(v=_["_:"]).forEach(function(o){i.default.pseudo(o[0],s,d)&&(v=o[1],e&&u(e-1,t,r,a,v,s.parent),v.hasOwnProperty("_v")&&(n=!0))}),p(_),p(v)}if(_.hasOwnProperty("_>")){var v=_["_>"];u(e-1,t,r,a,v,s.parent)}if(_.hasOwnProperty("_+")){v=_["_+"];(O=s.prev())&&Object.keys(v).forEach(function(o){i.default.nci(o,O)||(v[o].hasOwnProperty("_v")?n=!0:u(e-1,t,r,a,v[o],s.parent))})}if(_.hasOwnProperty("_~")){v=_["_~"];var y=s.prevAll();if(y.length){var g=!1;for(f=y.length-1;f>=0;f--){var O=y[f];if(Object.keys(v).forEach(function(o){i.default.nci(o,O)||(v[o].hasOwnProperty("_v")?n=!0:(g=!0,u(e-1,t,r,a,v[o],s.parent)))}),g)break}}}}}}t.default=function(e,t,r){var i=e.target,o=a.default.get(i.getAttribute("migi-uid"));if(!o.__dom)return[!1];if(o==r||!o)return[!1];var l=[],f=[],c=[];s(o,l,f,c);for(var d=o;d.parent&&d.parent!=r;)s(d=d.parent,l,f,c);for(n=!1,u(l.length-1,l,f,c,t,o);!n&&l.length;)o=o.parent,l.pop(),f.pop(),c.pop(),u(l.length-1,l,f,c,t,o);return[n,o]}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){return e&&e.__esModule?e:{default:e}}(r(1));var a={button:{disabled:1},input:{autofocus:1,checked:1,defaultChecked:2,defaultchecked:2,defaultValue:2,defaultvalue:2,disabled:1,multiple:1,readOnly:1,readonly:1,required:1},link:{disabled:1},option:{defaultSelected:2,defaultselected:2,disabled:1,selected:1,text:2},select:{autofocus:1,disabled:1,multiple:1,selectedIndex:2,selectedindex:2},textarea:{autofocus:1,defaultValue:2,defaultvalue:2,disabled:1,readOnly:1,readonly:1},audio:{autoplay:1,controls:1,loop:1,muted:1},video:{autoplay:1,controls:1,loop:1,muted:1}},i={button:{disabled:2},input:{autofocus:2,checked:2,defaultChecked:2,defaultchecked:2,defaultValue:1,defaultvalue:1,disabled:2,readOnly:2,readonly:2,required:2,value:1},link:{checked:2},option:{defaultSelected:2,defaultselected:2,disabled:2,selected:2,text:1},select:{autofocus:2,disabled:2,required:2,selectedIndex:0,selectedindex:0,value:1},textarea:{autofocus:2,defaultValue:1,defaultvalue:1,disabled:2,readOnly:2,readonly:2,required:2,value:1},audio:{autoplay:2,controls:2,loop:2,muted:2},video:{autoplay:2,controls:2,loop:2,muted:2}},o={defaultchecked:"defaultChecked",defaultselected:"defaultSelected",defaultvalue:"defautlValue",readonly:"readOnly",selectindex:"selectIndex"};t.default={RENDER_EXIST:1,RENDER_DOM:2,special:function(e,t){if(a.hasOwnProperty(e)){var r=a[e];if(r.hasOwnProperty(t))return r[t]}},update:function(e,t,r,a,s){if(i.hasOwnProperty(e)){var u=i[e];if(u.hasOwnProperty(r)){switch(u=u[r],r=o[r]||r,u){case 0:a=parseInt(a),t[r]=a||0;break;case 1:a=n.default.stringify(a),t[r]=a;break;case 2:a=!!a,t[r]=a}return}}switch(r){case"className":r="class";break;case"htmlFor":r="for"}if(s)switch(r){case"id":case"class":r="migi-"+r}null===a||void 0===a?t.removeAttribute(r):"id"==r?t[r]=a:"class"==r?t.className=a:t.setAttribute(r,a)}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={img:!0,meta:!0,link:!0,br:!0,basefont:!0,base:!0,col:!0,embed:!0,frame:!0,hr:!0,input:!0,keygen:!0,area:!0,param:!0,source:!0,track:!0,wbr:!0}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={optimizeArrayDiff:!0}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r=t.length?e.appendChild(u):e.insertBefore(u,t[r])}else{if(u=a.toString(),r>=t.length)e.insertAdjacentHTML("beforeend",u);else if(1==t[r].nodeType)t[r].insertAdjacentHTML("beforebegin",u);else{var f=s.default.getParent(a.__name);f.innerHTML=u,e.insertBefore(f.firstChild,t[r])}a.emit(n.default.DOM)}}function O(e,t,r,n,a,i){if(Array.isArray(r)){n.index.push(0);for(var s=0,u=Math.max(r.length,1);s=0;a--)t[O=n[a]]=e[O];c.default.set(t);var s={};for(a=e.__props.length-1;a>=0;a--){var f=e.__props[a];if(0!=(O=f[0]).indexOf("on")||"on"==O)if(s[O]=!0,t.props.hasOwnProperty(O)){var d=f[1],v=t.props[O];v instanceof p.default&&(v=v.v),d instanceof p.default&&(d=d.v),v!==d&&t.__updateAttr(O,v),t.__cache[O]=v}else t.__updateAttr(O,null),delete t.__cache[O]}e.__removeListener();var y=t.__props.length,g=function(){f=t.__props[a],O=f[0];var e=f[1];e instanceof p.default&&(e=e.v),0==O.indexOf("on")&&"on"!=O?(m=O.slice(2).toLowerCase(),t.__addListener(m,function(r){r=r||window.event,(0,_.default)(r);var n=r.target.getAttribute("migi-uid"),a=c.default.get(n);e instanceof i.default?e.cb.call(e.context,r,t,a):o.default.isFunction(e)?e(r,t,a):Array.isArray(e)&&e.forEach(function(e){var n=e[1];(0,h.default)(r,e[0],t)&&(n instanceof i.default?n.cb.call(n.context,r,t,a):o.default.isFunction(n)&&n(r,t,a))})})):s.hasOwnProperty(O)||t.__updateAttr(O,e)};for(a=0;aw)for(var A=_;A0&&s<250&&(c.isDoubleTap=!0))}l||(l=!0,document.addEventListener("touchmove",y,!0),document.addEventListener("touchend",g,!0),document.addEventListener("touchcancel",v,!0),window.addEventListener("scroll",v),window.addEventListener("blur",v)),a.push(["touchstart",i]),e.element.addEventListener("touchstart",i)};var n,a,i,o,s,u,l,f=[],c={},d=750,_=0,h=0,p=0;function v(){a&&clearTimeout(a),i&&clearTimeout(i),a=i=null,c={},f=[]}function y(e){c.vd&&(u=e.touches[0],c.x2=u.pageX,c.y2=u.pageY,h+=Math.abs(c.x1-c.x2),p+=Math.abs(c.y1-c.y2))}function g(e){c.vd&&(c.x2&&Math.abs(c.x1-c.x2)>30||c.y2&&Math.abs(c.y1-c.y2)>30?i=setTimeout(function(){var t="swipe"+function(e,t,r,n){return Math.abs(e-t)>=Math.abs(r-n)?e-t>0?"left":"right":r-n>0?"up":"down"}(c.x1,c.x2,c.y1,c.y2);"swipe"!=c.name&&c.name!=t||c.cb(e),f.forEach(function(r){"swipe"!=r.name&&r.name!=t||r.cb(e)}),c={},f=[]},0):h<30&&p<30?a=setTimeout(function(){Date.now()-_>d?("longtap"==c.name&&c.cb(e),f.forEach(function(t){"longtap"==t.name&&t.cb(e)})):c.isDoubleTap&&c.vd==n.vd&&("doubletap"==c.name&&c.cb(e),f.forEach(function(t){"doubletap"==t.name&&t.cb(e)})),c={},f=[]},0):(c={},f=[]),h=p=0)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={domactivate:"DOMActivate",domfocusin:"DOMFocusIn",msgestureend:"MSGestureEnd",mspointerdown:"MSPointerDown",mspointermove:"MSPointerMove",mspointerup:"MSPointerUp",mspointercancel:"MSPointerCancel"}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=Array.prototype,a=Object.create(n);["push","pop","shift","unshift","splice","sort","reverse"].forEach(function(e){var t=n[e];Object.defineProperty(a,e,{value:function(){for(var r=arguments.length,n=new Array(r);r--;)n[r]=arguments[r];var a=t.apply(this,n);return Array.isArray(this.__cb__)&&this.__cb__.forEach(function(t){"sort"==e||"reverse"==e?t():t({method:e,args:n})}),a}})}),t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(r(7)),a=i(r(22));function i(e){return e&&e.__esModule?e:{default:e}}var o=function(e){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var e=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.__handler={},e.__ccb=!1,e.__timeout,e.__timecb,e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,n.default),t}();o.prototype.__data=a.default.prototype.__data,t.default=o}]); \ No newline at end of file +!function(e){var t={};function r(n){if(t[n])return t[n].exports;var a=t[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,r),a.l=!0,a.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)r.d(n,a,function(t){return e[t]}.bind(null,a));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=23)}([function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r1?t-1:0),n=1;n=0;a--){var i=r[a],o=new e;i.__hash={};for(var s=["on","once","off","emit"],u=s.length-1;u>=0;u--){var l=s[u];i[l]=o[l]}}}}]),e}();a.DOM="DOM",a.DESTROY="DESTROY",a.DATA="DATA",t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(r(2)),a=i(r(3));function i(e){return e&&e.__esModule?e:{default:e}}var o={}.toString;function s(e){return function(t){return o.call(t)=="[object "+e+"]"}}function u(e){return void 0===e||null===e||c.isBoolean(e)||c.isNumber(e)||c.isString(e)}function l(e){return null===e||void 0===e?"":e.toString()}function f(e,t){return t?e.replace(/"/g,"""):e.replace(/&/g,"&").replace(/1&&void 0!==arguments[1]?arguments[1]:[];return t.__children.forEach(function(t){t instanceof migi.VirtualDom?(e(t,r),r.push(t)):t instanceof migi.Component&&(e(t.__virtualDom,r),r.push(t.__virtualDom))}),r}};t.default=c},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r=0;o--){var s=i[o];t[s]=a[s]}}return t}(r),this.__props=function(e){for(var t=0,r=e.length;t1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var a=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,null,r,n)),i=a,o=Object.getPrototypeOf(i);return["on","once","emit","off","clean","inTo","appendTo","prependTo","before","after","replace","top","parent","children","dom","toString","preString","findChild","findChildren","find","findAll","stopPropagation","element","style","model","virtualDom","ref"].forEach(function(e){if(o.hasOwnProperty(e))throw new Error("cannot overwrite method of '"+e+"'")}),i.constructor.__migiName&&(i.__name=i.constructor.__migiName),i.__virtualDom=null,i.__ref={},i.__bindHash={},i.__ob=[],i.__bindProperty={},i.__props.forEach(function(e,t){var r=e[0],n=e[1];i.__init(r,n,t)}),a}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),n(t,[{key:"__init",value:function(e,t,r){var n=this;if(/^on[a-zA-Z]/.test(e)){var i=e.slice(2).toLowerCase();n.once(a.default.DOM,function(){n.virtualDom.__addEvt(i,t)})}else if(/^on-[a-zA-Z\d_]/.test(e)){i=e.slice(3);n.on(i,function(){for(var e=arguments.length,r=Array(e),n=0;n-1&&(t.__ob__.splice(r,1),t.__cb__.splice(r,1))});var r=e.virtualDom.__destroy();return e.emit(a.default.DESTROY),e.__hash={},e.__bindProperty=null,r}},{key:"__initBind",value:function(e){return!this.__bindHash.hasOwnProperty(e)}},{key:"__getBind",value:function(e){return this.__bindHash[e]}},{key:"__setBind",value:function(e,t){this.__bindHash[e]=t,this.__array(e,t)}},{key:"__array",value:function(e,t){var r=this;Array.isArray(t)&&(t.__proto__=c.default,t.__ob__=t.__ob__||[],t.__cb__=t.__cb__||[],-1==t.__ob__.indexOf(r)&&(r.__ob.push(t),t.__ob__.push(r),t.__cb__.push(function(t){r.__data(e,t)})))}},{key:"stopPropagation",get:function(){return this.__stopPropagation},set:function(e){this.__stopPropagation=e}},{key:"element",get:function(){return this.virtualDom?this.virtualDom.element:null}},{key:"style",get:function(){return this.__style},set:function(e){this.__style=e}},{key:"model",get:function(){return this.__model},set:function(e){if(!(e instanceof f.default))throw new Error("can not set model to a non Model: "+e);this.__model=e,e.__add(this)}},{key:"virtualDom",get:function(){return this.__virtualDom}},{key:"ref",get:function(){return this.__ref}}]),t}();t.default=p},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={};t.default={get:function(e){return n[e]},set:function(e){return n[e.__uid]=e,e}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=t,this.cb=r}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r-1&&this.__ref.splice(t,1)}},{key:"name",get:function(){return this.__name}}]),t}();["__data","__record","__unRecord","__initBind","__getBind","__setBind","__array"].forEach(function(e){u.prototype[e]=i.default.prototype[e]}),t.default=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r";(e+=">",this.props.dangerouslySetInnerHTML)?e+=n=(n=this.props.dangerouslySetInnerHTML)instanceof l.default?n.toSourceString():Array.isArray(n)?u.default.joinSourceArray(n):u.default.stringify(n):e+=this.__renderChildren();return e+=""}},{key:"preString",value:function(){for(var e=0,t=this.__props.length;e=0;r--){var n=e[r];if(Array.isArray(n)&&n.length)return this.isLast(n);if(n==this)return!0;if(n instanceof t)return!1;if(n instanceof l.default&&(n=n.v,Array.isArray(n)&&n.length))return this.isLast(n)}}},{key:"isEmpty",value:function(){return function e(t){var r=!0;if(Array.isArray(t))for(var n=0,a=t.length;n1&&void 0!==arguments[1]?arguments[1]:[];if(Array.isArray(t))for(var n=0,a=t.length;n-1?e?t.length-r-1:r:-1}},{key:"getIdxOfType",value:function(e,t){var r=t?this.nextAll(e):this.prevAll(e);t?r.unshift(this):r.push(this);var n=r.indexOf(this);return n>-1?t?r.length-n-1:n:-1}},{key:"closest",value:function(e){for(var t=this;t&&t!=this.top;){if(!m.default.nci(e,t))return t;t=t.parent}}},{key:"__renderProp",value:function(e,t){var r=this,n="";if(/^on[a-zA-Z]/.test(e))r.__renderPropEventDelay=r.__renderPropEventDelay||[],r.__renderPropEventDelay.push({k:e.slice(2).toLowerCase(),v:t});else if(t instanceof l.default){if("dangerouslySetInnerHTML"==e)return"";var a=t.toString(!0);switch("className"==e?e="class":"htmlFor"==e&&(e="for"),r.__cache[e]=a,v.default.special(r.__name,e)){case v.default.RENDER_EXIST:t.v&&(n=" "+e+'="'+a+'"');break;case v.default.RENDER_DOM:r.once(i.default.DOM,function(){r.__updateAttr(e,t.v)});break;default:n=" "+e+'="'+a+'"'}}else{a=Array.isArray(t)?u.default.joinSourceArray(t):u.default.stringify(t);if("dangerouslySetInnerHTML"==e)return"";switch("className"==e?e="class":"htmlFor"==e&&(e="for"),r.__cache[e]=a,v.default.special(r.__name,e)){case v.default.RENDER_EXIST:t&&(n=" "+e+'="'+u.default.encodeHtml(a,!0)+'"');break;case v.default.RENDER_DOM:r.once(i.default.DOM,function(){r.__updateAttr(e,t)});break;default:n=" "+e+'="'+u.default.encodeHtml(a,!0)+'"'}}if(r.__style)switch(e){case"class":case"id":n=" migi-"+n.slice(1)}return n}},{key:"__renderChildren",value:function(){for(var e="",t=0,r=this.children.length;t=0;t--){var r=this.__listener[t];e.removeEventListener(r[0],r[1])}this.__listener=null}}},{key:"find",value:function(e){if(u.default.isFunction(e))return function(e,t){return M(e,t,!0)[0]||null}(e,this.children);if(this.element){var t=this.element.querySelector(D(e)).getAttribute("migi-uid");return y.default.get(t)||null}return null}},{key:"findAll",value:function(e){if(u.default.isFunction(e))return M(e,this.children);var t=[];if(this.element){var r=this.element.querySelectorAll(D(e));Array.from(r).forEach(function(e){if(e){var r=e.getAttribute("migi-uid"),n=y.default.get(r)||null;n&&t.push(n)}})}return t}},{key:"__onDom",value:function(){a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"__onDom",this).call(this);var e={start:0,first:!0};this.__checkBlank(this.children,e),(e.empty||e.first)&&this.__insertBlank(e.start)}},{key:"__checkBlank",value:function(e,t){if(Array.isArray(e)&&e.length)for(var r=0,n=e.length;r=a?r.appendChild(t):r.insertBefore(t,n[e])}},{key:"__onData",value:function(e,t){if(this.dom){for(var r=0,n=this.__props.length;r-1;break;case 2:o=a.k.indexOf(e)>-1;break;case 3:for(var s={},u=e.length-1;u>=0;u--)s[e[u]]=!0;var f=a.k;for(u=0,n=f.length;u-1;break;case 2:i=r.k.indexOf(e)>-1;break;case 3:for(var o={},s=e.length-1;s>=0;s--)o[e[s]]=!0;for(var f=r.k,c=(s=0,f.length);s=0;n--){var a=this.children[n];a instanceof t&&a.__updateStyle()}}},{key:"__init",value:function(e,t){this.__selfClose=T.default.hasOwnProperty(e),function e(t,r){if(Array.isArray(t))for(var n=0,a=t.length;n2&&void 0!==arguments[2]?arguments[2]:[],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];return a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"__reset",this).call(this,e,r,n,i),this.__init(r,i),this.__hasDes=!1,this}},{key:"__destroy",value:function(){return(this.__onHover||this.__outHover)&&this.element&&(this.element.removeEventListener("mouseenter",this.__onHover),this.element.removeEventListener("mouseleave",this.__outHover)),this.__hash={},this.__cache=null,this.__names=null,this.__classes=null,this.__ids=null,this.__hover=!1,this.__active=!1,this.__listener=null,this.__parent=null,this.__top=null,this.__dom=!1,this.__style=null,this.__element=null,this.__renderPropEventDelay=null,this}},{key:"clean",value:function(){a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"clean",this).call(this),this.__renderPropEventDelay=null,this.__removeListener(),this.__names=null,this.__classes=null,this.__ids=null,this.__hover=!1,this.__active=!1}},{key:"names",get:function(){return this.__names||(this.__names=[])}},{key:"element",get:function(){return this.__element||(this.__element=document.querySelector(this.__name+'[migi-uid="'+this.__uid+'"]'))}},{key:"style",get:function(){return this.__style},set:function(e){this.__style=e,this.parent instanceof t?this.__names=this.parent.names.slice():this.__names=[],this.__names.push(this.__name);for(var r=0,n=this.children.length;r=a)return;var o=r,s=a,u=o,l=t[u],f=!0;for(;ot}),e):""},preId:function(e){return void 0!==e&&null!==e||(e=""),(e=e.toString().trim())?"#"+e:""},combo:function(e,t,r,n){var a=0,i=0;if(e&&e.length){var o=function e(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;if(r-a>1){e(t,r,n,a+1);for(var i=0,o=n.length;i=s.length&&o.indexOf(s)==o.length-s.length;break;case"~=":r=new RegExp("\\b"+s+"\\b").test(o);break;case"*=":r=o.indexOf(s)>-1;break;case"|=":r=0==o.indexOf(s)||0==o.indexOf(s+"-");break;default:r=!1;break e}if(!r)break}}return r},nci:function(e,t){var r=/^[a-z\d]+/i.exec(e);if(r&&r[0].toUpperCase()!=t.__name.toUpperCase())return!0;var n=e.match(/\.[a-z\d_-]+/gi);if(n&&t.__cache.class)for(var a=n.length-1;a>=0;a--)if(!new RegExp("\\b"+n[a].slice(1)+"\\b","i").test(t.__cache.class))return!0;var i=/#[a-z\d_-]+/i.exec(e);return!(!i||!t.__cache.id||i[0].toUpperCase()==t.__cache.id.toUpperCase())||void 0}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){3==e.target.nodeType&&(e.target=e.target.parentNode)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(r(2)),a=(o(r(8)),o(r(3))),i=o(r(1));o(r(9)),o(r(10));function o(e){return e&&e.__esModule?e:{default:e}}function s(e,t,r){for(var o="",l=e.shift(),f=t.length;l=0;m--)l(m,t,r,a,O,c.parent,d,_);if(O.hasOwnProperty("_v")&&f(d,O),_&&O.hasOwnProperty("_:")&&O["_:"].forEach(function(e){e[0].forEach(function(e){var t=c.__uid;switch(e){case"hover":var r=function(){i.default.get(t).__hover=!0,i.default.get(t).__updateStyle()},a=function(){i.default.get(t).__hover=!1,i.default.get(t).__updateStyle()},s=function(){c.element.addEventListener("mouseenter",r),c.element.addEventListener("mouseleave",a)};c.__dom?s():c.once(n.default.DOM,s),c.__onHover=r,c.__outHover=a;break;case"active":var u=function(){i.default.get(t).__active=!0,i.default.get(t).__updateStyle()},l=function(){i.default.get(t).__active=!1,i.default.get(t).__updateStyle()},f=function(){c.element.addEventListener("mousedown",u),window.addEventListener("mouseup",l,!0),window.addEventListener("touchend",l,!0),window.addEventListener("touchcancel",l,!0),window.addEventListener("blur",l),window.addEventListener("dragend",l)};c.__dom?f():c.once(n.default.DOM,f),o.default.add(t,l)}})}),O.hasOwnProperty("_:")||O.hasOwnProperty("_[")){var b=function(n){if(n&&n.hasOwnProperty("_[")){var i=n["_["];i.forEach(function(n){s.default.attr(n[0],c)&&(i=n[1],e&&l(e-1,t,r,a,i,c.parent,d,_),i.hasOwnProperty("_v")&&f(d,i))})}};O.hasOwnProperty("_:")&&(T=O["_:"]).forEach(function(n){s.default.pseudo(n[0],c,g)&&(T=n[1],e&&l(e-1,t,r,a,T,c.parent,d,_),T.hasOwnProperty("_v")&&f(d,T))}),b(O),b(T)}if(O.hasOwnProperty("_>")){var T=O["_>"];l(e-1,t,r,a,T,c.parent,d,!1,h)}if(O.hasOwnProperty("_+")){T=O["_+"];(E=c.prev())&&Object.keys(T).forEach(function(n){s.default.nci(n,E)||(T[n].hasOwnProperty("_v")&&f(d,T[n]),l(e-1,t,r,a,T[n],c.parent,d,!1,h))})}if(O.hasOwnProperty("_~")){T=O["_~"];var k=c.prevAll();if(k.length){var w=!1;for(v=k.length-1;v>=0;v--){var E=k[v];if(Object.keys(T).forEach(function(n){s.default.nci(n,E)||(T[n].hasOwnProperty("_v")&&f(d,T[n]),w=!0,l(e-1,t,r,a,T[n],c.parent,d,!1,h))}),w)break}}}}}}function f(e,t){t._v.forEach(function(r){r[2]=t._p,e.push(r)})}function c(e){var t=e.charAt(0).toUpperCase()+e.slice(1);return window["inner"+t]||document.documentElement["client"+t]||document.body["client"+t]}t.default=function(e,t,r,n,s,u){var f=[];if(l(e.length-1,e,t,r,n.default,s,f,u),n.media&&(n.media.forEach(function(n){var a=!1;n.query.forEach(function(i){if(!a)for(var o=0,d=i.length;o=p)return a=!0,void l(e.length-1,e,t,r,n.style,s,f,u)}else if(v<=p)return a=!0,void l(e.length-1,e,t,r,n.style,s,f,u);break;case"device-width":case"device-height":(v=window.screen[h.slice(7)])==p&&(a=!0,l(e.length-1,e,t,r,n.style,s,f,u));break;case"min-device-width":case"min-device-height":case"max-device-width":case"max-device-height":if(v=window.screen[h.slice(11)],0==h.indexOf("min-")){if(v>=p)return a=!0,void l(e.length-1,e,t,r,n.style,s,f,u)}else if(v<=p)return a=!0,void l(e.length-1,e,t,r,n.style,s,f,u);break;case"aspect-ratio":if((v=c("width")/c("height"))==(y=(y=p.split("/"))[0]/y[1]))return a=!0,void l(e.length-1,e,t,r,n.style,s,f,u);break;case"min-aspect-ratio":case"max-aspect-ratio":if(v=c("width")/c("height"),y=(y=p.split("/"))[0]/y[1],0==h.indexOf("min-")){if(v>=p)return a=!0,void l(e.length-1,e,t,r,n.style,s,f,u)}else if(v<=p)return a=!0,void l(e.length-1,e,t,r,n.style,s,f,u);break;case"device-aspect-ratio":if((v=window.screen.width/window.screen.height)==(y=(y=p.split("/"))[0]/y[1]))return a=!0,void l(e.length-1,e,t,r,n.style,s,f,u);break;case"min-device-aspect-ratio":case"max-device-aspect-ratio":var y;if(v=window.screen.width/window.screen.height,y=(y=p.split("/"))[0]/y[1],0==h.indexOf("min-")){if(v>=p)return a=!0,void l(e.length-1,e,t,r,n.style,s,f,u)}else if(v<=p)return a=!0,void l(e.length-1,e,t,r,n.style,s,f,u);break;case"device-pixel-ratio":if((v=window.devicePixelRatio)==p)return a=!0,void l(e.length-1,e,t,r,n.style,s,f,u);break;case"min-device-pixel-ratio":case"max-device-pixel-ratio":if(v=window.devicePixelRatio,0==h.indexOf("min-")){if(v>=p)return a=!0,void l(e.length-1,e,t,r,n.style,s,f,u)}else if(v<=p)return a=!0,void l(e.length-1,e,t,r,n.style,s,f,u)}}}})}),u)){var d,_=function(){d&&clearTimeout(d),d=setTimeout(function(){i.default.get(s.__uid).__updateStyle()},100)};window.addEventListener("resize",_),o.default.add(s.__uid,_)}(0,a.default)(f,function(e,t){var r=e[2],n=t[2];if(r==n)return e[0]>t[0];for(var a=0;a<3;a++)if(r[a]!=n[a])return r[a]>n[a];return e[0]>t[0]});var h="";return f.forEach(function(e){h+=e[1]+";"}),h}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=new Array(4096),a={index:0,add:function(e){!e.__hasDes&&this.index<4096&&(n[this.index++]=e,e.__hasDes=!0)},get:function(){return n[--this.index]}};t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,a=o(r(5)),i=o(r(13));function o(e){return e&&e.__esModule?e:{default:e}}function s(e,t,r,n){t.unshift(e.__name),r.unshift(i.default.splitClass(e.__cache.class)),n.unshift(i.default.preId(e.__cache.id))}function u(e,t,r,a,o,s){if(!n)for(var l=i.default.combo(r[e],t[e],a[e],o),f=0,c=l.length;f=0;h--)u(h,t,r,a,_,s.parent)}if(_.hasOwnProperty("_v"))return void(n=!0);if(_.hasOwnProperty("_:")||_.hasOwnProperty("_[")){var p=function(o){if(o&&o.hasOwnProperty("_[")){var l=o["_["];l.forEach(function(o){i.default.attr(o[0],s)&&(l=o[1],e&&u(e-1,t,r,a,l,s.parent),l.hasOwnProperty("_v")&&(n=!0))})}};_.hasOwnProperty("_:")&&(v=_["_:"]).forEach(function(o){i.default.pseudo(o[0],s,d)&&(v=o[1],e&&u(e-1,t,r,a,v,s.parent),v.hasOwnProperty("_v")&&(n=!0))}),p(_),p(v)}if(_.hasOwnProperty("_>")){var v=_["_>"];u(e-1,t,r,a,v,s.parent)}if(_.hasOwnProperty("_+")){v=_["_+"];(O=s.prev())&&Object.keys(v).forEach(function(o){i.default.nci(o,O)||(v[o].hasOwnProperty("_v")?n=!0:u(e-1,t,r,a,v[o],s.parent))})}if(_.hasOwnProperty("_~")){v=_["_~"];var y=s.prevAll();if(y.length){var g=!1;for(f=y.length-1;f>=0;f--){var O=y[f];if(Object.keys(v).forEach(function(o){i.default.nci(o,O)||(v[o].hasOwnProperty("_v")?n=!0:(g=!0,u(e-1,t,r,a,v[o],s.parent)))}),g)break}}}}}}t.default=function(e,t,r){var i=e.target,o=a.default.get(i.getAttribute("migi-uid"));if(!o.__dom)return[!1];if(o==r||!o)return[!1];var l=[],f=[],c=[];s(o,l,f,c);for(var d=o;d.parent&&d.parent!=r;)s(d=d.parent,l,f,c);for(n=!1,u(l.length-1,l,f,c,t,o);!n&&l.length;)o=o.parent,l.pop(),f.pop(),c.pop(),u(l.length-1,l,f,c,t,o);return[n,o]}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){return e&&e.__esModule?e:{default:e}}(r(1));var a={button:{disabled:1},input:{autofocus:1,checked:1,defaultChecked:2,defaultchecked:2,defaultValue:2,defaultvalue:2,disabled:1,multiple:1,readOnly:1,readonly:1,required:1},link:{disabled:1},option:{defaultSelected:2,defaultselected:2,disabled:1,selected:1,text:2},select:{autofocus:1,disabled:1,multiple:1,selectedIndex:2,selectedindex:2},textarea:{autofocus:1,defaultValue:2,defaultvalue:2,disabled:1,readOnly:1,readonly:1},audio:{autoplay:1,controls:1,loop:1,muted:1},video:{autoplay:1,controls:1,loop:1,muted:1}},i={button:{disabled:2},input:{autofocus:2,checked:2,defaultChecked:2,defaultchecked:2,defaultValue:1,defaultvalue:1,disabled:2,readOnly:2,readonly:2,required:2,value:1},link:{checked:2},option:{defaultSelected:2,defaultselected:2,disabled:2,selected:2,text:1},select:{autofocus:2,disabled:2,required:2,selectedIndex:0,selectedindex:0,value:1},textarea:{autofocus:2,defaultValue:1,defaultvalue:1,disabled:2,readOnly:2,readonly:2,required:2,value:1},audio:{autoplay:2,controls:2,loop:2,muted:2},video:{autoplay:2,controls:2,loop:2,muted:2}},o={defaultchecked:"defaultChecked",defaultselected:"defaultSelected",defaultvalue:"defautlValue",readonly:"readOnly",selectindex:"selectIndex"};t.default={RENDER_EXIST:1,RENDER_DOM:2,special:function(e,t){if(a.hasOwnProperty(e)){var r=a[e];if(r.hasOwnProperty(t))return r[t]}},update:function(e,t,r,a,s){if(i.hasOwnProperty(e)){var u=i[e];if(u.hasOwnProperty(r)){switch(u=u[r],r=o[r]||r,u){case 0:a=parseInt(a),t[r]=a||0;break;case 1:a=n.default.stringify(a),t[r]=a;break;case 2:a=!!a,t[r]=a}return}}switch(r){case"className":r="class";break;case"htmlFor":r="for"}if(s)switch(r){case"id":case"class":r="migi-"+r}null===a||void 0===a?t.removeAttribute(r):"id"==r?t[r]=a:"class"==r?t.className=a:t.setAttribute(r,a)}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={img:!0,meta:!0,link:!0,br:!0,basefont:!0,base:!0,col:!0,embed:!0,frame:!0,hr:!0,input:!0,keygen:!0,area:!0,param:!0,source:!0,track:!0,wbr:!0}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={optimizeArrayDiff:!0}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r=t.length?e.appendChild(u):e.insertBefore(u,t[r])}else{if(u=a.toString(),r>=t.length)e.insertAdjacentHTML("beforeend",u);else if(1==t[r].nodeType)t[r].insertAdjacentHTML("beforebegin",u);else{var f=s.default.getParent(a.__name);f.innerHTML=u,e.insertBefore(f.firstChild,t[r])}a.emit(n.default.DOM)}}function O(e,t,r,n,a,i){if(Array.isArray(r)){n.index.push(0);for(var s=0,u=Math.max(r.length,1);s=0;a--)t[O=n[a]]=e[O];c.default.set(t);var s={};for(a=e.__props.length-1;a>=0;a--){var f=e.__props[a];if(0!=(O=f[0]).indexOf("on")||"on"==O)if(s[O]=!0,t.props.hasOwnProperty(O)){var d=f[1],v=t.props[O];v instanceof p.default&&(v=v.v),d instanceof p.default&&(d=d.v),v!==d&&t.__updateAttr(O,v),t.__cache[O]=v}else t.__updateAttr(O,null),delete t.__cache[O]}e.__removeListener();var y=t.__props.length,g=function(){f=t.__props[a],O=f[0];var e=f[1];e instanceof p.default&&(e=e.v),0==O.indexOf("on")&&"on"!=O?(m=O.slice(2).toLowerCase(),t.__addListener(m,function(r){r=r||window.event,(0,_.default)(r);var n=r.target.getAttribute("migi-uid"),a=c.default.get(n);e instanceof i.default?e.cb.call(e.context,r,t,a):o.default.isFunction(e)?e(r,t,a):Array.isArray(e)&&e.forEach(function(e){var n=e[1];(0,h.default)(r,e[0],t)&&(n instanceof i.default?n.cb.call(n.context,r,t,a):o.default.isFunction(n)&&n(r,t,a))})})):s.hasOwnProperty(O)||t.__updateAttr(O,e)};for(a=0;aw)for(var A=_;A0&&s<250&&(c.isDoubleTap=!0))}l||(l=!0,document.addEventListener("touchmove",y,!0),document.addEventListener("touchend",g,!0),document.addEventListener("touchcancel",v,!0),window.addEventListener("scroll",v),window.addEventListener("blur",v)),a.push(["touchstart",i]),e.element.addEventListener("touchstart",i)};var n,a,i,o,s,u,l,f=[],c={},d=750,_=0,h=0,p=0;function v(){a&&clearTimeout(a),i&&clearTimeout(i),a=i=null,c={},f=[]}function y(e){c.vd&&(u=e.touches[0],c.x2=u.pageX,c.y2=u.pageY,h+=Math.abs(c.x1-c.x2),p+=Math.abs(c.y1-c.y2))}function g(e){c.vd&&(c.x2&&Math.abs(c.x1-c.x2)>30||c.y2&&Math.abs(c.y1-c.y2)>30?i=setTimeout(function(){var t="swipe"+function(e,t,r,n){return Math.abs(e-t)>=Math.abs(r-n)?e-t>0?"left":"right":r-n>0?"up":"down"}(c.x1,c.x2,c.y1,c.y2);"swipe"!=c.name&&c.name!=t||c.cb(e),f.forEach(function(r){"swipe"!=r.name&&r.name!=t||r.cb(e)}),c={},f=[]},0):h<30&&p<30?a=setTimeout(function(){Date.now()-_>d?("longtap"==c.name&&c.cb(e),f.forEach(function(t){"longtap"==t.name&&t.cb(e)})):c.isDoubleTap&&c.vd==n.vd&&("doubletap"==c.name&&c.cb(e),f.forEach(function(t){"doubletap"==t.name&&t.cb(e)})),c={},f=[]},0):(c={},f=[]),h=p=0)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={domactivate:"DOMActivate",domfocusin:"DOMFocusIn",msgestureend:"MSGestureEnd",mspointerdown:"MSPointerDown",mspointermove:"MSPointerMove",mspointerup:"MSPointerUp",mspointercancel:"MSPointerCancel"}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=Array.prototype,a=Object.create(n);["push","pop","shift","unshift","splice","sort","reverse"].forEach(function(e){var t=n[e];Object.defineProperty(a,e,{value:function(){for(var r=arguments.length,n=new Array(r);r--;)n[r]=arguments[r];var a=t.apply(this,n);return Array.isArray(this.__cb__)&&this.__cb__.forEach(function(t){"sort"==e||"reverse"==e?t():t({method:e,args:n})}),a}})}),t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(r(7)),a=i(r(22));function i(e){return e&&e.__esModule?e:{default:e}}var o=function(e){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var e=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.__handler={},e.__ccb=!1,e.__timeout,e.__timecb,e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,n.default),t}();o.prototype.__data=a.default.prototype.__data,t.default=o}]); \ No newline at end of file