diff --git a/.babelrc b/.babelrc new file mode 100644 index 00000000..ec824f45 --- /dev/null +++ b/.babelrc @@ -0,0 +1,4 @@ +{ + "presets": ["react"], + "plugins": ["transform-es2015-modules-commonjs"] +} \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..11d7c403 --- /dev/null +++ b/.gitignore @@ -0,0 +1,17 @@ +# See https://help.github.com/ignore-files/ for more about ignoring files. + +# dependencies +/node_modules + +# testing +/coverage + +# production +/build + +# misc +.DS_Store +.env +npm-debug.log* +yarn-debug.log* +yarn-error.log* diff --git a/Projeto/.babelrc b/Projeto/.babelrc new file mode 100644 index 00000000..ec824f45 --- /dev/null +++ b/Projeto/.babelrc @@ -0,0 +1,4 @@ +{ + "presets": ["react"], + "plugins": ["transform-es2015-modules-commonjs"] +} \ No newline at end of file diff --git a/Projeto/.gitignore b/Projeto/.gitignore new file mode 100644 index 00000000..11d7c403 --- /dev/null +++ b/Projeto/.gitignore @@ -0,0 +1,17 @@ +# See https://help.github.com/ignore-files/ for more about ignoring files. + +# dependencies +/node_modules + +# testing +/coverage + +# production +/build + +# misc +.DS_Store +.env +npm-debug.log* +yarn-debug.log* +yarn-error.log* diff --git a/Projeto/data.json b/Projeto/data.json new file mode 100644 index 00000000..acea8cfb --- /dev/null +++ b/Projeto/data.json @@ -0,0 +1,11 @@ +{"images":[ + {"name":"Layer221", "cor":"laranja", "tamanho":"p", "preco":"398", "data":"", "messenger":"bata bordada"}, + {"name":"Layer213", "cor":"verde", "tamanho":"g", "preco":"398", "data":"", "messenger":"chapéu de praia com fivela"}, + {"name":"Layer216", "cor":"azul", "tamanho":"g", "preco":"398", "data":"", "messenger":"vestido texturizado", "promo":"R$ 189"}, + {"name":"Layer217", "cor":"rosa", "tamanho":"p", "preco":"398", "data":"", "messenger":"bata bordada"}, + {"name":"Layer208", "cor":"branco", "tamanho":"p", "preco":"398", "data":"", "messenger":"chapéu de praia com fivela"}, + {"name":"Layer218", "cor":"branco", "tamanho":"m", "preco":"398", "data":"", "messenger":"vestido texturizado", "promo":"R$ 189"}, + {"name":"Layer210", "cor":"azul", "tamanho":"m", "preco":"398", "data":"", "messenger":"bata bordada"}, + {"name":"Layer219", "cor":"laranja", "tamanho":"m", "preco":"398", "data":"", "messenger":"chapéu de praia com fivela"}, + {"name":"Layer220", "cor":"branco", "tamanho":"p", "preco":"398", "data":"", "messenger":"vestido texturizado", "promo":"R$ 189"} + ]} \ No newline at end of file diff --git a/Projeto/font/DidactGothic-Regular.ttf b/Projeto/font/DidactGothic-Regular.ttf new file mode 100644 index 00000000..62bdba3d Binary files /dev/null and b/Projeto/font/DidactGothic-Regular.ttf differ diff --git a/Projeto/gulpfile.js b/Projeto/gulpfile.js new file mode 100644 index 00000000..fdc2f1ac --- /dev/null +++ b/Projeto/gulpfile.js @@ -0,0 +1,32 @@ +var gulp = require('gulp'); +var sass = require('gulp-sass'); +var uglify = require('gulp-uglify'); +var gls = require('gulp-live-server'); +var concat = require('gulp-concat'); + +gulp.task('default', ['sass', 'watch', 'serve', 'concat']); + +gulp.task('sass', function() { + return gulp.src('src/sass/*.scss') + .pipe(concat('style.min.css')) + .pipe(sass({ outputStyle: 'compressed' }).on('error', sass.logError)) + .pipe(gulp.dest('public/css')); +}); + +gulp.task('watch', function() { + gulp.watch('src/sass/*.scss', ['sass']); +}); + +gulp.task('serve', function() { + var server = gls.static('./', 8000); + server.start(); + gulp.watch('src/css/*.css', function(file) { + gls.notify.apply(server, [file]); + }); + gulp.watch('src/js/*.js', function(file) { + gls.notify.apply(server, [file]); + }); + gulp.watch('./*html', function(file) { + gls.notify.apply(server, [file]); + }); +}); diff --git a/Projeto/images/Layer208.png b/Projeto/images/Layer208.png new file mode 100644 index 00000000..41b4be6b Binary files /dev/null and b/Projeto/images/Layer208.png differ diff --git a/Projeto/images/Layer210.png b/Projeto/images/Layer210.png new file mode 100644 index 00000000..52174b78 Binary files /dev/null and b/Projeto/images/Layer210.png differ diff --git a/Projeto/images/Layer213.png b/Projeto/images/Layer213.png new file mode 100644 index 00000000..fa4b52c3 Binary files /dev/null and b/Projeto/images/Layer213.png differ diff --git a/Projeto/images/Layer216.png b/Projeto/images/Layer216.png new file mode 100644 index 00000000..46853fde Binary files /dev/null and b/Projeto/images/Layer216.png differ diff --git a/Projeto/images/Layer217.png b/Projeto/images/Layer217.png new file mode 100644 index 00000000..f9c6ff36 Binary files /dev/null and b/Projeto/images/Layer217.png differ diff --git a/Projeto/images/Layer218.png b/Projeto/images/Layer218.png new file mode 100644 index 00000000..6e6d4259 Binary files /dev/null and b/Projeto/images/Layer218.png differ diff --git a/Projeto/images/Layer219.png b/Projeto/images/Layer219.png new file mode 100644 index 00000000..4e3efad3 Binary files /dev/null and b/Projeto/images/Layer219.png differ diff --git a/Projeto/images/Layer220.png b/Projeto/images/Layer220.png new file mode 100644 index 00000000..47e6109a Binary files /dev/null and b/Projeto/images/Layer220.png differ diff --git a/Projeto/images/Layer221.png b/Projeto/images/Layer221.png new file mode 100644 index 00000000..7597f636 Binary files /dev/null and b/Projeto/images/Layer221.png differ diff --git a/Projeto/images/Select.png b/Projeto/images/Select.png new file mode 100644 index 00000000..73ac1f67 Binary files /dev/null and b/Projeto/images/Select.png differ diff --git a/Projeto/images/arrow.png b/Projeto/images/arrow.png new file mode 100644 index 00000000..3733d80f Binary files /dev/null and b/Projeto/images/arrow.png differ diff --git a/Projeto/images/bag.png b/Projeto/images/bag.png new file mode 100644 index 00000000..e1e66627 Binary files /dev/null and b/Projeto/images/bag.png differ diff --git a/Projeto/images/car.png b/Projeto/images/car.png new file mode 100644 index 00000000..ebbdb1e5 Binary files /dev/null and b/Projeto/images/car.png differ diff --git a/Projeto/index.html b/Projeto/index.html new file mode 100644 index 00000000..9fddde77 --- /dev/null +++ b/Projeto/index.html @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + +
+ + + + + + + \ No newline at end of file diff --git a/Projeto/package.json b/Projeto/package.json new file mode 100644 index 00000000..86e6e2e8 --- /dev/null +++ b/Projeto/package.json @@ -0,0 +1,28 @@ +{ + "name": "projeto", + "version": "1.0.0", + "description": "Desafio Profite", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "Diego Marcelo Costa da Silva", + "license": "ISC", + "dependencies": { + "react": "^15.5.4", + "react-dom": "^15.5.4" + }, + "devDependencies": { + "axios": "^0.16.1", + "babel-cli": "^6.24.1", + "babel-core": "^6.24.1", + "babel-loader": "^7.0.0", + "babel-plugin-transform-es2015-modules-commonjs": "^6.24.1", + "babel-preset-react": "^6.24.1", + "gulp": "^3.9.1", + "gulp-live-server": "0.0.30", + "gulp-sass": "^3.1.0", + "gulp-uglify": "^2.0.0", + "webpack": "^2.5.0" + } +} diff --git a/Projeto/producao.html b/Projeto/producao.html new file mode 100644 index 00000000..cd682719 --- /dev/null +++ b/Projeto/producao.html @@ -0,0 +1,19 @@ + + + + + + + + + + + +
+

Desculpe os transtornos.

+

Página em construção!

+

^¬^

