(function(){function I(c){__ISWKWEBVIEW?(D.push(c),c=N(),window.weixinPostMessageHandlers.weixinDispatchMessage.postMessage(c)):(D.push(c),document.location=aa)}function N(){if(B._fetchQueue!==ba)return"";var c=s.stringify(D);D=[];var d=[];d[0]=c;d[1]=J;var a=d.join(""),d="";"yes"===O&&(d=K.SHA1(a).toString());a={};a[ca]=c;a[R]=d;return s.stringify(a)}function S(c){if(B._handleMessageFromWeixin!==da)return"{}";var d;d=c[ea];var c=c[R],a=[];a[0]=d;a[1]=J;var a=a.join(""),b="";if("yes"===O&&(b=K.SHA1(a).toString(), b!==c))return"{}";var f;try{f=s.parse(d)}catch(n){f="undefined"!==typeof window.weixinJSONParse?window.weixinJSONParse(d):window.JSON.parse(d)}switch(f[T]){case "callback":return"string"===typeof f[G]&&"function"===typeof L[f[G]]?(d=L[f[G]](f.__params),delete L[f[G]],s.stringify(d)):s.stringify({__err_code:"cb404"});case "event":"object"===typeof f[U]&&(V=f[U]);W=f[X];if("string"===typeof f[H]){if("function"===typeof E[f[H]]&&M(f[H]))return d=E[f[H]](f.__params),s.stringify(d);if("function"===typeof F[f[H]])return d= F[f[H]](f.__params),s.stringify(d)}return s.stringify({__err_code:"ev404"})}return"{}"}function M(c){return V.some(function(d){return d===c})}function x(c){if(B.log===fa){for(var d=[],a=0;aa.width*a.height){var n=document.createElement("canvas");n.width=a.width;n.height=a.height;n.getContext("2d").drawImage(a,0,0);var h="jpg",j=a.src.match(/\.(png|jpg|jpeg|tiff|gif|bmp)$/i);j&&(h=j[1].toLowerCase());try{f=n.toDataURL("image/"+h)}catch(k){x(k.message)}}d(f.replace(b,""),a,c)})}function la(){for(var c=p("audio"),d=0;d]*>/,A=[1,3,8,9,11],Q=y.createElement("table"),B=y.createElement("tr"),C={tr:y.createElement("tbody"),tbody:Q,thead:Q,tfoot:Q, td:B,th:B,"*":y.createElement("div")},E=/complete|loaded|interactive/,H=/^\.([\w-]+)$/,I=/^#([\w-]+)$/,K=/^[\w-]+$/,G={}.toString,v={},F,D,J=y.createElement("div");v.matches=function(e,a){if(!e||1!==e.nodeType)return!1;var b=e.webkitMatchesSelector||e.mozMatchesSelector||e.oMatchesSelector||e.matchesSelector;if(b)return b.call(e,a);var c;c=e.parentNode;(b=!c)&&(c=J).appendChild(e);c=~v.qsa(c,a).indexOf(e);b&&J.removeChild(e);return c};F=function(e){return e.replace(/-+(.)?/g,function(e,a){return a? a.toUpperCase():""})};D=function(e){return e.filter(function(a,b){return e.indexOf(a)==b})};v.fragment=function(e,a){a===o&&(a=z.test(e)&&RegExp.$1);a in C||(a="*");var b=C[a];b.innerHTML=""+e;return g.each(u.call(b.childNodes),function(){b.removeChild(this)})};v.Z=function(e,a){e=e||[];e.__proto__=arguments.callee.prototype;e.selector=a||"";return e};v.isZ=function(e){return e instanceof v.Z};v.init=function(e,i){if(e){if(c(e))return g(y).ready(e);if(v.isZ(e))return e;var w;if(b(e))w=n(e);else if(a(e))w= [g.extend({},e)],e=null;else if(0<=A.indexOf(e.nodeType)||e===window)w=[e],e=null;else if(z.test(e))w=v.fragment(e.trim(),RegExp.$1),e=null;else{if(i!==o)return g(i).find(e);w=v.qsa(y,e)}return v.Z(w,e)}return v.Z()};g=function(e,a){return v.init(e,a)};g.extend=function(e){u.call(arguments,1).forEach(function(a){for(i in a)a[i]!==o&&(e[i]=a[i])});return e};v.qsa=function(e,a){var b;return e===y&&I.test(a)?(b=e.getElementById(RegExp.$1))?[b]:t:1!==e.nodeType&&9!==e.nodeType?t:u.call(H.test(a)?e.getElementsByClassName(RegExp.$1): K.test(a)?e.getElementsByTagName(a):e.querySelectorAll(a))};g.isFunction=c;g.isObject=d;g.isArray=b;g.isPlainObject=a;g.inArray=function(e,a,b){return t.indexOf.call(a,e,b)};g.trim=function(e){return e.trim()};g.uuid=0;g.map=function(e,a){var b,c=[],i;if(f(e))for(i=0;i b.indexOf(e)&&a.push(e)})}return g(a)},eq:function(e){return-1===e?this.slice(e):this.slice(e,+e+1)},first:function(){var e=this[0];return e&&!d(e)?e:g(e)},last:function(){var e=this[this.length-1];return e&&!d(e)?e:g(e)},find:function(e){var a;a=1==this.length?v.qsa(this[0],e):this.map(function(){return v.qsa(this,e)});return g(a)},closest:function(e,a){for(var b=this[0];b&&!v.matches(b,e);)b=b!==a&&b!==y&&b.parentNode;return g(b)},parents:function(e){for(var a=[],b=this;0a.indexOf(e))return a.push(e),e});return k(a,e)},parent:function(e){return k(D(this.pluck("parentNode")),e)},children:function(e){return k(this.map(function(){return u.call(this.children)}),e)},siblings:function(e){return k(this.map(function(e,a){return u.call(a.parentNode.children).filter(function(e){return e!==a})}),e)},empty:function(){return this.each(function(){this.innerHTML=""})},pluck:function(e){return this.map(function(){return this[e]})},show:function(){return this.each(function(){"none"== this.style.display&&(this.style.display=null);if("none"==s(this,"").getPropertyValue("display")){var e=this.style,a=this.nodeName,b,c;p[a]||(b=y.createElement(a),y.body.appendChild(b),c=s(b,"").getPropertyValue("display"),b.parentNode.removeChild(b),"none"==c&&(c="block"),p[a]=c);e.display=p[a]}})},replaceWith:function(e){return this.before(e).remove()},wrap:function(e){return this.each(function(){g(this).wrapAll(g(e)[0].cloneNode(!1))})},wrapAll:function(e){this[0]&&(g(this[0]).before(e=g(e)),e.append(this)); return this},unwrap:function(){this.parent().each(function(){g(this).replaceWith(g(this).children())});return this},clone:function(){return g(this.map(function(){return this.cloneNode(!0)}))},hide:function(){return this.css("display","none")},toggle:function(e){return(e===o?"none"==this.css("display"):e)?this.show():this.hide()},prev:function(){return g(this.pluck("previousElementSibling"))},next:function(){return g(this.pluck("nextElementSibling"))},html:function(e){return e===o?0this.length?!1:j(a).test(this[0].className)},addClass:function(a){return this.each(function(b){w=[];var c=this.className;m(this,a,b,c).split(/\s+/g).forEach(function(a){g(this).hasClass(a)||w.push(a)},this);w.length&&(this.className+=(c?" ":"")+w.join(" "))})},removeClass:function(a){return this.each(function(b){if(a=== o)return this.className="";w=this.className;m(this,a,b,w).split(/\s+/g).forEach(function(a){w=w.replace(j(a)," ")});this.className=w.trim()})},toggleClass:function(a,b){return this.each(function(c){c=m(this,a,c,this.className);(b===o?!g(this).hasClass(c):b)?g(this).addClass(c):g(this).removeClass(c)})}};["width","height"].forEach(function(a){g.fn[a]=function(b){var c,i=a.replace(/./,function(a){return a[0].toUpperCase()});return b===o?this[0]==window?window["inner"+i]:this[0]==y?y.documentElement["offset"+ i]:(c=this.offset())&&c[a]:this.each(function(c){var i=g(this);i.css(a,m(this,b,c,i[a]()))})}});["after","prepend","before","append"].forEach(function(a,b){g.fn[a]=function(){var a=g.map(arguments,function(a){return d(a)?a:v.fragment(a)});if(1>a.length)return this;var e=this.length,c=1b;return this.each(function(w,t){for(var g=0;ga?"0"+a:a}function d(a){f.lastIndex=0;return f.test(a)?'"'+a.replace(f,function(a){var b=j[a];return"string"===typeof b?b:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}function a(b,c){var f,j,i,g,w=n,t,u=c[b];"function"===typeof k&&(u=k.call(c, b,u));switch(typeof u){case "string":return d(u);case "number":return isFinite(u)?""+u:"null";case "boolean":case "null":return""+u;case "object":if(!u)return"null";n+=h;t=[];if("[object Array]"===Object.prototype.toString.apply(u)){g=u.length;for(f=0;f>>2]|=(c[f>>>2]>>>24-8*(f%4)&255)<<24-8*((d+f)%4);else if(65535>>2]=c[f>>>2];else b.push.apply(b,c);this.sigBytes+=a;return this},clamp:function(){var a=this.words,b=this.sigBytes;a[b>>>2]&=4294967295<<32-8*(b%4);a.length=c.ceil(b/4)},clone:function(){var a=n.clone.call(this);a.words=this.words.slice(0);return a},random:function(a){for(var b=[],d=0;d>>2]>>>24-8*(d%4)&255;c.push((f>>>4).toString(16));c.push((f&15).toString(16))}return c.join("")},parse:function(a){for(var b=a.length,c=[],d=0;d>>3]|=parseInt(a.substr(d,2),16)<<24-4*(d%8);return new h.init(c,b/2)}},m=j.Latin1={stringify:function(a){for(var b=a.words,a=a.sigBytes,c=[],d=0;d>>2]>>>24-8*(d%4)&255));return c.join("")},parse:function(a){for(var b=a.length,c=[],d=0;d>>2]|=(a.charCodeAt(d)& 255)<<24-8*(d%4);return new h.init(c,b)}},l=j.Utf8={stringify:function(a){try{return decodeURIComponent(escape(m.stringify(a)))}catch(b){throw Error("Malformed UTF-8 data");}},parse:function(a){return m.parse(unescape(encodeURIComponent(a)))}},r=b.BufferedBlockAlgorithm=n.extend({reset:function(){this._data=new h.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=l.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(a){var b=this._data,d=b.words,f=b.sigBytes, j=this.blockSize,n=f/(4*j),n=a?c.ceil(n):c.max((n|0)-this._minBufferSize,0),a=n*j,f=c.min(4*a,f);if(a){for(var k=0;ki;i++){if(16>i)f[i]=a[b+i]|0;else{var g=f[i-3]^f[i-8]^f[i-14]^f[i-16];f[i]=g<<1|g>>>31}g=(d<<5|d>>>27)+o+f[i];g=20>i?g+((m&l|~m&r)+1518500249):40>i?g+((m^l^r)+1859775393):60>i?g+((m&l|m&r|l&r)-1894007588):g+((m^l^r)-899497514);o=r;r=l;l=m<<30|m>>>2;m=d;d=g}c[0]=c[0]+d|0;c[1]=c[1]+m|0;c[2]=c[2]+l|0;c[3]=c[3]+r|0;c[4]=c[4]+o|0},_doFinalize:function(){var a=this._data,b=a.words,c=8*this._nDataBytes,d=8*a.sigBytes;b[d>>>5]|=128<<24-d%32;b[(d+ 64>>>9<<4)+14]=Math.floor(c/4294967296);b[(d+64>>>9<<4)+15]=c;a.sigBytes=4*b.length;this._process();return this._hash},clone:function(){var a=b.clone.call(this);a._hash=this._hash.clone();return a}});c.SHA1=b._createHelper(d);c.HmacSHA1=b._createHmacHelper(d)})();var D=[],ha=1E3,L={},F={},z={},T="__msg_type",G="__callback_id",H="__event_id",aa="weixin://dispatch_message/",V=[],E={},U="__runOn3rd_apis",J="xx_yy",ea="__json_message",ca="__msg_queue",X="__context_key",W="",O="isUseMd5_check",R="__sha_key", da=S,ba=N,fa=x,ia=Y,ga=q,ma=window.alert;window.alert=function(c){if(!("yes"===document.__wxjsjs__isWebviewWillClosed||"yes"===document.__wxjsjs__isDisableAlertView))return ma(c)};var na=window.prompt;window.prompt=function(c,d){if(!("yes"===document.__wxjsjs__isWebviewWillClosed||"yes"===document.__wxjsjs__isDisableAlertView))return na(c,d)};var B={invoke:q,call:q,on:Y,log:x,_getSelectedText:Z,_fetchQueue:N};try{Object.defineProperty(B,"_handleMessageFromWeixin",{value:S,writable:!1,configurable:!1})}catch(qa){return}if(window.WeixinJSBridge)p.extend(window.WeixinJSBridge, B);else try{Object.defineProperty(window,"WeixinJSBridge",{value:B,writable:!1,configurable:!1})}catch(ra){return}(function(){function c(a,b){for(var c=document.elementFromPoint(a,b),d=c;d&&"IMG"!=d.tagName;)d=d.parentNode;if(!d)var h=function(a,b){if(!a)return null;for(var c in a.childNodes){if(b(c))return c;var d=h(c,b);if(d)return d}return null},d=h(c,function(a){return a&&"IMG"==a.tagName});return d&&"IMG"==d.tagName?d:null}A("menu:setfont",function(a){if("function"===typeof changefont){var b= parseInt(a.fontSize);changefont(b)}else if(!a.isFirstAutoSet||!("2"===a.fontSize||"100"===a.fontScale)){b=parseInt(a.fontScale);if(50<=b&&500>=b)a=a.fontScale+"%";else switch(a.fontSize){case "1":a="80%";break;case "2":a="100%";break;case "3":a="120%";break;case "4":a="140%";break;default:return}document.getElementsByTagName("body")[0].style.webkitTextSizeAdjust=a;if(window.__wxjs_ipadfontsolution&&p.os.ipad&&13<=parseFloat(p.os.version,"10")){for(var b=document.getElementsByTagName("body")[0],c= parseFloat(a,"10")/100,a=[],b=document.createTreeWalker(b,4);b.nextNode();){var d=b.currentNode.parentNode,h=d.getAttribute("mp-original-font-size");h||(h=getComputedStyle(d).fontSize,d.setAttribute("mp-original-font-size",h));a.push([d,h])}a.forEach(function(a){a[0].style.fontSize=parseFloat(a[1])*c+"px"})}}});var d=function(a){var b=!1,c=function(c){b||(b=!0,a(c))},d=p("img");if(0==d.length)return c();for(var h={},j=[],k=0;kk;k++)d=j[k],h=new Image,h.onload=function(){this.isLoaded=!0;for(var a=0,b=0;b