├── .babelrc ├── .eslintrc.json ├── .gitignore ├── .travis.yml ├── .vscode └── settings.json ├── FullpageReact.js ├── FullpageReact.js.map ├── README.md ├── __tests__ ├── Fullpage.js └── __snapshots__ │ └── Fullpage.js.snap ├── examples ├── exampleStyles.styl ├── fullpageReactExample.js ├── index.js ├── normalize.css └── skeleton.css ├── jest.config.js ├── jest ├── setup.js └── transform.js ├── lib ├── components │ ├── Fullpage.js │ ├── HorizontalSlider.js │ └── Slide.js ├── index.js └── utils │ ├── constants.js │ ├── detectOS.js │ ├── index.js │ ├── renderUtils.js │ └── scrollTo.js ├── package-lock.json ├── package.json └── webpack.config.js /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "plugins": [ 3 | 4 | ], 5 | "presets": [ 6 | [ 7 | "env", 8 | { 9 | "modules": false, 10 | "targets": { 11 | "browsers": [ 12 | "last 2 versions", 13 | "Explorer >= 10", 14 | "iOS >= 8.3" 15 | ] 16 | } 17 | } 18 | ], 19 | "react" 20 | ] 21 | } 22 | -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "es6": true, 4 | "node": true, 5 | "browser": true 6 | }, 7 | "extends": ["eslint:recommended", "plugin:react/recommended"], 8 | "installedESLint": true, 9 | "parserOptions": { 10 | "ecmaVersion": 6, 11 | "ecmaFeatures": { 12 | "experimentalObjectRestSpread": true, 13 | "jsx": true 14 | }, 15 | "sourceType": "module" 16 | }, 17 | "plugins": [ 18 | "react" 19 | ], 20 | "globals": { 21 | 22 | }, 23 | "rules": { 24 | "indent": [ 25 | 0, 26 | "tab" 27 | ], 28 | "linebreak-style": [ 29 | "error", 30 | "unix" 31 | ], 32 | "quotes": [ 33 | "error", 34 | "single" 35 | ], 36 | "semi": [ 37 | 0, 38 | "never" 39 | ], 40 | "curly": 2, 41 | "dot-notation": 0, 42 | "comma-style": [ 43 | 2, 44 | "last" 45 | ], 46 | "no-unused-expressions": 2, 47 | "no-unused-vars": [ 48 | "error", 49 | { 50 | "vars": "all", 51 | "args": "after-used", 52 | "varsIgnorePattern": "config|MRError" 53 | } 54 | ], 55 | "no-trailing-spaces": "error", 56 | "brace-style": "error", 57 | "keyword-spacing": ["error", { "after": true, "before": true }], 58 | "comma-dangle": ["error", "never"], 59 | "no-console": ["error", {"allow": ["warn", "error", "origin"]}], 60 | "no-debugger": "error", 61 | "no-unreachable": "error", 62 | "no-dupe-args": "error", 63 | "no-dupe-keys": "error", 64 | "no-func-assign": "error", 65 | "no-sparse-arrays": "error", 66 | "space-before-blocks": "error" 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | .DS_Store 3 | yarn.lock 4 | npm-debug.* 5 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | sudo: false 3 | node_js: 4 | - 8.9.1 5 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "vsicons.presets.angular": true 3 | } -------------------------------------------------------------------------------- /FullpageReact.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap 55a81816c24b764a65f0","webpack:///./~/process/browser.js","webpack:///external \"react\"","webpack:///./lib/components/Slide.js","webpack:///./~/fbjs/lib/emptyFunction.js","webpack:///./~/fbjs/lib/invariant.js","webpack:///./~/prop-types/lib/ReactPropTypesSecret.js","webpack:///./lib/components/HorizontalSlider.js","webpack:///./lib/utils/index.js","webpack:///./~/fbjs/lib/warning.js","webpack:///./lib/components/Fullpage.js","webpack:///./lib/index.js","webpack:///./lib/utils/constants.js","webpack:///./lib/utils/detectOS.js","webpack:///./lib/utils/renderUtils.js","webpack:///./lib/utils/scrollTo.js","webpack:///./~/json2mq/index.js","webpack:///./~/object-assign/index.js","webpack:///./~/prop-types/checkPropTypes.js","webpack:///./~/prop-types/factoryWithThrowingShims.js","webpack:///./~/prop-types/factoryWithTypeCheckers.js","webpack:///./~/prop-types/index.js","webpack:///./~/react-fns/dist/index.es6.js","webpack:///./~/react-media/Media.js","webpack:///./~/react-media/index.js","webpack:///./~/scroll-swipe/dist/ScrollSwipe.js","webpack:///./~/string-convert/camel2hyphen.js","webpack:///(webpack)/buildin/global.js","webpack:///./~/window-or-global/lib/index.js"],"names":["HorizontalSlide","VerticalSlide","Slide","id","render","className","width","height","horizontal","horizontalSliderName","children","style","slideStyle","styles","Object","assign","overflow","position","slideClassName","push","join","attrs","HorizontalSlider","props","name","activeSlide","document","cache","nodes","getNodes","hideAllButActive","p","Error","elements","slides","reduce","result","sl","type","other","overflowX","hideScrollBars","overflowY","horizontalSliderStyle","whiteSpace","padding","margin","horizontalSlideStyle","display","node","map","o","i","s","sStyle","hSlideProps","React","Component","composedPath","el","paths","tagName","window","parentElement","sel","querySelectorAll","Array","prototype","forEach","call","n","showAll","INTENT_MAP","detectBrowser","userAgentString","browsers","rule","test","match","exec","version","split","slice","length","apply","os","detectOS","filter","Boolean","shift","noOp","KEY_IDX","_fp","global","TIMEOUT","documentStub","documentElement","body","generateState","lastActive","Fullpage","infinite","resetSlides","horizontalMap","horizontals","scrollSensitivity","touchSensitivity","scrollSpeed","ss","verticalRoot","determineVerticalRoot","onHorizontalChange","onSlideChangeStart","onSlideChangeEnd","f","bind","isLocked","hSlideCache","cacheHslide","slide","state","scrollPending","setState","lockScroll","checkKey","enableArrowKeys","addEventListener","target","scrollPreventDefault","touchPreventDefault","scrollCb","onScrollAction","touchCb","direction","intent","startEvent","ssStub","flush","listen","dir","onVerticalScroll","path","polyFillPath","isHorizontal","find","dataset","onHorizontalScroll","next","to","innerHeight","newState","handleScroll","innerWidth","comp","hp","leftVal","determineHSlide","setTimeout","handleHorizontal","len","infStart","infEnd","lastToFirst","scrollLeft","firstToLast","winProp","compName","cb","cancellable","scrollTo","killAll","removeEventListener","showScrollBars","e","keyCode","context","changeFullpageSlide","horizontalName","changeHorizontalSlide","scrollTop","op","sp","eligible","isEligible","idx","swap","parentNode","insertBefore","userAgent","platform","navigator","browser","major","minor","patch","docElementSet","Set","conflictingPlatforms","has","INCREMENT","DECREMENT","VERTICAL","HORIZONTAL","HEAD","TAIL","I_BLOCK","BLOCK","NONE","module","exports","operatingSystems","detected","element","elementBoundary","duration","callback","start","change","increment","currentTime","globalId","requestAnimationFrame","repeatOften","val","easeInOutQuad","cancelAnimationFrame","t","b","c","d"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA,mDAA2C,cAAc;;AAEzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;AAEA;AACA;;;;;;;AChEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;;;AAIA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AAC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AuB;AACrBH,mBAAeD,SAAf;AACA,QAAIK,MAAMC,cAAcL,WAAd,EAA2BH,KAA3B,EAAkCC,MAAlC,EAA0CH,QAA1C,CAAV;AACAF,YAAQC,eAAR,IAA2BU,GAA3B;;AAEA,QAAIJ,eAAeL,QAAnB,EAA6B;AAC3BW,2BAAqBL,QAArB;AACA,aAAOL,UAAP;AACD;AACDK,eAAWC,sBAAsBC,WAAtB,CAAX;AACD;AACF;;AAED;AACA;AACA;AACA;AACA,IAAME,gBAAgB,SAAhBA,aAAgB,CAACE,CAAD,EAAIC,CAAJ,EAAOC,CAAP,EAAUC,CAAV,EAAgB;AACpCH,OAAKG,CAAL;AACD,SAAO,CAACD,CAAD,GAAKF,CAAL,IAAQA,IAAE,CAAV,IAAeC,CAAtB;AACA,CAHD;;AAKA,yDAAe1D,QAAf,E;;;;;;AC7BA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA,yB;;;;;;;AClDA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,gCAAgC;AAChC;AACA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB,QAAQ;AACzB;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH,kCAAkC;AAClC;AACA;AACA;;AAEA;AACA,EAAE;AACF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,gBAAgB,sBAAsB;AACtC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,oBAAoB;AACtC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;ACzFA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gGAAgG;AAChG;AACA,SAAS;AACT;AACA;AACA,gGAAgG;AAChG;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;AC1DA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;;ACzDA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,0CAA0C;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,6BAA6B;AAC7B,QAAQ;AACR;AACA;AACA;AACA;AACA,+BAA+B,KAAK;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,4BAA4B;AAC5B,OAAO;AACP;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,sBAAsB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,qBAAqB,2BAA2B;AAChD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,mBAAmB,gCAAgC;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qBAAqB,gCAAgC;AACrD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;;AC7hBA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;AC3B6C;;AAE7C;AACA;AACA,+DAA+D;AAC/D;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,MAAM,gBAAgB,sCAAsC,iBAAiB,EAAE;AAC/E,qBAAqB,uDAAuD;;AAE5E;AACA;AACA,mBAAmB,sBAAsB;AACzC;AACA;;AAEA;AACA,4CAA4C,OAAO;AACnD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,wBAAwB;AACxB;AACA,uCAAuC;AACvC;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA,WAAW;;AAEX;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA,4BAA4B,uCAAuC;AACnE,SAAS;AACT;AACA;AACA;AACA;AACA,8FAA8F,gBAAgB;AAC9G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,iBAAiB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,qGAAuC,uBAAuB,6GAA+C,aAAa,EAAE,EAAE;AAC9H;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA,2GAA6C,uBAAuB,6GAA+C,aAAa,EAAE,EAAE;AACpI;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA,gHAAkD,uBAAuB,6GAA+C,aAAa,EAAE,EAAE;AACzI;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA,4BAA4B,qCAAqC;AACjE;AACA;AACA,4BAA4B,uCAAuC;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA,sGAAwC,uBAAuB,6GAA+C,aAAa,EAAE,EAAE;AAC/H;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,kBAAkB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,iBAAiB;AACjB,aAAa,oBAAoB,wBAAwB,iCAAiC,EAAE,EAAE;AAC9F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA,0GAA4C,uBAAuB,6GAA+C,aAAa,EAAE,EAAE;AACnI;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA,4BAA4B,uDAAuD;AACnF,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA,UAAU;AACV;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,GAAG;;AAEH,UAAU;AACV;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;;AChbD;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;;AAEA,8B;;;;;;ACRA;;AAEA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;;AAEA;AACA;AACA,4CAA4C;;AAE5C;;;;;;;;8CCpBA;AACA;AACA;AACA","file":"FullpageReact.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"react\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"FullpageReact\", [\"react\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"FullpageReact\"] = factory(require(\"react\"));\n\telse\n\t\troot[\"FullpageReact\"] = factory(root[\"react\"]);\n})(this, function(__WEBPACK_EXTERNAL_MODULE_1__) {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// identity function for calling harmony imports with the correct context\n \t__webpack_require__.i = function(value) { return value; };\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 10);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 55a81816c24b764a65f0","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/process/browser.js\n// module id = 0\n// module chunks = 0","module.exports = __WEBPACK_EXTERNAL_MODULE_1__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"react\"\n// module id = 1\n// module chunks = 0","import React from 'react';\n\nconst HorizontalSlide = 'HorizontalSlide';\nconst VerticalSlide = 'VerticalSlide';\n\nconst Slide = ({ id, render, className, width, height, horizontal, horizontalSliderName, children, style }) => {\n if (!render) {\n return null;\n }\n\n const slideStyle = style || {};\n\n const styles = Object.assign({\n overflow: 'hidden', width: `${width}px`, height: `${height}px`, position: 'relative'\n }, slideStyle);\n\n let slideClassName = horizontal ? [HorizontalSlide] : [VerticalSlide];\n if (className) {\n slideClassName.push(className);\n }\n slideClassName = slideClassName.join(' ');\n\n const attrs = {\n 'data-slide': horizontal ? HorizontalSlide : VerticalSlide,\n 'data-horizontal-slider': horizontalSliderName || null\n };\n\n return (\n
\n {children}\n
\n );\n}\n\nexport default Slide;\n\n\n\n// WEBPACK FOOTER //\n// ./lib/components/Slide.js","\"use strict\";\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\n\nfunction makeEmptyFunction(arg) {\n return function () {\n return arg;\n };\n}\n\n/**\n * This function accepts and discards inputs; it has no side effects. This is\n * primarily useful idiomatically for overridable function endpoints which\n * always need to be callable, since JS lacks a null-call idiom ala Cocoa.\n */\nvar emptyFunction = function emptyFunction() {};\n\nemptyFunction.thatReturns = makeEmptyFunction;\nemptyFunction.thatReturnsFalse = makeEmptyFunction(false);\nemptyFunction.thatReturnsTrue = makeEmptyFunction(true);\nemptyFunction.thatReturnsNull = makeEmptyFunction(null);\nemptyFunction.thatReturnsThis = function () {\n return this;\n};\nemptyFunction.thatReturnsArgument = function (arg) {\n return arg;\n};\n\nmodule.exports = emptyFunction;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/fbjs/lib/emptyFunction.js\n// module id = 3\n// module chunks = 0","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n'use strict';\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar validateFormat = function validateFormat(format) {};\n\nif (process.env.NODE_ENV !== 'production') {\n validateFormat = function validateFormat(format) {\n if (format === undefined) {\n throw new Error('invariant requires an error message argument');\n }\n };\n}\n\nfunction invariant(condition, format, a, b, c, d, e, f) {\n validateFormat(format);\n\n if (!condition) {\n var error;\n if (format === undefined) {\n error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');\n } else {\n var args = [a, b, c, d, e, f];\n var argIndex = 0;\n error = new Error(format.replace(/%s/g, function () {\n return args[argIndex++];\n }));\n error.name = 'Invariant Violation';\n }\n\n error.framesToPop = 1; // we don't care about invariant's own frame\n throw error;\n }\n}\n\nmodule.exports = invariant;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/fbjs/lib/invariant.js\n// module id = 4\n// module chunks = 0","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/prop-types/lib/ReactPropTypesSecret.js\n// module id = 5\n// module chunks = 0","import React from 'react'\n\nimport Slide from './Slide'\nimport { getNodes, hideAllButActive } from '../utils';\n\nclass HorizontalSlider extends React.Component {\n constructor(props) {\n super(props);\n this.name = this.props.name;\n }\n\n componentDidMount() {\n const { activeSlide, document, name, cache } = this.props;\n cache(this);\n\n const nodes = getNodes(document, `data-horizontal-slider=\"${name}\"`);\n hideAllButActive(activeSlide, nodes);\n }\n\n render() {\n const p = this.props;\n const { name, children, height, width } = p;\n\n if (!name) {\n throw new Error('name is a required prop for HorizontalSlider');\n }\n\n const elements = p.slides.reduce((result, sl) => {\n if (!sl) {\n return result;\n }\n\n if (typeof sl.type !== 'function') {\n result.other.push(sl);\n } else {\n result.slides.push(sl);\n }\n\n return result;\n }, { slides: [], other: [] });\n\n const { other, slides } = elements;\n\n const attrs = {\n 'data-slide': 'HorizontalSlider',\n 'data-name': name\n };\n\n const className = (p.className || '') + 'HorizontalSlider';\n const overflowX = p.hideScrollBars ? 'hidden' : 'auto';\n const overflowY = overflowX;\n\n const horizontalSliderStyle = Object.assign({}, p.style,\n {height: `${height}px`, width: `${width}px`, position: 'relative', overflowX, overflowY, whiteSpace: 'nowrap', padding: '0px', margin: '0'});\n const horizontalSlideStyle = {overflow: 'hidden', whiteSpace: 'normal', display: 'inline-block' };\n\n return (\n
this.node = node} className={className} id={p.id} {...attrs} style={horizontalSliderStyle}>\n {other.map((o, i) => {\n const p = o.props || {};\n return
\n })}\n\n {slides.map((s, i) => {\n if (!s) {\n return null;\n }\n\n let sStyle = Object.assign({}, horizontalSlideStyle, slideStyle);\n const hSlideProps = s.props || {};\n const slideStyle = hSlideProps.style || {};\n\n return {hSlideProps.children}\n })}\n\n {children}\n
\n );\n }\n}\n\nexport default HorizontalSlider;\n\n\n\n// WEBPACK FOOTER //\n// ./lib/components/HorizontalSlider.js","import * as renderUtils from './renderUtils';\nimport scrollTo from './scrollTo';\nimport * as constants from './constants';\nimport detectOS from './detectOS.js';\n\nfunction composedPath (el) {\n const paths = [];\n\n while (el) {\n paths.push(el);\n\n if (el.tagName === 'HTML') {\n paths.push(document);\n paths.push(window);\n return paths;\n }\n\n el = el.parentElement;\n\t}\n\n\treturn paths;\n}\n\nfunction getNodes(document, sel) {\n\treturn document.querySelectorAll(`[${sel}]`);\n}\n\nfunction hideAllButActive(activeSlide, nodes) {\n\tArray.prototype.forEach.call(nodes, (n, i) => {\n\t\tif (i === activeSlide) {\n\t\t\tn.style.display = 'inline-block';\n\t\t} else {\n\t\t\tn.style.display = 'none';\n\t\t}\n\t});\n}\n\nfunction showAll(nodes) {\n\tArray.prototype.forEach.call(nodes, (n) => {\n\t\tn.style.display = 'inline-block';\n\t});\n}\n\nconst INTENT_MAP = {\n\t'VERTICAL': {\n\t\t0: 'UP',\n\t\t1: 'DOWN'\n\t},\n\t'HORIZONTAL': {\n\t\t0: 'LEFT',\n\t\t1: 'RIGHT'\n\t}\n};\n\nfunction detectBrowser(userAgentString) {\n\tif (!userAgentString) {\n\t\treturn null;\n\t}\n\n\tconst browsers = [\n\t\t['edge', /Edge\\/([0-9\\._]+)/],\n\t\t['yandexbrowser', /YaBrowser\\/([0-9\\._]+)/],\n\t\t['vivaldi', /Vivaldi\\/([0-9\\.]+)/],\n\t\t['kakaotalk', /KAKAOTALK\\s([0-9\\.]+)/],\n\t\t['chrome', /(?!Chrom.*OPR)Chrom(?:e|ium)\\/([0-9\\.]+)(:?\\s|$)/],\n\t\t['phantomjs', /PhantomJS\\/([0-9\\.]+)(:?\\s|$)/],\n\t\t['crios', /CriOS\\/([0-9\\.]+)(:?\\s|$)/],\n\t\t['firefox', /Firefox\\/([0-9\\.]+)(?:\\s|$)/],\n\t\t['fxios', /FxiOS\\/([0-9\\.]+)/],\n\t\t['opera', /Opera\\/([0-9\\.]+)(?:\\s|$)/],\n\t\t['opera', /OPR\\/([0-9\\.]+)(:?\\s|$)$/],\n\t\t['ie', /Trident\\/7\\.0.*rv\\:([0-9\\.]+).*\\).*Gecko$/],\n\t\t['ie', /MSIE\\s([0-9\\.]+);.*Trident\\/[4-7].0/],\n\t\t['ie', /MSIE\\s(7\\.0)/],\n\t\t['bb10', /BB10;\\sTouch.*Version\\/([0-9\\.]+)/],\n\t\t['android', /Android\\s([0-9\\.]+)/],\n\t\t['ios', /Version\\/([0-9\\._]+).*Mobile.*Safari.*/],\n\t\t['safari', /Version\\/([0-9\\._]+).*Safari/]\n\t];\n\n\treturn browsers.map(function (rule) {\n\t\tif (rule[1].test(userAgentString)) {\n\t\t\tconst match = rule[1].exec(userAgentString);\n\t\t\tconst version = match && match[1].split(/[._]/).slice(0, 3);\n\n\t\t\tif (version && version.length < 3) {\n\t\t\t\tArray.prototype.push.apply(version, (version.length == 1) ? [0, 0] : [0]);\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tname: rule[0],\n\t\t\t\tversion: version.join('.'),\n\t\t\t\tos: detectOS(userAgentString)\n\t\t\t};\n\t\t}\n\t}).filter(Boolean).shift();\n}\n\nexport {\n\tcomposedPath,\n\tconstants,\n\tshowAll,\n\thideAllButActive,\n\tINTENT_MAP,\n\trenderUtils,\n\tscrollTo,\n\tgetNodes,\n\tdetectBrowser\n};\n\n\n\n// WEBPACK FOOTER //\n// ./lib/utils/index.js","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n'use strict';\n\nvar emptyFunction = require('./emptyFunction');\n\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar warning = emptyFunction;\n\nif (process.env.NODE_ENV !== 'production') {\n var printWarning = function printWarning(format) {\n for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n var argIndex = 0;\n var message = 'Warning: ' + format.replace(/%s/g, function () {\n return args[argIndex++];\n });\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n\n warning = function warning(condition, format) {\n if (format === undefined) {\n throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');\n }\n\n if (format.indexOf('Failed Composite propType: ') === 0) {\n return; // Ignore CompositeComponent proptype check.\n }\n\n if (!condition) {\n for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {\n args[_key2 - 2] = arguments[_key2];\n }\n\n printWarning.apply(undefined, [format].concat(args));\n }\n };\n}\n\nmodule.exports = warning;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/fbjs/lib/warning.js\n// module id = 8\n// module chunks = 0","import React from 'react';\nimport ScrollSwipe from 'scroll-swipe';\nimport root from 'window-or-global';\nimport { WindowSize } from 'react-fns';\n\nimport { detectBrowser, constants, scrollTo, renderUtils, INTENT_MAP, getNodes, showAll, hideAllButActive, composedPath } from '../utils';\nimport Slide from './Slide';\nimport HorizontalSlider from './HorizontalSlider';\n\nconst { noOp } = constants;\nconst { KEY_IDX } = renderUtils;\n\nlet _fp = {};\nlet global = {};\n\nconst TIMEOUT = 200;\n\nconst documentStub = () => {\n const style = {};\n return {\n querySelectorAll: () => [
],\n documentElement: {\n style\n },\n body: {\n style\n }\n };\n}\n\nfunction generateState(activeSlide = 0) {\n return {\n activeSlide,\n lastActive: activeSlide - 1\n };\n}\n\nclass Fullpage extends React.Component {\n constructor(props) {\n super(props);\n const p = this.props;\n\n global.window = root;\n global.document = global.window.document || documentStub();\n\n if (p.infinite && p.resetSlides) {\n throw new Error('Fullpage Component cannot have both infinite and resetSlides as truthy props');\n }\n\n const { slides } = p;\n\n if (!slides || !slides.length) {\n throw new Error('Please provide slides for Fullpage');\n }\n\n let horizontalMap = {};\n // generate state for horizontals;\n const horizontals = slides.reduce((result, s, i) => {\n const { name } = s.props;\n\n if (s.props.slides && name) {\n result[name] = generateState(0);\n horizontalMap[i] = name;\n }\n\n return result;\n }, {});\n horizontals.horizontalMap = horizontalMap;\n\n const { activeSlide = 0, scrollSensitivity, touchSensitivity, scrollSpeed = 500 } = p;\n\n this.name = 'Fullpage';\n this.scrollSensitivity = scrollSensitivity;\n this.touchSensitivity = touchSensitivity;\n this.scrollSpeed = scrollSpeed;\n\n this.node = null;\n this.ss = null;\n this.verticalRoot = determineVerticalRoot();\n\n this.onHorizontalChange = p.onHorizontalChange || noOp;\n this.onSlideChangeStart = p.onSlideChangeStart || noOp;\n this.onSlideChangeEnd = p.onSlideChangeEnd || noOp;\n\n ['onScrollAction', 'onVerticalScroll',\n 'onHorizontalScroll', 'lockScroll', 'handleScroll',\n 'checkKey'].forEach(f => this[f] = this[f].bind(this));\n\n this.isLocked = false;\n this.hSlideCache = {};\n this.cacheHslide = (slide) => {\n this.hSlideCache[slide.name] = slide;\n }\n\n _fp = this;\n\n this.state = Object.assign({\n scrollPending: false,\n window: null,\n document: null\n }, horizontals, generateState(activeSlide));\n }\n\n componentDidMount() {\n this.hideScrollBars();\n\n this.window = global.window;\n this.document = global.document;\n\n this.setState({\n window: global.window,\n document: global.document\n }, () => {\n this.lockScroll();\n });\n }\n\n hideScrollBars() {\n const { hideScrollBars } = this.props;\n\n if (!hideScrollBars) {\n return;\n }\n\n const { document } = global;\n document.documentElement.style.overflow = 'hidden';\n document.body.style.overflow = 'hidden';\n }\n\n showScrollBars() {\n const { document } = global;\n document.documentElement.style.overflow = 'auto';\n document.body.style.overflow = 'auto';\n }\n\n lockScroll() {\n const { node, checkKey } = this;\n const { enableArrowKeys } = this.props;\n\n if (enableArrowKeys) {\n window.addEventListener('keydown', checkKey.bind(this));\n }\n\n const ss = new ScrollSwipe({\n target: node,\n scrollSensitivity: this.scrollSensitivity,\n touchSensitivity: this.touchSensitivity,\n scrollPreventDefault: true,\n touchPreventDefault: true,\n scrollCb: this.onScrollAction,\n touchCb: this.onScrollAction\n });\n this.ss = ss;\n this.isLocked = true;\n }\n\n onScrollAction({direction, intent, startEvent}) {\n const s = this.state;\n const { ss = ssStub() } = this;\n\n if (s.scrollPending) {\n ss.flush();\n return ss.listen();\n }\n\n const dir = INTENT_MAP[direction];\n\n // at this point we are dedicating\n if (direction === 'VERTICAL') {\n return this.onVerticalScroll(dir[intent], startEvent);\n }\n\n let path = startEvent.path || (startEvent.composedPath && startEvent.composedPath());\n\n if (!path) {\n const polyFillPath = composedPath(startEvent.target);\n path = polyFillPath;\n }\n\n const isHorizontal = path.find((p) => {\n if (!p.dataset) {\n return false;\n }\n\n return p.dataset.slide === 'HorizontalSlider';\n });\n\n if (!isHorizontal) {\n ss.flush();\n return ss.listen();\n }\n\n this.onHorizontalScroll(dir[intent], isHorizontal);\n }\n\n onVerticalScroll(intent) {\n const s = this.state;\n const { window, activeSlide } = s;\n const { slides } = this.props;\n\n const next = intent === 'DOWN' ? activeSlide + 1 : activeSlide - 1;\n if (next < 0 || next > slides.length - 1) {\n const { ss = ssStub() } = this;\n ss.flush();\n return ss.listen();\n }\n\n const to = next * window.innerHeight;\n const newState = {\n activeSlide: next,\n lastActive: activeSlide\n };\n\n this.setState({ scrollPending: true }, () => {\n this.handleScroll(this.verticalRoot, 'scrollTop', to, newState, this.name);\n });\n }\n\n onHorizontalScroll(intent, node) {\n const { name } = node.dataset;\n let { activeSlide } = this.state[name];\n let next = intent === 'RIGHT' ? activeSlide + 1 : activeSlide - 1;\n const { innerWidth } = this.state.window;\n const { ss = ssStub() } = this;\n\n const comp = _fp.hSlideCache[name];\n const hp = comp.props;\n const { infinite } = hp;\n\n let nodes = getNodes(this.state.document, `data-horizontal-slider=\"${name}\"`);\n\n let leftVal = activeSlide * innerWidth;\n let to = next * innerWidth;\n\n const result = this.determineHSlide(comp, activeSlide, next, leftVal, to, nodes);\n\n if (!result) {\n setTimeout(() => {\n ss.flush();\n ss.listen();\n }, TIMEOUT);\n return;\n }\n\n leftVal = result.leftVal\n next = result.next;\n to = result.to;\n\n const newState = {\n [name]: {\n activeSlide: next,\n lastActive: activeSlide\n }\n };\n\n this.handleHorizontal(name, node, nodes, leftVal, to, next, newState, infinite);\n }\n\n determineHSlide(comp, activeSlide, next, leftVal, to, nodes) {\n const hp = comp.props;\n const { infinite, resetSlides } = hp;\n const { innerWidth } = this.state.window;\n\n const len = nodes.length;\n\n const infStart = activeSlide === 0 && next === -1;\n const infEnd = activeSlide === len - 1 && next === len;\n\n if (!infinite && !resetSlides && (infStart || infEnd)) {\n return null;\n }\n\n if (infinite && infStart) {\n // simulate last <- 0\n next = len - 1;\n lastToFirst(nodes);\n leftVal = innerWidth;\n to = 0;\n } else if (infinite && infEnd) {\n // simulate last -> 0\n next = 0;\n lastToFirst(nodes);\n leftVal = 0;\n to = innerWidth;\n }\n\n const result = { next, leftVal, to };\n return result;\n }\n\n handleHorizontal(name, node, nodes, leftVal, to, next, newState, infinite) {\n showAll(nodes);\n node.scrollLeft = leftVal;\n\n //show, reset window\n //scroll\n //hide\n\n this.setState({ scrollPending: true }, () => {\n this.handleScroll(node, 'scrollLeft', to, newState, name, () => {\n if (infinite) {\n firstToLast(nodes);\n node.scrollLeft = innerWidth * next;\n }\n hideAllButActive(next, nodes);\n });\n });\n }\n\n handleScroll(node, winProp, to, newState, compName, cb = noOp) {\n const ss = this.ss || ssStub();\n ss.flush();\n const cancellable = this.onSlideChangeStart(compName, this.props, this.state, newState[compName] || newState);\n\n if (cancellable === true) {\n return;\n }\n\n scrollTo(node, winProp, to, this.scrollSpeed, () => {\n newState.scrollPending = false;\n this.setState(newState, () => {\n cb();\n this.onSlideChangeEnd(compName, this.props, this.state, newState[compName] || newState);\n setTimeout(() => {\n ss.flush();\n ss.listen();\n }, TIMEOUT);\n });\n });\n }\n\n componentWillUnmount() {\n const ss = this.ss || ssStub();\n ss.killAll();\n this.ss = null;\n\n const { window } = this.state;\n\n if (this.props.enableArrowKeys) {\n window.removeEventListener('keydown', this.checkKey);\n }\n\n if (this.props.hideScrollBars) {\n this.showScrollBars();\n }\n }\n\n checkKey(e) {\n const direction = KEY_IDX[e.keyCode];\n if (!direction) {\n return;\n }\n\n const intent = (direction === 'UP' || direction === 'LEFT') ? -1 : 1;\n const context = (direction === 'UP' || direction === 'DOWN') ? 'VERTICAL' : 'HORIZONTAL';\n\n if (context === 'VERTICAL') {\n Fullpage.changeFullpageSlide(this.state.activeSlide + intent);\n return;\n }\n\n const horizontalName = this.state.horizontalMap[this.state.activeSlide];\n if (!horizontalName) {\n return;\n }\n\n const { activeSlide } = this.state[horizontalName];\n Fullpage.changeHorizontalSlide(horizontalName, activeSlide + intent);\n }\n\n static changeHorizontalSlide(name, next) {\n next = +next;\n\n const comp = _fp.hSlideCache[name];\n if (!comp) {\n throw Error('cannt find HorizontalSlider by name', name);\n }\n\n const { node, props } = comp;\n const { infinite } = props;\n const eligible = isEligible(next, props, _fp.state);\n\n if (!eligible) {\n return;\n }\n\n const { activeSlide } = _fp.state[name];\n const { innerWidth } = _fp.state.window;\n\n let nodes = getNodes(_fp.state.document, `data-horizontal-slider=\"${name}\"`);\n let leftVal = activeSlide * innerWidth;\n let to = next * innerWidth;\n\n const result = _fp.determineHSlide.call(_fp, comp, activeSlide, next, leftVal, to, nodes);\n\n leftVal = result.leftVal\n next = result.next;\n to = result.to;\n\n const newState = {\n [name]: {\n activeSlide: next,\n lastActive: activeSlide\n }\n };\n\n _fp.handleHorizontal.call(_fp, name, node, nodes, leftVal, to, next, newState, infinite);\n }\n\n static changeFullpageSlide(idx) {\n const { props, state, name, verticalRoot } = _fp;\n const { activeSlide, window } = state;\n\n const eligible = isEligible(idx, props, state);\n\n if (!eligible) {\n return;\n }\n\n const newState = {\n activeSlide: idx,\n lastActive: activeSlide\n };\n\n const to = idx * window.innerHeight;\n\n _fp.setState({ scrollPending: true }, () => {\n _fp.onSlideChangeStart(name, props, state, newState);\n _fp.handleScroll(verticalRoot, 'scrollTop', to, newState, name);\n });\n }\n\n render() {\n const s = this.state;\n const p = this.props;\n const { window, document, activeSlide } = s;\n\n const children = p.children || null;\n\n if (!window) {\n return children;\n }\n\n const elements = p.slides.reduce((result, sl) => {\n if (!sl) {\n return result;\n }\n\n if (typeof sl.type !== 'function') {\n result.other.push(sl);\n } else {\n result.slides.push(sl);\n }\n\n return result;\n }, { slides: [], other: [] });\n\n const { other, slides } = elements;\n\n // TODO: sub other for children\n return (\n {\n\n const to = activeSlide * height;\n setTimeout(() => {\n this.verticalRoot.scrollTop = to;\n }, 0);\n\n return (\n
(this.node = node)} className=\"Fullpage\">\n {children}\n {other.map((o, i) => {\n const op = o.props || {};\n return
;\n })}\n\n {slides.map((sl, i) => {\n const sp = sl.props || {};\n const children = sp.children;\n\n if (sp.slides) {\n const { name } = sp;\n return \n {children}\n ;\n }\n\n return \n {children}\n ;\n })}\n
\n );\n }}\n />\n );\n }\n}\n\nfunction swap(nodes, o, i) {\n nodes[o || i].parentNode.insertBefore(nodes[i], nodes[o]);\n return nodes;\n}\n\nfunction lastToFirst(nodes) {\n swap(nodes, 0, nodes.length - 1);\n}\n\nfunction firstToLast(nodes) {\n swap(nodes, null, nodes.length - 1);\n}\n\nfunction isEligible(idx, props, state) {\n const { slides } = props;\n const { activeSlide } = state;\n\n if (state.scrollPending) {\n return false;\n }\n\n if (props.infinite) {\n return true;\n }\n\n if (idx > slides.length - 1 || idx < 0) {\n return false;\n }\n\n if (idx == activeSlide) {\n return false;\n }\n\n return true;\n}\n\nfunction ssStub() {\n return {\n flush: noOp,\n killAll: noOp,\n listen: noOp\n };\n}\n\nfunction determineVerticalRoot() {\n let userAgent, platform;\n\n const { document } = global;\n\n if (typeof navigator !== 'undefined' && navigator) {\n ({ userAgent, platform } = navigator);\n }\n\n if (!userAgent) {\n return document.body;\n }\n\n // http://developer.samsung.com/technical-doc/view.do?v=T000000203\n if (/SAMSUNG.*Build\\//.test(userAgent)) {\n return document.body;\n }\n\n const browser = detectBrowser(userAgent);\n\n if (!browser) {\n return document.body;\n }\n\n // NOTE: various browsers and devTools handle this differently as the userAgent source of truth\n // To get the root scrollable element we have to play around with OS and browser to find the right\n // root to return. If need be we can be specific about version\n\n const { name, version, os } = browser; // eslint-disable-line no-unused-vars\n const [ major, minor, patch ] = version.split('.'); // eslint-disable-line no-unused-vars\n\n const docElementSet = new Set([\n 'firefox',\n 'chrome',\n 'ios', // iPad (chrome devtools)\n 'crios', // chrome ios (chrome devtools)\n 'ie'\n ]);\n\n // Some platforms conflict with the devtools when it comes to supporting document.body\n // In order to support both user-agents in chrome devtools and the native device we need to\n // check for both browser name and device platform\n const conflictingPlatforms = new Set([\n 'iPhone',\n 'iPad'\n ]);\n\n if (docElementSet.has(name) && !conflictingPlatforms.has(platform)) {\n return document.documentElement;\n }\n\n // safari, chrome ios etc\n return document.body;\n}\nexport default Fullpage;\n\n\n\n// WEBPACK FOOTER //\n// ./lib/components/Fullpage.js","import Fullpage from './components/Fullpage';\nimport Slide from './components/Slide';\nimport HorizontalSlider from './components/HorizontalSlider';\n\nexport {\n Fullpage,\n Slide,\n HorizontalSlider\n};\n\n\n\n// WEBPACK FOOTER //\n// ./lib/index.js","const INCREMENT = 'INCREMENT';\nconst DECREMENT = 'DECREMENT';\nconst VERTICAL = 'VERTICAL';\nconst HORIZONTAL = 'HORIZONTAL';\nconst HEAD = 'HEAD';\nconst TAIL = 'TAIL';\nconst I_BLOCK = 'inline-block';\nconst BLOCK = 'block';\nconst NONE = 'none';\nconst noOp = () => {};\n\nexport {\n INCREMENT,\n DECREMENT,\n VERTICAL,\n HORIZONTAL,\n I_BLOCK,\n HEAD,\n TAIL,\n BLOCK,\n NONE,\n noOp\n};\n\n\n\n// WEBPACK FOOTER //\n// ./lib/utils/constants.js","module.exports = function detectOS(userAgentString) {\n const operatingSystems = [\n {\n name: 'iOS',\n rule: /iP(hone|od|ad)/\n },\n {\n name: 'Android OS',\n rule: /Android/\n },\n {\n name: 'BlackBerry OS',\n rule: /BlackBerry|BB10/\n },\n {\n name: 'Windows Mobile',\n rule: /IEMobile/\n },\n {\n name: 'Amazon OS',\n rule: /Kindle/\n },\n {\n name: 'Windows 3.11',\n rule: /Win16/\n },\n {\n name: 'Windows 95',\n rule: /(Windows 95)|(Win95)|(Windows_95)/\n },\n {\n name: 'Windows 98',\n rule: /(Windows 98)|(Win98)/\n },\n {\n name: 'Windows 2000',\n rule: /(Windows NT 5.0)|(Windows 2000)/\n },\n {\n name: 'Windows XP',\n rule: /(Windows NT 5.1)|(Windows XP)/\n },\n {\n name: 'Windows Server 2003',\n rule: /(Windows NT 5.2)/\n },\n {\n name: 'Windows Vista',\n rule: /(Windows NT 6.0)/\n },\n {\n name: 'Windows 7',\n rule: /(Windows NT 6.1)/\n },\n {\n name: 'Windows 8',\n rule: /(Windows NT 6.2)/\n },\n {\n name: 'Windows 8.1',\n rule: /(Windows NT 6.3)/\n },\n {\n name: 'Windows 10',\n rule: /(Windows NT 10.0)/\n },\n {\n name: 'Windows ME',\n rule: /Windows ME/\n },\n {\n name: 'Open BSD',\n rule: /OpenBSD/\n },\n {\n name: 'Sun OS',\n rule: /SunOS/\n },\n {\n name: 'Linux',\n rule: /(Linux)|(X11)/\n },\n {\n name: 'Mac OS',\n rule: /(Mac_PowerPC)|(Macintosh)/\n },\n {\n name: 'QNX',\n rule: /QNX/\n },\n {\n name: 'BeOS',\n rule: /BeOS/\n },\n {\n name: 'OS/2',\n rule: /OS\\/2/\n },\n {\n name: 'Search Bot',\n rule: /(nuhk)|(Googlebot)|(Yammybot)|(Openbot)|(Slurp)|(MSNBot)|(Ask Jeeves\\/Teoma)|(ia_archiver)/\n }\n ];\n\n const detected = operatingSystems.filter(function (os) {\n if (userAgentString.match(os.rule)) {\n return true;\n }\n });\n\n return detected && detected[0] ? detected[0].name : null;\n};\n\n\n// WEBPACK FOOTER //\n// ./lib/utils/detectOS.js","const KEY_IDX = {\n 37: 'LEFT',\n 38: 'UP',\n 39: 'RIGHT',\n 40: 'DOWN'\n};\n\nexport {\n KEY_IDX\n};\n\n\n\n// WEBPACK FOOTER //\n// ./lib/utils/renderUtils.js","function scrollTo(element, elementBoundary, to, duration, callback) {\n const start = element[elementBoundary],\n change = to - start,\n increment = 10;\n\n let currentTime = 0;\n let globalId = requestAnimationFrame(repeatOften);\n function repeatOften() {\n currentTime += increment;\n let val = easeInOutQuad(currentTime, start, change, duration);\n element[elementBoundary] = val;\n\n if (currentTime >= duration) {\n cancelAnimationFrame(globalId);\n return callback();\n }\n globalId = requestAnimationFrame(repeatOften);\n }\n}\n\n//t = current time\n//b = start value\n//c = change in value\n//d = duration\nconst easeInOutQuad = (t, b, c, d) => {\n t /= d;\n\treturn -c * t*(t-2) + b;\n}\n\nexport default scrollTo;\n\n\n\n// WEBPACK FOOTER //\n// ./lib/utils/scrollTo.js","var camel2hyphen = require('string-convert/camel2hyphen');\n\nvar isDimension = function (feature) {\n var re = /[height|width]$/;\n return re.test(feature);\n};\n\nvar obj2mq = function (obj) {\n var mq = '';\n var features = Object.keys(obj);\n features.forEach(function (feature, index) {\n var value = obj[feature];\n feature = camel2hyphen(feature);\n // Add px to dimension features\n if (isDimension(feature) && typeof value === 'number') {\n value = value + 'px';\n }\n if (value === true) {\n mq += feature;\n } else if (value === false) {\n mq += 'not ' + feature;\n } else {\n mq += '(' + feature + ': ' + value + ')';\n }\n if (index < features.length-1) {\n mq += ' and '\n }\n });\n return mq;\n};\n\nvar json2mq = function (query) {\n var mq = '';\n if (typeof query === 'string') {\n return query;\n }\n // Handling array of media queries\n if (query instanceof Array) {\n query.forEach(function (q, index) {\n mq += obj2mq(q);\n if (index < query.length-1) {\n mq += ', '\n }\n });\n return mq;\n }\n // Handling single media query\n return obj2mq(query);\n};\n\nmodule.exports = json2mq;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/json2mq/index.js\n// module id = 15\n// module chunks = 0","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/object-assign/index.js\n// module id = 16\n// module chunks = 0","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nif (process.env.NODE_ENV !== 'production') {\n var invariant = require('fbjs/lib/invariant');\n var warning = require('fbjs/lib/warning');\n var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n var loggedTypeFailures = {};\n}\n\n/**\n * Assert that the values match with the type specs.\n * Error messages are memorized and will only be shown once.\n *\n * @param {object} typeSpecs Map of name to a ReactPropType\n * @param {object} values Runtime values that need to be type-checked\n * @param {string} location e.g. \"prop\", \"context\", \"child context\"\n * @param {string} componentName Name of the component for error messages.\n * @param {?Function} getStack Returns the component stack.\n * @private\n */\nfunction checkPropTypes(typeSpecs, values, location, componentName, getStack) {\n if (process.env.NODE_ENV !== 'production') {\n for (var typeSpecName in typeSpecs) {\n if (typeSpecs.hasOwnProperty(typeSpecName)) {\n var error;\n // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n invariant(typeof typeSpecs[typeSpecName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'the `prop-types` package, but received `%s`.', componentName || 'React class', location, typeSpecName, typeof typeSpecs[typeSpecName]);\n error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);\n } catch (ex) {\n error = ex;\n }\n warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error);\n if (error instanceof Error && !(error.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error.message] = true;\n\n var stack = getStack ? getStack() : '';\n\n warning(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : '');\n }\n }\n }\n }\n}\n\nmodule.exports = checkPropTypes;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/prop-types/checkPropTypes.js\n// module id = 17\n// module chunks = 0","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar emptyFunction = require('fbjs/lib/emptyFunction');\nvar invariant = require('fbjs/lib/invariant');\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n invariant(\n false,\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim\n };\n\n ReactPropTypes.checkPropTypes = emptyFunction;\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/prop-types/factoryWithThrowingShims.js\n// module id = 18\n// module chunks = 0","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar emptyFunction = require('fbjs/lib/emptyFunction');\nvar invariant = require('fbjs/lib/invariant');\nvar warning = require('fbjs/lib/warning');\nvar assign = require('object-assign');\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\nvar checkPropTypes = require('./checkPropTypes');\n\nmodule.exports = function(isValidElement, throwOnDirectAccess) {\n /* global Symbol */\n var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.\n\n /**\n * Returns the iterator method function contained on the iterable object.\n *\n * Be sure to invoke the function with the iterable as context:\n *\n * var iteratorFn = getIteratorFn(myIterable);\n * if (iteratorFn) {\n * var iterator = iteratorFn.call(myIterable);\n * ...\n * }\n *\n * @param {?object} maybeIterable\n * @return {?function}\n */\n function getIteratorFn(maybeIterable) {\n var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);\n if (typeof iteratorFn === 'function') {\n return iteratorFn;\n }\n }\n\n /**\n * Collection of methods that allow declaration and validation of props that are\n * supplied to React components. Example usage:\n *\n * var Props = require('ReactPropTypes');\n * var MyArticle = React.createClass({\n * propTypes: {\n * // An optional string prop named \"description\".\n * description: Props.string,\n *\n * // A required enum prop named \"category\".\n * category: Props.oneOf(['News','Photos']).isRequired,\n *\n * // A prop named \"dialog\" that requires an instance of Dialog.\n * dialog: Props.instanceOf(Dialog).isRequired\n * },\n * render: function() { ... }\n * });\n *\n * A more formal specification of how these methods are used:\n *\n * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)\n * decl := ReactPropTypes.{type}(.isRequired)?\n *\n * Each and every declaration produces a function with the same signature. This\n * allows the creation of custom validation functions. For example:\n *\n * var MyLink = React.createClass({\n * propTypes: {\n * // An optional string or URI prop named \"href\".\n * href: function(props, propName, componentName) {\n * var propValue = props[propName];\n * if (propValue != null && typeof propValue !== 'string' &&\n * !(propValue instanceof URI)) {\n * return new Error(\n * 'Expected a string or an URI for ' + propName + ' in ' +\n * componentName\n * );\n * }\n * }\n * },\n * render: function() {...}\n * });\n *\n * @internal\n */\n\n var ANONYMOUS = '<>';\n\n // Important!\n // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.\n var ReactPropTypes = {\n array: createPrimitiveTypeChecker('array'),\n bool: createPrimitiveTypeChecker('boolean'),\n func: createPrimitiveTypeChecker('function'),\n number: createPrimitiveTypeChecker('number'),\n object: createPrimitiveTypeChecker('object'),\n string: createPrimitiveTypeChecker('string'),\n symbol: createPrimitiveTypeChecker('symbol'),\n\n any: createAnyTypeChecker(),\n arrayOf: createArrayOfTypeChecker,\n element: createElementTypeChecker(),\n instanceOf: createInstanceTypeChecker,\n node: createNodeChecker(),\n objectOf: createObjectOfTypeChecker,\n oneOf: createEnumTypeChecker,\n oneOfType: createUnionTypeChecker,\n shape: createShapeTypeChecker,\n exact: createStrictShapeTypeChecker,\n };\n\n /**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\n /*eslint-disable no-self-compare*/\n function is(x, y) {\n // SameValue algorithm\n if (x === y) {\n // Steps 1-5, 7-10\n // Steps 6.b-6.e: +0 != -0\n return x !== 0 || 1 / x === 1 / y;\n } else {\n // Step 6.a: NaN == NaN\n return x !== x && y !== y;\n }\n }\n /*eslint-enable no-self-compare*/\n\n /**\n * We use an Error-like object for backward compatibility as people may call\n * PropTypes directly and inspect their output. However, we don't use real\n * Errors anymore. We don't inspect their stack anyway, and creating them\n * is prohibitively expensive if they are created too often, such as what\n * happens in oneOfType() for any type before the one that matched.\n */\n function PropTypeError(message) {\n this.message = message;\n this.stack = '';\n }\n // Make `instanceof Error` still work for returned errors.\n PropTypeError.prototype = Error.prototype;\n\n function createChainableTypeChecker(validate) {\n if (process.env.NODE_ENV !== 'production') {\n var manualPropTypeCallCache = {};\n var manualPropTypeWarningCount = 0;\n }\n function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {\n componentName = componentName || ANONYMOUS;\n propFullName = propFullName || propName;\n\n if (secret !== ReactPropTypesSecret) {\n if (throwOnDirectAccess) {\n // New behavior only for users of `prop-types` package\n invariant(\n false,\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use `PropTypes.checkPropTypes()` to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {\n // Old behavior for people using React.PropTypes\n var cacheKey = componentName + ':' + propName;\n if (\n !manualPropTypeCallCache[cacheKey] &&\n // Avoid spamming the console because they are often not actionable except for lib authors\n manualPropTypeWarningCount < 3\n ) {\n warning(\n false,\n 'You are manually calling a React.PropTypes validation ' +\n 'function for the `%s` prop on `%s`. This is deprecated ' +\n 'and will throw in the standalone `prop-types` package. ' +\n 'You may be seeing this warning due to a third-party PropTypes ' +\n 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.',\n propFullName,\n componentName\n );\n manualPropTypeCallCache[cacheKey] = true;\n manualPropTypeWarningCount++;\n }\n }\n }\n if (props[propName] == null) {\n if (isRequired) {\n if (props[propName] === null) {\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));\n }\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));\n }\n return null;\n } else {\n return validate(props, propName, componentName, location, propFullName);\n }\n }\n\n var chainedCheckType = checkType.bind(null, false);\n chainedCheckType.isRequired = checkType.bind(null, true);\n\n return chainedCheckType;\n }\n\n function createPrimitiveTypeChecker(expectedType) {\n function validate(props, propName, componentName, location, propFullName, secret) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== expectedType) {\n // `propValue` being instance of, say, date/regexp, pass the 'object'\n // check, but we can offer a more precise error message here rather than\n // 'of type `object`'.\n var preciseType = getPreciseType(propValue);\n\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createAnyTypeChecker() {\n return createChainableTypeChecker(emptyFunction.thatReturnsNull);\n }\n\n function createArrayOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');\n }\n var propValue = props[propName];\n if (!Array.isArray(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));\n }\n for (var i = 0; i < propValue.length; i++) {\n var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createElementTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!isValidElement(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createInstanceTypeChecker(expectedClass) {\n function validate(props, propName, componentName, location, propFullName) {\n if (!(props[propName] instanceof expectedClass)) {\n var expectedClassName = expectedClass.name || ANONYMOUS;\n var actualClassName = getClassName(props[propName]);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createEnumTypeChecker(expectedValues) {\n if (!Array.isArray(expectedValues)) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid argument supplied to oneOf, expected an instance of array.') : void 0;\n return emptyFunction.thatReturnsNull;\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n for (var i = 0; i < expectedValues.length; i++) {\n if (is(propValue, expectedValues[i])) {\n return null;\n }\n }\n\n var valuesString = JSON.stringify(expectedValues);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createObjectOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');\n }\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));\n }\n for (var key in propValue) {\n if (propValue.hasOwnProperty(key)) {\n var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createUnionTypeChecker(arrayOfTypeCheckers) {\n if (!Array.isArray(arrayOfTypeCheckers)) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;\n return emptyFunction.thatReturnsNull;\n }\n\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n if (typeof checker !== 'function') {\n warning(\n false,\n 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +\n 'received %s at index %s.',\n getPostfixForTypeWarning(checker),\n i\n );\n return emptyFunction.thatReturnsNull;\n }\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {\n return null;\n }\n }\n\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createNodeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n if (!isNode(props[propName])) {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n for (var key in shapeTypes) {\n var checker = shapeTypes[key];\n if (!checker) {\n continue;\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createStrictShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n // We need to check all keys in case some are required but missing from\n // props.\n var allKeys = assign({}, props[propName], shapeTypes);\n for (var key in allKeys) {\n var checker = shapeTypes[key];\n if (!checker) {\n return new PropTypeError(\n 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +\n '\\nBad object: ' + JSON.stringify(props[propName], null, ' ') +\n '\\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')\n );\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n\n return createChainableTypeChecker(validate);\n }\n\n function isNode(propValue) {\n switch (typeof propValue) {\n case 'number':\n case 'string':\n case 'undefined':\n return true;\n case 'boolean':\n return !propValue;\n case 'object':\n if (Array.isArray(propValue)) {\n return propValue.every(isNode);\n }\n if (propValue === null || isValidElement(propValue)) {\n return true;\n }\n\n var iteratorFn = getIteratorFn(propValue);\n if (iteratorFn) {\n var iterator = iteratorFn.call(propValue);\n var step;\n if (iteratorFn !== propValue.entries) {\n while (!(step = iterator.next()).done) {\n if (!isNode(step.value)) {\n return false;\n }\n }\n } else {\n // Iterator will provide entry [k,v] tuples rather than values.\n while (!(step = iterator.next()).done) {\n var entry = step.value;\n if (entry) {\n if (!isNode(entry[1])) {\n return false;\n }\n }\n }\n }\n } else {\n return false;\n }\n\n return true;\n default:\n return false;\n }\n }\n\n function isSymbol(propType, propValue) {\n // Native Symbol.\n if (propType === 'symbol') {\n return true;\n }\n\n // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'\n if (propValue['@@toStringTag'] === 'Symbol') {\n return true;\n }\n\n // Fallback for non-spec compliant Symbols which are polyfilled.\n if (typeof Symbol === 'function' && propValue instanceof Symbol) {\n return true;\n }\n\n return false;\n }\n\n // Equivalent of `typeof` but with special handling for array and regexp.\n function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }\n\n // This handles more types than `getPropType`. Only used for error messages.\n // See `createPrimitiveTypeChecker`.\n function getPreciseType(propValue) {\n if (typeof propValue === 'undefined' || propValue === null) {\n return '' + propValue;\n }\n var propType = getPropType(propValue);\n if (propType === 'object') {\n if (propValue instanceof Date) {\n return 'date';\n } else if (propValue instanceof RegExp) {\n return 'regexp';\n }\n }\n return propType;\n }\n\n // Returns a string that is postfixed to a warning about an invalid type.\n // For example, \"undefined\" or \"of type array\"\n function getPostfixForTypeWarning(value) {\n var type = getPreciseType(value);\n switch (type) {\n case 'array':\n case 'object':\n return 'an ' + type;\n case 'boolean':\n case 'date':\n case 'regexp':\n return 'a ' + type;\n default:\n return type;\n }\n }\n\n // Returns class name of the object, if any.\n function getClassName(propValue) {\n if (!propValue.constructor || !propValue.constructor.name) {\n return ANONYMOUS;\n }\n return propValue.constructor.name;\n }\n\n ReactPropTypes.checkPropTypes = checkPropTypes;\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/prop-types/factoryWithTypeCheckers.js\n// module id = 19\n// module chunks = 0","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' &&\n Symbol.for &&\n Symbol.for('react.element')) ||\n 0xeac7;\n\n var isValidElement = function(object) {\n return typeof object === 'object' &&\n object !== null &&\n object.$$typeof === REACT_ELEMENT_TYPE;\n };\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(isValidElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/prop-types/index.js\n// module id = 20\n// module chunks = 0","import { Children, Component, createElement } from 'react';\n\n/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n\r\nfunction __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nvar __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n};\n\nvar isEmptyChildren = function (children) {\n return Children.count(children) === 0;\n};\n\nfunction throttle(func, wait) {\n var timeout = null;\n var callbackArgs = null;\n var context = this;\n var later = function () {\n func.apply(context, callbackArgs);\n timeout = null;\n };\n return function () {\n if (!timeout) {\n callbackArgs = arguments;\n timeout = setTimeout(later, wait);\n }\n };\n}\n\nvar supportsPassiveListener = false;\nvar noop = function () { };\ntry {\n var opts = Object.defineProperty({}, 'passive', {\n get: function () {\n supportsPassiveListener = true;\n },\n });\n window.addEventListener('testPassive', noop, opts);\n window.removeEventListener('testPassive', noop, opts);\n}\ncatch (e) { }\n\nvar Scroll = (function (_super) {\n __extends(Scroll, _super);\n function Scroll() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.state = { x: 0, y: 0 };\n _this.handleWindowScroll = throttle(function () {\n _this.setState({ x: window.scrollX, y: window.scrollY });\n }, _this.props.throttle);\n return _this;\n }\n Scroll.prototype.componentDidMount = function () {\n this.handleWindowScroll();\n window.addEventListener('scroll', this.handleWindowScroll, supportsPassiveListener ? { passive: true } : false);\n };\n Scroll.prototype.componentWillUnmount = function () {\n window.removeEventListener('scroll', this.handleWindowScroll);\n };\n Scroll.prototype.render = function () {\n var _a = this.props, render = _a.render, component = _a.component, children = _a.children;\n return component\n ? createElement(component, this.state)\n : render\n ? render(this.state)\n : children\n ? typeof children === 'function'\n ? children(this.state)\n : !isEmptyChildren(children) ? Children.only(children) : null\n : null;\n };\n Scroll.defaultProps = {\n throttle: 100,\n };\n return Scroll;\n}(Component));\n\nvar REACT_STATICS = {\n childContextTypes: true,\n contextTypes: true,\n defaultProps: true,\n displayName: true,\n getDefaultProps: true,\n mixins: true,\n propTypes: true,\n type: true,\n};\nvar KNOWN_STATICS = {\n name: true,\n length: true,\n prototype: true,\n caller: true,\n callee: true,\n arguments: true,\n arity: true,\n};\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\nvar getPrototypeOf = Object.getPrototypeOf;\nvar objectPrototype = getPrototypeOf && getPrototypeOf(Object);\nvar getOwnPropertyNames = Object.getOwnPropertyNames;\nfunction hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {\n if (typeof sourceComponent !== 'string') {\n if (objectPrototype) {\n var inheritedComponent = getPrototypeOf(sourceComponent);\n if (inheritedComponent && inheritedComponent !== objectPrototype) {\n hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);\n }\n }\n var keys = getOwnPropertyNames(sourceComponent);\n if (getOwnPropertySymbols) {\n keys = keys.concat(getOwnPropertySymbols(sourceComponent));\n }\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n if (!REACT_STATICS[key] &&\n !KNOWN_STATICS[key] &&\n (!blacklist || !blacklist[key])) {\n if (propIsEnumerable.call(sourceComponent, key) ||\n typeof sourceComponent[key] === 'function') {\n try {\n targetComponent[key] = sourceComponent[key];\n }\n catch (e) { }\n }\n }\n }\n return targetComponent;\n }\n return targetComponent;\n}\n\nfunction withScroll(Component$$1) {\n var S = function (props) {\n return (createElement(Scroll, { render: function (p) { return createElement(Component$$1, __assign({}, props, p)); } }));\n };\n return hoistNonReactStatics(S, Component$$1);\n}\n\nvar DeviceMotion = (function (_super) {\n __extends(DeviceMotion, _super);\n function DeviceMotion() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.state = {\n acceleration: {\n x: null,\n y: null,\n z: null,\n },\n accelerationIncludingGravity: {\n x: null,\n y: null,\n z: null,\n },\n rotationRate: {\n alpha: null,\n beta: null,\n gamma: null,\n },\n interval: 0,\n };\n _this.handleDeviceMotion = function (e) {\n _this.setState({\n acceleration: e.acceleration,\n accelerationIncludingGravity: e.accelerationIncludingGravity,\n rotationRate: e.rotationRate,\n interval: e.interval,\n });\n };\n return _this;\n }\n DeviceMotion.prototype.componentDidMount = function () {\n window.addEventListener('devicemotion', this.handleDeviceMotion, true);\n };\n DeviceMotion.prototype.componentWillUnmount = function () {\n window.removeEventListener('devicemotion', this.handleDeviceMotion);\n };\n DeviceMotion.prototype.render = function () {\n var _a = this.props, render = _a.render, component = _a.component, children = _a.children;\n return component\n ? createElement(component, this.state)\n : render\n ? render(this.state)\n : children\n ? typeof children === 'function'\n ? children(this.state)\n : !isEmptyChildren(children) ? Children.only(children) : null\n : null;\n };\n return DeviceMotion;\n}(Component));\n\nfunction withDeviceMotion(Component$$1) {\n var S = function (props) {\n return (createElement(DeviceMotion, { render: function (p) { return createElement(Component$$1, __assign({}, props, p)); } }));\n };\n return hoistNonReactStatics(S, Component$$1);\n}\n\nvar DeviceOrientation = (function (_super) {\n __extends(DeviceOrientation, _super);\n function DeviceOrientation() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.state = {\n alpha: null,\n beta: null,\n gamma: null,\n absolute: false,\n };\n _this.handleDeviceOrientation = function (e) {\n _this.setState({\n beta: e.beta,\n alpha: e.alpha,\n gamma: e.gamma,\n absolute: e.absolute,\n });\n };\n return _this;\n }\n DeviceOrientation.prototype.componentDidMount = function () {\n window.addEventListener('deviceorientation', this.handleDeviceOrientation, true);\n };\n DeviceOrientation.prototype.componentWillUnmount = function () {\n window.removeEventListener('deviceorientation', this.handleDeviceOrientation);\n };\n DeviceOrientation.prototype.render = function () {\n var _a = this.props, render = _a.render, component = _a.component, children = _a.children;\n return component\n ? createElement(component, this.state)\n : render\n ? render(this.state)\n : children\n ? typeof children === 'function'\n ? children(this.state)\n : !isEmptyChildren(children) ? Children.only(children) : null\n : null;\n };\n return DeviceOrientation;\n}(Component));\n\nfunction withDeviceOrientation(Component$$1) {\n var S = function (props) {\n return (createElement(DeviceOrientation, { render: function (p) { return createElement(Component$$1, __assign({}, props, p)); } }));\n };\n return hoistNonReactStatics(S, Component$$1);\n}\n\nvar Network = (function (_super) {\n __extends(Network, _super);\n function Network() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.state = { online: false };\n _this.handleOnline = function () {\n _this.setState({ online: true, offlineAt: undefined });\n };\n _this.handleOffline = function () {\n _this.setState({ online: false, offlineAt: new Date() });\n };\n return _this;\n }\n Network.prototype.componentDidMount = function () {\n window.addEventListener('online', this.handleOnline);\n window.addEventListener('offline', this.handleOffline);\n };\n Network.prototype.componentWillUnmount = function () {\n window.removeEventListener('online', this.handleOnline);\n window.removeEventListener('offline', this.handleOffline);\n };\n Network.prototype.render = function () {\n var _a = this.props, render = _a.render, component = _a.component, children = _a.children;\n return component\n ? createElement(component, this.state)\n : render\n ? render(this.state)\n : children\n ? typeof children === 'function'\n ? children(this.state)\n : !isEmptyChildren(children) ? Children.only(children) : null\n : null;\n };\n return Network;\n}(Component));\n\nfunction withNetwork(Component$$1) {\n var S = function (props) {\n return (createElement(Network, { render: function (p) { return createElement(Component$$1, __assign({}, props, p)); } }));\n };\n return hoistNonReactStatics(S, Component$$1);\n}\n\nvar GeoPosition = (function (_super) {\n __extends(GeoPosition, _super);\n function GeoPosition() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.state = {\n isLoading: true,\n };\n _this.requestGeo = function () {\n _this.setState({ isLoading: true });\n _this.geoId = navigator.geolocation.watchPosition(function (position) {\n return _this.setState({\n isLoading: false,\n coords: {\n latitude: position.coords.latitude,\n longitude: position.coords.longitude,\n },\n error: undefined,\n });\n }, function (error) { return _this.setState({ error: error, isLoading: false }); });\n };\n return _this;\n }\n GeoPosition.prototype.componentDidMount = function () {\n this.requestGeo();\n };\n GeoPosition.prototype.componentWillUnmount = function () {\n navigator.geolocation.clearWatch(this.geoId);\n };\n GeoPosition.prototype.render = function () {\n var _a = this.props, render = _a.render, component = _a.component, children = _a.children;\n return component\n ? createElement(component, this.state)\n : render\n ? render(this.state)\n : children\n ? typeof children === 'function'\n ? children(this.state)\n : !isEmptyChildren(children) ? Children.only(children) : null\n : null;\n };\n return GeoPosition;\n}(Component));\n\nfunction withGeoPosition(Component$$1) {\n var S = function (props) {\n return (createElement(GeoPosition, { render: function (p) { return createElement(Component$$1, __assign({}, props, p)); } }));\n };\n return hoistNonReactStatics(S, Component$$1);\n}\n\nvar M = require('react-media');\nvar Media = M;\n\nvar WindowSize = (function (_super) {\n __extends(WindowSize, _super);\n function WindowSize() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.state = { width: 0, height: 0 };\n _this.handleWindowSize = throttle(function () {\n _this.setState({ width: window.innerWidth, height: window.innerHeight });\n }, _this.props.throttle);\n return _this;\n }\n WindowSize.prototype.componentDidMount = function () {\n this.handleWindowSize();\n window.addEventListener('resize', this.handleWindowSize);\n };\n WindowSize.prototype.componentWillUnmount = function () {\n window.removeEventListener('resize', this.handleWindowSize);\n };\n WindowSize.prototype.render = function () {\n var _a = this.props, render = _a.render, component = _a.component, children = _a.children;\n return component\n ? createElement(component, this.state)\n : render\n ? render(this.state)\n : children\n ? typeof children === 'function'\n ? children(this.state)\n : !isEmptyChildren(children) ? Children.only(children) : null\n : null;\n };\n WindowSize.defaultProps = {\n throttle: 100,\n };\n return WindowSize;\n}(Component));\n\nfunction withWindowSize(Component$$1) {\n var S = function (props) {\n return (createElement(WindowSize, { render: function (p) { return createElement(Component$$1, __assign({}, props, p)); } }));\n };\n return hoistNonReactStatics(S, Component$$1);\n}\n\nvar Locales = (function (_super) {\n __extends(Locales, _super);\n function Locales() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.state = { locale: _this.preferredLocales() };\n _this.handleLanguageChange = function () {\n _this.setState({\n locale: _this.preferredLocales(),\n });\n };\n return _this;\n }\n Locales.prototype.preferredLocales = function () {\n if (navigator.languages && navigator.languages.length > 0) {\n return Intl.getCanonicalLocales(navigator.languages)[0];\n }\n return Intl.getCanonicalLocales([navigator.language])[0];\n };\n Locales.prototype.componentDidMount = function () {\n window.addEventListener('languagechange', this.handleLanguageChange);\n };\n Locales.prototype.componentWillUnmount = function () {\n window.removeEventListener('languagechange', this.handleLanguageChange);\n };\n Locales.prototype.render = function () {\n var _a = this.props, render = _a.render, component = _a.component, children = _a.children;\n return component\n ? createElement(component, this.state)\n : render\n ? render(this.state)\n : children\n ? typeof children === 'function'\n ? children(this.state)\n : !isEmptyChildren(children) ? Children.only(children) : null\n : null;\n };\n return Locales;\n}(Component));\n\nfunction withLocales(Component$$1) {\n var S = function (props) {\n return (createElement(Locales, { render: function (p) { return createElement(Component$$1, __assign({}, props, p)); } }));\n };\n return hoistNonReactStatics(S, Component$$1);\n}\n\nexport { Scroll, withScroll, DeviceMotion, withDeviceMotion, DeviceOrientation, withDeviceOrientation, Network, withNetwork, GeoPosition, withGeoPosition, Media, WindowSize, withWindowSize, Locales, withLocales };\n//# sourceMappingURL=index.es6.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-fns/dist/index.es6.js\n// module id = 21\n// module chunks = 0","'use strict';\n\nexports.__esModule = true;\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _propTypes = require('prop-types');\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nvar _json2mq = require('json2mq');\n\nvar _json2mq2 = _interopRequireDefault(_json2mq);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n/**\n * Conditionally renders based on whether or not a media query matches.\n */\nvar Media = function (_React$Component) {\n _inherits(Media, _React$Component);\n\n function Media() {\n var _temp, _this, _ret;\n\n _classCallCheck(this, Media);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.state = {\n matches: _this.props.defaultMatches\n }, _this.updateMatches = function () {\n return _this.setState({ matches: _this.mediaQueryList.matches });\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n Media.prototype.componentWillMount = function componentWillMount() {\n if ((typeof window === 'undefined' ? 'undefined' : _typeof(window)) !== 'object') return;\n\n var query = this.props.query;\n\n\n if (typeof query !== 'string') query = (0, _json2mq2.default)(query);\n\n this.mediaQueryList = window.matchMedia(query);\n this.mediaQueryList.addListener(this.updateMatches);\n this.updateMatches();\n };\n\n Media.prototype.componentWillUnmount = function componentWillUnmount() {\n this.mediaQueryList.removeListener(this.updateMatches);\n };\n\n Media.prototype.render = function render() {\n var _props = this.props,\n children = _props.children,\n render = _props.render;\n var matches = this.state.matches;\n\n\n return render ? matches ? render() : null : children ? typeof children === 'function' ? children(matches) : !Array.isArray(children) || children.length ? // Preact defaults to empty children array\n matches ? _react2.default.Children.only(children) : null : null : null;\n };\n\n return Media;\n}(_react2.default.Component);\n\nMedia.propTypes = {\n defaultMatches: _propTypes2.default.bool,\n query: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.object, _propTypes2.default.arrayOf(_propTypes2.default.object.isRequired)]).isRequired,\n render: _propTypes2.default.func,\n children: _propTypes2.default.oneOfType([_propTypes2.default.node, _propTypes2.default.func])\n};\nMedia.defaultProps = {\n defaultMatches: true\n};\nexports.default = Media;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-media/Media.js\n// module id = 22\n// module chunks = 0","'use strict';\n\nvar _Media = require('./Media');\n\nvar _Media2 = _interopRequireDefault(_Media);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// TODO: Remove in the next major release.\n_Media2.default.Media = _Media2.default; /* eslint-env node */\n\n\nmodule.exports = _Media2.default;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-media/index.js\n// module id = 23\n// module chunks = 0",";(function(root, factory) {\n if (typeof define === 'function' && define.amd) {\n define([], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory();\n } else {\n root.ScrollSwipe = factory();\n }\n}(this, function() {\n'use strict';\n\nvar VERTICAL = 'VERTICAL';\nvar HORIZONTAL = 'HORIZONTAL';\n\nvar acceptedParams = {\n target: true,\n scrollSensitivity: true,\n touchSensitivity: true,\n scrollCb: true,\n touchCb: true,\n scrollPreventDefault: true,\n touchPreventDefault: true\n};\n\nif (typeof module !== 'undefined') {\n module.exports = ScrollSwipe;\n}\n\nfunction ScrollSwipe(opts) {\n var _this = this;\n\n Object.keys(opts).forEach(function (key) {\n if (acceptedParams[key]) {\n _this[key] = opts[key];\n return;\n }\n\n throw new Error('unknown options for ScrollSwipe: ' + key);\n });\n\n if (!opts.target) {\n throw new Error('must provide DOM target element to ScrollSwipe');\n }\n\n if (!this.scrollSensitivity || this.scrollSensitivity < 0) {\n this.scrollSensitivity = 0;\n }\n\n if (!this.touchSensitivity || this.touchSensitivity < 0) {\n this.touchSensitivity = 0;\n }\n\n this.startTouchEvent = null;\n this.latestTouchEvent = null;\n this.latestTouch = null;\n\n this.startScrollEvent = null;\n this.latestScrollEvent = null;\n this.latestScroll = null;\n\n this.intent = 0;\n this.currentDirection = VERTICAL;\n this.touchArr = [];\n this.xArr = [];\n this.yArr = [];\n this.touchArrX = [];\n this.touchArrY = [];\n\n this.scrollPending = false;\n\n //these should only init if true\n if (this.scrollCb) {\n this.initScroll();\n }\n\n if (this.touchCb) {\n this.initTouch();\n }\n\n return this;\n}\n\nScrollSwipe.prototype.listen = function listen() {\n this.flush();\n this.scrollPending = false;\n return this;\n};\n\nScrollSwipe.prototype.onWheel = function onWheel(e) {\n var _this2 = this;\n\n if (this.scrollPreventDefault) {\n e.preventDefault();\n }\n\n if (this.scrollPending) {\n return;\n }\n\n this.startScrollEvent = e;\n\n var x = e.deltaX;\n var y = e.deltaY;\n\n this.addXScroll(x);\n this.addYScroll(y);\n\n this.scrollFulfilled(function (fulfilled, direction, intent) {\n if (!fulfilled) {\n return;\n }\n\n _this2.lockout();\n _this2.latestScrollEvent = e;\n\n var result = {\n startEvent: e,\n lastEvent: _this2.latestScrollEvent,\n scrollPending: _this2.scrollPending,\n direction: direction,\n intent: intent\n };\n\n _this2.scrollCb(result);\n _this2.undoLockout();\n });\n};\n\nScrollSwipe.prototype.initScroll = function initScroll() {\n this.newOnWheel = this.onWheel.bind(this);\n\n if (this.target && this.target.addEventListener) {\n this.target.addEventListener('wheel', this.newOnWheel, false);\n }\n\n return this;\n};\n\nScrollSwipe.prototype.touchMove = function touchMove(e) {\n if (this.touchPreventDefault) {\n e.preventDefault();\n }\n\n var changedTouches = e.changedTouches[0];\n var x = changedTouches.clientX;\n var y = changedTouches.clientY;\n\n this.startTouchEvent = e;\n this.addXTouch(x);\n this.addYTouch(y);\n};\n\nScrollSwipe.prototype.touchEnd = function touchEnd(e) {\n var _this3 = this;\n\n this.touchFulfilled(e, function (fulfilled, direction, intent) {\n if (!fulfilled) {\n return;\n }\n\n var result = {\n startEvent: _this3.startTouchEvent,\n lastEvent: _this3.latestTouchEvent,\n scrollPending: _this3.scrollPending,\n direction: direction,\n intent: intent\n };\n\n _this3.touchCb(result);\n });\n};\n\nScrollSwipe.prototype.initTouch = function initTouch() {\n this.newTouchMove = this.touchMove.bind(this);\n this.newTouchEnd = this.touchEnd.bind(this);\n\n if (this.target && this.target.addEventListener) {\n this.target.addEventListener('touchmove', this.newTouchMove, false);\n this.target.addEventListener('touchend', this.newTouchEnd, false);\n }\n\n return this;\n};\n\n//touch events\nScrollSwipe.prototype.touchFulfilled = function touchFulfilled(e, cb) {\n if (!e) {\n throw new Error('must provide event to touchFulfilled');\n }\n\n if (!cb) {\n throw new Error('must provide callback to touchFulfilled');\n }\n\n var touchSensitivity = this.touchSensitivity,\n touchArrX = this.touchArrX,\n touchArrY = this.touchArrY;\n\n\n var bool = touchArrX.length > touchSensitivity && touchArrY.length > touchSensitivity;\n\n if (!bool) {\n return cb(false, null);\n }\n\n var changedTouches = e.changedTouches[0];\n\n var xStart = touchArrX[0];\n var yStart = touchArrY[0];\n\n var xEnd = changedTouches.clientX;\n var yEnd = changedTouches.clientY;\n\n var xIntent = xStart < xEnd ? 0 : 1;\n var yIntent = yStart < yEnd ? 0 : 1;\n\n var direction = VERTICAL;\n\n //determine vertical or horizontal based on the greatest difference\n if (Math.abs(xStart - xEnd) > Math.abs(yStart - yEnd)) {\n direction = HORIZONTAL;\n }\n\n var intent = direction === VERTICAL ? yIntent : xIntent;\n\n swap.call(this, intent, direction);\n this.resetTouches();\n this.scrollPending = true;\n this.latestTouchEvent = e;\n\n cb(this.scrollPending, this.currentDirection, this.currentIntent);\n return this;\n};\n\nScrollSwipe.prototype.getTouch = function getTouch(idx) {\n return this.touchArr[idx];\n};\n\nScrollSwipe.prototype.addXTouch = function addTouch(touch) {\n if (this.pending()) {\n return this;\n }\n\n this.latestTouch = touch;\n this.touchArrX.push(touch);\n\n return this;\n};\n\nScrollSwipe.prototype.addYTouch = function addTouch(touch) {\n if (this.pending()) {\n return this;\n }\n\n this.latestTouch = touch;\n this.touchArrY.push(touch);\n\n return this;\n};\n\nScrollSwipe.prototype.resetTouches = function resetTouches() {\n this.touchArrX = [];\n this.touchArrY = [];\n return this;\n};\n\n//wheel events\nScrollSwipe.prototype.addXScroll = function addXScroll(s) {\n if (this.pending()) {\n return this;\n }\n\n this.latestScroll = s;\n this.xArr.push(s);\n return this;\n};\n\nScrollSwipe.prototype.addYScroll = function addYScroll(s) {\n if (this.pending()) {\n return this;\n }\n\n this.latestScroll = s;\n this.yArr.push(s);\n return this;\n};\n\nScrollSwipe.prototype.getDirection = function getDirection() {\n return this.currentDirection;\n};\n\nScrollSwipe.prototype.resetScroll = function resetScroll() {\n this.xArr = [];\n this.yArr = [];\n\n return this;\n};\n\nScrollSwipe.prototype.flush = function flush() {\n this.resetScroll();\n this.resetTouches();\n\n return this;\n};\n\nScrollSwipe.prototype.lockout = function lockout() {\n this.originalAddXTouch = this.addXTouch;\n this.originalAddYTouch = this.addYTouch;\n\n this.originalAddXScroll = this.addXScroll;\n this.originalAddYScroll = this.addYScroll;\n\n this.addXScroll = function () {};\n this.addYScroll = function () {};\n this.addXTouch = function () {};\n this.addYTouch = function () {};\n\n return this;\n};\n\nScrollSwipe.prototype.undoLockout = function undoLockout() {\n this.addXScroll = this.originalAddXScroll;\n this.addYScroll = this.originalAddYScroll;\n this.addXTouch = this.originalAddXTouch;\n this.addYTouch = this.originalAddYTouch;\n\n return this;\n};\n\nScrollSwipe.prototype.scrollFulfilled = function scrollFulfilled(cb) {\n if (!cb) {\n throw new Error('must provide callback to scrollFulfilled');\n }\n\n var xArr = this.xArr,\n yArr = this.yArr,\n scrollSensitivity = this.scrollSensitivity;\n\n\n var bool = xArr.length > scrollSensitivity && yArr.length > scrollSensitivity;\n\n var _evalScrollDirection = this.evalScrollDirection(),\n direction = _evalScrollDirection.direction,\n intent = _evalScrollDirection.intent;\n\n if (bool) {\n swap.call(this, intent, direction);\n this.resetScroll();\n this.scrollPending = true;\n }\n\n cb(this.scrollPending, this.currentDirection, this.currentIntent);\n return this;\n};\n\nScrollSwipe.prototype.evalScrollDirection = function evalScrollDirection() {\n var _getSums = this.getSums(),\n x = _getSums.x,\n y = _getSums.y,\n xIntent = _getSums.xIntent,\n yIntent = _getSums.yIntent;\n\n var direction = x > y ? HORIZONTAL : VERTICAL;\n var base = direction === VERTICAL ? yIntent : xIntent;\n\n var intent = 0;\n\n if (base > 0) {\n intent = 1;\n }\n\n return { direction: direction, intent: intent };\n};\n\nScrollSwipe.prototype.getSums = function getSums() {\n var xArr = this.xArr,\n yArr = this.yArr;\n\n\n var xIntent = 0;\n var yIntent = 0;\n\n var x = xArr.reduce(function (result, curr) {\n xIntent = xIntent + curr;\n return result += Math.abs(curr);\n }, 0);\n\n var y = yArr.reduce(function (result, curr) {\n yIntent = yIntent + curr;\n return result += Math.abs(curr);\n }, 0);\n\n return { x: x, y: y, xIntent: xIntent, yIntent: yIntent };\n};\n\nScrollSwipe.prototype.getScrollDirection = function getScrollDirection() {\n return this.currentDirection;\n};\n\nScrollSwipe.prototype.pending = function pending() {\n return this.scrollPending;\n};\n\nScrollSwipe.prototype.killScroll = function killScroll() {\n if (this.target && this.target.removeEventListener) {\n this.target.removeEventListener('wheel', this.newOnWheel, false);\n }\n\n return this;\n};\n\nScrollSwipe.prototype.killTouch = function killTouch() {\n if (this.target && this.target.removeEventListener) {\n this.target.removeEventListener('touchmove', this.newTouchMove, false);\n this.target.removeEventListener('touchend', this.newTouchEnd, false);\n }\n\n return this;\n};\n\nScrollSwipe.prototype.killAll = function teardown() {\n this.killScroll().killTouch();\n return this;\n};\n\nfunction swap(intent, direction) {\n this.previousIntent = this.currentIntent;\n this.currentIntent = intent;\n this.previousDirection = this.currentDirection;\n this.currentDirection = direction;\n}\nreturn ScrollSwipe;\n}));\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/scroll-swipe/dist/ScrollSwipe.js\n// module id = 24\n// module chunks = 0","var camel2hyphen = function (str) {\n return str\n .replace(/[A-Z]/g, function (match) {\n return '-' + match.toLowerCase();\n })\n .toLowerCase();\n};\n\nmodule.exports = camel2hyphen;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/string-convert/camel2hyphen.js\n// module id = 25\n// module chunks = 0","var g;\r\n\r\n// This works in non-strict mode\r\ng = (function() {\r\n\treturn this;\r\n})();\r\n\r\ntry {\r\n\t// This works if eval is allowed (see CSP)\r\n\tg = g || Function(\"return this\")() || (1,eval)(\"this\");\r\n} catch(e) {\r\n\t// This works if the window reference is available\r\n\tif(typeof window === \"object\")\r\n\t\tg = window;\r\n}\r\n\r\n// g can still be undefined, but nothing to do about it...\r\n// We return undefined, instead of nothing here, so it's\r\n// easier to handle this case. if(!global) { ...}\r\n\r\nmodule.exports = g;\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// (webpack)/buildin/global.js\n// module id = 26\n// module chunks = 0","'use strict'\nmodule.exports = (typeof self === 'object' && self.self === self && self) ||\n (typeof global === 'object' && global.global === global && global) ||\n this\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/window-or-global/lib/index.js\n// module id = 27\n// module chunks = 0"],"sourceRoot":""} -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # **[Fullpage-React](https://cmswalker.github.io/fullpage-react/)** 2 | 3 | Stateful fullpage.js inspired scrolling for React 4 | 5 | ## **This package is no longer maintained, and has been moved under the official [fullpage.js](https://github.com/alvarotrigo/fullpage.js/) project! Please use the official [react-fullpage](https://github.com/alvarotrigo/react-fullpage) package!** 6 | 7 | --- 8 | 9 | ### Demo can be found [here](https://cmswalker.github.io/fullpage-react/) along with the [source code](https://github.com/cmswalker/fullpage-react/blob/master/examples/fullpageReactExample.js) 10 | 11 | ### [Starter Example](https://github.com/cmswalker/fullpage-react/tree/master/examples) 12 | 13 | ### Basic Setup 14 | 15 | ```sh 16 | // NPM 17 | npm i fullpage-react --save 18 | 19 | // Yarn 20 | yarn add fullpage-react 21 | ``` 22 | 23 | #### Component Boilerplate 24 | 25 | ```jsx 26 | import { Fullpage, Slide, HorizontalSlider } from 'fullpage-react'; 27 | 28 | const fullPageOptions = { 29 | // for mouse/wheel events 30 | // represents the level of force required to generate a slide change on non-mobile, 10 is default 31 | scrollSensitivity: 7, 32 | 33 | // for touchStart/touchEnd/mobile scrolling 34 | // represents the level of force required to generate a slide change on mobile, 10 is default 35 | touchSensitivity: 7, 36 | scrollSpeed: 500, 37 | hideScrollBars: true, 38 | enableArrowKeys: true 39 | }; 40 | 41 | const horizontalSliderProps = { 42 | name: 'horizontalSlider1', // name is required 43 | infinite: true, // enable infinite scrolling 44 | }; 45 | 46 | const horizontalSlides = [ 47 | Slide 2.1 , 48 | Slide 2.2 49 | ]; 50 | horizontalSliderProps.slides = horizontalSlides; 51 | 52 | const slides = [ 53 | Slide 1 , 54 | , 55 | Slide 3 56 | ]; 57 | fullPageOptions.slides = slides; 58 | 59 | 60 | 61 | ``` 62 | 63 | #### Events API 64 | 65 | There are two functions located on the `Fullpage` class. These are used for manually changing the vertical and horizontal slides via UI events. 66 | 67 | There are also two optional props for `` that will send data `onSlideChangeStart` and `onSlideChangeEnd` 68 | 69 | Sliding can be cancelled in the event that you want the user to stay fixed on a slide for some reason. If the function passed to `onSlideChangeStart` returns `true`, sliding can be cancellabe until it returns falsy. 70 | 71 | An example can be found here [here](https://github.com/cmswalker/fullpage-react/blob/master/examples/fullpageReactExample.js) 72 | -------------------------------------------------------------------------------- /__tests__/Fullpage.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Fullpage, Slide, HorizontalSlider } from '../FullpageReact'; 3 | import renderer from 'react-test-renderer'; 4 | 5 | const fullPageOptions = { 6 | scrollSensitivity: 7, 7 | touchSensitivity: -3, 8 | scrollSpeed: 500, 9 | resetSlides: true, 10 | hideScrollBars: true, 11 | enableArrowKeys: true 12 | }; 13 | 14 | const createNodeMock = () => { 15 | return { 16 | addEventListener: () => {} 17 | }; 18 | }; 19 | 20 | const killWindow = () => { 21 | global.__window__ = global.window; 22 | global.window = undefined; 23 | window = global.window; 24 | }; 25 | 26 | const restoreWindow = (copy) => { 27 | global.window = global.__window__; 28 | window = global.window; 29 | } 30 | 31 | describe('FullpageReact', () => { 32 | 33 | describe('with Slides', () => { 34 | 35 | beforeEach(() => { 36 | const verticalSlides = [ 37 |

1

, 38 |

2

39 | ]; 40 | fullPageOptions.slides = verticalSlides; 41 | }); 42 | 43 | it('should support vertical slides', () => { 44 | const component = renderer.create( 45 | , 46 | {createNodeMock} 47 | ); 48 | const tree = component.toJSON(); 49 | expect(tree).toMatchSnapshot(); 50 | }); 51 | }); 52 | 53 | describe('with HorizontalSlides', () => { 54 | 55 | beforeEach(() => { 56 | const horizontalSliderProps = {}; 57 | const horizontalSlides = [ 58 |

Horizontal 1

, 59 |

Horizontal 2

, 60 |

Horizontal 3

61 | ]; 62 | horizontalSliderProps.slides = horizontalSlides; 63 | 64 | const verticalSlides = [ 65 |

1

, 66 | 67 | ]; 68 | fullPageOptions.slides = verticalSlides; 69 | }); 70 | 71 | it('should support horizontal slides', () => { 72 | const component = renderer.create( 73 | , 74 | {createNodeMock} 75 | ); 76 | const tree = component.toJSON(); 77 | expect(tree).toMatchSnapshot(); 78 | }); 79 | }); 80 | 81 | describe('with SSR', () => { 82 | beforeEach(() => { 83 | const verticalSlides = [ 84 |

1

85 |
, 86 |

2

87 |
]; 88 | fullPageOptions.slides = verticalSlides; 89 | 90 | killWindow(); 91 | }); 92 | 93 | afterEach(() => { 94 | restoreWindow(); 95 | }) 96 | 97 | it('should mount via SSR', () => { 98 | const component = renderer.create( 99 | , 100 | { createNodeMock } 101 | ); 102 | const tree = component.toJSON(); 103 | expect(tree).toMatchSnapshot(); 104 | }); 105 | 106 | it('should unmount via SSR', () => { 107 | const component = renderer.create( 108 | , 109 | { createNodeMock } 110 | ); 111 | 112 | component.unmount(); 113 | const tree = component.toJSON(); 114 | expect(tree).toMatchSnapshot(); 115 | }) 116 | }); 117 | 118 | }); 119 | -------------------------------------------------------------------------------- /__tests__/__snapshots__/Fullpage.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`FullpageReact with HorizontalSlides should support horizontal slides 1`] = ` 4 |
7 |
22 |

23 | 1 24 |

25 |
26 |
44 |
59 |

60 | Horizontal 1 61 |

62 |
63 |
78 |

79 | Horizontal 2 80 |

81 |
82 |
97 |

98 | Horizontal 3 99 |

100 |
101 |
102 |
103 | `; 104 | 105 | exports[`FullpageReact with SSR should mount via SSR 1`] = ` 106 |
109 |
124 |

125 | 1 126 |

127 |
128 |
143 |

144 | 2 145 |

146 |
147 |
148 | `; 149 | 150 | exports[`FullpageReact with SSR should unmount via SSR 1`] = `null`; 151 | 152 | exports[`FullpageReact with Slides should support vertical slides 1`] = ` 153 |
156 |
171 |

172 | 1 173 |

174 |
175 |
190 |

191 | 2 192 |

193 |
194 |
195 | `; 196 | -------------------------------------------------------------------------------- /examples/exampleStyles.styl: -------------------------------------------------------------------------------- 1 | $blue = #35A7FF 2 | $dark-blue = #38618C 3 | $white = #FFFFFF 4 | $red = #FF5964 5 | $yellow = #FFE74C 6 | $green = #B8E0D2 7 | 8 | .blue 9 | background-color $blue 10 | .dark-blue 11 | background-color $dark-blue 12 | .white 13 | background-color $white 14 | .red 15 | background-color $red 16 | .yellow 17 | background-color $yellow 18 | .green 19 | background-color $green 20 | 21 | .color-blue 22 | color $blue 23 | .color-white 24 | color $white 25 | .color-red 26 | color $red 27 | 28 | 29 | button 30 | background-color $white 31 | &:hover 32 | background-color lightgray 33 | 34 | p 35 | padding-top 50% 36 | text-align center 37 | font-size 30px 38 | -------------------------------------------------------------------------------- /examples/fullpageReactExample.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | import { Fullpage, HorizontalSlider, Slide } from '../lib/index'; 4 | const { changeFullpageSlide, changeHorizontalSlide } = Fullpage; 5 | 6 | require('./normalize.css'); 7 | require('./skeleton.css'); 8 | require('./exampleStyles.styl'); 9 | 10 | const fullPageOptions = { 11 | // for mouse/wheel events 12 | // represents the level of force required to generate a slide change on non-mobile, 0 is default 13 | scrollSensitivity: 2, 14 | 15 | // for touchStart/touchEnd/mobile scrolling 16 | // represents the level of force required to generate a slide change on mobile, 0 is default 17 | touchSensitivity: 2, 18 | scrollSpeed: 500, 19 | resetSlides: true, 20 | hideScrollBars: true, 21 | enableArrowKeys: true, 22 | 23 | // optional, set the initial vertical slide 24 | activeSlide: 0 25 | }; 26 | 27 | const topNavStyle = { 28 | textAlign: 'center', 29 | position: 'fixed', 30 | width: '100%', 31 | cursor: 'pointer', 32 | zIndex: 10, 33 | backgroundColor: 'rgba(255, 255, 255, 0.4)', 34 | top: '0px' 35 | }; 36 | 37 | const horizontalNavStyle = { 38 | position: 'absolute', 39 | width: '100%', 40 | top: '50%', 41 | zIndex: 10 42 | }; 43 | 44 | const horizontalSliderProps = { 45 | name: 'horizontalSlider1', 46 | infinite: true 47 | }; 48 | 49 | class FullpageReact extends React.Component { 50 | constructor(props) { 51 | super(props); 52 | this.state = { 53 | active: { 54 | Fullpage: 0, 55 | horizontalSlider1: 0 56 | } 57 | }; 58 | 59 | this.onSlideChangeStart = this.onSlideChangeStart.bind(this); 60 | this.onSlideChangeEnd = this.onSlideChangeEnd.bind(this); 61 | } 62 | 63 | onSlideChangeStart(name, props, state, newState) { 64 | if (!this.horizontalNav) { 65 | this.horizontalNav = document.getElementById('horizontal-nav'); 66 | } 67 | 68 | if (name === 'horizontalSlider1') { 69 | scrollNavStart(this.horizontalNav); 70 | } 71 | } 72 | 73 | onSlideChangeEnd(name, props, state, newState) { 74 | if (name === 'horizontalSlider1') { 75 | scrollNavEnd(this.horizontalNav); 76 | } 77 | 78 | const oldActive = this.state.active; 79 | const sliderState = { 80 | [name]: newState.activeSlide 81 | }; 82 | 83 | const updatedState = Object.assign(oldActive, sliderState); 84 | this.setState(updatedState); 85 | } 86 | 87 | componentDidMount() { 88 | 89 | } 90 | 91 | render() { 92 | const { active } = this.state; 93 | 94 | const currentActive = active.Fullpage; 95 | const prevSlide = changeFullpageSlide.bind(null, currentActive - 1); 96 | const nextSlide = changeFullpageSlide.bind(null, currentActive + 1); 97 | const goToTop = changeFullpageSlide.bind(null, 0); 98 | 99 | const horizontalSliderName = horizontalSliderProps.name; 100 | const horizontalActive = this.state.active[horizontalSliderName]; 101 | 102 | const prevHorizontalSlide = changeHorizontalSlide.bind(null, horizontalSliderName, horizontalActive - 1); 103 | const nextHorizontalSlide = changeHorizontalSlide.bind(null, horizontalSliderName, horizontalActive + 1); 104 | 105 | const topNav = ( 106 |
107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 |
117 | ); 118 | 119 | const horizontalNav = ( 120 |
121 | 122 | 123 |
124 | ); 125 | 126 | const horizontalSlides = [ 127 |

Horizontal 1

, 128 |

Horizontal 2

, 129 |

Horizontal 3

130 | ]; 131 | horizontalSliderProps.slides = horizontalSlides; 132 | 133 | const horizontalSlider = {horizontalNav}; 134 | 135 | const verticalSlides = [ 136 | 137 |

Slide 1

138 |
, 139 | horizontalSlider, 140 |

Slide 3

141 | ]; 142 | fullPageOptions.slides = verticalSlides; 143 | 144 | return ( 145 | 146 | {topNav} 147 | 148 | ); 149 | } 150 | } 151 | 152 | function scrollNavStart(nav) { 153 | // make the nav fixed when we start scrolling horizontally 154 | nav.style.position = 'fixed'; 155 | } 156 | 157 | function scrollNavEnd(nav) { 158 | // make the nav absolute when scroll finishes 159 | nav.style.position = 'absolute'; 160 | } 161 | 162 | export default FullpageReact; 163 | -------------------------------------------------------------------------------- /examples/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import FullpageReactExample from './fullpageReactExample'; 4 | 5 | const app = document.createElement('div'); 6 | document.body.appendChild(app); 7 | document.body.style.margin = 0; 8 | 9 | var meta = document.createElement('meta'); 10 | meta.setAttribute('http-equiv', 'X-UA-Compatible'); 11 | meta.setAttribute('content', 'IE=Edge'); 12 | document.getElementsByTagName('head')[0].appendChild(meta); 13 | 14 | var meta2 = document.createElement('meta'); 15 | meta2.setAttribute('name', 'viewport'); 16 | meta2.setAttribute('content', 'width=device-width, initial-scale=1'); 17 | document.getElementsByTagName('head')[0].appendChild(meta2); 18 | 19 | ReactDOM.render( 20 | , 21 | app 22 | ); 23 | -------------------------------------------------------------------------------- /examples/normalize.css: -------------------------------------------------------------------------------- 1 | /*! normalize.css v5.0.0 | MIT License | github.com/necolas/normalize.css */ 2 | 3 | /* Document 4 | ========================================================================== */ 5 | 6 | /** 7 | * 1. Change the default font family in all browsers (opinionated). 8 | * 2. Correct the line height in all browsers. 9 | * 3. Prevent adjustments of font size after orientation changes in 10 | * IE on Windows Phone and in iOS. 11 | */ 12 | 13 | html { 14 | font-family: sans-serif; /* 1 */ 15 | line-height: 1.15; /* 2 */ 16 | -ms-text-size-adjust: 100%; /* 3 */ 17 | -webkit-text-size-adjust: 100%; /* 3 */ 18 | } 19 | 20 | /* Sections 21 | ========================================================================== */ 22 | 23 | /** 24 | * Remove the margin in all browsers (opinionated). 25 | */ 26 | 27 | body { 28 | margin: 0; 29 | } 30 | 31 | /** 32 | * Add the correct display in IE 9-. 33 | */ 34 | 35 | article, 36 | aside, 37 | footer, 38 | header, 39 | nav, 40 | section { 41 | display: block; 42 | } 43 | 44 | /** 45 | * Correct the font size and margin on `h1` elements within `section` and 46 | * `article` contexts in Chrome, Firefox, and Safari. 47 | */ 48 | 49 | h1 { 50 | font-size: 2em; 51 | margin: 0.67em 0; 52 | } 53 | 54 | /* Grouping content 55 | ========================================================================== */ 56 | 57 | /** 58 | * Add the correct display in IE 9-. 59 | * 1. Add the correct display in IE. 60 | */ 61 | 62 | figcaption, 63 | figure, 64 | main { /* 1 */ 65 | display: block; 66 | } 67 | 68 | /** 69 | * Add the correct margin in IE 8. 70 | */ 71 | 72 | figure { 73 | margin: 1em 40px; 74 | } 75 | 76 | /** 77 | * 1. Add the correct box sizing in Firefox. 78 | * 2. Show the overflow in Edge and IE. 79 | */ 80 | 81 | hr { 82 | box-sizing: content-box; /* 1 */ 83 | height: 0; /* 1 */ 84 | overflow: visible; /* 2 */ 85 | } 86 | 87 | /** 88 | * 1. Correct the inheritance and scaling of font size in all browsers. 89 | * 2. Correct the odd `em` font sizing in all browsers. 90 | */ 91 | 92 | pre { 93 | font-family: monospace, monospace; /* 1 */ 94 | font-size: 1em; /* 2 */ 95 | } 96 | 97 | /* Text-level semantics 98 | ========================================================================== */ 99 | 100 | /** 101 | * 1. Remove the gray background on active links in IE 10. 102 | * 2. Remove gaps in links underline in iOS 8+ and Safari 8+. 103 | */ 104 | 105 | a { 106 | background-color: transparent; /* 1 */ 107 | -webkit-text-decoration-skip: objects; /* 2 */ 108 | } 109 | 110 | /** 111 | * Remove the outline on focused links when they are also active or hovered 112 | * in all browsers (opinionated). 113 | */ 114 | 115 | a:active, 116 | a:hover { 117 | outline-width: 0; 118 | } 119 | 120 | /** 121 | * 1. Remove the bottom border in Firefox 39-. 122 | * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari. 123 | */ 124 | 125 | abbr[title] { 126 | border-bottom: none; /* 1 */ 127 | text-decoration: underline; /* 2 */ 128 | text-decoration: underline dotted; /* 2 */ 129 | } 130 | 131 | /** 132 | * Prevent the duplicate application of `bolder` by the next rule in Safari 6. 133 | */ 134 | 135 | b, 136 | strong { 137 | font-weight: inherit; 138 | } 139 | 140 | /** 141 | * Add the correct font weight in Chrome, Edge, and Safari. 142 | */ 143 | 144 | b, 145 | strong { 146 | font-weight: bolder; 147 | } 148 | 149 | /** 150 | * 1. Correct the inheritance and scaling of font size in all browsers. 151 | * 2. Correct the odd `em` font sizing in all browsers. 152 | */ 153 | 154 | code, 155 | kbd, 156 | samp { 157 | font-family: monospace, monospace; /* 1 */ 158 | font-size: 1em; /* 2 */ 159 | } 160 | 161 | /** 162 | * Add the correct font style in Android 4.3-. 163 | */ 164 | 165 | dfn { 166 | font-style: italic; 167 | } 168 | 169 | /** 170 | * Add the correct background and color in IE 9-. 171 | */ 172 | 173 | mark { 174 | background-color: #ff0; 175 | color: #000; 176 | } 177 | 178 | /** 179 | * Add the correct font size in all browsers. 180 | */ 181 | 182 | small { 183 | font-size: 80%; 184 | } 185 | 186 | /** 187 | * Prevent `sub` and `sup` elements from affecting the line height in 188 | * all browsers. 189 | */ 190 | 191 | sub, 192 | sup { 193 | font-size: 75%; 194 | line-height: 0; 195 | position: relative; 196 | vertical-align: baseline; 197 | } 198 | 199 | sub { 200 | bottom: -0.25em; 201 | } 202 | 203 | sup { 204 | top: -0.5em; 205 | } 206 | 207 | /* Embedded content 208 | ========================================================================== */ 209 | 210 | /** 211 | * Add the correct display in IE 9-. 212 | */ 213 | 214 | audio, 215 | video { 216 | display: inline-block; 217 | } 218 | 219 | /** 220 | * Add the correct display in iOS 4-7. 221 | */ 222 | 223 | audio:not([controls]) { 224 | display: none; 225 | height: 0; 226 | } 227 | 228 | /** 229 | * Remove the border on images inside links in IE 10-. 230 | */ 231 | 232 | img { 233 | border-style: none; 234 | } 235 | 236 | /** 237 | * Hide the overflow in IE. 238 | */ 239 | 240 | svg:not(:root) { 241 | overflow: hidden; 242 | } 243 | 244 | /* Forms 245 | ========================================================================== */ 246 | 247 | /** 248 | * 1. Change the font styles in all browsers (opinionated). 249 | * 2. Remove the margin in Firefox and Safari. 250 | */ 251 | 252 | button, 253 | input, 254 | optgroup, 255 | select, 256 | textarea { 257 | font-family: sans-serif; /* 1 */ 258 | font-size: 100%; /* 1 */ 259 | line-height: 1.15; /* 1 */ 260 | margin: 0; /* 2 */ 261 | } 262 | 263 | /** 264 | * Show the overflow in IE. 265 | * 1. Show the overflow in Edge. 266 | */ 267 | 268 | button, 269 | input { /* 1 */ 270 | overflow: visible; 271 | } 272 | 273 | /** 274 | * Remove the inheritance of text transform in Edge, Firefox, and IE. 275 | * 1. Remove the inheritance of text transform in Firefox. 276 | */ 277 | 278 | button, 279 | select { /* 1 */ 280 | text-transform: none; 281 | } 282 | 283 | /** 284 | * 1. Prevent a WebKit bug where (2) destroys native `audio` and `video` 285 | * controls in Android 4. 286 | * 2. Correct the inability to style clickable types in iOS and Safari. 287 | */ 288 | 289 | button, 290 | html [type="button"], /* 1 */ 291 | [type="reset"], 292 | [type="submit"] { 293 | -webkit-appearance: button; /* 2 */ 294 | } 295 | 296 | /** 297 | * Remove the inner border and padding in Firefox. 298 | */ 299 | 300 | button::-moz-focus-inner, 301 | [type="button"]::-moz-focus-inner, 302 | [type="reset"]::-moz-focus-inner, 303 | [type="submit"]::-moz-focus-inner { 304 | border-style: none; 305 | padding: 0; 306 | } 307 | 308 | /** 309 | * Restore the focus styles unset by the previous rule. 310 | */ 311 | 312 | button:-moz-focusring, 313 | [type="button"]:-moz-focusring, 314 | [type="reset"]:-moz-focusring, 315 | [type="submit"]:-moz-focusring { 316 | outline: 1px dotted ButtonText; 317 | } 318 | 319 | /** 320 | * Change the border, margin, and padding in all browsers (opinionated). 321 | */ 322 | 323 | fieldset { 324 | border: 1px solid #c0c0c0; 325 | margin: 0 2px; 326 | padding: 0.35em 0.625em 0.75em; 327 | } 328 | 329 | /** 330 | * 1. Correct the text wrapping in Edge and IE. 331 | * 2. Correct the color inheritance from `fieldset` elements in IE. 332 | * 3. Remove the padding so developers are not caught out when they zero out 333 | * `fieldset` elements in all browsers. 334 | */ 335 | 336 | legend { 337 | box-sizing: border-box; /* 1 */ 338 | color: inherit; /* 2 */ 339 | display: table; /* 1 */ 340 | max-width: 100%; /* 1 */ 341 | padding: 0; /* 3 */ 342 | white-space: normal; /* 1 */ 343 | } 344 | 345 | /** 346 | * 1. Add the correct display in IE 9-. 347 | * 2. Add the correct vertical alignment in Chrome, Firefox, and Opera. 348 | */ 349 | 350 | progress { 351 | display: inline-block; /* 1 */ 352 | vertical-align: baseline; /* 2 */ 353 | } 354 | 355 | /** 356 | * Remove the default vertical scrollbar in IE. 357 | */ 358 | 359 | textarea { 360 | overflow: auto; 361 | } 362 | 363 | /** 364 | * 1. Add the correct box sizing in IE 10-. 365 | * 2. Remove the padding in IE 10-. 366 | */ 367 | 368 | [type="checkbox"], 369 | [type="radio"] { 370 | box-sizing: border-box; /* 1 */ 371 | padding: 0; /* 2 */ 372 | } 373 | 374 | /** 375 | * Correct the cursor style of increment and decrement buttons in Chrome. 376 | */ 377 | 378 | [type="number"]::-webkit-inner-spin-button, 379 | [type="number"]::-webkit-outer-spin-button { 380 | height: auto; 381 | } 382 | 383 | /** 384 | * 1. Correct the odd appearance in Chrome and Safari. 385 | * 2. Correct the outline style in Safari. 386 | */ 387 | 388 | [type="search"] { 389 | -webkit-appearance: textfield; /* 1 */ 390 | outline-offset: -2px; /* 2 */ 391 | } 392 | 393 | /** 394 | * Remove the inner padding and cancel buttons in Chrome and Safari on macOS. 395 | */ 396 | 397 | [type="search"]::-webkit-search-cancel-button, 398 | [type="search"]::-webkit-search-decoration { 399 | -webkit-appearance: none; 400 | } 401 | 402 | /** 403 | * 1. Correct the inability to style clickable types in iOS and Safari. 404 | * 2. Change font properties to `inherit` in Safari. 405 | */ 406 | 407 | ::-webkit-file-upload-button { 408 | -webkit-appearance: button; /* 1 */ 409 | font: inherit; /* 2 */ 410 | } 411 | 412 | /* Interactive 413 | ========================================================================== */ 414 | 415 | /* 416 | * Add the correct display in IE 9-. 417 | * 1. Add the correct display in Edge, IE, and Firefox. 418 | */ 419 | 420 | details, /* 1 */ 421 | menu { 422 | display: block; 423 | } 424 | 425 | /* 426 | * Add the correct display in all browsers. 427 | */ 428 | 429 | summary { 430 | display: list-item; 431 | } 432 | 433 | /* Scripting 434 | ========================================================================== */ 435 | 436 | /** 437 | * Add the correct display in IE 9-. 438 | */ 439 | 440 | canvas { 441 | display: inline-block; 442 | } 443 | 444 | /** 445 | * Add the correct display in IE. 446 | */ 447 | 448 | template { 449 | display: none; 450 | } 451 | 452 | /* Hidden 453 | ========================================================================== */ 454 | 455 | /** 456 | * Add the correct display in IE 10-. 457 | */ 458 | 459 | [hidden] { 460 | display: none; 461 | } 462 | -------------------------------------------------------------------------------- /examples/skeleton.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Skeleton V2.0.4 3 | * Copyright 2014, Dave Gamache 4 | * www.getskeleton.com 5 | * Free to use under the MIT license. 6 | * http://www.opensource.org/licenses/mit-license.php 7 | * 12/29/2014 8 | */ 9 | 10 | 11 | /* Table of contents 12 | –––––––––––––––––––––––––––––––––––––––––––––––––– 13 | - Grid 14 | - Base Styles 15 | - Typography 16 | - Links 17 | - Buttons 18 | - Forms 19 | - Lists 20 | - Code 21 | - Tables 22 | - Spacing 23 | - Utilities 24 | - Clearing 25 | - Media Queries 26 | */ 27 | 28 | 29 | /* Grid 30 | –––––––––––––––––––––––––––––––––––––––––––––––––– */ 31 | .container { 32 | position: relative; 33 | width: 100%; 34 | max-width: 960px; 35 | margin: 0 auto; 36 | padding: 0 20px; 37 | box-sizing: border-box; } 38 | .column, 39 | .columns { 40 | width: 100%; 41 | float: left; 42 | box-sizing: border-box; } 43 | 44 | /* For devices larger than 400px */ 45 | @media (min-width: 400px) { 46 | .container { 47 | width: 85%; 48 | padding: 0; } 49 | } 50 | 51 | /* For devices larger than 550px */ 52 | @media (min-width: 550px) { 53 | .container { 54 | width: 80%; } 55 | .column, 56 | .columns { 57 | margin-left: 4%; } 58 | .column:first-child, 59 | .columns:first-child { 60 | margin-left: 0; } 61 | 62 | .one.column, 63 | .one.columns { width: 4.66666666667%; } 64 | .two.columns { width: 13.3333333333%; } 65 | .three.columns { width: 22%; } 66 | .four.columns { width: 30.6666666667%; } 67 | .five.columns { width: 39.3333333333%; } 68 | .six.columns { width: 48%; } 69 | .seven.columns { width: 56.6666666667%; } 70 | .eight.columns { width: 65.3333333333%; } 71 | .nine.columns { width: 74.0%; } 72 | .ten.columns { width: 82.6666666667%; } 73 | .eleven.columns { width: 91.3333333333%; } 74 | .twelve.columns { width: 100%; margin-left: 0; } 75 | 76 | .one-third.column { width: 30.6666666667%; } 77 | .two-thirds.column { width: 65.3333333333%; } 78 | 79 | .one-half.column { width: 48%; } 80 | 81 | /* Offsets */ 82 | .offset-by-one.column, 83 | .offset-by-one.columns { margin-left: 8.66666666667%; } 84 | .offset-by-two.column, 85 | .offset-by-two.columns { margin-left: 17.3333333333%; } 86 | .offset-by-three.column, 87 | .offset-by-three.columns { margin-left: 26%; } 88 | .offset-by-four.column, 89 | .offset-by-four.columns { margin-left: 34.6666666667%; } 90 | .offset-by-five.column, 91 | .offset-by-five.columns { margin-left: 43.3333333333%; } 92 | .offset-by-six.column, 93 | .offset-by-six.columns { margin-left: 52%; } 94 | .offset-by-seven.column, 95 | .offset-by-seven.columns { margin-left: 60.6666666667%; } 96 | .offset-by-eight.column, 97 | .offset-by-eight.columns { margin-left: 69.3333333333%; } 98 | .offset-by-nine.column, 99 | .offset-by-nine.columns { margin-left: 78.0%; } 100 | .offset-by-ten.column, 101 | .offset-by-ten.columns { margin-left: 86.6666666667%; } 102 | .offset-by-eleven.column, 103 | .offset-by-eleven.columns { margin-left: 95.3333333333%; } 104 | 105 | .offset-by-one-third.column, 106 | .offset-by-one-third.columns { margin-left: 34.6666666667%; } 107 | .offset-by-two-thirds.column, 108 | .offset-by-two-thirds.columns { margin-left: 69.3333333333%; } 109 | 110 | .offset-by-one-half.column, 111 | .offset-by-one-half.columns { margin-left: 52%; } 112 | 113 | } 114 | 115 | 116 | /* Base Styles 117 | –––––––––––––––––––––––––––––––––––––––––––––––––– */ 118 | /* NOTE 119 | html is set to 62.5% so that all the REM measurements throughout Skeleton 120 | are based on 10px sizing. So basically 1.5rem = 15px :) */ 121 | html { 122 | font-size: 62.5%; } 123 | body { 124 | font-size: 1.5em; /* currently ems cause chrome bug misinterpreting rems on body element */ 125 | line-height: 1.6; 126 | font-weight: 400; 127 | font-family: "Raleway", "HelveticaNeue", "Helvetica Neue", Helvetica, Arial, sans-serif; 128 | color: #222; } 129 | 130 | 131 | /* Typography 132 | –––––––––––––––––––––––––––––––––––––––––––––––––– */ 133 | h1, h2, h3, h4, h5, h6 { 134 | margin-top: 0; 135 | margin-bottom: 2rem; 136 | font-weight: 300; } 137 | h1 { font-size: 4.0rem; line-height: 1.2; letter-spacing: -.1rem;} 138 | h2 { font-size: 3.6rem; line-height: 1.25; letter-spacing: -.1rem; } 139 | h3 { font-size: 3.0rem; line-height: 1.3; letter-spacing: -.1rem; } 140 | h4 { font-size: 2.4rem; line-height: 1.35; letter-spacing: -.08rem; } 141 | h5 { font-size: 1.8rem; line-height: 1.5; letter-spacing: -.05rem; } 142 | h6 { font-size: 1.5rem; line-height: 1.6; letter-spacing: 0; } 143 | 144 | /* Larger than phablet */ 145 | @media (min-width: 550px) { 146 | h1 { font-size: 5.0rem; } 147 | h2 { font-size: 4.2rem; } 148 | h3 { font-size: 3.6rem; } 149 | h4 { font-size: 3.0rem; } 150 | h5 { font-size: 2.4rem; } 151 | h6 { font-size: 1.5rem; } 152 | } 153 | 154 | p { 155 | margin-top: 0; } 156 | 157 | 158 | /* Links 159 | –––––––––––––––––––––––––––––––––––––––––––––––––– */ 160 | a { 161 | color: #1EAEDB; } 162 | a:hover { 163 | color: #0FA0CE; } 164 | 165 | 166 | /* Buttons 167 | –––––––––––––––––––––––––––––––––––––––––––––––––– */ 168 | .button, 169 | button, 170 | input[type="submit"], 171 | input[type="reset"], 172 | input[type="button"] { 173 | display: inline-block; 174 | height: 38px; 175 | padding: 0 30px; 176 | color: #555; 177 | text-align: center; 178 | font-size: 11px; 179 | font-weight: 600; 180 | line-height: 38px; 181 | letter-spacing: .1rem; 182 | text-transform: uppercase; 183 | text-decoration: none; 184 | white-space: nowrap; 185 | background-color: transparent; 186 | border-radius: 4px; 187 | border: 1px solid #bbb; 188 | cursor: pointer; 189 | box-sizing: border-box; } 190 | .button:hover, 191 | button:hover, 192 | input[type="submit"]:hover, 193 | input[type="reset"]:hover, 194 | input[type="button"]:hover, 195 | .button:focus, 196 | button:focus, 197 | input[type="submit"]:focus, 198 | input[type="reset"]:focus, 199 | input[type="button"]:focus { 200 | color: #333; 201 | border-color: #888; 202 | outline: 0; } 203 | .button.button-primary, 204 | button.button-primary, 205 | input[type="submit"].button-primary, 206 | input[type="reset"].button-primary, 207 | input[type="button"].button-primary { 208 | color: #FFF; 209 | background-color: #33C3F0; 210 | border-color: #33C3F0; } 211 | .button.button-primary:hover, 212 | button.button-primary:hover, 213 | input[type="submit"].button-primary:hover, 214 | input[type="reset"].button-primary:hover, 215 | input[type="button"].button-primary:hover, 216 | .button.button-primary:focus, 217 | button.button-primary:focus, 218 | input[type="submit"].button-primary:focus, 219 | input[type="reset"].button-primary:focus, 220 | input[type="button"].button-primary:focus { 221 | color: #FFF; 222 | background-color: #1EAEDB; 223 | border-color: #1EAEDB; } 224 | 225 | 226 | /* Forms 227 | –––––––––––––––––––––––––––––––––––––––––––––––––– */ 228 | input[type="email"], 229 | input[type="number"], 230 | input[type="search"], 231 | input[type="text"], 232 | input[type="tel"], 233 | input[type="url"], 234 | input[type="password"], 235 | textarea, 236 | select { 237 | height: 38px; 238 | padding: 6px 10px; /* The 6px vertically centers text on FF, ignored by Webkit */ 239 | background-color: #fff; 240 | border: 1px solid #D1D1D1; 241 | border-radius: 4px; 242 | box-shadow: none; 243 | box-sizing: border-box; } 244 | /* Removes awkward default styles on some inputs for iOS */ 245 | input[type="email"], 246 | input[type="number"], 247 | input[type="search"], 248 | input[type="text"], 249 | input[type="tel"], 250 | input[type="url"], 251 | input[type="password"], 252 | textarea { 253 | -webkit-appearance: none; 254 | -moz-appearance: none; 255 | appearance: none; } 256 | textarea { 257 | min-height: 65px; 258 | padding-top: 6px; 259 | padding-bottom: 6px; } 260 | input[type="email"]:focus, 261 | input[type="number"]:focus, 262 | input[type="search"]:focus, 263 | input[type="text"]:focus, 264 | input[type="tel"]:focus, 265 | input[type="url"]:focus, 266 | input[type="password"]:focus, 267 | textarea:focus, 268 | select:focus { 269 | border: 1px solid #33C3F0; 270 | outline: 0; } 271 | label, 272 | legend { 273 | display: block; 274 | margin-bottom: .5rem; 275 | font-weight: 600; } 276 | fieldset { 277 | padding: 0; 278 | border-width: 0; } 279 | input[type="checkbox"], 280 | input[type="radio"] { 281 | display: inline; } 282 | label > .label-body { 283 | display: inline-block; 284 | margin-left: .5rem; 285 | font-weight: normal; } 286 | 287 | 288 | /* Lists 289 | –––––––––––––––––––––––––––––––––––––––––––––––––– */ 290 | ul { 291 | list-style: circle inside; } 292 | ol { 293 | list-style: decimal inside; } 294 | ol, ul { 295 | padding-left: 0; 296 | margin-top: 0; } 297 | ul ul, 298 | ul ol, 299 | ol ol, 300 | ol ul { 301 | margin: 1.5rem 0 1.5rem 3rem; 302 | font-size: 90%; } 303 | li { 304 | margin-bottom: 1rem; } 305 | 306 | 307 | /* Code 308 | –––––––––––––––––––––––––––––––––––––––––––––––––– */ 309 | code { 310 | padding: .2rem .5rem; 311 | margin: 0 .2rem; 312 | font-size: 90%; 313 | white-space: nowrap; 314 | background: #F1F1F1; 315 | border: 1px solid #E1E1E1; 316 | border-radius: 4px; } 317 | pre > code { 318 | display: block; 319 | padding: 1rem 1.5rem; 320 | white-space: pre; } 321 | 322 | 323 | /* Tables 324 | –––––––––––––––––––––––––––––––––––––––––––––––––– */ 325 | th, 326 | td { 327 | padding: 12px 15px; 328 | text-align: left; 329 | border-bottom: 1px solid #E1E1E1; } 330 | th:first-child, 331 | td:first-child { 332 | padding-left: 0; } 333 | th:last-child, 334 | td:last-child { 335 | padding-right: 0; } 336 | 337 | 338 | /* Spacing 339 | –––––––––––––––––––––––––––––––––––––––––––––––––– */ 340 | button, 341 | .button { 342 | margin-bottom: 1rem; } 343 | input, 344 | textarea, 345 | select, 346 | fieldset { 347 | margin-bottom: 1.5rem; } 348 | pre, 349 | blockquote, 350 | dl, 351 | figure, 352 | table, 353 | p, 354 | ul, 355 | ol, 356 | form { 357 | margin-bottom: 2.5rem; } 358 | 359 | 360 | /* Utilities 361 | –––––––––––––––––––––––––––––––––––––––––––––––––– */ 362 | .u-full-width { 363 | width: 100%; 364 | box-sizing: border-box; } 365 | .u-max-full-width { 366 | max-width: 100%; 367 | box-sizing: border-box; } 368 | .u-pull-right { 369 | float: right; } 370 | .u-pull-left { 371 | float: left; } 372 | 373 | 374 | /* Misc 375 | –––––––––––––––––––––––––––––––––––––––––––––––––– */ 376 | hr { 377 | margin-top: 3rem; 378 | margin-bottom: 3.5rem; 379 | border-width: 0; 380 | border-top: 1px solid #E1E1E1; } 381 | 382 | 383 | /* Clearing 384 | –––––––––––––––––––––––––––––––––––––––––––––––––– */ 385 | 386 | /* Self Clearing Goodness */ 387 | .container:after, 388 | .row:after, 389 | .u-cf { 390 | content: ""; 391 | display: table; 392 | clear: both; } 393 | 394 | 395 | /* Media Queries 396 | –––––––––––––––––––––––––––––––––––––––––––––––––– */ 397 | /* 398 | Note: The best way to structure the use of media queries is to create the queries 399 | near the relevant code. For example, if you wanted to change the styles for buttons 400 | on small devices, paste the mobile query code up in the buttons section and style it 401 | there. 402 | */ 403 | 404 | 405 | /* Larger than mobile */ 406 | @media (min-width: 400px) {} 407 | 408 | /* Larger than phablet (also point when grid becomes active) */ 409 | @media (min-width: 550px) {} 410 | 411 | /* Larger than tablet */ 412 | @media (min-width: 750px) {} 413 | 414 | /* Larger than desktop */ 415 | @media (min-width: 1000px) {} 416 | 417 | /* Larger than Desktop HD */ 418 | @media (min-width: 1200px) {} 419 | -------------------------------------------------------------------------------- /jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | verbose: true, 3 | browser: true, 4 | setupFiles: ['./jest/setup'], 5 | 'globals': { 6 | 'NODE_ENV': 'test' 7 | }, 8 | 'moduleFileExtensions': [ 9 | 'js', 10 | 'jsx' 11 | ], 12 | 'moduleDirectories': [ 13 | 'node_modules', 14 | 'lib' 15 | ], 16 | transform: { 17 | '^.+\\.js$': '/jest/transform.js', 18 | '^.+\\.(styl|css|scss|less)$': 'jest-css-modules' 19 | } 20 | } -------------------------------------------------------------------------------- /jest/setup.js: -------------------------------------------------------------------------------- 1 | // Globals/Enzyme here 2 | 3 | 4 | -------------------------------------------------------------------------------- /jest/transform.js: -------------------------------------------------------------------------------- 1 | 2 | const fs = require('fs'); 3 | const path = require('path'); 4 | 5 | let options; 6 | 7 | try { 8 | options = JSON.parse(fs.readFileSync(path.join(__dirname, '..', '.babelrc'))); 9 | 10 | options.presets = options.presets.map((preset) => { 11 | if (preset[0] === 'env') { 12 | return ['env', Object.assign(preset[1], { modules: 'commonjs' })]; 13 | } 14 | 15 | return preset; 16 | }); 17 | } catch (error) { 18 | console.log('Transform Error', error); 19 | throw error; 20 | } 21 | 22 | 23 | module.exports = require('babel-jest').createTransformer(options); 24 | -------------------------------------------------------------------------------- /lib/components/Fullpage.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ScrollSwipe from 'scroll-swipe'; 3 | import root from 'window-or-global'; 4 | import { WindowSize } from 'react-fns'; 5 | 6 | import { detectBrowser, constants, scrollTo, renderUtils, INTENT_MAP, getNodes, showAll, hideAllButActive, composedPath } from '../utils'; 7 | import Slide from './Slide'; 8 | import HorizontalSlider from './HorizontalSlider'; 9 | 10 | const { noOp } = constants; 11 | const { KEY_IDX } = renderUtils; 12 | 13 | let _fp = {}; 14 | let global = {}; 15 | 16 | const TIMEOUT = 200; 17 | 18 | const documentStub = () => { 19 | const style = {}; 20 | return { 21 | querySelectorAll: () => [
], 22 | documentElement: { 23 | style 24 | }, 25 | body: { 26 | style 27 | } 28 | }; 29 | } 30 | 31 | function generateState(activeSlide = 0) { 32 | return { 33 | activeSlide, 34 | lastActive: activeSlide - 1 35 | }; 36 | } 37 | 38 | class Fullpage extends React.Component { 39 | constructor(props) { 40 | super(props); 41 | const p = this.props; 42 | 43 | global.window = root; 44 | global.document = global.window.document || documentStub(); 45 | 46 | if (p.infinite && p.resetSlides) { 47 | throw new Error('Fullpage Component cannot have both infinite and resetSlides as truthy props'); 48 | } 49 | 50 | const { slides } = p; 51 | 52 | if (!slides || !slides.length) { 53 | throw new Error('Please provide slides for Fullpage'); 54 | } 55 | 56 | let horizontalMap = {}; 57 | // generate state for horizontals; 58 | const horizontals = slides.reduce((result, s, i) => { 59 | const { name } = s.props; 60 | 61 | if (s.props.slides && name) { 62 | result[name] = generateState(0); 63 | horizontalMap[i] = name; 64 | } 65 | 66 | return result; 67 | }, {}); 68 | horizontals.horizontalMap = horizontalMap; 69 | 70 | const { activeSlide = 0, scrollSensitivity, touchSensitivity, scrollSpeed = 500 } = p; 71 | 72 | this.name = 'Fullpage'; 73 | this.scrollSensitivity = scrollSensitivity; 74 | this.touchSensitivity = touchSensitivity; 75 | this.scrollSpeed = scrollSpeed; 76 | 77 | this.node = null; 78 | this.ss = null; 79 | this.verticalRoot = determineVerticalRoot(); 80 | 81 | this.onHorizontalChange = p.onHorizontalChange || noOp; 82 | this.onSlideChangeStart = p.onSlideChangeStart || noOp; 83 | this.onSlideChangeEnd = p.onSlideChangeEnd || noOp; 84 | 85 | ['onScrollAction', 'onVerticalScroll', 86 | 'onHorizontalScroll', 'lockScroll', 'handleScroll', 87 | 'checkKey'].forEach(f => this[f] = this[f].bind(this)); 88 | 89 | this.isLocked = false; 90 | this.hSlideCache = {}; 91 | this.cacheHslide = (slide) => { 92 | this.hSlideCache[slide.name] = slide; 93 | } 94 | 95 | _fp = this; 96 | 97 | this.state = Object.assign({ 98 | scrollPending: false, 99 | window: null, 100 | document: null 101 | }, horizontals, generateState(activeSlide)); 102 | } 103 | 104 | componentDidMount() { 105 | this.hideScrollBars(); 106 | 107 | this.window = global.window; 108 | this.document = global.document; 109 | 110 | this.setState({ 111 | window: global.window, 112 | document: global.document 113 | }, () => { 114 | this.lockScroll(); 115 | }); 116 | } 117 | 118 | hideScrollBars() { 119 | const { hideScrollBars } = this.props; 120 | 121 | if (!hideScrollBars) { 122 | return; 123 | } 124 | 125 | const { document } = global; 126 | document.documentElement.style.overflow = 'hidden'; 127 | document.body.style.overflow = 'hidden'; 128 | } 129 | 130 | showScrollBars() { 131 | const { document } = global; 132 | document.documentElement.style.overflow = 'auto'; 133 | document.body.style.overflow = 'auto'; 134 | } 135 | 136 | lockScroll() { 137 | const { node, checkKey } = this; 138 | const { enableArrowKeys } = this.props; 139 | 140 | if (enableArrowKeys) { 141 | window.addEventListener('keydown', checkKey.bind(this)); 142 | } 143 | 144 | const ss = new ScrollSwipe({ 145 | target: node, 146 | scrollSensitivity: this.scrollSensitivity, 147 | touchSensitivity: this.touchSensitivity, 148 | scrollPreventDefault: true, 149 | touchPreventDefault: true, 150 | scrollCb: this.onScrollAction, 151 | touchCb: this.onScrollAction 152 | }); 153 | this.ss = ss; 154 | this.isLocked = true; 155 | } 156 | 157 | onScrollAction({direction, intent, startEvent}) { 158 | const s = this.state; 159 | const { ss = ssStub() } = this; 160 | 161 | if (s.scrollPending) { 162 | ss.flush(); 163 | return ss.listen(); 164 | } 165 | 166 | const dir = INTENT_MAP[direction]; 167 | 168 | // at this point we are dedicating 169 | if (direction === 'VERTICAL') { 170 | return this.onVerticalScroll(dir[intent], startEvent); 171 | } 172 | 173 | let path = startEvent.path || (startEvent.composedPath && startEvent.composedPath()); 174 | 175 | if (!path) { 176 | const polyFillPath = composedPath(startEvent.target); 177 | path = polyFillPath; 178 | } 179 | 180 | const isHorizontal = path.find((p) => { 181 | if (!p.dataset) { 182 | return false; 183 | } 184 | 185 | return p.dataset.slide === 'HorizontalSlider'; 186 | }); 187 | 188 | if (!isHorizontal) { 189 | ss.flush(); 190 | return ss.listen(); 191 | } 192 | 193 | this.onHorizontalScroll(dir[intent], isHorizontal); 194 | } 195 | 196 | onVerticalScroll(intent) { 197 | const s = this.state; 198 | const { window, activeSlide } = s; 199 | const { slides } = this.props; 200 | 201 | const next = intent === 'DOWN' ? activeSlide + 1 : activeSlide - 1; 202 | if (next < 0 || next > slides.length - 1) { 203 | const { ss = ssStub() } = this; 204 | ss.flush(); 205 | return ss.listen(); 206 | } 207 | 208 | const to = next * window.innerHeight; 209 | const newState = { 210 | activeSlide: next, 211 | lastActive: activeSlide 212 | }; 213 | 214 | this.setState({ scrollPending: true }, () => { 215 | this.handleScroll(this.verticalRoot, 'scrollTop', to, newState, this.name); 216 | }); 217 | } 218 | 219 | onHorizontalScroll(intent, node) { 220 | const { name } = node.dataset; 221 | let { activeSlide } = this.state[name]; 222 | let next = intent === 'RIGHT' ? activeSlide + 1 : activeSlide - 1; 223 | const { innerWidth } = this.state.window; 224 | const { ss = ssStub() } = this; 225 | 226 | const comp = _fp.hSlideCache[name]; 227 | const hp = comp.props; 228 | const { infinite } = hp; 229 | 230 | let nodes = getNodes(this.state.document, `data-horizontal-slider="${name}"`); 231 | 232 | let leftVal = activeSlide * innerWidth; 233 | let to = next * innerWidth; 234 | 235 | const result = this.determineHSlide(comp, activeSlide, next, leftVal, to, nodes); 236 | 237 | if (!result) { 238 | setTimeout(() => { 239 | ss.flush(); 240 | ss.listen(); 241 | }, TIMEOUT); 242 | return; 243 | } 244 | 245 | leftVal = result.leftVal 246 | next = result.next; 247 | to = result.to; 248 | 249 | const newState = { 250 | [name]: { 251 | activeSlide: next, 252 | lastActive: activeSlide 253 | } 254 | }; 255 | 256 | this.handleHorizontal(name, node, nodes, leftVal, to, next, newState, infinite); 257 | } 258 | 259 | determineHSlide(comp, activeSlide, next, leftVal, to, nodes) { 260 | const hp = comp.props; 261 | const { infinite, resetSlides } = hp; 262 | const { innerWidth } = this.state.window; 263 | 264 | const len = nodes.length; 265 | 266 | const infStart = activeSlide === 0 && next === -1; 267 | const infEnd = activeSlide === len - 1 && next === len; 268 | 269 | if (!infinite && !resetSlides && (infStart || infEnd)) { 270 | return null; 271 | } 272 | 273 | if (infinite && infStart) { 274 | // simulate last <- 0 275 | next = len - 1; 276 | lastToFirst(nodes); 277 | leftVal = innerWidth; 278 | to = 0; 279 | } else if (infinite && infEnd) { 280 | // simulate last -> 0 281 | next = 0; 282 | lastToFirst(nodes); 283 | leftVal = 0; 284 | to = innerWidth; 285 | } 286 | 287 | const result = { next, leftVal, to }; 288 | return result; 289 | } 290 | 291 | handleHorizontal(name, node, nodes, leftVal, to, next, newState, infinite) { 292 | showAll(nodes); 293 | node.scrollLeft = leftVal; 294 | 295 | //show, reset window 296 | //scroll 297 | //hide 298 | 299 | this.setState({ scrollPending: true }, () => { 300 | this.handleScroll(node, 'scrollLeft', to, newState, name, () => { 301 | if (infinite) { 302 | firstToLast(nodes); 303 | node.scrollLeft = innerWidth * next; 304 | } 305 | hideAllButActive(next, nodes); 306 | }); 307 | }); 308 | } 309 | 310 | handleScroll(node, winProp, to, newState, compName, cb = noOp) { 311 | const ss = this.ss || ssStub(); 312 | ss.flush(); 313 | const cancellable = this.onSlideChangeStart(compName, this.props, this.state, newState[compName] || newState); 314 | 315 | if (cancellable === true) { 316 | return; 317 | } 318 | 319 | scrollTo(node, winProp, to, this.scrollSpeed, () => { 320 | newState.scrollPending = false; 321 | this.setState(newState, () => { 322 | cb(); 323 | this.onSlideChangeEnd(compName, this.props, this.state, newState[compName] || newState); 324 | setTimeout(() => { 325 | ss.flush(); 326 | ss.listen(); 327 | }, TIMEOUT); 328 | }); 329 | }); 330 | } 331 | 332 | componentWillUnmount() { 333 | const ss = this.ss || ssStub(); 334 | ss.killAll(); 335 | this.ss = null; 336 | 337 | const { window } = this.state; 338 | 339 | if (this.props.enableArrowKeys) { 340 | window.removeEventListener('keydown', this.checkKey); 341 | } 342 | 343 | if (this.props.hideScrollBars) { 344 | this.showScrollBars(); 345 | } 346 | } 347 | 348 | checkKey(e) { 349 | const direction = KEY_IDX[e.keyCode]; 350 | if (!direction) { 351 | return; 352 | } 353 | 354 | const intent = (direction === 'UP' || direction === 'LEFT') ? -1 : 1; 355 | const context = (direction === 'UP' || direction === 'DOWN') ? 'VERTICAL' : 'HORIZONTAL'; 356 | 357 | if (context === 'VERTICAL') { 358 | Fullpage.changeFullpageSlide(this.state.activeSlide + intent); 359 | return; 360 | } 361 | 362 | const horizontalName = this.state.horizontalMap[this.state.activeSlide]; 363 | if (!horizontalName) { 364 | return; 365 | } 366 | 367 | const { activeSlide } = this.state[horizontalName]; 368 | Fullpage.changeHorizontalSlide(horizontalName, activeSlide + intent); 369 | } 370 | 371 | static changeHorizontalSlide(name, next) { 372 | next = +next; 373 | 374 | const comp = _fp.hSlideCache[name]; 375 | if (!comp) { 376 | throw Error('cannt find HorizontalSlider by name', name); 377 | } 378 | 379 | const { node, props } = comp; 380 | const { infinite } = props; 381 | const eligible = isEligible(next, props, _fp.state); 382 | 383 | if (!eligible) { 384 | return; 385 | } 386 | 387 | const { activeSlide } = _fp.state[name]; 388 | const { innerWidth } = _fp.state.window; 389 | 390 | let nodes = getNodes(_fp.state.document, `data-horizontal-slider="${name}"`); 391 | let leftVal = activeSlide * innerWidth; 392 | let to = next * innerWidth; 393 | 394 | const result = _fp.determineHSlide.call(_fp, comp, activeSlide, next, leftVal, to, nodes); 395 | 396 | leftVal = result.leftVal 397 | next = result.next; 398 | to = result.to; 399 | 400 | const newState = { 401 | [name]: { 402 | activeSlide: next, 403 | lastActive: activeSlide 404 | } 405 | }; 406 | 407 | _fp.handleHorizontal.call(_fp, name, node, nodes, leftVal, to, next, newState, infinite); 408 | } 409 | 410 | static changeFullpageSlide(idx) { 411 | const { props, state, name, verticalRoot } = _fp; 412 | const { activeSlide, window } = state; 413 | 414 | const eligible = isEligible(idx, props, state); 415 | 416 | if (!eligible) { 417 | return; 418 | } 419 | 420 | const newState = { 421 | activeSlide: idx, 422 | lastActive: activeSlide 423 | }; 424 | 425 | const to = idx * window.innerHeight; 426 | 427 | _fp.setState({ scrollPending: true }, () => { 428 | _fp.onSlideChangeStart(name, props, state, newState); 429 | _fp.handleScroll(verticalRoot, 'scrollTop', to, newState, name); 430 | }); 431 | } 432 | 433 | render() { 434 | const s = this.state; 435 | const p = this.props; 436 | const { window, document, activeSlide } = s; 437 | 438 | const children = p.children || null; 439 | 440 | if (!window) { 441 | return children; 442 | } 443 | 444 | const elements = p.slides.reduce((result, sl) => { 445 | if (!sl) { 446 | return result; 447 | } 448 | 449 | if (typeof sl.type !== 'function') { 450 | result.other.push(sl); 451 | } else { 452 | result.slides.push(sl); 453 | } 454 | 455 | return result; 456 | }, { slides: [], other: [] }); 457 | 458 | const { other, slides } = elements; 459 | 460 | // TODO: sub other for children 461 | return ( 462 | { 464 | 465 | const to = activeSlide * height; 466 | setTimeout(() => { 467 | this.verticalRoot.scrollTop = to; 468 | }, 0); 469 | 470 | return ( 471 |
(this.node = node)} className="Fullpage"> 472 | {children} 473 | {other.map((o, i) => { 474 | const op = o.props || {}; 475 | return
; 476 | })} 477 | 478 | {slides.map((sl, i) => { 479 | const sp = sl.props || {}; 480 | const children = sp.children; 481 | 482 | if (sp.slides) { 483 | const { name } = sp; 484 | return 485 | {children} 486 | ; 487 | } 488 | 489 | return 490 | {children} 491 | ; 492 | })} 493 |
494 | ); 495 | }} 496 | /> 497 | ); 498 | } 499 | } 500 | 501 | function swap(nodes, o, i) { 502 | nodes[o || i].parentNode.insertBefore(nodes[i], nodes[o]); 503 | return nodes; 504 | } 505 | 506 | function lastToFirst(nodes) { 507 | swap(nodes, 0, nodes.length - 1); 508 | } 509 | 510 | function firstToLast(nodes) { 511 | swap(nodes, null, nodes.length - 1); 512 | } 513 | 514 | function isEligible(idx, props, state) { 515 | const { slides } = props; 516 | const { activeSlide } = state; 517 | 518 | if (state.scrollPending) { 519 | return false; 520 | } 521 | 522 | if (props.infinite) { 523 | return true; 524 | } 525 | 526 | if (idx > slides.length - 1 || idx < 0) { 527 | return false; 528 | } 529 | 530 | if (idx == activeSlide) { 531 | return false; 532 | } 533 | 534 | return true; 535 | } 536 | 537 | function ssStub() { 538 | return { 539 | flush: noOp, 540 | killAll: noOp, 541 | listen: noOp 542 | }; 543 | } 544 | 545 | function determineVerticalRoot() { 546 | let userAgent, platform; 547 | 548 | const { document } = global; 549 | 550 | if (typeof navigator !== 'undefined' && navigator) { 551 | ({ userAgent, platform } = navigator); 552 | } 553 | 554 | if (!userAgent) { 555 | return document.body; 556 | } 557 | 558 | // http://developer.samsung.com/technical-doc/view.do?v=T000000203 559 | if (/SAMSUNG.*Build\//.test(userAgent)) { 560 | return document.body; 561 | } 562 | 563 | const browser = detectBrowser(userAgent); 564 | 565 | if (!browser) { 566 | return document.body; 567 | } 568 | 569 | // NOTE: various browsers and devTools handle this differently as the userAgent source of truth 570 | // To get the root scrollable element we have to play around with OS and browser to find the right 571 | // root to return. If need be we can be specific about version 572 | 573 | const { name, version, os } = browser; // eslint-disable-line no-unused-vars 574 | const [ major, minor, patch ] = version.split('.'); // eslint-disable-line no-unused-vars 575 | 576 | const docElementSet = new Set([ 577 | 'firefox', 578 | 'chrome', 579 | 'ios', // iPad (chrome devtools) 580 | 'crios', // chrome ios (chrome devtools) 581 | 'ie' 582 | ]); 583 | 584 | // Some platforms conflict with the devtools when it comes to supporting document.body 585 | // In order to support both user-agents in chrome devtools and the native device we need to 586 | // check for both browser name and device platform 587 | const conflictingPlatforms = new Set([ 588 | 'iPhone', 589 | 'iPad' 590 | ]); 591 | 592 | if (docElementSet.has(name) && !conflictingPlatforms.has(platform)) { 593 | return document.documentElement; 594 | } 595 | 596 | // safari, chrome ios etc 597 | return document.body; 598 | } 599 | export default Fullpage; 600 | -------------------------------------------------------------------------------- /lib/components/HorizontalSlider.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | import Slide from './Slide' 4 | import { getNodes, hideAllButActive } from '../utils'; 5 | 6 | class HorizontalSlider extends React.Component { 7 | constructor(props) { 8 | super(props); 9 | this.name = this.props.name; 10 | } 11 | 12 | componentDidMount() { 13 | const { activeSlide, document, name, cache } = this.props; 14 | cache(this); 15 | 16 | const nodes = getNodes(document, `data-horizontal-slider="${name}"`); 17 | hideAllButActive(activeSlide, nodes); 18 | } 19 | 20 | render() { 21 | const p = this.props; 22 | const { name, children, height, width } = p; 23 | 24 | if (!name) { 25 | throw new Error('name is a required prop for HorizontalSlider'); 26 | } 27 | 28 | const elements = p.slides.reduce((result, sl) => { 29 | if (!sl) { 30 | return result; 31 | } 32 | 33 | if (typeof sl.type !== 'function') { 34 | result.other.push(sl); 35 | } else { 36 | result.slides.push(sl); 37 | } 38 | 39 | return result; 40 | }, { slides: [], other: [] }); 41 | 42 | const { other, slides } = elements; 43 | 44 | const attrs = { 45 | 'data-slide': 'HorizontalSlider', 46 | 'data-name': name 47 | }; 48 | 49 | const className = (p.className || '') + 'HorizontalSlider'; 50 | const overflowX = p.hideScrollBars ? 'hidden' : 'auto'; 51 | const overflowY = overflowX; 52 | 53 | const horizontalSliderStyle = Object.assign({}, p.style, 54 | {height: `${height}px`, width: `${width}px`, position: 'relative', overflowX, overflowY, whiteSpace: 'nowrap', padding: '0px', margin: '0'}); 55 | const horizontalSlideStyle = {overflow: 'hidden', whiteSpace: 'normal', display: 'inline-block' }; 56 | 57 | return ( 58 |
this.node = node} className={className} id={p.id} {...attrs} style={horizontalSliderStyle}> 59 | {other.map((o, i) => { 60 | const p = o.props || {}; 61 | return
62 | })} 63 | 64 | {slides.map((s, i) => { 65 | if (!s) { 66 | return null; 67 | } 68 | 69 | let sStyle = Object.assign({}, horizontalSlideStyle, slideStyle); 70 | const hSlideProps = s.props || {}; 71 | const slideStyle = hSlideProps.style || {}; 72 | 73 | return {hSlideProps.children} 74 | })} 75 | 76 | {children} 77 |
78 | ); 79 | } 80 | } 81 | 82 | export default HorizontalSlider; 83 | -------------------------------------------------------------------------------- /lib/components/Slide.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | const HorizontalSlide = 'HorizontalSlide'; 4 | const VerticalSlide = 'VerticalSlide'; 5 | 6 | const Slide = ({ id, render, className, width, height, horizontal, horizontalSliderName, children, style }) => { 7 | if (!render) { 8 | return null; 9 | } 10 | 11 | const slideStyle = style || {}; 12 | 13 | const styles = Object.assign({ 14 | overflow: 'hidden', width: `${width}px`, height: `${height}px`, position: 'relative' 15 | }, slideStyle); 16 | 17 | let slideClassName = horizontal ? [HorizontalSlide] : [VerticalSlide]; 18 | if (className) { 19 | slideClassName.push(className); 20 | } 21 | slideClassName = slideClassName.join(' '); 22 | 23 | const attrs = { 24 | 'data-slide': horizontal ? HorizontalSlide : VerticalSlide, 25 | 'data-horizontal-slider': horizontalSliderName || null 26 | }; 27 | 28 | return ( 29 |
30 | {children} 31 |
32 | ); 33 | } 34 | 35 | export default Slide; 36 | -------------------------------------------------------------------------------- /lib/index.js: -------------------------------------------------------------------------------- 1 | import Fullpage from './components/Fullpage'; 2 | import Slide from './components/Slide'; 3 | import HorizontalSlider from './components/HorizontalSlider'; 4 | 5 | export { 6 | Fullpage, 7 | Slide, 8 | HorizontalSlider 9 | }; 10 | -------------------------------------------------------------------------------- /lib/utils/constants.js: -------------------------------------------------------------------------------- 1 | const INCREMENT = 'INCREMENT'; 2 | const DECREMENT = 'DECREMENT'; 3 | const VERTICAL = 'VERTICAL'; 4 | const HORIZONTAL = 'HORIZONTAL'; 5 | const HEAD = 'HEAD'; 6 | const TAIL = 'TAIL'; 7 | const I_BLOCK = 'inline-block'; 8 | const BLOCK = 'block'; 9 | const NONE = 'none'; 10 | const noOp = () => {}; 11 | 12 | export { 13 | INCREMENT, 14 | DECREMENT, 15 | VERTICAL, 16 | HORIZONTAL, 17 | I_BLOCK, 18 | HEAD, 19 | TAIL, 20 | BLOCK, 21 | NONE, 22 | noOp 23 | }; 24 | -------------------------------------------------------------------------------- /lib/utils/detectOS.js: -------------------------------------------------------------------------------- 1 | module.exports = function detectOS(userAgentString) { 2 | const operatingSystems = [ 3 | { 4 | name: 'iOS', 5 | rule: /iP(hone|od|ad)/ 6 | }, 7 | { 8 | name: 'Android OS', 9 | rule: /Android/ 10 | }, 11 | { 12 | name: 'BlackBerry OS', 13 | rule: /BlackBerry|BB10/ 14 | }, 15 | { 16 | name: 'Windows Mobile', 17 | rule: /IEMobile/ 18 | }, 19 | { 20 | name: 'Amazon OS', 21 | rule: /Kindle/ 22 | }, 23 | { 24 | name: 'Windows 3.11', 25 | rule: /Win16/ 26 | }, 27 | { 28 | name: 'Windows 95', 29 | rule: /(Windows 95)|(Win95)|(Windows_95)/ 30 | }, 31 | { 32 | name: 'Windows 98', 33 | rule: /(Windows 98)|(Win98)/ 34 | }, 35 | { 36 | name: 'Windows 2000', 37 | rule: /(Windows NT 5.0)|(Windows 2000)/ 38 | }, 39 | { 40 | name: 'Windows XP', 41 | rule: /(Windows NT 5.1)|(Windows XP)/ 42 | }, 43 | { 44 | name: 'Windows Server 2003', 45 | rule: /(Windows NT 5.2)/ 46 | }, 47 | { 48 | name: 'Windows Vista', 49 | rule: /(Windows NT 6.0)/ 50 | }, 51 | { 52 | name: 'Windows 7', 53 | rule: /(Windows NT 6.1)/ 54 | }, 55 | { 56 | name: 'Windows 8', 57 | rule: /(Windows NT 6.2)/ 58 | }, 59 | { 60 | name: 'Windows 8.1', 61 | rule: /(Windows NT 6.3)/ 62 | }, 63 | { 64 | name: 'Windows 10', 65 | rule: /(Windows NT 10.0)/ 66 | }, 67 | { 68 | name: 'Windows ME', 69 | rule: /Windows ME/ 70 | }, 71 | { 72 | name: 'Open BSD', 73 | rule: /OpenBSD/ 74 | }, 75 | { 76 | name: 'Sun OS', 77 | rule: /SunOS/ 78 | }, 79 | { 80 | name: 'Linux', 81 | rule: /(Linux)|(X11)/ 82 | }, 83 | { 84 | name: 'Mac OS', 85 | rule: /(Mac_PowerPC)|(Macintosh)/ 86 | }, 87 | { 88 | name: 'QNX', 89 | rule: /QNX/ 90 | }, 91 | { 92 | name: 'BeOS', 93 | rule: /BeOS/ 94 | }, 95 | { 96 | name: 'OS/2', 97 | rule: /OS\/2/ 98 | }, 99 | { 100 | name: 'Search Bot', 101 | rule: /(nuhk)|(Googlebot)|(Yammybot)|(Openbot)|(Slurp)|(MSNBot)|(Ask Jeeves\/Teoma)|(ia_archiver)/ 102 | } 103 | ]; 104 | 105 | const detected = operatingSystems.filter(function (os) { 106 | if (userAgentString.match(os.rule)) { 107 | return true; 108 | } 109 | }); 110 | 111 | return detected && detected[0] ? detected[0].name : null; 112 | }; -------------------------------------------------------------------------------- /lib/utils/index.js: -------------------------------------------------------------------------------- 1 | import * as renderUtils from './renderUtils'; 2 | import scrollTo from './scrollTo'; 3 | import * as constants from './constants'; 4 | import detectOS from './detectOS.js'; 5 | 6 | function composedPath (el) { 7 | const paths = []; 8 | 9 | while (el) { 10 | paths.push(el); 11 | 12 | if (el.tagName === 'HTML') { 13 | paths.push(document); 14 | paths.push(window); 15 | return paths; 16 | } 17 | 18 | el = el.parentElement; 19 | } 20 | 21 | return paths; 22 | } 23 | 24 | function getNodes(document, sel) { 25 | return document.querySelectorAll(`[${sel}]`); 26 | } 27 | 28 | function hideAllButActive(activeSlide, nodes) { 29 | Array.prototype.forEach.call(nodes, (n, i) => { 30 | if (i === activeSlide) { 31 | n.style.display = 'inline-block'; 32 | } else { 33 | n.style.display = 'none'; 34 | } 35 | }); 36 | } 37 | 38 | function showAll(nodes) { 39 | Array.prototype.forEach.call(nodes, (n) => { 40 | n.style.display = 'inline-block'; 41 | }); 42 | } 43 | 44 | const INTENT_MAP = { 45 | 'VERTICAL': { 46 | 0: 'UP', 47 | 1: 'DOWN' 48 | }, 49 | 'HORIZONTAL': { 50 | 0: 'LEFT', 51 | 1: 'RIGHT' 52 | } 53 | }; 54 | 55 | function detectBrowser(userAgentString) { 56 | if (!userAgentString) { 57 | return null; 58 | } 59 | 60 | const browsers = [ 61 | ['edge', /Edge\/([0-9\._]+)/], 62 | ['yandexbrowser', /YaBrowser\/([0-9\._]+)/], 63 | ['vivaldi', /Vivaldi\/([0-9\.]+)/], 64 | ['kakaotalk', /KAKAOTALK\s([0-9\.]+)/], 65 | ['chrome', /(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/], 66 | ['phantomjs', /PhantomJS\/([0-9\.]+)(:?\s|$)/], 67 | ['crios', /CriOS\/([0-9\.]+)(:?\s|$)/], 68 | ['firefox', /Firefox\/([0-9\.]+)(?:\s|$)/], 69 | ['fxios', /FxiOS\/([0-9\.]+)/], 70 | ['opera', /Opera\/([0-9\.]+)(?:\s|$)/], 71 | ['opera', /OPR\/([0-9\.]+)(:?\s|$)$/], 72 | ['ie', /Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/], 73 | ['ie', /MSIE\s([0-9\.]+);.*Trident\/[4-7].0/], 74 | ['ie', /MSIE\s(7\.0)/], 75 | ['bb10', /BB10;\sTouch.*Version\/([0-9\.]+)/], 76 | ['android', /Android\s([0-9\.]+)/], 77 | ['ios', /Version\/([0-9\._]+).*Mobile.*Safari.*/], 78 | ['safari', /Version\/([0-9\._]+).*Safari/] 79 | ]; 80 | 81 | return browsers.map(function (rule) { 82 | if (rule[1].test(userAgentString)) { 83 | const match = rule[1].exec(userAgentString); 84 | const version = match && match[1].split(/[._]/).slice(0, 3); 85 | 86 | if (version && version.length < 3) { 87 | Array.prototype.push.apply(version, (version.length == 1) ? [0, 0] : [0]); 88 | } 89 | 90 | return { 91 | name: rule[0], 92 | version: version.join('.'), 93 | os: detectOS(userAgentString) 94 | }; 95 | } 96 | }).filter(Boolean).shift(); 97 | } 98 | 99 | export { 100 | composedPath, 101 | constants, 102 | showAll, 103 | hideAllButActive, 104 | INTENT_MAP, 105 | renderUtils, 106 | scrollTo, 107 | getNodes, 108 | detectBrowser 109 | }; 110 | -------------------------------------------------------------------------------- /lib/utils/renderUtils.js: -------------------------------------------------------------------------------- 1 | const KEY_IDX = { 2 | 37: 'LEFT', 3 | 38: 'UP', 4 | 39: 'RIGHT', 5 | 40: 'DOWN' 6 | }; 7 | 8 | export { 9 | KEY_IDX 10 | }; 11 | -------------------------------------------------------------------------------- /lib/utils/scrollTo.js: -------------------------------------------------------------------------------- 1 | function scrollTo(element, elementBoundary, to, duration, callback) { 2 | const start = element[elementBoundary], 3 | change = to - start, 4 | increment = 10; 5 | 6 | let currentTime = 0; 7 | let globalId = requestAnimationFrame(repeatOften); 8 | function repeatOften() { 9 | currentTime += increment; 10 | let val = easeInOutQuad(currentTime, start, change, duration); 11 | element[elementBoundary] = val; 12 | 13 | if (currentTime >= duration) { 14 | cancelAnimationFrame(globalId); 15 | return callback(); 16 | } 17 | globalId = requestAnimationFrame(repeatOften); 18 | } 19 | } 20 | 21 | //t = current time 22 | //b = start value 23 | //c = change in value 24 | //d = duration 25 | const easeInOutQuad = (t, b, c, d) => { 26 | t /= d; 27 | return -c * t*(t-2) + b; 28 | } 29 | 30 | export default scrollTo; 31 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "fullpage-react", 3 | "version": "3.1.0", 4 | "description": "Stateful fullpage.js inspired scrolling for React", 5 | "main": "./FullpageReact.js", 6 | "eslintConfig": "./.eslint.json", 7 | "scripts": { 8 | "start": "webpack-dev-server", 9 | "build": "NODE_ENV=production webpack", 10 | "jest-test": "jest", 11 | "test": "npm run build && npm run jest-test", 12 | "prepublishOnly": "npm run test" 13 | }, 14 | "author": "cmswalker", 15 | "license": "MIT", 16 | "repository": { 17 | "type": "git", 18 | "url": "git+https://github.com/cmswalker/fullpage-react.git" 19 | }, 20 | "bugs": { 21 | "url": "https://github.com/cmswalker/fullpage-react/issues" 22 | }, 23 | "keywords": [ 24 | "react", 25 | "fullpage", 26 | "fullpage.js", 27 | "react-fullpage", 28 | "fullpage-react", 29 | "fullpage-scroll", 30 | "scroll", 31 | "swipe", 32 | "slide", 33 | "slider", 34 | "react-scroll", 35 | "react-slider", 36 | "react-slideshow" 37 | ], 38 | "dependencies": { 39 | "react-fns": "^1.4.0", 40 | "scroll-swipe": "0.0.17", 41 | "window-or-global": "^1.0.1" 42 | }, 43 | "peerDependencies": { 44 | "react": "^16.1.1", 45 | "react-dom": "^16.1.1" 46 | }, 47 | "devDependencies": { 48 | "babel-cli": "^6.24.1", 49 | "babel-core": "^6.26.3", 50 | "babel-eslint": "^7.1.0", 51 | "babel-jest": "^21.2.0", 52 | "babel-loader": "^7.1.4", 53 | "babel-preset-env": "^1.7.0", 54 | "babel-preset-react": "^6.24.1", 55 | "css-loader": "^0.28.11", 56 | "eslint": "^3.10.0", 57 | "eslint-plugin-react": "^6.6.0", 58 | "html-loader": "^0.4.5", 59 | "html-webpack-plugin": "^2.28.0", 60 | "jest": "^21.2.1", 61 | "jest-css-modules": "^1.1.0", 62 | "react": "^16.4.0", 63 | "react-dom": "^16.4.0", 64 | "react-test-renderer": "^16.4.0", 65 | "style-loader": "^0.18.1", 66 | "stylus": "^0.54.5", 67 | "stylus-loader": "^3.0.2", 68 | "webpack": "^2.6.1", 69 | "webpack-dev-server": "^2.11.2" 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /webpack.config.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | const webpack = require('webpack'); 3 | const HtmlwebpackPlugin = require('html-webpack-plugin'); 4 | 5 | const ENV = process.env.NODE_ENV || 'development'; 6 | const isProduction = ENV === 'production'; 7 | 8 | console.log('BUILDING WEBPACK FOR ENV', ENV, isProduction); 9 | 10 | const config = { 11 | context: __dirname, // string (absolute path!) 12 | 13 | entry: { 14 | index: path.join(__dirname, 'examples/index.js') 15 | }, 16 | 17 | output: { 18 | filename: '[name].js', 19 | path: path.join(__dirname, '/dist/'), 20 | publicPath: '/', 21 | chunkFilename: '[id].chunk.js' 22 | }, 23 | 24 | module: { 25 | rules: [ 26 | { 27 | test: /\.css$/, 28 | use: [ 'style-loader', 'css-loader' ] 29 | }, 30 | { 31 | test: /\.styl$/, 32 | use: [ 'style-loader', 'css-loader', 'stylus-loader' ] 33 | }, 34 | { 35 | test: /\.(js|jsx)$/, 36 | exclude: [ 37 | /node_modules/ 38 | ], 39 | loader: 'babel-loader' 40 | } 41 | ] 42 | }, 43 | 44 | target: 'web', // enum 45 | stats: 'errors-only', 46 | 47 | devServer: { 48 | port: 3030, 49 | contentBase: path.join(__dirname, 'public'), // boolean | string | array, static file location 50 | compress: true, // enable gzip compression 51 | historyApiFallback: true, // true for index.html upon 404, object for multiple paths 52 | // hot: true, // hot module replacement. Depends on HotModuleReplacementPlugin 53 | https: false, // true for self-signed, object for cert authority 54 | noInfo: true, // only errors & warns on hot reload 55 | }, 56 | 57 | plugins: [], 58 | // Don't follow/bundle these modules, but request them at runtime from the environment 59 | externals: [], 60 | 61 | devtool: 'source-map' 62 | } 63 | 64 | if (isProduction) { 65 | config.entry = { 66 | index: path.join(__dirname, 'lib/index.js') 67 | }; 68 | 69 | config.externals = { 70 | 'react': 'react', 71 | 'react-dom': 'react-dom' 72 | }; 73 | 74 | config.output = { 75 | filename: 'FullpageReact.js', 76 | path: __dirname, 77 | publicPath: '/', 78 | library: 'FullpageReact', 79 | libraryTarget: 'umd', 80 | umdNamedDefine: true 81 | }; 82 | 83 | } else { 84 | config.plugins.push(new HtmlwebpackPlugin({ 85 | title: 'Fullpage React' 86 | })); 87 | } 88 | 89 | console.log('config', config); 90 | 91 | module.exports = config; 92 | --------------------------------------------------------------------------------