+ Voltar +
+ + \ No newline at end of file diff --git a/Projeto/public/css/style.min.css b/Projeto/public/css/style.min.css new file mode 100644 index 00000000..cd703bbf --- /dev/null +++ b/Projeto/public/css/style.min.css @@ -0,0 +1 @@ +@font-face{font-family:DidactGothic;src:url(../../font/DidactGothic-Regular.ttf)}*{font-family:DidactGothic}#page .header{border-bottom:2px solid #ff9f1c;padding-bottom:36px;margin-top:32px}#page .header :nth-child(2){float:right;right:0px;position:absolute;top:10%}#page .header .header-border{width:71%;margin:0 auto;display:flex;position:relative}#page .header .header-border p{background-color:#ff9f1c;border-radius:10px;padding:0px 7px;font-size:14px;color:#fff;text-align:center;line-height:20px;position:relative;top:-6px;left:-5px}#page .subHeader{width:71%;margin:0 auto;margin-top:10px}#page .subHeader__title{display:inline-block}#page .subHeader__title h1{font-weight:100;font-size:1.9em}#page .subHeader__tab{float:right;margin-top:30px;margin-right:6px}#page .subHeader__form select{height:30px;width:125px;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:url(../../images/arrow.png) no-repeat #fff;background-position:95px;background-size:22px;padding-left:8px}#page .subHeader__form select option:hover{background-color:#ff9f1c}#page .subHeader__mobile{display:none}#page .content{width:71%;display:table;margin:0 auto;position:relative}#page .content__Filtro{position:absolute;width:25%}#page .content__Filtro h1.cores{font-size:1.2em;margin-top:26px;margin-bottom:26px;font-weight:100;letter-spacing:2px}#page .content__Filtro h1.tamanho{font-size:1.2em;font-weight:100;margin-bottom:35px;font-weight:100;letter-spacing:2px}#page .content__Filtro h1.preco{font-size:1.2em;margin-top:45px;margin-bottom:28px;font-weight:100;letter-spacing:2px}#page .content__Filtro__box{width:80%}#page .content__Filtro__box a{margin-right:10px;margin-bottom:8px;border:1px solid #e5e5e5;color:#9f9f9f;padding:5px;display:inline-block;width:20px;height:20px;text-align:center;text-decoration:none;font-size:0.7em;line-height:1.8em;font-weight:bold}#page .content__Filtro__box a:hover{border:2px solid #ff9f1c;color:#000;text-decoration:none;font-weight:700;margin-right:10px;margin-bottom:8px;padding:4px;display:inline-block;width:20px;height:20px;text-align:center;text-decoration:none;font-weight:700}#page .content__Filtro__form{margin-top:26px;margin-bottom:46px}#page .content__Filtro__form p{text-decoration:underline;display:inline;margin-right:8px;color:#7a7a7a;cursor:pointer;font-size:0.8em}#page .content__Filtro__form input[type="checkbox"]{display:none}#page .content__Filtro__form input[type="checkbox"]+label{color:#000;font-weight:600;font-size:0.9em;vertical-align:middle}#page .content__Filtro__form input[type="checkbox"]+label .labelSpan{display:inline-block;width:12px;height:12px;margin:0px 10px 0 0;vertical-align:middle;cursor:pointer;border:1px solid #d8d8d8}#page .content__Filtro__form input[type="checkbox"]:checked+label .labelSpan{background-image:url("../../images/Select.png");background-size:8px;background-repeat:no-repeat;background-position:center;border:1px solid #d8d8d8}#page .content__Filtro__form ul{padding-left:0px}#page .content__Filtro__form ul li{list-style:none;margin-top:1px}#page .content__Card{margin:0;width:80%;float:right;margin-right:-38px}#page .content__Card a:-webkit-any-link{color:#000;text-decoration:none}#page .content__Card ul{padding:0px}#page .content__Card ul li{display:inline-block;list-style:none;width:32%;padding:0px 0px;margin-bottom:32px}#page .content__Card img{margin:0 12px}#page .content__Card__mais{text-align:center;background-color:#ff9f1c;width:25%;padding:12px 35px;color:#fff;margin:30px auto}#page .content__Card__mais a:-webkit-any-link{color:#fff;text-decoration:none}#page .content__Card__block__title{font-size:0.8em;text-transform:uppercase;letter-spacing:1px;text-align:center;width:50%;text-align:center;margin:0 auto;height:40px;margin-top:12px}#page .content__Card__block__preco{display:inline-block;margin-left:38px}#page .content__Card__block__preco__total{font-size:1.1em;text-transform:uppercase;text-align:right;font-weight:bold;margin:0px}#page .content__Card__block__preco__total span{font-family:serif}#page .content__Card__block__preco__parcela{margin-top:0px}#page .content__Card__block__preco__parcela span{font-family:serif}#page .content__Card__block__promo{color:#666666;text-decoration:line-through;font-size:0.8em;font-weight:100}#page .arrow{transition:0.3s transform;display:inline-block;-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-o-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg);color:#7a7a7a}#page .arrow_down{transition:0.3s transform;display:inline-block;-webkit-transform:rotate(270deg);-moz-transform:rotate(270deg);-o-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg);color:#7a7a7a}#page .dropdownNone{display:none}#page .dropdownBlock{display:block;margin-top:-13px}#page .dropmenuNone{display:none}#page .dropmenuBlock{display:block;margin:0 auto}#page .highlight{display:none}.producao{width:80%;margin:0 auto;text-align:center}.producao a{text-decoration:none;padding:12px 15%;background:#ff9f1c;border:1px solid #ff9f1c;color:#fff;letter-spacing:1px}@media screen and (max-width: 768px) and (min-width: 320px){#page .content{width:100%;display:table;margin:0 auto;position:relative}#page .content__Filtro{position:absolute;display:none;visibility:hidden}#page .content__Filtro__form ul li{margin-top:5px}#page .content__Filtro__box{width:80%;margin:0 auto}#page .content__Filtro__box a{margin-right:16px;margin-bottom:8px;border:1px solid #e5e5e5;color:#9f9f9f;padding:5px;display:inline-block;width:35px;height:35px;text-align:center;text-decoration:none;font-size:1em;line-height:2em;font-weight:bold}#page .content__Card{margin:0;width:100%;float:left;margin-right:0px}#page .content__Card__img{width:100%}#page .content__Card__block__title{width:70%}#page .content__Card__block__preco{margin:0 5%}#page .content__Card ul{padding:0px}#page .content__Card ul li{display:inline-block;list-style:none;width:50%;margin:0 auto}#page .content__Card img{margin:0px}#page .content__Cardnone{display:none}#page .header .header-border{width:100%}#page .subHeader{display:block}#page .subHeader__title{display:block;text-align:center;margin:0 auto}#page .subHeader__title h1{font-size:1.5em}#page .subHeader__tab{display:none}#page .subHeader__mobile{display:block;text-align:center}#page .subHeader__btnMobile{padding:12px 18%;background:#fff;border:1px solid #000}#page .subHeader__selectMobile{width:90%;margin:40px auto}#page .subHeader__selectMobile__btnMobileSelect{border:1px solid #666666;color:#666666;padding:12px 15%;background:#fff;letter-spacing:1px;float:right}#page .subHeader__selectMobile__btnMobileSelect__first{padding:12px 15%;background:#ff9f1c;border:1px solid #ff9f1c;color:#fff;letter-spacing:1px}#page .dropdownBlock{display:block;text-align:left;margin:0 auto}#page .dropdownBlock h1{display:none}#page .dropdownBlock p span{font-weight:bold}#page .traco{float:right;margin-right:14px;font-weight:bold;font-size:40px;line-height:12px}} diff --git a/Projeto/public/js/app.js b/Projeto/public/js/app.js new file mode 100644 index 00000000..8e6a139d --- /dev/null +++ b/Projeto/public/js/app.js @@ -0,0 +1,4754 @@ +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // identity function for calling harmony imports with the correct context +/******/ __webpack_require__.i = function(value) { return value; }; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { +/******/ configurable: false, +/******/ enumerable: true, +/******/ get: getter +/******/ }); +/******/ } +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 26); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(Buffer) { + +var bind = __webpack_require__(6); + +/*global toString:true*/ + +// utils is a library of generic helper functions non-specific to axios + +var toString = Object.prototype.toString; + +/** + * Determine if a value is an Array + * + * @param {Object} val The value to test + * @returns {boolean} True if value is an Array, otherwise false + */ +function isArray(val) { + return toString.call(val) === '[object Array]'; +} + +/** + * Determine if a value is a Node Buffer + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a Node Buffer, otherwise false + */ +function isBuffer(val) { + return ((typeof Buffer !== 'undefined') && (Buffer.isBuffer) && (Buffer.isBuffer(val))); +} + +/** + * Determine if a value is an ArrayBuffer + * + * @param {Object} val The value to test + * @returns {boolean} True if value is an ArrayBuffer, otherwise false + */ +function isArrayBuffer(val) { + return toString.call(val) === '[object ArrayBuffer]'; +} + +/** + * Determine if a value is a FormData + * + * @param {Object} val The value to test + * @returns {boolean} True if value is an FormData, otherwise false + */ +function isFormData(val) { + return (typeof FormData !== 'undefined') && (val instanceof FormData); +} + +/** + * Determine if a value is a view on an ArrayBuffer + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false + */ +function isArrayBufferView(val) { + var result; + if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) { + result = ArrayBuffer.isView(val); + } else { + result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer); + } + return result; +} + +/** + * Determine if a value is a String + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a String, otherwise false + */ +function isString(val) { + return typeof val === 'string'; +} + +/** + * Determine if a value is a Number + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a Number, otherwise false + */ +function isNumber(val) { + return typeof val === 'number'; +} + +/** + * Determine if a value is undefined + * + * @param {Object} val The value to test + * @returns {boolean} True if the value is undefined, otherwise false + */ +function isUndefined(val) { + return typeof val === 'undefined'; +} + +/** + * Determine if a value is an Object + * + * @param {Object} val The value to test + * @returns {boolean} True if value is an Object, otherwise false + */ +function isObject(val) { + return val !== null && typeof val === 'object'; +} + +/** + * Determine if a value is a Date + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a Date, otherwise false + */ +function isDate(val) { + return toString.call(val) === '[object Date]'; +} + +/** + * Determine if a value is a File + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a File, otherwise false + */ +function isFile(val) { + return toString.call(val) === '[object File]'; +} + +/** + * Determine if a value is a Blob + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a Blob, otherwise false + */ +function isBlob(val) { + return toString.call(val) === '[object Blob]'; +} + +/** + * Determine if a value is a Function + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a Function, otherwise false + */ +function isFunction(val) { + return toString.call(val) === '[object Function]'; +} + +/** + * Determine if a value is a Stream + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a Stream, otherwise false + */ +function isStream(val) { + return isObject(val) && isFunction(val.pipe); +} + +/** + * Determine if a value is a URLSearchParams object + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a URLSearchParams object, otherwise false + */ +function isURLSearchParams(val) { + return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams; +} + +/** + * Trim excess whitespace off the beginning and end of a string + * + * @param {String} str The String to trim + * @returns {String} The String freed of excess whitespace + */ +function trim(str) { + return str.replace(/^\s*/, '').replace(/\s*$/, ''); +} + +/** + * Determine if we're running in a standard browser environment + * + * This allows axios to run in a web worker, and react-native. + * Both environments support XMLHttpRequest, but not fully standard globals. + * + * web workers: + * typeof window -> undefined + * typeof document -> undefined + * + * react-native: + * navigator.product -> 'ReactNative' + */ +function isStandardBrowserEnv() { + if (typeof navigator !== 'undefined' && navigator.product === 'ReactNative') { + return false; + } + return ( + typeof window !== 'undefined' && + typeof document !== 'undefined' + ); +} + +/** + * Iterate over an Array or an Object invoking a function for each item. + * + * If `obj` is an Array callback will be called passing + * the value, index, and complete array for each item. + * + * If 'obj' is an Object callback will be called passing + * the value, key, and complete object for each property. + * + * @param {Object|Array} obj The object to iterate + * @param {Function} fn The callback to invoke for each item + */ +function forEach(obj, fn) { + // Don't bother if no value provided + if (obj === null || typeof obj === 'undefined') { + return; + } + + // Force an array if not already something iterable + if (typeof obj !== 'object' && !isArray(obj)) { + /*eslint no-param-reassign:0*/ + obj = [obj]; + } + + if (isArray(obj)) { + // Iterate over array values + for (var i = 0, l = obj.length; i < l; i++) { + fn.call(null, obj[i], i, obj); + } + } else { + // Iterate over object keys + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + fn.call(null, obj[key], key, obj); + } + } + } +} + +/** + * Accepts varargs expecting each argument to be an object, then + * immutably merges the properties of each object and returns result. + * + * When multiple objects contain the same key the later object in + * the arguments list will take precedence. + * + * Example: + * + * ```js + * var result = merge({foo: 123}, {foo: 456}); + * console.log(result.foo); // outputs 456 + * ``` + * + * @param {Object} obj1 Object to merge + * @returns {Object} Result of all merge properties + */ +function merge(/* obj1, obj2, obj3, ... */) { + var result = {}; + function assignValue(val, key) { + if (typeof result[key] === 'object' && typeof val === 'object') { + result[key] = merge(result[key], val); + } else { + result[key] = val; + } + } + + for (var i = 0, l = arguments.length; i < l; i++) { + forEach(arguments[i], assignValue); + } + return result; +} + +/** + * Extends object a by mutably adding to it the properties of object b. + * + * @param {Object} a The object to be extended + * @param {Object} b The object to copy properties from + * @param {Object} thisArg The object to bind function to + * @return {Object} The resulting value of object a + */ +function extend(a, b, thisArg) { + forEach(b, function assignValue(val, key) { + if (thisArg && typeof val === 'function') { + a[key] = bind(val, thisArg); + } else { + a[key] = val; + } + }); + return a; +} + +module.exports = { + isArray: isArray, + isArrayBuffer: isArrayBuffer, + isBuffer: isBuffer, + isFormData: isFormData, + isArrayBufferView: isArrayBufferView, + isString: isString, + isNumber: isNumber, + isObject: isObject, + isUndefined: isUndefined, + isDate: isDate, + isFile: isFile, + isBlob: isBlob, + isFunction: isFunction, + isStream: isStream, + isURLSearchParams: isURLSearchParams, + isStandardBrowserEnv: isStandardBrowserEnv, + forEach: forEach, + merge: merge, + extend: extend, + trim: trim +}; + +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(28).Buffer)) + +/***/ }), +/* 1 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +var utils = __webpack_require__(0); +var normalizeHeaderName = __webpack_require__(23); + +var DEFAULT_CONTENT_TYPE = { + 'Content-Type': 'application/x-www-form-urlencoded' +}; + +function setContentTypeIfUnset(headers, value) { + if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) { + headers['Content-Type'] = value; + } +} + +function getDefaultAdapter() { + var adapter; + if (typeof XMLHttpRequest !== 'undefined') { + // For browsers use XHR adapter + adapter = __webpack_require__(2); + } else if (typeof process !== 'undefined') { + // For node use HTTP adapter + adapter = __webpack_require__(2); + } + return adapter; +} + +var defaults = { + adapter: getDefaultAdapter(), + + transformRequest: [function transformRequest(data, headers) { + normalizeHeaderName(headers, 'Content-Type'); + if (utils.isFormData(data) || + utils.isArrayBuffer(data) || + utils.isBuffer(data) || + utils.isStream(data) || + utils.isFile(data) || + utils.isBlob(data) + ) { + return data; + } + if (utils.isArrayBufferView(data)) { + return data.buffer; + } + if (utils.isURLSearchParams(data)) { + setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8'); + return data.toString(); + } + if (utils.isObject(data)) { + setContentTypeIfUnset(headers, 'application/json;charset=utf-8'); + return JSON.stringify(data); + } + return data; + }], + + transformResponse: [function transformResponse(data) { + /*eslint no-param-reassign:0*/ + if (typeof data === 'string') { + try { + data = JSON.parse(data); + } catch (e) { /* Ignore */ } + } + return data; + }], + + timeout: 0, + + xsrfCookieName: 'XSRF-TOKEN', + xsrfHeaderName: 'X-XSRF-TOKEN', + + maxContentLength: -1, + + validateStatus: function validateStatus(status) { + return status >= 200 && status < 300; + } +}; + +defaults.headers = { + common: { + 'Accept': 'application/json, text/plain, */*' + } +}; + +utils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) { + defaults.headers[method] = {}; +}); + +utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) { + defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE); +}); + +module.exports = defaults; + +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(7))) + +/***/ }), +/* 2 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +var utils = __webpack_require__(0); +var settle = __webpack_require__(15); +var buildURL = __webpack_require__(18); +var parseHeaders = __webpack_require__(24); +var isURLSameOrigin = __webpack_require__(22); +var createError = __webpack_require__(5); +var btoa = (typeof window !== 'undefined' && window.btoa && window.btoa.bind(window)) || __webpack_require__(17); + +module.exports = function xhrAdapter(config) { + return new Promise(function dispatchXhrRequest(resolve, reject) { + var requestData = config.data; + var requestHeaders = config.headers; + + if (utils.isFormData(requestData)) { + delete requestHeaders['Content-Type']; // Let the browser set it + } + + var request = new XMLHttpRequest(); + var loadEvent = 'onreadystatechange'; + var xDomain = false; + + // For IE 8/9 CORS support + // Only supports POST and GET calls and doesn't returns the response headers. + // DON'T do this for testing b/c XMLHttpRequest is mocked, not XDomainRequest. + if (process.env.NODE_ENV !== 'test' && + typeof window !== 'undefined' && + window.XDomainRequest && !('withCredentials' in request) && + !isURLSameOrigin(config.url)) { + request = new window.XDomainRequest(); + loadEvent = 'onload'; + xDomain = true; + request.onprogress = function handleProgress() {}; + request.ontimeout = function handleTimeout() {}; + } + + // HTTP basic authentication + if (config.auth) { + var username = config.auth.username || ''; + var password = config.auth.password || ''; + requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password); + } + + request.open(config.method.toUpperCase(), buildURL(config.url, config.params, config.paramsSerializer), true); + + // Set the request timeout in MS + request.timeout = config.timeout; + + // Listen for ready state + request[loadEvent] = function handleLoad() { + if (!request || (request.readyState !== 4 && !xDomain)) { + return; + } + + // The request errored out and we didn't get a response, this will be + // handled by onerror instead + // With one exception: request that using file: protocol, most browsers + // will return status as 0 even though it's a successful request + if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) { + return; + } + + // Prepare the response + var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null; + var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response; + var response = { + data: responseData, + // IE sends 1223 instead of 204 (https://github.com/mzabriskie/axios/issues/201) + status: request.status === 1223 ? 204 : request.status, + statusText: request.status === 1223 ? 'No Content' : request.statusText, + headers: responseHeaders, + config: config, + request: request + }; + + settle(resolve, reject, response); + + // Clean up request + request = null; + }; + + // Handle low level network errors + request.onerror = function handleError() { + // Real errors are hidden from us by the browser + // onerror should only fire if it's a network error + reject(createError('Network Error', config)); + + // Clean up request + request = null; + }; + + // Handle timeout + request.ontimeout = function handleTimeout() { + reject(createError('timeout of ' + config.timeout + 'ms exceeded', config, 'ECONNABORTED')); + + // Clean up request + request = null; + }; + + // Add xsrf header + // This is only done if running in a standard browser environment. + // Specifically not if we're in a web worker, or react-native. + if (utils.isStandardBrowserEnv()) { + var cookies = __webpack_require__(20); + + // Add xsrf header + var xsrfValue = (config.withCredentials || isURLSameOrigin(config.url)) && config.xsrfCookieName ? + cookies.read(config.xsrfCookieName) : + undefined; + + if (xsrfValue) { + requestHeaders[config.xsrfHeaderName] = xsrfValue; + } + } + + // Add headers to the request + if ('setRequestHeader' in request) { + utils.forEach(requestHeaders, function setRequestHeader(val, key) { + if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') { + // Remove Content-Type if data is undefined + delete requestHeaders[key]; + } else { + // Otherwise add header to the request + request.setRequestHeader(key, val); + } + }); + } + + // Add withCredentials to request if needed + if (config.withCredentials) { + request.withCredentials = true; + } + + // Add responseType to request if needed + if (config.responseType) { + try { + request.responseType = config.responseType; + } catch (e) { + // Expected DOMException thrown by browsers not compatible XMLHttpRequest Level 2. + // But, this can be suppressed for 'json' type as it can be parsed by default 'transformResponse' function. + if (config.responseType !== 'json') { + throw e; + } + } + } + + // Handle progress if needed + if (typeof config.onDownloadProgress === 'function') { + request.addEventListener('progress', config.onDownloadProgress); + } + + // Not all browsers support upload events + if (typeof config.onUploadProgress === 'function' && request.upload) { + request.upload.addEventListener('progress', config.onUploadProgress); + } + + if (config.cancelToken) { + // Handle cancellation + config.cancelToken.promise.then(function onCanceled(cancel) { + if (!request) { + return; + } + + request.abort(); + reject(cancel); + // Clean up request + request = null; + }); + } + + if (requestData === undefined) { + requestData = null; + } + + // Send the request + request.send(requestData); + }); +}; + +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(7))) + +/***/ }), +/* 3 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * A `Cancel` is an object that is thrown when an operation is canceled. + * + * @class + * @param {string=} message The message. + */ +function Cancel(message) { + this.message = message; +} + +Cancel.prototype.toString = function toString() { + return 'Cancel' + (this.message ? ': ' + this.message : ''); +}; + +Cancel.prototype.__CANCEL__ = true; + +module.exports = Cancel; + + +/***/ }), +/* 4 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +module.exports = function isCancel(value) { + return !!(value && value.__CANCEL__); +}; + + +/***/ }), +/* 5 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var enhanceError = __webpack_require__(14); + +/** + * Create an Error with the specified message, config, error code, and response. + * + * @param {string} message The error message. + * @param {Object} config The config. + * @param {string} [code] The error code (for example, 'ECONNABORTED'). + @ @param {Object} [response] The response. + * @returns {Error} The created error. + */ +module.exports = function createError(message, config, code, response) { + var error = new Error(message); + return enhanceError(error, config, code, response); +}; + + +/***/ }), +/* 6 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +module.exports = function bind(fn, thisArg) { + return function wrap() { + var args = new Array(arguments.length); + for (var i = 0; i < args.length; i++) { + args[i] = arguments[i]; + } + return fn.apply(thisArg, args); + }; +}; + + +/***/ }), +/* 7 */ +/***/ (function(module, exports) { + +// shim for using process in browser +var process = module.exports = {}; + +// cached from whatever global is present so that test runners that stub it +// don't break things. But we need to wrap it in a try catch in case it is +// wrapped in strict mode code which doesn't define any globals. It's inside a +// function because try/catches deoptimize in certain engines. + +var cachedSetTimeout; +var cachedClearTimeout; + +function defaultSetTimout() { + throw new Error('setTimeout has not been defined'); +} +function defaultClearTimeout () { + throw new Error('clearTimeout has not been defined'); +} +(function () { + try { + if (typeof setTimeout === 'function') { + cachedSetTimeout = setTimeout; + } else { + cachedSetTimeout = defaultSetTimout; + } + } catch (e) { + cachedSetTimeout = defaultSetTimout; + } + try { + if (typeof clearTimeout === 'function') { + cachedClearTimeout = clearTimeout; + } else { + cachedClearTimeout = defaultClearTimeout; + } + } catch (e) { + cachedClearTimeout = defaultClearTimeout; + } +} ()) +function runTimeout(fun) { + if (cachedSetTimeout === setTimeout) { + //normal enviroments in sane situations + return setTimeout(fun, 0); + } + // if setTimeout wasn't available but was latter defined + if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { + cachedSetTimeout = setTimeout; + return setTimeout(fun, 0); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedSetTimeout(fun, 0); + } catch(e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedSetTimeout.call(null, fun, 0); + } catch(e){ + // 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 + return cachedSetTimeout.call(this, fun, 0); + } + } + + +} +function runClearTimeout(marker) { + if (cachedClearTimeout === clearTimeout) { + //normal enviroments in sane situations + return clearTimeout(marker); + } + // if clearTimeout wasn't available but was latter defined + if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { + cachedClearTimeout = clearTimeout; + return clearTimeout(marker); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedClearTimeout(marker); + } catch (e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedClearTimeout.call(null, marker); + } catch (e){ + // 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. + // Some versions of I.E. have different rules for clearTimeout vs setTimeout + return cachedClearTimeout.call(this, marker); + } + } + + + +} +var queue = []; +var draining = false; +var currentQueue; +var queueIndex = -1; + +function cleanUpNextTick() { + if (!draining || !currentQueue) { + return; + } + draining = false; + if (currentQueue.length) { + queue = currentQueue.concat(queue); + } else { + queueIndex = -1; + } + if (queue.length) { + drainQueue(); + } +} + +function drainQueue() { + if (draining) { + return; + } + var timeout = runTimeout(cleanUpNextTick); + draining = true; + + var len = queue.length; + while(len) { + currentQueue = queue; + queue = []; + while (++queueIndex < len) { + if (currentQueue) { + currentQueue[queueIndex].run(); + } + } + queueIndex = -1; + len = queue.length; + } + currentQueue = null; + draining = false; + runClearTimeout(timeout); +} + +process.nextTick = function (fun) { + var args = new Array(arguments.length - 1); + if (arguments.length > 1) { + for (var i = 1; i < arguments.length; i++) { + args[i - 1] = arguments[i]; + } + } + queue.push(new Item(fun, args)); + if (queue.length === 1 && !draining) { + runTimeout(drainQueue); + } +}; + +// v8 likes predictible objects +function Item(fun, array) { + this.fun = fun; + this.array = array; +} +Item.prototype.run = function () { + this.fun.apply(null, this.array); +}; +process.title = 'browser'; +process.browser = true; +process.env = {}; +process.argv = []; +process.version = ''; // empty string to avoid regexp issues +process.versions = {}; + +function noop() {} + +process.on = noop; +process.addListener = noop; +process.once = noop; +process.off = noop; +process.removeListener = noop; +process.removeAllListeners = noop; +process.emit = noop; +process.prependListener = noop; +process.prependOnceListener = noop; + +process.listeners = function (name) { return [] } + +process.binding = function (name) { + throw new Error('process.binding is not supported'); +}; + +process.cwd = function () { return '/' }; +process.chdir = function (dir) { + throw new Error('process.chdir is not supported'); +}; +process.umask = function() { return 0; }; + + +/***/ }), +/* 8 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = __webpack_require__(9); + +/***/ }), +/* 9 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var utils = __webpack_require__(0); +var bind = __webpack_require__(6); +var Axios = __webpack_require__(11); +var defaults = __webpack_require__(1); + +/** + * Create an instance of Axios + * + * @param {Object} defaultConfig The default config for the instance + * @return {Axios} A new instance of Axios + */ +function createInstance(defaultConfig) { + var context = new Axios(defaultConfig); + var instance = bind(Axios.prototype.request, context); + + // Copy axios.prototype to instance + utils.extend(instance, Axios.prototype, context); + + // Copy context to instance + utils.extend(instance, context); + + return instance; +} + +// Create the default instance to be exported +var axios = createInstance(defaults); + +// Expose Axios class to allow class inheritance +axios.Axios = Axios; + +// Factory for creating new instances +axios.create = function create(instanceConfig) { + return createInstance(utils.merge(defaults, instanceConfig)); +}; + +// Expose Cancel & CancelToken +axios.Cancel = __webpack_require__(3); +axios.CancelToken = __webpack_require__(10); +axios.isCancel = __webpack_require__(4); + +// Expose all/spread +axios.all = function all(promises) { + return Promise.all(promises); +}; +axios.spread = __webpack_require__(25); + +module.exports = axios; + +// Allow use of default import syntax in TypeScript +module.exports.default = axios; + + +/***/ }), +/* 10 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var Cancel = __webpack_require__(3); + +/** + * A `CancelToken` is an object that can be used to request cancellation of an operation. + * + * @class + * @param {Function} executor The executor function. + */ +function CancelToken(executor) { + if (typeof executor !== 'function') { + throw new TypeError('executor must be a function.'); + } + + var resolvePromise; + this.promise = new Promise(function promiseExecutor(resolve) { + resolvePromise = resolve; + }); + + var token = this; + executor(function cancel(message) { + if (token.reason) { + // Cancellation has already been requested + return; + } + + token.reason = new Cancel(message); + resolvePromise(token.reason); + }); +} + +/** + * Throws a `Cancel` if cancellation has been requested. + */ +CancelToken.prototype.throwIfRequested = function throwIfRequested() { + if (this.reason) { + throw this.reason; + } +}; + +/** + * Returns an object that contains a new `CancelToken` and a function that, when called, + * cancels the `CancelToken`. + */ +CancelToken.source = function source() { + var cancel; + var token = new CancelToken(function executor(c) { + cancel = c; + }); + return { + token: token, + cancel: cancel + }; +}; + +module.exports = CancelToken; + + +/***/ }), +/* 11 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var defaults = __webpack_require__(1); +var utils = __webpack_require__(0); +var InterceptorManager = __webpack_require__(12); +var dispatchRequest = __webpack_require__(13); +var isAbsoluteURL = __webpack_require__(21); +var combineURLs = __webpack_require__(19); + +/** + * Create a new instance of Axios + * + * @param {Object} instanceConfig The default config for the instance + */ +function Axios(instanceConfig) { + this.defaults = instanceConfig; + this.interceptors = { + request: new InterceptorManager(), + response: new InterceptorManager() + }; +} + +/** + * Dispatch a request + * + * @param {Object} config The config specific for this request (merged with this.defaults) + */ +Axios.prototype.request = function request(config) { + /*eslint no-param-reassign:0*/ + // Allow for axios('example/url'[, config]) a la fetch API + if (typeof config === 'string') { + config = utils.merge({ + url: arguments[0] + }, arguments[1]); + } + + config = utils.merge(defaults, this.defaults, { method: 'get' }, config); + + // Support baseURL config + if (config.baseURL && !isAbsoluteURL(config.url)) { + config.url = combineURLs(config.baseURL, config.url); + } + + // Hook up interceptors middleware + var chain = [dispatchRequest, undefined]; + var promise = Promise.resolve(config); + + this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) { + chain.unshift(interceptor.fulfilled, interceptor.rejected); + }); + + this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) { + chain.push(interceptor.fulfilled, interceptor.rejected); + }); + + while (chain.length) { + promise = promise.then(chain.shift(), chain.shift()); + } + + return promise; +}; + +// Provide aliases for supported request methods +utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) { + /*eslint func-names:0*/ + Axios.prototype[method] = function(url, config) { + return this.request(utils.merge(config || {}, { + method: method, + url: url + })); + }; +}); + +utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) { + /*eslint func-names:0*/ + Axios.prototype[method] = function(url, data, config) { + return this.request(utils.merge(config || {}, { + method: method, + url: url, + data: data + })); + }; +}); + +module.exports = Axios; + + +/***/ }), +/* 12 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var utils = __webpack_require__(0); + +function InterceptorManager() { + this.handlers = []; +} + +/** + * Add a new interceptor to the stack + * + * @param {Function} fulfilled The function to handle `then` for a `Promise` + * @param {Function} rejected The function to handle `reject` for a `Promise` + * + * @return {Number} An ID used to remove interceptor later + */ +InterceptorManager.prototype.use = function use(fulfilled, rejected) { + this.handlers.push({ + fulfilled: fulfilled, + rejected: rejected + }); + return this.handlers.length - 1; +}; + +/** + * Remove an interceptor from the stack + * + * @param {Number} id The ID that was returned by `use` + */ +InterceptorManager.prototype.eject = function eject(id) { + if (this.handlers[id]) { + this.handlers[id] = null; + } +}; + +/** + * Iterate over all the registered interceptors + * + * This method is particularly useful for skipping over any + * interceptors that may have become `null` calling `eject`. + * + * @param {Function} fn The function to call for each interceptor + */ +InterceptorManager.prototype.forEach = function forEach(fn) { + utils.forEach(this.handlers, function forEachHandler(h) { + if (h !== null) { + fn(h); + } + }); +}; + +module.exports = InterceptorManager; + + +/***/ }), +/* 13 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var utils = __webpack_require__(0); +var transformData = __webpack_require__(16); +var isCancel = __webpack_require__(4); +var defaults = __webpack_require__(1); + +/** + * Throws a `Cancel` if cancellation has been requested. + */ +function throwIfCancellationRequested(config) { + if (config.cancelToken) { + config.cancelToken.throwIfRequested(); + } +} + +/** + * Dispatch a request to the server using the configured adapter. + * + * @param {object} config The config that is to be used for the request + * @returns {Promise} The Promise to be fulfilled + */ +module.exports = function dispatchRequest(config) { + throwIfCancellationRequested(config); + + // Ensure headers exist + config.headers = config.headers || {}; + + // Transform request data + config.data = transformData( + config.data, + config.headers, + config.transformRequest + ); + + // Flatten headers + config.headers = utils.merge( + config.headers.common || {}, + config.headers[config.method] || {}, + config.headers || {} + ); + + utils.forEach( + ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], + function cleanHeaderConfig(method) { + delete config.headers[method]; + } + ); + + var adapter = config.adapter || defaults.adapter; + + return adapter(config).then(function onAdapterResolution(response) { + throwIfCancellationRequested(config); + + // Transform response data + response.data = transformData( + response.data, + response.headers, + config.transformResponse + ); + + return response; + }, function onAdapterRejection(reason) { + if (!isCancel(reason)) { + throwIfCancellationRequested(config); + + // Transform response data + if (reason && reason.response) { + reason.response.data = transformData( + reason.response.data, + reason.response.headers, + config.transformResponse + ); + } + } + + return Promise.reject(reason); + }); +}; + + +/***/ }), +/* 14 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * Update an Error with the specified config, error code, and response. + * + * @param {Error} error The error to update. + * @param {Object} config The config. + * @param {string} [code] The error code (for example, 'ECONNABORTED'). + @ @param {Object} [response] The response. + * @returns {Error} The error. + */ +module.exports = function enhanceError(error, config, code, response) { + error.config = config; + if (code) { + error.code = code; + } + error.response = response; + return error; +}; + + +/***/ }), +/* 15 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var createError = __webpack_require__(5); + +/** + * Resolve or reject a Promise based on response status. + * + * @param {Function} resolve A function that resolves the promise. + * @param {Function} reject A function that rejects the promise. + * @param {object} response The response. + */ +module.exports = function settle(resolve, reject, response) { + var validateStatus = response.config.validateStatus; + // Note: status is not exposed by XDomainRequest + if (!response.status || !validateStatus || validateStatus(response.status)) { + resolve(response); + } else { + reject(createError( + 'Request failed with status code ' + response.status, + response.config, + null, + response + )); + } +}; + + +/***/ }), +/* 16 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var utils = __webpack_require__(0); + +/** + * Transform the data for a request or a response + * + * @param {Object|String} data The data to be transformed + * @param {Array} headers The headers for the request or response + * @param {Array|Function} fns A single function or Array of functions + * @returns {*} The resulting transformed data + */ +module.exports = function transformData(data, headers, fns) { + /*eslint no-param-reassign:0*/ + utils.forEach(fns, function transform(fn) { + data = fn(data, headers); + }); + + return data; +}; + + +/***/ }), +/* 17 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +// btoa polyfill for IE<10 courtesy https://github.com/davidchambers/Base64.js + +var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='; + +function E() { + this.message = 'String contains an invalid character'; +} +E.prototype = new Error; +E.prototype.code = 5; +E.prototype.name = 'InvalidCharacterError'; + +function btoa(input) { + var str = String(input); + var output = ''; + for ( + // initialize result and counter + var block, charCode, idx = 0, map = chars; + // if the next str index does not exist: + // change the mapping table to "=" + // check if d has no fractional digits + str.charAt(idx | 0) || (map = '=', idx % 1); + // "8 - idx % 1 * 8" generates the sequence 2, 4, 6, 8 + output += map.charAt(63 & block >> 8 - idx % 1 * 8) + ) { + charCode = str.charCodeAt(idx += 3 / 4); + if (charCode > 0xFF) { + throw new E(); + } + block = block << 8 | charCode; + } + return output; +} + +module.exports = btoa; + + +/***/ }), +/* 18 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var utils = __webpack_require__(0); + +function encode(val) { + return encodeURIComponent(val). + replace(/%40/gi, '@'). + replace(/%3A/gi, ':'). + replace(/%24/g, '$'). + replace(/%2C/gi, ','). + replace(/%20/g, '+'). + replace(/%5B/gi, '['). + replace(/%5D/gi, ']'); +} + +/** + * Build a URL by appending params to the end + * + * @param {string} url The base of the url (e.g., http://www.google.com) + * @param {object} [params] The params to be appended + * @returns {string} The formatted url + */ +module.exports = function buildURL(url, params, paramsSerializer) { + /*eslint no-param-reassign:0*/ + if (!params) { + return url; + } + + var serializedParams; + if (paramsSerializer) { + serializedParams = paramsSerializer(params); + } else if (utils.isURLSearchParams(params)) { + serializedParams = params.toString(); + } else { + var parts = []; + + utils.forEach(params, function serialize(val, key) { + if (val === null || typeof val === 'undefined') { + return; + } + + if (utils.isArray(val)) { + key = key + '[]'; + } + + if (!utils.isArray(val)) { + val = [val]; + } + + utils.forEach(val, function parseValue(v) { + if (utils.isDate(v)) { + v = v.toISOString(); + } else if (utils.isObject(v)) { + v = JSON.stringify(v); + } + parts.push(encode(key) + '=' + encode(v)); + }); + }); + + serializedParams = parts.join('&'); + } + + if (serializedParams) { + url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams; + } + + return url; +}; + + +/***/ }), +/* 19 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * Creates a new URL by combining the specified URLs + * + * @param {string} baseURL The base URL + * @param {string} relativeURL The relative URL + * @returns {string} The combined URL + */ +module.exports = function combineURLs(baseURL, relativeURL) { + return relativeURL + ? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '') + : baseURL; +}; + + +/***/ }), +/* 20 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var utils = __webpack_require__(0); + +module.exports = ( + utils.isStandardBrowserEnv() ? + + // Standard browser envs support document.cookie + (function standardBrowserEnv() { + return { + write: function write(name, value, expires, path, domain, secure) { + var cookie = []; + cookie.push(name + '=' + encodeURIComponent(value)); + + if (utils.isNumber(expires)) { + cookie.push('expires=' + new Date(expires).toGMTString()); + } + + if (utils.isString(path)) { + cookie.push('path=' + path); + } + + if (utils.isString(domain)) { + cookie.push('domain=' + domain); + } + + if (secure === true) { + cookie.push('secure'); + } + + document.cookie = cookie.join('; '); + }, + + read: function read(name) { + var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)')); + return (match ? decodeURIComponent(match[3]) : null); + }, + + remove: function remove(name) { + this.write(name, '', Date.now() - 86400000); + } + }; + })() : + + // Non standard browser env (web workers, react-native) lack needed support. + (function nonStandardBrowserEnv() { + return { + write: function write() {}, + read: function read() { return null; }, + remove: function remove() {} + }; + })() +); + + +/***/ }), +/* 21 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * Determines whether the specified URL is absolute + * + * @param {string} url The URL to test + * @returns {boolean} True if the specified URL is absolute, otherwise false + */ +module.exports = function isAbsoluteURL(url) { + // A URL is considered absolute if it begins with "://" or "//" (protocol-relative URL). + // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed + // by any combination of letters, digits, plus, period, or hyphen. + return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url); +}; + + +/***/ }), +/* 22 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var utils = __webpack_require__(0); + +module.exports = ( + utils.isStandardBrowserEnv() ? + + // Standard browser envs have full support of the APIs needed to test + // whether the request URL is of the same origin as current location. + (function standardBrowserEnv() { + var msie = /(msie|trident)/i.test(navigator.userAgent); + var urlParsingNode = document.createElement('a'); + var originURL; + + /** + * Parse a URL to discover it's components + * + * @param {String} url The URL to be parsed + * @returns {Object} + */ + function resolveURL(url) { + var href = url; + + if (msie) { + // IE needs attribute set twice to normalize properties + urlParsingNode.setAttribute('href', href); + href = urlParsingNode.href; + } + + urlParsingNode.setAttribute('href', href); + + // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils + return { + href: urlParsingNode.href, + protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '', + host: urlParsingNode.host, + search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '', + hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '', + hostname: urlParsingNode.hostname, + port: urlParsingNode.port, + pathname: (urlParsingNode.pathname.charAt(0) === '/') ? + urlParsingNode.pathname : + '/' + urlParsingNode.pathname + }; + } + + originURL = resolveURL(window.location.href); + + /** + * Determine if a URL shares the same origin as the current location + * + * @param {String} requestURL The URL to test + * @returns {boolean} True if URL shares the same origin, otherwise false + */ + return function isURLSameOrigin(requestURL) { + var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL; + return (parsed.protocol === originURL.protocol && + parsed.host === originURL.host); + }; + })() : + + // Non standard browser envs (web workers, react-native) lack needed support. + (function nonStandardBrowserEnv() { + return function isURLSameOrigin() { + return true; + }; + })() +); + + +/***/ }), +/* 23 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var utils = __webpack_require__(0); + +module.exports = function normalizeHeaderName(headers, normalizedName) { + utils.forEach(headers, function processHeader(value, name) { + if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) { + headers[normalizedName] = value; + delete headers[name]; + } + }); +}; + + +/***/ }), +/* 24 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var utils = __webpack_require__(0); + +/** + * Parse headers into an object + * + * ``` + * Date: Wed, 27 Aug 2014 08:58:49 GMT + * Content-Type: application/json + * Connection: keep-alive + * Transfer-Encoding: chunked + * ``` + * + * @param {String} headers Headers needing to be parsed + * @returns {Object} Headers parsed into an object + */ +module.exports = function parseHeaders(headers) { + var parsed = {}; + var key; + var val; + var i; + + if (!headers) { return parsed; } + + utils.forEach(headers.split('\n'), function parser(line) { + i = line.indexOf(':'); + key = utils.trim(line.substr(0, i)).toLowerCase(); + val = utils.trim(line.substr(i + 1)); + + if (key) { + parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val; + } + }); + + return parsed; +}; + + +/***/ }), +/* 25 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * Syntactic sugar for invoking a function and expanding an array for arguments. + * + * Common use case would be to use `Function.prototype.apply`. + * + * ```js + * function f(x, y, z) {} + * var args = [1, 2, 3]; + * f.apply(null, args); + * ``` + * + * With `spread` this example can be re-written. + * + * ```js + * spread(function(x, y, z) {})([1, 2, 3]); + * ``` + * + * @param {Function} callback + * @returns {Function} + */ +module.exports = function spread(callback) { + return function wrap(arr) { + return callback.apply(null, arr); + }; +}; + + +/***/ }), +/* 26 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _axios = __webpack_require__(8); + +var _axios2 = _interopRequireDefault(_axios); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +// *************** Componente pesponsável pelo esqueleto da página ************ + +var Page = React.createClass({ + displayName: "Page", + + + render: function () { + return React.createElement( + "page", + null, + React.createElement(Header, null), + React.createElement(SubHeader, null), + React.createElement( + "div", + { className: "content" }, + React.createElement(ContentFiltro, null), + React.createElement(ContentCards, null) + ) + ); + } +}); + +// *************** Componente pesponsável pelo header ************ + +var Header = React.createClass({ + displayName: "Header", + + render: function () { + return React.createElement( + "div", + { className: "header" }, + React.createElement( + "div", + { className: "header-border" }, + React.createElement("img", { className: "header__logo", src: "images/logo.png" }), + React.createElement( + "div", + null, + React.createElement("img", { className: "header__bag", src: "images/bag.png" }), + React.createElement( + "p", + null, + "3" + ) + ) + ) + ); + } +}); + +// *************** Componente pesponsável pelo header ************ + +var SubHeader = React.createClass({ + displayName: "SubHeader", + + getInitialState: function () { + return { + click: true + }; + }, + dropBlock: function () { + this.setState({ + click: !this.state.click + }); + }, + + render: function () { + var dropMenus = this.state.click ? 'dropmenuBlock' : 'dropmenuNone'; + var dropClass = this.state.click ? 'dropdownNone' : 'dropdownBlock'; + return React.createElement( + "div", + null, + React.createElement( + "div", + { className: "subHeader" }, + React.createElement( + "div", + { className: "subHeader__title" }, + React.createElement( + "h1", + null, + "VESTIDOS" + ) + ), + React.createElement( + "div", + { className: "subHeader__tab" }, + React.createElement( + "form", + { action: "", className: "subHeader__form" }, + React.createElement( + "select", + { name: "", id: "", className: "subHeader__select" }, + React.createElement( + "option", + { value: "", selected: true }, + "Ordenar Por:" + ), + React.createElement( + "option", + { value: "recentes" }, + "Mais Recentes" + ), + React.createElement( + "option", + { value: "menor" }, + "Menor Pre\xE7o" + ), + React.createElement( + "option", + { value: "maior" }, + "Maior Pre\xE7o" + ) + ) + ) + ) + ), + React.createElement( + "div", + { className: "subHeader__mobile" }, + React.createElement( + "button", + { className: "subHeader__btnMobile", onClick: this.dropBlock }, + "Filtrar" + ), + React.createElement( + "button", + { className: "subHeader__btnMobile" }, + "Ordenar" + ), + React.createElement( + "div", + { className: "subHeader__selectMobile" }, + React.createElement( + "div", + { className: dropClass }, + React.createElement(MenuCor, null), + React.createElement(MenuTamanho, null), + React.createElement(MenuPreco, null), + React.createElement( + "button", + { className: "subHeader__selectMobile__btnMobileSelect__first" }, + "APLICAR" + ), + React.createElement( + "button", + { className: "subHeader__selectMobile__btnMobileSelect" }, + "LIMPAR" + ) + ) + ) + ) + ); + } +}); + +// *************** Componente pesponsável pelo filtro de cor do menu da versão mobile ************ + +var MenuCor = React.createClass({ + displayName: "MenuCor", + + getInitialState: function () { + return { + click: true + }; + }, + dropMenuCor: function () { + this.setState({ + click: !this.state.click + }); + }, + + render: function () { + var dropMenuCor = this.state.click ? 'dropmenuBlock' : 'dropmenuNone'; + return React.createElement( + "div", + null, + React.createElement( + "p", + { onClick: this.dropMenuCor }, + "CORES ", + React.createElement( + "span", + { className: "traco" }, + "-" + ) + ), + React.createElement( + "div", + { className: dropMenuCor }, + React.createElement( + "div", + null, + React.createElement( + "h1", + { className: "cores" }, + "CORES" + ), + React.createElement( + "div", + null, + React.createElement( + "form", + { action: "", method: "", className: "content__Filtro__form" }, + React.createElement( + "ul", + null, + React.createElement( + "li", + null, + React.createElement("input", { type: "checkbox", name: "cores", value: "cores", id: "amarelom" }), + React.createElement( + "label", + { htmlFor: "amarelom" }, + React.createElement("span", { className: "labelSpan" }), + "Amarelo" + ) + ), + React.createElement( + "li", + null, + React.createElement("input", { type: "checkbox", name: "cores", value: "cores", id: "azulm" }), + React.createElement( + "label", + { htmlFor: "azulm" }, + React.createElement("span", { className: "labelSpan" }), + "Azul" + ) + ), + React.createElement( + "li", + null, + React.createElement("input", { type: "checkbox", name: "cores", value: "cores", id: "brancom" }), + React.createElement( + "label", + { htmlFor: "brancom" }, + React.createElement("span", { className: "labelSpan" }), + "Branco" + ) + ), + React.createElement( + "li", + null, + React.createElement("input", { type: "checkbox", name: "cores", value: "cores", id: "cinzam" }), + React.createElement( + "label", + { htmlFor: "cinzam" }, + React.createElement("span", { className: "labelSpan" }), + "Cinza" + ) + ), + React.createElement( + "li", + null, + React.createElement("input", { type: "checkbox", name: "cores", value: "cores", id: "laranjam" }), + React.createElement( + "label", + { htmlFor: "laranjam" }, + React.createElement("span", { className: "labelSpan" }), + "Laranja" + ) + ), + React.createElement( + "li", + null, + React.createElement("input", { type: "checkbox", name: "cores", value: "cores", id: "verdem" }), + React.createElement( + "label", + { htmlFor: "verdem" }, + React.createElement("span", { className: "labelSpan" }), + "Verde" + ) + ), + React.createElement( + "li", + null, + React.createElement("input", { type: "checkbox", name: "cores", value: "cores", id: "vermelhom" }), + React.createElement( + "label", + { htmlFor: "vermelhom" }, + React.createElement("span", { className: "labelSpan" }), + "Vermelho" + ) + ), + React.createElement( + "li", + null, + React.createElement("input", { type: "checkbox", name: "cores", value: "cores", id: "rosam" }), + React.createElement( + "label", + { htmlFor: "rosam" }, + React.createElement("span", { className: "labelSpan" }), + "Rosa" + ) + ), + React.createElement( + "li", + null, + React.createElement("input", { type: "checkbox", name: "cores", value: "cores", id: "vinhom" }), + React.createElement( + "label", + { htmlFor: "vinhom" }, + React.createElement("span", { className: "labelSpan" }), + "Vinho" + ) + ) + ) + ) + ) + ) + ) + ); + } +}); + +// *************** Componente pesponsável pelo filtro de tamanho do menu da versão mobile ************ + +var MenuTamanho = React.createClass({ + displayName: "MenuTamanho", + + getInitialState: function () { + return { + click: true + }; + }, + dropMenuTam: function () { + this.setState({ + click: !this.state.click + }); + }, + + render: function () { + var dropMenuTam = this.state.click ? 'dropmenuBlock' : 'dropmenuNone'; + return React.createElement( + "div", + null, + React.createElement( + "p", + { onClick: this.dropMenuTam }, + "TAMANHO ", + React.createElement( + "span", + { className: "traco" }, + "-" + ) + ), + React.createElement( + "div", + { className: dropMenuTam }, + React.createElement(ContentTamanhos, null) + ) + ); + } +}); + +// *************** Componente pesponsável pelo filtro de preço do menu da versão mobile ************ + +var MenuPreco = React.createClass({ + displayName: "MenuPreco", + + getInitialState: function () { + return { + click: true + }; + }, + dropMenuPreco: function () { + this.setState({ + click: !this.state.click + }); + }, + + render: function () { + var dropMenuPreco = this.state.click ? 'dropmenuBlock' : 'dropmenuNone'; + return React.createElement( + "div", + null, + React.createElement( + "p", + { onClick: this.dropMenuPreco }, + "PRECOS ", + React.createElement( + "span", + { className: "traco" }, + "-" + ) + ), + React.createElement( + "div", + { className: dropMenuPreco }, + React.createElement( + "div", + null, + React.createElement( + "h1", + { className: "preco" }, + "FAIXA DE PRE\xC7O" + ), + React.createElement( + "div", + null, + React.createElement( + "form", + { action: "", method: "", className: "content__Filtro__form" }, + React.createElement( + "ul", + null, + React.createElement( + "li", + null, + React.createElement("input", { type: "checkbox", name: "precos", value: "preco", id: "de0m" }), + React.createElement( + "label", + { htmlFor: "de0m" }, + React.createElement("span", { className: "labelSpan" }), + "de R$ 0 at\xE9 R$ 50" + ) + ), + React.createElement( + "li", + null, + React.createElement("input", { type: "checkbox", name: "precos", value: "preco", id: "de51m" }), + React.createElement( + "label", + { htmlFor: "de51m" }, + React.createElement("span", { className: "labelSpan" }), + "de R$ 51 at\xE9 R$ 150" + ) + ), + React.createElement( + "li", + null, + React.createElement("input", { type: "checkbox", name: "precos", value: "preco", id: "de151m" }), + React.createElement( + "label", + { htmlFor: "de151m" }, + React.createElement("span", { className: "labelSpan" }), + "de R$ 151 at\xE9 R$ 300" + ) + ), + React.createElement( + "li", + null, + React.createElement("input", { type: "checkbox", name: "precos", value: "preco", id: "de301m" }), + React.createElement( + "label", + { htmlFor: "de301m" }, + React.createElement("span", { className: "labelSpan" }), + "de R$ 301 at\xE9 R$ 500" + ) + ), + React.createElement( + "li", + null, + React.createElement("input", { type: "checkbox", name: "precos", value: "preco", id: "de501m" }), + React.createElement( + "label", + { htmlFor: "de501m" }, + React.createElement("span", { className: "labelSpan" }), + "a partir de R$ 501" + ) + ) + ) + ) + ) + ) + ) + ); + } +}); + +// *************** Componente pesponsável pelo esquelo do menu esquerdo da página (filtro) versão desktop ************ + +var ContentFiltro = React.createClass({ + displayName: "ContentFiltro", + + render: function () { + return React.createElement( + "div", + { className: "content__Filtro" }, + React.createElement(ContentCores, null), + React.createElement(ContentTamanhos, null), + React.createElement(ContentPrecos, null) + ); + } +}); + +// *************** Componente pesponsável pelo conteudo lateral esquerdo da página (Cores) versão desktop ************ + +var ContentCores = React.createClass({ + displayName: "ContentCores", + + + getInitialState: function () { + return { + click: true + }; + }, + + dropBlock: function () { + this.setState({ + click: !this.state.click + }); + }, + + render: function () { + var dropClass = this.state.click ? 'dropdownNone' : 'dropdownBlock'; + var arrowClass = this.state.click ? 'arrow' : 'arrow_down'; + return React.createElement( + "div", + null, + React.createElement( + "h1", + { className: "cores" }, + "CORES" + ), + React.createElement( + "div", + null, + React.createElement( + "form", + { action: "", method: "", className: "content__Filtro__form" }, + React.createElement( + "ul", + null, + React.createElement( + "li", + null, + React.createElement("input", { type: "checkbox", name: "cores", value: "amarelo", id: "amarelo" }), + React.createElement( + "label", + { htmlFor: "amarelo" }, + React.createElement("span", { className: "labelSpan" }), + "Amarelo" + ) + ), + React.createElement( + "li", + null, + React.createElement("input", { type: "checkbox", name: "cores", value: "azul", id: "azul" }), + React.createElement( + "label", + { htmlFor: "azul" }, + React.createElement("span", { className: "labelSpan" }), + "Azul" + ) + ), + React.createElement( + "li", + null, + React.createElement("input", { type: "checkbox", name: "cores", value: "branco", id: "branco" }), + React.createElement( + "label", + { htmlFor: "branco" }, + React.createElement("span", { className: "labelSpan" }), + "Branco" + ) + ), + React.createElement( + "li", + null, + React.createElement("input", { type: "checkbox", name: "cores", value: "cinza", id: "cinza" }), + React.createElement( + "label", + { htmlFor: "cinza" }, + React.createElement("span", { className: "labelSpan" }), + "Cinza" + ) + ), + React.createElement( + "li", + null, + React.createElement("input", { type: "checkbox", name: "cores", value: "laranja", id: "laranja" }), + React.createElement( + "label", + { htmlFor: "laranja" }, + React.createElement("span", { className: "labelSpan" }), + "Laranja" + ) + ) + ), + React.createElement( + "div", + { className: "dropdown", className: dropClass }, + React.createElement( + "ul", + null, + React.createElement( + "li", + null, + React.createElement("input", { type: "checkbox", name: "cores", value: "verde", id: "verde" }), + React.createElement( + "label", + { htmlFor: "verde" }, + React.createElement("span", { className: "labelSpan" }), + "Verde" + ) + ), + React.createElement( + "li", + null, + React.createElement("input", { type: "checkbox", name: "cores", value: "vermelho", id: "vermelho" }), + React.createElement( + "label", + { htmlFor: "vermelho" }, + React.createElement("span", { className: "labelSpan" }), + "Vermelho" + ) + ), + React.createElement( + "li", + null, + React.createElement("input", { type: "checkbox", name: "cores", value: "rosa", id: "rosa" }), + React.createElement( + "label", + { htmlFor: "rosa" }, + React.createElement("span", { className: "labelSpan" }), + "Rosa" + ) + ), + React.createElement( + "li", + null, + React.createElement("input", { type: "checkbox", name: "cores", value: "vinho", id: "vinho" }), + React.createElement( + "label", + { htmlFor: "vinho" }, + React.createElement("span", { className: "labelSpan" }), + "Vinho" + ) + ) + ) + ), + React.createElement( + "p", + { onClick: this.dropBlock }, + "Ver todas as cores" + ), + React.createElement( + "span", + { className: arrowClass }, + " \u276F" + ) + ) + ) + ); + } +}); + +// *************** Componente pesponsável pelo conteudo lateral esquerdo da página (Tamanhos) versão desktop *********** + +var ContentTamanhos = React.createClass({ + displayName: "ContentTamanhos", + + render: function () { + return React.createElement( + "div", + null, + React.createElement( + "h1", + { className: "tamanho" }, + "TAMANHOS" + ), + React.createElement( + "div", + { className: "content__Filtro__box" }, + React.createElement( + "a", + { href: "#" }, + "P" + ), + React.createElement( + "a", + { href: "#" }, + "M" + ), + React.createElement( + "a", + { href: "#" }, + "G" + ), + React.createElement( + "a", + { href: "#" }, + "GG" + ), + React.createElement( + "a", + { href: "#" }, + "U" + ), + React.createElement( + "a", + { href: "#" }, + "36" + ), + React.createElement( + "a", + { href: "#" }, + "38" + ), + React.createElement( + "a", + { href: "#" }, + "40" + ), + React.createElement( + "a", + { href: "#" }, + "42" + ), + React.createElement( + "a", + { href: "#" }, + "44" + ), + React.createElement( + "a", + { href: "#" }, + "46" + ) + ) + ); + } +}); + +// *************** Componente pesponsável pelo conteudo lateral esquerdo da página (Preco) versão desktop *********** + +var ContentPrecos = React.createClass({ + displayName: "ContentPrecos", + + + render: function () { + return React.createElement( + "div", + null, + React.createElement( + "h1", + { className: "preco" }, + "FAIXA DE PRE\xC7O" + ), + React.createElement( + "div", + null, + React.createElement( + "form", + { action: "", method: "", className: "content__Filtro__form" }, + React.createElement( + "ul", + null, + React.createElement( + "li", + null, + React.createElement("input", { type: "checkbox", name: "precos", value: "preco", id: "de0" }), + React.createElement( + "label", + { htmlFor: "de0" }, + React.createElement("span", { className: "labelSpan" }), + "de R$ 0 at\xE9 R$ 50" + ) + ), + React.createElement( + "li", + null, + React.createElement("input", { type: "checkbox", name: "precos", value: "preco", id: "de51" }), + React.createElement( + "label", + { htmlFor: "de51" }, + React.createElement("span", { className: "labelSpan" }), + "de R$ 51 at\xE9 R$ 150" + ) + ), + React.createElement( + "li", + null, + React.createElement("input", { type: "checkbox", name: "precos", value: "preco", id: "de151" }), + React.createElement( + "label", + { htmlFor: "de151" }, + React.createElement("span", { className: "labelSpan" }), + "de R$ 151 at\xE9 R$ 300" + ) + ), + React.createElement( + "li", + null, + React.createElement("input", { type: "checkbox", name: "precos", value: "preco", id: "de301" }), + React.createElement( + "label", + { htmlFor: "de301" }, + React.createElement("span", { className: "labelSpan" }), + "de R$ 301 at\xE9 R$ 500" + ) + ), + React.createElement( + "li", + null, + React.createElement("input", { type: "checkbox", name: "precos", value: "preco", id: "de501" }), + React.createElement( + "label", + { htmlFor: "de501" }, + React.createElement("span", { className: "labelSpan" }), + "a partir de R$ 501" + ) + ) + ) + ) + ) + ); + } +}); + +// *************** Componente pesponsável pelo conteudo com os cards da página ************ + +var ContentCards = React.createClass({ + displayName: "ContentCards", + + getInitialState: function () { + return { + images: [] + }; + }, + + componentDidMount: function () { + var _this = this; + this.serverRequest = _axios2.default.get("http://localhost:8000/data.json").then(function (result) { + _this.setState({ + images: result.data.images + }); + }).catch(error => {}); + }, + + componentWillUnmount: function () { + this.serverRequest.abort(); + }, + + render: function () { + return React.createElement( + "div", + { className: "content__Card" }, + React.createElement( + "ul", + null, + this.state.images.map(function (image) { + return React.createElement( + "li", + null, + React.createElement( + "a", + { href: "producao.html" }, + React.createElement( + "div", + null, + React.createElement("img", { src: "images/" + image.name + ".png", alt: image.name, className: "content__Card__img" }) + ), + React.createElement( + "div", + { className: "content__Card__block" }, + React.createElement( + "p", + { className: "content__Card__block__title" }, + image.messenger + ), + React.createElement( + "div", + { className: "content__Card__block__preco" }, + React.createElement( + "p", + { className: "content__Card__block__preco__total" }, + React.createElement( + "span", + { className: "content__Card__block__promo" }, + " ", + image.promo + ), + " R$ ", + image.preco + ), + React.createElement( + "p", + { className: "content__Card__block__preco__parcela" }, + "at\xE9 5x de R$", + image.preco / 5 + ) + ), + React.createElement("img", { src: "../../images/car.png", alt: "car", onClick: "setCar()" }) + ) + ) + ); + }) + ), + React.createElement( + "div", + { className: "content__Card__mais" }, + React.createElement( + "a", + { href: "producao.html" }, + "CARREGAR MAIS" + ) + ) + ); + } +}); + +ReactDOM.render(React.createElement(Page, null), document.getElementById('page')); + +/***/ }), +/* 27 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.byteLength = byteLength +exports.toByteArray = toByteArray +exports.fromByteArray = fromByteArray + +var lookup = [] +var revLookup = [] +var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array + +var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' +for (var i = 0, len = code.length; i < len; ++i) { + lookup[i] = code[i] + revLookup[code.charCodeAt(i)] = i +} + +revLookup['-'.charCodeAt(0)] = 62 +revLookup['_'.charCodeAt(0)] = 63 + +function placeHoldersCount (b64) { + var len = b64.length + if (len % 4 > 0) { + throw new Error('Invalid string. Length must be a multiple of 4') + } + + // the number of equal signs (place holders) + // if there are two placeholders, than the two characters before it + // represent one byte + // if there is only one, then the three characters before it represent 2 bytes + // this is just a cheap hack to not do indexOf twice + return b64[len - 2] === '=' ? 2 : b64[len - 1] === '=' ? 1 : 0 +} + +function byteLength (b64) { + // base64 is 4/3 + up to two characters of the original data + return b64.length * 3 / 4 - placeHoldersCount(b64) +} + +function toByteArray (b64) { + var i, j, l, tmp, placeHolders, arr + var len = b64.length + placeHolders = placeHoldersCount(b64) + + arr = new Arr(len * 3 / 4 - placeHolders) + + // if there are placeholders, only get up to the last complete 4 chars + l = placeHolders > 0 ? len - 4 : len + + var L = 0 + + for (i = 0, j = 0; i < l; i += 4, j += 3) { + tmp = (revLookup[b64.charCodeAt(i)] << 18) | (revLookup[b64.charCodeAt(i + 1)] << 12) | (revLookup[b64.charCodeAt(i + 2)] << 6) | revLookup[b64.charCodeAt(i + 3)] + arr[L++] = (tmp >> 16) & 0xFF + arr[L++] = (tmp >> 8) & 0xFF + arr[L++] = tmp & 0xFF + } + + if (placeHolders === 2) { + tmp = (revLookup[b64.charCodeAt(i)] << 2) | (revLookup[b64.charCodeAt(i + 1)] >> 4) + arr[L++] = tmp & 0xFF + } else if (placeHolders === 1) { + tmp = (revLookup[b64.charCodeAt(i)] << 10) | (revLookup[b64.charCodeAt(i + 1)] << 4) | (revLookup[b64.charCodeAt(i + 2)] >> 2) + arr[L++] = (tmp >> 8) & 0xFF + arr[L++] = tmp & 0xFF + } + + return arr +} + +function tripletToBase64 (num) { + return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F] +} + +function encodeChunk (uint8, start, end) { + var tmp + var output = [] + for (var i = start; i < end; i += 3) { + tmp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2]) + output.push(tripletToBase64(tmp)) + } + return output.join('') +} + +function fromByteArray (uint8) { + var tmp + var len = uint8.length + var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes + var output = '' + var parts = [] + var maxChunkLength = 16383 // must be multiple of 3 + + // go through the array every three bytes, we'll deal with trailing stuff later + for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) { + parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength))) + } + + // pad the end with zeros, but make sure to not forget the extra bytes + if (extraBytes === 1) { + tmp = uint8[len - 1] + output += lookup[tmp >> 2] + output += lookup[(tmp << 4) & 0x3F] + output += '==' + } else if (extraBytes === 2) { + tmp = (uint8[len - 2] << 8) + (uint8[len - 1]) + output += lookup[tmp >> 10] + output += lookup[(tmp >> 4) & 0x3F] + output += lookup[(tmp << 2) & 0x3F] + output += '=' + } + + parts.push(output) + + return parts.join('') +} + + +/***/ }), +/* 28 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(global) {/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */ +/* eslint-disable no-proto */ + + + +var base64 = __webpack_require__(27) +var ieee754 = __webpack_require__(29) +var isArray = __webpack_require__(30) + +exports.Buffer = Buffer +exports.SlowBuffer = SlowBuffer +exports.INSPECT_MAX_BYTES = 50 + +/** + * If `Buffer.TYPED_ARRAY_SUPPORT`: + * === true Use Uint8Array implementation (fastest) + * === false Use Object implementation (most compatible, even IE6) + * + * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+, + * Opera 11.6+, iOS 4.2+. + * + * Due to various browser bugs, sometimes the Object implementation will be used even + * when the browser supports typed arrays. + * + * Note: + * + * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances, + * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438. + * + * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function. + * + * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of + * incorrect length in some situations. + + * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they + * get the Object implementation, which is slower but behaves correctly. + */ +Buffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined + ? global.TYPED_ARRAY_SUPPORT + : typedArraySupport() + +/* + * Export kMaxLength after typed array support is determined. + */ +exports.kMaxLength = kMaxLength() + +function typedArraySupport () { + try { + var arr = new Uint8Array(1) + arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }} + return arr.foo() === 42 && // typed array instances can be augmented + typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray` + arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray` + } catch (e) { + return false + } +} + +function kMaxLength () { + return Buffer.TYPED_ARRAY_SUPPORT + ? 0x7fffffff + : 0x3fffffff +} + +function createBuffer (that, length) { + if (kMaxLength() < length) { + throw new RangeError('Invalid typed array length') + } + if (Buffer.TYPED_ARRAY_SUPPORT) { + // Return an augmented `Uint8Array` instance, for best performance + that = new Uint8Array(length) + that.__proto__ = Buffer.prototype + } else { + // Fallback: Return an object instance of the Buffer class + if (that === null) { + that = new Buffer(length) + } + that.length = length + } + + return that +} + +/** + * The Buffer constructor returns instances of `Uint8Array` that have their + * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of + * `Uint8Array`, so the returned instances will have all the node `Buffer` methods + * and the `Uint8Array` methods. Square bracket notation works as expected -- it + * returns a single octet. + * + * The `Uint8Array` prototype remains unmodified. + */ + +function Buffer (arg, encodingOrOffset, length) { + if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) { + return new Buffer(arg, encodingOrOffset, length) + } + + // Common case. + if (typeof arg === 'number') { + if (typeof encodingOrOffset === 'string') { + throw new Error( + 'If encoding is specified then the first argument must be a string' + ) + } + return allocUnsafe(this, arg) + } + return from(this, arg, encodingOrOffset, length) +} + +Buffer.poolSize = 8192 // not used by this implementation + +// TODO: Legacy, not needed anymore. Remove in next major version. +Buffer._augment = function (arr) { + arr.__proto__ = Buffer.prototype + return arr +} + +function from (that, value, encodingOrOffset, length) { + if (typeof value === 'number') { + throw new TypeError('"value" argument must not be a number') + } + + if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) { + return fromArrayBuffer(that, value, encodingOrOffset, length) + } + + if (typeof value === 'string') { + return fromString(that, value, encodingOrOffset) + } + + return fromObject(that, value) +} + +/** + * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError + * if value is a number. + * Buffer.from(str[, encoding]) + * Buffer.from(array) + * Buffer.from(buffer) + * Buffer.from(arrayBuffer[, byteOffset[, length]]) + **/ +Buffer.from = function (value, encodingOrOffset, length) { + return from(null, value, encodingOrOffset, length) +} + +if (Buffer.TYPED_ARRAY_SUPPORT) { + Buffer.prototype.__proto__ = Uint8Array.prototype + Buffer.__proto__ = Uint8Array + if (typeof Symbol !== 'undefined' && Symbol.species && + Buffer[Symbol.species] === Buffer) { + // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97 + Object.defineProperty(Buffer, Symbol.species, { + value: null, + configurable: true + }) + } +} + +function assertSize (size) { + if (typeof size !== 'number') { + throw new TypeError('"size" argument must be a number') + } else if (size < 0) { + throw new RangeError('"size" argument must not be negative') + } +} + +function alloc (that, size, fill, encoding) { + assertSize(size) + if (size <= 0) { + return createBuffer(that, size) + } + if (fill !== undefined) { + // Only pay attention to encoding if it's a string. This + // prevents accidentally sending in a number that would + // be interpretted as a start offset. + return typeof encoding === 'string' + ? createBuffer(that, size).fill(fill, encoding) + : createBuffer(that, size).fill(fill) + } + return createBuffer(that, size) +} + +/** + * Creates a new filled Buffer instance. + * alloc(size[, fill[, encoding]]) + **/ +Buffer.alloc = function (size, fill, encoding) { + return alloc(null, size, fill, encoding) +} + +function allocUnsafe (that, size) { + assertSize(size) + that = createBuffer(that, size < 0 ? 0 : checked(size) | 0) + if (!Buffer.TYPED_ARRAY_SUPPORT) { + for (var i = 0; i < size; ++i) { + that[i] = 0 + } + } + return that +} + +/** + * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance. + * */ +Buffer.allocUnsafe = function (size) { + return allocUnsafe(null, size) +} +/** + * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. + */ +Buffer.allocUnsafeSlow = function (size) { + return allocUnsafe(null, size) +} + +function fromString (that, string, encoding) { + if (typeof encoding !== 'string' || encoding === '') { + encoding = 'utf8' + } + + if (!Buffer.isEncoding(encoding)) { + throw new TypeError('"encoding" must be a valid string encoding') + } + + var length = byteLength(string, encoding) | 0 + that = createBuffer(that, length) + + var actual = that.write(string, encoding) + + if (actual !== length) { + // Writing a hex string, for example, that contains invalid characters will + // cause everything after the first invalid character to be ignored. (e.g. + // 'abxxcd' will be treated as 'ab') + that = that.slice(0, actual) + } + + return that +} + +function fromArrayLike (that, array) { + var length = array.length < 0 ? 0 : checked(array.length) | 0 + that = createBuffer(that, length) + for (var i = 0; i < length; i += 1) { + that[i] = array[i] & 255 + } + return that +} + +function fromArrayBuffer (that, array, byteOffset, length) { + array.byteLength // this throws if `array` is not a valid ArrayBuffer + + if (byteOffset < 0 || array.byteLength < byteOffset) { + throw new RangeError('\'offset\' is out of bounds') + } + + if (array.byteLength < byteOffset + (length || 0)) { + throw new RangeError('\'length\' is out of bounds') + } + + if (byteOffset === undefined && length === undefined) { + array = new Uint8Array(array) + } else if (length === undefined) { + array = new Uint8Array(array, byteOffset) + } else { + array = new Uint8Array(array, byteOffset, length) + } + + if (Buffer.TYPED_ARRAY_SUPPORT) { + // Return an augmented `Uint8Array` instance, for best performance + that = array + that.__proto__ = Buffer.prototype + } else { + // Fallback: Return an object instance of the Buffer class + that = fromArrayLike(that, array) + } + return that +} + +function fromObject (that, obj) { + if (Buffer.isBuffer(obj)) { + var len = checked(obj.length) | 0 + that = createBuffer(that, len) + + if (that.length === 0) { + return that + } + + obj.copy(that, 0, 0, len) + return that + } + + if (obj) { + if ((typeof ArrayBuffer !== 'undefined' && + obj.buffer instanceof ArrayBuffer) || 'length' in obj) { + if (typeof obj.length !== 'number' || isnan(obj.length)) { + return createBuffer(that, 0) + } + return fromArrayLike(that, obj) + } + + if (obj.type === 'Buffer' && isArray(obj.data)) { + return fromArrayLike(that, obj.data) + } + } + + throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.') +} + +function checked (length) { + // Note: cannot use `length < kMaxLength()` here because that fails when + // length is NaN (which is otherwise coerced to zero.) + if (length >= kMaxLength()) { + throw new RangeError('Attempt to allocate Buffer larger than maximum ' + + 'size: 0x' + kMaxLength().toString(16) + ' bytes') + } + return length | 0 +} + +function SlowBuffer (length) { + if (+length != length) { // eslint-disable-line eqeqeq + length = 0 + } + return Buffer.alloc(+length) +} + +Buffer.isBuffer = function isBuffer (b) { + return !!(b != null && b._isBuffer) +} + +Buffer.compare = function compare (a, b) { + if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) { + throw new TypeError('Arguments must be Buffers') + } + + if (a === b) return 0 + + var x = a.length + var y = b.length + + for (var i = 0, len = Math.min(x, y); i < len; ++i) { + if (a[i] !== b[i]) { + x = a[i] + y = b[i] + break + } + } + + if (x < y) return -1 + if (y < x) return 1 + return 0 +} + +Buffer.isEncoding = function isEncoding (encoding) { + switch (String(encoding).toLowerCase()) { + case 'hex': + case 'utf8': + case 'utf-8': + case 'ascii': + case 'latin1': + case 'binary': + case 'base64': + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return true + default: + return false + } +} + +Buffer.concat = function concat (list, length) { + if (!isArray(list)) { + throw new TypeError('"list" argument must be an Array of Buffers') + } + + if (list.length === 0) { + return Buffer.alloc(0) + } + + var i + if (length === undefined) { + length = 0 + for (i = 0; i < list.length; ++i) { + length += list[i].length + } + } + + var buffer = Buffer.allocUnsafe(length) + var pos = 0 + for (i = 0; i < list.length; ++i) { + var buf = list[i] + if (!Buffer.isBuffer(buf)) { + throw new TypeError('"list" argument must be an Array of Buffers') + } + buf.copy(buffer, pos) + pos += buf.length + } + return buffer +} + +function byteLength (string, encoding) { + if (Buffer.isBuffer(string)) { + return string.length + } + if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' && + (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) { + return string.byteLength + } + if (typeof string !== 'string') { + string = '' + string + } + + var len = string.length + if (len === 0) return 0 + + // Use a for loop to avoid recursion + var loweredCase = false + for (;;) { + switch (encoding) { + case 'ascii': + case 'latin1': + case 'binary': + return len + case 'utf8': + case 'utf-8': + case undefined: + return utf8ToBytes(string).length + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return len * 2 + case 'hex': + return len >>> 1 + case 'base64': + return base64ToBytes(string).length + default: + if (loweredCase) return utf8ToBytes(string).length // assume utf8 + encoding = ('' + encoding).toLowerCase() + loweredCase = true + } + } +} +Buffer.byteLength = byteLength + +function slowToString (encoding, start, end) { + var loweredCase = false + + // No need to verify that "this.length <= MAX_UINT32" since it's a read-only + // property of a typed array. + + // This behaves neither like String nor Uint8Array in that we set start/end + // to their upper/lower bounds if the value passed is out of range. + // undefined is handled specially as per ECMA-262 6th Edition, + // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization. + if (start === undefined || start < 0) { + start = 0 + } + // Return early if start > this.length. Done here to prevent potential uint32 + // coercion fail below. + if (start > this.length) { + return '' + } + + if (end === undefined || end > this.length) { + end = this.length + } + + if (end <= 0) { + return '' + } + + // Force coersion to uint32. This will also coerce falsey/NaN values to 0. + end >>>= 0 + start >>>= 0 + + if (end <= start) { + return '' + } + + if (!encoding) encoding = 'utf8' + + while (true) { + switch (encoding) { + case 'hex': + return hexSlice(this, start, end) + + case 'utf8': + case 'utf-8': + return utf8Slice(this, start, end) + + case 'ascii': + return asciiSlice(this, start, end) + + case 'latin1': + case 'binary': + return latin1Slice(this, start, end) + + case 'base64': + return base64Slice(this, start, end) + + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return utf16leSlice(this, start, end) + + default: + if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) + encoding = (encoding + '').toLowerCase() + loweredCase = true + } + } +} + +// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect +// Buffer instances. +Buffer.prototype._isBuffer = true + +function swap (b, n, m) { + var i = b[n] + b[n] = b[m] + b[m] = i +} + +Buffer.prototype.swap16 = function swap16 () { + var len = this.length + if (len % 2 !== 0) { + throw new RangeError('Buffer size must be a multiple of 16-bits') + } + for (var i = 0; i < len; i += 2) { + swap(this, i, i + 1) + } + return this +} + +Buffer.prototype.swap32 = function swap32 () { + var len = this.length + if (len % 4 !== 0) { + throw new RangeError('Buffer size must be a multiple of 32-bits') + } + for (var i = 0; i < len; i += 4) { + swap(this, i, i + 3) + swap(this, i + 1, i + 2) + } + return this +} + +Buffer.prototype.swap64 = function swap64 () { + var len = this.length + if (len % 8 !== 0) { + throw new RangeError('Buffer size must be a multiple of 64-bits') + } + for (var i = 0; i < len; i += 8) { + swap(this, i, i + 7) + swap(this, i + 1, i + 6) + swap(this, i + 2, i + 5) + swap(this, i + 3, i + 4) + } + return this +} + +Buffer.prototype.toString = function toString () { + var length = this.length | 0 + if (length === 0) return '' + if (arguments.length === 0) return utf8Slice(this, 0, length) + return slowToString.apply(this, arguments) +} + +Buffer.prototype.equals = function equals (b) { + if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer') + if (this === b) return true + return Buffer.compare(this, b) === 0 +} + +Buffer.prototype.inspect = function inspect () { + var str = '' + var max = exports.INSPECT_MAX_BYTES + if (this.length > 0) { + str = this.toString('hex', 0, max).match(/.{2}/g).join(' ') + if (this.length > max) str += ' ... ' + } + return '' +} + +Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) { + if (!Buffer.isBuffer(target)) { + throw new TypeError('Argument must be a Buffer') + } + + if (start === undefined) { + start = 0 + } + if (end === undefined) { + end = target ? target.length : 0 + } + if (thisStart === undefined) { + thisStart = 0 + } + if (thisEnd === undefined) { + thisEnd = this.length + } + + if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) { + throw new RangeError('out of range index') + } + + if (thisStart >= thisEnd && start >= end) { + return 0 + } + if (thisStart >= thisEnd) { + return -1 + } + if (start >= end) { + return 1 + } + + start >>>= 0 + end >>>= 0 + thisStart >>>= 0 + thisEnd >>>= 0 + + if (this === target) return 0 + + var x = thisEnd - thisStart + var y = end - start + var len = Math.min(x, y) + + var thisCopy = this.slice(thisStart, thisEnd) + var targetCopy = target.slice(start, end) + + for (var i = 0; i < len; ++i) { + if (thisCopy[i] !== targetCopy[i]) { + x = thisCopy[i] + y = targetCopy[i] + break + } + } + + if (x < y) return -1 + if (y < x) return 1 + return 0 +} + +// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`, +// OR the last index of `val` in `buffer` at offset <= `byteOffset`. +// +// Arguments: +// - buffer - a Buffer to search +// - val - a string, Buffer, or number +// - byteOffset - an index into `buffer`; will be clamped to an int32 +// - encoding - an optional encoding, relevant is val is a string +// - dir - true for indexOf, false for lastIndexOf +function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) { + // Empty buffer means no match + if (buffer.length === 0) return -1 + + // Normalize byteOffset + if (typeof byteOffset === 'string') { + encoding = byteOffset + byteOffset = 0 + } else if (byteOffset > 0x7fffffff) { + byteOffset = 0x7fffffff + } else if (byteOffset < -0x80000000) { + byteOffset = -0x80000000 + } + byteOffset = +byteOffset // Coerce to Number. + if (isNaN(byteOffset)) { + // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer + byteOffset = dir ? 0 : (buffer.length - 1) + } + + // Normalize byteOffset: negative offsets start from the end of the buffer + if (byteOffset < 0) byteOffset = buffer.length + byteOffset + if (byteOffset >= buffer.length) { + if (dir) return -1 + else byteOffset = buffer.length - 1 + } else if (byteOffset < 0) { + if (dir) byteOffset = 0 + else return -1 + } + + // Normalize val + if (typeof val === 'string') { + val = Buffer.from(val, encoding) + } + + // Finally, search either indexOf (if dir is true) or lastIndexOf + if (Buffer.isBuffer(val)) { + // Special case: looking for empty string/buffer always fails + if (val.length === 0) { + return -1 + } + return arrayIndexOf(buffer, val, byteOffset, encoding, dir) + } else if (typeof val === 'number') { + val = val & 0xFF // Search for a byte value [0-255] + if (Buffer.TYPED_ARRAY_SUPPORT && + typeof Uint8Array.prototype.indexOf === 'function') { + if (dir) { + return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset) + } else { + return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset) + } + } + return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir) + } + + throw new TypeError('val must be string, number or Buffer') +} + +function arrayIndexOf (arr, val, byteOffset, encoding, dir) { + var indexSize = 1 + var arrLength = arr.length + var valLength = val.length + + if (encoding !== undefined) { + encoding = String(encoding).toLowerCase() + if (encoding === 'ucs2' || encoding === 'ucs-2' || + encoding === 'utf16le' || encoding === 'utf-16le') { + if (arr.length < 2 || val.length < 2) { + return -1 + } + indexSize = 2 + arrLength /= 2 + valLength /= 2 + byteOffset /= 2 + } + } + + function read (buf, i) { + if (indexSize === 1) { + return buf[i] + } else { + return buf.readUInt16BE(i * indexSize) + } + } + + var i + if (dir) { + var foundIndex = -1 + for (i = byteOffset; i < arrLength; i++) { + if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) { + if (foundIndex === -1) foundIndex = i + if (i - foundIndex + 1 === valLength) return foundIndex * indexSize + } else { + if (foundIndex !== -1) i -= i - foundIndex + foundIndex = -1 + } + } + } else { + if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength + for (i = byteOffset; i >= 0; i--) { + var found = true + for (var j = 0; j < valLength; j++) { + if (read(arr, i + j) !== read(val, j)) { + found = false + break + } + } + if (found) return i + } + } + + return -1 +} + +Buffer.prototype.includes = function includes (val, byteOffset, encoding) { + return this.indexOf(val, byteOffset, encoding) !== -1 +} + +Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) { + return bidirectionalIndexOf(this, val, byteOffset, encoding, true) +} + +Buffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) { + return bidirectionalIndexOf(this, val, byteOffset, encoding, false) +} + +function hexWrite (buf, string, offset, length) { + offset = Number(offset) || 0 + var remaining = buf.length - offset + if (!length) { + length = remaining + } else { + length = Number(length) + if (length > remaining) { + length = remaining + } + } + + // must be an even number of digits + var strLen = string.length + if (strLen % 2 !== 0) throw new TypeError('Invalid hex string') + + if (length > strLen / 2) { + length = strLen / 2 + } + for (var i = 0; i < length; ++i) { + var parsed = parseInt(string.substr(i * 2, 2), 16) + if (isNaN(parsed)) return i + buf[offset + i] = parsed + } + return i +} + +function utf8Write (buf, string, offset, length) { + return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length) +} + +function asciiWrite (buf, string, offset, length) { + return blitBuffer(asciiToBytes(string), buf, offset, length) +} + +function latin1Write (buf, string, offset, length) { + return asciiWrite(buf, string, offset, length) +} + +function base64Write (buf, string, offset, length) { + return blitBuffer(base64ToBytes(string), buf, offset, length) +} + +function ucs2Write (buf, string, offset, length) { + return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length) +} + +Buffer.prototype.write = function write (string, offset, length, encoding) { + // Buffer#write(string) + if (offset === undefined) { + encoding = 'utf8' + length = this.length + offset = 0 + // Buffer#write(string, encoding) + } else if (length === undefined && typeof offset === 'string') { + encoding = offset + length = this.length + offset = 0 + // Buffer#write(string, offset[, length][, encoding]) + } else if (isFinite(offset)) { + offset = offset | 0 + if (isFinite(length)) { + length = length | 0 + if (encoding === undefined) encoding = 'utf8' + } else { + encoding = length + length = undefined + } + // legacy write(string, encoding, offset, length) - remove in v0.13 + } else { + throw new Error( + 'Buffer.write(string, encoding, offset[, length]) is no longer supported' + ) + } + + var remaining = this.length - offset + if (length === undefined || length > remaining) length = remaining + + if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) { + throw new RangeError('Attempt to write outside buffer bounds') + } + + if (!encoding) encoding = 'utf8' + + var loweredCase = false + for (;;) { + switch (encoding) { + case 'hex': + return hexWrite(this, string, offset, length) + + case 'utf8': + case 'utf-8': + return utf8Write(this, string, offset, length) + + case 'ascii': + return asciiWrite(this, string, offset, length) + + case 'latin1': + case 'binary': + return latin1Write(this, string, offset, length) + + case 'base64': + // Warning: maxLength not taken into account in base64Write + return base64Write(this, string, offset, length) + + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return ucs2Write(this, string, offset, length) + + default: + if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) + encoding = ('' + encoding).toLowerCase() + loweredCase = true + } + } +} + +Buffer.prototype.toJSON = function toJSON () { + return { + type: 'Buffer', + data: Array.prototype.slice.call(this._arr || this, 0) + } +} + +function base64Slice (buf, start, end) { + if (start === 0 && end === buf.length) { + return base64.fromByteArray(buf) + } else { + return base64.fromByteArray(buf.slice(start, end)) + } +} + +function utf8Slice (buf, start, end) { + end = Math.min(buf.length, end) + var res = [] + + var i = start + while (i < end) { + var firstByte = buf[i] + var codePoint = null + var bytesPerSequence = (firstByte > 0xEF) ? 4 + : (firstByte > 0xDF) ? 3 + : (firstByte > 0xBF) ? 2 + : 1 + + if (i + bytesPerSequence <= end) { + var secondByte, thirdByte, fourthByte, tempCodePoint + + switch (bytesPerSequence) { + case 1: + if (firstByte < 0x80) { + codePoint = firstByte + } + break + case 2: + secondByte = buf[i + 1] + if ((secondByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F) + if (tempCodePoint > 0x7F) { + codePoint = tempCodePoint + } + } + break + case 3: + secondByte = buf[i + 1] + thirdByte = buf[i + 2] + if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F) + if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) { + codePoint = tempCodePoint + } + } + break + case 4: + secondByte = buf[i + 1] + thirdByte = buf[i + 2] + fourthByte = buf[i + 3] + if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F) + if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) { + codePoint = tempCodePoint + } + } + } + } + + if (codePoint === null) { + // we did not generate a valid codePoint so insert a + // replacement char (U+FFFD) and advance only 1 byte + codePoint = 0xFFFD + bytesPerSequence = 1 + } else if (codePoint > 0xFFFF) { + // encode to utf16 (surrogate pair dance) + codePoint -= 0x10000 + res.push(codePoint >>> 10 & 0x3FF | 0xD800) + codePoint = 0xDC00 | codePoint & 0x3FF + } + + res.push(codePoint) + i += bytesPerSequence + } + + return decodeCodePointsArray(res) +} + +// Based on http://stackoverflow.com/a/22747272/680742, the browser with +// the lowest limit is Chrome, with 0x10000 args. +// We go 1 magnitude less, for safety +var MAX_ARGUMENTS_LENGTH = 0x1000 + +function decodeCodePointsArray (codePoints) { + var len = codePoints.length + if (len <= MAX_ARGUMENTS_LENGTH) { + return String.fromCharCode.apply(String, codePoints) // avoid extra slice() + } + + // Decode in chunks to avoid "call stack size exceeded". + var res = '' + var i = 0 + while (i < len) { + res += String.fromCharCode.apply( + String, + codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH) + ) + } + return res +} + +function asciiSlice (buf, start, end) { + var ret = '' + end = Math.min(buf.length, end) + + for (var i = start; i < end; ++i) { + ret += String.fromCharCode(buf[i] & 0x7F) + } + return ret +} + +function latin1Slice (buf, start, end) { + var ret = '' + end = Math.min(buf.length, end) + + for (var i = start; i < end; ++i) { + ret += String.fromCharCode(buf[i]) + } + return ret +} + +function hexSlice (buf, start, end) { + var len = buf.length + + if (!start || start < 0) start = 0 + if (!end || end < 0 || end > len) end = len + + var out = '' + for (var i = start; i < end; ++i) { + out += toHex(buf[i]) + } + return out +} + +function utf16leSlice (buf, start, end) { + var bytes = buf.slice(start, end) + var res = '' + for (var i = 0; i < bytes.length; i += 2) { + res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256) + } + return res +} + +Buffer.prototype.slice = function slice (start, end) { + var len = this.length + start = ~~start + end = end === undefined ? len : ~~end + + if (start < 0) { + start += len + if (start < 0) start = 0 + } else if (start > len) { + start = len + } + + if (end < 0) { + end += len + if (end < 0) end = 0 + } else if (end > len) { + end = len + } + + if (end < start) end = start + + var newBuf + if (Buffer.TYPED_ARRAY_SUPPORT) { + newBuf = this.subarray(start, end) + newBuf.__proto__ = Buffer.prototype + } else { + var sliceLen = end - start + newBuf = new Buffer(sliceLen, undefined) + for (var i = 0; i < sliceLen; ++i) { + newBuf[i] = this[i + start] + } + } + + return newBuf +} + +/* + * Need to make sure that buffer isn't trying to write out of bounds. + */ +function checkOffset (offset, ext, length) { + if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint') + if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length') +} + +Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) { + offset = offset | 0 + byteLength = byteLength | 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) + + var val = this[offset] + var mul = 1 + var i = 0 + while (++i < byteLength && (mul *= 0x100)) { + val += this[offset + i] * mul + } + + return val +} + +Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) { + offset = offset | 0 + byteLength = byteLength | 0 + if (!noAssert) { + checkOffset(offset, byteLength, this.length) + } + + var val = this[offset + --byteLength] + var mul = 1 + while (byteLength > 0 && (mul *= 0x100)) { + val += this[offset + --byteLength] * mul + } + + return val +} + +Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) { + if (!noAssert) checkOffset(offset, 1, this.length) + return this[offset] +} + +Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length) + return this[offset] | (this[offset + 1] << 8) +} + +Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length) + return (this[offset] << 8) | this[offset + 1] +} + +Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) + + return ((this[offset]) | + (this[offset + 1] << 8) | + (this[offset + 2] << 16)) + + (this[offset + 3] * 0x1000000) +} + +Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) + + return (this[offset] * 0x1000000) + + ((this[offset + 1] << 16) | + (this[offset + 2] << 8) | + this[offset + 3]) +} + +Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) { + offset = offset | 0 + byteLength = byteLength | 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) + + var val = this[offset] + var mul = 1 + var i = 0 + while (++i < byteLength && (mul *= 0x100)) { + val += this[offset + i] * mul + } + mul *= 0x80 + + if (val >= mul) val -= Math.pow(2, 8 * byteLength) + + return val +} + +Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) { + offset = offset | 0 + byteLength = byteLength | 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) + + var i = byteLength + var mul = 1 + var val = this[offset + --i] + while (i > 0 && (mul *= 0x100)) { + val += this[offset + --i] * mul + } + mul *= 0x80 + + if (val >= mul) val -= Math.pow(2, 8 * byteLength) + + return val +} + +Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) { + if (!noAssert) checkOffset(offset, 1, this.length) + if (!(this[offset] & 0x80)) return (this[offset]) + return ((0xff - this[offset] + 1) * -1) +} + +Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length) + var val = this[offset] | (this[offset + 1] << 8) + return (val & 0x8000) ? val | 0xFFFF0000 : val +} + +Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length) + var val = this[offset + 1] | (this[offset] << 8) + return (val & 0x8000) ? val | 0xFFFF0000 : val +} + +Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) + + return (this[offset]) | + (this[offset + 1] << 8) | + (this[offset + 2] << 16) | + (this[offset + 3] << 24) +} + +Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) + + return (this[offset] << 24) | + (this[offset + 1] << 16) | + (this[offset + 2] << 8) | + (this[offset + 3]) +} + +Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) + return ieee754.read(this, offset, true, 23, 4) +} + +Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) + return ieee754.read(this, offset, false, 23, 4) +} + +Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 8, this.length) + return ieee754.read(this, offset, true, 52, 8) +} + +Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 8, this.length) + return ieee754.read(this, offset, false, 52, 8) +} + +function checkInt (buf, value, offset, ext, max, min) { + if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance') + if (value > max || value < min) throw new RangeError('"value" argument is out of bounds') + if (offset + ext > buf.length) throw new RangeError('Index out of range') +} + +Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) { + value = +value + offset = offset | 0 + byteLength = byteLength | 0 + if (!noAssert) { + var maxBytes = Math.pow(2, 8 * byteLength) - 1 + checkInt(this, value, offset, byteLength, maxBytes, 0) + } + + var mul = 1 + var i = 0 + this[offset] = value & 0xFF + while (++i < byteLength && (mul *= 0x100)) { + this[offset + i] = (value / mul) & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) { + value = +value + offset = offset | 0 + byteLength = byteLength | 0 + if (!noAssert) { + var maxBytes = Math.pow(2, 8 * byteLength) - 1 + checkInt(this, value, offset, byteLength, maxBytes, 0) + } + + var i = byteLength - 1 + var mul = 1 + this[offset + i] = value & 0xFF + while (--i >= 0 && (mul *= 0x100)) { + this[offset + i] = (value / mul) & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0) + if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value) + this[offset] = (value & 0xff) + return offset + 1 +} + +function objectWriteUInt16 (buf, value, offset, littleEndian) { + if (value < 0) value = 0xffff + value + 1 + for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) { + buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>> + (littleEndian ? i : 1 - i) * 8 + } +} + +Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value & 0xff) + this[offset + 1] = (value >>> 8) + } else { + objectWriteUInt16(this, value, offset, true) + } + return offset + 2 +} + +Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value >>> 8) + this[offset + 1] = (value & 0xff) + } else { + objectWriteUInt16(this, value, offset, false) + } + return offset + 2 +} + +function objectWriteUInt32 (buf, value, offset, littleEndian) { + if (value < 0) value = 0xffffffff + value + 1 + for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) { + buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff + } +} + +Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset + 3] = (value >>> 24) + this[offset + 2] = (value >>> 16) + this[offset + 1] = (value >>> 8) + this[offset] = (value & 0xff) + } else { + objectWriteUInt32(this, value, offset, true) + } + return offset + 4 +} + +Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value >>> 24) + this[offset + 1] = (value >>> 16) + this[offset + 2] = (value >>> 8) + this[offset + 3] = (value & 0xff) + } else { + objectWriteUInt32(this, value, offset, false) + } + return offset + 4 +} + +Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) { + var limit = Math.pow(2, 8 * byteLength - 1) + + checkInt(this, value, offset, byteLength, limit - 1, -limit) + } + + var i = 0 + var mul = 1 + var sub = 0 + this[offset] = value & 0xFF + while (++i < byteLength && (mul *= 0x100)) { + if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) { + sub = 1 + } + this[offset + i] = ((value / mul) >> 0) - sub & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) { + var limit = Math.pow(2, 8 * byteLength - 1) + + checkInt(this, value, offset, byteLength, limit - 1, -limit) + } + + var i = byteLength - 1 + var mul = 1 + var sub = 0 + this[offset + i] = value & 0xFF + while (--i >= 0 && (mul *= 0x100)) { + if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) { + sub = 1 + } + this[offset + i] = ((value / mul) >> 0) - sub & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80) + if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value) + if (value < 0) value = 0xff + value + 1 + this[offset] = (value & 0xff) + return offset + 1 +} + +Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value & 0xff) + this[offset + 1] = (value >>> 8) + } else { + objectWriteUInt16(this, value, offset, true) + } + return offset + 2 +} + +Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value >>> 8) + this[offset + 1] = (value & 0xff) + } else { + objectWriteUInt16(this, value, offset, false) + } + return offset + 2 +} + +Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value & 0xff) + this[offset + 1] = (value >>> 8) + this[offset + 2] = (value >>> 16) + this[offset + 3] = (value >>> 24) + } else { + objectWriteUInt32(this, value, offset, true) + } + return offset + 4 +} + +Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) + if (value < 0) value = 0xffffffff + value + 1 + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value >>> 24) + this[offset + 1] = (value >>> 16) + this[offset + 2] = (value >>> 8) + this[offset + 3] = (value & 0xff) + } else { + objectWriteUInt32(this, value, offset, false) + } + return offset + 4 +} + +function checkIEEE754 (buf, value, offset, ext, max, min) { + if (offset + ext > buf.length) throw new RangeError('Index out of range') + if (offset < 0) throw new RangeError('Index out of range') +} + +function writeFloat (buf, value, offset, littleEndian, noAssert) { + if (!noAssert) { + checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38) + } + ieee754.write(buf, value, offset, littleEndian, 23, 4) + return offset + 4 +} + +Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) { + return writeFloat(this, value, offset, true, noAssert) +} + +Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) { + return writeFloat(this, value, offset, false, noAssert) +} + +function writeDouble (buf, value, offset, littleEndian, noAssert) { + if (!noAssert) { + checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308) + } + ieee754.write(buf, value, offset, littleEndian, 52, 8) + return offset + 8 +} + +Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) { + return writeDouble(this, value, offset, true, noAssert) +} + +Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) { + return writeDouble(this, value, offset, false, noAssert) +} + +// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length) +Buffer.prototype.copy = function copy (target, targetStart, start, end) { + if (!start) start = 0 + if (!end && end !== 0) end = this.length + if (targetStart >= target.length) targetStart = target.length + if (!targetStart) targetStart = 0 + if (end > 0 && end < start) end = start + + // Copy 0 bytes; we're done + if (end === start) return 0 + if (target.length === 0 || this.length === 0) return 0 + + // Fatal error conditions + if (targetStart < 0) { + throw new RangeError('targetStart out of bounds') + } + if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds') + if (end < 0) throw new RangeError('sourceEnd out of bounds') + + // Are we oob? + if (end > this.length) end = this.length + if (target.length - targetStart < end - start) { + end = target.length - targetStart + start + } + + var len = end - start + var i + + if (this === target && start < targetStart && targetStart < end) { + // descending copy from end + for (i = len - 1; i >= 0; --i) { + target[i + targetStart] = this[i + start] + } + } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) { + // ascending copy from start + for (i = 0; i < len; ++i) { + target[i + targetStart] = this[i + start] + } + } else { + Uint8Array.prototype.set.call( + target, + this.subarray(start, start + len), + targetStart + ) + } + + return len +} + +// Usage: +// buffer.fill(number[, offset[, end]]) +// buffer.fill(buffer[, offset[, end]]) +// buffer.fill(string[, offset[, end]][, encoding]) +Buffer.prototype.fill = function fill (val, start, end, encoding) { + // Handle string cases: + if (typeof val === 'string') { + if (typeof start === 'string') { + encoding = start + start = 0 + end = this.length + } else if (typeof end === 'string') { + encoding = end + end = this.length + } + if (val.length === 1) { + var code = val.charCodeAt(0) + if (code < 256) { + val = code + } + } + if (encoding !== undefined && typeof encoding !== 'string') { + throw new TypeError('encoding must be a string') + } + if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) { + throw new TypeError('Unknown encoding: ' + encoding) + } + } else if (typeof val === 'number') { + val = val & 255 + } + + // Invalid ranges are not set to a default, so can range check early. + if (start < 0 || this.length < start || this.length < end) { + throw new RangeError('Out of range index') + } + + if (end <= start) { + return this + } + + start = start >>> 0 + end = end === undefined ? this.length : end >>> 0 + + if (!val) val = 0 + + var i + if (typeof val === 'number') { + for (i = start; i < end; ++i) { + this[i] = val + } + } else { + var bytes = Buffer.isBuffer(val) + ? val + : utf8ToBytes(new Buffer(val, encoding).toString()) + var len = bytes.length + for (i = 0; i < end - start; ++i) { + this[i + start] = bytes[i % len] + } + } + + return this +} + +// HELPER FUNCTIONS +// ================ + +var INVALID_BASE64_RE = /[^+\/0-9A-Za-z-_]/g + +function base64clean (str) { + // Node strips out invalid characters like \n and \t from the string, base64-js does not + str = stringtrim(str).replace(INVALID_BASE64_RE, '') + // Node converts strings with length < 2 to '' + if (str.length < 2) return '' + // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not + while (str.length % 4 !== 0) { + str = str + '=' + } + return str +} + +function stringtrim (str) { + if (str.trim) return str.trim() + return str.replace(/^\s+|\s+$/g, '') +} + +function toHex (n) { + if (n < 16) return '0' + n.toString(16) + return n.toString(16) +} + +function utf8ToBytes (string, units) { + units = units || Infinity + var codePoint + var length = string.length + var leadSurrogate = null + var bytes = [] + + for (var i = 0; i < length; ++i) { + codePoint = string.charCodeAt(i) + + // is surrogate component + if (codePoint > 0xD7FF && codePoint < 0xE000) { + // last char was a lead + if (!leadSurrogate) { + // no lead yet + if (codePoint > 0xDBFF) { + // unexpected trail + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + continue + } else if (i + 1 === length) { + // unpaired lead + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + continue + } + + // valid lead + leadSurrogate = codePoint + + continue + } + + // 2 leads in a row + if (codePoint < 0xDC00) { + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + leadSurrogate = codePoint + continue + } + + // valid surrogate pair + codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000 + } else if (leadSurrogate) { + // valid bmp char, but last char was a lead + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + } + + leadSurrogate = null + + // encode utf8 + if (codePoint < 0x80) { + if ((units -= 1) < 0) break + bytes.push(codePoint) + } else if (codePoint < 0x800) { + if ((units -= 2) < 0) break + bytes.push( + codePoint >> 0x6 | 0xC0, + codePoint & 0x3F | 0x80 + ) + } else if (codePoint < 0x10000) { + if ((units -= 3) < 0) break + bytes.push( + codePoint >> 0xC | 0xE0, + codePoint >> 0x6 & 0x3F | 0x80, + codePoint & 0x3F | 0x80 + ) + } else if (codePoint < 0x110000) { + if ((units -= 4) < 0) break + bytes.push( + codePoint >> 0x12 | 0xF0, + codePoint >> 0xC & 0x3F | 0x80, + codePoint >> 0x6 & 0x3F | 0x80, + codePoint & 0x3F | 0x80 + ) + } else { + throw new Error('Invalid code point') + } + } + + return bytes +} + +function asciiToBytes (str) { + var byteArray = [] + for (var i = 0; i < str.length; ++i) { + // Node's code seems to be doing this and not & 0x7F.. + byteArray.push(str.charCodeAt(i) & 0xFF) + } + return byteArray +} + +function utf16leToBytes (str, units) { + var c, hi, lo + var byteArray = [] + for (var i = 0; i < str.length; ++i) { + if ((units -= 2) < 0) break + + c = str.charCodeAt(i) + hi = c >> 8 + lo = c % 256 + byteArray.push(lo) + byteArray.push(hi) + } + + return byteArray +} + +function base64ToBytes (str) { + return base64.toByteArray(base64clean(str)) +} + +function blitBuffer (src, dst, offset, length) { + for (var i = 0; i < length; ++i) { + if ((i + offset >= dst.length) || (i >= src.length)) break + dst[i + offset] = src[i] + } + return i +} + +function isnan (val) { + return val !== val // eslint-disable-line no-self-compare +} + +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(31))) + +/***/ }), +/* 29 */ +/***/ (function(module, exports) { + +exports.read = function (buffer, offset, isLE, mLen, nBytes) { + var e, m + var eLen = nBytes * 8 - mLen - 1 + var eMax = (1 << eLen) - 1 + var eBias = eMax >> 1 + var nBits = -7 + var i = isLE ? (nBytes - 1) : 0 + var d = isLE ? -1 : 1 + var s = buffer[offset + i] + + i += d + + e = s & ((1 << (-nBits)) - 1) + s >>= (-nBits) + nBits += eLen + for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {} + + m = e & ((1 << (-nBits)) - 1) + e >>= (-nBits) + nBits += mLen + for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {} + + if (e === 0) { + e = 1 - eBias + } else if (e === eMax) { + return m ? NaN : ((s ? -1 : 1) * Infinity) + } else { + m = m + Math.pow(2, mLen) + e = e - eBias + } + return (s ? -1 : 1) * m * Math.pow(2, e - mLen) +} + +exports.write = function (buffer, value, offset, isLE, mLen, nBytes) { + var e, m, c + var eLen = nBytes * 8 - mLen - 1 + var eMax = (1 << eLen) - 1 + var eBias = eMax >> 1 + var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0) + var i = isLE ? 0 : (nBytes - 1) + var d = isLE ? 1 : -1 + var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0 + + value = Math.abs(value) + + if (isNaN(value) || value === Infinity) { + m = isNaN(value) ? 1 : 0 + e = eMax + } else { + e = Math.floor(Math.log(value) / Math.LN2) + if (value * (c = Math.pow(2, -e)) < 1) { + e-- + c *= 2 + } + if (e + eBias >= 1) { + value += rt / c + } else { + value += rt * Math.pow(2, 1 - eBias) + } + if (value * c >= 2) { + e++ + c /= 2 + } + + if (e + eBias >= eMax) { + m = 0 + e = eMax + } else if (e + eBias >= 1) { + m = (value * c - 1) * Math.pow(2, mLen) + e = e + eBias + } else { + m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen) + e = 0 + } + } + + for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {} + + e = (e << mLen) | m + eLen += mLen + for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {} + + buffer[offset + i - d] |= s * 128 +} + + +/***/ }), +/* 30 */ +/***/ (function(module, exports) { + +var toString = {}.toString; + +module.exports = Array.isArray || function (arr) { + return toString.call(arr) == '[object Array]'; +}; + + +/***/ }), +/* 31 */ +/***/ (function(module, exports) { + +var g; + +// This works in non-strict mode +g = (function() { + return this; +})(); + +try { + // This works if eval is allowed (see CSP) + g = g || Function("return this")() || (1,eval)("this"); +} catch(e) { + // This works if the window reference is available + if(typeof window === "object") + g = window; +} + +// g can still be undefined, but nothing to do about it... +// We return undefined, instead of nothing here, so it's +// easier to handle this case. if(!global) { ...} + +module.exports = g; + + +/***/ }) +/******/ ]); \ No newline at end of file diff --git a/Projeto/src/js/app.js b/Projeto/src/js/app.js new file mode 100644 index 00000000..9be1a05d --- /dev/null +++ b/Projeto/src/js/app.js @@ -0,0 +1,441 @@ +import axios from 'axios' + +// *************** Componente pesponsável pelo esqueleto da página ************ + +var Page = React.createClass({ + + render:function(){ + return ( + +
+ +
+ + +
+ + ); + } +}); + +// *************** Componente pesponsável pelo header ************ + +var Header = React.createClass({ + render: function() { + return ( +
+
+ +
+ +

