!function(r){"use strict";function t(t,e,n,o){var i=r(n,e);i.adddata(t),i.make(),o=o||0;var a=i.getmodulecount(),u=i.getmodulecount()+2*o;this.text=t,this.level=e,this.version=n,this.modulecount=u,this.isdark=function(r,t){return r-=o,t-=o,!(0>r||r>=a||0>t||t>=a)&&i.isdark(r,t)},this.addblank=function(r,t,e,n){var o=this.isdark,i=1/u;this.isdark=function(a,u){var f=u*i,c=a*i,s=f+i,l=c+i;return o(a,u)&&(r>s||f>e||t>l||c>n)}}}function e(r,e,n,o,i){n=math.max(1,n||1),o=math.min(40,o||40);for(var a=n;o>=a;a+=1)try{return new t(r,e,a,i)}catch(r){}}function n(r,t,e){s(e.background).is("img")?t.drawimage(e.background,0,0,e.size,e.size):e.background&&(t.fillstyle=e.background,t.fillrect(e.left,e.top,e.size,e.size));var n=e.mode;1===n||2===n?function(r,t,e){var n=e.size,o="bold "+e.msize*n+"px "+e.fontname,i=s("")[0].getcontext("2d");i.font=o;var a=i.measuretext(e.label).width,u=e.msize,f=a/n,c=(1-f)*e.mposx,l=(1-u)*e.mposy,h=c+f,g=l+u,d=.01;1===e.mode?r.addblank(0,l-d,n,g+d):r.addblank(c-d,l-d,h+d,g+d),t.fillstyle=e.fontcolor,t.font=o,t.filltext(e.label,c*n,l*n+.75*e.msize*n)}(r,t,e):(3===n||4===n)&&function(r,t,e){var n=e.size,o=e.image.naturalwidth||1,i=e.image.naturalheight||1,a=e.msize,u=a*o/i,f=(1-u)*e.mposx,c=(1-a)*e.mposy,s=f+u,l=c+a,h=.01;3===e.mode?r.addblank(0,c-h,n,l+h):r.addblank(f-h,c-h,s+h,l+h),t.drawimage(e.image,f*n,c*n,u*n,a*n)}(r,t,e)}function o(r,t,e,n,o,i,a,u){r.isdark(a,u)&&t.rect(n,o,i,i)}function i(r,t,e,n,o,i,a,u){var f=r.isdark,c=n+i,s=o+i,l=e.radius*i,h=a-1,g=a+1,d=u-1,v=u+1,p=f(a,u),w=f(h,d),m=f(h,u),t=f(h,v),y=f(a,v),e=f(g,v),a=f(g,u),b=f(g,d),k=f(a,d);p?function(r,t,e,n,o,i,a,u,f,c){a?r.moveto(t+i,e):r.moveto(t,e),u?(r.lineto(n-i,e),r.arcto(n,e,n,o,i)):r.lineto(n,e),f?(r.lineto(n,o-i),r.arcto(n,o,t,o,i)):r.lineto(n,o),c?(r.lineto(t+i,o),r.arcto(t,o,t,e,i)):r.lineto(t,o),a?(r.lineto(t,e+i),r.arcto(t,e,n,e,i)):r.lineto(t,e)}(t,n,o,c,s,l,!m&&!k,!m&&!y,!a&&!y,!a&&!k):function(r,t,e,n,o,i,a,u,f,c){a&&(r.moveto(t+i,e),r.lineto(t,e),r.lineto(t,e+i),r.arcto(t,e,t+i,e,i)),u&&(r.moveto(n-i,e),r.lineto(n,e),r.lineto(n,e+i),r.arcto(n,e,n-i,e,i)),f&&(r.moveto(n-i,o),r.lineto(n,o),r.lineto(n,o-i),r.arcto(n,o,n-i,o,i)),c&&(r.moveto(t+i,o),r.lineto(t,o),r.lineto(t,o-i),r.arcto(t,o,t+i,o,i))}(t,n,o,c,s,l,m&&k&&w,m&&y&&t,a&&y&&e,a&&k&&b)}function a(r,t,e){var n,a,u=r.modulecount,f=e.size/u,c=o;for(h&&e.radius>0&&e.radius<=.5&&(c=i),t.beginpath(),n=0;u>n;n+=1)for(a=0;u>a;a+=1){c(r,t,e,e.left+a*f,e.top+n*f,f,n,a)}if(s(e.fill).is("img")){t.strokestyle="rgba(0,0,0,0.5)",t.linewidth=2,t.stroke();var l=t.globalcompositeoperation;t.globalcompositeoperation="destination-out",t.fill(),t.globalcompositeoperation=l,t.clip(),t.drawimage(e.fill,0,0,e.size,e.size),t.restore()}else t.fillstyle=e.fill,t.fill()}function u(r,t){var o=e(t.text,t.eclevel,t.minversion,t.maxversion,t.quiet);if(!o)return null;var i=s(r).data("qrcode",o),u=i[0].getcontext("2d");return n(o,u,t),a(o,u,t),i}function f(r){return u(s("").attr("width",r.size).attr("height",r.size),r)}function c(r){return l&&"canvas"===r.render?f(r):l&&"image"===r.render?function(r){return s("").attr("src",f(r)[0].todataurl("image/png"))}(r):function(r){var t=e(r.text,r.eclevel,r.minversion,r.maxversion,r.quiet);if(!t)return null;var n,o,i=r.size,a=r.background,u=math.floor,f=t.modulecount,c=u(i/f),l=u(.5*(i-c*f)),h={position:"relative",left:0,top:0,padding:0,margin:0,width:i,height:i},g={position:"absolute",padding:0,margin:0,width:c,height:c,"background-color":r.fill},d=s("
").data("qrcode",t).css(h);for(a&&d.css("background-color",a),n=0;f>n;n+=1)for(o=0;f>o;o+=1)t.isdark(n,o)&&s("
").css(g).css({left:l+o*c,top:l+n*c}).appendto(d);return d}(r)}var s=jquery,l=function(){var r=document.createelement("canvas");return boolean(r.getcontext&&r.getcontext("2d"))}(),h="[object opera]"!==object.prototype.tostring.call(window.opera),g={render:"canvas",minversion:1,maxversion:40,eclevel:"l",left:0,top:0,size:200,fill:"#000",background:null,text:"no text",radius:0,quiet:0,mode:0,msize:.1,mposx:.5,mposy:.5,label:"no label",fontname:"sans",fontcolor:"#000",image:null};s.fn.qrcode=function(r){var t=s.extend({},g,r);return this.each(function(){"canvas"===this.nodename.tolowercase()?u(this,t):s(this).append(c(t))})}}(function(){var r=function(){function r(t,e){if(void 0===t.length)throw new error(t.length+"/"+e);var n=function(){for(var r=0;re;e+=1){t[e]=new array(r);for(var n=0;r>n;n+=1)t[e][n]=null}return t}(l=4*o+17),w(0,0),w(l-7,0),w(0,l-7),t(),m(),e(r,t),o>=7&&y(r),null==g&&(g=k(o,a,d)),a(g,t)},w=function(r,t){for(var e=-1;7>=e;e+=1)if(!(-1>=r+e||r+e>=l))for(var n=-1;7>=n;n+=1)-1>=t+n||t+n>=l||(s[r+e][t+n]=e>=0&&6>=e&&(0==n||6==n)||n>=0&&6>=n&&(0==e||6==e)||e>=2&&4>=e&&n>=2&&4>=n)},m=function(){for(var r=8;l-8>r;r+=1)null==s[r][6]&&(s[r][6]=r%2==0);for(var t=8;l-8>t;t+=1)null==s[6][t]&&(s[6][t]=t%2==0)},t=function(){for(var r=i.getpatternposition(o),t=0;t=u;u+=1)for(var f=-2;2>=f;f+=1)s[n+u][a+f]=-2==u||2==u||-2==f||2==f||0==u&&0==f}},y=function(r){for(var t=i.getbchtypenumber(o),e=0;18>e;e+=1){n=!r&&1==(t>>e&1);s[math.floor(e/3)][e%3+l-8-3]=n}for(e=0;18>e;e+=1){var n=!r&&1==(t>>e&1);s[e%3+l-8-3][math.floor(e/3)]=n}},e=function(r,t){for(var e=a<<3|t,n=i.getbchtypeinfo(e),o=0;15>o;o+=1){u=!r&&1==(n>>o&1);6>o?s[o][8]=u:8>o?s[o+1][8]=u:s[l-15+o][8]=u}for(o=0;15>o;o+=1){var u=!r&&1==(n>>o&1);8>o?s[8][l-o-1]=u:9>o?s[8][15-o-1+1]=u:s[8][15-o-1]=u}s[l-8][8]=!r},a=function(r,t){for(var e=-1,n=l-1,o=7,a=0,u=i.getmaskfunction(t),f=l-1;f>0;f-=2)for(6==f&&(f-=1);;){for(var c=0;2>c;c+=1)if(null==s[n][f-c]){var h=!1;a>>o&1));u(n,f-c)&&(h=!h),s[n][f-c]=h,-1==(o-=1)&&(a+=1,o=7)}if(0>(n+=e)||n>=l){n-=e,e=-e;break}}},b=function(t,e){for(var n=0,o=0,a=0,u=new array(e.length),f=new array(e.length),c=0;c=0?g.getat(d):0}}for(var v=0,p=0;pp;p+=1)for(c=0;cp;p+=1)for(c=0;c8*s)throw new error("code length overflow. ("+o.getlengthinbits()+">"+8*s+")");for(o.getlengthinbits()+4<=8*s&&o.put(0,4);o.getlengthinbits()%8!=0;)o.putbit(!1);for(;!(o.getlengthinbits()>=8*s)&&(o.put(236,8),!(o.getlengthinbits()>=8*s));)o.put(17,8);return b(o,n)};return v.adddata=function(r){var t=c(r);d.push(t),g=null},v.isdark=function(r,t){if(0>r||r>=l||0>t||t>=l)throw new error(r+","+t);return s[r][t]},v.getmodulecount=function(){return l},v.make=function(){p(!1,function(){for(var r=0,t=0,e=0;8>e;e+=1){p(!0,e);var n=i.getlostpoint(v);(0==e||r>n)&&(r=n,t=e)}return t}())},v.createtabletag=function(r,t){r=r||2;var e="";e+='',e+="";for(var n=0;n";for(var o=0;o';e+=""}return e+="",e+="
"},v.createimgtag=function(r,t){r=r||2,t=void 0===t?4*r:t;var e=v.getmodulecount()*r+2*t,n=t,o=e-t;return h(e,e,function(t,e){if(t>=n&&o>t&&e>=n&&o>e){var i=math.floor((t-n)/r),a=math.floor((e-n)/r);return v.isdark(a,i)?0:1}return 1})},v};t.stringtobytes=function(r){for(var t=new array,e=0;ei)t.push(i);else{var a=e[r.charat(o)];"number"==typeof a?(255&a)==a?t.push(a):(t.push(a>>>8),t.push(255&a)):t.push(n)}}return t}};var e={mode_number:1,mode_alpha_num:2,mode_8bit_byte:4,mode_kanji:8},n={l:1,m:0,q:3,h:2},o={pattern000:0,pattern001:1,pattern010:2,pattern011:3,pattern100:4,pattern101:5,pattern110:6,pattern111:7},i=function(){var t=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],n=1335,i=7973,u={},f=function(r){for(var t=0;0!=r;)t+=1,r>>>=1;return t};return u.getbchtypeinfo=function(r){for(var t=r<<10;f(t)-f(n)>=0;)t^=n<=0;)t^=i<n;n+=1)e=e.multiply(r([1,a.gexp(n)],0));return e},u.getlengthinbits=function(r,t){if(t>=1&&10>t)switch(r){case e.mode_number:return 10;case e.mode_alpha_num:return 9;case e.mode_8bit_byte:case e.mode_kanji:return 8;default:throw new error("mode:"+r)}else if(27>t)switch(r){case e.mode_number:return 12;case e.mode_alpha_num:return 11;case e.mode_8bit_byte:return 16;case e.mode_kanji:return 10;default:throw new error("mode:"+r)}else{if(!(41>t))throw new error("type:"+t);switch(r){case e.mode_number:return 14;case e.mode_alpha_num:return 13;case e.mode_8bit_byte:return 16;case e.mode_kanji:return 12;default:throw new error("mode:"+r)}}},u.getlostpoint=function(r){for(var t=r.getmodulecount(),e=0,n=0;t>n;n+=1)for(s=0;t>s;s+=1){for(var o=0,i=r.isdark(n,s),a=-1;1>=a;a+=1)if(!(0>n+a||n+a>=t))for(var u=-1;1>=u;u+=1)0>s+u||s+u>=t||(0!=a||0!=u)&&i==r.isdark(n+a,s+u)&&(o+=1);o>5&&(e+=3+o-5)}for(n=0;t-1>n;n+=1)for(s=0;t-1>s;s+=1){var f=0;r.isdark(n,s)&&(f+=1),r.isdark(n+1,s)&&(f+=1),r.isdark(n,s+1)&&(f+=1),r.isdark(n+1,s+1)&&(f+=1),(0==f||4==f)&&(e+=3)}for(n=0;t>n;n+=1)for(s=0;t-6>s;s+=1)r.isdark(n,s)&&!r.isdark(n,s+1)&&r.isdark(n,s+2)&&r.isdark(n,s+3)&&r.isdark(n,s+4)&&!r.isdark(n,s+5)&&r.isdark(n,s+6)&&(e+=40);for(s=0;t>s;s+=1)for(n=0;t-6>n;n+=1)r.isdark(n,s)&&!r.isdark(n+1,s)&&r.isdark(n+2,s)&&r.isdark(n+3,s)&&r.isdark(n+4,s)&&!r.isdark(n+5,s)&&r.isdark(n+6,s)&&(e+=40);for(var c=0,s=0;t>s;s+=1)for(n=0;t>n;n+=1)r.isdark(n,s)&&(c+=1);return e+=10*(math.abs(100*c/t/t-50)/5)},u}(),a=function(){for(var r=new array(256),t=new array(256),e=0;8>e;e+=1)r[e]=1<e;e+=1)r[e]=r[e-4]^r[e-5]^r[e-6]^r[e-8];for(e=0;255>e;e+=1)t[r[e]]=e;var n={};return n.glog=function(r){if(1>r)throw new error("glog("+r+")");return t[r]},n.gexp=function(t){for(;0>t;)t+=255;for(;t>=256;)t-=255;return r[t]},n}(),u=function(){var r=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12,7,37,13],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],t=function(r,t){var e={};return e.totalcount=r,e.datacount=t,e},e={},o=function(t,e){switch(e){case n.l:return r[4*(t-1)+0];case n.m:return r[4*(t-1)+1];case n.q:return r[4*(t-1)+2];case n.h:return r[4*(t-1)+3];default:return}};return e.getrsblocks=function(r,e){var n=o(r,e);if(void 0===n)throw new error("bad rs block @ typenumber:"+r+"/errorcorrectlevel:"+e);for(var i=n.length/3,a=new array,u=0;i>u;u+=1)for(var f=n[3*u+0],c=n[3*u+1],s=n[3*u+2],l=0;f>l;l+=1)a.push(t(c,s));return a},e}(),f=function(){var r=new array,t=0,e={};return e.getbuffer=function(){return r},e.getat=function(t){var e=math.floor(t/8);return 1==(r[e]>>>7-t%8&1)},e.put=function(r,t){for(var n=0;t>n;n+=1)e.putbit(1==(r>>>t-n-1&1))},e.getlengthinbits=function(){return t},e.putbit=function(e){var n=math.floor(t/8);r.length<=n&&r.push(0),e&&(r[n]|=128>>>t%8),t+=1},e},c=function(r){var n=e.mode_8bit_byte,o=t.stringtobytes(r),i={};return i.getmode=function(){return n},i.getlength=function(r){return o.length},i.write=function(r){for(var t=0;t>>8)},t.writebytes=function(r,e,n){e=e||0,n=n||r.length;for(var o=0;n>o;o+=1)t.writebyte(r[o+e])},t.writestring=function(r){for(var e=0;e0&&(t+=","),t+=r[e];return t+="]"},t},l=function(r){var t=r,e=0,n=0,o=0,i={};i.read=function(){for(;8>o;){if(e>=t.length){if(0==o)return-1;throw new error("unexpected end of file./"+o)}var r=t.charat(e);if(e+=1,"="==r)return o=0,-1;r.match(/^\s$/)||(n=n<<6|a(r.charcodeat(0)),o+=6)}var i=n>>>o-8&255;return o-=8,i};var a=function(r){if(r>=65&&90>=r)return r-65;if(r>=97&&122>=r)return r-97+26;if(r>=48&&57>=r)return r-48+52;if(43==r)return 62;if(47==r)return 63;throw new error("c:"+r)};return i},h=function(r,t,e,n){for(var o=function(r,t){var e=r,n=t,o=new array(r*t),i={};i.setpixel=function(r,t,n){o[t*e+r]=n},i.write=function(r){r.writestring("gif87a"),r.writeshort(e),r.writeshort(n),r.writebyte(128),r.writebyte(0),r.writebyte(0),r.writebyte(0),r.writebyte(0),r.writebyte(0),r.writebyte(255),r.writebyte(255),r.writebyte(255),r.writestring(","),r.writeshort(0),r.writeshort(0),r.writeshort(e),r.writeshort(n),r.writebyte(0);var t=a(2);r.writebyte(2);for(var o=0;t.length-o>255;)r.writebyte(255),r.writebytes(t,o,255),o+=255;r.writebyte(t.length-o),r.writebytes(t,o,t.length-o),r.writebyte(0),r.writestring(";")};var a=function(r){for(var t=1<a;a+=1)i.add(string.fromcharcode(a));i.add(string.fromcharcode(t)),i.add(string.fromcharcode(e));var f=s(),c=function(r){var t=f,e=0,n=0,o={};return o.write=function(r,o){if(r>>>o!=0)throw new error("length over");for(;e+o>=8;)t.writebyte(255&(r<>>=8-e,n=0,e=0;n|=r<0&&t.writebyte(n)},o}();c.write(t,n);var l=0,h=string.fromcharcode(o[l]);for(l+=1;li;i+=1)for(var a=0;r>a;a+=1)o.setpixel(a,i,e(a,i));var u=s();o.write(u);for(var f=function(){var r=0,t=0,e=0,n="",o={},i=function(r){n+=string.fromcharcode(a(63&r))},a=function(r){if(0>r);else{if(26>r)return 65+r;if(52>r)return r-26+97;if(62>r)return r-52+48;if(62==r)return 43;if(63==r)return 47}throw new error("n:"+r)};return o.writebyte=function(n){for(r=r<<8|255&n,t+=8,e+=1;t>=6;)i(r>>>t-6),t-=6},o.flush=function(){if(t>0&&(i(r<<6-t),r=0,t=0),e%3!=0)for(var o=3-e%3,a=0;o>a;a+=1)n+="="},o.tostring=function(){return n},o}(),c=u.tobytearray(),l=0;ln?t.push(n):2048>n?t.push(192|n>>6,128|63&n):55296>n||n>=57344?t.push(224|n>>12,128|n>>6&63,128|63&n):(e++,n=65536+((1023&n)<<10|1023&r.charcodeat(e)),t.push(240|n>>18,128|n>>12&63,128|n>>6&63,128|63&n))}return t}(r)}}(r),r}()),function(r){r.fn.share=function(t){function e(t,e){var n=function(t){0===t.mobilesites.length&&t.sites.length&&(t.mobilesites=t.sites);var e=(r(window).width()<=768?t.mobilesites:t.sites.length?t.sites:[]).slice(0),n=t.disabled;"string"==typeof e&&(e=e.split(/\s*,\s*/));"string"==typeof n&&(n=n.split(/\s*,\s*/));/micromessenger/i.test(navigator.useragent)&&n.push("wechat");return n.length&&r.each(n,function(t,n){var o=r.inarray(n,e);-1!==o&&e.splice(o,1)}),e}(e);"prepend"==e.mode&&n.reverse(),n.length&&r.each(n,function(n,o){var i=function(r,t){var e=a[r];t.summary=t.description;for(var n in t)if(t.hasownproperty(n)){var o=r+n.replace(/^[a-z]/,function(r){return r.touppercase()}),i=encodeuricomponent(void 0===t[o]?t[n]:t[o]);e=e.replace(new regexp("{{"+n.touppercase()+"}}","g"),i)}return e}(o,e),f=e.initialized?t.find(".icon-"+o):r('');if(!f.length)return!0;f.prop("aria-label","分享到 "+u[o]),f.prop("href",i),"wechat"===o?f.prop("tabindex",-1):f.prop("target","_blank"),e.initialized||("prepend"==e.mode?t.prepend(f):t.append(f))})}var n=r(document.head),o={url:location.href,site_url:location.origin,source:n.find("[name=site], [name=site]").attr("content")||document.title,title:n.find("[name=title], [name=title]").attr("content")||document.title,description:n.find("[name=description], [name=description]").attr("content")||"",image:r("img:first").prop("src")||"",imageselector:void 0,weibokey:"",wechatqrcodetitle:"微信扫一扫:分享",wechatqrcodehelper:"

微信里点“发现”,扫一下

二维码便可将本文分享至朋友圈。

",wechatqrcodesize:100,mobilesites:[],sites:["weibo","qq","wechat","tencent","douban","qzone","linkedin","diandian","facebook","twitter","google"],disabled:[],initialized:!1},i=r.extend({},o,t),a={qzone:"http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url={{url}}&title={{title}}&desc={{description}}&summary={{summary}}&site={{source}}",qq:"http://connect.qq.com/widget/shareqq/index.html?url={{url}}&title={{title}}&source={{source}}&desc={{description}}&pics={{image}}",tencent:"http://share.v.t.qq.com/index.php?c=share&a=index&title={{title}}&url={{url}}&pic={{image}}",weibo:"http://service.weibo.com/share/share.php?url={{url}}&title={{title}}&pic={{image}}&appkey={{weibokey}}",wechat:"javascript:;",douban:"http://shuo.douban.com/!service/share?href={{url}}&name={{title}}&text={{description}}&image={{image}}&starid=0&aid=0&style=11",diandian:"http://www.diandian.com/share?lo={{url}}&ti={{title}}&type=link",linkedin:"http://www.linkedin.com/sharearticle?mini=true&ro=true&title={{title}}&url={{url}}&summary={{summary}}&source={{source}}&armin=armin",facebook:"https://www.facebook.com/sharer/sharer.php?u={{url}}&title={{title}}&description={{description}}&caption={{subhead}}&link={{url}}&picture={{image}}",twitter:"https://twitter.com/intent/tweet?text={{title}}&url={{url}}&via={{site_url}}",google:"https://plus.google.com/share?url={{url}}"},u={qzone:"qq空间",qq:"qq",tencent:"腾讯微博",weibo:"微博",wechat:"微信",douban:"豆瓣",diandian:"点点",linkedin:"linkedin",facebook:"facebook",twitter:"twitter",google:"google"};this.each(function(){if(r(this).data("initialized"))return!0;var t=r.extend({},i,r(this).data());t.imageselector&&(t.image=r(t.imageselector).map(function(){return r(this).prop("src")}).get().join("||"));var n=r(this).addclass("share-component social-share");e(n,t),function(r,t){var e=r.find("a.icon-wechat");e.length&&(e.append('

'+t.wechatqrcodetitle+'

'+t.wechatqrcodehelper+"
"),e.find(".qrcode").qrcode({render:"image",size:t.wechatqrcodesize,text:t.url}),e.offset().top<100&&e.find(".wechat-qrcode").addclass("bottom"))}(n,t),r(this).data("initialized",!0)})},r(function(){r(".share-component,.social-share").share()})}(jquery);