UNPKG

yox

Version:

A lightweight mvvm framework

3 lines (2 loc) 37.9 kB
const e="undefined"!=typeof window?window:undefined,t="undefined"!=typeof document?document:undefined,n=function(){},o=Object.freeze({}),r=Object.freeze([]),i=/yox/.test(n.toString())?2:3,s={leftDelimiter:"{",rightDelimiter:"}",uglifyCompiled:false,minifyCompiled:false,logLevel:i};function c(e){return"function"==typeof e}function f(e){return Array.isArray(e)}function u(e){return null!==e&&"object"==typeof e}function a(e){return"string"==typeof e}function l(e){return"number"==typeof e&&!isNaN(e)}function d(e){return true===e||false===e}function p(e){return!isNaN(e-parseFloat(e))}var h=Object.freeze({__proto__:null,func:c,array:f,object:u,string:a,number:l,boolean:d,numeric:p});function m(e,t,n){return f(n)?e.apply(t,n):undefined!==t?e.call(t,n):undefined!==n?e(n):e()}class v{constructor(e,t){this.type=e,this.phase=v.PHASE_CURRENT,t&&(this.originalEvent=t)}static is(e){return e instanceof v}preventDefault(){const e=this;if(!e.isPrevented){const{originalEvent:t}=e;t&&t.preventDefault(),e.isPrevented=true}return e}stopPropagation(){const e=this;if(!e.isStoped){const{originalEvent:t}=e;t&&t.stopPropagation(),e.isStoped=true}return e}prevent(){return this.preventDefault()}stop(){return this.stopPropagation()}}function y(e,t,n){const{length:o}=e;if(o)if(n)for(let n=o-1;n>=0&&false!==t(e[n],n);n--);else for(let n=0;n<o&&false!==t(e[n],n);n++);}function g(e,t){e[e.length]=t}function $(e,t){e.unshift(t)}function b(e,t,n){f(t)?y(t,(function(t){n(e,t)})):n(e,t)}function x(e,t){b(e,t,g)}function w(e,t){b(e,t,$)}function _(e,t,n){let o=-1;return y(e,(function(e,r){if(false===n?e==t:e===t)return o=r,false})),o}function k(e){const{length:t}=e;if(t>0)return e[t-1]}function C(e,t,n){let o=0;return y(e,(function(r,i){(false===n?r==t:r===t)&&(e.splice(i,1),o++)}),true),o}function E(e,t,n){return _(e,t,n)>=0}function A(e){return f(e)?e:m(r.slice,e)}function N(e,t,n){let o={};return y(e,(function(e){o[t?e[t]:e]=n||e})),o}function D(e,t){return e.join(t)}function O(e){return!f(e)||!e.length}v.PHASE_CURRENT=0,v.PHASE_UPWARD=1,v.PHASE_DOWNWARD=-1;var S=Object.freeze({__proto__:null,each:y,push:x,unshift:w,indexOf:_,last:k,pop:function(e){const{length:t}=e;if(t>0)return e.pop()},remove:C,has:E,toArray:A,toObject:N,join:D,falsy:O});function T(e,t){return null!=e&&e.toString?e.toString():undefined!==t?t:""}function U(e){return c(e)&&T(e).indexOf("[native code]")>=0}let z=function(){const e=Object.create(null);return{get:t=>e[t],set(t,n){e[t]=n},has:t=>t in e,keys:()=>Object.keys(e)}};function P(e){const t=z();return function(n){const o=t.get(n);if(undefined!==o)return o;const r=e(n);return t.set(n,r),r}}function j(e){const t=z();return function(n,o){let r=t.get(n);if(r){const e=r.get(o);if(e)return e}else r=z(),t.set(n,r);const i=e(n,o);return r.set(o,i),i}}const R=/-([a-z])/gi,H=/\B([A-Z])/g,M=/^[a-z]/,W=P((function(e){return e.replace(R,(function(e,t){return G(t)}))})),L=P((function(e){return e.replace(H,(function(e,t){return"-"+Z(t)}))})),F=P((function(e){return e.replace(M,G)}));function I(e){return X(e)?"":e.trim()}function K(e,t,n){return l(n)?t===n?"":e.slice(t,n):e.slice(t)}function V(e,t,n){return e.indexOf(t,undefined!==n?n:0)}function B(e,t,n){return e.lastIndexOf(t,undefined!==n?n:e.length)}function Y(e,t){return 0===V(e,t)}function q(e,t){return e.charCodeAt(t||0)}function G(e){return e.toUpperCase()}function Z(e){return e.toLowerCase()}function J(e,t){return V(e,t)>=0}function Q(e,t){const n=Object.create(null);return y(e.split(t||","),(function(e){n[e]=true})),n}function X(e){return!a(e)||!e.length}var ee=Object.freeze({__proto__:null,camelize:W,hyphenate:L,capitalize:F,repeat:function(e,t){return D(new Array(t+1),e)},trim:I,slice:K,indexOf:V,lastIndexOf:B,startsWith:Y,endsWith:function(e,t){const n=e.length-t.length;return n>=0&&B(e,t)===n},charAt:function(e,t){return e.charAt(t||0)},codeAt:q,upper:G,lower:Z,has:J,toMap:Q,falsy:X});const te=/\./g,ne=/\*/g,oe=/\*\*/g,re=j((function(e,t){return e===t||Y(e,t+=".")?t.length:-1})),ie=P((function(e){return V(e,".")<0?[e]:e.split(".")}));function se(e,t){const n=a(e)?ie(e):e;for(let e=0,o=n.length-1;e<=o&&false!==t(n[e],e,o);e++);}const ce=j((function(e,t){return e&&t?e+"."+t:e||t})),fe=P((function(e){return J(e,"*")})),ue=P((function(e){return new RegExp(`^${e.replace(te,"\\.").replace(ne,"(\\w+)").replace(oe,"([.\\w]+?)")}$`)})),ae=j((function(e,t){const n=e.match(ue(t));return n?n[1]:undefined})),le={value:undefined};function de(e){return Object.keys(e)}function pe(e,t){for(let n in e)if(false===t(e[n],n))break}function he(e,t){return pe(t,(function(t,n){e[n]=t})),e}function me(e,t){let n=e;return f(e)?t?(n=[],y(e,(function(e,o){n[o]=me(e,t)}))):n=e.slice():u(e)&&(n={},pe(e,(function(e,o){n[o]=t?me(e,t):e}))),n}function ve(e){return c(e.get)?e.get():e}function ye(e,t,n){let o=e;return se(t,(function(e,t,r){if(null==o)return o=undefined,false;{let i=o[e],s=undefined!==i;i&&(i=(n||ve)(i)),t===r?s?(le.value=i,o=le):o=undefined:o=i}})),o}function ge(e,t){return undefined!==e[t]}var $e=Object.freeze({__proto__:null,keys:de,each:pe,extend:he,merge:function(e,t){return e&&t?he(he({},e),t):e||t},copy:me,get:ye,set:function(e,t,n,o){let r=e;se(t,(function(e,t,i){if(t===i)r[e]=n;else if(r[e])r=r[e];else{if(!o)return false;r=r[e]={}}}))},has:ge,falsy:function(e){return!u(e)||f(e)||!de(e).length}});const be="undefined"!=typeof console?console:null,xe=e&&/edge|msie|trident/i.test(e.navigator.userAgent)?"":"%c",we=be?xe?function(e,t,n){be.log(xe+e,n,t)}:function(e,t){be.log(e,t)}:n;function _e(){const{logLevel:e}=s;return e>=1&&e<=5?e:i}function ke(e){return`background-color:${e};border-radius:12px;color:#fff;font-size:10px;padding:3px 6px;`}var Ce=Object.freeze({__proto__:null,DEBUG:1,INFO:2,WARN:3,ERROR:4,FATAL:5,debug:function(e,t){_e()<=1&&we(t||"Yox debug",e,ke("#999"))},info:function(e,t){_e()<=2&&we(t||"Yox info",e,ke("#2db7f5"))},warn:function(e,t){_e()<=3&&we(t||"Yox warn",e,ke("#f90"))},error:function(e,t){_e()<=4&&we(t||"Yox error",e,ke("#ed4014"))},fatal:function(e,t){if(_e()<=5)throw new Error(`[${t||"Yox fatal"}]: ${e}`)}});class Ee{constructor(e){this.ns=e||false,this.listeners={}}fire(e,t,n){let o=this,r=a(e)?o.toEvent(e):e,i=o.listeners[r.type],s=true;if(i){i=i.slice();const e=t&&v.is(t[0])?t[0]:undefined;for(let c=0,f=i.length;c<f;c++){let f=i[c];if(!Ne(r.ns,f)||!E(i,f)||n&&!n(r,t,f))continue;let u=m(f.listener,f.ctx,t);if(f.num=f.num?f.num+1:1,f.num===f.max&&o.off(r.type,{ns:r.ns,listener:f.listener}),e&&(false===u?e.prevent().stop():e.isStoped&&(u=false)),false===u){s=false;break}}}return s}on(e,t){const n=this,o=n.listeners,r=c(t)?{listener:t}:t;if(u(r)&&c(r.listener)){if(!a(r.ns)){const t=n.toEvent(e);r.ns=t.ns,e=t.type}x(o[e]||(o[e]=[]),r)}}off(e,t){const n=this,o=n.listeners;if(e){const r=n.toFilter(e,t),i=function(e,t){y(e,(function(t,n){Ae(r.listener,t)&&Ne(r.ns,t)&&e.splice(n,1)}),true),e.length||delete o[t]};r.type?o[r.type]&&i(o[r.type],r.type):r.ns&&pe(o,i)}else n.listeners={}}has(e,t){let n=this.listeners,o=this.toFilter(e,t),r=true,i=function(e){return y(e,(function(e){if(Ae(o.listener,e)&&Ne(o.ns,e))return r=false})),r};return o.type?n[o.type]&&i(n[o.type]):o.ns&&pe(n,i),!r}toEvent(e){const t={type:e,ns:""};if(this.ns){const n=V(e,".");n>=0&&(t.type=K(e,0,n),t.ns=K(e,n+1))}return t}toFilter(e,t){let n;if(n=t?c(t)?{listener:t}:t:{},a(n.ns))n.type=e;else{const t=this.toEvent(e);n.type=t.type,n.ns=t.ns}return n}}function Ae(e,t){return!e||e===t.listener}function Ne(e,t){const{ns:n}=t;return!n||!e||n===e}let De;"function"==typeof setImmediate&&U(setImmediate)&&(De=setImmediate),De="function"==typeof MessageChannel&&U(MessageChannel)?function(e){const t=new MessageChannel;t.port1.onmessage=e,t.port2.postMessage(1)}:setTimeout;var Oe=De;let Se;class Te{constructor(e){this.tasks=[],this.hooks=e||o}static shared(){return Se||(Se=new Te)}append(e,t){const n=this,{tasks:o}=n;x(o,{fn:e,ctx:t}),1===o.length&&Oe((function(){n.run()}))}prepend(e,t){const n=this,{tasks:o}=n;w(o,{fn:e,ctx:t}),1===o.length&&Oe((function(){n.run()}))}clear(){this.tasks.length=0}run(){const e=this,{tasks:t,hooks:n}=e,{length:o}=t;if(o){e.tasks=[],n.beforeTask&&n.beforeTask();for(let e=0;e<o;e++)m(t[e].fn,t[e].ctx);n.afterTask&&n.afterTask()}}}function Ue(e,t,n){let o;return function(){if(!o){const r=A(arguments);n&&m(e,undefined,r),o=setTimeout((function(){o=undefined,n||m(e,undefined,r)}),t)}}}function ze(e,t,n,o,r,i,s){let{name:c,listener:f}=s;if(i){const e=i[c]||i[""];true===e?c="change":e>0&&(f=Ue(f,e,"click"===c||"tap"===c))}if(n){if(s.isNative){const t=n.$el;return e.on(t,c,f),function(){e.off(t,c,f)}}n.on(c,s),o["$event_destroy"+r]=function(){n.off(c,s),delete o["$event_destroy"+r]}}else e.on(t,c,f),o["$event_destroy"+r]=function(){e.off(t,r,f),delete o["$event_destroy"+r]}}var Pe=Object.freeze({__proto__:null,afterCreate:function(e,t){const{events:n}=t;if(n){const o=t.node,r=t.component,i=t.lazy,s=t.data;for(let t in n)ze(e,o,r,s,t,i,n[t])}},afterUpdate:function(e,t,n){const r=t.events,i=n.events;if(r!==i){const n=t.node,s=t.component,c=t.lazy,f=t.data;if(i){const e=r||o;for(let t in i)if(!e[t]){const e=f["$event_destroy"+t];e&&e()}}if(r){const t=i||o;for(let o in r){const i=r[o],u=t[o];if(u)if(i.value!==u.value){const t=f["$event_destroy"+o];t&&t(),ze(e,n,s,f,o,c,i)}else u.runtime&&i.runtime&&(u.runtime.execute=i.runtime.execute,i.runtime=u.runtime);else ze(e,n,s,f,o,c,i)}}}},beforeDestroy:function(e,t){const n=t.events,o=t.data;if(n)for(let e in n){const t=o["$event_destroy"+e];t&&t()}}});function je(e,t){return t&&true!==t?Ue(e,t):e}const Re={set(e,t){e.value=T(t)},sync(e,t,n){n.set(t,e.value)}},He={set(e,t){e.checked=e.value===T(t)},sync(e,t,n){e.checked&&n.set(t,e.value)}},Me={set(e,t){e.checked=f(t)?E(t,e.value,false):!!t},sync(e,t,n){const o=n.get(t);f(o)?e.checked?n.append(t,e.value):n.removeAt(t,_(o,e.value,false)):n.set(t,e.checked)}},We={set(e,t){const{multiple:n,options:o}=e;for(let r=0,i=o.length;r<i;r++)if(n)o[r].selected=E(t,o[r].value,false);else if(o[r].value==t)return void(e.selectedIndex=r);n||(e.selectedIndex=-1)},sync(e,t,n){const{multiple:o,options:r}=e;if(o){const e=[];for(let t=0,n=r.length;t<n;t++)r[t].selected&&e.push(r[t].value);n.set(t,e)}else n.set(t,r[e.selectedIndex].value)}};function Le(e,t,n,o,r){let{context:i,model:s,lazy:c,nativeAttrs:f}=r,{keypath:u,value:a}=s,l=c&&(c.model||c[""]);if(n){let e=n.$model,t=je((function(e){i.set(u,e)}),l);n.watch(e,t),o.$model_destroy=function(){n.unwatch(e,t),delete o.$model_destroy}}else{let n="select"===r.tag?We:Re,s="change";if(n===Re){const e=f&&f.type;"radio"===e?n=He:"checkbox"===e?n=Me:true!==l&&(s="model")}const c=je((function(){n.sync(t,u,i)}),l);e.on(t,s,c),n.set(t,a),o.$model_control=n,o.$model_destroy=function(){e.off(t,s,c),delete o.$model_destroy,delete o.$model_control}}}var Fe=Object.freeze({__proto__:null,afterCreate:function(e,t){t.model&&Le(e,t.node,t.component,t.data,t)},afterUpdate:function(e,t,n){const o=t.data,r=t.model,i=n.model;if(r){const n=t.node,s=t.component;if(i)if(r.keypath!==i.keypath)o.$model_destroy(),Le(e,n,s,o,t);else if(s)s.set(s.$model,r.value);else{const e=o.$model_control;e&&e.set(n,r.value)}else Le(e,n,s,o,t)}else i&&o.$model_destroy()},beforeDestroy:function(e,t){const n=t.data.$model_destroy;n&&n()}});var Ie=Object.freeze({__proto__:null,afterCreate:function(e,t){const{nativeAttrs:n}=t;if(n){const o=t.node;for(let t in n)e.setAttr(o,t,n[t])}},afterUpdate:function(e,t,n){const r=t.nativeAttrs,i=n.nativeAttrs;if(r!==i){const n=t.node;if(r){const t=i||o;for(let o in r)undefined!==t[o]&&r[o]===t[o]||e.setAttr(n,o,r[o])}if(i){const t=r||o;for(let o in i)undefined===t[o]&&e.removeAttr(n,o)}}}});var Ke=Object.freeze({__proto__:null,afterCreate:function(e,t){const{nativeStyles:n}=t;if(n){const o=t.node.style;for(let t in n)e.setStyle(o,t,n[t])}},afterUpdate:function(e,t,n){const r=t.nativeStyles,i=n.nativeStyles;if(r!==i){const n=t.node.style;if(r){const t=i||o;for(let o in r)undefined!==t[o]&&r[o]===t[o]||e.setStyle(n,o,r[o])}if(i){const t=r||o;for(let o in i)undefined===t[o]&&e.removeStyle(n,o)}}}});function Ve(e,t,n){e["$directive_hooks"+n.name]=n.create(t.component||t.node,n,t)}function Be(e,t,n,o){const r=e["$directive_hooks"+n.name],i=r&&r[o];i&&i(n,t)}function Ye(e){return function(t,n){const{directives:o}=n;if(o){const t=n.data;for(let r in o)Be(t,n,o[r],e)}}}const qe=Ye("afterMount"),Ge=Ye("beforeDestroy");var Ze=Object.freeze({__proto__:null,afterCreate:function(e,t){const{directives:n}=t;if(n){const e=t.data;for(let o in n)Ve(e,t,n[o])}},beforeUpdate:function(e,t,n){const r=t.directives,i=n.directives,s=t.data;if(i){const e=r||o;for(let n in i)undefined===e[n]&&Be(s,t,i[n],"beforeDestroy")}if(r){const e=i||o,n=[];for(let o in r){const i=r[o];undefined===e[o]?Ve(s,t,i):i.value!==e[o].value&&(Be(s,t,i,"beforeUpdate"),n.push(i))}s.$directive_updating=n}},afterUpdate:function(e,t,n){const{data:o}=t;if(o){const e=o.$directive_updating;if(e){for(let n=0,r=e.length;n<r;n++)Be(o,t,e[n],"afterUpdate");o.$directive_updating=undefined}}},afterMount:qe,beforeDestroy:Ge});function Je(e,t){if(5===t.type||7===t.type){const n=t.children[0];return n?Je(e,n):e.createComment("")}return t.node}function Qe(e,t,n,o){o?e.before(t,n,o):e.append(t,n)}function Xe(e,t,n){const o=n.node;t.node=o,t.parentNode=n.parentNode,t.text!==n.text&&e.setNodeText(o,t.text)}function et(e){e.data&&Dt(e,e.node)}function tt(e,t){e.data&&Ot(e,e.node,t)||t()}function nt(e,t,n,o){o?e.before(t,n.node,o.node):e.append(t,n.node)}function ot(e,t){e.remove(t.parentNode,t.node)}function rt(e,t){t()}function it(e,t){const n=t.children;for(let t=0,o=n.length;t<o;t++)_t(e,n[t])}function st(e,t,n,o){St(e,t,n.children,o.children)}function ct(e,t){const n=t.children;for(let t=0,o=n.length;t<o;t++)At(e,n[t])}function ft(e,t,n,o){const r=n.children;for(let n=0,i=r.length;n<i;n++)Ct(e,t,r[n],o)}function ut(e,t){const n=t.children;for(let t=0,o=n.length;t<o;t++)Nt(e,n[t])}const at={create(e,t){t.node=e.createText(t.text)},update:Xe,destroy:n,insert:nt,remove:ot,enter:n,leave:rt},lt={create(e,t){t.node=e.createComment(t.text)},update:Xe,destroy:n,insert:nt,remove:ot,enter:n,leave:rt},dt=[Ie,Ke,Object.freeze({__proto__:null,afterCreate:function(e,t){const n=t.ref;if(n){const e=t.context;let o=e.$refs;o||(o=e.$refs={}),o[n]=t.component||t.node}},beforeUpdate:function(e,t,n){const o=t.ref,r=n.ref;if(o||r){const e=t.context,n=t.component||t.node;let i=e.$refs;o?r?o!==r&&(i?i[o]===n&&delete i[o]:i=e.$refs={},i[o]=n):(i||(i=e.$refs={}),i[o]=n):i&&r&&i[r]===n&&delete i[r]}},beforeDestroy:function(e,t){const{ref:n}=t;if(n){const{$refs:e}=t.context,o=t.component||t.node;e&&e[n]===o&&delete e[n]}}}),Pe,Fe,Ze],pt=dt.length;function ht(e,t){for(let n=0;n<pt;n++){const o=dt[n][e];o&&o.apply(undefined,t)}}const mt={create(e,t){const n=t.node=e.createElement(t.tag,t.isSvg);t.children?kt(e,n,t.children):t.text?e.setElementText(n,t.text):t.html&&e.setHtml(n,t.html),t.isPure||(t.data={}),ht("afterCreate",[e,t])},update(e,t,n){const o=n.node;t.node=o,t.parentNode=n.parentNode,t.data=n.data,!t.isPure&&n.isPure&&(t.data={}),ht("beforeUpdate",[e,t,n]);const{text:r,html:i,children:s}=t,c=n.text,f=n.html,u=n.children;a(r)?(u&&Et(e,u),r!==c&&e.setElementText(o,r)):a(i)?(u&&Et(e,u),i!==f&&e.setHtml(o,i)):s?u?s!==u&&St(e,o,s,u):((c||f)&&e.setElementText(o,""),kt(e,o,s)):u?Et(e,u):(c||f)&&e.setElementText(o,""),ht("afterUpdate",[e,t,n])},destroy(e,t){if(t.isPure)return;ht("beforeDestroy",[e,t]);const{children:n}=t;if(n)for(let t=0,o=n.length;t<o;t++)At(e,n[t])},insert:nt,remove:ot,enter:et,leave:tt},vt={create(e,t){const n=t.data={};let o=undefined;t.tag&&t.context.loadComponent(t.tag,(function(r){ge(n,"$loading")?n.$loading&&(n.$vnode&&(t=n.$vnode,delete n.$vnode),wt(e,t,r),t.operator.enter(t)):o=r})),t.node=e.createComment("component"),o?wt(e,t,o):n.$loading=true},update(e,t,n){const o=n.data;if(t.data=o,t.node=n.node,t.parentNode=n.parentNode,t.component=n.component,o.$loading)return void(o.$vnode=t);ht("beforeUpdate",[e,t,n]);const{component:r,slots:i}=t;if(r){let e=t.props;i&&(e=he(e||{},i)),e&&r.forceUpdate(e)}ht("afterUpdate",[e,t,n])},destroy(e,t){const{component:n}=t;n?(ht("beforeDestroy",[e,t]),n.destroy(),t.shadow=n.$vnode,t.component=undefined):t.data.$loading=false},insert(e,t,n,o){const{shadow:r}=n;r?(r.operator.insert(e,t,r,o),r.parentNode=t):nt(e,t,n,o)},remove(e,t){const{shadow:n}=t;n?(n.operator.remove(e,n),n.parentNode=undefined):ot(e,t)},enter(e){const{shadow:t}=e;t&&(e.transition?Dt(e,t.node):t.operator.enter(t))},leave(e,t){const{shadow:n}=e;if(n){if(!e.transition)return void n.operator.leave(n,t);if(Ot(e,n.node,t))return}t()}},yt={create(e,t){it(e,t),t.node=Je(e,t)},update(e,t,n){const{parentNode:o}=n;t.node=n.node,t.parentNode=o,st(e,o,t,n)},destroy:ct,insert:ft,remove:ut,enter:n,leave:rt},gt={create(e,t){let n=undefined;t.to&&(n=e.find(t.to)),n||(n=e.getBodyElement()),t.target=n,t.node=e.createComment("");const o=t.children;for(let t=0,r=o.length;t<r;t++)_t(e,o[t]),Ct(e,n,o[t])},update(e,t,n){const{target:o}=n;t.node=n.node,t.parentNode=n.parentNode,t.target=o,st(e,o,t,n)},destroy(e,t){const n=t.children;for(let t=0,o=n.length;t<o;t++)At(e,n[t]),Nt(e,n[t])},insert:nt,remove:ot,enter:n,leave:rt},$t={create(e,t){it(e,t),t.data={},t.node=Je(e,t),ht("afterCreate",[e,t])},update(e,t,n){const{parentNode:o}=n;t.node=n.node,t.parentNode=o,t.data=n.data,ht("beforeUpdate",[e,t,n]),st(e,o,t,n),ht("afterUpdate",[e,t,n])},destroy(e,t){ht("beforeDestroy",[e,t]),ct(e,t)},insert:ft,remove:ut,enter:et,leave:tt};function bt(e,t){return e.type===t.type&&e.tag===t.tag&&e.key===t.key}function xt(e,t,n){let r,i,s;for(;t<=n;)i=e[t],i&&(s=i.key)&&(r||(r={}),r[s]=t),t++;return r||o}function wt(e,t,n){const o=t.data,r=(t.parent||t.context).createComponent(n,t);return t.component=r,t.shadow=r.$vnode,o.$loading=false,ht("afterCreate",[e,t]),r}function _t(e,t){t.node||t.operator.create(e,t)}function kt(e,t,n,o,r,i){let s,c=o||0,f=undefined!==r?r:n.length-1;for(;c<=f;)s=n[c],_t(e,s),Ct(e,t,s,i),c++}function Ct(e,t,n,o){const{operator:r}=n;r.insert(e,t,n,o),n.parentNode=t,ht("afterMount",[e,n]),r.enter(n)}function Et(e,t,n,o){let r,i=n||0,s=undefined!==o?o:t.length-1;for(;i<=s;)r=t[i],r&&(At(e,r),Nt(e,r)),i++}function At(e,t){t.operator.destroy(e,t)}function Nt(e,t){const{operator:n}=t;n.leave(t,(function(){n.remove(e,t),t.parentNode=undefined}))}function Dt(e,t){const{context:n,transition:o}=e,r=e.data.$leaving;if(r&&r(),o){const{enter:e}=o;e&&e.call(n,t)}}function Ot(e,t,n){const{context:o,transition:r}=e,i=e.data,s=i.$leaving;if(s&&s(),r){const{leave:e}=r;if(e)return e.call(o,t,i.$leaving=function(){i.$leaving&&(n(),i.$leaving=undefined)}),true}}function St(e,t,n,o){let r,i,s=0,c=n.length-1,f=n[s],u=n[c],a=0,l=o.length-1,d=o[a],p=o[l];for(;a<=l&&s<=c;)f?u?d?p?bt(f,d)?(Tt(e,f,d),f=n[++s],d=o[++a]):bt(u,p)?(Tt(e,u,p),u=n[--c],p=o[--l]):bt(u,d)?(Tt(e,u,d),Qe(e,t,d.node,e.next(p.node)),u=n[--c],d=o[++a]):bt(f,p)?(Tt(e,f,p),Qe(e,t,p.node,d.node),f=n[++s],p=o[--l]):(r||(r=xt(o,a,l)),i=f.key?r[f.key]:undefined,undefined!==i?(Ut(e,f,o[i]),o[i]=undefined):_t(e,f),Ct(e,t,f,d),f=n[++s]):p=o[--l]:d=o[++a]:u=n[--c]:f=n[++s];a>l?kt(e,t,n,s,c,n[c+1]):s>c&&Et(e,o,a,l)}function Tt(e,t,n){t!==n&&t.operator.update(e,t,n)}function Ut(e,t,n){if(t!==n){if(!bt(t,n)){const o=n.parentNode;return _t(e,t),void(o&&(Ct(e,o,t,n),At(e,n),Nt(e,n)))}Tt(e,t,n)}}function zt(e){const{children:t}=e;return{type:e.type,data:e.data,node:e.node,parentNode:e.parentNode,target:e.target,shadow:e.shadow,parent:e.parent,component:e.component,context:e.context,operator:e.operator,tag:e.tag,isSvg:e.isSvg,isStatic:e.isStatic,isPure:e.isPure,slots:e.slots,props:e.props,nativeAttrs:e.nativeAttrs,nativeStyles:e.nativeStyles,directives:e.directives,events:e.events,lazy:e.lazy,transition:e.transition,model:e.model,to:e.to,ref:e.ref,key:e.key,text:e.text,html:e.html,children:t?t.map(zt):t}}function Pt(e,t){return T(t)}function jt(e,t,n){const o=true===t||"true"===t||t===e;return o===n?undefined:o?"true":"false"}Q("abstract,goto,native,static,enum,implements,package,super,byte,export,import,private,protected,public,synchronized,char,extends,int,throws,class,final,interface,transient,yield,let,const,float,double,boolean,long,short,volatile,default");function Rt(e){const{input:t,getter:n}=e;e.value=t?n.apply(undefined,t):n()}class Ht{constructor(){this.map={},this.list=[]}add(e,t){const n=this.map[e.id]||(this.map[e.id]={});n[t]||(n[t]=e,this.list.push([e,t]))}watch(e){const{list:t}=this;if(t)for(let n=0,o=t.length;n<o;n++)t[n][0].watch(t[n][1],e)}unwatch(e){const{list:t}=this;if(t)for(let n=0,o=t.length;n<o;n++)t[n][0].unwatch(t[n][1],e)}}class Mt{constructor(e,t,n,o,r,i,s,c){const f=this;f.status=1,f.keypath=e,f.cache=t,f.input=o,f.output=r,f.setter=s,f.getter=i,f.onChange=c,f.watcherOptions={sync:n,watcher(){f.refresh()}}}get(){const e=this,{status:t,watcherOptions:n}=e;if(e.cache){if(2!==t)if(e.staticDeps)Rt(e);else{let{dynamicDeps:t}=e;t&&t.unwatch(n.watcher),e.dynamicDeps=undefined;const o=Mt.current;Mt.current=e,Rt(e),Mt.current=o,t=e.dynamicDeps,t&&t.watch(n)}}else Rt(e);return 2!==t&&(e.status=2),function(e){const{value:t,output:n}=e;return n?n(t):t}(e)}set(e){const{setter:t}=this;t?t(e):c(e)&&(this.getter=e,this.refresh())}refresh(){const e=this.value;this.status=3;const t=this.get();t!==e&&this.onChange(this.keypath,t,e)}addStaticDeps(e,t){const n=this.staticDeps||(this.staticDeps=new Ht);for(let o=0,r=t.length;o<r;o++)n.add(e,t[o]);n.watch(this.watcherOptions)}addDynamicDep(e,t){(this.dynamicDeps||(this.dynamicDeps=new Ht)).add(e,t)}}class Wt{constructor(e,t,n){this.keypath=e,this.scopeValue=t,this.scopeKey=n}getScope(){const{scopeValue:e,scopeKey:t}=this;return undefined!==t?e[t]:e}getKeypath(e){const{keypath:t}=this;return t?t+"."+e:e}}function Lt(e,t,n,o,r,i,s,l,d,p){let h=[new Wt("",n)],y=[],g=function(e,t,n,o){if(e[t])e[t][n]=o;else{const r={};r[n]=o,e[t]=r}},$=function(e){const t={};return function(e,t){const n=e.split(";");for(let e=0,o=n.length;e<o;e++){const o=n[e],r=o.indexOf(":");if(r>0){const e=I(o.substring(0,r)),n=I(o.substring(r+1));e&&n&&t(W(e),n)}}}(e,(function(e,n){t[e]=n})),t},b=function(e){if(f(e)){const t={};for(let n=0,o=e.length;n<o;n++){const o=b(e[n]);if(o)for(let e in o)t[e]=o[e]}return t}return u(e)?e:a(e)?$(e):void 0},x=function(e,t){return t},w=function(e){return{keypath:e.keypath,value:e.value}},_=function(t,n,o){return function(r,i,s){o&&r.phase===v.PHASE_DOWNWARD||(t===r.type&&n===r.ns||((r=new v(t,s?r.originalEvent:r)).ns=n),e.fire(r,i))}},C=function(e,t,n){return function(o,r){if(n&&o.phase===v.PHASE_DOWNWARD)return;false===D(e,t?t.execute(o,r):r?[o,r]:[o])&&o.prevent().stop()}},E=function(e,t,n,o,r,i,s,c){return{key:e,value:t,name:n,ns:o,isNative:c,runtime:i,listener:C(r,i,s)}},A=function(e,t,n,o,r,i,s,c){return{key:e,value:t,name:n,ns:o,isNative:c,listener:_(r,i,s)}},N=function(e,t,n,o,r){return{ns:"o",name:t,value:o,modifier:n,create:r}},D=function(t,n){const o=e[t];return n&&n.length>0?m(o,e,n):e[t]()},O=function(e,t,n){if(u(n))for(let o in n)g(e,t,o,n[o])},S=function(e,t,n){let{keypath:o,value:r}=e,i=0,s=!!o,c=h,a=k(h).keypath;if(f(r)){i=r.length;for(let e=0;e<i;e++)s&&(a=o+"."+e,h=c.slice(),h.push(new Wt(a,r,e))),t(h,r[e],a,i,e)}else if(u(r)){const e=de(r);i=e.length;for(let n=0;n<i;n++){const f=e[n];s&&(a=o+"."+f,h=c.slice(),h.push(new Wt(a,r,f))),t(h,r[f],a,i,f)}}h!==c&&(h=c),n&&0===i&&n()},U=function(e,t,n,o,r){let i=0,s=0,c=k(h).keypath;if(e<t)if(s=t-e,n)for(let n=e;n<=t;n++)o(h,n,c,s,i++);else for(let n=e;n<t;n++)o(h,n,c,s,i++);else if(s=e-t,n)for(let n=e;n>=t;n--)o(h,n,c,s,i++);else for(let n=e;n>t;n--)o(h,n,c,s,i++);r&&0===s&&r()},z=function(e,t){p(e);const o=n[e];if(o)return o instanceof Mt?t?o.getter(t):o.get():o},P=function(e,t,n,o,r,i){let s;for(;t>=0;){const i=e[t],c=i.getKeypath(n),f=ye(i.getScope(),o),u=H(f?f.value:undefined,c);if(f)return u;if(s||(s=u),!(r&&t>0))break;t--}return i?H(i):s},j=function(e,t,n,o){return P(e,t,n,[n],true,o)},R=function(e,t){const n=ye(e,t);return H(n?n.value:undefined)},H=function(e,t){return e&&c(e.get)&&(e=e.get()),le.keypath=t,le.value=e,undefined!==t&&p(t),le};return function(t,n,c,f){t($,b,x,w,E,A,N,O,S,U,z,g,Pt,jt,P,j,R,H,T,at,lt,mt,vt,yt,gt,$t,e,Ce,o,r,i,s,l,d,h,n,c,f)}(t,n,"",y),y[0]}let Ft=0,It="cssFloat",Kt=function(e,t,n){e.addEventListener(t,n,false)},Vt=function(e,t,n){e.removeEventListener(t,n,false)},Bt=function(e,t){e.classList.add(t)},Yt=function(e,t){e.classList.remove(t)};if(t){let e=t.documentElement;It in e.style||(It="styleFloat"),e.classList||(Bt=function(e,t){const n=e.className.split(qt);E(n,t)||(x(n,t),e.className=D(n,qt))},Yt=function(e,t){const n=e.className.split(qt);C(n,t)&&(e.className=D(n,qt))}),e=undefined}const qt=" ",Gt={svg:"http://www.w3.org/2000/svg"},Zt={},Jt={},Qt={},Xt={};function en(e){return t.createComment(e)}function tn(e,t){e.appendChild(t)}Xt.model={on(e,t){let n=false;cn(e,"compositionstart",t.compositionstart=function(){n=true}),cn(e,"compositionend",t.compositionend=function(e){n=false,t(e)}),Kt(e,"input",t.input=function(e){n||t(e)})},off(e,t){fn(e,"compositionstart",t.compositionstart),fn(e,"compositionend",t.compositionend),Vt(e,"input",t.input),t.compositionstart=t.compositionend=t.input=undefined}};const nn=function(e){const n=t.querySelector(e);if(n)return n};function on(e){return e.innerHTML}const rn=Bt,sn=Yt;function cn(e,t,n){const o=e.$event||(e.$event=++Ft),r=Jt[o]||(Jt[o]={}),i=Qt[o]||(Qt[o]={}),s=i[t]||(i[t]=[]);if(!r[t]){const n=Xt[t],i=function(e){let n;v.is(e)?(n=e,n.type!==t&&(n.type=t)):n=new v(t,function(e,t){return e}(e));const o=s.slice();for(let e=0,t=o.length;e<t;e++)o[e](n,undefined,true)};r[t]=i,Zt[o]?Zt[o]++:Zt[o]=1,n?n.on(e,i):Kt(e,t,i)}s.push(n)}function fn(e,t,n){let o=e.$event,r=Jt[o],i=Qt[o],s=i&&i[t];if(s&&(C(s,n),s.length||(s=undefined,delete i[t])),r&&r[t]&&!s){const n=Xt[t],i=r[t];n?n.off(e,i):Vt(e,t,i),delete r[t],Zt[o]&&Zt[o]--}Zt[o]||(e.$event=undefined,delete Jt[o],delete Qt[o])}var un=Object.freeze({__proto__:null,getBodyElement:function(){return t.body},createElement:function(e,n){return n?t.createElementNS(Gt.svg,e):t.createElement(e)},createText:function(e){return t.createTextNode(e)},createComment:en,getAttr:function(e,t){const n=e.getAttribute(t);if(null!=n)return n},setAttr:function(e,t,n){undefined===n?e.removeAttribute(t):e.setAttribute(t,n)},removeAttr:function(e,t){e.removeAttribute(t)},setStyle:function(e,t,n){null!=n?e["float"===t?It:t]=n:e[t]=""},removeStyle:function(e,t){e[t]=""},before:function(e,t,n){e.insertBefore(t,n)},append:tn,replace:function(e,t,n){e.replaceChild(t,n)},remove:function(e,t){e.removeChild(t)},parent:function(e){const{parentNode:t}=e;if(t)return t},next:function(e){const{nextSibling:t}=e;if(t)return t},find:nn,tag:function(e){if(1===e.nodeType)return Z(e.tagName)},getNodeText:function(e){return e.textContent},setNodeText:function(e,t){e.textContent=t},getElementText:function(e){return e.textContent},setElementText:function(e,t){e.textContent=t},getHtml:on,setHtml:function(e,t){e.innerHTML=t},addClass:rn,removeClass:sn,on:cn,off:fn,addSpecialEvent:function(e,t){Xt[e]=t}});function an(e,t){return p(e)?+e:undefined!==t?t:0}function ln(e,t){if(null==e||""===t)return e;const n=ye(e,t);return n?n.value:void 0}function dn(e,t,n,r,i,s){const c=function(t,n,o){if(n!==o){const c=ce(e,t);for(let e=0;e<i;e++){const t=r[e];undefined!==ae(c,t)&&s(t,c,n,o)}dn(c,n,o,r,i,s)}};(function(e,t,n){const o=a(e),r=a(t);if(o||r)return n("length",o?e.length:void 0,r?t.length:void 0),!0})(t,n,c)||function(e,t,n){const o=f(e),r=f(t);if(o||r){const i=o?e.length:void 0,s=r?t.length:void 0;n("length",i,s);for(let c=0,f=Math.max(i||0,s||0);c<f;c++)n(""+c,o?e[c]:void 0,r?t[c]:void 0);return!0}}(t,n,c)||function(e,t,n){const r=u(e),i=u(t);if(r||i){const s=z(),c=r?e:o,f=i?t:o;if(r)for(let e in c){const t=c[e];t!==f[e]&&(s.set(e,!0),n(e,t,f[e]))}if(i)for(let e in f){const t=f[e];void 0===s.get(e)&&t!==c[e]&&n(e,c[e],t)}}}(t,n,c)}function pn(e,t,n,o,r,i){let s;for(const c in o)if(fe(c))undefined!==ae(e,c)?i(c,e,t,n):r&&(s?s.push(c):s=[c]);else{const o=re(c,e);if(o>=0){const e=K(c,o),r=ln(t,e),s=ln(n,e);r!==s&&i(c,c,r,s)}}s&&dn(e,t,n,s,s.length,i)}const hn={watcher:n};function mn(e,t){return c(e)?(hn.watcher=e,hn.immediate=true===t,hn):e}let vn=0;class yn{constructor(e,t,n){const o=this;o.id=vn++,o.data=e||{},o.context=t||o,o.nextTask=n||new Te,o.syncEmitter=new Ee,o.asyncEmitter=new Ee,o.asyncOldValues={},o.asyncKeypaths={},o.onComputedChange=function(e,t,n){o.diff(e,t,n)}}get(e,t,n){const o=this,{data:r}=o,i=Mt.current;if(""===e)return r;i&&!n&&i.addDynamicDep(o,e);const s=ye(r,e);return s?s.value:t}set(e,t){const n=this,{data:o}=n,r=function(e,t){const r=n.get(e);if(t===r)return;let i;se(e,(function(e,n,r){if(0!==n)i&&(n===r?i[e]=t:i=i[e]||(i[e]={}));else{const n=o[e];n&&n instanceof Mt?0===r?n.set(t):i=n.get():0===r?o[e]=t:i=o[e]||(o[e]={})}})),n.diff(e,t,r)};if(a(e))r(e,t);else if(u(e))for(let t in e)r(t,e[t])}diff(e,t,n){let o=this,{syncEmitter:r,asyncEmitter:i,asyncOldValues:s,asyncKeypaths:c}=o,f=36!==q(e);pn(e,t,n,r.listeners,f,(function(e,t,n,o){r.fire({type:e,ns:""},[n,o,t])})),pn(e,t,n,i.listeners,f,(function(e,t,n,r){const f=i.listeners[e];for(let e=0,t=f.length;e<t;e++)f[e].count++;c[t]||(s[t]=r,c[t]={}),c[t][e]=true,o.pending||(o.pending=true,o.nextTask.append((function(){o.pending&&o.diffAsync()})))}))}diffAsync(){const e=this,{asyncEmitter:t,asyncOldValues:n,asyncKeypaths:o}=e;e.pending=undefined,e.asyncOldValues={},e.asyncKeypaths={};for(let r in n){const i=[e.get(r),n[r],r],s=o[r],c=i[0]!==i[1],f=function(e,t,n){if(n.count)return n.count--,c};for(let e in s)t.fire({type:e,ns:""},i,f)}}addComputed(e,t){let n,o,r,i,s,a=this,l=a.context,p=true,h=true;if(c(t))r=t.bind(l);else if(u(t)){const e=t;d(e.cache)&&(p=e.cache),d(e.sync)&&(h=e.sync),f(e.deps)&&(n=e.deps),O(e.input)||(o=e.input),c(e.output)&&(s=e.output),c(e.get)&&(r=e.get.bind(l)),c(e.set)&&(i=e.set.bind(l))}if(r){const t=new Mt(e,p,h,o,s,r,i,a.onComputedChange);return p&&n&&t.addStaticDeps(a,n),a.data[e]=t}}removeComputed(e){delete this.data[e]}watch(e,t,n){const o=this,{context:r,syncEmitter:i,asyncEmitter:s}=o,c=function(e,t){const n=t.sync?i:s,c={ns:"",listener:t.watcher,ctx:r,count:0};t.once&&(c.max=1),n.on(e,c),t.immediate&&t.watcher.call(r,o.get(e),undefined,e)};if(a(e))c(e,mn(t,n));else for(let t in e)c(t,mn(e[t]))}unwatch(e,t){this.syncEmitter.off(e,t),this.asyncEmitter.off(e,t)}toggle(e){const t=!this.get(e);return this.set(e,t),t}increase(e,t,n){const o=an(this.get(e),0)+(t||1);if(!l(n)||o<=n)return this.set(e,o),o}decrease(e,t,n){const o=an(this.get(e),0)-(t||1);if(!l(n)||o>=n)return this.set(e,o),o}insert(e,t,n){let o=this.get(e);o=f(o)?o.slice():[];const{length:r}=o;if(true===n||n===r)o.push(t);else if(false===n||0===n)o.unshift(t);else{if(!(n>0&&n<r))return;o.splice(n,0,t)}return this.set(e,o),true}append(e,t){return this.insert(e,t,true)}prepend(e,t){return this.insert(e,t,false)}removeAt(e,t){let n=this.get(e);if(f(n)&&t>=0&&t<n.length)return n=n.slice(),n.splice(t,1),this.set(e,n),true}remove(e,t){let n=this.get(e);if(f(n)&&(n=n.slice(),C(n,t)))return this.set(e,n),true}copy(e,t){return me(e,t)}destroy(){const e=this;e.syncEmitter.off(),e.asyncEmitter.off(),e.nextTask.clear(),e.data={}}}const gn={},$n={},bn={},xn={},wn=/^[#.][-\w+]+$/,_n=new class{constructor(){this.$emitter=new Ee}fire(e,t,n){this.$emitter.fire(t,[e,n])}on(e,t){return this.$emitter.on(e,t),this}off(e,t){return this.$emitter.off(e,t),this}},kn={watcher(e){this.update(e,this.$vnode)},sync:true},Cn=function(e){return e?e.map(zt):e};class En{constructor(e){const t=this,n=e||o;t.$emitter=new Ee(true),n.events&&t.on(n.events);{n.parent&&(t.$parent=n.parent);const e=n.beforeCreate;e&&e.call(t,n),_n.fire(t,"beforeCreate",{options:n})}let{data:r,props:i,vnode:s,propTypes:f,computed:l,methods:d,watchers:p,extensions:h}=n;t.$options=n,h&&he(t,h);const m=i?me(i):{};f&&pe(f,(function(e,t){let n=m[t];undefined===n&&(n=e.value,undefined!==n&&(m[t]="function"===e.type?n:c(n)?n():n))}));const v=t.$observer=new yn(m,t,t.$nextTask=new Te);l&&pe(l,(function(e,t){v.addComputed(t,e)}));const y=c(r)?r.call(t,e):r;u(y)&&pe(y,(function(e,t){m[t]=e})),d&&pe(d,(function(e,n){t[n]=e}));{let e=undefined,{el:o,root:r,model:i,context:c,replace:f,template:u,transitions:l,components:d,directives:h,filters:m,slots:y}=n;if(i&&(t.$model=i),a(u)&&wn.test(u)&&(e=nn(u),e&&(u=on(e),e=undefined)),o){if(a(o)){const t=o;wn.test(t)&&(e=nn(t))}else e=o;f||tn(e,e=en(""))}if(r&&(t.$root=r),c&&(t.$context=c),Tn(t,"transition",l),Tn(t,"component",d),Tn(t,"directive",h),Tn(t,"filter",m),u){if(p&&v.watch(p),y)for(let e in y)v.addComputed(e,{get:y[e],input:[t],output:Cn});v.addComputed("$$template",{get:t.render,sync:false}),v.watch("$$template",kn);{const e=n.afterCreate;e&&e.call(t),_n.fire(t,"afterCreate")}return t.$template=a(u)?En.compile(u):u,s||(s=function(e,t,n){const o={context:n,node:t,parentNode:e.parent(t)};switch(t.nodeType){case 1:o.data={},o.tag=e.tag(t),o.type=3,o.operator=mt;break;case 3:o.isPure=!0,o.text=t.nodeValue,o.type=1,o.operator=at;break;case 8:o.isPure=!0,o.text=t.nodeValue,o.type=2,o.operator=lt}return o}(un,e,t)),void t.update(t.get("$$template"),s)}}p&&v.watch(p);{const e=n.afterCreate;e&&e.call(t),_n.fire(t,"afterCreate")}}static define(e){return e}static use(e){e.install(En)}static nextTick(e,t){Te.shared().append(e,t)}static compile(e,t){return e}static directive(e,t){if(a(e)&&!t)return Dn(gn,e);Sn(gn,e,t)}static transition(e,t){if(a(e)&&!t)return Dn($n,e);Sn($n,e,t)}static component(e,t){if(a(e)&&!t)return Dn(bn,e);Sn(bn,e,t)}static filter(e,t){if(a(e)&&!t)return Dn(xn,e);Sn(xn,e,t)}static method(e,t){if(a(e)&&!t)return An[e];Sn(An,e,t)}get(e,t){return this.$observer.get(e,t)}set(e,t){const{$observer:n}=this;n&&n.set(e,t)}on(e,t){return zn(this,e,t),this}once(e,t){return zn(this,e,t,true),this}off(e,t){return this.$emitter.off(e,t),this}fire(e,t,n){const o=this,{$emitter:r,$parent:i,$children:s}=o;let c;if(v.is(e))c=e;else if(a(e))c=new v(e);else{const t=e;c=new v(t.type),c.ns=t.ns}if(undefined===c.ns){const e=r.toEvent(c.type);c.type=e.type,c.ns=e.ns}c.target||(c.target=o);let f,l=[c];return u(t)?x(l,t):true===t&&(n=true),f=!(!n||c.target!==o)||r.fire(c,l),f&&(n?s&&(c.phase=v.PHASE_DOWNWARD,y(s,(function(e){return f=e.fire(c,t,true)}))):i&&(c.phase=v.PHASE_UPWARD,f=i.fire(c,t))),f}watch(e,t,n){return this.$observer.watch(e,t,n),this}unwatch(e,t){return this.$observer.unwatch(e,t),this}loadComponent(e,t){Nn(this.$components,e,t)||Nn(bn,e,t)}createComponent(e,t){{const n=this;(e=me(e)).root=n.$root||n,e.parent=n,e.context=t.context,e.vnode=t,e.replace=true;let{props:o,slots:r,model:i}=t;if(i){o||(o={});const t=e.model||"value";o[t]=i.value,e.model=t}o&&(e.props=o),r&&(e.slots=r);const s=new En(e);x(n.$children||(n.$children=[]),s);const c=s.$el;return c&&(t.node=c),s}}directive(e,t){{const n=this,{$directives:o}=n;if(a(e)&&!t)return Dn(o,e,En.directive);Sn(o||(n.$directives={}),e,t)}}transition(e,t){{const n=this,{$transitions:o}=n;if(a(e)&&!t)return Dn(o,e,En.transition);Sn(o||(n.$transitions={}),e,t)}}component(e,t){{const n=this,{$components:o}=n;if(a(e)&&!t)return Dn(o,e,En.component);Sn(o||(n.$components={}),e,t)}}filter(e,t){{const n=this,{$filters:o}=n;if(a(e)&&!t)return Dn(o,e,En.filter);Sn(o||(n.$filters={}),e,t)}}forceUpdate(e){{const t=this,{$options:n,$vnode:o,$nextTask:r}=t;if(o){if(e){const o=n.beforePropsUpdate;o&&o.call(t,e),t.set(e)}r.run(),e||o!==t.$vnode||t.update(t.get("$$template"),o)}}}render(){{const e=this,{$options:t,$observer:n}=e,{data:o}=n,r=t.beforeRender,i=t.afterRender;r&&r.call(e,o),_n.fire(e,"beforeRender",{props:o});const s=Lt(e,e.$template,o,e.$filters,xn,e.$directives,gn,e.$transitions,$n,(function(e){const{current:t}=Mt;t&&t.addDynamicDep(n,e)}));return i&&i.call(e),_n.fire(e,"afterRender"),s}}update(e,t){{let n,o=this,{$vnode:r,$options:i}=o;if(r){const r=i.beforeUpdate;r&&r.call(o),_n.fire(o,"beforeUpdate"),Ut(un,e,t),n="afterUpdate"}else{const r=i.beforeMount;r&&r.call(o),_n.fire(o,"beforeMount"),Ut(un,e,t),o.$el=e.node,n="afterMount"}o.$vnode=e,En.nextTick((function(){if(o.$vnode){const e=i[n];e&&e.call(o),_n.fire(o,n)}}))}}checkProp(e,t){}destroy(){const e=this,{$parent:t,$options:n,$emitter:o,$observer:r}=e;{const o=n.beforeDestroy;o&&o.call(e),_n.fire(e,"beforeDestroy"),t&&t.$children&&C(t.$children,e);const{$vnode:r}=e;r&&(c=!t,At(i=un,s=r),c&&Nt(i,s))}var i,s,c;r.destroy();{const t=n.afterDestroy;t&&t.call(e),_n.fire(e,"afterDestroy")}o.off(),e.$el=undefined}nextTick(e){this.$nextTask.append(e,this)}toggle(e){return this.$observer.toggle(e)}increase(e,t,n){return this.$observer.increase(e,t,n)}decrease(e,t,n){return this.$observer.decrease(e,t,n)}insert(e,t,n){return this.$observer.insert(e,t,n)}append(e,t){return this.$observer.append(e,t)}prepend(e,t){return this.$observer.prepend(e,t)}removeAt(e,t){return this.$observer.removeAt(e,t)}remove(e,t){return this.$observer.remove(e,t)}copy(e,t){return this.$observer.copy(e,t)}}En.version="1.0.0-alpha.408",En.is=h,En.dom=un,En.array=S,En.object=$e,En.string=ee,En.logger=Ce,En.Event=v,En.Emitter=Ee,En.lifeCycle=_n,En.config=s;const An=En.prototype;function Nn(e,t,n){if(e&&e[t]){const o=e[t];if(c(o)){e[t]=[n];const r=function(n){const o=e[t],r=n.default||n;e[t]=r,y(o,(function(e){e(r)}))},i=o(r);i&&i.then(r)}else f(o)?x(o,n):n(o);return true}}function Dn(e,t,n){return e&&e[t]?e[t]:n?n(t):void 0}function On(e,t,n,o){o&&o.format&&(n=o.format(n)),e[t]=n}function Sn(e,t,n,o){a(t)?On(e,t,n,o):pe(t,(function(t,n){On(e,n,t,o)}))}function Tn(e,t,n){c(n)?e[t](n.call(e)):u(n)&&e[t](n)}function Un(e,t,n){e.$emitter.on(t.type,{listener:t.listener,ns:t.ns,max:n?1:-1,ctx:e})}function zn(e,t,n,o){const{$emitter:r}=e;a(t)?Un(e,r.toFilter(t,n),o):f(t)?y(t,(function(t){Un(e,t,o)})):pe(t,(function(t,n){Un(e,r.toFilter(n,t),o)}))}N(de(An));export default En; //# sourceMappingURL=yox.esm.min.js.map