3

+
+
+
+ ); + } +}) + +// *************** Componente pesponsável pelo header ************ + +var SubHeader = React.createClass({ + getInitialState: function(){ + return { + click: true + }; + }, + dropBlock: function(){ + this.setState({ + click: !this.state.click + }); + }, + + render: function() { + var dropMenus = this.state.click ? 'dropmenuBlock' : 'dropmenuNone'; + var dropClass = this.state.click ? 'dropdownNone' : 'dropdownBlock'; + return ( +
+
+
+

VESTIDOS

+
+
+
+ +
+
+
+
+ + +
+
+ + + + + +
+
+
+
+ ); + } +}); + +// *************** Componente pesponsável pelo filtro de cor do menu da versão mobile ************ + +var MenuCor = React.createClass({ + getInitialState: function(){ + return { + click: true + }; + }, + dropMenuCor: function(){ + this.setState({ + click: !this.state.click + }); + }, + + render: function() { + var dropMenuCor = this.state.click ? 'dropmenuBlock' : 'dropmenuNone'; + return ( +
+

CORES -

+
+
+

CORES

+
+
+
    +
  • + + +
  • +
  • + + +
  • +
  • + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
+
+
+
+
+
+ ); + } +}); + +// *************** Componente pesponsável pelo filtro de tamanho do menu da versão mobile ************ + +var MenuTamanho = React.createClass({ + getInitialState: function(){ + return { + click: true + }; + }, + dropMenuTam: function(){ + this.setState({ + click: !this.state.click + }); + }, + + render: function() { + var dropMenuTam = this.state.click ? 'dropmenuBlock' : 'dropmenuNone'; + return ( +
+

