From 161f897f926bba386b1e6a01d4873815cefd6508 Mon Sep 17 00:00:00 2001 From: atomtong Date: Wed, 19 Jul 2017 15:00:26 +0800 Subject: [PATCH] * [jsfm] js framework version update to 0.21.1 --- pre-build/native-bundle-main.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pre-build/native-bundle-main.js b/pre-build/native-bundle-main.js index 791f79d76e..6479a109bb 100644 --- a/pre-build/native-bundle-main.js +++ b/pre-build/native-bundle-main.js @@ -1,8 +1,8 @@ -(this.nativeLog||function(e){console.log(e)})("START JS FRAMEWORK 0.20.9, Build 2017-05-23 15:00."),this.getJSFMVersion=function(){return"0.20.9"};var global=this,process={env:{}},setTimeout=global.setTimeout;!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t():"function"==typeof define&&define.amd?define(t):t()}(0,function(){"use strict";function e(e){return e&&e.__esModule?e.default:e}function t(e,t){return t={exports:{}},e(t,t.exports),t.exports}function n(){if(o(),void 0===global.console||global.WXEnvironment&&"iOS"===global.WXEnvironment.platform)global.console={debug:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];i("debug")&&global.nativeLog.apply(global,a(e).concat(["__DEBUG"]))},log:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];i("log")&&global.nativeLog.apply(global,a(e).concat(["__LOG"]))},info:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];i("info")&&global.nativeLog.apply(global,a(e).concat(["__INFO"]))},warn:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];i("warn")&&global.nativeLog.apply(global,a(e).concat(["__WARN"]))},error:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];i("error")&&global.nativeLog.apply(global,a(e).concat(["__ERROR"]))}};else{var e=console.debug,t=console.log,n=console.info,r=console.warn,s=console.error;console.__ori__={debug:e,log:t,info:n,warn:r,error:s},console.debug=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];i("debug")&&console.__ori__.debug.apply(console,e)},console.log=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];i("log")&&console.__ori__.log.apply(console,e)},console.info=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];i("info")&&console.__ori__.info.apply(console,e)},console.warn=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];i("warn")&&console.__ori__.warn.apply(console,e)},console.error=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];i("error")&&console.__ori__.error.apply(console,e)}}}function r(){Ss={},global.console=xs}function o(){Es.forEach(function(e){var t=Es.indexOf(e);Ss[e]={},Es.forEach(function(n){Es.indexOf(n)<=t&&(Ss[e][n]=!0)})})}function i(e){var t=global.WXEnvironment&&global.WXEnvironment.logLevel||"log";return Ss[t]&&Ss[t][e]}function a(e){return e.map(function(e){return e="[object object]"===Object.prototype.toString.call(e).toLowerCase()?JSON.stringify(e):String(e)})}function s(){if(void 0===setTimeout&&"function"==typeof Cs){var e={},t=0;global.setTimeout=function(n,r){e[++t]=n,Cs(t.toString(),r)},global.setTimeoutCallback=function(t){"function"==typeof e[t]&&(e[t](),delete e[t])}}}function u(){global.setTimeout=ks,global.setTimeoutCallback=null}function c(){Object.freeze(Object),Object.freeze(Array),l(),Object.freeze(Array.prototype),Object.freeze(String.prototype),Object.freeze(Number.prototype),Object.freeze(Boolean.prototype),f(),Object.freeze(Date.prototype),Object.freeze(RegExp.prototype)}function l(){var e=Object.prototype,t="Object.prototype";d(e,"__defineGetter__",t),d(e,"__defineSetter__",t),d(e,"__lookupGetter__",t),d(e,"__lookupSetter__",t),d(e,"constructor",t),d(e,"hasOwnProperty",t),d(e,"isPrototypeOf",t),d(e,"propertyIsEnumerable",t),d(e,"toLocaleString",t),d(e,"toString",t),d(e,"valueOf",t),Object.seal(e)}function f(){var e=Error.prototype,t="Error.prototype";d(e,"name",t),d(e,"message",t),d(e,"toString",t),d(e,"constructor",t),Object.seal(e)}function d(e,t,n){if(e.hasOwnProperty(t)){var r=e[t];Object.defineProperty(e,t,{get:function(){return r},set:function(r){if(this===e)throw Error("Cannot assign to read only property "+t+" of "+n);return Object.defineProperty(this,t,{value:r,writable:!0}),r}})}}function p(e,t){e&&(As[e]=t)}function h(e){return As[e]}function v(e){delete As[e]}function m(e){var t=As[e];return t&&t.taskCenter?t.taskCenter:null}function y(){return(Is++).toString()}function _(e,t,n){var r=e.documentElement;if(!(r.pureChildren.length>0||t.parentNode)){var o=r.children,i=o.indexOf(n);i<0?o.push(t):o.splice(i,0,t),1===t.nodeType?("body"===t.role?(t.docId=e.id,t.ownerDocument=e,t.parentNode=r,w(t,r)):(t.children.forEach(function(e){e.parentNode=t}),b(e,t),t.docId=e.id,t.ownerDocument=e,w(t,r),delete e.nodeMap[t.nodeId]),r.pureChildren.push(t),g(e,t)):(t.parentNode=r,e.nodeMap[t.ref]=t)}}function g(e,t){var n=t.toJSON(),r=n.children;delete n.children;var o=e.taskCenter.send("dom",{action:"createBody"},[n]);return r&&r.forEach(function(t){o=e.taskCenter.send("dom",{action:"addElement"},[n.ref,t,-1])}),o}function b(e,t){t.role="body",t.depth=1,delete e.nodeMap[t.nodeId],t.ref="_root",e.nodeMap._root=t,e.body=t}function w(e,t){e.parentNode=t,t.docId&&(e.docId=t.docId,e.ownerDocument=t.ownerDocument,e.ownerDocument.nodeMap[e.nodeId]=e,e.depth=t.depth+1),e.children.forEach(function(t){w(t,e)})}function O(e){for(;e;){if(1===e.nodeType)return e;e=e.nextSibling}}function E(e){for(;e;){if(1===e.nodeType)return e;e=e.previousSibling}}function S(e,t,n,r){n<0&&(n=0);var o=t[n-1],i=t[n];return t.splice(n,0,e),r&&(o&&(o.nextSibling=e),e.previousSibling=o,e.nextSibling=i,i&&(i.previousSibling=e)),n}function x(e,t,n,r){var o=t.indexOf(e);if(o<0)return-1;if(r){var i=t[o-1],a=t[o+1];i&&(i.nextSibling=a),a&&(a.previousSibling=i)}t.splice(o,1);var s=n;o<=n&&(s=n-1);var u=t[s-1],c=t[s];return t.splice(s,0,e),r&&(u&&(u.nextSibling=e),e.previousSibling=u,e.nextSibling=c,c&&(c.previousSibling=e)),o===s?-1:n}function k(e,t,n){var r=t.indexOf(e);if(!(r<0)){if(n){var o=t[r-1],i=t[r+1];o&&(o.nextSibling=i),i&&(i.previousSibling=o)}t.splice(r,1)}}function C(){this.nodeId=y(),this.ref=this.nodeId,this.children=[],this.pureChildren=[],this.parentNode=null,this.nextSibling=null,this.previousSibling=null}function j(e,t){if(t&&t.length){var n=function(t){Ts.call(this,e,t,!0)};n.prototype=Object.create(Ts.prototype),Object.defineProperty(n.prototype,"constructor",{configurable:!1,enumerable:!1,writable:!1,value:Ts}),t.forEach(function(t){n.prototype[t]=function(){for(var n=[],r=arguments.length;r--;)n[r]=arguments[r];var o=m(this.docId);if(o)return o.send("component",{ref:this.ref,component:e,method:t},n)}}),Ns[e]=n}}function A(e,t,n){void 0===e&&(e=Ps);var r=Ns[e];if(r&&!n)return new r(t);t=t||{},this.nodeType=1,this.nodeId=y(),this.ref=this.nodeId,this.type=e,this.attr=t.attr||{},this.style=t.style||{},this.classStyle=t.classStyle||{},this.event={},this.children=[],this.pureChildren=[]}function I(e,t){h(e).nodeMap[t.nodeId]=t}function T(){var e={createFinish:global.callCreateFinish,updateFinish:global.callUpdateFinish,refreshFinish:global.callRefreshFinish,createBody:global.callCreateBody,addElement:global.callAddElement,removeElement:global.callRemoveElement,moveElement:global.callMoveElement,updateAttrs:global.callUpdateAttrs,updateStyle:global.callUpdateStyle,addEvent:global.callAddEvent,removeEvent:global.callRemoveEvent},t=Rs.prototype;for(var n in e)!function(n){var r=e[n];t[n]=r?function(e,t){return r.apply(void 0,[e].concat(t))}:function(e,t){return $s(e,[{module:"dom",method:n,args:t}],"-1")}}(n);t.componentHandler=global.callNativeComponent||function(e,t,n,r,o){return $s(e,[{component:o.component,ref:t,method:n,args:r}])},t.moduleHandler=global.callNativeModule||function(e,t,n,r){return $s(e,[{module:t,method:n,args:r}])}}function N(e,t){M(e)?console.warn('Service "'+e+'" has been registered already!'):(t=Object.assign({},t),Ls.push({name:e,options:t}))}function P(e){Ls.some(function(t,n){if(t.name===e)return Ls.splice(n,1),!0})}function M(e){return $(e)>=0}function $(e){return Ls.map(function(e){return e.name}).indexOf(e)}function R(e){var t,n=Us.exec(e);if(n)try{t=JSON.parse(n[1])}catch(e){}return t}function D(e,t,n){var r=Object.create(null);return r.service=Object.create(null),Ls.forEach(function(o){var i=(o.name,o.options),a=i.create;if(a){var s=a(e,t,n);Object.assign(r.service,s),Object.assign(r,s.instance)}}),delete r.service.instance,Object.freeze(r.service),r}function F(e,t,n,r){var o=Bs[e];if(!o){o=R(t)||{},Ds[o.framework]||(o.framework="Weex"),n=JSON.parse(JSON.stringify(n||{})),n.bundleVersion=o.version,n.env=JSON.parse(JSON.stringify(global.WXEnvironment||{})),console.debug("[JS Framework] create an "+o.framework+"@"+n.bundleVersion+" instance from "+n.bundleVersion);var i={info:o,config:n,created:Date.now(),framework:o.framework};return i.services=D(e,i,Fs),Bs[e]=i,Ds[o.framework].createInstance(e,t,n,r,i)}return new Error('invalid instance id "'+e+'"')}function L(e){Vs[e]=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];"registerComponents"===e&&U(t[0]);for(var r in Ds){var o=Ds[r];o&&o[e]&&o[e].apply(o,t)}}}function U(e){Array.isArray(e)&&e.forEach(function(e){e&&e.type&&e.methods&&j(e.type,e.methods)})}function B(e){Vs[e]=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];var r=t[0],o=Bs[r];if(o&&Ds[o.framework]){var i=(a=Ds[o.framework])[e].apply(a,t);return"refreshInstance"===e?Ls.forEach(function(e){var t=e.options.refresh;t&&t(r,{info:o,runtime:Fs})}):"destroyInstance"===e&&(Ls.forEach(function(e){var t=e.options.destroy;t&&t(r,{info:o,runtime:Fs})}),delete Bs[r]),i}return new Error('invalid instance id "'+r+'"');var a}}function V(e,t){Vs[t]=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];var r=t[0],o=Bs[r];return o&&Ds[o.framework]?(i=Ds[o.framework])[e].apply(i,t):new Error('invalid instance id "'+r+'"');var i}}function q(e){Fs=e||{},Ds=Fs.frameworks||{},T();for(var t in Ds){Ds[t].init(e)}return["registerComponents","registerModules","registerMethods"].forEach(L),["destroyInstance","refreshInstance","receiveTasks","getRoot"].forEach(B),V("receiveTasks","callJS"),Vs}function z(e){this.nodeType=8,this.nodeId=y(),this.ref=this.nodeId,this.type="comment",this.value=e,this.children=[],this.pureChildren=[]}function W(e,t){this.id=e,this.batched=!1,this.updates=[],"function"==typeof t?Object.defineProperty(this,"handler",{configurable:!0,enumerable:!0,writable:!0,value:t}):console.error("[JS Runtime] invalid parameter, handler must be a function")}function J(e,t){return void 0===t&&(t=[]),{module:"dom",method:e,args:t}}function H(e,t){var n=t||global.callNative;return"function"!=typeof n&&console.error("[JS Runtime] no default handler"),function(t){Array.isArray(t)||(t=[t]);for(var r=0;r0;)t[r]=arguments[r+1];return n.apply(void 0,t)}:K.handler),this.createDocumentElement()}function Z(e,t){var n=t.attrs||{};for(var r in n)e.setAttr(r,n[r],!0);var o=t.style||{};for(var i in o)e.setStyle(i,o[i],!0)}function Q(){c(),Object.freeze(zs.Element),Object.freeze(zs.Comment),Object.freeze(zs.Listener),Object.freeze(zs.Document.prototype),Object.freeze(zs.Element.prototype),Object.freeze(zs.Comment.prototype),Object.freeze(zs.Listener.prototype)}function Y(e){Hs.Document=e.Document,Hs.Element=e.Element,Hs.Comment=e.Comment,Hs.sendTasks=e.sendTasks}function ee(e){}function te(e){}function ne(e){}function re(e,t,n){}function oe(e,t,n,r,o){var i=new Hs.Document(e,n.bundleUrl),a={},s=0;i.addCallback=function(e){return s++,a[s]=e,s},i.handleCallback=function(e,t,n){var r=a[e];return n&&delete a[e],r(t)},Gs[e]=i;var u=Object.assign({Document:Hs.Document,Element:Hs.Element,Comment:Hs.Comment,sendTasks:Hs.sendTasks,id:e,options:n,data:r,document:i},o),c=[],l=[];for(var f in u)c.push(f),l.push(u[f]);return c.push(t),(new(Function.prototype.bind.apply(Function,[null].concat(c)))).apply(void 0,l)}function ie(e,t){}function ae(e){delete Gs[e]}function se(e){return Gs[e].body.toJSON()}function ue(e,t){var n={fireEvent:function(e,t,n,r,o){var i=Gs[e],a=i.getRef(t);return i.fireEvent(a,n,r,o)},callback:function(e,t,n,r){return Gs[e].handleCallback(t,n,r)}};if(Gs[e]&&Array.isArray(t)){var r=[];return t.forEach(function(t){var o=n[t.method],i=[].concat(t.args);"function"==typeof o&&(i.unshift(e),r.push(o.apply(void 0,i)))}),r}}function ce(e){console.warn("[JS Framework] Vm#$ is deprecated, please use Vm#$vm instead");var t=this._ids[e];if(t)return t.vm}function le(e){var t=this._ids[e];if(t)return t.el}function fe(e){var t=this._ids[e];if(t)return t.vm}function de(e){return this._app.differ.then(function(){e()})}function pe(e,t){console.warn("[JS Framework] Vm#$scrollTo is deprecated, please use \"require('@weex-module/dom').scrollTo(el, options)\" instead");var n=this.$el(e);if(n){this._app.requireModule("dom").scrollToElement(n.ref,{offset:t})}}function he(e,t,n){var r=this,o=this.$el(e);if(o&&t&&t.styles){this._app.requireModule("animation").transition(o.ref,t,function(){for(var e=[],i=arguments.length;i--;)e[i]=arguments[i];r._setStyle(o,t.styles),n&&n.apply(void 0,e)})}}function ve(e){var t=this._app.options;return"function"==typeof e&&(console.warn("[JS Framework] the callback of Vm#$getConfig(callback) is deprecated, this api now can directly RETURN config info."),e(t)),t}function me(e,t){console.warn("[JS Framework] Vm#$sendHttp is deprecated, please use \"require('@weex-module/stream').sendHttp(params, callback)\" instead"),this._app.requireModule("stream").sendHttp(e,t)}function ye(e){console.warn("[JS Framework] Vm#$openURL is deprecated, please use \"require('@weex-module/event').openURL(url)\" instead"),this._app.requireModule("event").openURL(e)}function _e(e){console.warn("[JS Framework] Vm#$setTitle is deprecated, please use \"require('@weex-module/pageInfo').setTitle(title)\" instead"),this._app.requireModule("pageInfo").setTitle(e)}function ge(e,t){for(var n=[],r=arguments.length-2;r-- >0;)n[r]=arguments[r+2];console.warn("[JS Framework] Vm#$call is deprecated, please use \"require('@weex-module/moduleName')\" instead");var o=this._app.requireModule(e);o&&o[t]&&o[t].apply(o,n)}function be(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];if("function"==typeof Object.assign)Object.assign.apply(Object,[e].concat(t));else{var r=t.shift();for(var o in r)e[o]=r[o];t.length&&be.apply(void 0,[e].concat(t))}return e}function we(e,t,n,r){Object.defineProperty(e,t,{value:n,enumerable:!!r,writable:!0,configurable:!0})}function Oe(e,t){if(e.length){var n=e.indexOf(t);if(n>-1)return e.splice(n,1)}}function Ee(e,t){return wu.call(e,t)}function Se(e,t){return function(n){var r=arguments.length;return r?r>1?e.apply(t,arguments):e.call(t,n):e.call(t)}}function xe(e){return null!==e&&"object"==typeof e}function ke(e){return Ou.call(e)===Eu}function Ce(e){var t=(e+"").charCodeAt(0);return 36===t||95===t}function je(){return"object"==typeof nativeSet?nativeSet.create():new Ws}function Ae(e){var t=Object.prototype.toString.call(e);return t.substring(8,t.length-1).toLowerCase()}function Ie(e){return e.replace(xu,"").replace(ku,"")}function Te(e){return e.replace(ju,"")}function Ne(){this.id=Pu++,this.subs=[]}function Pe(e){Ne.target&&Mu.push(Ne.target),Ne.target=e}function Me(){Ne.target=Mu.pop()}function $e(){Ne.target=null,Mu=[]}function Re(e,t,n,r){r&&be(this,r);var o="function"==typeof t;this.vm=e,e._watchers.push(this),this.expression=t,this.cb=n,this.id=++$u,this.active=!0,this.dirty=this.lazy,this.deps=[],this.newDeps=[],this.depIds=je(),this.newDepIds=je(),o&&(this.getter=t),this.value=this.lazy?void 0:this.get(),this.queued=this.shallow=!1}function De(e,t){var n,r,o,i;if(t||(t=Ru,t.clear()),o=Array.isArray(e),i=xe(e),o||i){if(e.__ob__){var a=e.__ob__.dep.id;if(t.has(a))return;t.add(a)}if(o)for(n=e.length;n--;)De(e[n],t);else if(i)for(r=Object.keys(e),n=r.length;n--;)De(e[r[n]],t)}}function Fe(e){if(this.value=e,this.dep=new Ne,we(e,"__ob__",this),Array.isArray(e)){(Su?Le:Ue)(e,Fu,Lu),this.observeArray(e)}else this.walk(e)}function Le(e,t){e.__proto__=t}function Ue(e,t,n){for(var r=0,o=n.length;r-1||!Ce(t))&&Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get:function(){return e._data[t]},set:function(n){e._data[t]=n}})}function Je(e,t){Ce(t)||delete e[t]}function He(e){e._watchers=[],Ge(e),Ke(e),Qe(e)}function Ge(e){var t=e._data;ke(t)||(t={});for(var n=Object.keys(t),r=n.length;r--;)We(e,n[r]);Be(t,e)}function Xe(){}function Ke(e){var t=e._computed;if(t)for(var n in t){var r=t[n],o={enumerable:!0,configurable:!0};"function"==typeof r?(o.get=Ze(r,e),o.set=Xe):(o.get=r.get?!1!==r.cache?Ze(r.get,e):Se(r.get,e):Xe,o.set=r.set?Se(r.set,e):Xe),Object.defineProperty(e,n,o)}}function Ze(e,t){var n=new Re(t,e,null,{lazy:!0});return function(){return n.dirty&&n.evaluate(),Ne.target&&n.depend(),n.value}}function Qe(e){var t=e._methods;if(t)for(var n in t)e[n]=t[n]}function Ye(e){var t=e.type,n=Vu[t];if("object"==typeof n)for(var r in n)if(null==e[r])e[r]=n[r];else if("object"===Ae(e[r])&&"object"===Ae(n[r]))for(var o in n[r])null==e[r][o]&&(e[r][o]=n[r][o])}function et(e,t,n){at(e,t,n.id,e),st(e,t,n.attr),ct(e,t,n.classList),lt(e,t,n.style),dt(e,t,n.events)}function tt(e,t,n,r){t=t||{},n=n||{};var o=t._options||{},i=o.props;Array.isArray(i)&&(i=i.reduce(function(e,t){return e[t]=!0,e},{})),rt(r,i,e,t),rt(n.attr,i,e,t)}function nt(e,t,n,r){void 0===r&&(r={}),it(n.classList,e,t),ot(n.style,e,t),r.children?r.children[r.children.length-1]._vm=t:r._vm=t}function rt(e,t,n,r){if(e){for(var o in e)!function(o){if(!t||t[o]){var i=e[o];if("function"==typeof i){var a=vt(n,i,function(e){r[o]=e});r[o]=a}else r[o]=i}}(o)}}function ot(e,t,n){for(var r in e)!function(r){var o=e[r];if("function"==typeof o){var i=vt(t,o,function(e){n._rootEl&&n._rootEl.setStyle(r,e)});n._rootEl.setStyle(r,i)}else n._rootEl&&n._rootEl.setStyle(r,o)}(r)}function it(e,t,n){function r(e,t){"array"===Ae(e)&&e.unshift(t)}var o=t._options&&t._options.style||{};if(n._rootEl){var i="@originalRootEl";if(o[i]=n._rootEl.classStyle,"function"==typeof e){var a=vt(t,e,function(e){r(e,i),ut(n._rootEl,o,e)});r(a,i),ut(n._rootEl,o,a)}else null!=e&&(r(e,i),ut(n._rootEl,o,e))}}function at(e,t,n,r){var o=Object.create(null);if(Object.defineProperties(o,{vm:{value:r,writable:!1,configurable:!1},el:{get:function(){return t||r._rootEl},configurable:!1}}),"function"==typeof n){var i=n;n=i.call(e),(n||0===n)&&(e._ids[n]=o),vt(e,i,function(t){t&&(e._ids[t]=o)})}else n&&"string"==typeof n&&(e._ids[n]=o)}function st(e,t,n){pt(e,t,"attr",n)}function ut(e,t,n){for(var r={},o=n.length,i=0;i=0?r.code=1001:o.indexOf("appversion")>=0?r.code=1002:o.indexOf("weexversion")>=0?r.code=1003:o.indexOf("devicemodel")>=0&&(r.code=1004),r}function cn(e,t){t=t||global.WXEnvironment,t=ke(t)?t:{};var n={isDowngrade:!1};if("function"===Ae(e)){var r=e.call(this,t,{semver:Hu,normalizeVersion:sn});r=!!r,n=r?un("custom","","custom params"):n}else{e=ke(e)?e:{};var o=t.platform||"unknow",i=o.toLowerCase(),a=e[i]||{};for(var s in t){var u=s,c=u.toLowerCase(),l=t[s],f=c.indexOf("version")>=0,d=c.indexOf("devicemodel")>=0,p=a[s];if(p&&f){var h=sn(p),v=sn(t[s]);if(Hu.satisfies(v,h)){n=un(u,l,p);break}}else if(d){var m="array"===Ae(p)?p:[p];if(m.indexOf(l)>=0){n=un(u,l,p);break}}}}return n}function ln(e,t){if(void 0===t&&(t={}),e&&e.callTasks)return e.callTasks([{module:"meta",method:"setViewport",args:[t]}])}function fn(e,t,n,r){console.debug("[JS Framework] bootstrap for "+t);var o;if(Au(t))o=Ie(t);else{if(!Nu(t))return new Error("Wrong component name: "+t);if(o=Te(t),!on(e,o))return new Error("It's not a component: "+t)}if(n=ke(n)?n:{}, -"string"==typeof n.transformerVersion&&"string"==typeof global.transformerVersion&&!Hu.satisfies(n.transformerVersion,global.transformerVersion))return new Error("JS Bundle version: "+n.transformerVersion+" not compatible with "+global.transformerVersion);var i=cn(n.downgrade);if(i.isDowngrade)return e.callTasks([{module:"instanceWrap",method:"error",args:[i.errorType,i.code,i.errorMessage]}]),new Error("Downgrade["+i.code+"]: "+i.errorMessage);n.viewport&&ln(e,n.viewport),e.vm=new en(o,null,{_app:e},null,r)}function dn(e,t,n){console.warn("[JS Framework] Register is deprecated, please install lastest transformer."),an(e,t,n)}function pn(e,t){console.debug("[JS Framework] Refresh with",t,"in instance["+e.id+"]");var n=e.vm;return n&&t?("function"==typeof n.refreshData?n.refreshData(t):be(n,t),e.differ.flush(),void e.doc.taskCenter.send("dom",{action:"refreshFinish"},[])):new Error('invalid data "'+t+'"')}function hn(e){console.debug("[JS Framework] Destory an instance("+e.id+")"),e.vm&&vn(e.vm),e.id="",e.options=null,e.blocks=null,e.vm=null,e.doc.taskCenter.destroyCallback(),e.doc.destroy(),e.doc=null,e.customComponentMap=null,e.commonModules=null}function vn(e){if(delete e._app,delete e._computed,delete e._css,delete e._data,delete e._ids,delete e._methods,delete e._options,delete e._parent,delete e._parentEl,delete e._rootEl,e._watchers){for(var t=e._watchers.length;t--;)e._watchers[t].teardown();delete e._watchers}if(e._childrenVms){for(var n=e._childrenVms.length;n--;)vn(e._childrenVms[n]);delete e._childrenVms}console.debug('[JS Framework] "destroyed" lifecycle in Vm('+e._type+")"),e.$emit("hook:destroyed"),delete e._type,delete e._vmEvents}function mn(e){var t=e.doc||{},n=t.body||{};return n.toJSON?n.toJSON():{}}function yn(e,t,n,r,o){if(console.debug('[JS Framework] Fire a "'+n+'" event on an element('+t+") in instance("+e.id+")"),Array.isArray(t))return void t.some(function(t){return!1!==yn(e,t,n,r)});var i=e.doc.getRef(t);if(i){var a=e.doc.fireEvent(i,n,r,o);return e.differ.flush(),e.doc.taskCenter.send("dom",{action:"updateFinish"},[]),a}return new Error('invalid element reference "'+t+'"')}function _n(e,t,n,r){console.debug("[JS Framework] Invoke a callback("+t+") with",n,"in instance("+e.id+")");var o=e.doc.taskCenter.callback(t,n,r);return gn(e),e.doc.taskCenter.send("dom",{action:"updateFinish"},[]),o}function gn(e){e.differ.flush()}function bn(e,t){var n;return"array"!==Ae(t)&&(t=[t]),t.forEach(function(t){n=e.doc.taskCenter.send("module",{module:t.module,method:t.method},t.args)}),n}function wn(e,t,n,r){console.debug("[JS Framework] Intialize an instance with:\n",n);var o,i=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];return Gu.apply(void 0,[e].concat(t))},a=function(t,r,i){o=fn(e,t,r,i||n),gn(e),e.doc.listener.createFinish(),console.debug("[JS Framework] After intialized an instance("+e.id+")")},s=en,u=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];return dn.apply(void 0,[e].concat(t))},c=function(t,n){o=fn(e,t,{},n)},l=function(t){return function(n){o=fn(e,t,{},n)}},f=e.doc,d=function(t){return e.requireModule(Ie(t))},p={config:e.options,define:i,bootstrap:a,requireModule:d,document:f,Vm:s};Object.freeze(p);var h;"function"==typeof t?h=t.toString().substr(12):t&&(h=t.toString()),h='(function(global){\n\n"use strict";\n\n '+h+" \n\n})(Object.create(this))";var v=global.WXEnvironment,m={};if(v&&"Web"!==v.platform){var y=e.requireModule("timer");Object.assign(m,{setTimeout:function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];var r=function(){t[0].apply(t,t.slice(2))};return y.setTimeout(r,t[1]),e.doc.taskCenter.callbackManager.lastCallbackId.toString()},setInterval:function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];var r=function(){t[0].apply(t,t.slice(2))};return y.setInterval(r,t[1]),e.doc.taskCenter.callbackManager.lastCallbackId.toString()},clearTimeout:function(e){y.clearTimeout(e)},clearInterval:function(e){y.clearInterval(e)}})}var _=Object.assign({define:i,require:l,bootstrap:a,register:u,render:c,__weex_define__:i,__weex_bootstrap__:a,__weex_document__:f,__weex_require__:d,__weex_viewmodel__:s,weex:p},m,r);return En(_,h)||On(_,h),o}function On(e,t){var n=[],r=[];for(var o in e)n.push(o),r.push(e[o]);return n.push(t),(new(Function.prototype.bind.apply(Function,[null].concat(n)))).apply(void 0,r)}function En(e,t){if("function"!=typeof compileAndRunBundle)return!1;var n=void 0,r=!1,o="(function (",i=[],a=[];for(var s in e)i.push(s),a.push(e[s]);for(var u=0;u0){n%18||"function"!=typeof notifyTrimMemory||notifyTrimMemory()}return Ku}function Tn(e){Array.isArray(e)&&e.forEach(function(e){e&&("string"==typeof e?Zu[e]=!0:"object"==typeof e&&"string"==typeof e.type&&(Zu[e.type]=e))})}function Nn(e){"object"==typeof e&&tn(e)}function Pn(e){"object"==typeof e&&nn(en,e)}function Mn(e,t){if(Ku[e]&&Array.isArray(t)){var n=[];return t.forEach(function(t){var r=Qu[t.method],o=[].concat(t.args);"function"==typeof r&&(o.unshift(e),n.push(r.apply(void 0,o)))}),n}return new Error('invalid instance id "'+e+'" or tasks')}function $n(e){var t=Ku[e];return t?mn(t):new Error('invalid instance id "'+e+'"')}function Rn(e,t){void 0===t&&(t={}),this.type=e||"message",this.data=t.data||null,this.origin=t.origin||"",this.source=t.source||null,this.ports=t.ports||[],this.target=null,this.timeStamp=Date.now()}function Dn(){}function Fn(e,t,n,r){console.warn("[Upgrade Warning] $userTrack will be removed in the next version!"),console.warn("[JS Framework] Vm#$userTrack is deprecated, please use \"require('@weex-module/userTrack').commit(type, name, comName, param)\" instead"),this._app.requireModule("userTrack").commit(e,t,n,r)}function Ln(e,t){if(console.warn("[Upgrade Warning] $sendMtop will be removed in the next version!"),console.warn("[JS Framework] Vm#$sendMtop is deprecated, please use \"require('@weex-module/stream').sendMtop(params, callback)\" instead"),"undefined"==typeof window){this._app.requireModule("windvane").call({class:"MtopWVPlugin",method:"send",data:e},t)}else{this._app.requireModule("stream").sendMtop(e,t)}}function Un(e,t){console.warn("[Upgrade Warning] $callWindvane will be removed in the next version!"),console.warn("[JS Framework] Vm#$callWindvane is deprecated, please use \"require('@weex-module/windvane').call(params, callback)\" instead"),this._app.requireModule("windvane").call(e,t)}function Bn(e,t){console.warn("[Upgrade Warning] $setSpm will be removed in the next version!"),console.warn("[JS Framework] Vm#$setSpm is deprecated, please use \"require('@weex-module/pageInfo').setSpm(a, b)\" instead"),this._app.requireModule("pageInfo").setSpm(e,t)}function Vn(e){console.warn("[Upgrade Warning] $getUserInfo will be removed in the next version!"),console.warn("[JS Framework] Vm#$getUserInfo is deprecated, please use \"require('@weex-module/user').getUserInfo(callback)\" instead"),this._app.requireModule("user").getUserInfo(e)}function qn(e){console.warn("[Upgrade Warning] $login will be removed in the next version!"),console.warn("[JS Framework] Vm#$login is deprecated, please use \"require('@weex-module/user').login(callback)\" instead"),this._app.requireModule("user").login(e)}function zn(e){console.warn("[Upgrade Warning] $logout will be removed in the next version!"),console.warn("[JS Framework] Vm#$logout is deprecated, please use \"require('@weex-module/user').logout(callback)\" instead"),this._app.requireModule("user").logout(e)}var Wn={browser:"0.5.0",framework:"0.20.9","vue-render":"0.11.10",transformer:">=0.1.5 <0.5"};Array.from||(Array.from=function(){var e=Object.prototype.toString,t=function(t){return"function"==typeof t||"[object Function]"===e.call(t)},n=function(e){var t=Number(e);return isNaN(t)?0:0!==t&&isFinite(t)?(t>0?1:-1)*Math.floor(Math.abs(t)):t},r=Math.pow(2,53)-1,o=function(e){var t=n(e);return Math.min(Math.max(t,0),r)};return function(e){var n=this,r=Object(e);if(null==e)throw new TypeError("Array.from requires an array-like object - not null or undefined");var i,a=arguments.length>1?arguments[1]:void 0;if(void 0!==a){if(!t(a))throw new TypeError("Array.from: when provided, the second argument must be a function");arguments.length>2&&(i=arguments[2])}for(var s,u=o(r.length),c=t(n)?Object(new n(u)):new Array(u),l=0;l0?Vr:Br)(e)},zr=qr,Wr=Math.min,Jr=function(e){return e>0?Wr(zr(e),9007199254740991):0},Hr=qr,Gr=Math.max,Xr=Math.min,Kr=function(e,t){return e=Hr(e),e<0?Gr(e+t,0):Xr(e,t)},Zr=Ur,Qr=Jr,Yr=Kr,eo=Hn,to=eo["__core-js_shared__"]||(eo["__core-js_shared__"]={}),no=function(e){return to[e]||(to[e]={})},ro=no("keys"),oo=wr,io=function(e){return ro[e]||(ro[e]=oo(e))},ao=_r,so=Ur,uo=function(e){return function(t,n,r){var o,i=Zr(t),a=Qr(i.length),s=Yr(r,a);if(e&&n!=n){for(;a>s;)if((o=i[s++])!=o)return!0}else for(;a>s;s++)if((e||s in i)&&i[s]===n)return e||s||0;return!e&&-1}}(!1),co=io("IE_PROTO"),lo=function(e,t){var n,r=so(e),o=0,i=[];for(n in r)n!=co&&ao(r,n)&&i.push(n);for(;t.length>o;)ao(r,n=t[o++])&&(~uo(i,n)||i.push(n));return i},fo="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),po=lo,ho=fo,vo=Object.keys||function(e){return po(e,ho)},mo=Object.getOwnPropertySymbols,yo={f:mo},_o={}.propertyIsEnumerable,go={f:_o},bo=Dr,wo=function(e){return Object(bo(e))},Oo=vo,Eo=yo,So=go,xo=wo,ko=Rr,Co=Object.assign,jo=!Co||Qn(function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach(function(e){t[e]=e}),7!=Co({},e)[n]||Object.keys(Co({},t)).join("")!=r})?function(e,t){for(var n=arguments,r=xo(e),o=arguments.length,i=1,a=Eo.f,s=So.f;o>i;)for(var u,c=ko(n[i++]),l=a?Oo(c).concat(a(c)):Oo(c),f=l.length,d=0;f>d;)s.call(c,u=l[d++])&&(r[u]=c[u]);return r}:Co,Ao=Nr;Ao(Ao.S+Ao.F,"Object",{assign:jo}),Object.setPrototypeOf||(Object.setPrototypeOf=function(e,t){function n(e,t){return r.call(e,t),e}var r;try{r=e.getOwnPropertyDescriptor(e.prototype,"__proto__").set,r.call({},null)}catch(t){if(e.prototype!=={}.__proto__||void 0==={__proto__:null}.__proto__)return;r=function(e){this.__proto__=e},n.polyfill=n(n({},null),e.prototype)instanceof e}return n}(Object));var Io=Jn,To=Io.WXEnvironment;To&&"iOS"===To.platform&&(Jn.Promise=void 0);var No=t(function(e){var t=no("wks"),n=wr,r=Hn.Symbol,o="function"==typeof r;(e.exports=function(e){return t[e]||(t[e]=o&&r[e]||(o?r:n)("Symbol."+e))}).store=t}),Po=Mr,Mo=No("toStringTag"),$o="Arguments"==Po(function(){return arguments}()),Ro=function(e,t){try{return e[t]}catch(e){}},Do=function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=Ro(t=Object(e),Mo))?n:$o?Po(t):"Object"==(r=Po(t))&&"function"==typeof t.callee?"Arguments":r},Fo=Do,Lo={};Lo[No("toStringTag")]="z",Lo+""!="[object z]"&&Or(Object.prototype,"toString",function(){return"[object "+Fo(this)+"]"},!0);var Uo=qr,Bo=Dr,Vo={},qo=dr,zo=Zn,Wo=vo,Jo=Yn?Object.defineProperties:function(e,t){zo(e);for(var n,r=Wo(t),o=r.length,i=0;o>i;)qo.f(e,n=r[i++],t[n]);return e},Ho=Hn.document&&document.documentElement,Go=Zn,Xo=Jo,Ko=fo,Zo=io("IE_PROTO"),Qo=function(){},Yo=function(){var e,t=rr("iframe"),n=Ko.length;for(t.style.display="none",Ho.appendChild(t),t.src="javascript:",e=t.contentWindow.document,e.open(),e.write("