UNPKG

weex-flymeui

Version:

A Flyme Style UI library based on Weex for Creator.

1 lines 143 kB
console.log("START WEEX VUE RENDER: 0.12.21, Build 2017-10-12 15:49."),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.WeexVueRender=t()}(this,function(){"use strict";function e(e,t){if("undefined"==typeof document)return t;e=e||"";var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");return r.type="text/css",r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e)),n.appendChild(r),t}function t(e,t){for(var n=e;n;){if(n.contains(t)||n==t)return n;n=n.parentNode}return null}function n(e,t,n){var r=kt.createEvent("HTMLEvents");if(r.initEvent(t,!0,!0),"object"==typeof n)for(var i in n)r[i]=n[i];r._for="weex",e.dispatchEvent(r)}function r(e,t,n,r,i,o,a,s){var l=Math.atan2(s-o,a-i)-Math.atan2(r-t,n-e),c=Math.sqrt((Math.pow(s-o,2)+Math.pow(a-i,2))/(Math.pow(r-t,2)+Math.pow(n-e,2))),u=[i-c*e*Math.cos(l)+c*t*Math.sin(l),o-c*t*Math.cos(l)-c*e*Math.sin(l)];return{rotate:l,scale:c,translate:u,matrix:[[c*Math.cos(l),-c*Math.sin(l),u[0]],[c*Math.sin(l),c*Math.cos(l),u[1]],[0,0,1]]}}function i(e){for(v=0;v<e.changedTouches.length;v++){w=e.changedTouches[v];if(!(b=Et[w.identifier]))return;b.lastTouch||(b.lastTouch=b.startTouch),b.lastTime||(b.lastTime=b.startTime),b.velocityX||(b.velocityX=0),b.velocityY||(b.velocityY=0),b.duration||(b.duration=0);var i=Date.now()-b.lastTime,o=(w.clientX-b.lastTouch.clientX)/i,a=(w.clientY-b.lastTouch.clientY)/i;i>70&&(i=70),b.duration+i>70&&(b.duration=70-i),b.velocityX=(b.velocityX*b.duration+o*i)/(b.duration+i),b.velocityY=(b.velocityY*b.duration+a*i)/(b.duration+i),b.duration+=i,b.lastTouch={};for(var s in w)b.lastTouch[s]=w[s];b.lastTime=Date.now();var l=w.clientX-b.startTouch.clientX,c=w.clientY-b.startTouch.clientY,u=Math.sqrt(Math.pow(l,2)+Math.pow(c,2)),d=!(Math.abs(l)>Math.abs(c)),h=d?c>=0?"down":"up":l>=0?"right":"left";("tapping"===b.status||"pressing"===b.status)&&u>10&&(b.status="panning",b.isVertical=d,b.direction=h,n(b.element,"panstart",{touch:w,touches:e.touches,changedTouches:e.changedTouches,touchEvent:e,isVertical:b.isVertical,direction:h})),"panning"===b.status&&(b.panTime=Date.now(),n(b.element,"panmove",{displacementX:l,displacementY:c,touch:w,touches:e.touches,changedTouches:e.changedTouches,touchEvent:e,isVertical:b.isVertical,direction:h}))}if(2==Object.keys(Et).length){for(var f,p=[],m=[],g=[],v=0;v<e.touches.length;v++){var w=e.touches[v],b=Et[w.identifier];p.push([b.startTouch.clientX,b.startTouch.clientY]),m.push([w.clientX,w.clientY])}for(var s in Et)g.push(Et[s].element);f=r(p[0][0],p[0][1],p[1][0],p[1][1],m[0][0],m[0][1],m[1][0],m[1][1]),n(t(g[0],g[1]),"dualtouch",{transform:f,touches:e.touches,touchEvent:e})}}function o(e){if(2==Object.keys(Et).length){var r=[];for(var s in Et)r.push(Et[s].element);n(t(r[0],r[1]),"dualtouchend",{touches:Tt.call(e.touches),touchEvent:e})}for(var l=0;l<e.changedTouches.length;l++){var c=e.changedTouches[l],u=c.identifier,d=Et[u];if(d){if(d.pressingHandler&&(clearTimeout(d.pressingHandler),d.pressingHandler=null),"tapping"===d.status&&(d.timestamp=Date.now(),n(d.element,"tap",{touch:c,touchEvent:e}),Ot&&d.timestamp-Ot.timestamp<300&&n(d.element,"doubletap",{touch:c,touchEvent:e}),Ot=d),"panning"===d.status){var h=Date.now(),f=h-d.startTime,p=c.clientX-d.startTouch.clientX,m=c.clientY-d.startTouch.clientY,g=Math.sqrt(d.velocityY*d.velocityY+d.velocityX*d.velocityX)>.5&&h-d.lastTime<100,v={duration:f,isSwipe:g,velocityX:d.velocityX,velocityY:d.velocityY,displacementX:p,displacementY:m,touch:c,touches:e.touches,changedTouches:e.changedTouches,touchEvent:e,isVertical:d.isVertical,direction:d.direction};n(d.element,"panend",v),g&&n(d.element,"swipe",v)}"pressing"===d.status&&n(d.element,"pressend",{touch:c,touchEvent:e}),delete Et[u]}}0===Object.keys(Et).length&&(Ct.removeEventListener("touchmove",i,!1),Ct.removeEventListener("touchend",o,!1),Ct.removeEventListener("touchcancel",a,!1))}function a(e){if(2==Object.keys(Et).length){var r=[];for(var s in Et)r.push(Et[s].element);n(t(r[0],r[1]),"dualtouchend",{touches:Tt.call(e.touches),touchEvent:e})}for(var l=0;l<e.changedTouches.length;l++){var c=e.changedTouches[l],u=c.identifier,d=Et[u];d&&(d.pressingHandler&&(clearTimeout(d.pressingHandler),d.pressingHandler=null),"panning"===d.status&&n(d.element,"panend",{touch:c,touches:e.touches,changedTouches:e.changedTouches,touchEvent:e}),"pressing"===d.status&&n(d.element,"pressend",{touch:c,touchEvent:e}),delete Et[u])}0===Object.keys(Et).length&&(Ct.removeEventListener("touchmove",i,!1),Ct.removeEventListener("touchend",o,!1),Ct.removeEventListener("touchcancel",a,!1))}function s(e){return e&&e.__esModule?e.default:e}function l(e,t){return t={exports:{}},e(t,t.exports),t.exports}function c(e){Object.defineProperty(this,"val",{value:e.toString(),enumerable:!0}),this.gt=function(e){return c.compare(this,e)>0},this.gte=function(e){return c.compare(this,e)>=0},this.lt=function(e){return c.compare(this,e)<0},this.lte=function(e){return c.compare(this,e)<=0},this.eq=function(e){return 0===c.compare(this,e)}}function u(e){return ta.call(e)===ra}function d(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];return!t||t.length<=0?e:(t.forEach(function(t){if("object"==typeof t)for(var n in t)e[n]=t[n]}),e)}function h(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];return!t||t.length<=0?e:(t.forEach(function(t){if("object"==typeof t){var n;for(var r in t)!(n=t[r])&&""!==n&&0!==n||"undefined"===n||(e[r]=n)}}),e)}function f(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 p(e,t,n){var r=0,i=null,o=t+(t>25?t:25);return function(){for(var a=[],s=arguments.length;s--;)a[s]=arguments[s];var l=this,c=(new Date).getTime();c-r>t&&(n&&(i&&clearTimeout(i),i=setTimeout(function(){i=null,e.apply(l,a)},o)),e.apply(l,a),r=c)}}function m(e){var t=Object.create(null);return function(n){return t[n]||(t[n]=e(n))}}function g(e){var t={};for(var n in e)t[oa(n)]=e[n];return t}function v(e){var t={};for(var n in e)t[la(n).replace(ca,function(e){return"-"+e})]=e[n];return t}function w(e,t,n){var r=document.getElementById(t);r&&n&&(r.parentNode.removeChild(r),r=null),r||((r=document.createElement("style")).type="text/css",t&&(r.id=t),document.getElementsByTagName("head")[0].appendChild(r)),r.appendChild(document.createTextNode(e))}function b(e){var t=window.document,n=e/10;t.documentElement&&(t.documentElement.style.fontSize||(t.documentElement.style.fontSize=n+"px",wa.rem=n))}function x(e){if(fa){if(parseInt(fa.getAttribute("content"))===e)return}else(fa=document.createElement("meta")).setAttribute("name","weex-viewport");fa.setAttribute("content",e+"")}function y(){return wa}function _(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];return!t||t.length<=0?e:(t.forEach(function(t){if("object"==typeof t)for(var n in t)e[n]=t[n]}),e)}function S(){return ba}function k(e,t,n){var r=new Event(t,{bubbles:!1});if(_(r,n),-1!==window.navigator.userAgent.toLowerCase().indexOf("phantomjs"))return r;try{Object.defineProperty(r,"target",{enumerable:!0,value:e})}catch(t){return _({},r,{target:e})}return r}function C(e,t){e.dispatchEvent(t)}function T(e){function t(n){if(n)return ya.scrollableTypes.indexOf(n.weexType)>-1?(e._parentScroller=n,n):t(n.$parent)}return e?e._parentScroller?e._parentScroller:t(e.$parent):null}function E(e,t){return e.left<t.right&&e.right>t.left}function O(e,t){return e.top<t.bottom&&e.bottom>t.top}function I(e,t,n,r){var i="left"===(n=n||"up")||"right"===n,o="up"===n||"down"===n;if(i&&!O(e,t))return[!1,!1];if(o&&!E(e,t))return[!1,!1];switch(r=parseInt(r||0)*weex.config.env.scale,n){case"up":return[e.top<t.bottom&&e.bottom>t.top,e.top<t.bottom+r&&e.bottom>t.top-r];case"down":return[e.bottom>t.top&&e.top<t.bottom,e.bottom>t.top-r&&e.top<t.bottom+r];case"left":return[e.left<t.right&&e.right>t.left,e.left<t.right+r&&e.right>t.left-r];case"right":return[e.right>t.left&&e.left<t.right,e.right>t.left-r&&e.left<t.right+r]}}function A(e,t,n,r){if(!e.getBoundingClientRect)return!1;var i={top:0,left:0,bottom:window.innerHeight,right:window.innerWidth},o=t===window||t===document.body?i:t?t.getBoundingClientRect():i;return I(e.getBoundingClientRect(),o,n,r)}function N(e,t,n,r){var i=t[n];i&&i.fn&&(i=i.fn),i&&i(k(e,n,{direction:r}))}function j(e){for(var t=e.$vnode,n={},r=[];t;)r.push(t),t=t.parent;return r.forEach(function(e){var t=e.componentOptions&&e.componentOptions.listeners,r=e.data&&e.data.on;d(n,t,r)}),n}function z(e){return e&&e.getAttribute("appear-offset")}function $(e){return[!(!e.appear&&!e.disappear),!(!e.offsetAppear&&!e.offsetDisappear)]}function P(e,t){var n=e&&e.$el;if(n&&1===n.nodeType){var r=z(n),i=$(j(e));if(i[0]||i[1]){var o=!1,a=window,s=T(e);if(s&&s.$el?a=s.$el:o=!0,t&&L(e,A(n,a,null,r),null),a._watchAppearList||(a._watchAppearList=[]),a._watchAppearList.push(e),!a._scrollWatched){a._scrollWatched=!0;var l=p(function(e){var t=o?window.pageYOffset:a.scrollTop,n=a._lastScrollTop;a._lastScrollTop=t;var r=(t<n?"down":t>n?"up":a._prevDirection)||null;a._prevDirection=r;for(var i=a._watchAppearList||[],s=i.length,l=0;l<s;l++){var c=i[l],u=c.$el,d=z(u);L(c,A(u,a,r,d),r)}},25,!0);a.addEventListener("scroll",l,!1)}}}}function M(e){return L(e,[!1,!1])}function L(e,t,n,r){void 0===n&&(n=null);var i=e&&e.$el,o=t[0],a=t[1];if(i){var s=j(e);(e._appearedOnce||o)&&e._visible!==o&&(e._appearedOnce||(e._appearedOnce=!0),e._visible=o,N(i,s,o?"appear":"disappear",n)),(e._offsetAppearedOnce||a)&&e._offsetVisible!==a&&(e._offsetAppearedOnce||(e._offsetAppearedOnce=!0),e._offsetVisible=a,N(i,s,a?"offsetAppear":"offsetDisappear",n))}}function R(e,t,n){var r=new Image;r.onload=t?t.bind(r):null,r.onerror=n?n.bind(r):null,r.src=e}function W(e,t,n){function r(){delete e._src_loading}t&&e._src_loading!==t&&(e.style.backgroundImage="url("+(t||"")+")",e.removeAttribute("img-src"),e._src_loading=t,R(t,function(n){e.style.backgroundImage="url("+(t||"")+")";var i=this,o=i.width,a=i.height;C(e,k(e,"load",{success:!0,size:{naturalWidth:o,naturalHeight:a}})),r()},function(t){C(e,k(e,"load",{success:!1,size:{naturalWidth:0,naturalHeight:0}})),n&&R(n,function(){e.style.backgroundImage="url("+(n||"")+")"}),r()}))}function F(e,t){if(Array.isArray(e))return e.forEach(function(e){return F(e)});if(e=e||document.body){var n=(e||document.body).querySelectorAll("[img-src]");e.getAttribute("img-src")&&(n=[e]);for(var r=0;r<n.length;r++){var i=n[r];"boolean"==typeof t&&t?W(i,i.getAttribute("img-src"),i.getAttribute("img-placeholder")):A(i,e)[0]&&W(i,i.getAttribute("img-src"),i.getAttribute("img-placeholder"))}}}function B(e,t){void 0===e&&(e=16),void 0===t&&(t=document.body);var n=+(t&&t.dataset.throttleId);return(isNaN(n)||n<=0)&&(n=Sa++,t&&t.setAttribute("data-throttle-id",n+"")),!_a[n]&&(_a[n]={}),_a[n][e]||(_a[n][e]=p(F.bind(this,t),parseFloat(e),!0))}function H(e,t){return parseFloat(e)/t*360}function D(e,t,n){var r=t-e;return((n-e)%r+r)%r+e}function U(e){return e?e.trim().replace(/^([+-]?\d+(?:.\d+)?)grad/,function(e,t){return H(t,400)+"deg"}).replace(/^([+-]?\d+(?:.\d+)?)rad/,function(e,t){return H(t,2*Math.PI)+"deg"}).replace(/^([+-]?\d+(?:.\d+)?)turn/,function(e,t){return H(t,1)+"deg"}).replace(/^([+-]?\d+(?:.\d+)?)deg/,function(e,t){var n=D(0,360,parseFloat(t))+"deg";switch(n){case"0deg":n="to top";break;case"90deg":n="to right";break;case"180deg":n="to bottom";break;case"270deg":n="to left"}return n}):e}function Y(e){return e.replace(/^to\s(top|left|bottom|right)(?:\s+(top|left|bottom|right))?/,function(e,t,n){var r=n&&" "+Ra[n]||"";return""+Ra[t]+r}).replace(/^([+-]?\d+(?:.\d+)?)deg/,function(e,t){var n=Math.abs(450-parseFloat(t))%360;return(n=parseFloat(n.toFixed(3)))+"deg"})}function V(e){return e.replace(/^(\S+)\sat\s([^,]+)/,function(e,t,n){return n+", "+t})}function K(e){return e=U(e),e=Y(e),e=V(e)}function X(){if(void 0===xa){var e=window.devicePixelRatio;if(e&&e>=2&&document.documentElement){var t=document.documentElement,n=document.createElement("div"),r=document.createElement("body"),i=t.firstElementChild||t.firstChild;n.style.border="0.5px solid transparent",r.appendChild(n),t.insertBefore(r,i),xa=1===n.offsetHeight,t.removeChild(r)}else xa=!1}return xa}function q(e){return e.replace(/(?:\/\*)[\s\S]*?\*\//g,"")}function G(){if(null!==es)return es;var e=window.document.createElement("div").style;return e.cssText="position:-webkit-sticky;position:sticky;",es=-1!==e.position.indexOf("sticky")}function Q(e){return ts.test(e)}function Z(e){var t=e.match(ns);if(!t)return"";var n="px";return t[2]&&(n=t[2]),te(parseFloat(t[1]),n)}function J(){var e=y(),t=e.scale;return{px:t,wx:t*e.dpr}}function ee(e,t){t=t||1;var n=0===e?0:e>0?1:-1,r=Math.abs(e)>t?e:n*t;return 1===r&&e<1&&X()&&(r=.5),r}function te(e,t){return ee(e*J()[t])+"px"}function ne(e,t){if(Q(t))return t;var n=Z(t);if(n)return n;var r=/([+-]?[\d.]+)([p,w]x)/gi;if(r.test(t)){var i=J();return t.replace(r,function(e,t,n){return ee(parseFloat(t)*i[n])+"px"})}return t}function re(e){var t=Za(e),n=t.flex;return n&&(t.WebkitBoxFlex=n,t.MozBoxFlex=n,t.MsFlex=n),t}function ie(e,t){return t*y().scale+"px"}function oe(e){var t={};for(var n in e){var r=e[n];if(Ja.indexOf(n)>-1)t[n]=r;else switch(typeof r){case"string":t[n]=ne(n,r);break;case"number":t[n]=ie(n,r);break;default:t[n]=r}}return t}function ae(e){var t={};if(!e)return t;var n=e.style.webkitTransform||e.style.mozTransform||e.style.transform;return n&&n.match(/(?: *(?:translate|rotate|scale)[^(]*\([^(]+\))+/i)&&(t=n.trim().replace(/, +/g,",").split(" ").reduce(function(e,t){return["translate","scale","rotate"].forEach(function(n){new RegExp(n,"i").test(t)&&(e[n]=t)}),e},{})),t}function se(e){return Object.keys(e).reduce(function(t,n){return t+e[n]+" "},"")}function le(e){for(var t=e.length,n=0,r=0;r<t;r++)n+=e[r].getBoundingClientRect().width;return n}function ce(){var e=[],t=Array.from(document.styleSheets||[]).filter(function(e){return"1"!==e.ownerNode.getAttribute("weex-scanned")}),n=Array.from(t).reduce(function(t,n){if(n.ownerNode.setAttribute("weex-scanned",1),"link"===n.ownerNode.tagName.toLowerCase()||!n.ownerNode.textContent||n.ownerNode.id.match(/weex-pseudo-\d+/))return t;for(var r=q(n.ownerNode.textContent.trim()).split(/}/),i=r.length,o=[],a=0;a<i;a++){var s=r[a];if(s&&!s.match(/^\s*$/)){var l=s.match(/((?:,?\s*\.[\w-]+\[data-v-\w+\](?::\w+)?)+)\s*({[^}]+)/);if(!l)return t;for(var c=l[1].split(",").map(function(e){return e.trim()}),u=l[2].replace(/[{}]/g,"").trim(),h=0,f=c.length;h<f;)o.push({selectorText:c[h],cssText:u}),h++}}return Array.from(o).forEach(function(e){var n=e.selectorText||"",r=!1;n.match(/:(?:active|focus|enabled|disabled)/)&&(r=!0);var i=q(e.cssText).split(";").reduce(function(e,t){if((t=t.trim())&&t.indexOf("/*")<=-1){var n=t.split(":").map(function(e){return e.trim()});e[n[0]]=n[1]}return e},{});r&&w(n+"{"+Object.keys(i).reduce(function(e,t){return e+t+":"+i[t]+"!important;"},"")+"}","weex-pseudo-"+ss++);var o=r?t.pseudo:t;o[n]?d(o[n],i):o[n]=i}),e.push(n.ownerNode),t},{pseudo:{}});return window._no_remove_style_sheets||e.forEach(function(e){e.parentNode.removeChild(e)}),n}function ue(e){return e.context.$options._scopeId}function de(e,t){for(var n=ue(e),r={},i=weex._styleMap||{},o=0,a=t.length;o<a;){var s=i["."+t[o]+"["+n+"]"];s&&h(r,s),o++}return g(r)}function he(e,t){var n=e.data||{},r="string"==typeof n.staticClass?n.staticClass.split(" "):n.staticClass||[],i="string"==typeof n.class?n.class.split(" "):n.class||[],o=oe(de(e,r.concat(i)));return n.cached||(n.cached=h({},n.staticStyle)),h(n.cached,n.style),d(o,n.cached),n.staticStyle=o,t&&(delete n.staticStyle,delete n.style),o}function fe(e,t){if(!e.$vnode)return{};for(var n={},r=e.$vnode;r;)d(n,he(r,t)),r=r.parent;n=re(n);for(var i in n)!function(t){if(Array.isArray(n[t])){var r=n[t];e.$nextTick(function(){var n=e.$el;if(n)for(var i=0;i<r.length;i++)n.style[t]=r[i]}),"position"!==t&&delete n[t]}}(i);var o=n.position,a=/sticky$/;if("fixed"===o)e.$nextTick(function(){var t=e.$el;t&&t.classList.add("weex-fixed")});else if(u(o)&&o[0].match(a)||(o+"").match(a))if(delete n.position,G())e.$nextTick(function(){var t=e.$el;t&&t.classList.add("weex-ios-sticky")});else if(!e._stickyAdded){var s=e._uid,l=T(e);l&&(e._stickyAdded=!0,l._stickyChildren||(l._stickyChildren={}),l._stickyChildren[s]=e),e.$nextTick(function(){var t=e.$el;t&&(e._initOffsetTop=t.offsetTop)})}return n}function pe(e,t){for(var n=[];e;){if(e.data&&e.data.on){var r=e.data.on[t];r&&n.push(r)}if(e.componentOptions&&e.componentOptions.listeners){var i=e.componentOptions.listeners[t];i&&n.push(i)}e=e.parent}return n}function me(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];if(Array.isArray(e))for(var r=e.slice(),i=r.length,o=0;o<i;o++){var a=r[o];a._weex_hook||a.apply(null,t)}else e._weex_hook||e.apply(null,t)}function ge(){cs=!0,["scroll","resize"].forEach(function(e){window.addEventListener(e,B(25,document.body))})}function ve(){if(!us){us=!0;var e=window._process_style_note_page||ds;console.warn("[vue-render]: you should add vue-loader config with $processStyle to enable inline styles's normalization. see "+e+" If you already did this, please ignore this message.")}}function we(e){if(!e)throw new Error("[Vue Render] Vue not found. Please make sure vue 2.x runtime is imported.");global.weex.__vue__=e,console.log("[Vue Render] install Vue "+e.version+".")}function be(e){return"a"===e.tagName.toLowerCase()}function xe(e){for(var t=e.parentElement;t&&t!==document.body;){if("A"===t.tagName)return!0;t=t.parentElement}return!1}function ye(e,t){for(var n=[];e;){if(e.data&&e.data.on){var r=e.data.on[t];r&&n.push(r)}if(e.componentOptions&&e.componentOptions.listeners){var i=e.componentOptions.listeners[t];i&&n.push(i)}e=e.parent}return n}function _e(e){if(!ys&&e){ys=!0;var t=S();xs.forEach(function(n){var r="click"===n||!!(bs.indexOf(n)>-1&&t)&&{passive:!0};e.addEventListener(n,function(e){for(var t=e.target,n=t.__vue__;!n&&t&&t!==document.body;)n=(t=t.parentElement)&&t.__vue__;if(n){var r=!1,i=e.type;if("tap"!==i||"weex"===e._for)for(;n;){var o=n._vnode||n.$vnode,a=n.$el,s=ye(o,"tap"===i?"click":i),l=s&&s.length;if(l>0){if("click"!==i)for(var c=0;c<l;c++){var u=s[c],d="tap"===i?k(t,"click"):e;d._triggered={target:a},me(u.fns,d)}e._triggered={target:a},r=!0}if(be(a)&&("click"===i||"tap"===i)){var h=a.getAttribute("href"),f=/^\s*javascript\s*:\s*void\s*(?:\(\s*0\s*\)|0)\s*;?\s*$/,p=a.getAttribute("prevent");window._should_intercept_a_jump&&window._should_intercept_a_jump(a)?(e._triggered=!1,r=!0):h.match(f)||""===p||"true"===p?(e._triggered=!1,e.preventDefault()):(e._triggered={target:a},r=!0)}if(r&&"click"===i&&xe(a))return e._triggered={target:a},void e.preventDefault();if(r)return;n=n.$parent}}},r)})}}function Se(){_e(document)}function ke(e){function t(e){return!!weex._components[e]}if(!_s){_s=!0,we(e),e.prototype.$getConfig=function(){return console.warn('[Vue Render] "this.$getConfig" is deprecated, please use "weex.config" instead.'),weex.config};var n=/^html:/i;e.config.isReservedTag=function(e){return n.test(e)},e.config.parsePlatformTagName=function(e){return e.replace(n,"")};var r=e.config.getTagNamespace;e.config.getTagNamespace=function(e){if(!t(e))return r(e)},e.mixin(fs),e.mixin(ps),e.mixin(vs),Se()}}function Ce(e){var t=e.extractComponentStyle,n=e.trimTextVNodes;return{name:"weex-a",props:{href:String},render:function(e){return e("html:a",{attrs:{"weex-type":"a",href:this.href},staticClass:"weex-a weex-ct",staticStyle:t(this)},n(this.$slots.default))},_css:zs}}function Te(e){var t=e.extractComponentStyle,n=e.trimTextVNodes;return{name:"weex-div",render:function(e){return e("html:div",{attrs:{"weex-type":"div"},staticClass:"weex-div weex-ct",staticStyle:t(this)},n(this.$slots.default))},_css:Ps}}function Ee(e){var t=e.resize||"100% 100%";return{"background-size":["cover","contain","100% 100%"].indexOf(t)>-1?t:"100% 100%"}}function Oe(e,t,n){if(!n||!n.width||!n.height)return t;var r=n.width,i=n.height;return e.processImgSrc&&e.processImgSrc(t,{width:parseFloat(r),height:parseFloat(i),quality:e.quality,sharpen:e.sharpen,original:e.original})||t}function Ie(e,t){try{var n,r,i=!1;e.match(/data:image\/[^;]+;base64,/)&&(i=!0,n=e.split(",")),r=i?n[1].substr(0,Ls):e.replace(/\?[^?]+/,"").replace(/#[^#]+/,"").match(/([^/]+)$/);var o=document.createElement("a");o.href=e,o.download=r;var a=new Event("click",{bubbles:!1});o.dispatchEvent(a),t&&t({success:!0})}catch(e){!function(e){t&&t({success:!1,errorDesc:e+""})}(e)}}function Ae(e,t){if(t){var n=["::-webkit-input-placeholder",":-moz-placeholder","::-moz-placeholder",":-ms-input-placeholder",":placeholder-shown"],r=e._id;Os(n.map(function(e,i){return"#"+Bs+r+n[i]+"{color:"+t+";}"}).join(""),""+Fs+r,!0)}}function Ne(e){var t=Ts(e),n=t.placeholderColor;return n&&Ae(e,n),t}function je(e){return{name:"weex-input",mixins:[e.mixins.inputCommon],props:{type:{type:String,default:"text",validator:function(e){return-1!==["email","number","password","search","tel","text","url","date","datetime","time"].indexOf(e)}},value:String,placeholder:String,disabled:{type:[String,Boolean],default:!1},autofocus:{type:[String,Boolean],default:!1},maxlength:[String,Number],returnKeyType:String},render:function(e){this._id||(this._id=Hs++);var t=Es(this);return e("html:input",{attrs:{"weex-type":"input",id:""+Bs+this._id,type:this.type,value:this.value,disabled:"false"!==this.disabled&&!1!==this.disabled,autofocus:"false"!==this.autofocus&&!1!==this.autofocus,placeholder:this.placeholder,maxlength:this.maxlength,returnKeyType:this.returnKeyType},domProps:{value:this.value},on:this.createKeyboardEvent(t),staticClass:"weex-input weex-el",staticStyle:Ne(this)})},_css:Ds}}function ze(e){var t=e.extractComponentStyle;return{name:"weex-switch",props:{checked:{type:[Boolean,String],default:!1},disabled:{type:[Boolean,String],default:!1}},data:function(){return{isChecked:"false"!==this.checked&&!1!==this.checked,isDisabled:"false"!==this.disabled&&!1!==this.disabled}},computed:{wrapperClass:function(){var e=["weex-switch"];return this.isChecked&&e.push("weex-switch-checked"),this.isDisabled&&e.push("weex-switch-disabled"),e.join(" ")}},methods:{toggle:function(){this.isDisabled||(this.isChecked=!this.isChecked,this.$emit("change",{value:this.isChecked}))}},render:function(e){var n=this;return e("span",{attrs:{"weex-type":"switch"},on:{click:function(e){n.$emit("click",e),n.toggle()}},staticClass:this.wrapperClass,staticStyle:t(this)},[e("small",{staticClass:"weex-switch-inner"})])},_css:Ys}}function $e(e){var t=weex.config.env.scale;if(!e._throttleScroll){var n=e.$refs.wrapper,r=e.$refs.inner,i=("horizontal"===e.scrollDirection?n.scrollLeft:n.scrollTop)||0;e._throttleScroll=weex.utils.throttle(function(o){var a="horizontal"===e.scrollDirection?n.scrollLeft:n.scrollTop,s=parseInt(e.offsetAccuracy)*t;Math.abs(a-i)>=s&&(!function(){var t=r.getBoundingClientRect();o.contentSize={width:t.width,height:t.height},o.contentOffset={x:n.scrollLeft,y:-n.scrollTop},e.$emit("scroll",o)}(),i=a)},16,!0)}return e._throttleScroll}function Pe(e){var t=e.extractComponentStyle,n=e.createEventMap;return{name:"weex-list",mixins:[Ks,Xs],computed:{wrapperClass:function(){var e=["weex-list","weex-list-wrapper","weex-ct"];return this._refresh&&e.push("with-refresh"),this._loading&&e.push("with-loading"),e.join(" ")}},methods:{createChildren:function(e){var t=this.$slots.default||[];return this._cells=t.filter(function(e){return!(!e.tag||!e.componentOptions)}),[e("article",{ref:"inner",staticClass:"weex-list-inner weex-ct"},this._cells)]}},render:function(e){var r=this;return this.weexType="list",this.$nextTick(function(){r.updateLayout()}),e("main",{ref:"wrapper",attrs:{"weex-type":"list"},staticClass:this.wrapperClass,on:n(this,{scroll:this.handleListScroll,touchstart:this.handleTouchStart,touchmove:this.handleTouchMove,touchend:this.handleTouchEnd}),staticStyle:t(this)},this.createChildren(e))}}}function Me(e){var t=e.extractComponentStyle,n=e.createEventMap;return{name:"weex-scroller",mixins:[Ks,Xs],props:{scrollDirection:{type:[String],default:"vertical",validator:function(e){return-1!==["horizontal","vertical"].indexOf(e)}},scrollable:{type:[Boolean],default:!0}},computed:{wrapperClass:function(){var e=["weex-scroller","weex-scroller-wrapper","weex-ct"];return"horizontal"===this.scrollDirection?e.push("weex-scroller-horizontal"):e.push("weex-scroller-vertical"),this.scrollable||e.push("weex-scroller-disabled"),e.join(" ")}},methods:{createChildren:function(e){var t=this.$slots.default||[];return this._cells=t.filter(function(e){return!(!e.tag||!e.componentOptions)}),[e("article",{ref:"inner",staticClass:"weex-scroller-inner weex-ct"},this._cells)]}},render:function(e){var r=this;return this.weexType="scroller",this._cells=this.$slots.default||[],this.$nextTick(function(){r.updateLayout()}),e("main",{ref:"wrapper",attrs:{"weex-type":"scroller"},on:n(this,{scroll:this.handleScroll,touchstart:this.handleTouchStart,touchmove:this.handleTouchMove,touchend:this.handleTouchEnd}),staticClass:this.wrapperClass,staticStyle:t(this)},this.createChildren(e))}}}function Le(e){var t=e.extractComponentStyle,n=e.createEventMap;return{name:"weex-waterfall",mixins:[Ks],props:{columnGap:{type:[String,Number],default:"normal",validator:function(e){return!e||"normal"===e||(e=parseInt(e),!isNaN(e)&&e>0)}},columnCount:{type:[String,Number],default:Zs,validator:function(e){return e=parseInt(e),!isNaN(e)&&e>0}},columnWidth:{type:[String,Number],default:"auto",validator:function(e){return!e||"auto"===e||(e=parseInt(e),!isNaN(e)&&e>0)}}},mounted:function(){this._nextTick()},updated:function(){this.$nextTick(this._nextTick())},methods:{_createChildren:function(e,t){var n=this,r=this.$slots.default||[];this._headers=[],this._others=[],this._cells=r.filter(function(e){if(!e.tag||!e.componentOptions)return!1;var t=e.componentOptions.tag;return"refresh"===t||"loading"===t?(n["_"+t]=e,!1):"header"===t?(n._headers.push(e),!1):"cell"===t||(n._others.push(e),!1)}),this._reCalc(t),this._genColumns(e);var i=[];return this._refresh&&i.push(this._refresh),(i=i.concat(this._headers).concat(this._others)).push(e("html:div",{ref:"columns",staticClass:"weex-waterfall-inner-columns weex-ct"},this._columns)),this._loading&&i.push(this._loading),[e("article",{ref:"inner",staticClass:"weex-waterfall-inner weex-ct"},i)]},_reCalc:function(t){function n(e,t){return e-(t.padding?2*parseInt(t.padding):parseInt(t.paddingLeft||0)+parseInt(t.paddingRight||0))}var r,i,o,a,s=e.config.env.scale,l=this.$el;if(l&&1===l.nodeType){var c=window.getComputedStyle(l);a=n(l.getBoundingClientRect().width,c)}else a=n(document.documentElement.clientWidth,t);if(i=this.columnGap,i=i&&"normal"!==i?parseInt(i):Qs,i*=s,r=this.columnWidth,o=this.columnCount,r&&"auto"!==r&&(r=parseInt(r)*s),o&&"auto"!==o&&(o=parseInt(o)),"auto"===o&&"auto"===r);else if("auto"!==o&&"auto"===r)r=(a-(o-1)*i)/o;else if("auto"===o&&"auto"!==r)o=(a+i)/(r+i);else if("auto"!==o&&"auto"!==r){var u,d=function(){(u=o*r+(o-1)*i)<a?r+=(a-u)/o:u>a&&o>1?(o--,d()):u>a&&(r=a)};d()}this._columnCount=o,this._columnWidth=r,this._columnGap=i},_genColumns:function(e){var t=this;this._columns=[];for(var n=this._cells,r=this._columnCount,i=n.length,o=this._columnCells=Array(r).join(".").split(".").map(function(){return[]}),a=0;a<i;a++)(n[a].data.attrs||(n[a].data.attrs={}))["data-cell"]=a,o[a%r].push(n[a]);for(var s=0;s<r;s++)t._columns.push(e("html:div",{ref:"column"+s,attrs:{"data-column":s},staticClass:"weex-ct",staticStyle:{width:t._columnWidth+"px",marginLeft:0===s?0:t._columnGap+"px"}},o[s]))},_nextTick:function(){this._reLayoutChildren()},_reLayoutChildren:function(){for(var e=this,t=this._columnCount,n=[],r=[],i=[],o=Number.MAX_SAFE_INTEGER,a=0,s=0;s<t;s++){var l=e._columns[s].elm,c=l.lastElementChild,u=c?c.getBoundingClientRect().bottom:0;n.push(l),i[s]=u,r.push(document.createDocumentFragment()),u<o&&(o=u,a=s)}for(var d=[],h={},f=0;f<t;f++)if(f!==a)for(var p=n[f].querySelectorAll("section.weex-cell"),m=p.length-1;m>=0;m--){var g=p[m],v=g.getBoundingClientRect();if(v.top>o){var w=~~g.getAttribute("data-cell");d.push(w),h[w]={elm:g,height:v.height},i[f]-=v.height}}d.sort(function(e,t){return e>t});for(var b=d.length,x=0;x<b;x++)!function(e){o=Math.min.apply(Math,i),a=i.indexOf(o);var t=e.elm,n=e.height;r[a].appendChild(t),i[a]+=n}(h[d[x]]);for(var y=0;y<t;y++)n[y].appendChild(r[y])}},render:function(e){var r=this;this.weexType="waterfall",this._cells=this.$slots.default||[],this.$nextTick(function(){r.updateLayout()});var i=t(this);return e("main",{ref:"wrapper",attrs:{"weex-type":"waterfall"},on:n(this,{scroll:this.handleScroll,touchstart:this.handleTouchStart,touchmove:this.handleTouchMove,touchend:this.handleTouchEnd}),staticClass:"weex-waterfall weex-waterfall-wrapper weex-ct",staticStyle:i},this._createChildren(e,i))}}}function Re(e){var t=e.extractComponentStyle;return{name:"weex-cell",render:function(e){return e("section",{attrs:{"weex-type":"cell"},staticClass:"weex-cell weex-ct",staticStyle:t(this)},this.$slots.default)}}}function We(e){var t=e.extractComponentStyle,n=e.utils.supportSticky;return{data:function(){return{sticky:!1,initTop:0,placeholder:null,supportSticky:n()}},mounted:function(){this.initTop=this.$el.offsetTop,this.placeholder=window.document.createElement("header")},updated:function(){this.sticky||(this.initTop=this.$el.offsetTop)},methods:{addSticky:function(){this.sticky=!0,this.placeholder.style.display="block",this.placeholder.style.width=this.$el.offsetWidth+"px",this.placeholder.style.height=this.$el.offsetHeight+"px",this.$el.parentNode.insertBefore(this.placeholder,this.$el)},removeSticky:function(){this.sticky=!1;try{this.$el.parentNode.removeChild(this.placeholder)}catch(e){}}},render:function(e){return e("html:header",{attrs:{"weex-type":"header"},ref:"header",staticClass:"weex-header weex-ct",class:{"weex-sticky":this.sticky,"weex-ios-sticky":this.supportSticky},staticStyle:t(this)},this.$slots.default)}}}function Fe(){var e=weex.extractComponentStyle;return{name:"weex-loading",props:{display:{type:String,default:"show",validator:function(e){return-1!==["show","hide"].indexOf(e)}}},data:function(){return{height:-1,viewHeight:0}},mounted:function(){this.viewHeight=this.$el.offsetHeight,"hide"===this.display?this.height=0:this.height=this.viewHeight},watch:{height:function(e){this.$el.style.height=e+"px"},display:function(e){this.height="hide"===e?0:this.viewHeight}},methods:{pulling:function(e){void 0===e&&(e=0),this.height=e},pullingUp:function(e){this.$el.style.transition="height 0s",this.pulling(e)},pullingEnd:function(){this.$el.style.transition="height .2s",this.height>=this.viewHeight?(this.pulling(this.viewHeight),this.$emit("loading")):this.pulling(0)},getChildren:function(){var e=this.$slots.default||[];return"show"===this.display?e:e.filter(function(e){return e.componentOptions&&"loading-indicator"!==e.componentOptions.tag})}},render:function(t){return this.$parent._loading=this,t("aside",{ref:"loading",attrs:{"weex-type":"loading"},staticClass:"weex-loading weex-ct",staticStyle:e(this)},this.getChildren())}}}function Be(e){var t=e.extractComponentStyle,n=e.utils.createEvent;return{name:"weex-refresh",props:{display:{type:String,default:"show",validator:function(e){return-1!==["show","hide"].indexOf(e)}}},data:function(){return{lastDy:0,viewHeight:0,height:-1}},mounted:function(){this.viewHeight=this.$el.offsetHeight,"hide"===this.display?this.height=0:this.height=this.viewHeight},watch:{height:function(e){this.$el.style.height=e+"px"},display:function(e){this.height="hide"===e?0:this.viewHeight}},methods:{pulling:function(e){void 0===e&&(e=0),this.height=e,this.$emit("pullingdown",n(this,"pullingdown",{dy:e-this.lastDy,pullingDistance:e,viewHeight:this.viewHeight})),this.lastDy=e},pullingDown:function(e){this.$el.style.transition="height 0s",this.pulling(e)},pullingEnd:function(){this.$el.style.transition="height .2s",this.height>=this.viewHeight?(this.pulling(this.viewHeight),this.$emit("refresh")):this.pulling(0)},getChildren:function(){var e=this.$slots.default||[];return"show"===this.display?e:e.filter(function(e){return e.componentOptions&&"loading-indicator"!==e.componentOptions.tag})}},render:function(e){return this.$parent._refresh=this,e("aside",{ref:"refresh",attrs:{"weex-type":"refresh"},staticClass:"weex-refresh weex-ct",staticStyle:t(this)},this.getChildren())}}}function He(e){e._styleSheet||(e._styleSheet=js("weex-cmp-loading-indicator"))}function De(e,t){He(e);for(var n=Ue(t),r=e._styleSheet.rules||e._styleSheet.cssRules,i=0,o=r.length;i<o;i++){var a=r.item(i);if((a.type===CSSRule.KEYFRAMES_RULE||a.type===CSSRule.WEBKIT_KEYFRAMES_RULE)&&"weex-spinner"===a.name)for(var s=a.cssRules,l=0,c=s.length;l<c;l++){var u=s[l];u.type!==CSSRule.KEYFRAME_RULE&&u.type!==CSSRule.WEBKIT_KEYFRAME_RULE||(u.style.boxShadow=n[l])}}}function Ue(e){if(e){for(var t=["0em -1.3em 0em 0em","0.9em -0.9em 0 0em","1.25em 0em 0 0em","0.875em 0.875em 0 0em","0em 1.25em 0 0em","-0.9em 0.9em 0 0em","-1.3em 0em 0 0em","-0.9em -0.9em 0 0em"],n=["1","0.2","0.2","0.2","0.2","0.2","0.5","0.7"].map(function(t){return"rgba("+e.r+","+e.g+","+e.b+","+t+")"}),r=[],i=0;i<t.length;i++)!function(e){var i=Ns(n,e,"r");r.push(t.map(function(e,t){return e+" "+i[t]}).join(", "))}(i);return r}}function Ye(e){var t=Is(e),n=t.color,r=n&&As(n);return r&&De(e,r),t}function Ve(e,t){var n={};return n["background-color"]=e[t?"itemSelectedColor":"itemColor"],n.width=n.height=e.itemSize,n}function Ke(e,t){for(var n=[],r=ll(e),i=ul({},r,["itemColor","itemSelectedColor","itemSize"]),o=0;o<Number(e.count);++o){var a=["weex-indicator-item weex-el"],s=!1;o===Number(e.active)&&(a.push("weex-indicator-item-active"),s=!0),n.push(t("mark",{staticClass:a.join(" "),staticStyle:Ve(i,s)}))}return e.$nextTick(function(){Qe(this,Xe(this,r),qe(this,r))}),t("nav",{attrs:{"weex-type":"indicator"},staticClass:"weex-indicator weex-ct",staticStyle:r},n)}function Xe(e,t){var n=e._getParentRect();return["width","height"].reduce(function(e,r){var i=t&&t[r];return e[r]=i?parseFloat(i):n[r],e},{})}function qe(e,t){return["left","top","bottom","right"].reduce(function(e,n){var r=t&&t[n];return r||0===r?(e[n]=parseFloat(r),e):e},{})}function Ge(e){var t,n;if(1===e.children.length)t=n=window.getComputedStyle(e.children[0]);else{var r=window.getComputedStyle(e.children[1]),i=parseFloat(r.marginLeft);n=parseFloat(r.height),t=e.children.length*(n+i)-i}return{width:t,height:n}}function Qe(e,t,n){var r=e.$el,i=Ge(r),o=Object.keys(i).reduce(function(e,t){return e[t]=i[t]+"px",e},{});cl(r.style,o);var a=[{dir:n.left||0===n.left?"left":n.right||0===n.right?"right":"left",scale:"width"},{dir:n.top||0===n.top?"top":n.bottom||0===n.bottom?"bottom":"top",scale:"height"}];Object.keys(a).forEach(function(e){var o=a[e],s=o.dir,l=o.scale;r.style[s]=(n[s]||0)+t[l]/2-i[l]/2+"px"})}function Ze(e){void 0===e&&(e={});var t=parseInt(e.lines)||0,n=e["text-overflow"]||"ellipsis";if(t>0)return{overflow:"hidden","text-overflow":n,"-webkit-line-clamp":t}}function Je(e){var t=e.extractComponentStyle,n=e.createEventMap,r=e.utils.extend;return{name:"weex-text",props:{lines:[Number,String],value:[String]},render:function(e){var i=t(this),o=Ze(i);return e("p",{attrs:{"weex-type":"text"},on:n(this),staticClass:"weex-text weex-el",staticStyle:r(i,o)},this.$slots.default||[this.value])},_css:wl}}function et(e){var t=e.extractComponentStyle,n=e.createEventMap,r=e.mixins.inputCommon,i=e.utils,o=i.extend,a=i.mapFormEvents;return{name:"weex-textarea",mixins:[r],props:{value:String,placeholder:String,disabled:{type:[String,Boolean],default:!1},autofocus:{type:[String,Boolean],default:!1},rows:{type:[String,Number],default:2},returnKeyType:String},render:function(e){var r=o(n(this),a(this));return e("html:textarea",{attrs:{"weex-type":"textarea",value:this.value,disabled:"false"!==this.disabled&&!1!==this.disabled,autofocus:"false"!==this.autofocus&&!1!==this.autofocus,placeholder:this.placeholder,rows:this.rows,"return-key-type":this.returnKeyType},domProps:{value:this.value},on:this.createKeyboardEvent(r),staticClass:"weex-textarea weex-el",staticStyle:t(this)})},_css:bl}}function tt(e){var t=e.extractComponentStyle,n=e.createEventMap;return{name:"weex-video",props:{src:String,playStatus:{type:String,default:"pause",validator:function(e){return-1!==["play","pause"].indexOf(e)}},autoplay:{type:[String,Boolean],default:!1},autoPlay:{type:[String,Boolean],default:!1},playsinline:{type:[String,Boolean],default:!0},controls:{type:[String,Boolean],default:!1}},render:function(e){return"play"===this.playStatus?this.$nextTick(function(){this.$el&&this.$el.play()}):"pause"===this.playStatus&&this.$nextTick(function(){this.$el&&this.$el.pause()}),e("html:video",{attrs:{"weex-type":"video",autoplay:"false"!==this.autoplay&&!1!==this.autoplay||"false"!==this.autoPlay&&!1!==this.autoPlay,"webkit-playsinline":this.playsinline,controls:this.controls,src:this.src},on:n(this,["start","pause","finish","fail"]),staticClass:"weex-video weex-el",staticStyle:t(this)})}}}function nt(e){var t=e.extractComponentStyle,n=e.createEventMap,r=e.utils.createEvent;return{name:"weex-web",props:{src:String},methods:{goBack:function(){this.$el&&this.$el.contentWindow.history.back()},goForward:function(){this.$el&&this.$el.contentWindow.history.forward()},reload:function(){this.$el&&this.$el.contentWindow.history.reload()}},mounted:function(){var e=this;this.$el&&(this.$emit("pagestart",r(this.$el,"pagestart",{url:this.src})),this.$el.addEventListener("load",function(t){e.$emit("pagefinish",r(e.$el,"pagefinish",{url:e.src}))}))},render:function(e){return e("iframe",{attrs:{"weex-type":"web",src:this.src},on:n(this,["error"]),staticClass:"weex-web weex-el",staticStyle:t(this)})},_css:xl}}function rt(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function it(e){switch(e.arrayFormat){case"index":return function(t,n,r){return null===n?[at(t,e),"[",r,"]"].join(""):[at(t,e),"[",at(r,e),"]=",at(n,e)].join("")};case"bracket":return function(t,n){return null===n?at(t,e):[at(t,e),"[]=",at(n,e)].join("")};default:return function(t,n){return null===n?at(t,e):[at(t,e),"=",at(n,e)].join("")}}}function ot(e){var t;switch(e.arrayFormat){case"index":return function(e,n,r){t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===r[e]&&(r[e]={}),r[e][t[1]]=n):r[e]=n};case"bracket":return function(e,n,r){t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t&&void 0!==r[e]?r[e]=[].concat(r[e],n):r[e]=[n]};default:return function(e,t,n){void 0!==n[e]?n[e]=[].concat(n[e],t):n[e]=t}}}function at(e,t){return t.encode?t.strict?Ll(e):encodeURIComponent(e):e}function st(e){return Array.isArray(e)?e.sort():"object"==typeof e?st(Object.keys(e)).sort(function(e,t){return Number(e)-Number(t)}).map(function(t){return e[t]}):e}function lt(e,t,n){var r,i="jsonp_"+ ++Fl;e.url||console.error("[h5-render] config.url should be set in _jsonp for 'fetch' API."),global[i]=function(e){return function(n){t({status:200,ok:!0,statusText:"OK",data:n}),delete global[e]}}(i);var o=document.createElement("script");try{r=lib.httpurl(e.url)}catch(t){console.error("[h5-render] invalid config.url in _jsonp for 'fetch' API: "+e.url)}r.params.callback=i,o.type="text/javascript",o.src=r.toString(),o.onerror=function(e){return function(n){console.error("[h5-render] unexpected error in _jsonp for 'fetch' API",n),t({status:Bl,ok:!1,statusText:"",data:""}),delete global[e]}}(i),document.getElementsByTagName("head")[0].insertBefore(o,null)}function ct(e,t,n){var r=new XMLHttpRequest;r.responseType=e.type,r.open(e.method,e.url,!0),!0===e.withCredentials&&(r.withCredentials=!0);var i=e.headers||{};for(var o in i)r.setRequestHeader(o,i[o]);r.onload=function(e){t({status:r.status,ok:r.status>=200&&r.status<300,statusText:r.statusText,data:r.response,headers:r.getAllResponseHeaders().split("\n").reduce(function(e,t){var n=t.match(/(.+): (.+)/);return n&&(e[n[1]]=n[2]),e},{})})},n&&(r.onprogress=function(e){n({readyState:r.readyState,status:r.status,length:e.loaded,total:e.total,statusText:r.statusText,headers:r.getAllResponseHeaders().split("\n").reduce(function(e,t){var n=t.match(/(.+): (.+)/);return n&&(e[n[1]]=n[2]),e},{})})}),r.onerror=function(e){console.error("[h5-render] unexpected error in _xhr for 'fetch' API",e),t({status:Bl,ok:!1,statusText:"",data:""})},r.send(e.body||null)}function ut(){var e=document.getElementById(Yl);return e||((e=document.createElement("input")).setAttribute("id",Yl),e.style.cssText="height:1px;width:1px;border:none;",document.body.appendChild(e)),e}function dt(e,t,n){var r=Zl.nextFrame,i=Zl.toCSSText,o=Zl.autoPrefix,a=Zl.camelizeKeys,s=Zl.normalizeStyle;(0,Zl.isArray)(e)&&(e=e[0]);var l="all "+(t.duration||0)+"ms "+(t.timingFunction||"linear")+" "+(t.delay||0)+"ms",c=e.$el;c&&weex.utils.fireLazyload(c,!0);var u=function(e){e&&e.stopPropagation(),jl&&(c.removeEventListener(jl,u),c.style[zl]=""),n()};jl&&(c.style[zl]=l,c.addEventListener(jl,u)),r(function(){c.style.cssText+=i(o(s(a(t.styles)))||{})})}function ht(e){if(!e)return null;var t=e.$el?e:e.elm?e.componentInstance||e.context:null;if(!t)return null;var n=t.$el&&t.$el.getAttribute("weex-type");return ya.scrollableTypes.indexOf(n)>-1?t:ht(t.$parent)}function ft(){return(window.performance&&window.performance.now?window.performance.now.bind(window.performance):Date.now)()}function pt(e,t){if(this===document.body||this===window&&window.scrollTo)return window.scrollTo(0,t);this["scroll"+e]=t}function mt(e){e.frame=window.requestAnimationFrame(mt.bind(window,e));var t=(ft()-e.startTime)/468,n=gt(t=t>1?1:t),r=e.startPosition+(e.position-e.startPosition)*n;e.method.call(e.scrollable,e.dSuffix,r),~~r!=~~e.position||window.cancelAnimationFrame(e.frame)}function gt(e){return.5*(1-Math.cos(Math.PI*e))}function vt(e,t){ec||((ec=document.createElement("div")).classList.add(dc),ec.classList.add("hide"),document.body.appendChild(ec)),ec.textContent=e,setTimeout(function(){ec.classList.remove("hide"),t&&t()},16)}function wt(e){ec&&(ec.classList.add("hide"),setTimeout(function(){e&&e()},1e3*hc))}function bt(){this.wrap=document.querySelector(pc),this.node=document.querySelector(mc),this.wrap||this.createWrap(),this.node||this.createNode(),this.clearNode(),this.createNodeContent(),this.bindEvents()}function xt(e){this.msg=e.message||"",this.callback=e.callback,this.okTitle=e.okTitle||"OK",bt.call(this),this.node.classList.add("weex-alert")}function yt(e){this.msg=e.message||"",this.callback=e.callback,this.okTitle=e.okTitle||"OK",this.cancelTitle=e.cancelTitle||"Cancel",bt.call(this),this.node.classList.add("weex-confirm")}function _t(e){this.msg=e.message||"",this.defaultMsg=e.default||"",this.callback=e.callback,this.okTitle=e.okTitle||"OK",this.cancelTitle=e.cancelTitle||"Cancel",bt.call(this),this.node.classList.add("weex-prompt")}e('/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership. The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * "License"); you may not use this file except in compliance\n * with the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n \n.weex-root,\n.weex-root * {\n color: initial;\n cursor: initial;\n direction: initial;\n font: initial;\n font-family: initial;\n font-size: initial;\n font-style: initial;\n font-variant: initial;\n font-weight: initial;\n line-height: initial;\n text-align: initial;\n text-indent: initial;\n visibility: initial;\n white-space: initial;\n word-spacing: initial;\n font-family: BlinkMacSystemFont, \'Source Sans Pro\', \'Helvetica Neue\', Helvetica, Arial, sans-serif;\n}\n\n.weex-root,\n.weex-root *,\n.weex-root *::before,\n.weex-root *::after {\n box-sizing: border-box;\n -webkit-text-size-adjust: none;\n -moz-text-size-adjust: none;\n -ms-text-size-adjust: none;\n text-size-adjust: none;\n}\n\n.weex-root a,\n.weex-root button,\n.weex-root [role="button"],\n.weex-root input,\n.weex-root label,\n.weex-root select,\n.weex-root textarea {\n -ms-touch-action: manipulation;\n touch-action: manipulation;\n}\n\n.weex-root p,\n.weex-root ol,\n.weex-root ul,\n.weex-root dl {\n margin: 0;\n padding: 0;\n}\n\n.weex-root li {\n list-style: none;\n}\n\n.weex-root figure {\n margin: 0;\n}\n\n.weex-root textarea {\n resize: none;\n}\n\n/* show no scroll bar. */\n::-webkit-scrollbar {\n display: none;\n}\n',void 0),e('/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership. The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * "License"); you may not use this file except in compliance\n * with the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n \n.weex-root * {\n border-width: 0;\n border-color: inherit;\n border-style: solid;\n}\n\n.weex-flex-ct {\n display: -webkit-box;\n display: -webkit-flex;\n display: -moz-box;\n display: -ms-flexbox;\n display: flex;\n}\n\n.weex-ct {\n box-sizing: border-box;\n display: -webkit-box;\n display: -webkit-flex;\n display: -moz-box;\n display: -ms-flexbox;\n display: flex;\n position: relative;\n -webkit-box-orient: vertical;\n -webkit-flex-direction: column;\n -moz-box-orient: vertical;\n -moz-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n -webkit-flex-shrink: 0;\n -ms-flex-negative: 0;\n flex-shrink: 0;\n -webkit-flex-grow: 0;\n -moz-box-flex: 0;\n -ms-flex-grow: 0;\n flex-grow: 0;\n -webkit-flex-basis: auto;\n -ms-flex-preferred-size: auto;\n flex-basis: auto;\n -webkit-box-align: stretch;\n -webkit-align-items: stretch;\n -moz-box-align: stretch;\n -ms-flex-align: stretch;\n align-items: stretch;\n -webkit-align-content: flex-start;\n -ms-flex-line-pack: start;\n align-content: flex-start;\n border: 0 solid black;\n margin: 0;\n padding: 0;\n min-width: 0;\n}\n\n.weex-ct.horizontal {\n -webkit-box-orient: horizontal;\n -webkit-flex-direction: row;\n -moz-box-orient: horizontal;\n -moz-box-direction: normal;\n -ms-flex-direction: row;\n flex-direction: row;\n}\n\n.weex-el {\n display: block;\n box-sizing: border-box;\n position: relative;\n -webkit-flex-shrink: 0;\n -ms-flex-negative: 0;\n flex-shrink: 0;\n -webkit-flex-grow: 0;\n -moz-box-flex: 0;\n -ms-flex-grow: 0;\n flex-grow: 0;\n -webkit-flex-basis: auto;\n -ms-flex-preferred-size: auto;\n flex-basis: auto;\n border: 0 solid black;\n margin: 0;\n padding: 0;\n min-width: 0;\n}\n\n.weex-ios-sticky {\n position: -webkit-sticky !important;\n position: sticky !important;\n z-index: 9999;\n top: 0;\n}\n\n.weex-fixed {\n position: fixed;\n z-index: 1;\n}\n\n.weex-sticky {\n position: fixed;\n top: 0;\n z-index: 9999;\n}\n',void 0);var St=!1,kt=window.document,Ct=kt.documentElement,Tt=Array.prototype.slice,Et={},Ot=null;St||(Ct.addEventListener("touchstart",function(e){0===Object.keys(Et).length&&(Ct.addEventListener("touchmove",i,!1),Ct.addEventListener("touchend",o,!1),Ct.addEventListener("touchcancel",a,!1));for(var r=0;r<e.changedTouches.length;r++){var s=e.changedTouches[r],l={};for(var c in s)l[c]=s[c];var u={startTouch:l,startTime:Date.now(),status:"tapping",element:e.srcElement||e.target,pressingHandler:setTimeout(function(t,r){return function(){"tapping"===u.status&&(u.status="pressing",n(t,"longpress",{touch:r,touches:e.touches,changedTouches:e.changedTouches,touchEvent:e})),clearTimeout(u.pressingHandler),u.pressingHandler=null}}(e.srcElement||e.target,e.changedTouches[r]),500)};Et[s.identifier]=u}if(2==Object.keys(Et).length){var d=[];for(var c in Et)d.push(Et[c].element);n(t(d[0],d[1]),"dualtouchstart",{touches:Tt.call(e.touches),touchEvent:e})}},!1),St=!0),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,i=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 o,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&&(o=arguments[2])}for(var s,l=i(r.length),c=t(n)?Object(new n(l)):new Array(l),u=0;u<l;)s=r[u],c[u]=a?void 0===o?a(s,u):a.call(o,s,u):s,u+=1;return c.length=l,c}}());var It=l(function(e){var t=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=t)}),At=l(function(e){var t=e.exports={version:"2.4.0"};"number"==typeof __e&&(__e=t)}),Nt=function(e){return"object"==typeof e?null!==e