TAMANHO -

+
+ +
+
+ ); + } +}); + +// *************** Componente pesponsável pelo filtro de preço do menu da versão mobile ************ + +var MenuPreco = React.createClass({ + getInitialState: function(){ + return { + click: true + }; + }, + dropMenuPreco: function(){ + this.setState({ + click: !this.state.click + }); + }, + + render: function() { + var dropMenuPreco = this.state.click ? 'dropmenuBlock' : 'dropmenuNone'; + return ( +
+

PRECOS -

+
+
+

FAIXA DE PREÇO

+
+
+
    +
  • + + +
  • + + +
  • + + +
  • + + +
  • + + +
  • +
+
+
+
+
+
+ ); + } +}); + +// *************** Componente pesponsável pelo esquelo do menu esquerdo da página (filtro) versão desktop ************ + +var ContentFiltro = React.createClass({ + render: function() { + return ( +
+ + + +
+ ); + } +}) + +// *************** Componente pesponsável pelo conteudo lateral esquerdo da página (Cores) versão desktop ************ + +var ContentCores = React.createClass({ + + getInitialState: function(){ + return { + click: true, + }; + }, + + dropBlock: function(){ + this.setState({ + click: !this.state.click + }); + }, + + render: function() { + var dropClass = this.state.click ? 'dropdownNone' : 'dropdownBlock'; + var arrowClass = this.state.click ? 'arrow' : 'arrow_down'; + return ( +
+

CORES

+
+
+
    +
  • + + +
  • +
  • + + +
  • +
  • + +
  • +
  • + + +
  • +
  • + + +
  • +
+
+
    +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
+
+

Ver todas as cores

+
+
+
+ ); + } +}) + +// *************** Componente pesponsável pelo conteudo lateral esquerdo da página (Tamanhos) versão desktop *********** + +var ContentTamanhos = React.createClass({ + render: function() { + return ( +
+

TAMANHOS

+
+ P + M + G + GG + U + 36 + 38 + 40 + 42 + 44 + 46 +
+
+ ); + } +}) + +// *************** Componente pesponsável pelo conteudo lateral esquerdo da página (Preco) versão desktop *********** + +var ContentPrecos = React.createClass({ + + render: function() { + return ( +
+

FAIXA DE PREÇO

+
+
+
    +
  • + + +
  • + + +
  • + + +
  • + + +
  • + + +
  • +
+
+
+
+ ); + } +}); + +// *************** Componente pesponsável pelo conteudo com os cards da página ************ + +var ContentCards = React.createClass({ + getInitialState: function() { + return { + images: [] + } + }, + + componentDidMount: function() { + var _this = this; + this.serverRequest = + axios + .get("http://localhost:8000/data.json") + .then(function(result) { + _this.setState({ + images: result.data.images + }); + }) + .catch(error=>{}); + }, + + componentWillUnmount: function() { + this.serverRequest.abort(); + }, + + render: function() { + return ( + + ) + } + }); + + +ReactDOM.render( + , + document.getElementById('page') +); \ No newline at end of file diff --git a/Projeto/src/sass/app.scss b/Projeto/src/sass/app.scss new file mode 100644 index 00000000..78d3447a --- /dev/null +++ b/Projeto/src/sass/app.scss @@ -0,0 +1,349 @@ +@font-face { + font-family: DidactGothic; + src: url(../../font/DidactGothic-Regular.ttf); +} + +* { + font-family: DidactGothic; +} + +#page { + + /*Classe responsável pelo layout do header*/ + + .header { + border-bottom: 2px solid #ff9f1c; + padding-bottom: 36px; + margin-top: 32px; + :nth-child(2) { + float: right; + right: 0px; + position: absolute; + top: 10%; + } + .header-border { + width: 71%; + margin: 0 auto; + display: flex; + position: relative; + p { + background-color: #ff9f1c; + border-radius: 10px; + padding: 0px 7px; + font-size: 14px; + color: #fff; + text-align: center; + line-height: 20px; + position: relative; + top: -6px; + left: -5px; + } + } + } + + /*Classe responsável pelo layout do subheader*/ + + .subHeader { + width: 71%; + margin: 0 auto; + margin-top: 10px; + &__title { + display: inline-block; + + h1 { + font-weight: 100; + font-size: 1.9em; + } + } + &__tab { + float: right; + margin-top: 30px; + margin-right: 6px; + } + &__form{ + select { + height: 30px; + width: 125px; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + background: url(../../images/arrow.png) no-repeat rgb(255, 255, 255); + background-position: 95px; + background-size: 22px; + padding-left: 8px; + option{ + &:hover { + background-color: #ff9f1c; + } + } + } + } + &__mobile { + display: none; + } + } + + /*Classe responsável pelo layout do conteudo/corpo*/ + + .content { + width: 71%; + display: table; + margin: 0 auto; + position: relative; + + /*Classe responsável pelo layout do conteudo/corpo na parte de filtros*/ + + &__Filtro { + position: absolute; + width: 25%; + h1.cores { + font-size: 1.2em; + margin-top: 26px; + margin-bottom: 26px; + font-weight: 100; + letter-spacing: 2px; + } + h1.tamanho { + font-size: 1.2em; + font-weight: 100; + margin-bottom: 35px; + font-weight: 100; + letter-spacing: 2px;; + } + h1.preco{ + font-size: 1.2em; + margin-top: 45px; + margin-bottom: 28px; + font-weight: 100; + letter-spacing: 2px; + } + + /*Classe responsável pelo layout do conteudo/corpo na parte de filtros na parte de tamanhos*/ + + &__box { + width: 80%; + a { + margin-right: 10px; + margin-bottom: 8px; + border: 1px solid #e5e5e5; + color: #9f9f9f; + padding: 5px; + display: inline-block; + width: 20px; + height: 20px; + text-align: center; + text-decoration: none; + font-size: 0.7em; + line-height: 1.8em; + font-weight: bold; + &:hover { + border: 2px solid #ff9f1c; + color: #000; + text-decoration: none; + font-weight: 700; + margin-right: 10px; + margin-bottom: 8px; + padding: 4px; + display: inline-block; + width: 20px; + height: 20px; + text-align: center; + text-decoration: none; + font-weight: 700; + } + } + } + + /*Classe responsável pelo visual do checkbox*/ + + &__form { + margin-top: 26px; + margin-bottom: 46px; + p { + text-decoration: underline; + display: inline; + margin-right: 8px; + color: #7a7a7a; + cursor: pointer; + font-size: 0.8em; + } + input[type="checkbox"] { + display:none; + } + + input[type="checkbox"] + label { + color: #000; + font-weight: 600; + font-size: 0.9em; + vertical-align: middle; + } + + input[type="checkbox"] + label .labelSpan { + display:inline-block; + width: 12px; + height: 12px; + margin: 0px 10px 0 0; + vertical-align:middle; + cursor: pointer; + border: 1px solid #d8d8d8; + } + + input[type="checkbox"]:checked + label .labelSpan { + background-image: url("../../images/Select.png"); + background-size: 8px; + background-repeat: no-repeat; + background-position: center; + border: 1px solid #d8d8d8; + } + ul { + padding-left: 0px; + li { + list-style: none; + margin-top: 1px; + } + } + } + } + + /*Classe responsável pelo layout na parte dos CARDS*/ + + &__Card { + margin: 0; + width: 80%; + float: right; + margin-right: -38px; + a { + &:-webkit-any-link{ + color: #000; + text-decoration: none; + }; + } + ul { + padding: 0px; + li { + display: inline-block; + list-style: none; + width: 32%; + padding: 0px 0px; + margin-bottom: 32px; + } + } + img { + margin: 0 12px; + } + &__mais { + text-align: center; + background-color: #ff9f1c; + width: 25%; + padding: 12px 35px; + color: #fff; + margin: 30px auto; + a { + &:-webkit-any-link{ + color: #fff; + text-decoration: none; + }; + } + } + &__block { + &__title { + font-size: 0.8em; + text-transform: uppercase; + letter-spacing: 1px; + text-align: center; + width: 50%; + text-align: center; + margin: 0 auto; + height: 40px; + margin-top: 12px; + } + &__preco { + display: inline-block; + margin-left: 38px; + &__total { + font-size: 1.1em; + text-transform: uppercase; + text-align: right; + font-weight: bold; + margin: 0px; + span { + font-family: serif; + } + } + &__parcela { + margin-top: 0px; + span { + font-family: serif; + } + } + } + &__promo{ + color: #666666; + text-decoration: line-through; + font-size: 0.8em; + font-weight: 100; + } + } + } +} + +/*Classe extras para outras funcionalidades*/ + + .arrow { + transition: 0.3s transform; + display: inline-block; + -webkit-transform: rotate(90deg); + -moz-transform: rotate(90deg); + -o-transform: rotate(90deg); + -ms-transform: rotate(90deg); + transform: rotate(90deg); + color: #7a7a7a; + } + + .arrow_down { + transition: 0.3s transform; + display: inline-block; + -webkit-transform: rotate(270deg); + -moz-transform: rotate(270deg); + -o-transform: rotate(270deg); + -ms-transform: rotate(270deg); + transform: rotate(270deg); + color: #7a7a7a; + } + + .dropdownNone { + display: none; + } + + .dropdownBlock { + display: block; + margin-top: -13px; + } + .dropmenuNone { + display: none; + } + + .dropmenuBlock { + display: block; + margin: 0 auto; + } + .highlight { + display: none; + } +} + +/*Classe da página de produção*/ + +.producao { + width: 80%; + margin: 0 auto; + text-align: center; + a { + text-decoration: none; + padding: 12px 15%; + background: #ff9f1c; + border: 1px solid #ff9f1c; + color: #fff; + letter-spacing: 1px; + } +} \ No newline at end of file diff --git a/Projeto/src/sass/media.scss b/Projeto/src/sass/media.scss new file mode 100644 index 00000000..aed05227 --- /dev/null +++ b/Projeto/src/sass/media.scss @@ -0,0 +1,158 @@ +/*Media Queries responsável pelo layout da versão mobile*/ + +@media screen and (max-width: 768px) and (min-width: 320px) { + + #page { + + /*Classe responsável pelo layout do conteudo/corpo*/ + + .content { + width: 100%; + display: table; + margin: 0 auto; + position: relative; + + /*Classe responsável pelo layout do conteudo/corpo na parte de filtros*/ + + &__Filtro { + position: absolute; + display: none; + visibility: hidden; + &__form { + ul { + li { + margin-top: 5px; + } + } + } + &__box { + width: 80%; + margin: 0 auto; + a { + margin-right: 16px; + margin-bottom: 8px; + border: 1px solid #e5e5e5; + color: #9f9f9f; + padding: 5px; + display: inline-block; + width: 35px; + height: 35px; + text-align: center; + text-decoration: none; + font-size: 1em; + line-height: 2em; + font-weight: bold; + } + } + } + + /*Classe responsável pelo layout na parte dos CARDS*/ + + &__Card { + margin: 0; + width: 100%; + float: left; + margin-right: 0px; + &__img { + width: 100%; + } + &__block { + &__title { + width: 70%; + } + &__preco { + margin: 0 5%; + } + } + ul { + padding: 0px; + li { + display: inline-block; + list-style: none; + width: 50%; + margin: 0 auto; + } + } + img { + margin: 0px; + } + } + &__Cardnone { + display: none; + } + } + + /*Classe responsável pelo layout do header*/ + + + .header { + .header-border { + width: 100%; + } + } + + /*Classe responsável pelo layout do subheader*/ + + .subHeader { + display: block; + &__title { + display: block; + text-align: center; + margin: 0 auto; + h1 { + font-size: 1.5em; + } + } + &__tab { + display: none; + } + &__mobile { + display: block; + text-align: center; + } + &__btnMobile { + padding: 12px 18%; + background: #fff; + border: 1px solid #000; + } + &__selectMobile { + width: 90%; + margin: 40px auto; + &__btnMobileSelect { + border: 1px solid #666666; + color: #666666; + padding: 12px 15%; + background: #fff; + letter-spacing: 1px; + float: right; + &__first { + padding: 12px 15%; + background: #ff9f1c; + border: 1px solid #ff9f1c; + color: #fff; + letter-spacing: 1px; + } + } + } + } + .dropdownBlock { + display: block; + text-align: left; + margin: 0 auto; + h1 { + display: none; + } + p span { + font-weight: bold; + } + } + .traco { + float: right; + margin-right: 14px; + font-weight: bold; + font-size: 40px; + line-height: 12px; + } + } +} + diff --git a/Projeto/webpack.config.js b/Projeto/webpack.config.js new file mode 100644 index 00000000..4c8459af --- /dev/null +++ b/Projeto/webpack.config.js @@ -0,0 +1,19 @@ +module.exports = { + entry: "./src/js/app.js", + output: { + filename: "public/js/app.js" + }, + module: { + loaders: [ + { + test: /\.js$/, + exclude: /node_modules/, + loader: 'babel-loader', + query: { + presets: ['react'] + }, + }, + {test: /\.json$/, loader: "json"} + ] + } +} diff --git a/data.json b/data.json new file mode 100644 index 00000000..acea8cfb --- /dev/null +++ b/data.json @@ -0,0 +1,11 @@ +{"images":[ + {"name":"Layer221", "cor":"laranja", "tamanho":"p", "preco":"398", "data":"", "messenger":"bata bordada"}, + {"name":"Layer213", "cor":"verde", "tamanho":"g", "preco":"398", "data":"", "messenger":"chapéu de praia com fivela"}, + {"name":"Layer216", "cor":"azul", "tamanho":"g", "preco":"398", "data":"", "messenger":"vestido texturizado", "promo":"R$ 189"}, + {"name":"Layer217", "cor":"rosa", "tamanho":"p", "preco":"398", "data":"", "messenger":"bata bordada"}, + {"name":"Layer208", "cor":"branco", "tamanho":"p", "preco":"398", "data":"", "messenger":"chapéu de praia com fivela"}, + {"name":"Layer218", "cor":"branco", "tamanho":"m", "preco":"398", "data":"", "messenger":"vestido texturizado", "promo":"R$ 189"}, + {"name":"Layer210", "cor":"azul", "tamanho":"m", "preco":"398", "data":"", "messenger":"bata bordada"}, + {"name":"Layer219", "cor":"laranja", "tamanho":"m", "preco":"398", "data":"", "messenger":"chapéu de praia com fivela"}, + {"name":"Layer220", "cor":"branco", "tamanho":"p", "preco":"398", "data":"", "messenger":"vestido texturizado", "promo":"R$ 189"} + ]} \ No newline at end of file diff --git a/font/DidactGothic-Regular.ttf b/font/DidactGothic-Regular.ttf new file mode 100644 index 00000000..62bdba3d Binary files /dev/null and b/font/DidactGothic-Regular.ttf differ diff --git a/gulpfile.js b/gulpfile.js new file mode 100644 index 00000000..fdc2f1ac --- /dev/null +++ b/gulpfile.js @@ -0,0 +1,32 @@ +var gulp = require('gulp'); +var sass = require('gulp-sass'); +var uglify = require('gulp-uglify'); +var gls = require('gulp-live-server'); +var concat = require('gulp-concat'); + +gulp.task('default', ['sass', 'watch', 'serve', 'concat']); + +gulp.task('sass', function() { + return gulp.src('src/sass/*.scss') + .pipe(concat('style.min.css')) + .pipe(sass({ outputStyle: 'compressed' }).on('error', sass.logError)) + .pipe(gulp.dest('public/css')); +}); + +gulp.task('watch', function() { + gulp.watch('src/sass/*.scss', ['sass']); +}); + +gulp.task('serve', function() { + var server = gls.static('./', 8000); + server.start(); + gulp.watch('src/css/*.css', function(file) { + gls.notify.apply(server, [file]); + }); + gulp.watch('src/js/*.js', function(file) { + gls.notify.apply(server, [file]); + }); + gulp.watch('./*html', function(file) { + gls.notify.apply(server, [file]); + }); +}); diff --git a/images/Layer208.png b/images/Layer208.png new file mode 100644 index 00000000..41b4be6b Binary files /dev/null and b/images/Layer208.png differ diff --git a/images/Layer210.png b/images/Layer210.png new file mode 100644 index 00000000..52174b78 Binary files /dev/null and b/images/Layer210.png differ diff --git a/images/Layer213.png b/images/Layer213.png new file mode 100644 index 00000000..fa4b52c3 Binary files /dev/null and b/images/Layer213.png differ diff --git a/images/Layer216.png b/images/Layer216.png new file mode 100644 index 00000000..46853fde Binary files /dev/null and b/images/Layer216.png differ diff --git a/images/Layer217.png b/images/Layer217.png new file mode 100644 index 00000000..f9c6ff36 Binary files /dev/null and b/images/Layer217.png differ diff --git a/images/Layer218.png b/images/Layer218.png new file mode 100644 index 00000000..6e6d4259 Binary files /dev/null and b/images/Layer218.png differ diff --git a/images/Layer219.png b/images/Layer219.png new file mode 100644 index 00000000..4e3efad3 Binary files /dev/null and b/images/Layer219.png differ diff --git a/images/Layer220.png b/images/Layer220.png new file mode 100644 index 00000000..47e6109a Binary files /dev/null and b/images/Layer220.png differ diff --git a/images/Layer221.png b/images/Layer221.png new file mode 100644 index 00000000..7597f636 Binary files /dev/null and b/images/Layer221.png differ diff --git a/images/Select.png b/images/Select.png new file mode 100644 index 00000000..73ac1f67 Binary files /dev/null and b/images/Select.png differ diff --git a/images/arrow.png b/images/arrow.png new file mode 100644 index 00000000..3733d80f Binary files /dev/null and b/images/arrow.png differ diff --git a/images/bag.png b/images/bag.png new file mode 100644 index 00000000..e1e66627 Binary files /dev/null and b/images/bag.png differ diff --git a/images/car.png b/images/car.png new file mode 100644 index 00000000..ebbdb1e5 Binary files /dev/null and b/images/car.png differ diff --git a/index.html b/index.html new file mode 100644 index 00000000..9fddde77 --- /dev/null +++ b/index.html @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + +
+ + + + + + + \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 00000000..86e6e2e8 --- /dev/null +++ b/package.json @@ -0,0 +1,28 @@ +{ + "name": "projeto", + "version": "1.0.0", + "description": "Desafio Profite", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "Diego Marcelo Costa da Silva", + "license": "ISC", + "dependencies": { + "react": "^15.5.4", + "react-dom": "^15.5.4" + }, + "devDependencies": { + "axios": "^0.16.1", + "babel-cli": "^6.24.1", + "babel-core": "^6.24.1", + "babel-loader": "^7.0.0", + "babel-plugin-transform-es2015-modules-commonjs": "^6.24.1", + "babel-preset-react": "^6.24.1", + "gulp": "^3.9.1", + "gulp-live-server": "0.0.30", + "gulp-sass": "^3.1.0", + "gulp-uglify": "^2.0.0", + "webpack": "^2.5.0" + } +} diff --git a/producao.html b/producao.html new file mode 100644 index 00000000..cd682719 --- /dev/null +++ b/producao.html @@ -0,0 +1,19 @@ + + + + + + + + + + + +
+

