cn.status.im/js/app.js

4 lines
99 KiB
JavaScript
Raw Normal View History

2017-08-21 21:55:38 +00:00
"use strict";var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};!function e(t,n,r){function o(a,u){if(!n[a]){if(!t[a]){var c="function"==typeof require&&require;if(!u&&c)return c(a,!0);if(i)return i(a,!0);var f=new Error("Cannot find module '"+a+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[a]={exports:{}};t[a][0].call(l.exports,function(e){var n=t[a][1][e];return o(n?n:e)},l,l.exports,e,t,n,r)}return n[a].exports}for(var i="function"==typeof require&&require,a=0;a<r.length;a++)o(r[a]);return o}({1:[function(e,t,n){!function(e,r){"object"===("undefined"==typeof n?"undefined":_typeof(n))&&"undefined"!=typeof t?r(n):"function"==typeof define&&define.amd?define(["exports"],r):r(e.d3=e.d3||{})}(this,function(e){function t(e){return function(t,n){return a(e(t),n)}}function n(e,t){return[e,t]}function r(e,t,n){var r=(t-e)/Math.max(0,n),o=Math.floor(Math.log(r)/Math.LN10),i=r/Math.pow(10,o);return o>=0?(i>=j?10:i>=S?5:i>=O?2:1)*Math.pow(10,o):-Math.pow(10,-o)/(i>=j?10:i>=S?5:i>=O?2:1)}function o(e,t,n){var r=Math.abs(t-e)/Math.max(0,n),o=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),i=r/o;return i>=j?o*=10:i>=S?o*=5:i>=O&&(o*=2),t<e?-o:o}function i(e){return e.length}var a=function(e,t){return e<t?-1:e>t?1:e>=t?0:NaN},u=function(e){return 1===e.length&&(e=t(e)),{left:function(t,n,r,o){for(null==r&&(r=0),null==o&&(o=t.length);r<o;){var i=r+o>>>1;e(t[i],n)<0?r=i+1:o=i}return r},right:function(t,n,r,o){for(null==r&&(r=0),null==o&&(o=t.length);r<o;){var i=r+o>>>1;e(t[i],n)>0?o=i:r=i+1}return r}}},c=u(a),f=c.right,l=c.left,s=function R(e,t){null==t&&(t=n);for(var r=0,o=e.length-1,i=e[0],R=new Array(o<0?0:o);r<o;)R[r]=t(i,i=e[++r]);return R},d=function(e,t,r){var o,i,a,u,c=e.length,f=t.length,l=new Array(c*f);for(null==r&&(r=n),o=a=0;o<c;++o)for(u=e[o],i=0;i<f;++i,++a)l[a]=r(u,t[i]);return l},h=function(e,t){return t<e?-1:t>e?1:t>=e?0:NaN},p=function(e){return null===e?NaN:+e},b=function(e,t){var n,r,o=e.length,i=0,a=-1,u=0,c=0;if(null==t)for(;++a<o;)isNaN(n=p(e[a]))||(r=n-u,u+=r/++i,c+=r*(n-u));else for(;++a<o;)isNaN(n=p(t(e[a],a,e)))||(r=n-u,u+=r/++i,c+=r*(n-u));if(i>1)return c/(i-1)},g=function(e,t){var n=b(e,t);return n?Math.sqrt(n):n},y=function(e,t){var n,r,o,i=e.length,a=-1;if(null==t){for(;++a<i;)if(null!=(n=e[a])&&n>=n)for(r=o=n;++a<i;)null!=(n=e[a])&&(r>n&&(r=n),o<n&&(o=n))}else for(;++a<i;)if(null!=(n=t(e[a],a,e))&&n>=n)for(r=o=n;++a<i;)null!=(n=t(e[a],a,e))&&(r>n&&(r=n),o<n&&(o=n));return[r,o]},v=Array.prototype,m=v.slice,w=v.map,M=function(e){return function(){return e}},_=function(e){return e},x=function B(e,t,n){e=+e,t=+t,n=(o=arguments.length)<2?(t=e,e=0,1):o<3?1:+n;for(var r=-1,o=0|Math.max(0,Math.ceil((t-e)/n)),B=new Array(o);++r<o;)B[r]=e+r*n;return B},j=Math.sqrt(50),S=Math.sqrt(10),O=Math.sqrt(2),k=function W(e,t,n){var o,W,i,a=t<e,u=-1;if(a&&(o=e,e=t,t=o),0===(i=r(e,t,n))||!isFinite(i))return[];if(i>0)for(e=Math.ceil(e/i),t=Math.floor(t/i),W=new Array(o=Math.ceil(t-e+1));++u<o;)W[u]=(e+u)*i;else for(e=Math.floor(e*i),t=Math.ceil(t*i),W=new Array(o=Math.ceil(e-t+1));++u<o;)W[u]=(e-u)/i;return a&&W.reverse(),W},A=function(e){return Math.ceil(Math.log(e.length)/Math.LN2)+1},T=function X(){function X(r){var i,a,u=r.length,c=new Array(u);for(i=0;i<u;++i)c[i]=e(r[i],i,r);var l=t(c),s=l[0],d=l[1],h=n(c,s,d);Array.isArray(h)||(h=o(s,d,h),h=x(Math.ceil(s/h)*h,Math.floor(d/h)*h,h));for(var p=h.length;h[0]<=s;)h.shift(),--p;for(;h[p-1]>d;)h.pop(),--p;var b,g=new Array(p+1);for(i=0;i<=p;++i)b=g[i]=[],b.x0=i>0?h[i-1]:s,b.x1=i<p?h[i]:d;for(i=0;i<u;++i)a=c[i],s<=a&&a<=d&&g[f(h,a,0,p)].push(r[i]);return g}var e=_,t=y,n=A;return X.value=function(t){return arguments.length?(e="function"==typeof t?t:M(t),X):e},X.domain=function(e){return arguments.length?(t="function"==typeof e?e:M([e[0],e[1]]),X):t},X.thresholds=function(e){return arguments.length?(n="function"==typeof e?e:M(Array.isArray(e)?m.call(e):e),X):n},X},C=function(e,t,n){if(null==n&&(n=p),r=e.length){if((t=
},q=function(e,t){return e=+e,t-=e,function(n){return Math.round(e+t*n)}},L=180/Math.PI,z={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},H=function(e,t,n,r,o,i){var a,u,c;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(c=e*n+t*r)&&(n-=e*c,r-=t*c),(u=Math.sqrt(n*n+r*r))&&(n/=u,r/=u,c/=u),e*r<t*n&&(e=-e,t=-t,c=-c,a=-a),{translateX:o,translateY:i,rotate:Math.atan2(t,e)*L,skewX:Math.atan(c)*L,scaleX:a,scaleY:u}},$=h(s,"px, ","px)","deg)"),R=h(d,", ",")",")"),B=Math.SQRT2,W=2,X=4,V=1e-12,Q=function(e,t){var n,r,o=e[0],i=e[1],a=e[2],u=t[0],c=t[1],f=t[2],l=u-o,s=c-i,d=l*l+s*s;if(d<V)r=Math.log(f/a)/B,n=function(e){return[o+e*l,i+e*s,a*Math.exp(B*e*r)]};else{var h=Math.sqrt(d),y=(f*f-a*a+X*d)/(2*a*W*h),v=(f*f-a*a-X*d)/(2*f*W*h),m=Math.log(Math.sqrt(y*y+1)-y),w=Math.log(Math.sqrt(v*v+1)-v);r=(w-m)/B,n=function(e){var t=e*r,n=p(m),u=a/(W*h)*(n*g(B*t+m)-b(m));return[o+u*l,i+u*s,a*n/p(B*t+m)]}}return n.duration=1e3*r,n},Z=y(i),G=y(u),J=m(i),K=m(u),ee=w(i),te=w(u),ne=function(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e(r/(t-1));return n};e.interpolate=P,e.interpolateArray=N,e.interpolateBasis=S,e.interpolateBasisClosed=O,e.interpolateDate=F,e.interpolateNumber=D,e.interpolateObject=E,e.interpolateRound=q,e.interpolateString=U,e.interpolateTransformCss=$,e.interpolateTransformSvg=R,e.interpolateZoom=Q,e.interpolateRgb=A,e.interpolateRgbBasis=T,e.interpolateRgbBasisClosed=C,e.interpolateHsl=Z,e.interpolateHslLong=G,e.interpolateLab=v,e.interpolateHcl=J,e.interpolateHclLong=K,e.interpolateCubehelix=ee,e.interpolateCubehelixLong=te,e.quantize=ne,Object.defineProperty(e,"__esModule",{value:!0})})},{"d3-color":3}],7:[function(e,t,n){!function(r,o){"object"===("undefined"==typeof n?"undefined":_typeof(n))&&"undefined"!=typeof t?o(n,e("d3-array"),e("d3-collection"),e("d3-interpolate"),e("d3-format"),e("d3-time"),e("d3-time-format"),e("d3-color")):"function"==typeof define&&define.amd?define(["exports","d3-array","d3-collection","d3-interpolate","d3-format","d3-time","d3-time-format","d3-color"],o):o(r.d3=r.d3||{},r.d3,r.d3,r.d3,r.d3,r.d3,r.d3,r.d3)}(this,function(e,t,n,r,o,i,a,u){function c(e){function t(t){var n=t+"",a=r.get(n);if(!a){if(i!==$)return i;r.set(n,a=o.push(t))}return e[(a-1)%e.length]}var r=n.map(),o=[],i=$;return e=null==e?[]:H.call(e),t.domain=function(e){if(!arguments.length)return o.slice();o=[],r=n.map();for(var i,a,u=-1,c=e.length;++u<c;)r.has(a=(i=e[u])+"")||r.set(a,o.push(i));return t},t.range=function(n){return arguments.length?(e=H.call(n),t):e.slice()},t.unknown=function(e){return arguments.length?(i=e,t):i},t.copy=function(){return c().domain(o).range(e).unknown(i)},t}function f(){function e(){var e=i().length,o=u[1]<u[0],c=u[o-0],f=u[1-o];n=(f-c)/Math.max(1,e-s+2*d),l&&(n=Math.floor(n)),c+=(f-c-n*(e-s))*h,r=n*(1-s),l&&(c=Math.round(c),r=Math.round(r));var p=t.range(e).map(function(e){return c+n*e});return a(o?p.reverse():p)}var n,r,o=c().unknown(void 0),i=o.domain,a=o.range,u=[0,1],l=!1,s=0,d=0,h=.5;return delete o.unknown,o.domain=function(t){return arguments.length?(i(t),e()):i()},o.range=function(t){return arguments.length?(u=[+t[0],+t[1]],e()):u.slice()},o.rangeRound=function(t){return u=[+t[0],+t[1]],l=!0,e()},o.bandwidth=function(){return r},o.step=function(){return n},o.round=function(t){return arguments.length?(l=!!t,e()):l},o.padding=function(t){return arguments.length?(s=d=Math.max(0,Math.min(1,t)),e()):s},o.paddingInner=function(t){return arguments.length?(s=Math.max(0,Math.min(1,t)),e()):s},o.paddingOuter=function(t){return arguments.length?(d=Math.max(0,Math.min(1,t)),e()):d},o.align=function(t){return arguments.length?(h=Math.max(0,Math.min(1,t)),e()):h},o.copy=function(){return f().domain(i()).range(u).round(l).paddingInner(s).paddingOuter(d).align(h)},e()}function l(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return l(t())},e}function s(){return l(f().paddingInner(1))}function d(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:R(t)}function h(e){return function(t,n){var r=e(t=+t,n=+n);return function(e){return e<=t?0:e>=
},function(e,t){return t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear())},function(e){return e.getUTCMonth()}),ae=ie.range,ue=t(function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)},function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()},function(e){return e.getUTCFullYear()});ue.every=function(e){return isFinite(e=Math.floor(e))&&e>0?t(function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n*e)}):null};var ce=ue.range;e.timeInterval=t,e.timeMillisecond=a,e.timeMilliseconds=u,e.utcMillisecond=a,e.utcMilliseconds=u,e.timeSecond=h,e.timeSeconds=p,e.utcSecond=h,e.utcSeconds=p,e.timeMinute=b,e.timeMinutes=g,e.timeHour=y,e.timeHours=v,e.timeDay=m,e.timeDays=w,e.timeWeek=M,e.timeWeeks=A,e.timeSunday=M,e.timeSundays=A,e.timeMonday=_,e.timeMondays=T,e.timeTuesday=x,e.timeTuesdays=C,e.timeWednesday=j,e.timeWednesdays=N,e.timeThursday=S,e.timeThursdays=F,e.timeFriday=O,e.timeFridays=D,e.timeSaturday=k,e.timeSaturdays=E,e.timeMonth=Y,e.timeMonths=I,e.timeYear=U,e.timeYears=P,e.utcMinute=q,e.utcMinutes=L,e.utcHour=z,e.utcHours=H,e.utcDay=$,e.utcDays=R,e.utcWeek=B,e.utcWeeks=J,e.utcSunday=B,e.utcSundays=J,e.utcMonday=W,e.utcMondays=K,e.utcTuesday=X,e.utcTuesdays=ee,e.utcWednesday=V,e.utcWednesdays=te,e.utcThursday=Q,e.utcThursdays=ne,e.utcFriday=Z,e.utcFridays=re,e.utcSaturday=G,e.utcSaturdays=oe,e.utcMonth=ie,e.utcMonths=ae,e.utcYear=ue,e.utcYears=ce,Object.defineProperty(e,"__esModule",{value:!0})})},{}],10:[function(e,t,n){function r(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function o(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function i(e,t){return function(n){return e(t(n))}}function a(e,t){var n=I(e)||g(e)?o(e.length,String):[],r=n.length,i=!!r;for(var a in e)!t&&!C.call(e,a)||i&&("length"==a||d(a,r))||n.push(a);return n}function u(e,t,n){var r=e[t];C.call(e,t)&&b(r,n)&&(void 0!==n||t in e)||(e[t]=n)}function c(e){if(!p(e))return D(e);var t=[];for(var n in Object(e))C.call(e,n)&&"constructor"!=n&&t.push(n);return t}function f(e,t){return t=E(void 0===t?e.length-1:t,0),function(){for(var n=arguments,o=-1,i=E(n.length-t,0),a=Array(i);++o<i;)a[o]=n[t+o];o=-1;for(var u=Array(t+1);++o<t;)u[o]=n[o];return u[t]=a,r(e,this,u)}}function l(e,t,n,r){n||(n={});for(var o=-1,i=t.length;++o<i;){var a=t[o],c=r?r(n[a],e[a],a,n,e):void 0;u(n,a,void 0===c?e[a]:c)}return n}function s(e){return f(function(t,n){var r=-1,o=n.length,i=o>1?n[o-1]:void 0,a=o>2?n[2]:void 0;for(i=e.length>3&&"function"==typeof i?(o--,i):void 0,a&&h(n[0],n[1],a)&&(i=o<3?void 0:i,o=1),t=Object(t);++r<o;){var u=n[r];u&&e(t,u,r,i)}return t})}function d(e,t){return t=null==t?j:t,!!t&&("number"==typeof e||A.test(e))&&e>-1&&e%1==0&&e<t}function h(e,t,n){if(!M(n))return!1;var r="undefined"==typeof t?"undefined":_typeof(t);return!!("number"==r?y(n)&&d(t,n.length):"string"==r&&t in n)&&b(n[t],e)}function p(e){var t=e&&e.constructor,n="function"==typeof t&&t.prototype||T;return e===n}function b(e,t){return e===t||e!==e&&t!==t}function g(e){return v(e)&&C.call(e,"callee")&&(!F.call(e,"callee")||N.call(e)==S)}function y(e){return null!=e&&w(e.length)&&!m(e)}function v(e){return _(e)&&y(e)}function m(e){var t=M(e)?N.call(e):"";return t==O||t==k}function w(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=j}function M(e){var t="undefined"==typeof e?"undefined":_typeof(e);return!!e&&("object"==t||"function"==t)}function _(e){return!!e&&"object"==("undefined"==typeof e?"undefined":_typeof(e))}function x(e){return y(e)?a(e):c(e)}var j=9007199254740991,S="[object Arguments]",O="[object Function]",k="[object GeneratorFunction]",A=/^(?:0|[1-9]\d*)$/,T=Object.prototype,C=T.hasOwnProperty,N=T.toString,F=T.propertyIsEnumerable,D=i(Object.keys,Object),E=Math.max,Y=!F.call({valueOf:1},"valueOf"),I=Array.isArray,U=s(function(e,t){if(Y||p(t)||y(t))return void l(t,x(t),e);for(var n
e.property==o&&(r[o]=n.scaleValue(e.scale,t))})}),r},scaleValue:function(e,t){return e(t)},updateCSSValues:function(e,t){return e.style.transform="translate3d("+t.translateX+"px, "+t.translateY+"px, 0) scale("+t.scale+")",e.style.opacity=t.opacity,e},updateCSSClass:function(e,t){return e.classList?e.classList.add(t):e.className+=" "+t,e},getDefaultPropertyValue:function(e){switch(e){case"translateX":return 0;case"translateY":return 0;case"scale":return 1;case"rotate":return 0;case"opacity":return 1;default:return null}},createScale:function(e,t,n){switch(e){case"translateX":case"translateY":case"scale":case"opacity":return u.scaleLinear().domain(t).range(n).interpolate(this.easeInterpolate(f.easeCubicOut)).clamp(!0);default:return null}},easeInterpolate:function(e){return function(t,n){var r=c.interpolate(t,n);return function(t){return Math.round(100*r(e(t)))/100}}}},r.options={keyframes:{}},t.exports=r},{"./Scrllr.js":16,"d3-ease":4,"d3-interpolate":6,"d3-scale":7}],18:[function(e,t,n){function r(e,t,n,o,i,a){o=o?o:0;var u=document.documentElement,c=u.clientHeight,f="scrollMaxY"in window?window.scrollMaxY:u.scrollHeight-c,l=window.pageYOffset,s=l,d=isNaN(e)?e.getBoundingClientRect():0;"center"===i?(s+=isNaN(e)?d.top+d.height/2:e,s-=c/2,s-=o):"bottom"===i?(s+=d.bottom||e,s-=c,s+=o):(s+=d.top||e,s-=o),s=Math.max(Math.min(f,s),0);var h=s-l,p={targetY:s,deltaY:h,duration:t?t:0,easing:n in r.Easing?r.Easing[n]:r.Easing.linear,onFinish:a,startTime:Date.now(),lastY:l,step:r.step};window.requestAnimationFrame(p.step.bind(p))}r.Easing={linear:function(e){return e},easeInQuad:function(e){return e*e},easeOutQuad:function(e){return e*(2-e)},easeInOutQuad:function(e){return e<.5?2*e*e:-1+(4-2*e)*e},easeInCubic:function(e){return e*e*e},easeOutCubic:function(e){return--e*e*e+1},easeInOutCubic:function(e){return e<.5?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1},easeInQuart:function(e){return e*e*e*e},easeOutQuart:function(e){return 1- --e*e*e*e},easeInOutQuart:function(e){return e<.5?8*e*e*e*e:1-8*--e*e*e*e},easeInQuint:function(e){return e*e*e*e*e},easeOutQuint:function(e){return 1+--e*e*e*e*e},easeInOutQuint:function(e){return e<.5?16*e*e*e*e*e:1+16*--e*e*e*e*e}},r.step=function(){if(this.lastY!==window.pageYOffset&&this.onFinish)return void this.onFinish();var e=Math.min((Date.now()-this.startTime)/this.duration,1),t=this.targetY-(1-this.easing(e))*this.deltaY;window.scrollTo(window.scrollX,t),1!==e?(this.lastY=window.pageYOffset,window.requestAnimationFrame(this.step.bind(this))):this.onFinish&&this.onFinish()},t.exports=r},{}],19:[function(e,t,n){function r(){i(document.querySelectorAll(".qr-popup")[0],"qr-popup--shown")}function o(){a(document.querySelectorAll(".qr-popup")[0],"qr-popup--shown")}function i(e,t){return e.classList?e.classList.add(t):e.className+=" "+t,e}function a(e,t){return e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp("(^|\\b)"+t.split(" ").join("|")+"(\\b|$)","gi")," "),e}var u=e("./lib/ScrollOver.js"),c=e("./lib/animatescroll.js"),f=document.querySelectorAll("body")[0],l=(document.querySelectorAll(".tagline")[0],document.querySelectorAll(".phone-wrap--iphone")[0]),s=document.querySelectorAll(".phone-wrap--android")[0],d=document.querySelectorAll(".features-wrap")[0],h=document.querySelectorAll(".slide--two")[0],p=document.querySelectorAll(".slide--three")[0],b=document.querySelectorAll(".slide--six")[0],g=document.querySelectorAll(".language-switcher")[0];setTimeout(function(){return f.classList.add("shown")},400),document.querySelectorAll(".button--more")[0].addEventListener("click",function(e){c(h,600,"easeInOutCubic",0),e.preventDefault()}),document.querySelectorAll(".nav__item--features")[0].addEventListener("click",function(e){c(h,600,"easeInOutCubic",0),e.preventDefault()}),document.querySelectorAll(".nav__item--about")[0].addEventListener("click",function(e){c(p,600,"easeInOutCubic",0),e.preventDefault()}),new u({keyframes:[{element:l,domain:[0,800],animate:[{property:"translateY",range:[0,60]}]},{element:s,domain:[0,800],animate:[{property:"translateY",range:[0,110]}]},{element:d,d