Desculpe os transtornos.

+

Página em construção!

+

^¬^

+ Voltar +
+ + \ No newline at end of file diff --git a/public/css/style.min.css b/public/css/style.min.css new file mode 100644 index 00000000..cd703bbf --- /dev/null +++ b/public/css/style.min.css @@ -0,0 +1 @@ +@font-face{font-family:DidactGothic;src:url(../../font/DidactGothic-Regular.ttf)}*{font-family:DidactGothic}#page .header{border-bottom:2px solid #ff9f1c;padding-bottom:36px;margin-top:32px}#page .header :nth-child(2){float:right;right:0px;position:absolute;top:10%}#page .header .header-border{width:71%;margin:0 auto;display:flex;position:relative}#page .header .header-border p{background-color:#ff9f1c;border-radius:10px;padding:0px 7px;font-size:14px;color:#fff;text-align:center;line-height:20px;position:relative;top:-6px;left:-5px}#page .subHeader{width:71%;margin:0 auto;margin-top:10px}#page .subHeader__title{display:inline-block}#page .subHeader__title h1{font-weight:100;font-size:1.9em}#page .subHeader__tab{float:right;margin-top:30px;margin-right:6px}#page .subHeader__form select{height:30px;width:125px;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:url(../../images/arrow.png) no-repeat #fff;background-position:95px;background-size:22px;padding-left:8px}#page .subHeader__form select option:hover{background-color:#ff9f1c}#page .subHeader__mobile{display:none}#page .content{width:71%;display:table;margin:0 auto;position:relative}#page .content__Filtro{position:absolute;width:25%}#page .content__Filtro h1.cores{font-size:1.2em;margin-top:26px;margin-bottom:26px;font-weight:100;letter-spacing:2px}#page .content__Filtro h1.tamanho{font-size:1.2em;font-weight:100;margin-bottom:35px;font-weight:100;letter-spacing:2px}#page .content__Filtro h1.preco{font-size:1.2em;margin-top:45px;margin-bottom:28px;font-weight:100;letter-spacing:2px}#page .content__Filtro__box{width:80%}#page .content__Filtro__box a{margin-right:10px;margin-bottom:8px;border:1px solid #e5e5e5;color:#9f9f9f;padding:5px;display:inline-block;width:20px;height:20px;text-align:center;text-decoration:none;font-size:0.7em;line-height:1.8em;font-weight:bold}#page .content__Filtro__box a:hover{border:2px solid #ff9f1c;color:#000;text-decoration:none;font-weight:700;margin-right:10px;margin-bottom:8px;padding:4px;display:inline-block;width:20px;height:20px;text-align:center;text-decoration:none;font-weight:700}#page .content__Filtro__form{margin-top:26px;margin-bottom:46px}#page .content__Filtro__form p{text-decoration:underline;display:inline;margin-right:8px;color:#7a7a7a;cursor:pointer;font-size:0.8em}#page .content__Filtro__form input[type="checkbox"]{display:none}#page .content__Filtro__form input[type="checkbox"]+label{color:#000;font-weight:600;font-size:0.9em;vertical-align:middle}#page .content__Filtro__form input[type="checkbox"]+label .labelSpan{display:inline-block;width:12px;height:12px;margin:0px 10px 0 0;vertical-align:middle;cursor:pointer;border:1px solid #d8d8d8}#page .content__Filtro__form input[type="checkbox"]:checked+label .labelSpan{background-image:url("../../images/Select.png");background-size:8px;background-repeat:no-repeat;background-position:center;border:1px solid #d8d8d8}#page .content__Filtro__form ul{padding-left:0px}#page .content__Filtro__form ul li{list-style:none;margin-top:1px}#page .content__Card{margin:0;width:80%;float:right;margin-right:-38px}#page .content__Card a:-webkit-any-link{color:#000;text-decoration:none}#page .content__Card ul{padding:0px}#page .content__Card ul li{display:inline-block;list-style:none;width:32%;padding:0px 0px;margin-bottom:32px}#page .content__Card img{margin:0 12px}#page .content__Card__mais{text-align:center;background-color:#ff9f1c;width:25%;padding:12px 35px;color:#fff;margin:30px auto}#page .content__Card__mais a:-webkit-any-link{color:#fff;text-decoration:none}#page .content__Card__block__title{font-size:0.8em;text-transform:uppercase;letter-spacing:1px;text-align:center;width:50%;text-align:center;margin:0 auto;height:40px;margin-top:12px}#page .content__Card__block__preco{display:inline-block;margin-left:38px}#page .content__Card__block__preco__total{font-size:1.1em;text-transform:uppercase;text-align:right;font-weight:bold;margin:0px}#page .content__Card__block__preco__total span{font-family:serif}#page .content__Card__block__preco__parcela{margin-top:0px}#page .content__Card__block__preco__parcela span{font-family:serif}#page .content__Card__block__promo{color:#666666;text-decoration:line-through;font-size:0.8em;font-weight:100}#page .arrow{transition:0.3s transform;display:inline-block;-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-o-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg);color:#7a7a7a}#page .arrow_down{transition:0.3s transform;display:inline-block;-webkit-transform:rotate(270deg);-moz-transform:rotate(270deg);-o-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg);color:#7a7a7a}#page .dropdownNone{display:none}#page .dropdownBlock{display:block;margin-top:-13px}#page .dropmenuNone{display:none}#page .dropmenuBlock{display:block;margin:0 auto}#page .highlight{display:none}.producao{width:80%;margin:0 auto;text-align:center}.producao a{text-decoration:none;padding:12px 15%;background:#ff9f1c;border:1px solid #ff9f1c;color:#fff;letter-spacing:1px}@media screen and (max-width: 768px) and (min-width: 320px){#page .content{width:100%;display:table;margin:0 auto;position:relative}#page .content__Filtro{position:absolute;display:none;visibility:hidden}#page .content__Filtro__form ul li{margin-top:5px}#page .content__Filtro__box{width:80%;margin:0 auto}#page .content__Filtro__box a{margin-right:16px;margin-bottom:8px;border:1px solid #e5e5e5;color:#9f9f9f;padding:5px;display:inline-block;width:35px;height:35px;text-align:center;text-decoration:none;font-size:1em;line-height:2em;font-weight:bold}#page .content__Card{margin:0;width:100%;float:left;margin-right:0px}#page .content__Card__img{width:100%}#page .content__Card__block__title{width:70%}#page .content__Card__block__preco{margin:0 5%}#page .content__Card ul{padding:0px}#page .content__Card ul li{display:inline-block;list-style:none;width:50%;margin:0 auto}#page .content__Card img{margin:0px}#page .content__Cardnone{display:none}#page .header .header-border{width:100%}#page .subHeader{display:block}#page .subHeader__title{display:block;text-align:center;margin:0 auto}#page .subHeader__title h1{font-size:1.5em}#page .subHeader__tab{display:none}#page .subHeader__mobile{display:block;text-align:center}#page .subHeader__btnMobile{padding:12px 18%;background:#fff;border:1px solid #000}#page .subHeader__selectMobile{width:90%;margin:40px auto}#page .subHeader__selectMobile__btnMobileSelect{border:1px solid #666666;color:#666666;padding:12px 15%;background:#fff;letter-spacing:1px;float:right}#page .subHeader__selectMobile__btnMobileSelect__first{padding:12px 15%;background:#ff9f1c;border:1px solid #ff9f1c;color:#fff;letter-spacing:1px}#page .dropdownBlock{display:block;text-align:left;margin:0 auto}#page .dropdownBlock h1{display:none}#page .dropdownBlock p span{font-weight:bold}#page .traco{float:right;margin-right:14px;font-weight:bold;font-size:40px;line-height:12px}} diff --git a/public/js/app.js b/public/js/app.js new file mode 100644 index 00000000..dda927cf --- /dev/null +++ b/public/js/app.js @@ -0,0 +1,4754 @@ +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // identity function for calling harmony imports with the correct context +/******/ __webpack_require__.i = function(value) { return value; }; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { +/******/ configurable: false, +/******/ enumerable: true, +/******/ get: getter +/******/ }); +/******/ } +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 26); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(Buffer) { + +var bind = __webpack_require__(6); + +/*global toString:true*/ + +// utils is a library of generic helper functions non-specific to axios + +var toString = Object.prototype.toString; + +/** + * Determine if a value is an Array + * + * @param {Object} val The value to test + * @returns {boolean} True if value is an Array, otherwise false + */ +function isArray(val) { + return toString.call(val) === '[object Array]'; +} + +/** + * Determine if a value is a Node Buffer + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a Node Buffer, otherwise false + */ +function isBuffer(val) { + return ((typeof Buffer !== 'undefined') && (Buffer.isBuffer) && (Buffer.isBuffer(val))); +} + +/** + * Determine if a value is an ArrayBuffer + * + * @param {Object} val The value to test + * @returns {boolean} True if value is an ArrayBuffer, otherwise false + */ +function isArrayBuffer(val) { + return toString.call(val) === '[object ArrayBuffer]'; +} + +/** + * Determine if a value is a FormData + * + * @param {Object} val The value to test + * @returns {boolean} True if value is an FormData, otherwise false + */ +function isFormData(val) { + return (typeof FormData !== 'undefined') && (val instanceof FormData); +} + +/** + * Determine if a value is a view on an ArrayBuffer + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false + */ +function isArrayBufferView(val) { + var result; + if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) { + result = ArrayBuffer.isView(val); + } else { + result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer); + } + return result; +} + +/** + * Determine if a value is a String + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a String, otherwise false + */ +function isString(val) { + return typeof val === 'string'; +} + +/** + * Determine if a value is a Number + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a Number, otherwise false + */ +function isNumber(val) { + return typeof val === 'number'; +} + +/** + * Determine if a value is undefined + * + * @param {Object} val The value to test + * @returns {boolean} True if the value is undefined, otherwise false + */ +function isUndefined(val) { + return typeof val === 'undefined'; +} + +/** + * Determine if a value is an Object + * + * @param {Object} val The value to test + * @returns {boolean} True if value is an Object, otherwise false + */ +function isObject(val) { + return val !== null && typeof val === 'object'; +} + +/** + * Determine if a value is a Date + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a Date, otherwise false + */ +function isDate(val) { + return toString.call(val) === '[object Date]'; +} + +/** + * Determine if a value is a File + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a File, otherwise false + */ +function isFile(val) { + return toString.call(val) === '[object File]'; +} + +/** + * Determine if a value is a Blob + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a Blob, otherwise false + */ +function isBlob(val) { + return toString.call(val) === '[object Blob]'; +} + +/** + * Determine if a value is a Function + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a Function, otherwise false + */ +function isFunction(val) { + return toString.call(val) === '[object Function]'; +} + +/** + * Determine if a value is a Stream + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a Stream, otherwise false + */ +function isStream(val) { + return isObject(val) && isFunction(val.pipe); +} + +/** + * Determine if a value is a URLSearchParams object + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a URLSearchParams object, otherwise false + */ +function isURLSearchParams(val) { + return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams; +} + +/** + * Trim excess whitespace off the beginning and end of a string + * + * @param {String} str The String to trim + * @returns {String} The String freed of excess whitespace + */ +function trim(str) { + return str.replace(/^\s*/, '').replace(/\s*$/, ''); +} + +/** + * Determine if we're running in a standard browser environment + * + * This allows axios to run in a web worker, and react-native. + * Both environments support XMLHttpRequest, but not fully standard globals. + * + * web workers: + * typeof window -> undefined + * typeof document -> undefined + * + * react-native: + * navigator.product -> 'ReactNative' + */ +function isStandardBrowserEnv() { + if (typeof navigator !== 'undefined' && navigator.product === 'ReactNative') { + return false; + } + return ( + typeof window !== 'undefined' && + typeof document !== 'undefined' + ); +} + +/** + * Iterate over an Array or an Object invoking a function for each item. + * + * If `obj` is an Array callback will be called passing + * the value, index, and complete array for each item. + * + * If 'obj' is an Object callback will be called passing + * the value, key, and complete object for each property. + * + * @param {Object|Array} obj The object to iterate + * @param {Function} fn The callback to invoke for each item + */ +function forEach(obj, fn) { + // Don't bother if no value provided + if (obj === null || typeof obj === 'undefined') { + return; + } + + // Force an array if not already something iterable + if (typeof obj !== 'object' && !isArray(obj)) { + /*eslint no-param-reassign:0*/ + obj = [obj]; + } + + if (isArray(obj)) { + // Iterate over array values + for (var i = 0, l = obj.length; i < l; i++) { + fn.call(null, obj[i], i, obj); + } + } else { + // Iterate over object keys + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + fn.call(null, obj[key], key, obj); + } + } + } +} + +/** + * Accepts varargs expecting each argument to be an object, then + * immutably merges the properties of each object and returns result. + * + * When multiple objects contain the same key the later object in + * the arguments list will take precedence. + * + * Example: + * + * ```js + * var result = merge({foo: 123}, {foo: 456}); + * console.log(result.foo); // outputs 456 + * ``` + * + * @param {Object} obj1 Object to merge + * @returns {Object} Result of all merge properties + */ +function merge(/* obj1, obj2, obj3, ... */) { + var result = {}; + function assignValue(val, key) { + if (typeof result[key] === 'object' && typeof val === 'object') { + result[key] = merge(result[key], val); + } else { + result[key] = val; + } + } + + for (var i = 0, l = arguments.length; i < l; i++) { + forEach(arguments[i], assignValue); + } + return result; +} + +/** + * Extends object a by mutably adding to it the properties of object b. + * + * @param {Object} a The object to be extended + * @param {Object} b The object to copy properties from + * @param {Object} thisArg The object to bind function to + * @return {Object} The resulting value of object a + */ +function extend(a, b, thisArg) { + forEach(b, function assignValue(val, key) { + if (thisArg && typeof val === 'function') { + a[key] = bind(val, thisArg); + } else { + a[key] = val; + } + }); + return a; +} + +module.exports = { + isArray: isArray, + isArrayBuffer: isArrayBuffer, + isBuffer: isBuffer, + isFormData: isFormData, + isArrayBufferView: isArrayBufferView, + isString: isString, + isNumber: isNumber, + isObject: isObject, + isUndefined: isUndefined, + isDate: isDate, + isFile: isFile, + isBlob: isBlob, + isFunction: isFunction, + isStream: isStream, + isURLSearchParams: isURLSearchParams, + isStandardBrowserEnv: isStandardBrowserEnv, + forEach: forEach, + merge: merge, + extend: extend, + trim: trim +}; + +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(28).Buffer)) + +/***/ }), +/* 1 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +var utils = __webpack_require__(0); +var normalizeHeaderName = __webpack_require__(23); + +var DEFAULT_CONTENT_TYPE = { + 'Content-Type': 'application/x-www-form-urlencoded' +}; + +function setContentTypeIfUnset(headers, value) { + if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) { + headers['Content-Type'] = value; + } +} + +function getDefaultAdapter() { + var adapter; + if (typeof XMLHttpRequest !== 'undefined') { + // For browsers use XHR adapter + adapter = __webpack_require__(2); + } else if (typeof process !== 'undefined') { + // For node use HTTP adapter + adapter = __webpack_require__(2); + } + return adapter; +} + +var defaults = { + adapter: getDefaultAdapter(), + + transformRequest: [function transformRequest(data, headers) { + normalizeHeaderName(headers, 'Content-Type'); + if (utils.isFormData(data) || + utils.isArrayBuffer(data) || + utils.isBuffer(data) || + utils.isStream(data) || + utils.isFile(data) || + utils.isBlob(data) + ) { + return data; + } + if (utils.isArrayBufferView(data)) { + return data.buffer; + } + if (utils.isURLSearchParams(data)) { + setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8'); + return data.toString(); + } + if (utils.isObject(data)) { + setContentTypeIfUnset(headers, 'application/json;charset=utf-8'); + return JSON.stringify(data); + } + return data; + }], + + transformResponse: [function transformResponse(data) { + /*eslint no-param-reassign:0*/ + if (typeof data === 'string') { + try { + data = JSON.parse(data); + } catch (e) { /* Ignore */ } + } + return data; + }], + + timeout: 0, + + xsrfCookieName: 'XSRF-TOKEN', + xsrfHeaderName: 'X-XSRF-TOKEN', + + maxContentLength: -1, + + validateStatus: function validateStatus(status) { + return status >= 200 && status < 300; + } +}; + +defaults.headers = { + common: { + 'Accept': 'application/json, text/plain, */*' + } +}; + +utils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) { + defaults.headers[method] = {}; +}); + +utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) { + defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE); +}); + +module.exports = defaults; + +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(7))) + +/***/ }), +/* 2 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +var utils = __webpack_require__(0); +var settle = __webpack_require__(15); +var buildURL = __webpack_require__(18); +var parseHeaders = __webpack_require__(24); +var isURLSameOrigin = __webpack_require__(22); +var createError = __webpack_require__(5); +var btoa = (typeof window !== 'undefined' && window.btoa && window.btoa.bind(window)) || __webpack_require__(17); + +module.exports = function xhrAdapter(config) { + return new Promise(function dispatchXhrRequest(resolve, reject) { + var requestData = config.data; + var requestHeaders = config.headers; + + if (utils.isFormData(requestData)) { + delete requestHeaders['Content-Type']; // Let the browser set it + } + + var request = new XMLHttpRequest(); + var loadEvent = 'onreadystatechange'; + var xDomain = false; + + // For IE 8/9 CORS support + // Only supports POST and GET calls and doesn't returns the response headers. + // DON'T do this for testing b/c XMLHttpRequest is mocked, not XDomainRequest. + if (process.env.NODE_ENV !== 'test' && + typeof window !== 'undefined' && + window.XDomainRequest && !('withCredentials' in request) && + !isURLSameOrigin(config.url)) { + request = new window.XDomainRequest(); + loadEvent = 'onload'; + xDomain = true; + request.onprogress = function handleProgress() {}; + request.ontimeout = function handleTimeout() {}; + } + + // HTTP basic authentication + if (config.auth) { + var username = config.auth.username || ''; + var password = config.auth.password || ''; + requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password); + } + + request.open(config.method.toUpperCase(), buildURL(config.url, config.params, config.paramsSerializer), true); + + // Set the request timeout in MS + request.timeout = config.timeout; + + // Listen for ready state + request[loadEvent] = function handleLoad() { + if (!request || (request.readyState !== 4 && !xDomain)) { + return; + } + + // The request errored out and we didn't get a response, this will be + // handled by onerror instead + // With one exception: request that using file: protocol, most browsers + // will return status as 0 even though it's a successful request + if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) { + return; + } + + // Prepare the response + var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null; + var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response; + var response = { + data: responseData, + // IE sends 1223 instead of 204 (https://github.com/mzabriskie/axios/issues/201) + status: request.status === 1223 ? 204 : request.status, + statusText: request.status === 1223 ? 'No Content' : request.statusText, + headers: responseHeaders, + config: config, + request: request + }; + + settle(resolve, reject, response); + + // Clean up request + request = null; + }; + + // Handle low level network errors + request.onerror = function handleError() { + // Real errors are hidden from us by the browser + // onerror should only fire if it's a network error + reject(createError('Network Error', config)); + + // Clean up request + request = null; + }; + + // Handle timeout + request.ontimeout = function handleTimeout() { + reject(createError('timeout of ' + config.timeout + 'ms exceeded', config, 'ECONNABORTED')); + + // Clean up request + request = null; + }; + + // Add xsrf header + // This is only done if running in a standard browser environment. + // Specifically not if we're in a web worker, or react-native. + if (utils.isStandardBrowserEnv()) { + var cookies = __webpack_require__(20); + + // Add xsrf header + var xsrfValue = (config.withCredentials || isURLSameOrigin(config.url)) && config.xsrfCookieName ? + cookies.read(config.xsrfCookieName) : + undefined; + + if (xsrfValue) { + requestHeaders[config.xsrfHeaderName] = xsrfValue; + } + } + + // Add headers to the request + if ('setRequestHeader' in request) { + utils.forEach(requestHeaders, function setRequestHeader(val, key) { + if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') { + // Remove Content-Type if data is undefined + delete requestHeaders[key]; + } else { + // Otherwise add header to the request + request.setRequestHeader(key, val); + } + }); + } + + // Add withCredentials to request if needed + if (config.withCredentials) { + request.withCredentials = true; + } + + // Add responseType to request if needed + if (config.responseType) { + try { + request.responseType = config.responseType; + } catch (e) { + // Expected DOMException thrown by browsers not compatible XMLHttpRequest Level 2. + // But, this can be suppressed for 'json' type as it can be parsed by default 'transformResponse' function. + if (config.responseType !== 'json') { + throw e; + } + } + } + + // Handle progress if needed + if (typeof config.onDownloadProgress === 'function') { + request.addEventListener('progress', config.onDownloadProgress); + } + + // Not all browsers support upload events + if (typeof config.onUploadProgress === 'function' && request.upload) { + request.upload.addEventListener('progress', config.onUploadProgress); + } + + if (config.cancelToken) { + // Handle cancellation + config.cancelToken.promise.then(function onCanceled(cancel) { + if (!request) { + return; + } + + request.abort(); + reject(cancel); + // Clean up request + request = null; + }); + } + + if (requestData === undefined) { + requestData = null; + } + + // Send the request + request.send(requestData); + }); +}; + +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(7))) + +/***/ }), +/* 3 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * A `Cancel` is an object that is thrown when an operation is canceled. + * + * @class + * @param {string=} message The message. + */ +function Cancel(message) { + this.message = message; +} + +Cancel.prototype.toString = function toString() { + return 'Cancel' + (this.message ? ': ' + this.message : ''); +}; + +Cancel.prototype.__CANCEL__ = true; + +module.exports = Cancel; + + +/***/ }), +/* 4 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +module.exports = function isCancel(value) { + return !!(value && value.__CANCEL__); +}; + + +/***/ }), +/* 5 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var enhanceError = __webpack_require__(14); + +/** + * Create an Error with the specified message, config, error code, and response. + * + * @param {string} message The error message. + * @param {Object} config The config. + * @param {string} [code] The error code (for example, 'ECONNABORTED'). + @ @param {Object} [response] The response. + * @returns {Error} The created error. + */ +module.exports = function createError(message, config, code, response) { + var error = new Error(message); + return enhanceError(error, config, code, response); +}; + + +/***/ }), +/* 6 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +module.exports = function bind(fn, thisArg) { + return function wrap() { + var args = new Array(arguments.length); + for (var i = 0; i < args.length; i++) { + args[i] = arguments[i]; + } + return fn.apply(thisArg, args); + }; +}; + + +/***/ }), +/* 7 */ +/***/ (function(module, exports) { + +// shim for using process in browser +var process = module.exports = {}; + +// cached from whatever global is present so that test runners that stub it +// don't break things. But we need to wrap it in a try catch in case it is +// wrapped in strict mode code which doesn't define any globals. It's inside a +// function because try/catches deoptimize in certain engines. + +var cachedSetTimeout; +var cachedClearTimeout; + +function defaultSetTimout() { + throw new Error('setTimeout has not been defined'); +} +function defaultClearTimeout () { + throw new Error('clearTimeout has not been defined'); +} +(function () { + try { + if (typeof setTimeout === 'function') { + cachedSetTimeout = setTimeout; + } else { + cachedSetTimeout = defaultSetTimout; + } + } catch (e) { + cachedSetTimeout = defaultSetTimout; + } + try { + if (typeof clearTimeout === 'function') { + cachedClearTimeout = clearTimeout; + } else { + cachedClearTimeout = defaultClearTimeout; + } + } catch (e) { + cachedClearTimeout = defaultClearTimeout; + } +} ()) +function runTimeout(fun) { + if (cachedSetTimeout === setTimeout) { + //normal enviroments in sane situations + return setTimeout(fun, 0); + } + // if setTimeout wasn't available but was latter defined + if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { + cachedSetTimeout = setTimeout; + return setTimeout(fun, 0); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedSetTimeout(fun, 0); + } catch(e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedSetTimeout.call(null, fun, 0); + } catch(e){ + // 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 + return cachedSetTimeout.call(this, fun, 0); + } + } + + +} +function runClearTimeout(marker) { + if (cachedClearTimeout === clearTimeout) { + //normal enviroments in sane situations + return clearTimeout(marker); + } + // if clearTimeout wasn't available but was latter defined + if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { + cachedClearTimeout = clearTimeout; + return clearTimeout(marker); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedClearTimeout(marker); + } catch (e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedClearTimeout.call(null, marker); + } catch (e){ + // 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. + // Some versions of I.E. have different rules for clearTimeout vs setTimeout + return cachedClearTimeout.call(this, marker); + } + } + + + +} +var queue = []; +var draining = false; +var currentQueue; +var queueIndex = -1; + +function cleanUpNextTick() { + if (!draining || !currentQueue) { + return; + } + draining = false; + if (currentQueue.length) { + queue = currentQueue.concat(queue); + } else { + queueIndex = -1; + } + if (queue.length) { + drainQueue(); + } +} + +function drainQueue() { + if (draining) { + return; + } + var timeout = runTimeout(cleanUpNextTick); + draining = true; + + var len = queue.length; + while(len) { + currentQueue = queue; + queue = []; + while (++queueIndex < len) { + if (currentQueue) { + currentQueue[queueIndex].run(); + } + } + queueIndex = -1; + len = queue.length; + } + currentQueue = null; + draining = false; + runClearTimeout(timeout); +} + +process.nextTick = function (fun) { + var args = new Array(arguments.length - 1); + if (arguments.length > 1) { + for (var i = 1; i < arguments.length; i++) { + args[i - 1] = arguments[i]; + } + } + queue.push(new Item(fun, args)); + if (queue.length === 1 && !draining) { + runTimeout(drainQueue); + } +}; + +// v8 likes predictible objects +function Item(fun, array) { + this.fun = fun; + this.array = array; +} +Item.prototype.run = function () { + this.fun.apply(null, this.array); +}; +process.title = 'browser'; +process.browser = true; +process.env = {}; +process.argv = []; +process.version = ''; // empty string to avoid regexp issues +process.versions = {}; + +function noop() {} + +process.on = noop; +process.addListener = noop; +process.once = noop; +process.off = noop; +process.removeListener = noop; +process.removeAllListeners = noop; +process.emit = noop; +process.prependListener = noop; +process.prependOnceListener = noop; + +process.listeners = function (name) { return [] } + +process.binding = function (name) { + throw new Error('process.binding is not supported'); +}; + +process.cwd = function () { return '/' }; +process.chdir = function (dir) { + throw new Error('process.chdir is not supported'); +}; +process.umask = function() { return 0; }; + + +/***/ }), +/* 8 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = __webpack_require__(9); + +/***/ }), +/* 9 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var utils = __webpack_require__(0); +var bind = __webpack_require__(6); +var Axios = __webpack_require__(11); +var defaults = __webpack_require__(1); + +/** + * Create an instance of Axios + * + * @param {Object} defaultConfig The default config for the instance + * @return {Axios} A new instance of Axios + */ +function createInstance(defaultConfig) { + var context = new Axios(defaultConfig); + var instance = bind(Axios.prototype.request, context); + + // Copy axios.prototype to instance + utils.extend(instance, Axios.prototype, context); + + // Copy context to instance + utils.extend(instance, context); + + return instance; +} + +// Create the default instance to be exported +var axios = createInstance(defaults); + +// Expose Axios class to allow class inheritance +axios.Axios = Axios; + +// Factory for creating new instances +axios.create = function create(instanceConfig) { + return createInstance(utils.merge(defaults, instanceConfig)); +}; + +// Expose Cancel & CancelToken +axios.Cancel = __webpack_require__(3); +axios.CancelToken = __webpack_require__(10); +axios.isCancel = __webpack_require__(4); + +// Expose all/spread +axios.all = function all(promises) { + return Promise.all(promises); +}; +axios.spread = __webpack_require__(25); + +module.exports = axios; + +// Allow use of default import syntax in TypeScript +module.exports.default = axios; + + +/***/ }), +/* 10 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var Cancel = __webpack_require__(3); + +/** + * A `CancelToken` is an object that can be used to request cancellation of an operation. + * + * @class + * @param {Function} executor The executor function. + */ +function CancelToken(executor) { + if (typeof executor !== 'function') { + throw new TypeError('executor must be a function.'); + } + + var resolvePromise; + this.promise = new Promise(function promiseExecutor(resolve) { + resolvePromise = resolve; + }); + + var token = this; + executor(function cancel(message) { + if (token.reason) { + // Cancellation has already been requested + return; + } + + token.reason = new Cancel(message); + resolvePromise(token.reason); + }); +} + +/** + * Throws a `Cancel` if cancellation has been requested. + */ +CancelToken.prototype.throwIfRequested = function throwIfRequested() { + if (this.reason) { + throw this.reason; + } +}; + +/** + * Returns an object that contains a new `CancelToken` and a function that, when called, + * cancels the `CancelToken`. + */ +CancelToken.source = function source() { + var cancel; + var token = new CancelToken(function executor(c) { + cancel = c; + }); + return { + token: token, + cancel: cancel + }; +}; + +module.exports = CancelToken; + + +/***/ }), +/* 11 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var defaults = __webpack_require__(1); +var utils = __webpack_require__(0); +var InterceptorManager = __webpack_require__(12); +var dispatchRequest = __webpack_require__(13); +var isAbsoluteURL = __webpack_require__(21); +var combineURLs = __webpack_require__(19); + +/** + * Create a new instance of Axios + * + * @param {Object} instanceConfig The default config for the instance + */ +function Axios(instanceConfig) { + this.defaults = instanceConfig; + this.interceptors = { + request: new InterceptorManager(), + response: new InterceptorManager() + }; +} + +/** + * Dispatch a request + * + * @param {Object} config The config specific for this request (merged with this.defaults) + */ +Axios.prototype.request = function request(config) { + /*eslint no-param-reassign:0*/ + // Allow for axios('example/url'[, config]) a la fetch API + if (typeof config === 'string') { + config = utils.merge({ + url: arguments[0] + }, arguments[1]); + } + + config = utils.merge(defaults, this.defaults, { method: 'get' }, config); + + // Support baseURL config + if (config.baseURL && !isAbsoluteURL(config.url)) { + config.url = combineURLs(config.baseURL, config.url); + } + + // Hook up interceptors middleware + var chain = [dispatchRequest, undefined]; + var promise = Promise.resolve(config); + + this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) { + chain.unshift(interceptor.fulfilled, interceptor.rejected); + }); + + this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) { + chain.push(interceptor.fulfilled, interceptor.rejected); + }); + + while (chain.length) { + promise = promise.then(chain.shift(), chain.shift()); + } + + return promise; +}; + +// Provide aliases for supported request methods +utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) { + /*eslint func-names:0*/ + Axios.prototype[method] = function(url, config) { + return this.request(utils.merge(config || {}, { + method: method, + url: url + })); + }; +}); + +utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) { + /*eslint func-names:0*/ + Axios.prototype[method] = function(url, data, config) { + return this.request(utils.merge(config || {}, { + method: method, + url: url, + data: data + })); + }; +}); + +module.exports = Axios; + + +/***/ }), +/* 12 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var utils = __webpack_require__(0); + +function InterceptorManager() { + this.handlers = []; +} + +/** + * Add a new interceptor to the stack + * + * @param {Function} fulfilled The function to handle `then` for a `Promise` + * @param {Function} rejected The function to handle `reject` for a `Promise` + * + * @return {Number} An ID used to remove interceptor later + */ +InterceptorManager.prototype.use = function use(fulfilled, rejected) { + this.handlers.push({ + fulfilled: fulfilled, + rejected: rejected + }); + return this.handlers.length - 1; +}; + +/** + * Remove an interceptor from the stack + * + * @param {Number} id The ID that was returned by `use` + */ +InterceptorManager.prototype.eject = function eject(id) { + if (this.handlers[id]) { + this.handlers[id] = null; + } +}; + +/** + * Iterate over all the registered interceptors + * + * This method is particularly useful for skipping over any + * interceptors that may have become `null` calling `eject`. + * + * @param {Function} fn The function to call for each interceptor + */ +InterceptorManager.prototype.forEach = function forEach(fn) { + utils.forEach(this.handlers, function forEachHandler(h) { + if (h !== null) { + fn(h); + } + }); +}; + +module.exports = InterceptorManager; + + +/***/ }), +/* 13 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var utils = __webpack_require__(0); +var transformData = __webpack_require__(16); +var isCancel = __webpack_require__(4); +var defaults = __webpack_require__(1); + +/** + * Throws a `Cancel` if cancellation has been requested. + */ +function throwIfCancellationRequested(config) { + if (config.cancelToken) { + config.cancelToken.throwIfRequested(); + } +} + +/** + * Dispatch a request to the server using the configured adapter. + * + * @param {object} config The config that is to be used for the request + * @returns {Promise} The Promise to be fulfilled + */ +module.exports = function dispatchRequest(config) { + throwIfCancellationRequested(config); + + // Ensure headers exist + config.headers = config.headers || {}; + + // Transform request data + config.data = transformData( + config.data, + config.headers, + config.transformRequest + ); + + // Flatten headers + config.headers = utils.merge( + config.headers.common || {}, + config.headers[config.method] || {}, + config.headers || {} + ); + + utils.forEach( + ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], + function cleanHeaderConfig(method) { + delete config.headers[method]; + } + ); + + var adapter = config.adapter || defaults.adapter; + + return adapter(config).then(function onAdapterResolution(response) { + throwIfCancellationRequested(config); + + // Transform response data + response.data = transformData( + response.data, + response.headers, + config.transformResponse + ); + + return response; + }, function onAdapterRejection(reason) { + if (!isCancel(reason)) { + throwIfCancellationRequested(config); + + // Transform response data + if (reason && reason.response) { + reason.response.data = transformData( + reason.response.data, + reason.response.headers, + config.transformResponse + ); + } + } + + return Promise.reject(reason); + }); +}; + + +/***/ }), +/* 14 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * Update an Error with the specified config, error code, and response. + * + * @param {Error} error The error to update. + * @param {Object} config The config. + * @param {string} [code] The error code (for example, 'ECONNABORTED'). + @ @param {Object} [response] The response. + * @returns {Error} The error. + */ +module.exports = function enhanceError(error, config, code, response) { + error.config = config; + if (code) { + error.code = code; + } + error.response = response; + return error; +}; + + +/***/ }), +/* 15 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var createError = __webpack_require__(5); + +/** + * Resolve or reject a Promise based on response status. + * + * @param {Function} resolve A function that resolves the promise. + * @param {Function} reject A function that rejects the promise. + * @param {object} response The response. + */ +module.exports = function settle(resolve, reject, response) { + var validateStatus = response.config.validateStatus; + // Note: status is not exposed by XDomainRequest + if (!response.status || !validateStatus || validateStatus(response.status)) { + resolve(response); + } else { + reject(createError( + 'Request failed with status code ' + response.status, + response.config, + null, + response + )); + } +}; + + +/***/ }), +/* 16 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var utils = __webpack_require__(0); + +/** + * Transform the data for a request or a response + * + * @param {Object|String} data The data to be transformed + * @param {Array} headers The headers for the request or response + * @param {Array|Function} fns A single function or Array of functions + * @returns {*} The resulting transformed data + */ +module.exports = function transformData(data, headers, fns) { + /*eslint no-param-reassign:0*/ + utils.forEach(fns, function transform(fn) { + data = fn(data, headers); + }); + + return data; +}; + + +/***/ }), +/* 17 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +// btoa polyfill for IE<10 courtesy https://github.com/davidchambers/Base64.js + +var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='; + +function E() { + this.message = 'String contains an invalid character'; +} +E.prototype = new Error; +E.prototype.code = 5; +E.prototype.name = 'InvalidCharacterError'; + +function btoa(input) { + var str = String(input); + var output = ''; + for ( + // initialize result and counter + var block, charCode, idx = 0, map = chars; + // if the next str index does not exist: + // change the mapping table to "=" + // check if d has no fractional digits + str.charAt(idx | 0) || (map = '=', idx % 1); + // "8 - idx % 1 * 8" generates the sequence 2, 4, 6, 8 + output += map.charAt(63 & block >> 8 - idx % 1 * 8) + ) { + charCode = str.charCodeAt(idx += 3 / 4); + if (charCode > 0xFF) { + throw new E(); + } + block = block << 8 | charCode; + } + return output; +} + +module.exports = btoa; + + +/***/ }), +/* 18 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var utils = __webpack_require__(0); + +function encode(val) { + return encodeURIComponent(val). + replace(/%40/gi, '@'). + replace(/%3A/gi, ':'). + replace(/%24/g, '$'). + replace(/%2C/gi, ','). + replace(/%20/g, '+'). + replace(/%5B/gi, '['). + replace(/%5D/gi, ']'); +} + +/** + * Build a URL by appending params to the end + * + * @param {string} url The base of the url (e.g., http://www.google.com) + * @param {object} [params] The params to be appended + * @returns {string} The formatted url + */ +module.exports = function buildURL(url, params, paramsSerializer) { + /*eslint no-param-reassign:0*/ + if (!params) { + return url; + } + + var serializedParams; + if (paramsSerializer) { + serializedParams = paramsSerializer(params); + } else if (utils.isURLSearchParams(params)) { + serializedParams = params.toString(); + } else { + var parts = []; + + utils.forEach(params, function serialize(val, key) { + if (val === null || typeof val === 'undefined') { + return; + } + + if (utils.isArray(val)) { + key = key + '[]'; + } + + if (!utils.isArray(val)) { + val = [val]; + } + + utils.forEach(val, function parseValue(v) { + if (utils.isDate(v)) { + v = v.toISOString(); + } else if (utils.isObject(v)) { + v = JSON.stringify(v); + } + parts.push(encode(key) + '=' + encode(v)); + }); + }); + + serializedParams = parts.join('&'); + } + + if (serializedParams) { + url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams; + } + + return url; +}; + + +/***/ }), +/* 19 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * Creates a new URL by combining the specified URLs + * + * @param {string} baseURL The base URL + * @param {string} relativeURL The relative URL + * @returns {string} The combined URL + */ +module.exports = function combineURLs(baseURL, relativeURL) { + return relativeURL + ? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '') + : baseURL; +}; + + +/***/ }), +/* 20 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var utils = __webpack_require__(0); + +module.exports = ( + utils.isStandardBrowserEnv() ? + + // Standard browser envs support document.cookie + (function standardBrowserEnv() { + return { + write: function write(name, value, expires, path, domain, secure) { + var cookie = []; + cookie.push(name + '=' + encodeURIComponent(value)); + + if (utils.isNumber(expires)) { + cookie.push('expires=' + new Date(expires).toGMTString()); + } + + if (utils.isString(path)) { + cookie.push('path=' + path); + } + + if (utils.isString(domain)) { + cookie.push('domain=' + domain); + } + + if (secure === true) { + cookie.push('secure'); + } + + document.cookie = cookie.join('; '); + }, + + read: function read(name) { + var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)')); + return (match ? decodeURIComponent(match[3]) : null); + }, + + remove: function remove(name) { + this.write(name, '', Date.now() - 86400000); + } + }; + })() : + + // Non standard browser env (web workers, react-native) lack needed support. + (function nonStandardBrowserEnv() { + return { + write: function write() {}, + read: function read() { return null; }, + remove: function remove() {} + }; + })() +); + + +/***/ }), +/* 21 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * Determines whether the specified URL is absolute + * + * @param {string} url The URL to test + * @returns {boolean} True if the specified URL is absolute, otherwise false + */ +module.exports = function isAbsoluteURL(url) { + // A URL is considered absolute if it begins with "://" or "//" (protocol-relative URL). + // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed + // by any combination of letters, digits, plus, period, or hyphen. + return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url); +}; + + +/***/ }), +/* 22 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var utils = __webpack_require__(0); + +module.exports = ( + utils.isStandardBrowserEnv() ? + + // Standard browser envs have full support of the APIs needed to test + // whether the request URL is of the same origin as current location. + (function standardBrowserEnv() { + var msie = /(msie|trident)/i.test(navigator.userAgent); + var urlParsingNode = document.createElement('a'); + var originURL; + + /** + * Parse a URL to discover it's components + * + * @param {String} url The URL to be parsed + * @returns {Object} + */ + function resolveURL(url) { + var href = url; + + if (msie) { + // IE needs attribute set twice to normalize properties + urlParsingNode.setAttribute('href', href); + href = urlParsingNode.href; + } + + urlParsingNode.setAttribute('href', href); + + // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils + return { + href: urlParsingNode.href, + protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '', + host: urlParsingNode.host, + search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '', + hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '', + hostname: urlParsingNode.hostname, + port: urlParsingNode.port, + pathname: (urlParsingNode.pathname.charAt(0) === '/') ? + urlParsingNode.pathname : + '/' + urlParsingNode.pathname + }; + } + + originURL = resolveURL(window.location.href); + + /** + * Determine if a URL shares the same origin as the current location + * + * @param {String} requestURL The URL to test + * @returns {boolean} True if URL shares the same origin, otherwise false + */ + return function isURLSameOrigin(requestURL) { + var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL; + return (parsed.protocol === originURL.protocol && + parsed.host === originURL.host); + }; + })() : + + // Non standard browser envs (web workers, react-native) lack needed support. + (function nonStandardBrowserEnv() { + return function isURLSameOrigin() { + return true; + }; + })() +); + + +/***/ }), +/* 23 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var utils = __webpack_require__(0); + +module.exports = function normalizeHeaderName(headers, normalizedName) { + utils.forEach(headers, function processHeader(value, name) { + if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) { + headers[normalizedName] = value; + delete headers[name]; + } + }); +}; + + +/***/ }), +/* 24 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var utils = __webpack_require__(0); + +/** + * Parse headers into an object + * + * ``` + * Date: Wed, 27 Aug 2014 08:58:49 GMT + * Content-Type: application/json + * Connection: keep-alive + * Transfer-Encoding: chunked + * ``` + * + * @param {String} headers Headers needing to be parsed + * @returns {Object} Headers parsed into an object + */ +module.exports = function parseHeaders(headers) { + var parsed = {}; + var key; + var val; + var i; + + if (!headers) { return parsed; } + + utils.forEach(headers.split('\n'), function parser(line) { + i = line.indexOf(':'); + key = utils.trim(line.substr(0, i)).toLowerCase(); + val = utils.trim(line.substr(i + 1)); + + if (key) { + parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val; + } + }); + + return parsed; +}; + + +/***/ }), +/* 25 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * Syntactic sugar for invoking a function and expanding an array for arguments. + * + * Common use case would be to use `Function.prototype.apply`. + * + * ```js + * function f(x, y, z) {} + * var args = [1, 2, 3]; + * f.apply(null, args); + * ``` + * + * With `spread` this example can be re-written. + * + * ```js + * spread(function(x, y, z) {})([1, 2, 3]); + * ``` + * + * @param {Function} callback + * @returns {Function} + */ +module.exports = function spread(callback) { + return function wrap(arr) { + return callback.apply(null, arr); + }; +}; + + +/***/ }), +/* 26 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _axios = __webpack_require__(8); + +var _axios2 = _interopRequireDefault(_axios); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +// *************** Componente pesponsável pelo esqueleto da página ************ + +var Page = React.createClass({ + displayName: "Page", + + + render: function () { + return React.createElement( + "page", + null, + React.createElement(Header, null), + React.createElement(SubHeader, null), + React.createElement( + "div", + { className: "content" }, + React.createElement(ContentFiltro, null), + React.createElement(ContentCards, null) + ) + ); + } +}); + +// *************** Componente pesponsável pelo header ************ + +var Header = React.createClass({ + displayName: "Header", + + render: function () { + return React.createElement( + "div", + { className: "header" }, + React.createElement( + "div", + { className: "header-border" }, + React.createElement("img", { className: "header__logo", src: "images/car.png" }), + React.createElement( + "div", + null, + React.createElement("img", { className: "header__bag", src: "images/bag.png" }), + React.createElement( + "p", + null, + "3" + ) + ) + ) + ); + } +}); + +// *************** Componente pesponsável pelo header ************ + +var SubHeader = React.createClass({ + displayName: "SubHeader", + + getInitialState: function () { + return { + click: true + }; + }, + dropBlock: function () { + this.setState({ + click: !this.state.click + }); + }, + + render: function () { + var dropMenus = this.state.click ? 'dropmenuBlock' : 'dropmenuNone'; + var dropClass = this.state.click ? 'dropdownNone' : 'dropdownBlock'; + return React.createElement( + "div", + null, + React.createElement( + "div", + { className: "subHeader" }, + React.createElement( + "div", + { className: "subHeader__title" }, + React.createElement( + "h1", + null, + "VESTIDOS" + ) + ), + React.createElement( + "div", + { className: "subHeader__tab" }, + React.createElement( + "form", + { action: "", className: "subHeader__form" }, + React.createElement( + "select", + { name: "", id: "", className: "subHeader__select" }, + React.createElement( + "option", + { value: "", selected: true }, + "Ordenar Por:" + ), + React.createElement( + "option", + { value: "recentes" }, + "Mais Recentes" + ), + React.createElement( + "option", + { value: "menor" }, + "Menor Pre\xE7o" + ), + React.createElement( + "option", + { value: "maior" }, + "Maior Pre\xE7o" + ) + ) + ) + ) + ), + React.createElement( + "div", + { className: "subHeader__mobile" }, + React.createElement( + "button", + { className: "subHeader__btnMobile", onClick: this.dropBlock }, + "Filtrar" + ), + React.createElement( + "button", + { className: "subHeader__btnMobile" }, + "Ordenar" + ), + React.createElement( + "div", + { className: "subHeader__selectMobile" }, + React.createElement( + "div", + { className: dropClass }, + React.createElement(MenuCor, null), + React.createElement(MenuTamanho, null), + React.createElement(MenuPreco, null), + React.createElement( + "button", + { className: "subHeader__selectMobile__btnMobileSelect__first" }, + "APLICAR" + ), + React.createElement( + "button", + { className: "subHeader__selectMobile__btnMobileSelect" }, + "LIMPAR" + ) + ) + ) + ) + ); + } +}); + +// *************** Componente pesponsável pelo filtro de cor do menu da versão mobile ************ + +var MenuCor = React.createClass({ + displayName: "MenuCor", + + getInitialState: function () { + return { + click: true + }; + }, + dropMenuCor: function () { + this.setState({ + click: !this.state.click + }); + }, + + render: function () { + var dropMenuCor = this.state.click ? 'dropmenuBlock' : 'dropmenuNone'; + return React.createElement( + "div", + null, + React.createElement( + "p", + { onClick: this.dropMenuCor }, + "CORES ", + React.createElement( + "span", + { className: "traco" }, + "-" + ) + ), + React.createElement( + "div", + { className: dropMenuCor }, + React.createElement( + "div", + null, + React.createElement( + "h1", + { className: "cores" }, + "CORES" + ), + React.createElement( + "div", + null, + React.createElement( + "form", + { action: "", method: "", className: "content__Filtro__form" }, + React.createElement( + "ul", + null, + React.createElement( + "li", + null, + React.createElement("input", { type: "checkbox", name: "cores", value: "cores", id: "amarelom" }), + React.createElement( + "label", + { htmlFor: "amarelom" }, + React.createElement("span", { className: "labelSpan" }), + "Amarelo" + ) + ), + React.createElement( + "li", + null, + React.createElement("input", { type: "checkbox", name: "cores", value: "cores", id: "azulm" }), + React.createElement( + "label", + { htmlFor: "azulm" }, + React.createElement("span", { className: "labelSpan" }), + "Azul" + ) + ), + React.createElement( + "li", + null, + React.createElement("input", { type: "checkbox", name: "cores", value: "cores", id: "brancom" }), + React.createElement( + "label", + { htmlFor: "brancom" }, + React.createElement("span", { className: "labelSpan" }), + "Branco" + ) + ), + React.createElement( + "li", + null, + React.createElement("input", { type: "checkbox", name: "cores", value: "cores", id: "cinzam" }), + React.createElement( + "label", + { htmlFor: "cinzam" }, + React.createElement("span", { className: "labelSpan" }), + "Cinza" + ) + ), + React.createElement( + "li", + null, + React.createElement("input", { type: "checkbox", name: "cores", value: "cores", id: "laranjam" }), + React.createElement( + "label", + { htmlFor: "laranjam" }, + React.createElement("span", { className: "labelSpan" }), + "Laranja" + ) + ), + React.createElement( + "li", + null, + React.createElement("input", { type: "checkbox", name: "cores", value: "cores", id: "verdem" }), + React.createElement( + "label", + { htmlFor: "verdem" }, + React.createElement("span", { className: "labelSpan" }), + "Verde" + ) + ), + React.createElement( + "li", + null, + React.createElement("input", { type: "checkbox", name: "cores", value: "cores", id: "vermelhom" }), + React.createElement( + "label", + { htmlFor: "vermelhom" }, + React.createElement("span", { className: "labelSpan" }), + "Vermelho" + ) + ), + React.createElement( + "li", + null, + React.createElement("input", { type: "checkbox", name: "cores", value: "cores", id: "rosam" }), + React.createElement( + "label", + { htmlFor: "rosam" }, + React.createElement("span", { className: "labelSpan" }), + "Rosa" + ) + ), + React.createElement( + "li", + null, + React.createElement("input", { type: "checkbox", name: "cores", value: "cores", id: "vinhom" }), + React.createElement( + "label", + { htmlFor: "vinhom" }, + React.createElement("span", { className: "labelSpan" }), + "Vinho" + ) + ) + ) + ) + ) + ) + ) + ); + } +}); + +// *************** Componente pesponsável pelo filtro de tamanho do menu da versão mobile ************ + +var MenuTamanho = React.createClass({ + displayName: "MenuTamanho", + + getInitialState: function () { + return { + click: true + }; + }, + dropMenuTam: function () { + this.setState({ + click: !this.state.click + }); + }, + + render: function () { + var dropMenuTam = this.state.click ? 'dropmenuBlock' : 'dropmenuNone'; + return React.createElement( + "div", + null, + React.createElement( + "p", + { onClick: this.dropMenuTam }, + "TAMANHO ", + React.createElement( + "span", + { className: "traco" }, + "-" + ) + ), + React.createElement( + "div", + { className: dropMenuTam }, + React.createElement(ContentTamanhos, null) + ) + ); + } +}); + +// *************** Componente pesponsável pelo filtro de preço do menu da versão mobile ************ + +var MenuPreco = React.createClass({ + displayName: "MenuPreco", + + getInitialState: function () { + return { + click: true + }; + }, + dropMenuPreco: function () { + this.setState({ + click: !this.state.click + }); + }, + + render: function () { + var dropMenuPreco = this.state.click ? 'dropmenuBlock' : 'dropmenuNone'; + return React.createElement( + "div", + null, + React.createElement( + "p", + { onClick: this.dropMenuPreco }, + "PRECOS ", + React.createElement( + "span", + { className: "traco" }, + "-" + ) + ), + React.createElement( + "div", + { className: dropMenuPreco }, + React.createElement( + "div", + null, + React.createElement( + "h1", + { className: "preco" }, + "FAIXA DE PRE\xC7O" + ), + React.createElement( + "div", + null, + React.createElement( + "form", + { action: "", method: "", className: "content__Filtro__form" }, + React.createElement( + "ul", + null, + React.createElement( + "li", + null, + React.createElement("input", { type: "checkbox", name: "precos", value: "preco", id: "de0m" }), + React.createElement( + "label", + { htmlFor: "de0m" }, + React.createElement("span", { className: "labelSpan" }), + "de R$ 0 at\xE9 R$ 50" + ) + ), + React.createElement( + "li", + null, + React.createElement("input", { type: "checkbox", name: "precos", value: "preco", id: "de51m" }), + React.createElement( + "label", + { htmlFor: "de51m" }, + React.createElement("span", { className: "labelSpan" }), + "de R$ 51 at\xE9 R$ 150" + ) + ), + React.createElement( + "li", + null, + React.createElement("input", { type: "checkbox", name: "precos", value: "preco", id: "de151m" }), + React.createElement( + "label", + { htmlFor: "de151m" }, + React.createElement("span", { className: "labelSpan" }), + "de R$ 151 at\xE9 R$ 300" + ) + ), + React.createElement( + "li", + null, + React.createElement("input", { type: "checkbox", name: "precos", value: "preco", id: "de301m" }), + React.createElement( + "label", + { htmlFor: "de301m" }, + React.createElement("span", { className: "labelSpan" }), + "de R$ 301 at\xE9 R$ 500" + ) + ), + React.createElement( + "li", + null, + React.createElement("input", { type: "checkbox", name: "precos", value: "preco", id: "de501m" }), + React.createElement( + "label", + { htmlFor: "de501m" }, + React.createElement("span", { className: "labelSpan" }), + "a partir de R$ 501" + ) + ) + ) + ) + ) + ) + ) + ); + } +}); + +// *************** Componente pesponsável pelo esquelo do menu esquerdo da página (filtro) versão desktop ************ + +var ContentFiltro = React.createClass({ + displayName: "ContentFiltro", + + render: function () { + return React.createElement( + "div", + { className: "content__Filtro" }, + React.createElement(ContentCores, null), + React.createElement(ContentTamanhos, null), + React.createElement(ContentPrecos, null) + ); + } +}); + +// *************** Componente pesponsável pelo conteudo lateral esquerdo da página (Cores) versão desktop ************ + +var ContentCores = React.createClass({ + displayName: "ContentCores", + + + getInitialState: function () { + return { + click: true + }; + }, + + dropBlock: function () { + this.setState({ + click: !this.state.click + }); + }, + + render: function () { + var dropClass = this.state.click ? 'dropdownNone' : 'dropdownBlock'; + var arrowClass = this.state.click ? 'arrow' : 'arrow_down'; + return React.createElement( + "div", + null, + React.createElement( + "h1", + { className: "cores" }, + "CORES" + ), + React.createElement( + "div", + null, + React.createElement( + "form", + { action: "", method: "", className: "content__Filtro__form" }, + React.createElement( + "ul", + null, + React.createElement( + "li", + null, + React.createElement("input", { type: "checkbox", name: "cores", value: "amarelo", id: "amarelo" }), + React.createElement( + "label", + { htmlFor: "amarelo" }, + React.createElement("span", { className: "labelSpan" }), + "Amarelo" + ) + ), + React.createElement( + "li", + null, + React.createElement("input", { type: "checkbox", name: "cores", value: "azul", id: "azul" }), + React.createElement( + "label", + { htmlFor: "azul" }, + React.createElement("span", { className: "labelSpan" }), + "Azul" + ) + ), + React.createElement( + "li", + null, + React.createElement("input", { type: "checkbox", name: "cores", value: "branco", id: "branco" }), + React.createElement( + "label", + { htmlFor: "branco" }, + React.createElement("span", { className: "labelSpan" }), + "Branco" + ) + ), + React.createElement( + "li", + null, + React.createElement("input", { type: "checkbox", name: "cores", value: "cinza", id: "cinza" }), + React.createElement( + "label", + { htmlFor: "cinza" }, + React.createElement("span", { className: "labelSpan" }), + "Cinza" + ) + ), + React.createElement( + "li", + null, + React.createElement("input", { type: "checkbox", name: "cores", value: "laranja", id: "laranja" }), + React.createElement( + "label", + { htmlFor: "laranja" }, + React.createElement("span", { className: "labelSpan" }), + "Laranja" + ) + ) + ), + React.createElement( + "div", + { className: "dropdown", className: dropClass }, + React.createElement( + "ul", + null, + React.createElement( + "li", + null, + React.createElement("input", { type: "checkbox", name: "cores", value: "verde", id: "verde" }), + React.createElement( + "label", + { htmlFor: "verde" }, + React.createElement("span", { className: "labelSpan" }), + "Verde" + ) + ), + React.createElement( + "li", + null, + React.createElement("input", { type: "checkbox", name: "cores", value: "vermelho", id: "vermelho" }), + React.createElement( + "label", + { htmlFor: "vermelho" }, + React.createElement("span", { className: "labelSpan" }), + "Vermelho" + ) + ), + React.createElement( + "li", + null, + React.createElement("input", { type: "checkbox", name: "cores", value: "rosa", id: "rosa" }), + React.createElement( + "label", + { htmlFor: "rosa" }, + React.createElement("span", { className: "labelSpan" }), + "Rosa" + ) + ), + React.createElement( + "li", + null, + React.createElement("input", { type: "checkbox", name: "cores", value: "vinho", id: "vinho" }), + React.createElement( + "label", + { htmlFor: "vinho" }, + React.createElement("span", { className: "labelSpan" }), + "Vinho" + ) + ) + ) + ), + React.createElement( + "p", + { onClick: this.dropBlock }, + "Ver todas as cores" + ), + React.createElement( + "span", + { className: arrowClass }, + " \u276F" + ) + ) + ) + ); + } +}); + +// *************** Componente pesponsável pelo conteudo lateral esquerdo da página (Tamanhos) versão desktop *********** + +var ContentTamanhos = React.createClass({ + displayName: "ContentTamanhos", + + render: function () { + return React.createElement( + "div", + null, + React.createElement( + "h1", + { className: "tamanho" }, + "TAMANHOS" + ), + React.createElement( + "div", + { className: "content__Filtro__box" }, + React.createElement( + "a", + { href: "#" }, + "P" + ), + React.createElement( + "a", + { href: "#" }, + "M" + ), + React.createElement( + "a", + { href: "#" }, + "G" + ), + React.createElement( + "a", + { href: "#" }, + "GG" + ), + React.createElement( + "a", + { href: "#" }, + "U" + ), + React.createElement( + "a", + { href: "#" }, + "36" + ), + React.createElement( + "a", + { href: "#" }, + "38" + ), + React.createElement( + "a", + { href: "#" }, + "40" + ), + React.createElement( + "a", + { href: "#" }, + "42" + ), + React.createElement( + "a", + { href: "#" }, + "44" + ), + React.createElement( + "a", + { href: "#" }, + "46" + ) + ) + ); + } +}); + +// *************** Componente pesponsável pelo conteudo lateral esquerdo da página (Preco) versão desktop *********** + +var ContentPrecos = React.createClass({ + displayName: "ContentPrecos", + + + render: function () { + return React.createElement( + "div", + null, + React.createElement( + "h1", + { className: "preco" }, + "FAIXA DE PRE\xC7O" + ), + React.createElement( + "div", + null, + React.createElement( + "form", + { action: "", method: "", className: "content__Filtro__form" }, + React.createElement( + "ul", + null, + React.createElement( + "li", + null, + React.createElement("input", { type: "checkbox", name: "precos", value: "preco", id: "de0" }), + React.createElement( + "label", + { htmlFor: "de0" }, + React.createElement("span", { className: "labelSpan" }), + "de R$ 0 at\xE9 R$ 50" + ) + ), + React.createElement( + "li", + null, + React.createElement("input", { type: "checkbox", name: "precos", value: "preco", id: "de51" }), + React.createElement( + "label", + { htmlFor: "de51" }, + React.createElement("span", { className: "labelSpan" }), + "de R$ 51 at\xE9 R$ 150" + ) + ), + React.createElement( + "li", + null, + React.createElement("input", { type: "checkbox", name: "precos", value: "preco", id: "de151" }), + React.createElement( + "label", + { htmlFor: "de151" }, + React.createElement("span", { className: "labelSpan" }), + "de R$ 151 at\xE9 R$ 300" + ) + ), + React.createElement( + "li", + null, + React.createElement("input", { type: "checkbox", name: "precos", value: "preco", id: "de301" }), + React.createElement( + "label", + { htmlFor: "de301" }, + React.createElement("span", { className: "labelSpan" }), + "de R$ 301 at\xE9 R$ 500" + ) + ), + React.createElement( + "li", + null, + React.createElement("input", { type: "checkbox", name: "precos", value: "preco", id: "de501" }), + React.createElement( + "label", + { htmlFor: "de501" }, + React.createElement("span", { className: "labelSpan" }), + "a partir de R$ 501" + ) + ) + ) + ) + ) + ); + } +}); + +// *************** Componente pesponsável pelo conteudo com os cards da página ************ + +var ContentCards = React.createClass({ + displayName: "ContentCards", + + getInitialState: function () { + return { + images: [] + }; + }, + + componentDidMount: function () { + var _this = this; + this.serverRequest = _axios2.default.get("https://api.myjson.com/bins/1bj13l").then(function (result) { + _this.setState({ + images: result.data.images + }); + }).catch(error => {}); + }, + + componentWillUnmount: function () { + this.serverRequest.abort(); + }, + + render: function () { + return React.createElement( + "div", + { className: "content__Card" }, + React.createElement( + "ul", + null, + this.state.images.map(function (image) { + return React.createElement( + "li", + null, + React.createElement( + "a", + { href: "producao.html" }, + React.createElement( + "div", + null, + React.createElement("img", { src: "images/" + image.name + ".png", alt: image.name, className: "content__Card__img" }) + ), + React.createElement( + "div", + { className: "content__Card__block" }, + React.createElement( + "p", + { className: "content__Card__block__title" }, + image.messenger + ), + React.createElement( + "div", + { className: "content__Card__block__preco" }, + React.createElement( + "p", + { className: "content__Card__block__preco__total" }, + React.createElement( + "span", + { className: "content__Card__block__promo" }, + " ", + image.promo + ), + " R$ ", + image.preco + ), + React.createElement( + "p", + { className: "content__Card__block__preco__parcela" }, + "at\xE9 5x de R$", + image.preco / 5 + ) + ), + React.createElement("img", { src: "../../images/car.png", alt: "car", onClick: "setCar()" }) + ) + ) + ); + }) + ), + React.createElement( + "div", + { className: "content__Card__mais" }, + React.createElement( + "a", + { href: "producao.html" }, + "CARREGAR MAIS" + ) + ) + ); + } +}); + +ReactDOM.render(React.createElement(Page, null), document.getElementById('page')); + +/***/ }), +/* 27 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.byteLength = byteLength +exports.toByteArray = toByteArray +exports.fromByteArray = fromByteArray + +var lookup = [] +var revLookup = [] +var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array + +var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' +for (var i = 0, len = code.length; i < len; ++i) { + lookup[i] = code[i] + revLookup[code.charCodeAt(i)] = i +} + +revLookup['-'.charCodeAt(0)] = 62 +revLookup['_'.charCodeAt(0)] = 63 + +function placeHoldersCount (b64) { + var len = b64.length + if (len % 4 > 0) { + throw new Error('Invalid string. Length must be a multiple of 4') + } + + // the number of equal signs (place holders) + // if there are two placeholders, than the two characters before it + // represent one byte + // if there is only one, then the three characters before it represent 2 bytes + // this is just a cheap hack to not do indexOf twice + return b64[len - 2] === '=' ? 2 : b64[len - 1] === '=' ? 1 : 0 +} + +function byteLength (b64) { + // base64 is 4/3 + up to two characters of the original data + return b64.length * 3 / 4 - placeHoldersCount(b64) +} + +function toByteArray (b64) { + var i, j, l, tmp, placeHolders, arr + var len = b64.length + placeHolders = placeHoldersCount(b64) + + arr = new Arr(len * 3 / 4 - placeHolders) + + // if there are placeholders, only get up to the last complete 4 chars + l = placeHolders > 0 ? len - 4 : len + + var L = 0 + + for (i = 0, j = 0; i < l; i += 4, j += 3) { + tmp = (revLookup[b64.charCodeAt(i)] << 18) | (revLookup[b64.charCodeAt(i + 1)] << 12) | (revLookup[b64.charCodeAt(i + 2)] << 6) | revLookup[b64.charCodeAt(i + 3)] + arr[L++] = (tmp >> 16) & 0xFF + arr[L++] = (tmp >> 8) & 0xFF + arr[L++] = tmp & 0xFF + } + + if (placeHolders === 2) { + tmp = (revLookup[b64.charCodeAt(i)] << 2) | (revLookup[b64.charCodeAt(i + 1)] >> 4) + arr[L++] = tmp & 0xFF + } else if (placeHolders === 1) { + tmp = (revLookup[b64.charCodeAt(i)] << 10) | (revLookup[b64.charCodeAt(i + 1)] << 4) | (revLookup[b64.charCodeAt(i + 2)] >> 2) + arr[L++] = (tmp >> 8) & 0xFF + arr[L++] = tmp & 0xFF + } + + return arr +} + +function tripletToBase64 (num) { + return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F] +} + +function encodeChunk (uint8, start, end) { + var tmp + var output = [] + for (var i = start; i < end; i += 3) { + tmp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2]) + output.push(tripletToBase64(tmp)) + } + return output.join('') +} + +function fromByteArray (uint8) { + var tmp + var len = uint8.length + var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes + var output = '' + var parts = [] + var maxChunkLength = 16383 // must be multiple of 3 + + // go through the array every three bytes, we'll deal with trailing stuff later + for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) { + parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength))) + } + + // pad the end with zeros, but make sure to not forget the extra bytes + if (extraBytes === 1) { + tmp = uint8[len - 1] + output += lookup[tmp >> 2] + output += lookup[(tmp << 4) & 0x3F] + output += '==' + } else if (extraBytes === 2) { + tmp = (uint8[len - 2] << 8) + (uint8[len - 1]) + output += lookup[tmp >> 10] + output += lookup[(tmp >> 4) & 0x3F] + output += lookup[(tmp << 2) & 0x3F] + output += '=' + } + + parts.push(output) + + return parts.join('') +} + + +/***/ }), +/* 28 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(global) {/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */ +/* eslint-disable no-proto */ + + + +var base64 = __webpack_require__(27) +var ieee754 = __webpack_require__(29) +var isArray = __webpack_require__(30) + +exports.Buffer = Buffer +exports.SlowBuffer = SlowBuffer +exports.INSPECT_MAX_BYTES = 50 + +/** + * If `Buffer.TYPED_ARRAY_SUPPORT`: + * === true Use Uint8Array implementation (fastest) + * === false Use Object implementation (most compatible, even IE6) + * + * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+, + * Opera 11.6+, iOS 4.2+. + * + * Due to various browser bugs, sometimes the Object implementation will be used even + * when the browser supports typed arrays. + * + * Note: + * + * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances, + * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438. + * + * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function. + * + * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of + * incorrect length in some situations. + + * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they + * get the Object implementation, which is slower but behaves correctly. + */ +Buffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined + ? global.TYPED_ARRAY_SUPPORT + : typedArraySupport() + +/* + * Export kMaxLength after typed array support is determined. + */ +exports.kMaxLength = kMaxLength() + +function typedArraySupport () { + try { + var arr = new Uint8Array(1) + arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }} + return arr.foo() === 42 && // typed array instances can be augmented + typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray` + arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray` + } catch (e) { + return false + } +} + +function kMaxLength () { + return Buffer.TYPED_ARRAY_SUPPORT + ? 0x7fffffff + : 0x3fffffff +} + +function createBuffer (that, length) { + if (kMaxLength() < length) { + throw new RangeError('Invalid typed array length') + } + if (Buffer.TYPED_ARRAY_SUPPORT) { + // Return an augmented `Uint8Array` instance, for best performance + that = new Uint8Array(length) + that.__proto__ = Buffer.prototype + } else { + // Fallback: Return an object instance of the Buffer class + if (that === null) { + that = new Buffer(length) + } + that.length = length + } + + return that +} + +/** + * The Buffer constructor returns instances of `Uint8Array` that have their + * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of + * `Uint8Array`, so the returned instances will have all the node `Buffer` methods + * and the `Uint8Array` methods. Square bracket notation works as expected -- it + * returns a single octet. + * + * The `Uint8Array` prototype remains unmodified. + */ + +function Buffer (arg, encodingOrOffset, length) { + if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) { + return new Buffer(arg, encodingOrOffset, length) + } + + // Common case. + if (typeof arg === 'number') { + if (typeof encodingOrOffset === 'string') { + throw new Error( + 'If encoding is specified then the first argument must be a string' + ) + } + return allocUnsafe(this, arg) + } + return from(this, arg, encodingOrOffset, length) +} + +Buffer.poolSize = 8192 // not used by this implementation + +// TODO: Legacy, not needed anymore. Remove in next major version. +Buffer._augment = function (arr) { + arr.__proto__ = Buffer.prototype + return arr +} + +function from (that, value, encodingOrOffset, length) { + if (typeof value === 'number') { + throw new TypeError('"value" argument must not be a number') + } + + if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) { + return fromArrayBuffer(that, value, encodingOrOffset, length) + } + + if (typeof value === 'string') { + return fromString(that, value, encodingOrOffset) + } + + return fromObject(that, value) +} + +/** + * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError + * if value is a number. + * Buffer.from(str[, encoding]) + * Buffer.from(array) + * Buffer.from(buffer) + * Buffer.from(arrayBuffer[, byteOffset[, length]]) + **/ +Buffer.from = function (value, encodingOrOffset, length) { + return from(null, value, encodingOrOffset, length) +} + +if (Buffer.TYPED_ARRAY_SUPPORT) { + Buffer.prototype.__proto__ = Uint8Array.prototype + Buffer.__proto__ = Uint8Array + if (typeof Symbol !== 'undefined' && Symbol.species && + Buffer[Symbol.species] === Buffer) { + // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97 + Object.defineProperty(Buffer, Symbol.species, { + value: null, + configurable: true + }) + } +} + +function assertSize (size) { + if (typeof size !== 'number') { + throw new TypeError('"size" argument must be a number') + } else if (size < 0) { + throw new RangeError('"size" argument must not be negative') + } +} + +function alloc (that, size, fill, encoding) { + assertSize(size) + if (size <= 0) { + return createBuffer(that, size) + } + if (fill !== undefined) { + // Only pay attention to encoding if it's a string. This + // prevents accidentally sending in a number that would + // be interpretted as a start offset. + return typeof encoding === 'string' + ? createBuffer(that, size).fill(fill, encoding) + : createBuffer(that, size).fill(fill) + } + return createBuffer(that, size) +} + +/** + * Creates a new filled Buffer instance. + * alloc(size[, fill[, encoding]]) + **/ +Buffer.alloc = function (size, fill, encoding) { + return alloc(null, size, fill, encoding) +} + +function allocUnsafe (that, size) { + assertSize(size) + that = createBuffer(that, size < 0 ? 0 : checked(size) | 0) + if (!Buffer.TYPED_ARRAY_SUPPORT) { + for (var i = 0; i < size; ++i) { + that[i] = 0 + } + } + return that +} + +/** + * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance. + * */ +Buffer.allocUnsafe = function (size) { + return allocUnsafe(null, size) +} +/** + * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. + */ +Buffer.allocUnsafeSlow = function (size) { + return allocUnsafe(null, size) +} + +function fromString (that, string, encoding) { + if (typeof encoding !== 'string' || encoding === '') { + encoding = 'utf8' + } + + if (!Buffer.isEncoding(encoding)) { + throw new TypeError('"encoding" must be a valid string encoding') + } + + var length = byteLength(string, encoding) | 0 + that = createBuffer(that, length) + + var actual = that.write(string, encoding) + + if (actual !== length) { + // Writing a hex string, for example, that contains invalid characters will + // cause everything after the first invalid character to be ignored. (e.g. + // 'abxxcd' will be treated as 'ab') + that = that.slice(0, actual) + } + + return that +} + +function fromArrayLike (that, array) { + var length = array.length < 0 ? 0 : checked(array.length) | 0 + that = createBuffer(that, length) + for (var i = 0; i < length; i += 1) { + that[i] = array[i] & 255 + } + return that +} + +function fromArrayBuffer (that, array, byteOffset, length) { + array.byteLength // this throws if `array` is not a valid ArrayBuffer + + if (byteOffset < 0 || array.byteLength < byteOffset) { + throw new RangeError('\'offset\' is out of bounds') + } + + if (array.byteLength < byteOffset + (length || 0)) { + throw new RangeError('\'length\' is out of bounds') + } + + if (byteOffset === undefined && length === undefined) { + array = new Uint8Array(array) + } else if (length === undefined) { + array = new Uint8Array(array, byteOffset) + } else { + array = new Uint8Array(array, byteOffset, length) + } + + if (Buffer.TYPED_ARRAY_SUPPORT) { + // Return an augmented `Uint8Array` instance, for best performance + that = array + that.__proto__ = Buffer.prototype + } else { + // Fallback: Return an object instance of the Buffer class + that = fromArrayLike(that, array) + } + return that +} + +function fromObject (that, obj) { + if (Buffer.isBuffer(obj)) { + var len = checked(obj.length) | 0 + that = createBuffer(that, len) + + if (that.length === 0) { + return that + } + + obj.copy(that, 0, 0, len) + return that + } + + if (obj) { + if ((typeof ArrayBuffer !== 'undefined' && + obj.buffer instanceof ArrayBuffer) || 'length' in obj) { + if (typeof obj.length !== 'number' || isnan(obj.length)) { + return createBuffer(that, 0) + } + return fromArrayLike(that, obj) + } + + if (obj.type === 'Buffer' && isArray(obj.data)) { + return fromArrayLike(that, obj.data) + } + } + + throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.') +} + +function checked (length) { + // Note: cannot use `length < kMaxLength()` here because that fails when + // length is NaN (which is otherwise coerced to zero.) + if (length >= kMaxLength()) { + throw new RangeError('Attempt to allocate Buffer larger than maximum ' + + 'size: 0x' + kMaxLength().toString(16) + ' bytes') + } + return length | 0 +} + +function SlowBuffer (length) { + if (+length != length) { // eslint-disable-line eqeqeq + length = 0 + } + return Buffer.alloc(+length) +} + +Buffer.isBuffer = function isBuffer (b) { + return !!(b != null && b._isBuffer) +} + +Buffer.compare = function compare (a, b) { + if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) { + throw new TypeError('Arguments must be Buffers') + } + + if (a === b) return 0 + + var x = a.length + var y = b.length + + for (var i = 0, len = Math.min(x, y); i < len; ++i) { + if (a[i] !== b[i]) { + x = a[i] + y = b[i] + break + } + } + + if (x < y) return -1 + if (y < x) return 1 + return 0 +} + +Buffer.isEncoding = function isEncoding (encoding) { + switch (String(encoding).toLowerCase()) { + case 'hex': + case 'utf8': + case 'utf-8': + case 'ascii': + case 'latin1': + case 'binary': + case 'base64': + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return true + default: + return false + } +} + +Buffer.concat = function concat (list, length) { + if (!isArray(list)) { + throw new TypeError('"list" argument must be an Array of Buffers') + } + + if (list.length === 0) { + return Buffer.alloc(0) + } + + var i + if (length === undefined) { + length = 0 + for (i = 0; i < list.length; ++i) { + length += list[i].length + } + } + + var buffer = Buffer.allocUnsafe(length) + var pos = 0 + for (i = 0; i < list.length; ++i) { + var buf = list[i] + if (!Buffer.isBuffer(buf)) { + throw new TypeError('"list" argument must be an Array of Buffers') + } + buf.copy(buffer, pos) + pos += buf.length + } + return buffer +} + +function byteLength (string, encoding) { + if (Buffer.isBuffer(string)) { + return string.length + } + if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' && + (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) { + return string.byteLength + } + if (typeof string !== 'string') { + string = '' + string + } + + var len = string.length + if (len === 0) return 0 + + // Use a for loop to avoid recursion + var loweredCase = false + for (;;) { + switch (encoding) { + case 'ascii': + case 'latin1': + case 'binary': + return len + case 'utf8': + case 'utf-8': + case undefined: + return utf8ToBytes(string).length + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return len * 2 + case 'hex': + return len >>> 1 + case 'base64': + return base64ToBytes(string).length + default: + if (loweredCase) return utf8ToBytes(string).length // assume utf8 + encoding = ('' + encoding).toLowerCase() + loweredCase = true + } + } +} +Buffer.byteLength = byteLength + +function slowToString (encoding, start, end) { + var loweredCase = false + + // No need to verify that "this.length <= MAX_UINT32" since it's a read-only + // property of a typed array. + + // This behaves neither like String nor Uint8Array in that we set start/end + // to their upper/lower bounds if the value passed is out of range. + // undefined is handled specially as per ECMA-262 6th Edition, + // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization. + if (start === undefined || start < 0) { + start = 0 + } + // Return early if start > this.length. Done here to prevent potential uint32 + // coercion fail below. + if (start > this.length) { + return '' + } + + if (end === undefined || end > this.length) { + end = this.length + } + + if (end <= 0) { + return '' + } + + // Force coersion to uint32. This will also coerce falsey/NaN values to 0. + end >>>= 0 + start >>>= 0 + + if (end <= start) { + return '' + } + + if (!encoding) encoding = 'utf8' + + while (true) { + switch (encoding) { + case 'hex': + return hexSlice(this, start, end) + + case 'utf8': + case 'utf-8': + return utf8Slice(this, start, end) + + case 'ascii': + return asciiSlice(this, start, end) + + case 'latin1': + case 'binary': + return latin1Slice(this, start, end) + + case 'base64': + return base64Slice(this, start, end) + + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return utf16leSlice(this, start, end) + + default: + if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) + encoding = (encoding + '').toLowerCase() + loweredCase = true + } + } +} + +// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect +// Buffer instances. +Buffer.prototype._isBuffer = true + +function swap (b, n, m) { + var i = b[n] + b[n] = b[m] + b[m] = i +} + +Buffer.prototype.swap16 = function swap16 () { + var len = this.length + if (len % 2 !== 0) { + throw new RangeError('Buffer size must be a multiple of 16-bits') + } + for (var i = 0; i < len; i += 2) { + swap(this, i, i + 1) + } + return this +} + +Buffer.prototype.swap32 = function swap32 () { + var len = this.length + if (len % 4 !== 0) { + throw new RangeError('Buffer size must be a multiple of 32-bits') + } + for (var i = 0; i < len; i += 4) { + swap(this, i, i + 3) + swap(this, i + 1, i + 2) + } + return this +} + +Buffer.prototype.swap64 = function swap64 () { + var len = this.length + if (len % 8 !== 0) { + throw new RangeError('Buffer size must be a multiple of 64-bits') + } + for (var i = 0; i < len; i += 8) { + swap(this, i, i + 7) + swap(this, i + 1, i + 6) + swap(this, i + 2, i + 5) + swap(this, i + 3, i + 4) + } + return this +} + +Buffer.prototype.toString = function toString () { + var length = this.length | 0 + if (length === 0) return '' + if (arguments.length === 0) return utf8Slice(this, 0, length) + return slowToString.apply(this, arguments) +} + +Buffer.prototype.equals = function equals (b) { + if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer') + if (this === b) return true + return Buffer.compare(this, b) === 0 +} + +Buffer.prototype.inspect = function inspect () { + var str = '' + var max = exports.INSPECT_MAX_BYTES + if (this.length > 0) { + str = this.toString('hex', 0, max).match(/.{2}/g).join(' ') + if (this.length > max) str += ' ... ' + } + return '' +} + +Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) { + if (!Buffer.isBuffer(target)) { + throw new TypeError('Argument must be a Buffer') + } + + if (start === undefined) { + start = 0 + } + if (end === undefined) { + end = target ? target.length : 0 + } + if (thisStart === undefined) { + thisStart = 0 + } + if (thisEnd === undefined) { + thisEnd = this.length + } + + if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) { + throw new RangeError('out of range index') + } + + if (thisStart >= thisEnd && start >= end) { + return 0 + } + if (thisStart >= thisEnd) { + return -1 + } + if (start >= end) { + return 1 + } + + start >>>= 0 + end >>>= 0 + thisStart >>>= 0 + thisEnd >>>= 0 + + if (this === target) return 0 + + var x = thisEnd - thisStart + var y = end - start + var len = Math.min(x, y) + + var thisCopy = this.slice(thisStart, thisEnd) + var targetCopy = target.slice(start, end) + + for (var i = 0; i < len; ++i) { + if (thisCopy[i] !== targetCopy[i]) { + x = thisCopy[i] + y = targetCopy[i] + break + } + } + + if (x < y) return -1 + if (y < x) return 1 + return 0 +} + +// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`, +// OR the last index of `val` in `buffer` at offset <= `byteOffset`. +// +// Arguments: +// - buffer - a Buffer to search +// - val - a string, Buffer, or number +// - byteOffset - an index into `buffer`; will be clamped to an int32 +// - encoding - an optional encoding, relevant is val is a string +// - dir - true for indexOf, false for lastIndexOf +function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) { + // Empty buffer means no match + if (buffer.length === 0) return -1 + + // Normalize byteOffset + if (typeof byteOffset === 'string') { + encoding = byteOffset + byteOffset = 0 + } else if (byteOffset > 0x7fffffff) { + byteOffset = 0x7fffffff + } else if (byteOffset < -0x80000000) { + byteOffset = -0x80000000 + } + byteOffset = +byteOffset // Coerce to Number. + if (isNaN(byteOffset)) { + // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer + byteOffset = dir ? 0 : (buffer.length - 1) + } + + // Normalize byteOffset: negative offsets start from the end of the buffer + if (byteOffset < 0) byteOffset = buffer.length + byteOffset + if (byteOffset >= buffer.length) { + if (dir) return -1 + else byteOffset = buffer.length - 1 + } else if (byteOffset < 0) { + if (dir) byteOffset = 0 + else return -1 + } + + // Normalize val + if (typeof val === 'string') { + val = Buffer.from(val, encoding) + } + + // Finally, search either indexOf (if dir is true) or lastIndexOf + if (Buffer.isBuffer(val)) { + // Special case: looking for empty string/buffer always fails + if (val.length === 0) { + return -1 + } + return arrayIndexOf(buffer, val, byteOffset, encoding, dir) + } else if (typeof val === 'number') { + val = val & 0xFF // Search for a byte value [0-255] + if (Buffer.TYPED_ARRAY_SUPPORT && + typeof Uint8Array.prototype.indexOf === 'function') { + if (dir) { + return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset) + } else { + return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset) + } + } + return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir) + } + + throw new TypeError('val must be string, number or Buffer') +} + +function arrayIndexOf (arr, val, byteOffset, encoding, dir) { + var indexSize = 1 + var arrLength = arr.length + var valLength = val.length + + if (encoding !== undefined) { + encoding = String(encoding).toLowerCase() + if (encoding === 'ucs2' || encoding === 'ucs-2' || + encoding === 'utf16le' || encoding === 'utf-16le') { + if (arr.length < 2 || val.length < 2) { + return -1 + } + indexSize = 2 + arrLength /= 2 + valLength /= 2 + byteOffset /= 2 + } + } + + function read (buf, i) { + if (indexSize === 1) { + return buf[i] + } else { + return buf.readUInt16BE(i * indexSize) + } + } + + var i + if (dir) { + var foundIndex = -1 + for (i = byteOffset; i < arrLength; i++) { + if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) { + if (foundIndex === -1) foundIndex = i + if (i - foundIndex + 1 === valLength) return foundIndex * indexSize + } else { + if (foundIndex !== -1) i -= i - foundIndex + foundIndex = -1 + } + } + } else { + if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength + for (i = byteOffset; i >= 0; i--) { + var found = true + for (var j = 0; j < valLength; j++) { + if (read(arr, i + j) !== read(val, j)) { + found = false + break + } + } + if (found) return i + } + } + + return -1 +} + +Buffer.prototype.includes = function includes (val, byteOffset, encoding) { + return this.indexOf(val, byteOffset, encoding) !== -1 +} + +Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) { + return bidirectionalIndexOf(this, val, byteOffset, encoding, true) +} + +Buffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) { + return bidirectionalIndexOf(this, val, byteOffset, encoding, false) +} + +function hexWrite (buf, string, offset, length) { + offset = Number(offset) || 0 + var remaining = buf.length - offset + if (!length) { + length = remaining + } else { + length = Number(length) + if (length > remaining) { + length = remaining + } + } + + // must be an even number of digits + var strLen = string.length + if (strLen % 2 !== 0) throw new TypeError('Invalid hex string') + + if (length > strLen / 2) { + length = strLen / 2 + } + for (var i = 0; i < length; ++i) { + var parsed = parseInt(string.substr(i * 2, 2), 16) + if (isNaN(parsed)) return i + buf[offset + i] = parsed + } + return i +} + +function utf8Write (buf, string, offset, length) { + return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length) +} + +function asciiWrite (buf, string, offset, length) { + return blitBuffer(asciiToBytes(string), buf, offset, length) +} + +function latin1Write (buf, string, offset, length) { + return asciiWrite(buf, string, offset, length) +} + +function base64Write (buf, string, offset, length) { + return blitBuffer(base64ToBytes(string), buf, offset, length) +} + +function ucs2Write (buf, string, offset, length) { + return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length) +} + +Buffer.prototype.write = function write (string, offset, length, encoding) { + // Buffer#write(string) + if (offset === undefined) { + encoding = 'utf8' + length = this.length + offset = 0 + // Buffer#write(string, encoding) + } else if (length === undefined && typeof offset === 'string') { + encoding = offset + length = this.length + offset = 0 + // Buffer#write(string, offset[, length][, encoding]) + } else if (isFinite(offset)) { + offset = offset | 0 + if (isFinite(length)) { + length = length | 0 + if (encoding === undefined) encoding = 'utf8' + } else { + encoding = length + length = undefined + } + // legacy write(string, encoding, offset, length) - remove in v0.13 + } else { + throw new Error( + 'Buffer.write(string, encoding, offset[, length]) is no longer supported' + ) + } + + var remaining = this.length - offset + if (length === undefined || length > remaining) length = remaining + + if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) { + throw new RangeError('Attempt to write outside buffer bounds') + } + + if (!encoding) encoding = 'utf8' + + var loweredCase = false + for (;;) { + switch (encoding) { + case 'hex': + return hexWrite(this, string, offset, length) + + case 'utf8': + case 'utf-8': + return utf8Write(this, string, offset, length) + + case 'ascii': + return asciiWrite(this, string, offset, length) + + case 'latin1': + case 'binary': + return latin1Write(this, string, offset, length) + + case 'base64': + // Warning: maxLength not taken into account in base64Write + return base64Write(this, string, offset, length) + + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return ucs2Write(this, string, offset, length) + + default: + if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) + encoding = ('' + encoding).toLowerCase() + loweredCase = true + } + } +} + +Buffer.prototype.toJSON = function toJSON () { + return { + type: 'Buffer', + data: Array.prototype.slice.call(this._arr || this, 0) + } +} + +function base64Slice (buf, start, end) { + if (start === 0 && end === buf.length) { + return base64.fromByteArray(buf) + } else { + return base64.fromByteArray(buf.slice(start, end)) + } +} + +function utf8Slice (buf, start, end) { + end = Math.min(buf.length, end) + var res = [] + + var i = start + while (i < end) { + var firstByte = buf[i] + var codePoint = null + var bytesPerSequence = (firstByte > 0xEF) ? 4 + : (firstByte > 0xDF) ? 3 + : (firstByte > 0xBF) ? 2 + : 1 + + if (i + bytesPerSequence <= end) { + var secondByte, thirdByte, fourthByte, tempCodePoint + + switch (bytesPerSequence) { + case 1: + if (firstByte < 0x80) { + codePoint = firstByte + } + break + case 2: + secondByte = buf[i + 1] + if ((secondByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F) + if (tempCodePoint > 0x7F) { + codePoint = tempCodePoint + } + } + break + case 3: + secondByte = buf[i + 1] + thirdByte = buf[i + 2] + if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F) + if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) { + codePoint = tempCodePoint + } + } + break + case 4: + secondByte = buf[i + 1] + thirdByte = buf[i + 2] + fourthByte = buf[i + 3] + if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F) + if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) { + codePoint = tempCodePoint + } + } + } + } + + if (codePoint === null) { + // we did not generate a valid codePoint so insert a + // replacement char (U+FFFD) and advance only 1 byte + codePoint = 0xFFFD + bytesPerSequence = 1 + } else if (codePoint > 0xFFFF) { + // encode to utf16 (surrogate pair dance) + codePoint -= 0x10000 + res.push(codePoint >>> 10 & 0x3FF | 0xD800) + codePoint = 0xDC00 | codePoint & 0x3FF + } + + res.push(codePoint) + i += bytesPerSequence + } + + return decodeCodePointsArray(res) +} + +// Based on http://stackoverflow.com/a/22747272/680742, the browser with +// the lowest limit is Chrome, with 0x10000 args. +// We go 1 magnitude less, for safety +var MAX_ARGUMENTS_LENGTH = 0x1000 + +function decodeCodePointsArray (codePoints) { + var len = codePoints.length + if (len <= MAX_ARGUMENTS_LENGTH) { + return String.fromCharCode.apply(String, codePoints) // avoid extra slice() + } + + // Decode in chunks to avoid "call stack size exceeded". + var res = '' + var i = 0 + while (i < len) { + res += String.fromCharCode.apply( + String, + codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH) + ) + } + return res +} + +function asciiSlice (buf, start, end) { + var ret = '' + end = Math.min(buf.length, end) + + for (var i = start; i < end; ++i) { + ret += String.fromCharCode(buf[i] & 0x7F) + } + return ret +} + +function latin1Slice (buf, start, end) { + var ret = '' + end = Math.min(buf.length, end) + + for (var i = start; i < end; ++i) { + ret += String.fromCharCode(buf[i]) + } + return ret +} + +function hexSlice (buf, start, end) { + var len = buf.length + + if (!start || start < 0) start = 0 + if (!end || end < 0 || end > len) end = len + + var out = '' + for (var i = start; i < end; ++i) { + out += toHex(buf[i]) + } + return out +} + +function utf16leSlice (buf, start, end) { + var bytes = buf.slice(start, end) + var res = '' + for (var i = 0; i < bytes.length; i += 2) { + res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256) + } + return res +} + +Buffer.prototype.slice = function slice (start, end) { + var len = this.length + start = ~~start + end = end === undefined ? len : ~~end + + if (start < 0) { + start += len + if (start < 0) start = 0 + } else if (start > len) { + start = len + } + + if (end < 0) { + end += len + if (end < 0) end = 0 + } else if (end > len) { + end = len + } + + if (end < start) end = start + + var newBuf + if (Buffer.TYPED_ARRAY_SUPPORT) { + newBuf = this.subarray(start, end) + newBuf.__proto__ = Buffer.prototype + } else { + var sliceLen = end - start + newBuf = new Buffer(sliceLen, undefined) + for (var i = 0; i < sliceLen; ++i) { + newBuf[i] = this[i + start] + } + } + + return newBuf +} + +/* + * Need to make sure that buffer isn't trying to write out of bounds. + */ +function checkOffset (offset, ext, length) { + if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint') + if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length') +} + +Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) { + offset = offset | 0 + byteLength = byteLength | 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) + + var val = this[offset] + var mul = 1 + var i = 0 + while (++i < byteLength && (mul *= 0x100)) { + val += this[offset + i] * mul + } + + return val +} + +Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) { + offset = offset | 0 + byteLength = byteLength | 0 + if (!noAssert) { + checkOffset(offset, byteLength, this.length) + } + + var val = this[offset + --byteLength] + var mul = 1 + while (byteLength > 0 && (mul *= 0x100)) { + val += this[offset + --byteLength] * mul + } + + return val +} + +Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) { + if (!noAssert) checkOffset(offset, 1, this.length) + return this[offset] +} + +Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length) + return this[offset] | (this[offset + 1] << 8) +} + +Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length) + return (this[offset] << 8) | this[offset + 1] +} + +Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) + + return ((this[offset]) | + (this[offset + 1] << 8) | + (this[offset + 2] << 16)) + + (this[offset + 3] * 0x1000000) +} + +Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) + + return (this[offset] * 0x1000000) + + ((this[offset + 1] << 16) | + (this[offset + 2] << 8) | + this[offset + 3]) +} + +Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) { + offset = offset | 0 + byteLength = byteLength | 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) + + var val = this[offset] + var mul = 1 + var i = 0 + while (++i < byteLength && (mul *= 0x100)) { + val += this[offset + i] * mul + } + mul *= 0x80 + + if (val >= mul) val -= Math.pow(2, 8 * byteLength) + + return val +} + +Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) { + offset = offset | 0 + byteLength = byteLength | 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) + + var i = byteLength + var mul = 1 + var val = this[offset + --i] + while (i > 0 && (mul *= 0x100)) { + val += this[offset + --i] * mul + } + mul *= 0x80 + + if (val >= mul) val -= Math.pow(2, 8 * byteLength) + + return val +} + +Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) { + if (!noAssert) checkOffset(offset, 1, this.length) + if (!(this[offset] & 0x80)) return (this[offset]) + return ((0xff - this[offset] + 1) * -1) +} + +Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length) + var val = this[offset] | (this[offset + 1] << 8) + return (val & 0x8000) ? val | 0xFFFF0000 : val +} + +Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length) + var val = this[offset + 1] | (this[offset] << 8) + return (val & 0x8000) ? val | 0xFFFF0000 : val +} + +Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) + + return (this[offset]) | + (this[offset + 1] << 8) | + (this[offset + 2] << 16) | + (this[offset + 3] << 24) +} + +Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) + + return (this[offset] << 24) | + (this[offset + 1] << 16) | + (this[offset + 2] << 8) | + (this[offset + 3]) +} + +Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) + return ieee754.read(this, offset, true, 23, 4) +} + +Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) + return ieee754.read(this, offset, false, 23, 4) +} + +Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 8, this.length) + return ieee754.read(this, offset, true, 52, 8) +} + +Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 8, this.length) + return ieee754.read(this, offset, false, 52, 8) +} + +function checkInt (buf, value, offset, ext, max, min) { + if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance') + if (value > max || value < min) throw new RangeError('"value" argument is out of bounds') + if (offset + ext > buf.length) throw new RangeError('Index out of range') +} + +Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) { + value = +value + offset = offset | 0 + byteLength = byteLength | 0 + if (!noAssert) { + var maxBytes = Math.pow(2, 8 * byteLength) - 1 + checkInt(this, value, offset, byteLength, maxBytes, 0) + } + + var mul = 1 + var i = 0 + this[offset] = value & 0xFF + while (++i < byteLength && (mul *= 0x100)) { + this[offset + i] = (value / mul) & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) { + value = +value + offset = offset | 0 + byteLength = byteLength | 0 + if (!noAssert) { + var maxBytes = Math.pow(2, 8 * byteLength) - 1 + checkInt(this, value, offset, byteLength, maxBytes, 0) + } + + var i = byteLength - 1 + var mul = 1 + this[offset + i] = value & 0xFF + while (--i >= 0 && (mul *= 0x100)) { + this[offset + i] = (value / mul) & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0) + if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value) + this[offset] = (value & 0xff) + return offset + 1 +} + +function objectWriteUInt16 (buf, value, offset, littleEndian) { + if (value < 0) value = 0xffff + value + 1 + for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) { + buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>> + (littleEndian ? i : 1 - i) * 8 + } +} + +Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value & 0xff) + this[offset + 1] = (value >>> 8) + } else { + objectWriteUInt16(this, value, offset, true) + } + return offset + 2 +} + +Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value >>> 8) + this[offset + 1] = (value & 0xff) + } else { + objectWriteUInt16(this, value, offset, false) + } + return offset + 2 +} + +function objectWriteUInt32 (buf, value, offset, littleEndian) { + if (value < 0) value = 0xffffffff + value + 1 + for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) { + buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff + } +} + +Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset + 3] = (value >>> 24) + this[offset + 2] = (value >>> 16) + this[offset + 1] = (value >>> 8) + this[offset] = (value & 0xff) + } else { + objectWriteUInt32(this, value, offset, true) + } + return offset + 4 +} + +Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value >>> 24) + this[offset + 1] = (value >>> 16) + this[offset + 2] = (value >>> 8) + this[offset + 3] = (value & 0xff) + } else { + objectWriteUInt32(this, value, offset, false) + } + return offset + 4 +} + +Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) { + var limit = Math.pow(2, 8 * byteLength - 1) + + checkInt(this, value, offset, byteLength, limit - 1, -limit) + } + + var i = 0 + var mul = 1 + var sub = 0 + this[offset] = value & 0xFF + while (++i < byteLength && (mul *= 0x100)) { + if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) { + sub = 1 + } + this[offset + i] = ((value / mul) >> 0) - sub & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) { + var limit = Math.pow(2, 8 * byteLength - 1) + + checkInt(this, value, offset, byteLength, limit - 1, -limit) + } + + var i = byteLength - 1 + var mul = 1 + var sub = 0 + this[offset + i] = value & 0xFF + while (--i >= 0 && (mul *= 0x100)) { + if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) { + sub = 1 + } + this[offset + i] = ((value / mul) >> 0) - sub & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80) + if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value) + if (value < 0) value = 0xff + value + 1 + this[offset] = (value & 0xff) + return offset + 1 +} + +Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value & 0xff) + this[offset + 1] = (value >>> 8) + } else { + objectWriteUInt16(this, value, offset, true) + } + return offset + 2 +} + +Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value >>> 8) + this[offset + 1] = (value & 0xff) + } else { + objectWriteUInt16(this, value, offset, false) + } + return offset + 2 +} + +Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value & 0xff) + this[offset + 1] = (value >>> 8) + this[offset + 2] = (value >>> 16) + this[offset + 3] = (value >>> 24) + } else { + objectWriteUInt32(this, value, offset, true) + } + return offset + 4 +} + +Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) + if (value < 0) value = 0xffffffff + value + 1 + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value >>> 24) + this[offset + 1] = (value >>> 16) + this[offset + 2] = (value >>> 8) + this[offset + 3] = (value & 0xff) + } else { + objectWriteUInt32(this, value, offset, false) + } + return offset + 4 +} + +function checkIEEE754 (buf, value, offset, ext, max, min) { + if (offset + ext > buf.length) throw new RangeError('Index out of range') + if (offset < 0) throw new RangeError('Index out of range') +} + +function writeFloat (buf, value, offset, littleEndian, noAssert) { + if (!noAssert) { + checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38) + } + ieee754.write(buf, value, offset, littleEndian, 23, 4) + return offset + 4 +} + +Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) { + return writeFloat(this, value, offset, true, noAssert) +} + +Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) { + return writeFloat(this, value, offset, false, noAssert) +} + +function writeDouble (buf, value, offset, littleEndian, noAssert) { + if (!noAssert) { + checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308) + } + ieee754.write(buf, value, offset, littleEndian, 52, 8) + return offset + 8 +} + +Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) { + return writeDouble(this, value, offset, true, noAssert) +} + +Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) { + return writeDouble(this, value, offset, false, noAssert) +} + +// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length) +Buffer.prototype.copy = function copy (target, targetStart, start, end) { + if (!start) start = 0 + if (!end && end !== 0) end = this.length + if (targetStart >= target.length) targetStart = target.length + if (!targetStart) targetStart = 0 + if (end > 0 && end < start) end = start + + // Copy 0 bytes; we're done + if (end === start) return 0 + if (target.length === 0 || this.length === 0) return 0 + + // Fatal error conditions + if (targetStart < 0) { + throw new RangeError('targetStart out of bounds') + } + if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds') + if (end < 0) throw new RangeError('sourceEnd out of bounds') + + // Are we oob? + if (end > this.length) end = this.length + if (target.length - targetStart < end - start) { + end = target.length - targetStart + start + } + + var len = end - start + var i + + if (this === target && start < targetStart && targetStart < end) { + // descending copy from end + for (i = len - 1; i >= 0; --i) { + target[i + targetStart] = this[i + start] + } + } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) { + // ascending copy from start + for (i = 0; i < len; ++i) { + target[i + targetStart] = this[i + start] + } + } else { + Uint8Array.prototype.set.call( + target, + this.subarray(start, start + len), + targetStart + ) + } + + return len +} + +// Usage: +// buffer.fill(number[, offset[, end]]) +// buffer.fill(buffer[, offset[, end]]) +// buffer.fill(string[, offset[, end]][, encoding]) +Buffer.prototype.fill = function fill (val, start, end, encoding) { + // Handle string cases: + if (typeof val === 'string') { + if (typeof start === 'string') { + encoding = start + start = 0 + end = this.length + } else if (typeof end === 'string') { + encoding = end + end = this.length + } + if (val.length === 1) { + var code = val.charCodeAt(0) + if (code < 256) { + val = code + } + } + if (encoding !== undefined && typeof encoding !== 'string') { + throw new TypeError('encoding must be a string') + } + if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) { + throw new TypeError('Unknown encoding: ' + encoding) + } + } else if (typeof val === 'number') { + val = val & 255 + } + + // Invalid ranges are not set to a default, so can range check early. + if (start < 0 || this.length < start || this.length < end) { + throw new RangeError('Out of range index') + } + + if (end <= start) { + return this + } + + start = start >>> 0 + end = end === undefined ? this.length : end >>> 0 + + if (!val) val = 0 + + var i + if (typeof val === 'number') { + for (i = start; i < end; ++i) { + this[i] = val + } + } else { + var bytes = Buffer.isBuffer(val) + ? val + : utf8ToBytes(new Buffer(val, encoding).toString()) + var len = bytes.length + for (i = 0; i < end - start; ++i) { + this[i + start] = bytes[i % len] + } + } + + return this +} + +// HELPER FUNCTIONS +// ================ + +var INVALID_BASE64_RE = /[^+\/0-9A-Za-z-_]/g + +function base64clean (str) { + // Node strips out invalid characters like \n and \t from the string, base64-js does not + str = stringtrim(str).replace(INVALID_BASE64_RE, '') + // Node converts strings with length < 2 to '' + if (str.length < 2) return '' + // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not + while (str.length % 4 !== 0) { + str = str + '=' + } + return str +} + +function stringtrim (str) { + if (str.trim) return str.trim() + return str.replace(/^\s+|\s+$/g, '') +} + +function toHex (n) { + if (n < 16) return '0' + n.toString(16) + return n.toString(16) +} + +function utf8ToBytes (string, units) { + units = units || Infinity + var codePoint + var length = string.length + var leadSurrogate = null + var bytes = [] + + for (var i = 0; i < length; ++i) { + codePoint = string.charCodeAt(i) + + // is surrogate component + if (codePoint > 0xD7FF && codePoint < 0xE000) { + // last char was a lead + if (!leadSurrogate) { + // no lead yet + if (codePoint > 0xDBFF) { + // unexpected trail + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + continue + } else if (i + 1 === length) { + // unpaired lead + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + continue + } + + // valid lead + leadSurrogate = codePoint + + continue + } + + // 2 leads in a row + if (codePoint < 0xDC00) { + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + leadSurrogate = codePoint + continue + } + + // valid surrogate pair + codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000 + } else if (leadSurrogate) { + // valid bmp char, but last char was a lead + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + } + + leadSurrogate = null + + // encode utf8 + if (codePoint < 0x80) { + if ((units -= 1) < 0) break + bytes.push(codePoint) + } else if (codePoint < 0x800) { + if ((units -= 2) < 0) break + bytes.push( + codePoint >> 0x6 | 0xC0, + codePoint & 0x3F | 0x80 + ) + } else if (codePoint < 0x10000) { + if ((units -= 3) < 0) break + bytes.push( + codePoint >> 0xC | 0xE0, + codePoint >> 0x6 & 0x3F | 0x80, + codePoint & 0x3F | 0x80 + ) + } else if (codePoint < 0x110000) { + if ((units -= 4) < 0) break + bytes.push( + codePoint >> 0x12 | 0xF0, + codePoint >> 0xC & 0x3F | 0x80, + codePoint >> 0x6 & 0x3F | 0x80, + codePoint & 0x3F | 0x80 + ) + } else { + throw new Error('Invalid code point') + } + } + + return bytes +} + +function asciiToBytes (str) { + var byteArray = [] + for (var i = 0; i < str.length; ++i) { + // Node's code seems to be doing this and not & 0x7F.. + byteArray.push(str.charCodeAt(i) & 0xFF) + } + return byteArray +} + +function utf16leToBytes (str, units) { + var c, hi, lo + var byteArray = [] + for (var i = 0; i < str.length; ++i) { + if ((units -= 2) < 0) break + + c = str.charCodeAt(i) + hi = c >> 8 + lo = c % 256 + byteArray.push(lo) + byteArray.push(hi) + } + + return byteArray +} + +function base64ToBytes (str) { + return base64.toByteArray(base64clean(str)) +} + +function blitBuffer (src, dst, offset, length) { + for (var i = 0; i < length; ++i) { + if ((i + offset >= dst.length) || (i >= src.length)) break + dst[i + offset] = src[i] + } + return i +} + +function isnan (val) { + return val !== val // eslint-disable-line no-self-compare +} + +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(31))) + +/***/ }), +/* 29 */ +/***/ (function(module, exports) { + +exports.read = function (buffer, offset, isLE, mLen, nBytes) { + var e, m + var eLen = nBytes * 8 - mLen - 1 + var eMax = (1 << eLen) - 1 + var eBias = eMax >> 1 + var nBits = -7 + var i = isLE ? (nBytes - 1) : 0 + var d = isLE ? -1 : 1 + var s = buffer[offset + i] + + i += d + + e = s & ((1 << (-nBits)) - 1) + s >>= (-nBits) + nBits += eLen + for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {} + + m = e & ((1 << (-nBits)) - 1) + e >>= (-nBits) + nBits += mLen + for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {} + + if (e === 0) { + e = 1 - eBias + } else if (e === eMax) { + return m ? NaN : ((s ? -1 : 1) * Infinity) + } else { + m = m + Math.pow(2, mLen) + e = e - eBias + } + return (s ? -1 : 1) * m * Math.pow(2, e - mLen) +} + +exports.write = function (buffer, value, offset, isLE, mLen, nBytes) { + var e, m, c + var eLen = nBytes * 8 - mLen - 1 + var eMax = (1 << eLen) - 1 + var eBias = eMax >> 1 + var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0) + var i = isLE ? 0 : (nBytes - 1) + var d = isLE ? 1 : -1 + var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0 + + value = Math.abs(value) + + if (isNaN(value) || value === Infinity) { + m = isNaN(value) ? 1 : 0 + e = eMax + } else { + e = Math.floor(Math.log(value) / Math.LN2) + if (value * (c = Math.pow(2, -e)) < 1) { + e-- + c *= 2 + } + if (e + eBias >= 1) { + value += rt / c + } else { + value += rt * Math.pow(2, 1 - eBias) + } + if (value * c >= 2) { + e++ + c /= 2 + } + + if (e + eBias >= eMax) { + m = 0 + e = eMax + } else if (e + eBias >= 1) { + m = (value * c - 1) * Math.pow(2, mLen) + e = e + eBias + } else { + m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen) + e = 0 + } + } + + for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {} + + e = (e << mLen) | m + eLen += mLen + for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {} + + buffer[offset + i - d] |= s * 128 +} + + +/***/ }), +/* 30 */ +/***/ (function(module, exports) { + +var toString = {}.toString; + +module.exports = Array.isArray || function (arr) { + return toString.call(arr) == '[object Array]'; +}; + + +/***/ }), +/* 31 */ +/***/ (function(module, exports) { + +var g; + +// This works in non-strict mode +g = (function() { + return this; +})(); + +try { + // This works if eval is allowed (see CSP) + g = g || Function("return this")() || (1,eval)("this"); +} catch(e) { + // This works if the window reference is available + if(typeof window === "object") + g = window; +} + +// g can still be undefined, but nothing to do about it... +// We return undefined, instead of nothing here, so it's +// easier to handle this case. if(!global) { ...} + +module.exports = g; + + +/***/ }) +/******/ ]); \ No newline at end of file diff --git a/src/js/app.js b/src/js/app.js new file mode 100644 index 00000000..888e7035 --- /dev/null +++ b/src/js/app.js @@ -0,0 +1,441 @@ +import axios from 'axios' + +// *************** Componente pesponsável pelo esqueleto da página ************ + +var Page = React.createClass({ + + render:function(){ + return ( + +
+ +
+ + +
+ + ); + } +}); + +// *************** Componente pesponsável pelo header ************ + +var Header = React.createClass({ + render: function() { + return ( +
+
+ +
+ +

3

+
+
+
+ ); + } +}) + +// *************** Componente pesponsável pelo header ************ + +var SubHeader = React.createClass({ + getInitialState: function(){ + return { + click: true + }; + }, + dropBlock: function(){ + this.setState({ + click: !this.state.click + }); + }, + + render: function() { + var dropMenus = this.state.click ? 'dropmenuBlock' : 'dropmenuNone'; + var dropClass = this.state.click ? 'dropdownNone' : 'dropdownBlock'; + return ( +
+
+
+

VESTIDOS

+
+
+
+ +
+
+
+
+ + +
+
+ + + + + +
+
+
+
+ ); + } +}); + +// *************** Componente pesponsável pelo filtro de cor do menu da versão mobile ************ + +var MenuCor = React.createClass({ + getInitialState: function(){ + return { + click: true + }; + }, + dropMenuCor: function(){ + this.setState({ + click: !this.state.click + }); + }, + + render: function() { + var dropMenuCor = this.state.click ? 'dropmenuBlock' : 'dropmenuNone'; + return ( +
+

CORES -

+
+
+

CORES

+
+
+
    +
  • + + +
  • +
  • + + +
  • +
  • + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
+
+
+
+
+
+ ); + } +}); + +// *************** Componente pesponsável pelo filtro de tamanho do menu da versão mobile ************ + +var MenuTamanho = React.createClass({ + getInitialState: function(){ + return { + click: true + }; + }, + dropMenuTam: function(){ + this.setState({ + click: !this.state.click + }); + }, + + render: function() { + var dropMenuTam = this.state.click ? 'dropmenuBlock' : 'dropmenuNone'; + return ( +
+

TAMANHO -

+
+ +
+
+ ); + } +}); + +// *************** Componente pesponsável pelo filtro de preço do menu da versão mobile ************ + +var MenuPreco = React.createClass({ + getInitialState: function(){ + return { + click: true + }; + }, + dropMenuPreco: function(){ + this.setState({ + click: !this.state.click + }); + }, + + render: function() { + var dropMenuPreco = this.state.click ? 'dropmenuBlock' : 'dropmenuNone'; + return ( +
+

PRECOS -

+
+
+

FAIXA DE PREÇO

+
+
+
    +
  • + + +
  • + + +
  • + + +
  • + + +
  • + + +
  • +
+
+
+
+
+
+ ); + } +}); + +// *************** Componente pesponsável pelo esquelo do menu esquerdo da página (filtro) versão desktop ************ + +var ContentFiltro = React.createClass({ + render: function() { + return ( +
+ + + +
+ ); + } +}) + +// *************** Componente pesponsável pelo conteudo lateral esquerdo da página (Cores) versão desktop ************ + +var ContentCores = React.createClass({ + + getInitialState: function(){ + return { + click: true, + }; + }, + + dropBlock: function(){ + this.setState({ + click: !this.state.click + }); + }, + + render: function() { + var dropClass = this.state.click ? 'dropdownNone' : 'dropdownBlock'; + var arrowClass = this.state.click ? 'arrow' : 'arrow_down'; + return ( +
+

CORES

+
+
+
    +
  • + + +
  • +
  • + + +
  • +
  • + +
  • +
  • + + +
  • +
  • + + +
  • +
+
+
    +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
+
+

Ver todas as cores

+
+
+
+ ); + } +}) + +// *************** Componente pesponsável pelo conteudo lateral esquerdo da página (Tamanhos) versão desktop *********** + +var ContentTamanhos = React.createClass({ + render: function() { + return ( +
+

TAMANHOS

+
+ P + M + G + GG + U + 36 + 38 + 40 + 42 + 44 + 46 +
+
+ ); + } +}) + +// *************** Componente pesponsável pelo conteudo lateral esquerdo da página (Preco) versão desktop *********** + +var ContentPrecos = React.createClass({ + + render: function() { + return ( +
+

FAIXA DE PREÇO

+
+
+
    +
  • + + +
  • + + +
  • + + +
  • + + +
  • + + +
  • +
+
+
+
+ ); + } +}); + +// *************** Componente pesponsável pelo conteudo com os cards da página ************ + +var ContentCards = React.createClass({ + getInitialState: function() { + return { + images: [] + } + }, + + componentDidMount: function() { + var _this = this; + this.serverRequest = + axios + .get("https://api.myjson.com/bins/1bj13l") + .then(function(result) { + _this.setState({ + images: result.data.images + }); + }) + .catch(error=>{}); + }, + + componentWillUnmount: function() { + this.serverRequest.abort(); + }, + + render: function() { + return ( + + ) + } + }); + + +ReactDOM.render( + , + document.getElementById('page') +); diff --git a/src/sass/app.scss b/src/sass/app.scss new file mode 100644 index 00000000..78d3447a --- /dev/null +++ b/src/sass/app.scss @@ -0,0 +1,349 @@ +@font-face { + font-family: DidactGothic; + src: url(../../font/DidactGothic-Regular.ttf); +} + +* { + font-family: DidactGothic; +} + +#page { + + /*Classe responsável pelo layout do header*/ + + .header { + border-bottom: 2px solid #ff9f1c; + padding-bottom: 36px; + margin-top: 32px; + :nth-child(2) { + float: right; + right: 0px; + position: absolute; + top: 10%; + } + .header-border { + width: 71%; + margin: 0 auto; + display: flex; + position: relative; + p { + background-color: #ff9f1c; + border-radius: 10px; + padding: 0px 7px; + font-size: 14px; + color: #fff; + text-align: center; + line-height: 20px; + position: relative; + top: -6px; + left: -5px; + } + } + } + + /*Classe responsável pelo layout do subheader*/ + + .subHeader { + width: 71%; + margin: 0 auto; + margin-top: 10px; + &__title { + display: inline-block; + + h1 { + font-weight: 100; + font-size: 1.9em; + } + } + &__tab { + float: right; + margin-top: 30px; + margin-right: 6px; + } + &__form{ + select { + height: 30px; + width: 125px; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + background: url(../../images/arrow.png) no-repeat rgb(255, 255, 255); + background-position: 95px; + background-size: 22px; + padding-left: 8px; + option{ + &:hover { + background-color: #ff9f1c; + } + } + } + } + &__mobile { + display: none; + } + } + + /*Classe responsável pelo layout do conteudo/corpo*/ + + .content { + width: 71%; + display: table; + margin: 0 auto; + position: relative; + + /*Classe responsável pelo layout do conteudo/corpo na parte de filtros*/ + + &__Filtro { + position: absolute; + width: 25%; + h1.cores { + font-size: 1.2em; + margin-top: 26px; + margin-bottom: 26px; + font-weight: 100; + letter-spacing: 2px; + } + h1.tamanho { + font-size: 1.2em; + font-weight: 100; + margin-bottom: 35px; + font-weight: 100; + letter-spacing: 2px;; + } + h1.preco{ + font-size: 1.2em; + margin-top: 45px; + margin-bottom: 28px; + font-weight: 100; + letter-spacing: 2px; + } + + /*Classe responsável pelo layout do conteudo/corpo na parte de filtros na parte de tamanhos*/ + + &__box { + width: 80%; + a { + margin-right: 10px; + margin-bottom: 8px; + border: 1px solid #e5e5e5; + color: #9f9f9f; + padding: 5px; + display: inline-block; + width: 20px; + height: 20px; + text-align: center; + text-decoration: none; + font-size: 0.7em; + line-height: 1.8em; + font-weight: bold; + &:hover { + border: 2px solid #ff9f1c; + color: #000; + text-decoration: none; + font-weight: 700; + margin-right: 10px; + margin-bottom: 8px; + padding: 4px; + display: inline-block; + width: 20px; + height: 20px; + text-align: center; + text-decoration: none; + font-weight: 700; + } + } + } + + /*Classe responsável pelo visual do checkbox*/ + + &__form { + margin-top: 26px; + margin-bottom: 46px; + p { + text-decoration: underline; + display: inline; + margin-right: 8px; + color: #7a7a7a; + cursor: pointer; + font-size: 0.8em; + } + input[type="checkbox"] { + display:none; + } + + input[type="checkbox"] + label { + color: #000; + font-weight: 600; + font-size: 0.9em; + vertical-align: middle; + } + + input[type="checkbox"] + label .labelSpan { + display:inline-block; + width: 12px; + height: 12px; + margin: 0px 10px 0 0; + vertical-align:middle; + cursor: pointer; + border: 1px solid #d8d8d8; + } + + input[type="checkbox"]:checked + label .labelSpan { + background-image: url("../../images/Select.png"); + background-size: 8px; + background-repeat: no-repeat; + background-position: center; + border: 1px solid #d8d8d8; + } + ul { + padding-left: 0px; + li { + list-style: none; + margin-top: 1px; + } + } + } + } + + /*Classe responsável pelo layout na parte dos CARDS*/ + + &__Card { + margin: 0; + width: 80%; + float: right; + margin-right: -38px; + a { + &:-webkit-any-link{ + color: #000; + text-decoration: none; + }; + } + ul { + padding: 0px; + li { + display: inline-block; + list-style: none; + width: 32%; + padding: 0px 0px; + margin-bottom: 32px; + } + } + img { + margin: 0 12px; + } + &__mais { + text-align: center; + background-color: #ff9f1c; + width: 25%; + padding: 12px 35px; + color: #fff; + margin: 30px auto; + a { + &:-webkit-any-link{ + color: #fff; + text-decoration: none; + }; + } + } + &__block { + &__title { + font-size: 0.8em; + text-transform: uppercase; + letter-spacing: 1px; + text-align: center; + width: 50%; + text-align: center; + margin: 0 auto; + height: 40px; + margin-top: 12px; + } + &__preco { + display: inline-block; + margin-left: 38px; + &__total { + font-size: 1.1em; + text-transform: uppercase; + text-align: right; + font-weight: bold; + margin: 0px; + span { + font-family: serif; + } + } + &__parcela { + margin-top: 0px; + span { + font-family: serif; + } + } + } + &__promo{ + color: #666666; + text-decoration: line-through; + font-size: 0.8em; + font-weight: 100; + } + } + } +} + +/*Classe extras para outras funcionalidades*/ + + .arrow { + transition: 0.3s transform; + display: inline-block; + -webkit-transform: rotate(90deg); + -moz-transform: rotate(90deg); + -o-transform: rotate(90deg); + -ms-transform: rotate(90deg); + transform: rotate(90deg); + color: #7a7a7a; + } + + .arrow_down { + transition: 0.3s transform; + display: inline-block; + -webkit-transform: rotate(270deg); + -moz-transform: rotate(270deg); + -o-transform: rotate(270deg); + -ms-transform: rotate(270deg); + transform: rotate(270deg); + color: #7a7a7a; + } + + .dropdownNone { + display: none; + } + + .dropdownBlock { + display: block; + margin-top: -13px; + } + .dropmenuNone { + display: none; + } + + .dropmenuBlock { + display: block; + margin: 0 auto; + } + .highlight { + display: none; + } +} + +/*Classe da página de produção*/ + +.producao { + width: 80%; + margin: 0 auto; + text-align: center; + a { + text-decoration: none; + padding: 12px 15%; + background: #ff9f1c; + border: 1px solid #ff9f1c; + color: #fff; + letter-spacing: 1px; + } +} \ No newline at end of file diff --git a/src/sass/media.scss b/src/sass/media.scss new file mode 100644 index 00000000..aed05227 --- /dev/null +++ b/src/sass/media.scss @@ -0,0 +1,158 @@ +/*Media Queries responsável pelo layout da versão mobile*/ + +@media screen and (max-width: 768px) and (min-width: 320px) { + + #page { + + /*Classe responsável pelo layout do conteudo/corpo*/ + + .content { + width: 100%; + display: table; + margin: 0 auto; + position: relative; + + /*Classe responsável pelo layout do conteudo/corpo na parte de filtros*/ + + &__Filtro { + position: absolute; + display: none; + visibility: hidden; + &__form { + ul { + li { + margin-top: 5px; + } + } + } + &__box { + width: 80%; + margin: 0 auto; + a { + margin-right: 16px; + margin-bottom: 8px; + border: 1px solid #e5e5e5; + color: #9f9f9f; + padding: 5px; + display: inline-block; + width: 35px; + height: 35px; + text-align: center; + text-decoration: none; + font-size: 1em; + line-height: 2em; + font-weight: bold; + } + } + } + + /*Classe responsável pelo layout na parte dos CARDS*/ + + &__Card { + margin: 0; + width: 100%; + float: left; + margin-right: 0px; + &__img { + width: 100%; + } + &__block { + &__title { + width: 70%; + } + &__preco { + margin: 0 5%; + } + } + ul { + padding: 0px; + li { + display: inline-block; + list-style: none; + width: 50%; + margin: 0 auto; + } + } + img { + margin: 0px; + } + } + &__Cardnone { + display: none; + } + } + + /*Classe responsável pelo layout do header*/ + + + .header { + .header-border { + width: 100%; + } + } + + /*Classe responsável pelo layout do subheader*/ + + .subHeader { + display: block; + &__title { + display: block; + text-align: center; + margin: 0 auto; + h1 { + font-size: 1.5em; + } + } + &__tab { + display: none; + } + &__mobile { + display: block; + text-align: center; + } + &__btnMobile { + padding: 12px 18%; + background: #fff; + border: 1px solid #000; + } + &__selectMobile { + width: 90%; + margin: 40px auto; + &__btnMobileSelect { + border: 1px solid #666666; + color: #666666; + padding: 12px 15%; + background: #fff; + letter-spacing: 1px; + float: right; + &__first { + padding: 12px 15%; + background: #ff9f1c; + border: 1px solid #ff9f1c; + color: #fff; + letter-spacing: 1px; + } + } + } + } + .dropdownBlock { + display: block; + text-align: left; + margin: 0 auto; + h1 { + display: none; + } + p span { + font-weight: bold; + } + } + .traco { + float: right; + margin-right: 14px; + font-weight: bold; + font-size: 40px; + line-height: 12px; + } + } +} + diff --git a/webpack.config.js b/webpack.config.js new file mode 100644 index 00000000..4c8459af --- /dev/null +++ b/webpack.config.js @@ -0,0 +1,19 @@ +module.exports = { + entry: "./src/js/app.js", + output: { + filename: "public/js/app.js" + }, + module: { + loaders: [ + { + test: /\.js$/, + exclude: /node_modules/, + loader: 'babel-loader', + query: { + presets: ['react'] + }, + }, + {test: /\.json$/, loader: "json"} + ] + } +}