├── .editorconfig ├── .eslintignore ├── .eslintrc.js ├── .gitignore ├── LICENSE ├── README.md ├── babel.config.js ├── docs ├── favicon.ico ├── index.html └── js │ ├── app.cad4b562.js │ ├── app.cad4b562.js.map │ ├── chunk-vendors.99c5475d.js │ └── chunk-vendors.99c5475d.js.map ├── lib ├── waterwaves.common.js ├── waterwaves.common.js.map ├── waterwaves.umd.js ├── waterwaves.umd.js.map ├── waterwaves.umd.min.js └── waterwaves.umd.min.js.map ├── package.json ├── public ├── favicon.ico └── index.html ├── publish.sh ├── scripts ├── WaterPolo.common.js ├── WaterPolo.common.js.map ├── WaterPolo.umd.js ├── WaterPolo.umd.js.map ├── WaterPolo.umd.min.js └── WaterPolo.umd.min.js.map ├── src ├── example │ ├── App.vue │ ├── components │ │ └── index.vue │ └── main.js └── lib │ ├── index.js │ ├── waterwaves.js │ └── waterwaves.vue ├── static └── soogif.gif ├── vue.config.js └── yarn.lock /.editorconfig: -------------------------------------------------------------------------------- 1 | [*.{js,jsx,ts,tsx,vue}] 2 | indent_style = space 3 | indent_size = 2 4 | end_of_line = lf 5 | trim_trailing_whitespace = true 6 | insert_final_newline = true 7 | max_line_length = 100 8 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | public 2 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | env: { 4 | node: true, 5 | }, 6 | extends: ['plugin:vue/essential'], 7 | rules: { 8 | // 此规则强制执行统一的行结尾,而不受操作系统,VCS 或整个代码库中使用的编辑器的影响。所以关闭 9 | 'linebreak-style': 0, 10 | // 关闭在导入路径中一致使用文件扩展名 11 | 'import/extensions': 0, 12 | // 关闭函数圆括号前的空白检测 13 | 'space-before-function-paren': 0, 14 | // 建议不要使用一元自增自减运算符(++, --) 15 | 'no-plusplus': 0, 16 | // 关闭 不要改参数的数据结构,保留参数原始值和数据结构。 17 | 'no-param-reassign': 0, 18 | // 每行代码不得超过100个 19 | 'max-len': 0, 20 | // 不需要在对象或解构赋值的大括号内强制执行一致的换行符。 21 | 'object-curly-newline': 0, 22 | // 允许使用遍历器 23 | 'no-restricted-syntax': 0, 24 | // 关闭箭头函数必须有返回值 25 | 'array-callback-return': 0, 26 | // 允许'~'按位运算符 27 | 'no-bitwise': [2, { allow: ['~'] }], 28 | // 禁止未使用的表达式 29 | 'no-unused-expressions': [ 30 | 2, 31 | { 32 | allowShortCircuit: true, // 允许在表达式中使用短路评估 33 | allowTernary: true, // 使用三元运算符 34 | allowTaggedTemplates: true, // 使用标记的模板文字 35 | }, 36 | ], 37 | // parseInt转换string常需要带上基数 38 | radix: 0, 39 | // 正则使用转义字符 40 | 'no-useless-escape': 0, 41 | // 仅强制执行对象解构,但不强制执行数组解构 42 | 'prefer-destructuring': [2, { object: true, array: false }], 43 | // 禁止空块语句 44 | 'no-empty': 0, 45 | // 允许函数存在未使用的参数 46 | 'no-unused-vars': [0, { args: 'none' }], 47 | // 指定不希望在应用程序中使用的全局变量名称 48 | 'no-restricted-globals': 0, 49 | // 允许使用按位运算符 50 | 'no-bitwise': 0, 51 | // 根据代码分支允许函数具有不同的行为 52 | 'consistent-return': 0, 53 | // 允许循环引包 54 | 'import/no-cycle': 0, 55 | 'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off', 56 | 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off', 57 | 'import/prefer-default-export': 0, 58 | 'func-names': 0, 59 | 'no-underscore-dangle': 0, 60 | 'no-eval': 0, 61 | 'no-lonely-if': 0, 62 | // 禁止在循环中编写函数 闭包 63 | 'no-loop-func': 0, 64 | // 禁止嵌套三元表达式 65 | 'no-nested-ternary':0, 66 | // 允许不严格要求的对象文字属性名称周围的引号 67 | 'quote-props': [2, 'as-needed', { keywords: false, unnecessary: false, numbers: false }], 68 | // 禁止使用无关的包 样式报引入的路径不一样 69 | 'import/no-extraneous-dependencies':0, 70 | // 在胡子语法里使用标签符{{a < b}} 71 | 'vue/no-parsing-error': ['error', {'invalid-first-character-of-tag-name': false}], 72 | 'vue/no-unused-vars': 0, 73 | }, 74 | parserOptions: { 75 | parser: 'babel-eslint', 76 | }, 77 | }; 78 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | 4 | # local env files 5 | .env.local 6 | .env.*.local 7 | 8 | # Log files 9 | npm-debug.log* 10 | yarn-debug.log* 11 | yarn-error.log* 12 | 13 | # Editor directories and files 14 | .idea 15 | .vscode 16 | *.suo 17 | *.ntvs* 18 | *.njsproj 19 | *.sln 20 | *.sw? 21 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016-2019 David Desmaisons 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # waterwaves 2 | --- 3 | 一个vue水球插件 4 | 5 | ![演示动图](./static/soogif.gif) 6 | 7 | ## Demo 8 | 9 | http://acdtech.top/waterWaves/ 10 | 11 | ## 插件的安装 12 | 13 | ### With npm or yarn 14 | ``` 15 | npm i -S waterwaves 16 | yarn add waterwaves 17 | ``` 18 | 19 | ### 引入插件 20 | ``` 21 | import WaterWaves from 'waterwaves' 22 | 23 | Vue.use(WaterWaves) 24 | ``` 25 | or 26 | ``` 27 | 28 | ``` 29 | 30 | ### 基本用法 31 | ``` 32 | 33 | ``` 34 | or 35 | ``` 36 | 37 | 46 | ``` 47 | 48 | ### API 49 | 50 | 参数|说明|类型|默认值 51 | -|-|-|- 52 | v-model|绑定值(液面高度百分比)|String\|Number|50 53 | options|配置选项|Object|见下表 54 | 55 | #### options 56 | 57 | 参数|说明|类型|默认值 58 | -|-|-|- 59 | wrapW|外边距|Number|3 60 | cW|宽|Number|130 61 | cH|高|Number|130 62 | baseY|液面高度|Number|20 63 | nowRange|液面起始位置|Number|0 64 | lineColor|线条颜色|string|'rgb(176,204,53)' 65 | oneColor|上层颜色|string|'rgba(176,204,53,.6)' 66 | twoColor|底层颜色|string|'rgba(176,204,53,.4)' 67 | oneWaveWidth|上层波长(数越小越宽)|Number|0.06 68 | twoWaveWidth|底层波长|Number|0.06 69 | oneWaveHeight|上层波峰(数越大越高)|Number|4 70 | twoWaveHeight|底层波峰|Number|4 71 | oneOffsetX|上层波浪x轴偏移量|Number|10 72 | oneOffsetX|底层波浪x轴偏移量|Number|20 73 | speed|波浪滚动速度(数越大越快)|Number|0.2 74 | 75 | #### event 76 | 事件名称|说明|回调参数 77 | -|-|- 78 | change|在v-model值改变时触发|(value: number\|string) -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [ 3 | '@vue/app' 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /docs/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acdseen/waterWaves/7ac69406343b2e6de0a0c5001ee4ddc61b6c9216/docs/favicon.ico -------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- 1 | waterwaves
-------------------------------------------------------------------------------- /docs/js/app.cad4b562.js: -------------------------------------------------------------------------------- 1 | (function(e){function t(t){for(var r,i,l=t[0],c=t[1],s=t[2],f=0,p=[];fn.baseY&&(n.nowRange-=t),i(o,n.oneOffsetX,n.oneWaveWidth,n.oneWaveHeight,n.oneColor),i(o,n.twoOffsetX,n.twoWaveWidth,n.twoWaveHeight,n.twoColor),n.oneOffsetX+=n.speed,n.twoOffsetX+=n.speed}()};l()}),p=f;function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function h(e){for(var t=1;t options.baseY) {\r\n options.nowRange -= tmp;\r\n }\r\n makeLiquaid(\r\n ctx,\r\n options.oneOffsetX,\r\n options.oneWaveWidth,\r\n options.oneWaveHeight,\r\n options.oneColor\r\n );\r\n makeLiquaid(\r\n ctx,\r\n options.twoOffsetX,\r\n options.twoWaveWidth,\r\n options.twoWaveHeight,\r\n options.twoColor\r\n );\r\n\r\n options.oneOffsetX += options.speed;\r\n options.twoOffsetX += options.speed;\r\n })();\r\n };\r\n init();\r\n};\r\n\r\nexport default WaterPolo;\r\n","\r\n\r\n\r\n\r\n\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./waterwaves.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./waterwaves.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./waterwaves.vue?vue&type=template&id=f14cfab4&\"\nimport script from \"./waterwaves.vue?vue&type=script&lang=js&\"\nexport * from \"./waterwaves.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","import WaterWaves from './waterwaves.vue'\r\n\r\nWaterWaves.install = function(Vue) {\r\n Vue.component(WaterWaves.name, WaterWaves);\r\n};\r\n\r\nexport default WaterWaves;","\r\n\r\n\r\n\r\n\r\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./index.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./index.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./index.vue?vue&type=template&id=f0b562b2&\"\nimport script from \"./index.vue?vue&type=script&lang=js&\"\nexport * from \"./index.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","\r\n\r\n\r\n\r\n\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./App.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./App.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./App.vue?vue&type=template&id=4e97c248&\"\nimport script from \"./App.vue?vue&type=script&lang=js&\"\nexport * from \"./App.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","import Vue from 'vue'\r\nimport App from './App.vue'\r\n\r\nVue.config.productionTip = false\r\n\r\nnew Vue({\r\n render: h => h(App),\r\n}).$mount('#app')\r\n"],"sourceRoot":""} -------------------------------------------------------------------------------- /lib/waterwaves.umd.min.js: -------------------------------------------------------------------------------- 1 | (function(t,e){"object"===typeof exports&&"object"===typeof module?module.exports=e():"function"===typeof define&&define.amd?define([],e):"object"===typeof exports?exports["waterwaves"]=e():t["waterwaves"]=e()})("undefined"!==typeof self?self:this,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s="fb15")}({"01f9":function(t,e,n){"use strict";var r=n("2d00"),o=n("5ca1"),i=n("2aba"),c=n("32e9"),a=n("84f2"),u=n("41a0"),f=n("7f20"),s=n("38fd"),p=n("2b4c")("iterator"),l=!([].keys&&"next"in[].keys()),v="@@iterator",d="keys",b="values",h=function(){return this};t.exports=function(t,e,n,y,g,w,O){u(n,e,y);var m,x,_,S=function(t){if(!l&&t in T)return T[t];switch(t){case d:return function(){return new n(this,t)};case b:return function(){return new n(this,t)}}return function(){return new n(this,t)}},j=e+" Iterator",P=g==b,E=!1,T=t.prototype,I=T[p]||T[v]||g&&T[g],L=I||S(g),M=g?P?S("entries"):L:void 0,W="Array"==e&&T.entries||I;if(W&&(_=s(W.call(new t)),_!==Object.prototype&&_.next&&(f(_,j,!0),r||"function"==typeof _[p]||c(_,p,h))),P&&I&&I.name!==b&&(E=!0,L=function(){return I.call(this)}),r&&!O||!l&&!E&&T[p]||c(T,p,L),a[e]=L,a[j]=h,g)if(m={values:P?L:S(b),keys:w?L:S(d),entries:M},O)for(x in m)x in T||i(T,x,m[x]);else o(o.P+o.F*(l||E),e,m);return m}},"0d58":function(t,e,n){var r=n("ce10"),o=n("e11e");t.exports=Object.keys||function(t){return r(t,o)}},"11e9":function(t,e,n){var r=n("52a7"),o=n("4630"),i=n("6821"),c=n("6a99"),a=n("69a8"),u=n("c69a"),f=Object.getOwnPropertyDescriptor;e.f=n("9e1e")?f:function(t,e){if(t=i(t),e=c(e,!0),u)try{return f(t,e)}catch(n){}if(a(t,e))return o(!r.f.call(t,e),t[e])}},1495:function(t,e,n){var r=n("86cc"),o=n("cb7c"),i=n("0d58");t.exports=n("9e1e")?Object.defineProperties:function(t,e){o(t);var n,c=i(e),a=c.length,u=0;while(a>u)r.f(t,n=c[u++],e[n]);return t}},"230e":function(t,e,n){var r=n("d3f4"),o=n("7726").document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},2621:function(t,e){e.f=Object.getOwnPropertySymbols},"2aba":function(t,e,n){var r=n("7726"),o=n("32e9"),i=n("69a8"),c=n("ca5a")("src"),a=n("fa5b"),u="toString",f=(""+a).split(u);n("8378").inspectSource=function(t){return a.call(t)},(t.exports=function(t,e,n,a){var u="function"==typeof n;u&&(i(n,"name")||o(n,"name",e)),t[e]!==n&&(u&&(i(n,c)||o(n,c,t[e]?""+t[e]:f.join(String(e)))),t===r?t[e]=n:a?t[e]?t[e]=n:o(t,e,n):(delete t[e],o(t,e,n)))})(Function.prototype,u,(function(){return"function"==typeof this&&this[c]||a.call(this)}))},"2aeb":function(t,e,n){var r=n("cb7c"),o=n("1495"),i=n("e11e"),c=n("613b")("IE_PROTO"),a=function(){},u="prototype",f=function(){var t,e=n("230e")("iframe"),r=i.length,o="<",c=">";e.style.display="none",n("fab2").appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write(o+"script"+c+"document.F=Object"+o+"/script"+c),t.close(),f=t.F;while(r--)delete f[u][i[r]];return f()};t.exports=Object.create||function(t,e){var n;return null!==t?(a[u]=r(t),n=new a,a[u]=null,n[c]=t):n=f(),void 0===e?n:o(n,e)}},"2b4c":function(t,e,n){var r=n("5537")("wks"),o=n("ca5a"),i=n("7726").Symbol,c="function"==typeof i,a=t.exports=function(t){return r[t]||(r[t]=c&&i[t]||(c?i:o)("Symbol."+t))};a.store=r},"2d00":function(t,e){t.exports=!1},"2d95":function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},"32e9":function(t,e,n){var r=n("86cc"),o=n("4630");t.exports=n("9e1e")?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},"36bd":function(t,e,n){"use strict";var r=n("4bf8"),o=n("77f1"),i=n("9def");t.exports=function(t){var e=r(this),n=i(e.length),c=arguments.length,a=o(c>1?arguments[1]:void 0,n),u=c>2?arguments[2]:void 0,f=void 0===u?n:o(u,n);while(f>a)e[a++]=t;return e}},"38fd":function(t,e,n){var r=n("69a8"),o=n("4bf8"),i=n("613b")("IE_PROTO"),c=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=o(t),r(t,i)?t[i]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?c:null}},"41a0":function(t,e,n){"use strict";var r=n("2aeb"),o=n("4630"),i=n("7f20"),c={};n("32e9")(c,n("2b4c")("iterator"),(function(){return this})),t.exports=function(t,e,n){t.prototype=r(c,{next:o(1,n)}),i(t,e+" Iterator")}},"456d":function(t,e,n){var r=n("4bf8"),o=n("0d58");n("5eda")("keys",(function(){return function(t){return o(r(t))}}))},4588:function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},4630:function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},"4bf8":function(t,e,n){var r=n("be13");t.exports=function(t){return Object(r(t))}},"52a7":function(t,e){e.f={}.propertyIsEnumerable},5537:function(t,e,n){var r=n("8378"),o=n("7726"),i="__core-js_shared__",c=o[i]||(o[i]={});(t.exports=function(t,e){return c[t]||(c[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n("2d00")?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},"5ca1":function(t,e,n){var r=n("7726"),o=n("8378"),i=n("32e9"),c=n("2aba"),a=n("9b43"),u="prototype",f=function(t,e,n){var s,p,l,v,d=t&f.F,b=t&f.G,h=t&f.S,y=t&f.P,g=t&f.B,w=b?r:h?r[e]||(r[e]={}):(r[e]||{})[u],O=b?o:o[e]||(o[e]={}),m=O[u]||(O[u]={});for(s in b&&(n=e),n)p=!d&&w&&void 0!==w[s],l=(p?w:n)[s],v=g&&p?a(l,r):y&&"function"==typeof l?a(Function.call,l):l,w&&c(w,s,l,t&f.U),O[s]!=l&&i(O,s,v),y&&m[s]!=l&&(m[s]=l)};r.core=o,f.F=1,f.G=2,f.S=4,f.P=8,f.B=16,f.W=32,f.U=64,f.R=128,t.exports=f},"5dbc":function(t,e,n){var r=n("d3f4"),o=n("8b97").set;t.exports=function(t,e,n){var i,c=e.constructor;return c!==n&&"function"==typeof c&&(i=c.prototype)!==n.prototype&&r(i)&&o&&o(t,i),t}},"5eda":function(t,e,n){var r=n("5ca1"),o=n("8378"),i=n("79e5");t.exports=function(t,e){var n=(o.Object||{})[t]||Object[t],c={};c[t]=e(n),r(r.S+r.F*i((function(){n(1)})),"Object",c)}},"613b":function(t,e,n){var r=n("5537")("keys"),o=n("ca5a");t.exports=function(t){return r[t]||(r[t]=o(t))}},"626a":function(t,e,n){var r=n("2d95");t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},6821:function(t,e,n){var r=n("626a"),o=n("be13");t.exports=function(t){return r(o(t))}},"69a8":function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},"6a99":function(t,e,n){var r=n("d3f4");t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},"6c7b":function(t,e,n){var r=n("5ca1");r(r.P,"Array",{fill:n("36bd")}),n("9c6c")("fill")},7726:function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},"77f1":function(t,e,n){var r=n("4588"),o=Math.max,i=Math.min;t.exports=function(t,e){return t=r(t),t<0?o(t+e,0):i(t,e)}},"79e5":function(t,e){t.exports=function(t){try{return!!t()}catch(e){return!0}}},"7f20":function(t,e,n){var r=n("86cc").f,o=n("69a8"),i=n("2b4c")("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,i)&&r(t,i,{configurable:!0,value:e})}},"7f7f":function(t,e,n){var r=n("86cc").f,o=Function.prototype,i=/^\s*function ([^ (]*)/,c="name";c in o||n("9e1e")&&r(o,c,{configurable:!0,get:function(){try{return(""+this).match(i)[1]}catch(t){return""}}})},8378:function(t,e){var n=t.exports={version:"2.6.11"};"number"==typeof __e&&(__e=n)},"84f2":function(t,e){t.exports={}},"86cc":function(t,e,n){var r=n("cb7c"),o=n("c69a"),i=n("6a99"),c=Object.defineProperty;e.f=n("9e1e")?Object.defineProperty:function(t,e,n){if(r(t),e=i(e,!0),r(n),o)try{return c(t,e,n)}catch(a){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},"8b97":function(t,e,n){var r=n("d3f4"),o=n("cb7c"),i=function(t,e){if(o(t),!r(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,r){try{r=n("9b43")(Function.call,n("11e9").f(Object.prototype,"__proto__").set,2),r(t,[]),e=!(t instanceof Array)}catch(o){e=!0}return function(t,n){return i(t,n),e?t.__proto__=n:r(t,n),t}}({},!1):void 0),check:i}},"8e6e":function(t,e,n){var r=n("5ca1"),o=n("990b"),i=n("6821"),c=n("11e9"),a=n("f1ae");r(r.S,"Object",{getOwnPropertyDescriptors:function(t){var e,n,r=i(t),u=c.f,f=o(r),s={},p=0;while(f.length>p)n=u(r,e=f[p++]),void 0!==n&&a(s,e,n);return s}})},9093:function(t,e,n){var r=n("ce10"),o=n("e11e").concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},"990b":function(t,e,n){var r=n("9093"),o=n("2621"),i=n("cb7c"),c=n("7726").Reflect;t.exports=c&&c.ownKeys||function(t){var e=r.f(i(t)),n=o.f;return n?e.concat(n(t)):e}},"9b43":function(t,e,n){var r=n("d8e8");t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},"9c6c":function(t,e,n){var r=n("2b4c")("unscopables"),o=Array.prototype;void 0==o[r]&&n("32e9")(o,r,{}),t.exports=function(t){o[r][t]=!0}},"9def":function(t,e,n){var r=n("4588"),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},"9e1e":function(t,e,n){t.exports=!n("79e5")((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},aa77:function(t,e,n){var r=n("5ca1"),o=n("be13"),i=n("79e5"),c=n("fdef"),a="["+c+"]",u="​…",f=RegExp("^"+a+a+"*"),s=RegExp(a+a+"*$"),p=function(t,e,n){var o={},a=i((function(){return!!c[t]()||u[t]()!=u})),f=o[t]=a?e(l):c[t];n&&(o[n]=f),r(r.P+r.F*a,"String",o)},l=p.trim=function(t,e){return t=String(o(t)),1&e&&(t=t.replace(f,"")),2&e&&(t=t.replace(s,"")),t};t.exports=p},ac6a:function(t,e,n){for(var r=n("cadf"),o=n("0d58"),i=n("2aba"),c=n("7726"),a=n("32e9"),u=n("84f2"),f=n("2b4c"),s=f("iterator"),p=f("toStringTag"),l=u.Array,v={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},d=o(v),b=0;bs)if(a=u[s++],a!=a)return!0}else for(;f>s;s++)if((t||s in u)&&u[s]===n)return t||s||0;return!t&&-1}}},c5f6:function(t,e,n){"use strict";var r=n("7726"),o=n("69a8"),i=n("2d95"),c=n("5dbc"),a=n("6a99"),u=n("79e5"),f=n("9093").f,s=n("11e9").f,p=n("86cc").f,l=n("aa77").trim,v="Number",d=r[v],b=d,h=d.prototype,y=i(n("2aeb")(h))==v,g="trim"in String.prototype,w=function(t){var e=a(t,!1);if("string"==typeof e&&e.length>2){e=g?e.trim():l(e,3);var n,r,o,i=e.charCodeAt(0);if(43===i||45===i){if(n=e.charCodeAt(2),88===n||120===n)return NaN}else if(48===i){switch(e.charCodeAt(1)){case 66:case 98:r=2,o=49;break;case 79:case 111:r=8,o=55;break;default:return+e}for(var c,u=e.slice(2),f=0,s=u.length;fo)return NaN;return parseInt(u,r)}}return+e};if(!d(" 0o1")||!d("0b1")||d("+0x1")){d=function(t){var e=arguments.length<1?0:t,n=this;return n instanceof d&&(y?u((function(){h.valueOf.call(n)})):i(n)!=v)?c(new b(w(e)),n,d):w(e)};for(var O,m=n("9e1e")?f(b):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),x=0;m.length>x;x++)o(b,O=m[x])&&!o(d,O)&&p(d,O,s(b,O));d.prototype=h,h.constructor=d,n("2aba")(r,v,d)}},c69a:function(t,e,n){t.exports=!n("9e1e")&&!n("79e5")((function(){return 7!=Object.defineProperty(n("230e")("div"),"a",{get:function(){return 7}}).a}))},ca5a:function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},cadf:function(t,e,n){"use strict";var r=n("9c6c"),o=n("d53b"),i=n("84f2"),c=n("6821");t.exports=n("01f9")(Array,"Array",(function(t,e){this._t=c(t),this._i=0,this._k=e}),(function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,o(1)):o(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])}),"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},cb7c:function(t,e,n){var r=n("d3f4");t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},ce10:function(t,e,n){var r=n("69a8"),o=n("6821"),i=n("c366")(!1),c=n("613b")("IE_PROTO");t.exports=function(t,e){var n,a=o(t),u=0,f=[];for(n in a)n!=c&&r(a,n)&&f.push(n);while(e.length>u)r(a,n=e[u++])&&(~i(f,n)||f.push(n));return f}},d3f4:function(t,e){t.exports=function(t){return"object"===typeof t?null!==t:"function"===typeof t}},d53b:function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},d8e8:function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},e11e:function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},f1ae:function(t,e,n){"use strict";var r=n("86cc"),o=n("4630");t.exports=function(t,e,n){e in t?r.f(t,e,o(0,n)):t[e]=n}},f6fd:function(t,e){(function(t){var e="currentScript",n=t.getElementsByTagName("script");e in t||Object.defineProperty(t,e,{get:function(){try{throw new Error}catch(r){var t,e=(/.*at [^\(]*\((.*):.+:.+\)$/gi.exec(r.stack)||[!1])[1];for(t in n)if(n[t].src==e||"interactive"==n[t].readyState)return n[t];return null}}})})(document)},fa5b:function(t,e,n){t.exports=n("5537")("native-function-to-string",Function.toString)},fab2:function(t,e,n){var r=n("7726").document;t.exports=r&&r.documentElement},fb15:function(t,e,n){"use strict";var r;(n.r(e),"undefined"!==typeof window)&&(n("f6fd"),(r=window.document.currentScript)&&(r=r.src.match(/(.+\/)[^/]+\.js(\?.*)?$/))&&(n.p=r[1]));n("7f7f");var o=function(){var t=this,e=t.$createElement;t._self._c;return t._m(0)},i=[function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"waterwaves"},[n("canvas",{attrs:{id:"canvas",width:"400px",height:"400px"}})])}];n("8e6e");function c(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n("ac6a"),n("cadf"),n("456d"),n("c5f6"),n("6c7b");var a=function(t,e){e=e||{};var n={wrapW:3,cW:130,cH:130,lineWidth:2,baseY:20,nowRange:0,lineColor:"rgb(176,204,53)",oneColor:"rgba(176,204,53,.6)",twoColor:"rgba(176,204,53,.4)",oneWaveWidth:.06,twoWaveWidth:.06,oneWaveHeight:4,twoWaveHeight:4,oneOffsetX:10,twoOffsetX:20,speed:.2},r=null,o=null;Object.defineProperty(this,"options",{get:function(){return n},set:function(t){i(t,n)}});var i=function(t,e){Object.keys(t).forEach((function(n){e[n]=t[n]}))},c=function(t,e,r,o,i){t.save();var c=[];t.beginPath();for(var a=0;an.baseY&&(n.nowRange-=e),c(o,n.oneOffsetX,n.oneWaveWidth,n.oneWaveHeight,n.oneColor),c(o,n.twoOffsetX,n.twoWaveWidth,n.twoWaveHeight,n.twoColor),n.oneOffsetX+=n.speed,n.twoOffsetX+=n.speed}()};a()},u=a;function f(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function s(t){for(var e=1;e 1%", 68 | "last 2 versions" 69 | ] 70 | } 71 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acdseen/waterWaves/7ac69406343b2e6de0a0c5001ee4ddc61b6c9216/public/favicon.ico -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | waterwaves 9 | 10 | 11 | 14 |
15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /publish.sh: -------------------------------------------------------------------------------- 1 | npm run build 2 | rm ./lib/demo.html 3 | rm ./scripts/demo.html 4 | npm publish 5 | -------------------------------------------------------------------------------- /scripts/WaterPolo.common.js: -------------------------------------------------------------------------------- 1 | module.exports = 2 | /******/ (function(modules) { // webpackBootstrap 3 | /******/ // The module cache 4 | /******/ var installedModules = {}; 5 | /******/ 6 | /******/ // The require function 7 | /******/ function __webpack_require__(moduleId) { 8 | /******/ 9 | /******/ // Check if module is in cache 10 | /******/ if(installedModules[moduleId]) { 11 | /******/ return installedModules[moduleId].exports; 12 | /******/ } 13 | /******/ // Create a new module (and put it into the cache) 14 | /******/ var module = installedModules[moduleId] = { 15 | /******/ i: moduleId, 16 | /******/ l: false, 17 | /******/ exports: {} 18 | /******/ }; 19 | /******/ 20 | /******/ // Execute the module function 21 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 22 | /******/ 23 | /******/ // Flag the module as loaded 24 | /******/ module.l = true; 25 | /******/ 26 | /******/ // Return the exports of the module 27 | /******/ return module.exports; 28 | /******/ } 29 | /******/ 30 | /******/ 31 | /******/ // expose the modules object (__webpack_modules__) 32 | /******/ __webpack_require__.m = modules; 33 | /******/ 34 | /******/ // expose the module cache 35 | /******/ __webpack_require__.c = installedModules; 36 | /******/ 37 | /******/ // define getter function for harmony exports 38 | /******/ __webpack_require__.d = function(exports, name, getter) { 39 | /******/ if(!__webpack_require__.o(exports, name)) { 40 | /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); 41 | /******/ } 42 | /******/ }; 43 | /******/ 44 | /******/ // define __esModule on exports 45 | /******/ __webpack_require__.r = function(exports) { 46 | /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { 47 | /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); 48 | /******/ } 49 | /******/ Object.defineProperty(exports, '__esModule', { value: true }); 50 | /******/ }; 51 | /******/ 52 | /******/ // create a fake namespace object 53 | /******/ // mode & 1: value is a module id, require it 54 | /******/ // mode & 2: merge all properties of value into the ns 55 | /******/ // mode & 4: return value when already ns object 56 | /******/ // mode & 8|1: behave like require 57 | /******/ __webpack_require__.t = function(value, mode) { 58 | /******/ if(mode & 1) value = __webpack_require__(value); 59 | /******/ if(mode & 8) return value; 60 | /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; 61 | /******/ var ns = Object.create(null); 62 | /******/ __webpack_require__.r(ns); 63 | /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); 64 | /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); 65 | /******/ return ns; 66 | /******/ }; 67 | /******/ 68 | /******/ // getDefaultExport function for compatibility with non-harmony modules 69 | /******/ __webpack_require__.n = function(module) { 70 | /******/ var getter = module && module.__esModule ? 71 | /******/ function getDefault() { return module['default']; } : 72 | /******/ function getModuleExports() { return module; }; 73 | /******/ __webpack_require__.d(getter, 'a', getter); 74 | /******/ return getter; 75 | /******/ }; 76 | /******/ 77 | /******/ // Object.prototype.hasOwnProperty.call 78 | /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; 79 | /******/ 80 | /******/ // __webpack_public_path__ 81 | /******/ __webpack_require__.p = ""; 82 | /******/ 83 | /******/ 84 | /******/ // Load entry module and return exports 85 | /******/ return __webpack_require__(__webpack_require__.s = "fb15"); 86 | /******/ }) 87 | /************************************************************************/ 88 | /******/ ({ 89 | 90 | /***/ "01f9": 91 | /***/ (function(module, exports, __webpack_require__) { 92 | 93 | "use strict"; 94 | 95 | var LIBRARY = __webpack_require__("2d00"); 96 | var $export = __webpack_require__("5ca1"); 97 | var redefine = __webpack_require__("2aba"); 98 | var hide = __webpack_require__("32e9"); 99 | var Iterators = __webpack_require__("84f2"); 100 | var $iterCreate = __webpack_require__("41a0"); 101 | var setToStringTag = __webpack_require__("7f20"); 102 | var getPrototypeOf = __webpack_require__("38fd"); 103 | var ITERATOR = __webpack_require__("2b4c")('iterator'); 104 | var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next` 105 | var FF_ITERATOR = '@@iterator'; 106 | var KEYS = 'keys'; 107 | var VALUES = 'values'; 108 | 109 | var returnThis = function () { return this; }; 110 | 111 | module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) { 112 | $iterCreate(Constructor, NAME, next); 113 | var getMethod = function (kind) { 114 | if (!BUGGY && kind in proto) return proto[kind]; 115 | switch (kind) { 116 | case KEYS: return function keys() { return new Constructor(this, kind); }; 117 | case VALUES: return function values() { return new Constructor(this, kind); }; 118 | } return function entries() { return new Constructor(this, kind); }; 119 | }; 120 | var TAG = NAME + ' Iterator'; 121 | var DEF_VALUES = DEFAULT == VALUES; 122 | var VALUES_BUG = false; 123 | var proto = Base.prototype; 124 | var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]; 125 | var $default = $native || getMethod(DEFAULT); 126 | var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined; 127 | var $anyNative = NAME == 'Array' ? proto.entries || $native : $native; 128 | var methods, key, IteratorPrototype; 129 | // Fix native 130 | if ($anyNative) { 131 | IteratorPrototype = getPrototypeOf($anyNative.call(new Base())); 132 | if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) { 133 | // Set @@toStringTag to native iterators 134 | setToStringTag(IteratorPrototype, TAG, true); 135 | // fix for some old engines 136 | if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis); 137 | } 138 | } 139 | // fix Array#{values, @@iterator}.name in V8 / FF 140 | if (DEF_VALUES && $native && $native.name !== VALUES) { 141 | VALUES_BUG = true; 142 | $default = function values() { return $native.call(this); }; 143 | } 144 | // Define iterator 145 | if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) { 146 | hide(proto, ITERATOR, $default); 147 | } 148 | // Plug for library 149 | Iterators[NAME] = $default; 150 | Iterators[TAG] = returnThis; 151 | if (DEFAULT) { 152 | methods = { 153 | values: DEF_VALUES ? $default : getMethod(VALUES), 154 | keys: IS_SET ? $default : getMethod(KEYS), 155 | entries: $entries 156 | }; 157 | if (FORCED) for (key in methods) { 158 | if (!(key in proto)) redefine(proto, key, methods[key]); 159 | } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); 160 | } 161 | return methods; 162 | }; 163 | 164 | 165 | /***/ }), 166 | 167 | /***/ "0d58": 168 | /***/ (function(module, exports, __webpack_require__) { 169 | 170 | // 19.1.2.14 / 15.2.3.14 Object.keys(O) 171 | var $keys = __webpack_require__("ce10"); 172 | var enumBugKeys = __webpack_require__("e11e"); 173 | 174 | module.exports = Object.keys || function keys(O) { 175 | return $keys(O, enumBugKeys); 176 | }; 177 | 178 | 179 | /***/ }), 180 | 181 | /***/ "1495": 182 | /***/ (function(module, exports, __webpack_require__) { 183 | 184 | var dP = __webpack_require__("86cc"); 185 | var anObject = __webpack_require__("cb7c"); 186 | var getKeys = __webpack_require__("0d58"); 187 | 188 | module.exports = __webpack_require__("9e1e") ? Object.defineProperties : function defineProperties(O, Properties) { 189 | anObject(O); 190 | var keys = getKeys(Properties); 191 | var length = keys.length; 192 | var i = 0; 193 | var P; 194 | while (length > i) dP.f(O, P = keys[i++], Properties[P]); 195 | return O; 196 | }; 197 | 198 | 199 | /***/ }), 200 | 201 | /***/ "230e": 202 | /***/ (function(module, exports, __webpack_require__) { 203 | 204 | var isObject = __webpack_require__("d3f4"); 205 | var document = __webpack_require__("7726").document; 206 | // typeof document.createElement is 'object' in old IE 207 | var is = isObject(document) && isObject(document.createElement); 208 | module.exports = function (it) { 209 | return is ? document.createElement(it) : {}; 210 | }; 211 | 212 | 213 | /***/ }), 214 | 215 | /***/ "2aba": 216 | /***/ (function(module, exports, __webpack_require__) { 217 | 218 | var global = __webpack_require__("7726"); 219 | var hide = __webpack_require__("32e9"); 220 | var has = __webpack_require__("69a8"); 221 | var SRC = __webpack_require__("ca5a")('src'); 222 | var $toString = __webpack_require__("fa5b"); 223 | var TO_STRING = 'toString'; 224 | var TPL = ('' + $toString).split(TO_STRING); 225 | 226 | __webpack_require__("8378").inspectSource = function (it) { 227 | return $toString.call(it); 228 | }; 229 | 230 | (module.exports = function (O, key, val, safe) { 231 | var isFunction = typeof val == 'function'; 232 | if (isFunction) has(val, 'name') || hide(val, 'name', key); 233 | if (O[key] === val) return; 234 | if (isFunction) has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key))); 235 | if (O === global) { 236 | O[key] = val; 237 | } else if (!safe) { 238 | delete O[key]; 239 | hide(O, key, val); 240 | } else if (O[key]) { 241 | O[key] = val; 242 | } else { 243 | hide(O, key, val); 244 | } 245 | // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative 246 | })(Function.prototype, TO_STRING, function toString() { 247 | return typeof this == 'function' && this[SRC] || $toString.call(this); 248 | }); 249 | 250 | 251 | /***/ }), 252 | 253 | /***/ "2aeb": 254 | /***/ (function(module, exports, __webpack_require__) { 255 | 256 | // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) 257 | var anObject = __webpack_require__("cb7c"); 258 | var dPs = __webpack_require__("1495"); 259 | var enumBugKeys = __webpack_require__("e11e"); 260 | var IE_PROTO = __webpack_require__("613b")('IE_PROTO'); 261 | var Empty = function () { /* empty */ }; 262 | var PROTOTYPE = 'prototype'; 263 | 264 | // Create object with fake `null` prototype: use iframe Object with cleared prototype 265 | var createDict = function () { 266 | // Thrash, waste and sodomy: IE GC bug 267 | var iframe = __webpack_require__("230e")('iframe'); 268 | var i = enumBugKeys.length; 269 | var lt = '<'; 270 | var gt = '>'; 271 | var iframeDocument; 272 | iframe.style.display = 'none'; 273 | __webpack_require__("fab2").appendChild(iframe); 274 | iframe.src = 'javascript:'; // eslint-disable-line no-script-url 275 | // createDict = iframe.contentWindow.Object; 276 | // html.removeChild(iframe); 277 | iframeDocument = iframe.contentWindow.document; 278 | iframeDocument.open(); 279 | iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); 280 | iframeDocument.close(); 281 | createDict = iframeDocument.F; 282 | while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]]; 283 | return createDict(); 284 | }; 285 | 286 | module.exports = Object.create || function create(O, Properties) { 287 | var result; 288 | if (O !== null) { 289 | Empty[PROTOTYPE] = anObject(O); 290 | result = new Empty(); 291 | Empty[PROTOTYPE] = null; 292 | // add "__proto__" for Object.getPrototypeOf polyfill 293 | result[IE_PROTO] = O; 294 | } else result = createDict(); 295 | return Properties === undefined ? result : dPs(result, Properties); 296 | }; 297 | 298 | 299 | /***/ }), 300 | 301 | /***/ "2b4c": 302 | /***/ (function(module, exports, __webpack_require__) { 303 | 304 | var store = __webpack_require__("5537")('wks'); 305 | var uid = __webpack_require__("ca5a"); 306 | var Symbol = __webpack_require__("7726").Symbol; 307 | var USE_SYMBOL = typeof Symbol == 'function'; 308 | 309 | var $exports = module.exports = function (name) { 310 | return store[name] || (store[name] = 311 | USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)); 312 | }; 313 | 314 | $exports.store = store; 315 | 316 | 317 | /***/ }), 318 | 319 | /***/ "2d00": 320 | /***/ (function(module, exports) { 321 | 322 | module.exports = false; 323 | 324 | 325 | /***/ }), 326 | 327 | /***/ "2d95": 328 | /***/ (function(module, exports) { 329 | 330 | var toString = {}.toString; 331 | 332 | module.exports = function (it) { 333 | return toString.call(it).slice(8, -1); 334 | }; 335 | 336 | 337 | /***/ }), 338 | 339 | /***/ "32e9": 340 | /***/ (function(module, exports, __webpack_require__) { 341 | 342 | var dP = __webpack_require__("86cc"); 343 | var createDesc = __webpack_require__("4630"); 344 | module.exports = __webpack_require__("9e1e") ? function (object, key, value) { 345 | return dP.f(object, key, createDesc(1, value)); 346 | } : function (object, key, value) { 347 | object[key] = value; 348 | return object; 349 | }; 350 | 351 | 352 | /***/ }), 353 | 354 | /***/ "36bd": 355 | /***/ (function(module, exports, __webpack_require__) { 356 | 357 | "use strict"; 358 | // 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) 359 | 360 | var toObject = __webpack_require__("4bf8"); 361 | var toAbsoluteIndex = __webpack_require__("77f1"); 362 | var toLength = __webpack_require__("9def"); 363 | module.exports = function fill(value /* , start = 0, end = @length */) { 364 | var O = toObject(this); 365 | var length = toLength(O.length); 366 | var aLen = arguments.length; 367 | var index = toAbsoluteIndex(aLen > 1 ? arguments[1] : undefined, length); 368 | var end = aLen > 2 ? arguments[2] : undefined; 369 | var endPos = end === undefined ? length : toAbsoluteIndex(end, length); 370 | while (endPos > index) O[index++] = value; 371 | return O; 372 | }; 373 | 374 | 375 | /***/ }), 376 | 377 | /***/ "38fd": 378 | /***/ (function(module, exports, __webpack_require__) { 379 | 380 | // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) 381 | var has = __webpack_require__("69a8"); 382 | var toObject = __webpack_require__("4bf8"); 383 | var IE_PROTO = __webpack_require__("613b")('IE_PROTO'); 384 | var ObjectProto = Object.prototype; 385 | 386 | module.exports = Object.getPrototypeOf || function (O) { 387 | O = toObject(O); 388 | if (has(O, IE_PROTO)) return O[IE_PROTO]; 389 | if (typeof O.constructor == 'function' && O instanceof O.constructor) { 390 | return O.constructor.prototype; 391 | } return O instanceof Object ? ObjectProto : null; 392 | }; 393 | 394 | 395 | /***/ }), 396 | 397 | /***/ "41a0": 398 | /***/ (function(module, exports, __webpack_require__) { 399 | 400 | "use strict"; 401 | 402 | var create = __webpack_require__("2aeb"); 403 | var descriptor = __webpack_require__("4630"); 404 | var setToStringTag = __webpack_require__("7f20"); 405 | var IteratorPrototype = {}; 406 | 407 | // 25.1.2.1.1 %IteratorPrototype%[@@iterator]() 408 | __webpack_require__("32e9")(IteratorPrototype, __webpack_require__("2b4c")('iterator'), function () { return this; }); 409 | 410 | module.exports = function (Constructor, NAME, next) { 411 | Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) }); 412 | setToStringTag(Constructor, NAME + ' Iterator'); 413 | }; 414 | 415 | 416 | /***/ }), 417 | 418 | /***/ "456d": 419 | /***/ (function(module, exports, __webpack_require__) { 420 | 421 | // 19.1.2.14 Object.keys(O) 422 | var toObject = __webpack_require__("4bf8"); 423 | var $keys = __webpack_require__("0d58"); 424 | 425 | __webpack_require__("5eda")('keys', function () { 426 | return function keys(it) { 427 | return $keys(toObject(it)); 428 | }; 429 | }); 430 | 431 | 432 | /***/ }), 433 | 434 | /***/ "4588": 435 | /***/ (function(module, exports) { 436 | 437 | // 7.1.4 ToInteger 438 | var ceil = Math.ceil; 439 | var floor = Math.floor; 440 | module.exports = function (it) { 441 | return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); 442 | }; 443 | 444 | 445 | /***/ }), 446 | 447 | /***/ "4630": 448 | /***/ (function(module, exports) { 449 | 450 | module.exports = function (bitmap, value) { 451 | return { 452 | enumerable: !(bitmap & 1), 453 | configurable: !(bitmap & 2), 454 | writable: !(bitmap & 4), 455 | value: value 456 | }; 457 | }; 458 | 459 | 460 | /***/ }), 461 | 462 | /***/ "4bf8": 463 | /***/ (function(module, exports, __webpack_require__) { 464 | 465 | // 7.1.13 ToObject(argument) 466 | var defined = __webpack_require__("be13"); 467 | module.exports = function (it) { 468 | return Object(defined(it)); 469 | }; 470 | 471 | 472 | /***/ }), 473 | 474 | /***/ "5537": 475 | /***/ (function(module, exports, __webpack_require__) { 476 | 477 | var core = __webpack_require__("8378"); 478 | var global = __webpack_require__("7726"); 479 | var SHARED = '__core-js_shared__'; 480 | var store = global[SHARED] || (global[SHARED] = {}); 481 | 482 | (module.exports = function (key, value) { 483 | return store[key] || (store[key] = value !== undefined ? value : {}); 484 | })('versions', []).push({ 485 | version: core.version, 486 | mode: __webpack_require__("2d00") ? 'pure' : 'global', 487 | copyright: '© 2019 Denis Pushkarev (zloirock.ru)' 488 | }); 489 | 490 | 491 | /***/ }), 492 | 493 | /***/ "5ca1": 494 | /***/ (function(module, exports, __webpack_require__) { 495 | 496 | var global = __webpack_require__("7726"); 497 | var core = __webpack_require__("8378"); 498 | var hide = __webpack_require__("32e9"); 499 | var redefine = __webpack_require__("2aba"); 500 | var ctx = __webpack_require__("9b43"); 501 | var PROTOTYPE = 'prototype'; 502 | 503 | var $export = function (type, name, source) { 504 | var IS_FORCED = type & $export.F; 505 | var IS_GLOBAL = type & $export.G; 506 | var IS_STATIC = type & $export.S; 507 | var IS_PROTO = type & $export.P; 508 | var IS_BIND = type & $export.B; 509 | var target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE]; 510 | var exports = IS_GLOBAL ? core : core[name] || (core[name] = {}); 511 | var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {}); 512 | var key, own, out, exp; 513 | if (IS_GLOBAL) source = name; 514 | for (key in source) { 515 | // contains in native 516 | own = !IS_FORCED && target && target[key] !== undefined; 517 | // export native or passed 518 | out = (own ? target : source)[key]; 519 | // bind timers to global for call from export context 520 | exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; 521 | // extend global 522 | if (target) redefine(target, key, out, type & $export.U); 523 | // export 524 | if (exports[key] != out) hide(exports, key, exp); 525 | if (IS_PROTO && expProto[key] != out) expProto[key] = out; 526 | } 527 | }; 528 | global.core = core; 529 | // type bitmap 530 | $export.F = 1; // forced 531 | $export.G = 2; // global 532 | $export.S = 4; // static 533 | $export.P = 8; // proto 534 | $export.B = 16; // bind 535 | $export.W = 32; // wrap 536 | $export.U = 64; // safe 537 | $export.R = 128; // real proto method for `library` 538 | module.exports = $export; 539 | 540 | 541 | /***/ }), 542 | 543 | /***/ "5eda": 544 | /***/ (function(module, exports, __webpack_require__) { 545 | 546 | // most Object methods by ES6 should accept primitives 547 | var $export = __webpack_require__("5ca1"); 548 | var core = __webpack_require__("8378"); 549 | var fails = __webpack_require__("79e5"); 550 | module.exports = function (KEY, exec) { 551 | var fn = (core.Object || {})[KEY] || Object[KEY]; 552 | var exp = {}; 553 | exp[KEY] = exec(fn); 554 | $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp); 555 | }; 556 | 557 | 558 | /***/ }), 559 | 560 | /***/ "613b": 561 | /***/ (function(module, exports, __webpack_require__) { 562 | 563 | var shared = __webpack_require__("5537")('keys'); 564 | var uid = __webpack_require__("ca5a"); 565 | module.exports = function (key) { 566 | return shared[key] || (shared[key] = uid(key)); 567 | }; 568 | 569 | 570 | /***/ }), 571 | 572 | /***/ "626a": 573 | /***/ (function(module, exports, __webpack_require__) { 574 | 575 | // fallback for non-array-like ES3 and non-enumerable old V8 strings 576 | var cof = __webpack_require__("2d95"); 577 | // eslint-disable-next-line no-prototype-builtins 578 | module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) { 579 | return cof(it) == 'String' ? it.split('') : Object(it); 580 | }; 581 | 582 | 583 | /***/ }), 584 | 585 | /***/ "6821": 586 | /***/ (function(module, exports, __webpack_require__) { 587 | 588 | // to indexed object, toObject with fallback for non-array-like ES3 strings 589 | var IObject = __webpack_require__("626a"); 590 | var defined = __webpack_require__("be13"); 591 | module.exports = function (it) { 592 | return IObject(defined(it)); 593 | }; 594 | 595 | 596 | /***/ }), 597 | 598 | /***/ "69a8": 599 | /***/ (function(module, exports) { 600 | 601 | var hasOwnProperty = {}.hasOwnProperty; 602 | module.exports = function (it, key) { 603 | return hasOwnProperty.call(it, key); 604 | }; 605 | 606 | 607 | /***/ }), 608 | 609 | /***/ "6a99": 610 | /***/ (function(module, exports, __webpack_require__) { 611 | 612 | // 7.1.1 ToPrimitive(input [, PreferredType]) 613 | var isObject = __webpack_require__("d3f4"); 614 | // instead of the ES6 spec version, we didn't implement @@toPrimitive case 615 | // and the second argument - flag - preferred type is a string 616 | module.exports = function (it, S) { 617 | if (!isObject(it)) return it; 618 | var fn, val; 619 | if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; 620 | if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val; 621 | if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; 622 | throw TypeError("Can't convert object to primitive value"); 623 | }; 624 | 625 | 626 | /***/ }), 627 | 628 | /***/ "6c7b": 629 | /***/ (function(module, exports, __webpack_require__) { 630 | 631 | // 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) 632 | var $export = __webpack_require__("5ca1"); 633 | 634 | $export($export.P, 'Array', { fill: __webpack_require__("36bd") }); 635 | 636 | __webpack_require__("9c6c")('fill'); 637 | 638 | 639 | /***/ }), 640 | 641 | /***/ "7726": 642 | /***/ (function(module, exports) { 643 | 644 | // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 645 | var global = module.exports = typeof window != 'undefined' && window.Math == Math 646 | ? window : typeof self != 'undefined' && self.Math == Math ? self 647 | // eslint-disable-next-line no-new-func 648 | : Function('return this')(); 649 | if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef 650 | 651 | 652 | /***/ }), 653 | 654 | /***/ "77f1": 655 | /***/ (function(module, exports, __webpack_require__) { 656 | 657 | var toInteger = __webpack_require__("4588"); 658 | var max = Math.max; 659 | var min = Math.min; 660 | module.exports = function (index, length) { 661 | index = toInteger(index); 662 | return index < 0 ? max(index + length, 0) : min(index, length); 663 | }; 664 | 665 | 666 | /***/ }), 667 | 668 | /***/ "79e5": 669 | /***/ (function(module, exports) { 670 | 671 | module.exports = function (exec) { 672 | try { 673 | return !!exec(); 674 | } catch (e) { 675 | return true; 676 | } 677 | }; 678 | 679 | 680 | /***/ }), 681 | 682 | /***/ "7f20": 683 | /***/ (function(module, exports, __webpack_require__) { 684 | 685 | var def = __webpack_require__("86cc").f; 686 | var has = __webpack_require__("69a8"); 687 | var TAG = __webpack_require__("2b4c")('toStringTag'); 688 | 689 | module.exports = function (it, tag, stat) { 690 | if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag }); 691 | }; 692 | 693 | 694 | /***/ }), 695 | 696 | /***/ "8378": 697 | /***/ (function(module, exports) { 698 | 699 | var core = module.exports = { version: '2.6.11' }; 700 | if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef 701 | 702 | 703 | /***/ }), 704 | 705 | /***/ "84f2": 706 | /***/ (function(module, exports) { 707 | 708 | module.exports = {}; 709 | 710 | 711 | /***/ }), 712 | 713 | /***/ "86cc": 714 | /***/ (function(module, exports, __webpack_require__) { 715 | 716 | var anObject = __webpack_require__("cb7c"); 717 | var IE8_DOM_DEFINE = __webpack_require__("c69a"); 718 | var toPrimitive = __webpack_require__("6a99"); 719 | var dP = Object.defineProperty; 720 | 721 | exports.f = __webpack_require__("9e1e") ? Object.defineProperty : function defineProperty(O, P, Attributes) { 722 | anObject(O); 723 | P = toPrimitive(P, true); 724 | anObject(Attributes); 725 | if (IE8_DOM_DEFINE) try { 726 | return dP(O, P, Attributes); 727 | } catch (e) { /* empty */ } 728 | if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); 729 | if ('value' in Attributes) O[P] = Attributes.value; 730 | return O; 731 | }; 732 | 733 | 734 | /***/ }), 735 | 736 | /***/ "9b43": 737 | /***/ (function(module, exports, __webpack_require__) { 738 | 739 | // optional / simple context binding 740 | var aFunction = __webpack_require__("d8e8"); 741 | module.exports = function (fn, that, length) { 742 | aFunction(fn); 743 | if (that === undefined) return fn; 744 | switch (length) { 745 | case 1: return function (a) { 746 | return fn.call(that, a); 747 | }; 748 | case 2: return function (a, b) { 749 | return fn.call(that, a, b); 750 | }; 751 | case 3: return function (a, b, c) { 752 | return fn.call(that, a, b, c); 753 | }; 754 | } 755 | return function (/* ...args */) { 756 | return fn.apply(that, arguments); 757 | }; 758 | }; 759 | 760 | 761 | /***/ }), 762 | 763 | /***/ "9c6c": 764 | /***/ (function(module, exports, __webpack_require__) { 765 | 766 | // 22.1.3.31 Array.prototype[@@unscopables] 767 | var UNSCOPABLES = __webpack_require__("2b4c")('unscopables'); 768 | var ArrayProto = Array.prototype; 769 | if (ArrayProto[UNSCOPABLES] == undefined) __webpack_require__("32e9")(ArrayProto, UNSCOPABLES, {}); 770 | module.exports = function (key) { 771 | ArrayProto[UNSCOPABLES][key] = true; 772 | }; 773 | 774 | 775 | /***/ }), 776 | 777 | /***/ "9def": 778 | /***/ (function(module, exports, __webpack_require__) { 779 | 780 | // 7.1.15 ToLength 781 | var toInteger = __webpack_require__("4588"); 782 | var min = Math.min; 783 | module.exports = function (it) { 784 | return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 785 | }; 786 | 787 | 788 | /***/ }), 789 | 790 | /***/ "9e1e": 791 | /***/ (function(module, exports, __webpack_require__) { 792 | 793 | // Thank's IE8 for his funny defineProperty 794 | module.exports = !__webpack_require__("79e5")(function () { 795 | return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; 796 | }); 797 | 798 | 799 | /***/ }), 800 | 801 | /***/ "ac6a": 802 | /***/ (function(module, exports, __webpack_require__) { 803 | 804 | var $iterators = __webpack_require__("cadf"); 805 | var getKeys = __webpack_require__("0d58"); 806 | var redefine = __webpack_require__("2aba"); 807 | var global = __webpack_require__("7726"); 808 | var hide = __webpack_require__("32e9"); 809 | var Iterators = __webpack_require__("84f2"); 810 | var wks = __webpack_require__("2b4c"); 811 | var ITERATOR = wks('iterator'); 812 | var TO_STRING_TAG = wks('toStringTag'); 813 | var ArrayValues = Iterators.Array; 814 | 815 | var DOMIterables = { 816 | CSSRuleList: true, // TODO: Not spec compliant, should be false. 817 | CSSStyleDeclaration: false, 818 | CSSValueList: false, 819 | ClientRectList: false, 820 | DOMRectList: false, 821 | DOMStringList: false, 822 | DOMTokenList: true, 823 | DataTransferItemList: false, 824 | FileList: false, 825 | HTMLAllCollection: false, 826 | HTMLCollection: false, 827 | HTMLFormElement: false, 828 | HTMLSelectElement: false, 829 | MediaList: true, // TODO: Not spec compliant, should be false. 830 | MimeTypeArray: false, 831 | NamedNodeMap: false, 832 | NodeList: true, 833 | PaintRequestList: false, 834 | Plugin: false, 835 | PluginArray: false, 836 | SVGLengthList: false, 837 | SVGNumberList: false, 838 | SVGPathSegList: false, 839 | SVGPointList: false, 840 | SVGStringList: false, 841 | SVGTransformList: false, 842 | SourceBufferList: false, 843 | StyleSheetList: true, // TODO: Not spec compliant, should be false. 844 | TextTrackCueList: false, 845 | TextTrackList: false, 846 | TouchList: false 847 | }; 848 | 849 | for (var collections = getKeys(DOMIterables), i = 0; i < collections.length; i++) { 850 | var NAME = collections[i]; 851 | var explicit = DOMIterables[NAME]; 852 | var Collection = global[NAME]; 853 | var proto = Collection && Collection.prototype; 854 | var key; 855 | if (proto) { 856 | if (!proto[ITERATOR]) hide(proto, ITERATOR, ArrayValues); 857 | if (!proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME); 858 | Iterators[NAME] = ArrayValues; 859 | if (explicit) for (key in $iterators) if (!proto[key]) redefine(proto, key, $iterators[key], true); 860 | } 861 | } 862 | 863 | 864 | /***/ }), 865 | 866 | /***/ "be13": 867 | /***/ (function(module, exports) { 868 | 869 | // 7.2.1 RequireObjectCoercible(argument) 870 | module.exports = function (it) { 871 | if (it == undefined) throw TypeError("Can't call method on " + it); 872 | return it; 873 | }; 874 | 875 | 876 | /***/ }), 877 | 878 | /***/ "c366": 879 | /***/ (function(module, exports, __webpack_require__) { 880 | 881 | // false -> Array#indexOf 882 | // true -> Array#includes 883 | var toIObject = __webpack_require__("6821"); 884 | var toLength = __webpack_require__("9def"); 885 | var toAbsoluteIndex = __webpack_require__("77f1"); 886 | module.exports = function (IS_INCLUDES) { 887 | return function ($this, el, fromIndex) { 888 | var O = toIObject($this); 889 | var length = toLength(O.length); 890 | var index = toAbsoluteIndex(fromIndex, length); 891 | var value; 892 | // Array#includes uses SameValueZero equality algorithm 893 | // eslint-disable-next-line no-self-compare 894 | if (IS_INCLUDES && el != el) while (length > index) { 895 | value = O[index++]; 896 | // eslint-disable-next-line no-self-compare 897 | if (value != value) return true; 898 | // Array#indexOf ignores holes, Array#includes - not 899 | } else for (;length > index; index++) if (IS_INCLUDES || index in O) { 900 | if (O[index] === el) return IS_INCLUDES || index || 0; 901 | } return !IS_INCLUDES && -1; 902 | }; 903 | }; 904 | 905 | 906 | /***/ }), 907 | 908 | /***/ "c69a": 909 | /***/ (function(module, exports, __webpack_require__) { 910 | 911 | module.exports = !__webpack_require__("9e1e") && !__webpack_require__("79e5")(function () { 912 | return Object.defineProperty(__webpack_require__("230e")('div'), 'a', { get: function () { return 7; } }).a != 7; 913 | }); 914 | 915 | 916 | /***/ }), 917 | 918 | /***/ "ca5a": 919 | /***/ (function(module, exports) { 920 | 921 | var id = 0; 922 | var px = Math.random(); 923 | module.exports = function (key) { 924 | return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); 925 | }; 926 | 927 | 928 | /***/ }), 929 | 930 | /***/ "cadf": 931 | /***/ (function(module, exports, __webpack_require__) { 932 | 933 | "use strict"; 934 | 935 | var addToUnscopables = __webpack_require__("9c6c"); 936 | var step = __webpack_require__("d53b"); 937 | var Iterators = __webpack_require__("84f2"); 938 | var toIObject = __webpack_require__("6821"); 939 | 940 | // 22.1.3.4 Array.prototype.entries() 941 | // 22.1.3.13 Array.prototype.keys() 942 | // 22.1.3.29 Array.prototype.values() 943 | // 22.1.3.30 Array.prototype[@@iterator]() 944 | module.exports = __webpack_require__("01f9")(Array, 'Array', function (iterated, kind) { 945 | this._t = toIObject(iterated); // target 946 | this._i = 0; // next index 947 | this._k = kind; // kind 948 | // 22.1.5.2.1 %ArrayIteratorPrototype%.next() 949 | }, function () { 950 | var O = this._t; 951 | var kind = this._k; 952 | var index = this._i++; 953 | if (!O || index >= O.length) { 954 | this._t = undefined; 955 | return step(1); 956 | } 957 | if (kind == 'keys') return step(0, index); 958 | if (kind == 'values') return step(0, O[index]); 959 | return step(0, [index, O[index]]); 960 | }, 'values'); 961 | 962 | // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) 963 | Iterators.Arguments = Iterators.Array; 964 | 965 | addToUnscopables('keys'); 966 | addToUnscopables('values'); 967 | addToUnscopables('entries'); 968 | 969 | 970 | /***/ }), 971 | 972 | /***/ "cb7c": 973 | /***/ (function(module, exports, __webpack_require__) { 974 | 975 | var isObject = __webpack_require__("d3f4"); 976 | module.exports = function (it) { 977 | if (!isObject(it)) throw TypeError(it + ' is not an object!'); 978 | return it; 979 | }; 980 | 981 | 982 | /***/ }), 983 | 984 | /***/ "ce10": 985 | /***/ (function(module, exports, __webpack_require__) { 986 | 987 | var has = __webpack_require__("69a8"); 988 | var toIObject = __webpack_require__("6821"); 989 | var arrayIndexOf = __webpack_require__("c366")(false); 990 | var IE_PROTO = __webpack_require__("613b")('IE_PROTO'); 991 | 992 | module.exports = function (object, names) { 993 | var O = toIObject(object); 994 | var i = 0; 995 | var result = []; 996 | var key; 997 | for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key); 998 | // Don't enum bug & hidden keys 999 | while (names.length > i) if (has(O, key = names[i++])) { 1000 | ~arrayIndexOf(result, key) || result.push(key); 1001 | } 1002 | return result; 1003 | }; 1004 | 1005 | 1006 | /***/ }), 1007 | 1008 | /***/ "d3f4": 1009 | /***/ (function(module, exports) { 1010 | 1011 | module.exports = function (it) { 1012 | return typeof it === 'object' ? it !== null : typeof it === 'function'; 1013 | }; 1014 | 1015 | 1016 | /***/ }), 1017 | 1018 | /***/ "d53b": 1019 | /***/ (function(module, exports) { 1020 | 1021 | module.exports = function (done, value) { 1022 | return { value: value, done: !!done }; 1023 | }; 1024 | 1025 | 1026 | /***/ }), 1027 | 1028 | /***/ "d8e8": 1029 | /***/ (function(module, exports) { 1030 | 1031 | module.exports = function (it) { 1032 | if (typeof it != 'function') throw TypeError(it + ' is not a function!'); 1033 | return it; 1034 | }; 1035 | 1036 | 1037 | /***/ }), 1038 | 1039 | /***/ "e11e": 1040 | /***/ (function(module, exports) { 1041 | 1042 | // IE 8- don't enum bug keys 1043 | module.exports = ( 1044 | 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' 1045 | ).split(','); 1046 | 1047 | 1048 | /***/ }), 1049 | 1050 | /***/ "f6fd": 1051 | /***/ (function(module, exports) { 1052 | 1053 | // document.currentScript polyfill by Adam Miller 1054 | 1055 | // MIT license 1056 | 1057 | (function(document){ 1058 | var currentScript = "currentScript", 1059 | scripts = document.getElementsByTagName('script'); // Live NodeList collection 1060 | 1061 | // If browser needs currentScript polyfill, add get currentScript() to the document object 1062 | if (!(currentScript in document)) { 1063 | Object.defineProperty(document, currentScript, { 1064 | get: function(){ 1065 | 1066 | // IE 6-10 supports script readyState 1067 | // IE 10+ support stack trace 1068 | try { throw new Error(); } 1069 | catch (err) { 1070 | 1071 | // Find the second match for the "at" string to get file src url from stack. 1072 | // Specifically works with the format of stack traces in IE. 1073 | var i, res = ((/.*at [^\(]*\((.*):.+:.+\)$/ig).exec(err.stack) || [false])[1]; 1074 | 1075 | // For all scripts on the page, if src matches or if ready state is interactive, return the script tag 1076 | for(i in scripts){ 1077 | if(scripts[i].src == res || scripts[i].readyState == "interactive"){ 1078 | return scripts[i]; 1079 | } 1080 | } 1081 | 1082 | // If no match, return null 1083 | return null; 1084 | } 1085 | } 1086 | }); 1087 | } 1088 | })(document); 1089 | 1090 | 1091 | /***/ }), 1092 | 1093 | /***/ "fa5b": 1094 | /***/ (function(module, exports, __webpack_require__) { 1095 | 1096 | module.exports = __webpack_require__("5537")('native-function-to-string', Function.toString); 1097 | 1098 | 1099 | /***/ }), 1100 | 1101 | /***/ "fab2": 1102 | /***/ (function(module, exports, __webpack_require__) { 1103 | 1104 | var document = __webpack_require__("7726").document; 1105 | module.exports = document && document.documentElement; 1106 | 1107 | 1108 | /***/ }), 1109 | 1110 | /***/ "fb15": 1111 | /***/ (function(module, __webpack_exports__, __webpack_require__) { 1112 | 1113 | "use strict"; 1114 | // ESM COMPAT FLAG 1115 | __webpack_require__.r(__webpack_exports__); 1116 | 1117 | // CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js 1118 | // This file is imported into lib/wc client bundles. 1119 | 1120 | if (typeof window !== 'undefined') { 1121 | if (true) { 1122 | __webpack_require__("f6fd") 1123 | } 1124 | 1125 | var i 1126 | if ((i = window.document.currentScript) && (i = i.src.match(/(.+\/)[^/]+\.js(\?.*)?$/))) { 1127 | __webpack_require__.p = i[1] // eslint-disable-line 1128 | } 1129 | } 1130 | 1131 | // Indicate to webpack that this file can be concatenated 1132 | /* harmony default export */ var setPublicPath = (null); 1133 | 1134 | // EXTERNAL MODULE: ./node_modules/core-js/modules/es6.array.fill.js 1135 | var es6_array_fill = __webpack_require__("6c7b"); 1136 | 1137 | // EXTERNAL MODULE: ./node_modules/core-js/modules/es6.array.iterator.js 1138 | var es6_array_iterator = __webpack_require__("cadf"); 1139 | 1140 | // EXTERNAL MODULE: ./node_modules/core-js/modules/es6.object.keys.js 1141 | var es6_object_keys = __webpack_require__("456d"); 1142 | 1143 | // EXTERNAL MODULE: ./node_modules/core-js/modules/web.dom.iterable.js 1144 | var web_dom_iterable = __webpack_require__("ac6a"); 1145 | 1146 | // CONCATENATED MODULE: ./src/lib/waterwaves.js 1147 | 1148 | 1149 | 1150 | 1151 | 1152 | var WaterPolo = function WaterPolo(selector, userOptions) { 1153 | "user strict"; 1154 | 1155 | userOptions = userOptions || {}; 1156 | var options = { 1157 | //外边距 1158 | wrapW: 3, 1159 | //canvas属性 1160 | cW: 130, 1161 | cH: 130, 1162 | lineWidth: 2, 1163 | //液面位置 百分比表示 1164 | baseY: 20, 1165 | //液面起始位置 1166 | nowRange: 0, 1167 | //线条颜色 1168 | lineColor: "rgb(176,204,53)", 1169 | //上层颜色 1170 | oneColor: "rgba(176,204,53,.6)", 1171 | //下层颜色 1172 | twoColor: "rgba(176,204,53,.4)", 1173 | //上层波浪宽度,数越小越宽 1174 | oneWaveWidth: 0.06, 1175 | //下层波浪宽度 1176 | twoWaveWidth: 0.06, 1177 | //上层波浪高度,数越大越高 1178 | oneWaveHeight: 4, 1179 | //下层波浪高度 1180 | twoWaveHeight: 4, 1181 | //上层波浪x轴偏移量 1182 | oneOffsetX: 10, 1183 | //下层波浪x轴偏移量 1184 | twoOffsetX: 20, 1185 | //波浪滚动速度,数越大越快 1186 | speed: 0.2 1187 | }; 1188 | var canvas = null, 1189 | ctx = null, 1190 | W = null, 1191 | H = null; 1192 | Object.defineProperty(this, "options", { 1193 | get: function get() { 1194 | return options; 1195 | }, 1196 | set: function set(value) { 1197 | mergeOption(value, options); 1198 | } 1199 | }); //参数混合相当于$.extend([old],[new]) 1200 | 1201 | var mergeOption = function mergeOption(userOptions, options) { 1202 | Object.keys(userOptions).forEach(function (key) { 1203 | options[key] = userOptions[key]; 1204 | }); 1205 | }; //生成液面 1206 | 1207 | 1208 | var makeLiquaid = function makeLiquaid(ctx, xOffset, waveWidth, waveHeight, color) { 1209 | ctx.save(); 1210 | var points = []; //用于存放绘制Sin曲线的点 1211 | 1212 | ctx.beginPath(); //在x轴上取点 1213 | 1214 | for (var x = 0; x < options.cW; x += 20 / options.cW) { 1215 | //此处坐标(x,y)的取点,依靠公式 “振幅高*sin(x*振幅宽 + 振幅偏移量)” 1216 | var y = -Math.sin(x * waveWidth + xOffset); //液面高度百分比改变 1217 | 1218 | var dY = options.cH * (1 - options.nowRange / 100); 1219 | points.push([x, dY + y * waveHeight]); 1220 | ctx.lineTo(x, dY + y * waveHeight); 1221 | } //封闭路径 1222 | 1223 | 1224 | ctx.lineTo(options.cW, options.cH); 1225 | ctx.lineTo(0, options.cH); 1226 | ctx.lineTo(points[0][0], points[0][1]); 1227 | ctx.fillStyle = color; 1228 | ctx.fill(); 1229 | ctx.restore(); 1230 | }; //初始化设置 1231 | 1232 | 1233 | var init = function init() { 1234 | mergeOption(userOptions, options); 1235 | canvas = document.getElementById(selector); 1236 | ctx = canvas.getContext("2d"); 1237 | canvas.width = options.cW; 1238 | canvas.height = options.cH; 1239 | ctx.lineWidth = options.lineWidth; //圆属性 1240 | 1241 | var r = options.cH / 2; //圆心 1242 | 1243 | var cR = r - 6; //圆半径 决定圆的大小 1244 | 1245 | var drawCircle = function drawCircle(ctx) { 1246 | ctx.beginPath(); 1247 | ctx.strokeStyle = options.lineColor; 1248 | ctx.arc(r, r, cR + options.wrapW, 0, 2 * Math.PI); 1249 | ctx.stroke(); 1250 | ctx.beginPath(); 1251 | ctx.arc(r, r, cR, 0, 2 * Math.PI); 1252 | ctx.clip(); 1253 | }; 1254 | 1255 | drawCircle(ctx); //画圆 1256 | 1257 | (function drawFrame() { 1258 | window.requestAnimationFrame(drawFrame); 1259 | ctx.clearRect(0, 0, options.cW, options.cH); //高度改变动画参数 1260 | 1261 | var tmp = 1; 1262 | 1263 | if (options.nowRange <= options.baseY) { 1264 | options.nowRange += tmp; 1265 | } 1266 | 1267 | if (options.nowRange > options.baseY) { 1268 | options.nowRange -= tmp; 1269 | } 1270 | 1271 | makeLiquaid(ctx, options.oneOffsetX, options.oneWaveWidth, options.oneWaveHeight, options.oneColor); 1272 | makeLiquaid(ctx, options.twoOffsetX, options.twoWaveWidth, options.twoWaveHeight, options.twoColor); 1273 | options.oneOffsetX += options.speed; 1274 | options.twoOffsetX += options.speed; 1275 | })(); 1276 | }; 1277 | 1278 | init(); 1279 | }; 1280 | 1281 | /* harmony default export */ var waterwaves = (WaterPolo); 1282 | // CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/entry-lib.js 1283 | 1284 | 1285 | /* harmony default export */ var entry_lib = __webpack_exports__["default"] = (waterwaves); 1286 | 1287 | 1288 | 1289 | /***/ }) 1290 | 1291 | /******/ })["default"]; 1292 | //# sourceMappingURL=WaterPolo.common.js.map -------------------------------------------------------------------------------- /scripts/WaterPolo.common.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["webpack://WaterPolo/webpack/bootstrap","webpack://WaterPolo/./node_modules/core-js/modules/_iter-define.js","webpack://WaterPolo/./node_modules/core-js/modules/_object-keys.js","webpack://WaterPolo/./node_modules/core-js/modules/_object-dps.js","webpack://WaterPolo/./node_modules/core-js/modules/_dom-create.js","webpack://WaterPolo/./node_modules/core-js/modules/_redefine.js","webpack://WaterPolo/./node_modules/core-js/modules/_object-create.js","webpack://WaterPolo/./node_modules/core-js/modules/_wks.js","webpack://WaterPolo/./node_modules/core-js/modules/_library.js","webpack://WaterPolo/./node_modules/core-js/modules/_cof.js","webpack://WaterPolo/./node_modules/core-js/modules/_hide.js","webpack://WaterPolo/./node_modules/core-js/modules/_array-fill.js","webpack://WaterPolo/./node_modules/core-js/modules/_object-gpo.js","webpack://WaterPolo/./node_modules/core-js/modules/_iter-create.js","webpack://WaterPolo/./node_modules/core-js/modules/es6.object.keys.js","webpack://WaterPolo/./node_modules/core-js/modules/_to-integer.js","webpack://WaterPolo/./node_modules/core-js/modules/_property-desc.js","webpack://WaterPolo/./node_modules/core-js/modules/_to-object.js","webpack://WaterPolo/./node_modules/core-js/modules/_shared.js","webpack://WaterPolo/./node_modules/core-js/modules/_export.js","webpack://WaterPolo/./node_modules/core-js/modules/_object-sap.js","webpack://WaterPolo/./node_modules/core-js/modules/_shared-key.js","webpack://WaterPolo/./node_modules/core-js/modules/_iobject.js","webpack://WaterPolo/./node_modules/core-js/modules/_to-iobject.js","webpack://WaterPolo/./node_modules/core-js/modules/_has.js","webpack://WaterPolo/./node_modules/core-js/modules/_to-primitive.js","webpack://WaterPolo/./node_modules/core-js/modules/es6.array.fill.js","webpack://WaterPolo/./node_modules/core-js/modules/_global.js","webpack://WaterPolo/./node_modules/core-js/modules/_to-absolute-index.js","webpack://WaterPolo/./node_modules/core-js/modules/_fails.js","webpack://WaterPolo/./node_modules/core-js/modules/_set-to-string-tag.js","webpack://WaterPolo/./node_modules/core-js/modules/_core.js","webpack://WaterPolo/./node_modules/core-js/modules/_iterators.js","webpack://WaterPolo/./node_modules/core-js/modules/_object-dp.js","webpack://WaterPolo/./node_modules/core-js/modules/_ctx.js","webpack://WaterPolo/./node_modules/core-js/modules/_add-to-unscopables.js","webpack://WaterPolo/./node_modules/core-js/modules/_to-length.js","webpack://WaterPolo/./node_modules/core-js/modules/_descriptors.js","webpack://WaterPolo/./node_modules/core-js/modules/web.dom.iterable.js","webpack://WaterPolo/./node_modules/core-js/modules/_defined.js","webpack://WaterPolo/./node_modules/core-js/modules/_array-includes.js","webpack://WaterPolo/./node_modules/core-js/modules/_ie8-dom-define.js","webpack://WaterPolo/./node_modules/core-js/modules/_uid.js","webpack://WaterPolo/./node_modules/core-js/modules/es6.array.iterator.js","webpack://WaterPolo/./node_modules/core-js/modules/_an-object.js","webpack://WaterPolo/./node_modules/core-js/modules/_object-keys-internal.js","webpack://WaterPolo/./node_modules/core-js/modules/_is-object.js","webpack://WaterPolo/./node_modules/core-js/modules/_iter-step.js","webpack://WaterPolo/./node_modules/core-js/modules/_a-function.js","webpack://WaterPolo/./node_modules/core-js/modules/_enum-bug-keys.js","webpack://WaterPolo/./node_modules/current-script-polyfill/currentScript.js","webpack://WaterPolo/./node_modules/core-js/modules/_function-to-string.js","webpack://WaterPolo/./node_modules/core-js/modules/_html.js","webpack://WaterPolo/./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js","webpack://WaterPolo/./src/lib/waterwaves.js","webpack://WaterPolo/./node_modules/@vue/cli-service/lib/commands/build/entry-lib.js"],"names":["WaterPolo","selector","userOptions","options","wrapW","cW","cH","lineWidth","baseY","nowRange","lineColor","oneColor","twoColor","oneWaveWidth","twoWaveWidth","oneWaveHeight","twoWaveHeight","oneOffsetX","twoOffsetX","speed","canvas","ctx","W","H","Object","defineProperty","get","set","value","mergeOption","keys","forEach","key","makeLiquaid","xOffset","waveWidth","waveHeight","color","save","points","beginPath","x","y","Math","sin","dY","push","lineTo","fillStyle","fill","restore","init","document","getElementById","getContext","width","height","r","cR","drawCircle","strokeStyle","arc","PI","stroke","clip","drawFrame","window","requestAnimationFrame","clearRect","tmp"],"mappings":"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ACA;AACA;AACA;AACA,GAAG,YAAY;AACf;AACA;AACA;AACA;;;;;;;;ACfA;AACA,gBAAgB,mBAAO,CAAC,MAAe;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnBA;AACA,kBAAkB,mBAAO,CAAC,MAAQ;AAClC;AACA,0CAA0C,mBAAO,CAAC,MAAS,6BAA6B;AACxF;AACA;AACA;;;;;;;;ACNA;AACA,gBAAgB,mBAAO,CAAC,MAAe;AACvC;AACA;AACA,2DAA2D;AAC3D;;;;;;;;ACLA;AACA,kBAAkB,mBAAO,CAAC,MAAU;AACpC,iCAAiC,QAAQ,mBAAmB,UAAU,EAAE,EAAE;AAC1E,CAAC;;;;;;;;ACHD,iBAAiB,mBAAO,CAAC,MAAsB;AAC/C,cAAc,mBAAO,CAAC,MAAgB;AACtC,eAAe,mBAAO,CAAC,MAAa;AACpC,aAAa,mBAAO,CAAC,MAAW;AAChC,WAAW,mBAAO,CAAC,MAAS;AAC5B,gBAAgB,mBAAO,CAAC,MAAc;AACtC,UAAU,mBAAO,CAAC,MAAQ;AAC1B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,oDAAoD,wBAAwB;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzDA;AACA;AACA;AACA;AACA;;;;;;;;ACJA;AACA;AACA,gBAAgB,mBAAO,CAAC,MAAe;AACvC,eAAe,mBAAO,CAAC,MAAc;AACrC,sBAAsB,mBAAO,CAAC,MAAsB;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,YAAY,eAAe;AAChC;AACA,KAAK;AACL;AACA;;;;;;;;ACtBA,kBAAkB,mBAAO,CAAC,MAAgB,MAAM,mBAAO,CAA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","file":"WaterPolo.common.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"fb15\");\n","'use strict';\nvar LIBRARY = require('./_library');\nvar $export = require('./_export');\nvar redefine = require('./_redefine');\nvar hide = require('./_hide');\nvar Iterators = require('./_iterators');\nvar $iterCreate = require('./_iter-create');\nvar setToStringTag = require('./_set-to-string-tag');\nvar getPrototypeOf = require('./_object-gpo');\nvar ITERATOR = require('./_wks')('iterator');\nvar BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next`\nvar FF_ITERATOR = '@@iterator';\nvar KEYS = 'keys';\nvar VALUES = 'values';\n\nvar returnThis = function () { return this; };\n\nmodule.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {\n $iterCreate(Constructor, NAME, next);\n var getMethod = function (kind) {\n if (!BUGGY && kind in proto) return proto[kind];\n switch (kind) {\n case KEYS: return function keys() { return new Constructor(this, kind); };\n case VALUES: return function values() { return new Constructor(this, kind); };\n } return function entries() { return new Constructor(this, kind); };\n };\n var TAG = NAME + ' Iterator';\n var DEF_VALUES = DEFAULT == VALUES;\n var VALUES_BUG = false;\n var proto = Base.prototype;\n var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];\n var $default = $native || getMethod(DEFAULT);\n var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;\n var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;\n var methods, key, IteratorPrototype;\n // Fix native\n if ($anyNative) {\n IteratorPrototype = getPrototypeOf($anyNative.call(new Base()));\n if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {\n // Set @@toStringTag to native iterators\n setToStringTag(IteratorPrototype, TAG, true);\n // fix for some old engines\n if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis);\n }\n }\n // fix Array#{values, @@iterator}.name in V8 / FF\n if (DEF_VALUES && $native && $native.name !== VALUES) {\n VALUES_BUG = true;\n $default = function values() { return $native.call(this); };\n }\n // Define iterator\n if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) {\n hide(proto, ITERATOR, $default);\n }\n // Plug for library\n Iterators[NAME] = $default;\n Iterators[TAG] = returnThis;\n if (DEFAULT) {\n methods = {\n values: DEF_VALUES ? $default : getMethod(VALUES),\n keys: IS_SET ? $default : getMethod(KEYS),\n entries: $entries\n };\n if (FORCED) for (key in methods) {\n if (!(key in proto)) redefine(proto, key, methods[key]);\n } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);\n }\n return methods;\n};\n","// 19.1.2.14 / 15.2.3.14 Object.keys(O)\nvar $keys = require('./_object-keys-internal');\nvar enumBugKeys = require('./_enum-bug-keys');\n\nmodule.exports = Object.keys || function keys(O) {\n return $keys(O, enumBugKeys);\n};\n","var dP = require('./_object-dp');\nvar anObject = require('./_an-object');\nvar getKeys = require('./_object-keys');\n\nmodule.exports = require('./_descriptors') ? Object.defineProperties : function defineProperties(O, Properties) {\n anObject(O);\n var keys = getKeys(Properties);\n var length = keys.length;\n var i = 0;\n var P;\n while (length > i) dP.f(O, P = keys[i++], Properties[P]);\n return O;\n};\n","var isObject = require('./_is-object');\nvar document = require('./_global').document;\n// typeof document.createElement is 'object' in old IE\nvar is = isObject(document) && isObject(document.createElement);\nmodule.exports = function (it) {\n return is ? document.createElement(it) : {};\n};\n","var global = require('./_global');\nvar hide = require('./_hide');\nvar has = require('./_has');\nvar SRC = require('./_uid')('src');\nvar $toString = require('./_function-to-string');\nvar TO_STRING = 'toString';\nvar TPL = ('' + $toString).split(TO_STRING);\n\nrequire('./_core').inspectSource = function (it) {\n return $toString.call(it);\n};\n\n(module.exports = function (O, key, val, safe) {\n var isFunction = typeof val == 'function';\n if (isFunction) has(val, 'name') || hide(val, 'name', key);\n if (O[key] === val) return;\n if (isFunction) has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key)));\n if (O === global) {\n O[key] = val;\n } else if (!safe) {\n delete O[key];\n hide(O, key, val);\n } else if (O[key]) {\n O[key] = val;\n } else {\n hide(O, key, val);\n }\n// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative\n})(Function.prototype, TO_STRING, function toString() {\n return typeof this == 'function' && this[SRC] || $toString.call(this);\n});\n","// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])\nvar anObject = require('./_an-object');\nvar dPs = require('./_object-dps');\nvar enumBugKeys = require('./_enum-bug-keys');\nvar IE_PROTO = require('./_shared-key')('IE_PROTO');\nvar Empty = function () { /* empty */ };\nvar PROTOTYPE = 'prototype';\n\n// Create object with fake `null` prototype: use iframe Object with cleared prototype\nvar createDict = function () {\n // Thrash, waste and sodomy: IE GC bug\n var iframe = require('./_dom-create')('iframe');\n var i = enumBugKeys.length;\n var lt = '<';\n var gt = '>';\n var iframeDocument;\n iframe.style.display = 'none';\n require('./_html').appendChild(iframe);\n iframe.src = 'javascript:'; // eslint-disable-line no-script-url\n // createDict = iframe.contentWindow.Object;\n // html.removeChild(iframe);\n iframeDocument = iframe.contentWindow.document;\n iframeDocument.open();\n iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);\n iframeDocument.close();\n createDict = iframeDocument.F;\n while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];\n return createDict();\n};\n\nmodule.exports = Object.create || function create(O, Properties) {\n var result;\n if (O !== null) {\n Empty[PROTOTYPE] = anObject(O);\n result = new Empty();\n Empty[PROTOTYPE] = null;\n // add \"__proto__\" for Object.getPrototypeOf polyfill\n result[IE_PROTO] = O;\n } else result = createDict();\n return Properties === undefined ? result : dPs(result, Properties);\n};\n","var store = require('./_shared')('wks');\nvar uid = require('./_uid');\nvar Symbol = require('./_global').Symbol;\nvar USE_SYMBOL = typeof Symbol == 'function';\n\nvar $exports = module.exports = function (name) {\n return store[name] || (store[name] =\n USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));\n};\n\n$exports.store = store;\n","module.exports = false;\n","var toString = {}.toString;\n\nmodule.exports = function (it) {\n return toString.call(it).slice(8, -1);\n};\n","var dP = require('./_object-dp');\nvar createDesc = require('./_property-desc');\nmodule.exports = require('./_descriptors') ? function (object, key, value) {\n return dP.f(object, key, createDesc(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};\n","// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length)\n'use strict';\nvar toObject = require('./_to-object');\nvar toAbsoluteIndex = require('./_to-absolute-index');\nvar toLength = require('./_to-length');\nmodule.exports = function fill(value /* , start = 0, end = @length */) {\n var O = toObject(this);\n var length = toLength(O.length);\n var aLen = arguments.length;\n var index = toAbsoluteIndex(aLen > 1 ? arguments[1] : undefined, length);\n var end = aLen > 2 ? arguments[2] : undefined;\n var endPos = end === undefined ? length : toAbsoluteIndex(end, length);\n while (endPos > index) O[index++] = value;\n return O;\n};\n","// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)\nvar has = require('./_has');\nvar toObject = require('./_to-object');\nvar IE_PROTO = require('./_shared-key')('IE_PROTO');\nvar ObjectProto = Object.prototype;\n\nmodule.exports = Object.getPrototypeOf || function (O) {\n O = toObject(O);\n if (has(O, IE_PROTO)) return O[IE_PROTO];\n if (typeof O.constructor == 'function' && O instanceof O.constructor) {\n return O.constructor.prototype;\n } return O instanceof Object ? ObjectProto : null;\n};\n","'use strict';\nvar create = require('./_object-create');\nvar descriptor = require('./_property-desc');\nvar setToStringTag = require('./_set-to-string-tag');\nvar IteratorPrototype = {};\n\n// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()\nrequire('./_hide')(IteratorPrototype, require('./_wks')('iterator'), function () { return this; });\n\nmodule.exports = function (Constructor, NAME, next) {\n Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) });\n setToStringTag(Constructor, NAME + ' Iterator');\n};\n","// 19.1.2.14 Object.keys(O)\nvar toObject = require('./_to-object');\nvar $keys = require('./_object-keys');\n\nrequire('./_object-sap')('keys', function () {\n return function keys(it) {\n return $keys(toObject(it));\n };\n});\n","// 7.1.4 ToInteger\nvar ceil = Math.ceil;\nvar floor = Math.floor;\nmodule.exports = function (it) {\n return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);\n};\n","module.exports = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n};\n","// 7.1.13 ToObject(argument)\nvar defined = require('./_defined');\nmodule.exports = function (it) {\n return Object(defined(it));\n};\n","var core = require('./_core');\nvar global = require('./_global');\nvar SHARED = '__core-js_shared__';\nvar store = global[SHARED] || (global[SHARED] = {});\n\n(module.exports = function (key, value) {\n return store[key] || (store[key] = value !== undefined ? value : {});\n})('versions', []).push({\n version: core.version,\n mode: require('./_library') ? 'pure' : 'global',\n copyright: '© 2019 Denis Pushkarev (zloirock.ru)'\n});\n","var global = require('./_global');\nvar core = require('./_core');\nvar hide = require('./_hide');\nvar redefine = require('./_redefine');\nvar ctx = require('./_ctx');\nvar PROTOTYPE = 'prototype';\n\nvar $export = function (type, name, source) {\n var IS_FORCED = type & $export.F;\n var IS_GLOBAL = type & $export.G;\n var IS_STATIC = type & $export.S;\n var IS_PROTO = type & $export.P;\n var IS_BIND = type & $export.B;\n var target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE];\n var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});\n var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {});\n var key, own, out, exp;\n if (IS_GLOBAL) source = name;\n for (key in source) {\n // contains in native\n own = !IS_FORCED && target && target[key] !== undefined;\n // export native or passed\n out = (own ? target : source)[key];\n // bind timers to global for call from export context\n exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;\n // extend global\n if (target) redefine(target, key, out, type & $export.U);\n // export\n if (exports[key] != out) hide(exports, key, exp);\n if (IS_PROTO && expProto[key] != out) expProto[key] = out;\n }\n};\nglobal.core = core;\n// type bitmap\n$export.F = 1; // forced\n$export.G = 2; // global\n$export.S = 4; // static\n$export.P = 8; // proto\n$export.B = 16; // bind\n$export.W = 32; // wrap\n$export.U = 64; // safe\n$export.R = 128; // real proto method for `library`\nmodule.exports = $export;\n","// most Object methods by ES6 should accept primitives\nvar $export = require('./_export');\nvar core = require('./_core');\nvar fails = require('./_fails');\nmodule.exports = function (KEY, exec) {\n var fn = (core.Object || {})[KEY] || Object[KEY];\n var exp = {};\n exp[KEY] = exec(fn);\n $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp);\n};\n","var shared = require('./_shared')('keys');\nvar uid = require('./_uid');\nmodule.exports = function (key) {\n return shared[key] || (shared[key] = uid(key));\n};\n","// fallback for non-array-like ES3 and non-enumerable old V8 strings\nvar cof = require('./_cof');\n// eslint-disable-next-line no-prototype-builtins\nmodule.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {\n return cof(it) == 'String' ? it.split('') : Object(it);\n};\n","// to indexed object, toObject with fallback for non-array-like ES3 strings\nvar IObject = require('./_iobject');\nvar defined = require('./_defined');\nmodule.exports = function (it) {\n return IObject(defined(it));\n};\n","var hasOwnProperty = {}.hasOwnProperty;\nmodule.exports = function (it, key) {\n return hasOwnProperty.call(it, key);\n};\n","// 7.1.1 ToPrimitive(input [, PreferredType])\nvar isObject = require('./_is-object');\n// instead of the ES6 spec version, we didn't implement @@toPrimitive case\n// and the second argument - flag - preferred type is a string\nmodule.exports = function (it, S) {\n if (!isObject(it)) return it;\n var fn, val;\n if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;\n if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n throw TypeError(\"Can't convert object to primitive value\");\n};\n","// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length)\nvar $export = require('./_export');\n\n$export($export.P, 'Array', { fill: require('./_array-fill') });\n\nrequire('./_add-to-unscopables')('fill');\n","// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nvar global = module.exports = typeof window != 'undefined' && window.Math == Math\n ? window : typeof self != 'undefined' && self.Math == Math ? self\n // eslint-disable-next-line no-new-func\n : Function('return this')();\nif (typeof __g == 'number') __g = global; // eslint-disable-line no-undef\n","var toInteger = require('./_to-integer');\nvar max = Math.max;\nvar min = Math.min;\nmodule.exports = function (index, length) {\n index = toInteger(index);\n return index < 0 ? max(index + length, 0) : min(index, length);\n};\n","module.exports = function (exec) {\n try {\n return !!exec();\n } catch (e) {\n return true;\n }\n};\n","var def = require('./_object-dp').f;\nvar has = require('./_has');\nvar TAG = require('./_wks')('toStringTag');\n\nmodule.exports = function (it, tag, stat) {\n if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });\n};\n","var core = module.exports = { version: '2.6.11' };\nif (typeof __e == 'number') __e = core; // eslint-disable-line no-undef\n","module.exports = {};\n","var anObject = require('./_an-object');\nvar IE8_DOM_DEFINE = require('./_ie8-dom-define');\nvar toPrimitive = require('./_to-primitive');\nvar dP = Object.defineProperty;\n\nexports.f = require('./_descriptors') ? Object.defineProperty : function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPrimitive(P, true);\n anObject(Attributes);\n if (IE8_DOM_DEFINE) try {\n return dP(O, P, Attributes);\n } catch (e) { /* empty */ }\n if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');\n if ('value' in Attributes) O[P] = Attributes.value;\n return O;\n};\n","// optional / simple context binding\nvar aFunction = require('./_a-function');\nmodule.exports = function (fn, that, length) {\n aFunction(fn);\n if (that === undefined) return fn;\n switch (length) {\n case 1: return function (a) {\n return fn.call(that, a);\n };\n case 2: return function (a, b) {\n return fn.call(that, a, b);\n };\n case 3: return function (a, b, c) {\n return fn.call(that, a, b, c);\n };\n }\n return function (/* ...args */) {\n return fn.apply(that, arguments);\n };\n};\n","// 22.1.3.31 Array.prototype[@@unscopables]\nvar UNSCOPABLES = require('./_wks')('unscopables');\nvar ArrayProto = Array.prototype;\nif (ArrayProto[UNSCOPABLES] == undefined) require('./_hide')(ArrayProto, UNSCOPABLES, {});\nmodule.exports = function (key) {\n ArrayProto[UNSCOPABLES][key] = true;\n};\n","// 7.1.15 ToLength\nvar toInteger = require('./_to-integer');\nvar min = Math.min;\nmodule.exports = function (it) {\n return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991\n};\n","// Thank's IE8 for his funny defineProperty\nmodule.exports = !require('./_fails')(function () {\n return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;\n});\n","var $iterators = require('./es6.array.iterator');\nvar getKeys = require('./_object-keys');\nvar redefine = require('./_redefine');\nvar global = require('./_global');\nvar hide = require('./_hide');\nvar Iterators = require('./_iterators');\nvar wks = require('./_wks');\nvar ITERATOR = wks('iterator');\nvar TO_STRING_TAG = wks('toStringTag');\nvar ArrayValues = Iterators.Array;\n\nvar DOMIterables = {\n CSSRuleList: true, // TODO: Not spec compliant, should be false.\n CSSStyleDeclaration: false,\n CSSValueList: false,\n ClientRectList: false,\n DOMRectList: false,\n DOMStringList: false,\n DOMTokenList: true,\n DataTransferItemList: false,\n FileList: false,\n HTMLAllCollection: false,\n HTMLCollection: false,\n HTMLFormElement: false,\n HTMLSelectElement: false,\n MediaList: true, // TODO: Not spec compliant, should be false.\n MimeTypeArray: false,\n NamedNodeMap: false,\n NodeList: true,\n PaintRequestList: false,\n Plugin: false,\n PluginArray: false,\n SVGLengthList: false,\n SVGNumberList: false,\n SVGPathSegList: false,\n SVGPointList: false,\n SVGStringList: false,\n SVGTransformList: false,\n SourceBufferList: false,\n StyleSheetList: true, // TODO: Not spec compliant, should be false.\n TextTrackCueList: false,\n TextTrackList: false,\n TouchList: false\n};\n\nfor (var collections = getKeys(DOMIterables), i = 0; i < collections.length; i++) {\n var NAME = collections[i];\n var explicit = DOMIterables[NAME];\n var Collection = global[NAME];\n var proto = Collection && Collection.prototype;\n var key;\n if (proto) {\n if (!proto[ITERATOR]) hide(proto, ITERATOR, ArrayValues);\n if (!proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME);\n Iterators[NAME] = ArrayValues;\n if (explicit) for (key in $iterators) if (!proto[key]) redefine(proto, key, $iterators[key], true);\n }\n}\n","// 7.2.1 RequireObjectCoercible(argument)\nmodule.exports = function (it) {\n if (it == undefined) throw TypeError(\"Can't call method on \" + it);\n return it;\n};\n","// false -> Array#indexOf\n// true -> Array#includes\nvar toIObject = require('./_to-iobject');\nvar toLength = require('./_to-length');\nvar toAbsoluteIndex = require('./_to-absolute-index');\nmodule.exports = function (IS_INCLUDES) {\n return function ($this, el, fromIndex) {\n var O = toIObject($this);\n var length = toLength(O.length);\n var index = toAbsoluteIndex(fromIndex, length);\n var value;\n // Array#includes uses SameValueZero equality algorithm\n // eslint-disable-next-line no-self-compare\n if (IS_INCLUDES && el != el) while (length > index) {\n value = O[index++];\n // eslint-disable-next-line no-self-compare\n if (value != value) return true;\n // Array#indexOf ignores holes, Array#includes - not\n } else for (;length > index; index++) if (IS_INCLUDES || index in O) {\n if (O[index] === el) return IS_INCLUDES || index || 0;\n } return !IS_INCLUDES && -1;\n };\n};\n","module.exports = !require('./_descriptors') && !require('./_fails')(function () {\n return Object.defineProperty(require('./_dom-create')('div'), 'a', { get: function () { return 7; } }).a != 7;\n});\n","var id = 0;\nvar px = Math.random();\nmodule.exports = function (key) {\n return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));\n};\n","'use strict';\nvar addToUnscopables = require('./_add-to-unscopables');\nvar step = require('./_iter-step');\nvar Iterators = require('./_iterators');\nvar toIObject = require('./_to-iobject');\n\n// 22.1.3.4 Array.prototype.entries()\n// 22.1.3.13 Array.prototype.keys()\n// 22.1.3.29 Array.prototype.values()\n// 22.1.3.30 Array.prototype[@@iterator]()\nmodule.exports = require('./_iter-define')(Array, 'Array', function (iterated, kind) {\n this._t = toIObject(iterated); // target\n this._i = 0; // next index\n this._k = kind; // kind\n// 22.1.5.2.1 %ArrayIteratorPrototype%.next()\n}, function () {\n var O = this._t;\n var kind = this._k;\n var index = this._i++;\n if (!O || index >= O.length) {\n this._t = undefined;\n return step(1);\n }\n if (kind == 'keys') return step(0, index);\n if (kind == 'values') return step(0, O[index]);\n return step(0, [index, O[index]]);\n}, 'values');\n\n// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)\nIterators.Arguments = Iterators.Array;\n\naddToUnscopables('keys');\naddToUnscopables('values');\naddToUnscopables('entries');\n","var isObject = require('./_is-object');\nmodule.exports = function (it) {\n if (!isObject(it)) throw TypeError(it + ' is not an object!');\n return it;\n};\n","var has = require('./_has');\nvar toIObject = require('./_to-iobject');\nvar arrayIndexOf = require('./_array-includes')(false);\nvar IE_PROTO = require('./_shared-key')('IE_PROTO');\n\nmodule.exports = function (object, names) {\n var O = toIObject(object);\n var i = 0;\n var result = [];\n var key;\n for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key);\n // Don't enum bug & hidden keys\n while (names.length > i) if (has(O, key = names[i++])) {\n ~arrayIndexOf(result, key) || result.push(key);\n }\n return result;\n};\n","module.exports = function (it) {\n return typeof it === 'object' ? it !== null : typeof it === 'function';\n};\n","module.exports = function (done, value) {\n return { value: value, done: !!done };\n};\n","module.exports = function (it) {\n if (typeof it != 'function') throw TypeError(it + ' is not a function!');\n return it;\n};\n","// IE 8- don't enum bug keys\nmodule.exports = (\n 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'\n).split(',');\n","// document.currentScript polyfill by Adam Miller\n\n// MIT license\n\n(function(document){\n var currentScript = \"currentScript\",\n scripts = document.getElementsByTagName('script'); // Live NodeList collection\n\n // If browser needs currentScript polyfill, add get currentScript() to the document object\n if (!(currentScript in document)) {\n Object.defineProperty(document, currentScript, {\n get: function(){\n\n // IE 6-10 supports script readyState\n // IE 10+ support stack trace\n try { throw new Error(); }\n catch (err) {\n\n // Find the second match for the \"at\" string to get file src url from stack.\n // Specifically works with the format of stack traces in IE.\n var i, res = ((/.*at [^\\(]*\\((.*):.+:.+\\)$/ig).exec(err.stack) || [false])[1];\n\n // For all scripts on the page, if src matches or if ready state is interactive, return the script tag\n for(i in scripts){\n if(scripts[i].src == res || scripts[i].readyState == \"interactive\"){\n return scripts[i];\n }\n }\n\n // If no match, return null\n return null;\n }\n }\n });\n }\n})(document);\n","module.exports = require('./_shared')('native-function-to-string', Function.toString);\n","var document = require('./_global').document;\nmodule.exports = document && document.documentElement;\n","// This file is imported into lib/wc client bundles.\n\nif (typeof window !== 'undefined') {\n if (process.env.NEED_CURRENTSCRIPT_POLYFILL) {\n require('current-script-polyfill')\n }\n\n var i\n if ((i = window.document.currentScript) && (i = i.src.match(/(.+\\/)[^/]+\\.js(\\?.*)?$/))) {\n __webpack_public_path__ = i[1] // eslint-disable-line\n }\n}\n\n// Indicate to webpack that this file can be concatenated\nexport default null\n","var WaterPolo = function(selector, userOptions) {\r\n \"user strict\";\r\n\r\n userOptions = userOptions || {};\r\n\r\n var options = {\r\n //外边距\r\n wrapW: 3,\r\n\r\n //canvas属性\r\n cW: 130,\r\n cH: 130,\r\n lineWidth: 2,\r\n\r\n //液面位置 百分比表示\r\n baseY: 20,\r\n\r\n //液面起始位置\r\n nowRange: 0,\r\n\r\n //线条颜色\r\n lineColor: \"rgb(176,204,53)\",\r\n //上层颜色\r\n oneColor: \"rgba(176,204,53,.6)\",\r\n\r\n //下层颜色\r\n twoColor: \"rgba(176,204,53,.4)\",\r\n\r\n //上层波浪宽度,数越小越宽\r\n oneWaveWidth: 0.06,\r\n\r\n //下层波浪宽度\r\n twoWaveWidth: 0.06,\r\n\r\n //上层波浪高度,数越大越高\r\n oneWaveHeight: 4,\r\n\r\n //下层波浪高度\r\n twoWaveHeight: 4,\r\n\r\n //上层波浪x轴偏移量\r\n oneOffsetX: 10,\r\n\r\n //下层波浪x轴偏移量\r\n twoOffsetX: 20,\r\n\r\n //波浪滚动速度,数越大越快\r\n speed: 0.2\r\n };\r\n\r\n var canvas = null,\r\n ctx = null,\r\n W = null,\r\n H = null;\r\n\r\n Object.defineProperty(this, \"options\", {\r\n get: function() {\r\n return options;\r\n },\r\n set: function(value) {\r\n mergeOption(value, options);\r\n }\r\n });\r\n\r\n //参数混合相当于$.extend([old],[new])\r\n var mergeOption = function(userOptions, options) {\r\n Object.keys(userOptions).forEach(function(key) {\r\n options[key] = userOptions[key];\r\n });\r\n };\r\n\r\n //生成液面\r\n var makeLiquaid = function(ctx, xOffset, waveWidth, waveHeight, color) {\r\n ctx.save();\r\n var points = []; //用于存放绘制Sin曲线的点\r\n ctx.beginPath();\r\n //在x轴上取点\r\n for (var x = 0; x < options.cW; x += 20 / options.cW) {\r\n //此处坐标(x,y)的取点,依靠公式 “振幅高*sin(x*振幅宽 + 振幅偏移量)”\r\n var y = -Math.sin(x * waveWidth + xOffset);\r\n\r\n //液面高度百分比改变\r\n var dY = options.cH * (1 - options.nowRange / 100);\r\n\r\n points.push([x, dY + y * waveHeight]);\r\n ctx.lineTo(x, dY + y * waveHeight);\r\n }\r\n //封闭路径\r\n ctx.lineTo(options.cW, options.cH);\r\n ctx.lineTo(0, options.cH);\r\n ctx.lineTo(points[0][0], points[0][1]);\r\n ctx.fillStyle = color;\r\n ctx.fill();\r\n ctx.restore();\r\n };\r\n\r\n //初始化设置\r\n\r\n var init = function() {\r\n mergeOption(userOptions, options);\r\n\r\n canvas = document.getElementById(selector);\r\n ctx = canvas.getContext(\"2d\");\r\n\r\n canvas.width = options.cW;\r\n canvas.height = options.cH;\r\n\r\n ctx.lineWidth = options.lineWidth;\r\n\r\n //圆属性\r\n var r = options.cH / 2; //圆心\r\n var cR = r - 6; //圆半径 决定圆的大小\r\n\r\n var drawCircle = function(ctx) {\r\n ctx.beginPath();\r\n ctx.strokeStyle = options.lineColor;\r\n ctx.arc(r, r, cR + options.wrapW, 0, 2 * Math.PI);\r\n ctx.stroke();\r\n ctx.beginPath();\r\n ctx.arc(r, r, cR, 0, 2 * Math.PI);\r\n ctx.clip();\r\n };\r\n drawCircle(ctx); //画圆\r\n\r\n (function drawFrame() {\r\n window.requestAnimationFrame(drawFrame);\r\n\r\n ctx.clearRect(0, 0, options.cW, options.cH);\r\n\r\n //高度改变动画参数\r\n var tmp = 1;\r\n if (options.nowRange <= options.baseY) {\r\n options.nowRange += tmp;\r\n }\r\n\r\n if (options.nowRange > options.baseY) {\r\n options.nowRange -= tmp;\r\n }\r\n makeLiquaid(\r\n ctx,\r\n options.oneOffsetX,\r\n options.oneWaveWidth,\r\n options.oneWaveHeight,\r\n options.oneColor\r\n );\r\n makeLiquaid(\r\n ctx,\r\n options.twoOffsetX,\r\n options.twoWaveWidth,\r\n options.twoWaveHeight,\r\n options.twoColor\r\n );\r\n\r\n options.oneOffsetX += options.speed;\r\n options.twoOffsetX += options.speed;\r\n })();\r\n };\r\n init();\r\n};\r\n\r\nexport default WaterPolo;\r\n","import './setPublicPath'\nimport mod from '~entry'\nexport default mod\nexport * from '~entry'\n"],"sourceRoot":""} -------------------------------------------------------------------------------- /scripts/WaterPolo.umd.js: -------------------------------------------------------------------------------- 1 | (function webpackUniversalModuleDefinition(root, factory) { 2 | if(typeof exports === 'object' && typeof module === 'object') 3 | module.exports = factory(); 4 | else if(typeof define === 'function' && define.amd) 5 | define([], factory); 6 | else if(typeof exports === 'object') 7 | exports["WaterPolo"] = factory(); 8 | else 9 | root["WaterPolo"] = factory(); 10 | })((typeof self !== 'undefined' ? self : this), function() { 11 | return /******/ (function(modules) { // webpackBootstrap 12 | /******/ // The module cache 13 | /******/ var installedModules = {}; 14 | /******/ 15 | /******/ // The require function 16 | /******/ function __webpack_require__(moduleId) { 17 | /******/ 18 | /******/ // Check if module is in cache 19 | /******/ if(installedModules[moduleId]) { 20 | /******/ return installedModules[moduleId].exports; 21 | /******/ } 22 | /******/ // Create a new module (and put it into the cache) 23 | /******/ var module = installedModules[moduleId] = { 24 | /******/ i: moduleId, 25 | /******/ l: false, 26 | /******/ exports: {} 27 | /******/ }; 28 | /******/ 29 | /******/ // Execute the module function 30 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 31 | /******/ 32 | /******/ // Flag the module as loaded 33 | /******/ module.l = true; 34 | /******/ 35 | /******/ // Return the exports of the module 36 | /******/ return module.exports; 37 | /******/ } 38 | /******/ 39 | /******/ 40 | /******/ // expose the modules object (__webpack_modules__) 41 | /******/ __webpack_require__.m = modules; 42 | /******/ 43 | /******/ // expose the module cache 44 | /******/ __webpack_require__.c = installedModules; 45 | /******/ 46 | /******/ // define getter function for harmony exports 47 | /******/ __webpack_require__.d = function(exports, name, getter) { 48 | /******/ if(!__webpack_require__.o(exports, name)) { 49 | /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); 50 | /******/ } 51 | /******/ }; 52 | /******/ 53 | /******/ // define __esModule on exports 54 | /******/ __webpack_require__.r = function(exports) { 55 | /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { 56 | /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); 57 | /******/ } 58 | /******/ Object.defineProperty(exports, '__esModule', { value: true }); 59 | /******/ }; 60 | /******/ 61 | /******/ // create a fake namespace object 62 | /******/ // mode & 1: value is a module id, require it 63 | /******/ // mode & 2: merge all properties of value into the ns 64 | /******/ // mode & 4: return value when already ns object 65 | /******/ // mode & 8|1: behave like require 66 | /******/ __webpack_require__.t = function(value, mode) { 67 | /******/ if(mode & 1) value = __webpack_require__(value); 68 | /******/ if(mode & 8) return value; 69 | /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; 70 | /******/ var ns = Object.create(null); 71 | /******/ __webpack_require__.r(ns); 72 | /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); 73 | /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); 74 | /******/ return ns; 75 | /******/ }; 76 | /******/ 77 | /******/ // getDefaultExport function for compatibility with non-harmony modules 78 | /******/ __webpack_require__.n = function(module) { 79 | /******/ var getter = module && module.__esModule ? 80 | /******/ function getDefault() { return module['default']; } : 81 | /******/ function getModuleExports() { return module; }; 82 | /******/ __webpack_require__.d(getter, 'a', getter); 83 | /******/ return getter; 84 | /******/ }; 85 | /******/ 86 | /******/ // Object.prototype.hasOwnProperty.call 87 | /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; 88 | /******/ 89 | /******/ // __webpack_public_path__ 90 | /******/ __webpack_require__.p = ""; 91 | /******/ 92 | /******/ 93 | /******/ // Load entry module and return exports 94 | /******/ return __webpack_require__(__webpack_require__.s = "fb15"); 95 | /******/ }) 96 | /************************************************************************/ 97 | /******/ ({ 98 | 99 | /***/ "01f9": 100 | /***/ (function(module, exports, __webpack_require__) { 101 | 102 | "use strict"; 103 | 104 | var LIBRARY = __webpack_require__("2d00"); 105 | var $export = __webpack_require__("5ca1"); 106 | var redefine = __webpack_require__("2aba"); 107 | var hide = __webpack_require__("32e9"); 108 | var Iterators = __webpack_require__("84f2"); 109 | var $iterCreate = __webpack_require__("41a0"); 110 | var setToStringTag = __webpack_require__("7f20"); 111 | var getPrototypeOf = __webpack_require__("38fd"); 112 | var ITERATOR = __webpack_require__("2b4c")('iterator'); 113 | var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next` 114 | var FF_ITERATOR = '@@iterator'; 115 | var KEYS = 'keys'; 116 | var VALUES = 'values'; 117 | 118 | var returnThis = function () { return this; }; 119 | 120 | module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) { 121 | $iterCreate(Constructor, NAME, next); 122 | var getMethod = function (kind) { 123 | if (!BUGGY && kind in proto) return proto[kind]; 124 | switch (kind) { 125 | case KEYS: return function keys() { return new Constructor(this, kind); }; 126 | case VALUES: return function values() { return new Constructor(this, kind); }; 127 | } return function entries() { return new Constructor(this, kind); }; 128 | }; 129 | var TAG = NAME + ' Iterator'; 130 | var DEF_VALUES = DEFAULT == VALUES; 131 | var VALUES_BUG = false; 132 | var proto = Base.prototype; 133 | var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]; 134 | var $default = $native || getMethod(DEFAULT); 135 | var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined; 136 | var $anyNative = NAME == 'Array' ? proto.entries || $native : $native; 137 | var methods, key, IteratorPrototype; 138 | // Fix native 139 | if ($anyNative) { 140 | IteratorPrototype = getPrototypeOf($anyNative.call(new Base())); 141 | if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) { 142 | // Set @@toStringTag to native iterators 143 | setToStringTag(IteratorPrototype, TAG, true); 144 | // fix for some old engines 145 | if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis); 146 | } 147 | } 148 | // fix Array#{values, @@iterator}.name in V8 / FF 149 | if (DEF_VALUES && $native && $native.name !== VALUES) { 150 | VALUES_BUG = true; 151 | $default = function values() { return $native.call(this); }; 152 | } 153 | // Define iterator 154 | if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) { 155 | hide(proto, ITERATOR, $default); 156 | } 157 | // Plug for library 158 | Iterators[NAME] = $default; 159 | Iterators[TAG] = returnThis; 160 | if (DEFAULT) { 161 | methods = { 162 | values: DEF_VALUES ? $default : getMethod(VALUES), 163 | keys: IS_SET ? $default : getMethod(KEYS), 164 | entries: $entries 165 | }; 166 | if (FORCED) for (key in methods) { 167 | if (!(key in proto)) redefine(proto, key, methods[key]); 168 | } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); 169 | } 170 | return methods; 171 | }; 172 | 173 | 174 | /***/ }), 175 | 176 | /***/ "0d58": 177 | /***/ (function(module, exports, __webpack_require__) { 178 | 179 | // 19.1.2.14 / 15.2.3.14 Object.keys(O) 180 | var $keys = __webpack_require__("ce10"); 181 | var enumBugKeys = __webpack_require__("e11e"); 182 | 183 | module.exports = Object.keys || function keys(O) { 184 | return $keys(O, enumBugKeys); 185 | }; 186 | 187 | 188 | /***/ }), 189 | 190 | /***/ "1495": 191 | /***/ (function(module, exports, __webpack_require__) { 192 | 193 | var dP = __webpack_require__("86cc"); 194 | var anObject = __webpack_require__("cb7c"); 195 | var getKeys = __webpack_require__("0d58"); 196 | 197 | module.exports = __webpack_require__("9e1e") ? Object.defineProperties : function defineProperties(O, Properties) { 198 | anObject(O); 199 | var keys = getKeys(Properties); 200 | var length = keys.length; 201 | var i = 0; 202 | var P; 203 | while (length > i) dP.f(O, P = keys[i++], Properties[P]); 204 | return O; 205 | }; 206 | 207 | 208 | /***/ }), 209 | 210 | /***/ "230e": 211 | /***/ (function(module, exports, __webpack_require__) { 212 | 213 | var isObject = __webpack_require__("d3f4"); 214 | var document = __webpack_require__("7726").document; 215 | // typeof document.createElement is 'object' in old IE 216 | var is = isObject(document) && isObject(document.createElement); 217 | module.exports = function (it) { 218 | return is ? document.createElement(it) : {}; 219 | }; 220 | 221 | 222 | /***/ }), 223 | 224 | /***/ "2aba": 225 | /***/ (function(module, exports, __webpack_require__) { 226 | 227 | var global = __webpack_require__("7726"); 228 | var hide = __webpack_require__("32e9"); 229 | var has = __webpack_require__("69a8"); 230 | var SRC = __webpack_require__("ca5a")('src'); 231 | var $toString = __webpack_require__("fa5b"); 232 | var TO_STRING = 'toString'; 233 | var TPL = ('' + $toString).split(TO_STRING); 234 | 235 | __webpack_require__("8378").inspectSource = function (it) { 236 | return $toString.call(it); 237 | }; 238 | 239 | (module.exports = function (O, key, val, safe) { 240 | var isFunction = typeof val == 'function'; 241 | if (isFunction) has(val, 'name') || hide(val, 'name', key); 242 | if (O[key] === val) return; 243 | if (isFunction) has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key))); 244 | if (O === global) { 245 | O[key] = val; 246 | } else if (!safe) { 247 | delete O[key]; 248 | hide(O, key, val); 249 | } else if (O[key]) { 250 | O[key] = val; 251 | } else { 252 | hide(O, key, val); 253 | } 254 | // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative 255 | })(Function.prototype, TO_STRING, function toString() { 256 | return typeof this == 'function' && this[SRC] || $toString.call(this); 257 | }); 258 | 259 | 260 | /***/ }), 261 | 262 | /***/ "2aeb": 263 | /***/ (function(module, exports, __webpack_require__) { 264 | 265 | // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) 266 | var anObject = __webpack_require__("cb7c"); 267 | var dPs = __webpack_require__("1495"); 268 | var enumBugKeys = __webpack_require__("e11e"); 269 | var IE_PROTO = __webpack_require__("613b")('IE_PROTO'); 270 | var Empty = function () { /* empty */ }; 271 | var PROTOTYPE = 'prototype'; 272 | 273 | // Create object with fake `null` prototype: use iframe Object with cleared prototype 274 | var createDict = function () { 275 | // Thrash, waste and sodomy: IE GC bug 276 | var iframe = __webpack_require__("230e")('iframe'); 277 | var i = enumBugKeys.length; 278 | var lt = '<'; 279 | var gt = '>'; 280 | var iframeDocument; 281 | iframe.style.display = 'none'; 282 | __webpack_require__("fab2").appendChild(iframe); 283 | iframe.src = 'javascript:'; // eslint-disable-line no-script-url 284 | // createDict = iframe.contentWindow.Object; 285 | // html.removeChild(iframe); 286 | iframeDocument = iframe.contentWindow.document; 287 | iframeDocument.open(); 288 | iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); 289 | iframeDocument.close(); 290 | createDict = iframeDocument.F; 291 | while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]]; 292 | return createDict(); 293 | }; 294 | 295 | module.exports = Object.create || function create(O, Properties) { 296 | var result; 297 | if (O !== null) { 298 | Empty[PROTOTYPE] = anObject(O); 299 | result = new Empty(); 300 | Empty[PROTOTYPE] = null; 301 | // add "__proto__" for Object.getPrototypeOf polyfill 302 | result[IE_PROTO] = O; 303 | } else result = createDict(); 304 | return Properties === undefined ? result : dPs(result, Properties); 305 | }; 306 | 307 | 308 | /***/ }), 309 | 310 | /***/ "2b4c": 311 | /***/ (function(module, exports, __webpack_require__) { 312 | 313 | var store = __webpack_require__("5537")('wks'); 314 | var uid = __webpack_require__("ca5a"); 315 | var Symbol = __webpack_require__("7726").Symbol; 316 | var USE_SYMBOL = typeof Symbol == 'function'; 317 | 318 | var $exports = module.exports = function (name) { 319 | return store[name] || (store[name] = 320 | USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)); 321 | }; 322 | 323 | $exports.store = store; 324 | 325 | 326 | /***/ }), 327 | 328 | /***/ "2d00": 329 | /***/ (function(module, exports) { 330 | 331 | module.exports = false; 332 | 333 | 334 | /***/ }), 335 | 336 | /***/ "2d95": 337 | /***/ (function(module, exports) { 338 | 339 | var toString = {}.toString; 340 | 341 | module.exports = function (it) { 342 | return toString.call(it).slice(8, -1); 343 | }; 344 | 345 | 346 | /***/ }), 347 | 348 | /***/ "32e9": 349 | /***/ (function(module, exports, __webpack_require__) { 350 | 351 | var dP = __webpack_require__("86cc"); 352 | var createDesc = __webpack_require__("4630"); 353 | module.exports = __webpack_require__("9e1e") ? function (object, key, value) { 354 | return dP.f(object, key, createDesc(1, value)); 355 | } : function (object, key, value) { 356 | object[key] = value; 357 | return object; 358 | }; 359 | 360 | 361 | /***/ }), 362 | 363 | /***/ "36bd": 364 | /***/ (function(module, exports, __webpack_require__) { 365 | 366 | "use strict"; 367 | // 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) 368 | 369 | var toObject = __webpack_require__("4bf8"); 370 | var toAbsoluteIndex = __webpack_require__("77f1"); 371 | var toLength = __webpack_require__("9def"); 372 | module.exports = function fill(value /* , start = 0, end = @length */) { 373 | var O = toObject(this); 374 | var length = toLength(O.length); 375 | var aLen = arguments.length; 376 | var index = toAbsoluteIndex(aLen > 1 ? arguments[1] : undefined, length); 377 | var end = aLen > 2 ? arguments[2] : undefined; 378 | var endPos = end === undefined ? length : toAbsoluteIndex(end, length); 379 | while (endPos > index) O[index++] = value; 380 | return O; 381 | }; 382 | 383 | 384 | /***/ }), 385 | 386 | /***/ "38fd": 387 | /***/ (function(module, exports, __webpack_require__) { 388 | 389 | // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) 390 | var has = __webpack_require__("69a8"); 391 | var toObject = __webpack_require__("4bf8"); 392 | var IE_PROTO = __webpack_require__("613b")('IE_PROTO'); 393 | var ObjectProto = Object.prototype; 394 | 395 | module.exports = Object.getPrototypeOf || function (O) { 396 | O = toObject(O); 397 | if (has(O, IE_PROTO)) return O[IE_PROTO]; 398 | if (typeof O.constructor == 'function' && O instanceof O.constructor) { 399 | return O.constructor.prototype; 400 | } return O instanceof Object ? ObjectProto : null; 401 | }; 402 | 403 | 404 | /***/ }), 405 | 406 | /***/ "41a0": 407 | /***/ (function(module, exports, __webpack_require__) { 408 | 409 | "use strict"; 410 | 411 | var create = __webpack_require__("2aeb"); 412 | var descriptor = __webpack_require__("4630"); 413 | var setToStringTag = __webpack_require__("7f20"); 414 | var IteratorPrototype = {}; 415 | 416 | // 25.1.2.1.1 %IteratorPrototype%[@@iterator]() 417 | __webpack_require__("32e9")(IteratorPrototype, __webpack_require__("2b4c")('iterator'), function () { return this; }); 418 | 419 | module.exports = function (Constructor, NAME, next) { 420 | Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) }); 421 | setToStringTag(Constructor, NAME + ' Iterator'); 422 | }; 423 | 424 | 425 | /***/ }), 426 | 427 | /***/ "456d": 428 | /***/ (function(module, exports, __webpack_require__) { 429 | 430 | // 19.1.2.14 Object.keys(O) 431 | var toObject = __webpack_require__("4bf8"); 432 | var $keys = __webpack_require__("0d58"); 433 | 434 | __webpack_require__("5eda")('keys', function () { 435 | return function keys(it) { 436 | return $keys(toObject(it)); 437 | }; 438 | }); 439 | 440 | 441 | /***/ }), 442 | 443 | /***/ "4588": 444 | /***/ (function(module, exports) { 445 | 446 | // 7.1.4 ToInteger 447 | var ceil = Math.ceil; 448 | var floor = Math.floor; 449 | module.exports = function (it) { 450 | return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); 451 | }; 452 | 453 | 454 | /***/ }), 455 | 456 | /***/ "4630": 457 | /***/ (function(module, exports) { 458 | 459 | module.exports = function (bitmap, value) { 460 | return { 461 | enumerable: !(bitmap & 1), 462 | configurable: !(bitmap & 2), 463 | writable: !(bitmap & 4), 464 | value: value 465 | }; 466 | }; 467 | 468 | 469 | /***/ }), 470 | 471 | /***/ "4bf8": 472 | /***/ (function(module, exports, __webpack_require__) { 473 | 474 | // 7.1.13 ToObject(argument) 475 | var defined = __webpack_require__("be13"); 476 | module.exports = function (it) { 477 | return Object(defined(it)); 478 | }; 479 | 480 | 481 | /***/ }), 482 | 483 | /***/ "5537": 484 | /***/ (function(module, exports, __webpack_require__) { 485 | 486 | var core = __webpack_require__("8378"); 487 | var global = __webpack_require__("7726"); 488 | var SHARED = '__core-js_shared__'; 489 | var store = global[SHARED] || (global[SHARED] = {}); 490 | 491 | (module.exports = function (key, value) { 492 | return store[key] || (store[key] = value !== undefined ? value : {}); 493 | })('versions', []).push({ 494 | version: core.version, 495 | mode: __webpack_require__("2d00") ? 'pure' : 'global', 496 | copyright: '© 2019 Denis Pushkarev (zloirock.ru)' 497 | }); 498 | 499 | 500 | /***/ }), 501 | 502 | /***/ "5ca1": 503 | /***/ (function(module, exports, __webpack_require__) { 504 | 505 | var global = __webpack_require__("7726"); 506 | var core = __webpack_require__("8378"); 507 | var hide = __webpack_require__("32e9"); 508 | var redefine = __webpack_require__("2aba"); 509 | var ctx = __webpack_require__("9b43"); 510 | var PROTOTYPE = 'prototype'; 511 | 512 | var $export = function (type, name, source) { 513 | var IS_FORCED = type & $export.F; 514 | var IS_GLOBAL = type & $export.G; 515 | var IS_STATIC = type & $export.S; 516 | var IS_PROTO = type & $export.P; 517 | var IS_BIND = type & $export.B; 518 | var target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE]; 519 | var exports = IS_GLOBAL ? core : core[name] || (core[name] = {}); 520 | var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {}); 521 | var key, own, out, exp; 522 | if (IS_GLOBAL) source = name; 523 | for (key in source) { 524 | // contains in native 525 | own = !IS_FORCED && target && target[key] !== undefined; 526 | // export native or passed 527 | out = (own ? target : source)[key]; 528 | // bind timers to global for call from export context 529 | exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; 530 | // extend global 531 | if (target) redefine(target, key, out, type & $export.U); 532 | // export 533 | if (exports[key] != out) hide(exports, key, exp); 534 | if (IS_PROTO && expProto[key] != out) expProto[key] = out; 535 | } 536 | }; 537 | global.core = core; 538 | // type bitmap 539 | $export.F = 1; // forced 540 | $export.G = 2; // global 541 | $export.S = 4; // static 542 | $export.P = 8; // proto 543 | $export.B = 16; // bind 544 | $export.W = 32; // wrap 545 | $export.U = 64; // safe 546 | $export.R = 128; // real proto method for `library` 547 | module.exports = $export; 548 | 549 | 550 | /***/ }), 551 | 552 | /***/ "5eda": 553 | /***/ (function(module, exports, __webpack_require__) { 554 | 555 | // most Object methods by ES6 should accept primitives 556 | var $export = __webpack_require__("5ca1"); 557 | var core = __webpack_require__("8378"); 558 | var fails = __webpack_require__("79e5"); 559 | module.exports = function (KEY, exec) { 560 | var fn = (core.Object || {})[KEY] || Object[KEY]; 561 | var exp = {}; 562 | exp[KEY] = exec(fn); 563 | $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp); 564 | }; 565 | 566 | 567 | /***/ }), 568 | 569 | /***/ "613b": 570 | /***/ (function(module, exports, __webpack_require__) { 571 | 572 | var shared = __webpack_require__("5537")('keys'); 573 | var uid = __webpack_require__("ca5a"); 574 | module.exports = function (key) { 575 | return shared[key] || (shared[key] = uid(key)); 576 | }; 577 | 578 | 579 | /***/ }), 580 | 581 | /***/ "626a": 582 | /***/ (function(module, exports, __webpack_require__) { 583 | 584 | // fallback for non-array-like ES3 and non-enumerable old V8 strings 585 | var cof = __webpack_require__("2d95"); 586 | // eslint-disable-next-line no-prototype-builtins 587 | module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) { 588 | return cof(it) == 'String' ? it.split('') : Object(it); 589 | }; 590 | 591 | 592 | /***/ }), 593 | 594 | /***/ "6821": 595 | /***/ (function(module, exports, __webpack_require__) { 596 | 597 | // to indexed object, toObject with fallback for non-array-like ES3 strings 598 | var IObject = __webpack_require__("626a"); 599 | var defined = __webpack_require__("be13"); 600 | module.exports = function (it) { 601 | return IObject(defined(it)); 602 | }; 603 | 604 | 605 | /***/ }), 606 | 607 | /***/ "69a8": 608 | /***/ (function(module, exports) { 609 | 610 | var hasOwnProperty = {}.hasOwnProperty; 611 | module.exports = function (it, key) { 612 | return hasOwnProperty.call(it, key); 613 | }; 614 | 615 | 616 | /***/ }), 617 | 618 | /***/ "6a99": 619 | /***/ (function(module, exports, __webpack_require__) { 620 | 621 | // 7.1.1 ToPrimitive(input [, PreferredType]) 622 | var isObject = __webpack_require__("d3f4"); 623 | // instead of the ES6 spec version, we didn't implement @@toPrimitive case 624 | // and the second argument - flag - preferred type is a string 625 | module.exports = function (it, S) { 626 | if (!isObject(it)) return it; 627 | var fn, val; 628 | if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; 629 | if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val; 630 | if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; 631 | throw TypeError("Can't convert object to primitive value"); 632 | }; 633 | 634 | 635 | /***/ }), 636 | 637 | /***/ "6c7b": 638 | /***/ (function(module, exports, __webpack_require__) { 639 | 640 | // 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) 641 | var $export = __webpack_require__("5ca1"); 642 | 643 | $export($export.P, 'Array', { fill: __webpack_require__("36bd") }); 644 | 645 | __webpack_require__("9c6c")('fill'); 646 | 647 | 648 | /***/ }), 649 | 650 | /***/ "7726": 651 | /***/ (function(module, exports) { 652 | 653 | // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 654 | var global = module.exports = typeof window != 'undefined' && window.Math == Math 655 | ? window : typeof self != 'undefined' && self.Math == Math ? self 656 | // eslint-disable-next-line no-new-func 657 | : Function('return this')(); 658 | if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef 659 | 660 | 661 | /***/ }), 662 | 663 | /***/ "77f1": 664 | /***/ (function(module, exports, __webpack_require__) { 665 | 666 | var toInteger = __webpack_require__("4588"); 667 | var max = Math.max; 668 | var min = Math.min; 669 | module.exports = function (index, length) { 670 | index = toInteger(index); 671 | return index < 0 ? max(index + length, 0) : min(index, length); 672 | }; 673 | 674 | 675 | /***/ }), 676 | 677 | /***/ "79e5": 678 | /***/ (function(module, exports) { 679 | 680 | module.exports = function (exec) { 681 | try { 682 | return !!exec(); 683 | } catch (e) { 684 | return true; 685 | } 686 | }; 687 | 688 | 689 | /***/ }), 690 | 691 | /***/ "7f20": 692 | /***/ (function(module, exports, __webpack_require__) { 693 | 694 | var def = __webpack_require__("86cc").f; 695 | var has = __webpack_require__("69a8"); 696 | var TAG = __webpack_require__("2b4c")('toStringTag'); 697 | 698 | module.exports = function (it, tag, stat) { 699 | if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag }); 700 | }; 701 | 702 | 703 | /***/ }), 704 | 705 | /***/ "8378": 706 | /***/ (function(module, exports) { 707 | 708 | var core = module.exports = { version: '2.6.11' }; 709 | if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef 710 | 711 | 712 | /***/ }), 713 | 714 | /***/ "84f2": 715 | /***/ (function(module, exports) { 716 | 717 | module.exports = {}; 718 | 719 | 720 | /***/ }), 721 | 722 | /***/ "86cc": 723 | /***/ (function(module, exports, __webpack_require__) { 724 | 725 | var anObject = __webpack_require__("cb7c"); 726 | var IE8_DOM_DEFINE = __webpack_require__("c69a"); 727 | var toPrimitive = __webpack_require__("6a99"); 728 | var dP = Object.defineProperty; 729 | 730 | exports.f = __webpack_require__("9e1e") ? Object.defineProperty : function defineProperty(O, P, Attributes) { 731 | anObject(O); 732 | P = toPrimitive(P, true); 733 | anObject(Attributes); 734 | if (IE8_DOM_DEFINE) try { 735 | return dP(O, P, Attributes); 736 | } catch (e) { /* empty */ } 737 | if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); 738 | if ('value' in Attributes) O[P] = Attributes.value; 739 | return O; 740 | }; 741 | 742 | 743 | /***/ }), 744 | 745 | /***/ "9b43": 746 | /***/ (function(module, exports, __webpack_require__) { 747 | 748 | // optional / simple context binding 749 | var aFunction = __webpack_require__("d8e8"); 750 | module.exports = function (fn, that, length) { 751 | aFunction(fn); 752 | if (that === undefined) return fn; 753 | switch (length) { 754 | case 1: return function (a) { 755 | return fn.call(that, a); 756 | }; 757 | case 2: return function (a, b) { 758 | return fn.call(that, a, b); 759 | }; 760 | case 3: return function (a, b, c) { 761 | return fn.call(that, a, b, c); 762 | }; 763 | } 764 | return function (/* ...args */) { 765 | return fn.apply(that, arguments); 766 | }; 767 | }; 768 | 769 | 770 | /***/ }), 771 | 772 | /***/ "9c6c": 773 | /***/ (function(module, exports, __webpack_require__) { 774 | 775 | // 22.1.3.31 Array.prototype[@@unscopables] 776 | var UNSCOPABLES = __webpack_require__("2b4c")('unscopables'); 777 | var ArrayProto = Array.prototype; 778 | if (ArrayProto[UNSCOPABLES] == undefined) __webpack_require__("32e9")(ArrayProto, UNSCOPABLES, {}); 779 | module.exports = function (key) { 780 | ArrayProto[UNSCOPABLES][key] = true; 781 | }; 782 | 783 | 784 | /***/ }), 785 | 786 | /***/ "9def": 787 | /***/ (function(module, exports, __webpack_require__) { 788 | 789 | // 7.1.15 ToLength 790 | var toInteger = __webpack_require__("4588"); 791 | var min = Math.min; 792 | module.exports = function (it) { 793 | return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 794 | }; 795 | 796 | 797 | /***/ }), 798 | 799 | /***/ "9e1e": 800 | /***/ (function(module, exports, __webpack_require__) { 801 | 802 | // Thank's IE8 for his funny defineProperty 803 | module.exports = !__webpack_require__("79e5")(function () { 804 | return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; 805 | }); 806 | 807 | 808 | /***/ }), 809 | 810 | /***/ "ac6a": 811 | /***/ (function(module, exports, __webpack_require__) { 812 | 813 | var $iterators = __webpack_require__("cadf"); 814 | var getKeys = __webpack_require__("0d58"); 815 | var redefine = __webpack_require__("2aba"); 816 | var global = __webpack_require__("7726"); 817 | var hide = __webpack_require__("32e9"); 818 | var Iterators = __webpack_require__("84f2"); 819 | var wks = __webpack_require__("2b4c"); 820 | var ITERATOR = wks('iterator'); 821 | var TO_STRING_TAG = wks('toStringTag'); 822 | var ArrayValues = Iterators.Array; 823 | 824 | var DOMIterables = { 825 | CSSRuleList: true, // TODO: Not spec compliant, should be false. 826 | CSSStyleDeclaration: false, 827 | CSSValueList: false, 828 | ClientRectList: false, 829 | DOMRectList: false, 830 | DOMStringList: false, 831 | DOMTokenList: true, 832 | DataTransferItemList: false, 833 | FileList: false, 834 | HTMLAllCollection: false, 835 | HTMLCollection: false, 836 | HTMLFormElement: false, 837 | HTMLSelectElement: false, 838 | MediaList: true, // TODO: Not spec compliant, should be false. 839 | MimeTypeArray: false, 840 | NamedNodeMap: false, 841 | NodeList: true, 842 | PaintRequestList: false, 843 | Plugin: false, 844 | PluginArray: false, 845 | SVGLengthList: false, 846 | SVGNumberList: false, 847 | SVGPathSegList: false, 848 | SVGPointList: false, 849 | SVGStringList: false, 850 | SVGTransformList: false, 851 | SourceBufferList: false, 852 | StyleSheetList: true, // TODO: Not spec compliant, should be false. 853 | TextTrackCueList: false, 854 | TextTrackList: false, 855 | TouchList: false 856 | }; 857 | 858 | for (var collections = getKeys(DOMIterables), i = 0; i < collections.length; i++) { 859 | var NAME = collections[i]; 860 | var explicit = DOMIterables[NAME]; 861 | var Collection = global[NAME]; 862 | var proto = Collection && Collection.prototype; 863 | var key; 864 | if (proto) { 865 | if (!proto[ITERATOR]) hide(proto, ITERATOR, ArrayValues); 866 | if (!proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME); 867 | Iterators[NAME] = ArrayValues; 868 | if (explicit) for (key in $iterators) if (!proto[key]) redefine(proto, key, $iterators[key], true); 869 | } 870 | } 871 | 872 | 873 | /***/ }), 874 | 875 | /***/ "be13": 876 | /***/ (function(module, exports) { 877 | 878 | // 7.2.1 RequireObjectCoercible(argument) 879 | module.exports = function (it) { 880 | if (it == undefined) throw TypeError("Can't call method on " + it); 881 | return it; 882 | }; 883 | 884 | 885 | /***/ }), 886 | 887 | /***/ "c366": 888 | /***/ (function(module, exports, __webpack_require__) { 889 | 890 | // false -> Array#indexOf 891 | // true -> Array#includes 892 | var toIObject = __webpack_require__("6821"); 893 | var toLength = __webpack_require__("9def"); 894 | var toAbsoluteIndex = __webpack_require__("77f1"); 895 | module.exports = function (IS_INCLUDES) { 896 | return function ($this, el, fromIndex) { 897 | var O = toIObject($this); 898 | var length = toLength(O.length); 899 | var index = toAbsoluteIndex(fromIndex, length); 900 | var value; 901 | // Array#includes uses SameValueZero equality algorithm 902 | // eslint-disable-next-line no-self-compare 903 | if (IS_INCLUDES && el != el) while (length > index) { 904 | value = O[index++]; 905 | // eslint-disable-next-line no-self-compare 906 | if (value != value) return true; 907 | // Array#indexOf ignores holes, Array#includes - not 908 | } else for (;length > index; index++) if (IS_INCLUDES || index in O) { 909 | if (O[index] === el) return IS_INCLUDES || index || 0; 910 | } return !IS_INCLUDES && -1; 911 | }; 912 | }; 913 | 914 | 915 | /***/ }), 916 | 917 | /***/ "c69a": 918 | /***/ (function(module, exports, __webpack_require__) { 919 | 920 | module.exports = !__webpack_require__("9e1e") && !__webpack_require__("79e5")(function () { 921 | return Object.defineProperty(__webpack_require__("230e")('div'), 'a', { get: function () { return 7; } }).a != 7; 922 | }); 923 | 924 | 925 | /***/ }), 926 | 927 | /***/ "ca5a": 928 | /***/ (function(module, exports) { 929 | 930 | var id = 0; 931 | var px = Math.random(); 932 | module.exports = function (key) { 933 | return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); 934 | }; 935 | 936 | 937 | /***/ }), 938 | 939 | /***/ "cadf": 940 | /***/ (function(module, exports, __webpack_require__) { 941 | 942 | "use strict"; 943 | 944 | var addToUnscopables = __webpack_require__("9c6c"); 945 | var step = __webpack_require__("d53b"); 946 | var Iterators = __webpack_require__("84f2"); 947 | var toIObject = __webpack_require__("6821"); 948 | 949 | // 22.1.3.4 Array.prototype.entries() 950 | // 22.1.3.13 Array.prototype.keys() 951 | // 22.1.3.29 Array.prototype.values() 952 | // 22.1.3.30 Array.prototype[@@iterator]() 953 | module.exports = __webpack_require__("01f9")(Array, 'Array', function (iterated, kind) { 954 | this._t = toIObject(iterated); // target 955 | this._i = 0; // next index 956 | this._k = kind; // kind 957 | // 22.1.5.2.1 %ArrayIteratorPrototype%.next() 958 | }, function () { 959 | var O = this._t; 960 | var kind = this._k; 961 | var index = this._i++; 962 | if (!O || index >= O.length) { 963 | this._t = undefined; 964 | return step(1); 965 | } 966 | if (kind == 'keys') return step(0, index); 967 | if (kind == 'values') return step(0, O[index]); 968 | return step(0, [index, O[index]]); 969 | }, 'values'); 970 | 971 | // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) 972 | Iterators.Arguments = Iterators.Array; 973 | 974 | addToUnscopables('keys'); 975 | addToUnscopables('values'); 976 | addToUnscopables('entries'); 977 | 978 | 979 | /***/ }), 980 | 981 | /***/ "cb7c": 982 | /***/ (function(module, exports, __webpack_require__) { 983 | 984 | var isObject = __webpack_require__("d3f4"); 985 | module.exports = function (it) { 986 | if (!isObject(it)) throw TypeError(it + ' is not an object!'); 987 | return it; 988 | }; 989 | 990 | 991 | /***/ }), 992 | 993 | /***/ "ce10": 994 | /***/ (function(module, exports, __webpack_require__) { 995 | 996 | var has = __webpack_require__("69a8"); 997 | var toIObject = __webpack_require__("6821"); 998 | var arrayIndexOf = __webpack_require__("c366")(false); 999 | var IE_PROTO = __webpack_require__("613b")('IE_PROTO'); 1000 | 1001 | module.exports = function (object, names) { 1002 | var O = toIObject(object); 1003 | var i = 0; 1004 | var result = []; 1005 | var key; 1006 | for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key); 1007 | // Don't enum bug & hidden keys 1008 | while (names.length > i) if (has(O, key = names[i++])) { 1009 | ~arrayIndexOf(result, key) || result.push(key); 1010 | } 1011 | return result; 1012 | }; 1013 | 1014 | 1015 | /***/ }), 1016 | 1017 | /***/ "d3f4": 1018 | /***/ (function(module, exports) { 1019 | 1020 | module.exports = function (it) { 1021 | return typeof it === 'object' ? it !== null : typeof it === 'function'; 1022 | }; 1023 | 1024 | 1025 | /***/ }), 1026 | 1027 | /***/ "d53b": 1028 | /***/ (function(module, exports) { 1029 | 1030 | module.exports = function (done, value) { 1031 | return { value: value, done: !!done }; 1032 | }; 1033 | 1034 | 1035 | /***/ }), 1036 | 1037 | /***/ "d8e8": 1038 | /***/ (function(module, exports) { 1039 | 1040 | module.exports = function (it) { 1041 | if (typeof it != 'function') throw TypeError(it + ' is not a function!'); 1042 | return it; 1043 | }; 1044 | 1045 | 1046 | /***/ }), 1047 | 1048 | /***/ "e11e": 1049 | /***/ (function(module, exports) { 1050 | 1051 | // IE 8- don't enum bug keys 1052 | module.exports = ( 1053 | 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' 1054 | ).split(','); 1055 | 1056 | 1057 | /***/ }), 1058 | 1059 | /***/ "f6fd": 1060 | /***/ (function(module, exports) { 1061 | 1062 | // document.currentScript polyfill by Adam Miller 1063 | 1064 | // MIT license 1065 | 1066 | (function(document){ 1067 | var currentScript = "currentScript", 1068 | scripts = document.getElementsByTagName('script'); // Live NodeList collection 1069 | 1070 | // If browser needs currentScript polyfill, add get currentScript() to the document object 1071 | if (!(currentScript in document)) { 1072 | Object.defineProperty(document, currentScript, { 1073 | get: function(){ 1074 | 1075 | // IE 6-10 supports script readyState 1076 | // IE 10+ support stack trace 1077 | try { throw new Error(); } 1078 | catch (err) { 1079 | 1080 | // Find the second match for the "at" string to get file src url from stack. 1081 | // Specifically works with the format of stack traces in IE. 1082 | var i, res = ((/.*at [^\(]*\((.*):.+:.+\)$/ig).exec(err.stack) || [false])[1]; 1083 | 1084 | // For all scripts on the page, if src matches or if ready state is interactive, return the script tag 1085 | for(i in scripts){ 1086 | if(scripts[i].src == res || scripts[i].readyState == "interactive"){ 1087 | return scripts[i]; 1088 | } 1089 | } 1090 | 1091 | // If no match, return null 1092 | return null; 1093 | } 1094 | } 1095 | }); 1096 | } 1097 | })(document); 1098 | 1099 | 1100 | /***/ }), 1101 | 1102 | /***/ "fa5b": 1103 | /***/ (function(module, exports, __webpack_require__) { 1104 | 1105 | module.exports = __webpack_require__("5537")('native-function-to-string', Function.toString); 1106 | 1107 | 1108 | /***/ }), 1109 | 1110 | /***/ "fab2": 1111 | /***/ (function(module, exports, __webpack_require__) { 1112 | 1113 | var document = __webpack_require__("7726").document; 1114 | module.exports = document && document.documentElement; 1115 | 1116 | 1117 | /***/ }), 1118 | 1119 | /***/ "fb15": 1120 | /***/ (function(module, __webpack_exports__, __webpack_require__) { 1121 | 1122 | "use strict"; 1123 | // ESM COMPAT FLAG 1124 | __webpack_require__.r(__webpack_exports__); 1125 | 1126 | // CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js 1127 | // This file is imported into lib/wc client bundles. 1128 | 1129 | if (typeof window !== 'undefined') { 1130 | if (true) { 1131 | __webpack_require__("f6fd") 1132 | } 1133 | 1134 | var i 1135 | if ((i = window.document.currentScript) && (i = i.src.match(/(.+\/)[^/]+\.js(\?.*)?$/))) { 1136 | __webpack_require__.p = i[1] // eslint-disable-line 1137 | } 1138 | } 1139 | 1140 | // Indicate to webpack that this file can be concatenated 1141 | /* harmony default export */ var setPublicPath = (null); 1142 | 1143 | // EXTERNAL MODULE: ./node_modules/core-js/modules/es6.array.fill.js 1144 | var es6_array_fill = __webpack_require__("6c7b"); 1145 | 1146 | // EXTERNAL MODULE: ./node_modules/core-js/modules/es6.array.iterator.js 1147 | var es6_array_iterator = __webpack_require__("cadf"); 1148 | 1149 | // EXTERNAL MODULE: ./node_modules/core-js/modules/es6.object.keys.js 1150 | var es6_object_keys = __webpack_require__("456d"); 1151 | 1152 | // EXTERNAL MODULE: ./node_modules/core-js/modules/web.dom.iterable.js 1153 | var web_dom_iterable = __webpack_require__("ac6a"); 1154 | 1155 | // CONCATENATED MODULE: ./src/lib/waterwaves.js 1156 | 1157 | 1158 | 1159 | 1160 | 1161 | var WaterPolo = function WaterPolo(selector, userOptions) { 1162 | "user strict"; 1163 | 1164 | userOptions = userOptions || {}; 1165 | var options = { 1166 | //外边距 1167 | wrapW: 3, 1168 | //canvas属性 1169 | cW: 130, 1170 | cH: 130, 1171 | lineWidth: 2, 1172 | //液面位置 百分比表示 1173 | baseY: 20, 1174 | //液面起始位置 1175 | nowRange: 0, 1176 | //线条颜色 1177 | lineColor: "rgb(176,204,53)", 1178 | //上层颜色 1179 | oneColor: "rgba(176,204,53,.6)", 1180 | //下层颜色 1181 | twoColor: "rgba(176,204,53,.4)", 1182 | //上层波浪宽度,数越小越宽 1183 | oneWaveWidth: 0.06, 1184 | //下层波浪宽度 1185 | twoWaveWidth: 0.06, 1186 | //上层波浪高度,数越大越高 1187 | oneWaveHeight: 4, 1188 | //下层波浪高度 1189 | twoWaveHeight: 4, 1190 | //上层波浪x轴偏移量 1191 | oneOffsetX: 10, 1192 | //下层波浪x轴偏移量 1193 | twoOffsetX: 20, 1194 | //波浪滚动速度,数越大越快 1195 | speed: 0.2 1196 | }; 1197 | var canvas = null, 1198 | ctx = null, 1199 | W = null, 1200 | H = null; 1201 | Object.defineProperty(this, "options", { 1202 | get: function get() { 1203 | return options; 1204 | }, 1205 | set: function set(value) { 1206 | mergeOption(value, options); 1207 | } 1208 | }); //参数混合相当于$.extend([old],[new]) 1209 | 1210 | var mergeOption = function mergeOption(userOptions, options) { 1211 | Object.keys(userOptions).forEach(function (key) { 1212 | options[key] = userOptions[key]; 1213 | }); 1214 | }; //生成液面 1215 | 1216 | 1217 | var makeLiquaid = function makeLiquaid(ctx, xOffset, waveWidth, waveHeight, color) { 1218 | ctx.save(); 1219 | var points = []; //用于存放绘制Sin曲线的点 1220 | 1221 | ctx.beginPath(); //在x轴上取点 1222 | 1223 | for (var x = 0; x < options.cW; x += 20 / options.cW) { 1224 | //此处坐标(x,y)的取点,依靠公式 “振幅高*sin(x*振幅宽 + 振幅偏移量)” 1225 | var y = -Math.sin(x * waveWidth + xOffset); //液面高度百分比改变 1226 | 1227 | var dY = options.cH * (1 - options.nowRange / 100); 1228 | points.push([x, dY + y * waveHeight]); 1229 | ctx.lineTo(x, dY + y * waveHeight); 1230 | } //封闭路径 1231 | 1232 | 1233 | ctx.lineTo(options.cW, options.cH); 1234 | ctx.lineTo(0, options.cH); 1235 | ctx.lineTo(points[0][0], points[0][1]); 1236 | ctx.fillStyle = color; 1237 | ctx.fill(); 1238 | ctx.restore(); 1239 | }; //初始化设置 1240 | 1241 | 1242 | var init = function init() { 1243 | mergeOption(userOptions, options); 1244 | canvas = document.getElementById(selector); 1245 | ctx = canvas.getContext("2d"); 1246 | canvas.width = options.cW; 1247 | canvas.height = options.cH; 1248 | ctx.lineWidth = options.lineWidth; //圆属性 1249 | 1250 | var r = options.cH / 2; //圆心 1251 | 1252 | var cR = r - 6; //圆半径 决定圆的大小 1253 | 1254 | var drawCircle = function drawCircle(ctx) { 1255 | ctx.beginPath(); 1256 | ctx.strokeStyle = options.lineColor; 1257 | ctx.arc(r, r, cR + options.wrapW, 0, 2 * Math.PI); 1258 | ctx.stroke(); 1259 | ctx.beginPath(); 1260 | ctx.arc(r, r, cR, 0, 2 * Math.PI); 1261 | ctx.clip(); 1262 | }; 1263 | 1264 | drawCircle(ctx); //画圆 1265 | 1266 | (function drawFrame() { 1267 | window.requestAnimationFrame(drawFrame); 1268 | ctx.clearRect(0, 0, options.cW, options.cH); //高度改变动画参数 1269 | 1270 | var tmp = 1; 1271 | 1272 | if (options.nowRange <= options.baseY) { 1273 | options.nowRange += tmp; 1274 | } 1275 | 1276 | if (options.nowRange > options.baseY) { 1277 | options.nowRange -= tmp; 1278 | } 1279 | 1280 | makeLiquaid(ctx, options.oneOffsetX, options.oneWaveWidth, options.oneWaveHeight, options.oneColor); 1281 | makeLiquaid(ctx, options.twoOffsetX, options.twoWaveWidth, options.twoWaveHeight, options.twoColor); 1282 | options.oneOffsetX += options.speed; 1283 | options.twoOffsetX += options.speed; 1284 | })(); 1285 | }; 1286 | 1287 | init(); 1288 | }; 1289 | 1290 | /* harmony default export */ var waterwaves = (WaterPolo); 1291 | // CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/entry-lib.js 1292 | 1293 | 1294 | /* harmony default export */ var entry_lib = __webpack_exports__["default"] = (waterwaves); 1295 | 1296 | 1297 | 1298 | /***/ }) 1299 | 1300 | /******/ })["default"]; 1301 | }); 1302 | //# sourceMappingURL=WaterPolo.umd.js.map -------------------------------------------------------------------------------- /scripts/WaterPolo.umd.min.js: -------------------------------------------------------------------------------- 1 | (function(t,e){"object"===typeof exports&&"object"===typeof module?module.exports=e():"function"===typeof define&&define.amd?define([],e):"object"===typeof exports?exports["WaterPolo"]=e():t["WaterPolo"]=e()})("undefined"!==typeof self?self:this,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s="fb15")}({"01f9":function(t,e,n){"use strict";var r=n("2d00"),o=n("5ca1"),i=n("2aba"),c=n("32e9"),u=n("84f2"),f=n("41a0"),a=n("7f20"),s=n("38fd"),l=n("2b4c")("iterator"),p=!([].keys&&"next"in[].keys()),d="@@iterator",v="keys",b="values",y=function(){return this};t.exports=function(t,e,n,h,g,x,w){f(n,e,h);var m,O,S,j=function(t){if(!p&&t in L)return L[t];switch(t){case v:return function(){return new n(this,t)};case b:return function(){return new n(this,t)}}return function(){return new n(this,t)}},P=e+" Iterator",T=g==b,_=!1,L=t.prototype,M=L[l]||L[d]||g&&L[g],W=M||j(g),k=g?T?j("entries"):W:void 0,E="Array"==e&&L.entries||M;if(E&&(S=s(E.call(new t)),S!==Object.prototype&&S.next&&(a(S,P,!0),r||"function"==typeof S[l]||c(S,l,y))),T&&M&&M.name!==b&&(_=!0,W=function(){return M.call(this)}),r&&!w||!p&&!_&&L[l]||c(L,l,W),u[e]=W,u[P]=y,g)if(m={values:T?W:j(b),keys:x?W:j(v),entries:k},w)for(O in m)O in L||i(L,O,m[O]);else o(o.P+o.F*(p||_),e,m);return m}},"0d58":function(t,e,n){var r=n("ce10"),o=n("e11e");t.exports=Object.keys||function(t){return r(t,o)}},1495:function(t,e,n){var r=n("86cc"),o=n("cb7c"),i=n("0d58");t.exports=n("9e1e")?Object.defineProperties:function(t,e){o(t);var n,c=i(e),u=c.length,f=0;while(u>f)r.f(t,n=c[f++],e[n]);return t}},"230e":function(t,e,n){var r=n("d3f4"),o=n("7726").document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},"2aba":function(t,e,n){var r=n("7726"),o=n("32e9"),i=n("69a8"),c=n("ca5a")("src"),u=n("fa5b"),f="toString",a=(""+u).split(f);n("8378").inspectSource=function(t){return u.call(t)},(t.exports=function(t,e,n,u){var f="function"==typeof n;f&&(i(n,"name")||o(n,"name",e)),t[e]!==n&&(f&&(i(n,c)||o(n,c,t[e]?""+t[e]:a.join(String(e)))),t===r?t[e]=n:u?t[e]?t[e]=n:o(t,e,n):(delete t[e],o(t,e,n)))})(Function.prototype,f,(function(){return"function"==typeof this&&this[c]||u.call(this)}))},"2aeb":function(t,e,n){var r=n("cb7c"),o=n("1495"),i=n("e11e"),c=n("613b")("IE_PROTO"),u=function(){},f="prototype",a=function(){var t,e=n("230e")("iframe"),r=i.length,o="<",c=">";e.style.display="none",n("fab2").appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write(o+"script"+c+"document.F=Object"+o+"/script"+c),t.close(),a=t.F;while(r--)delete a[f][i[r]];return a()};t.exports=Object.create||function(t,e){var n;return null!==t?(u[f]=r(t),n=new u,u[f]=null,n[c]=t):n=a(),void 0===e?n:o(n,e)}},"2b4c":function(t,e,n){var r=n("5537")("wks"),o=n("ca5a"),i=n("7726").Symbol,c="function"==typeof i,u=t.exports=function(t){return r[t]||(r[t]=c&&i[t]||(c?i:o)("Symbol."+t))};u.store=r},"2d00":function(t,e){t.exports=!1},"2d95":function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},"32e9":function(t,e,n){var r=n("86cc"),o=n("4630");t.exports=n("9e1e")?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},"36bd":function(t,e,n){"use strict";var r=n("4bf8"),o=n("77f1"),i=n("9def");t.exports=function(t){var e=r(this),n=i(e.length),c=arguments.length,u=o(c>1?arguments[1]:void 0,n),f=c>2?arguments[2]:void 0,a=void 0===f?n:o(f,n);while(a>u)e[u++]=t;return e}},"38fd":function(t,e,n){var r=n("69a8"),o=n("4bf8"),i=n("613b")("IE_PROTO"),c=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=o(t),r(t,i)?t[i]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?c:null}},"41a0":function(t,e,n){"use strict";var r=n("2aeb"),o=n("4630"),i=n("7f20"),c={};n("32e9")(c,n("2b4c")("iterator"),(function(){return this})),t.exports=function(t,e,n){t.prototype=r(c,{next:o(1,n)}),i(t,e+" Iterator")}},"456d":function(t,e,n){var r=n("4bf8"),o=n("0d58");n("5eda")("keys",(function(){return function(t){return o(r(t))}}))},4588:function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},4630:function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},"4bf8":function(t,e,n){var r=n("be13");t.exports=function(t){return Object(r(t))}},5537:function(t,e,n){var r=n("8378"),o=n("7726"),i="__core-js_shared__",c=o[i]||(o[i]={});(t.exports=function(t,e){return c[t]||(c[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n("2d00")?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},"5ca1":function(t,e,n){var r=n("7726"),o=n("8378"),i=n("32e9"),c=n("2aba"),u=n("9b43"),f="prototype",a=function(t,e,n){var s,l,p,d,v=t&a.F,b=t&a.G,y=t&a.S,h=t&a.P,g=t&a.B,x=b?r:y?r[e]||(r[e]={}):(r[e]||{})[f],w=b?o:o[e]||(o[e]={}),m=w[f]||(w[f]={});for(s in b&&(n=e),n)l=!v&&x&&void 0!==x[s],p=(l?x:n)[s],d=g&&l?u(p,r):h&&"function"==typeof p?u(Function.call,p):p,x&&c(x,s,p,t&a.U),w[s]!=p&&i(w,s,d),h&&m[s]!=p&&(m[s]=p)};r.core=o,a.F=1,a.G=2,a.S=4,a.P=8,a.B=16,a.W=32,a.U=64,a.R=128,t.exports=a},"5eda":function(t,e,n){var r=n("5ca1"),o=n("8378"),i=n("79e5");t.exports=function(t,e){var n=(o.Object||{})[t]||Object[t],c={};c[t]=e(n),r(r.S+r.F*i((function(){n(1)})),"Object",c)}},"613b":function(t,e,n){var r=n("5537")("keys"),o=n("ca5a");t.exports=function(t){return r[t]||(r[t]=o(t))}},"626a":function(t,e,n){var r=n("2d95");t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},6821:function(t,e,n){var r=n("626a"),o=n("be13");t.exports=function(t){return r(o(t))}},"69a8":function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},"6a99":function(t,e,n){var r=n("d3f4");t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},"6c7b":function(t,e,n){var r=n("5ca1");r(r.P,"Array",{fill:n("36bd")}),n("9c6c")("fill")},7726:function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},"77f1":function(t,e,n){var r=n("4588"),o=Math.max,i=Math.min;t.exports=function(t,e){return t=r(t),t<0?o(t+e,0):i(t,e)}},"79e5":function(t,e){t.exports=function(t){try{return!!t()}catch(e){return!0}}},"7f20":function(t,e,n){var r=n("86cc").f,o=n("69a8"),i=n("2b4c")("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,i)&&r(t,i,{configurable:!0,value:e})}},8378:function(t,e){var n=t.exports={version:"2.6.11"};"number"==typeof __e&&(__e=n)},"84f2":function(t,e){t.exports={}},"86cc":function(t,e,n){var r=n("cb7c"),o=n("c69a"),i=n("6a99"),c=Object.defineProperty;e.f=n("9e1e")?Object.defineProperty:function(t,e,n){if(r(t),e=i(e,!0),r(n),o)try{return c(t,e,n)}catch(u){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},"9b43":function(t,e,n){var r=n("d8e8");t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},"9c6c":function(t,e,n){var r=n("2b4c")("unscopables"),o=Array.prototype;void 0==o[r]&&n("32e9")(o,r,{}),t.exports=function(t){o[r][t]=!0}},"9def":function(t,e,n){var r=n("4588"),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},"9e1e":function(t,e,n){t.exports=!n("79e5")((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},ac6a:function(t,e,n){for(var r=n("cadf"),o=n("0d58"),i=n("2aba"),c=n("7726"),u=n("32e9"),f=n("84f2"),a=n("2b4c"),s=a("iterator"),l=a("toStringTag"),p=f.Array,d={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},v=o(d),b=0;bs)if(u=f[s++],u!=u)return!0}else for(;a>s;s++)if((t||s in f)&&f[s]===n)return t||s||0;return!t&&-1}}},c69a:function(t,e,n){t.exports=!n("9e1e")&&!n("79e5")((function(){return 7!=Object.defineProperty(n("230e")("div"),"a",{get:function(){return 7}}).a}))},ca5a:function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},cadf:function(t,e,n){"use strict";var r=n("9c6c"),o=n("d53b"),i=n("84f2"),c=n("6821");t.exports=n("01f9")(Array,"Array",(function(t,e){this._t=c(t),this._i=0,this._k=e}),(function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,o(1)):o(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])}),"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},cb7c:function(t,e,n){var r=n("d3f4");t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},ce10:function(t,e,n){var r=n("69a8"),o=n("6821"),i=n("c366")(!1),c=n("613b")("IE_PROTO");t.exports=function(t,e){var n,u=o(t),f=0,a=[];for(n in u)n!=c&&r(u,n)&&a.push(n);while(e.length>f)r(u,n=e[f++])&&(~i(a,n)||a.push(n));return a}},d3f4:function(t,e){t.exports=function(t){return"object"===typeof t?null!==t:"function"===typeof t}},d53b:function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},d8e8:function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},e11e:function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},f6fd:function(t,e){(function(t){var e="currentScript",n=t.getElementsByTagName("script");e in t||Object.defineProperty(t,e,{get:function(){try{throw new Error}catch(r){var t,e=(/.*at [^\(]*\((.*):.+:.+\)$/gi.exec(r.stack)||[!1])[1];for(t in n)if(n[t].src==e||"interactive"==n[t].readyState)return n[t];return null}}})})(document)},fa5b:function(t,e,n){t.exports=n("5537")("native-function-to-string",Function.toString)},fab2:function(t,e,n){var r=n("7726").document;t.exports=r&&r.documentElement},fb15:function(t,e,n){"use strict";var r;(n.r(e),"undefined"!==typeof window)&&(n("f6fd"),(r=window.document.currentScript)&&(r=r.src.match(/(.+\/)[^/]+\.js(\?.*)?$/))&&(n.p=r[1]));n("6c7b"),n("cadf"),n("456d"),n("ac6a");var o=function(t,e){e=e||{};var n={wrapW:3,cW:130,cH:130,lineWidth:2,baseY:20,nowRange:0,lineColor:"rgb(176,204,53)",oneColor:"rgba(176,204,53,.6)",twoColor:"rgba(176,204,53,.4)",oneWaveWidth:.06,twoWaveWidth:.06,oneWaveHeight:4,twoWaveHeight:4,oneOffsetX:10,twoOffsetX:20,speed:.2},r=null,o=null;Object.defineProperty(this,"options",{get:function(){return n},set:function(t){i(t,n)}});var i=function(t,e){Object.keys(t).forEach((function(n){e[n]=t[n]}))},c=function(t,e,r,o,i){t.save();var c=[];t.beginPath();for(var u=0;un.baseY&&(n.nowRange-=e),c(o,n.oneOffsetX,n.oneWaveWidth,n.oneWaveHeight,n.oneColor),c(o,n.twoOffsetX,n.twoWaveWidth,n.twoWaveHeight,n.twoColor),n.oneOffsetX+=n.speed,n.twoOffsetX+=n.speed}()};u()},i=o;e["default"]=i}})["default"]})); 2 | //# sourceMappingURL=WaterPolo.umd.min.js.map -------------------------------------------------------------------------------- /src/example/App.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/example/components/index.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /src/example/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import App from './App.vue' 3 | 4 | Vue.config.productionTip = false 5 | 6 | new Vue({ 7 | render: h => h(App), 8 | }).$mount('#app') 9 | -------------------------------------------------------------------------------- /src/lib/index.js: -------------------------------------------------------------------------------- 1 | import WaterWaves from './waterwaves.vue' 2 | 3 | WaterWaves.install = function(Vue) { 4 | Vue.component(WaterWaves.name, WaterWaves); 5 | }; 6 | 7 | export default WaterWaves; -------------------------------------------------------------------------------- /src/lib/waterwaves.js: -------------------------------------------------------------------------------- 1 | var WaterPolo = function(selector, userOptions) { 2 | "user strict"; 3 | 4 | userOptions = userOptions || {}; 5 | 6 | var options = { 7 | //外边距 8 | wrapW: 3, 9 | 10 | //canvas属性 11 | cW: 130, 12 | cH: 130, 13 | lineWidth: 2, 14 | 15 | //液面位置 百分比表示 16 | baseY: 20, 17 | 18 | //液面起始位置 19 | nowRange: 0, 20 | 21 | //线条颜色 22 | lineColor: "rgb(176,204,53)", 23 | //上层颜色 24 | oneColor: "rgba(176,204,53,.6)", 25 | 26 | //下层颜色 27 | twoColor: "rgba(176,204,53,.4)", 28 | 29 | //上层波浪宽度,数越小越宽 30 | oneWaveWidth: 0.06, 31 | 32 | //下层波浪宽度 33 | twoWaveWidth: 0.06, 34 | 35 | //上层波浪高度,数越大越高 36 | oneWaveHeight: 4, 37 | 38 | //下层波浪高度 39 | twoWaveHeight: 4, 40 | 41 | //上层波浪x轴偏移量 42 | oneOffsetX: 10, 43 | 44 | //下层波浪x轴偏移量 45 | twoOffsetX: 20, 46 | 47 | //波浪滚动速度,数越大越快 48 | speed: 0.2 49 | }; 50 | 51 | var canvas = null, 52 | ctx = null, 53 | W = null, 54 | H = null; 55 | 56 | Object.defineProperty(this, "options", { 57 | get: function() { 58 | return options; 59 | }, 60 | set: function(value) { 61 | mergeOption(value, options); 62 | } 63 | }); 64 | 65 | //参数混合相当于$.extend([old],[new]) 66 | var mergeOption = function(userOptions, options) { 67 | Object.keys(userOptions).forEach(function(key) { 68 | options[key] = userOptions[key]; 69 | }); 70 | }; 71 | 72 | //生成液面 73 | var makeLiquaid = function(ctx, xOffset, waveWidth, waveHeight, color) { 74 | ctx.save(); 75 | var points = []; //用于存放绘制Sin曲线的点 76 | ctx.beginPath(); 77 | //在x轴上取点 78 | for (var x = 0; x < options.cW; x += 20 / options.cW) { 79 | //此处坐标(x,y)的取点,依靠公式 “振幅高*sin(x*振幅宽 + 振幅偏移量)” 80 | var y = -Math.sin(x * waveWidth + xOffset); 81 | 82 | //液面高度百分比改变 83 | var dY = options.cH * (1 - options.nowRange / 100); 84 | 85 | points.push([x, dY + y * waveHeight]); 86 | ctx.lineTo(x, dY + y * waveHeight); 87 | } 88 | //封闭路径 89 | ctx.lineTo(options.cW, options.cH); 90 | ctx.lineTo(0, options.cH); 91 | ctx.lineTo(points[0][0], points[0][1]); 92 | ctx.fillStyle = color; 93 | ctx.fill(); 94 | ctx.restore(); 95 | }; 96 | 97 | //初始化设置 98 | 99 | var init = function() { 100 | mergeOption(userOptions, options); 101 | 102 | canvas = document.getElementById(selector); 103 | ctx = canvas.getContext("2d"); 104 | 105 | canvas.width = options.cW; 106 | canvas.height = options.cH; 107 | 108 | ctx.lineWidth = options.lineWidth; 109 | 110 | //圆属性 111 | var r = options.cH / 2; //圆心 112 | var cR = r - 6; //圆半径 决定圆的大小 113 | 114 | var drawCircle = function(ctx) { 115 | ctx.beginPath(); 116 | ctx.strokeStyle = options.lineColor; 117 | ctx.arc(r, r, cR + options.wrapW, 0, 2 * Math.PI); 118 | ctx.stroke(); 119 | ctx.beginPath(); 120 | ctx.arc(r, r, cR, 0, 2 * Math.PI); 121 | ctx.clip(); 122 | }; 123 | drawCircle(ctx); //画圆 124 | 125 | (function drawFrame() { 126 | window.requestAnimationFrame(drawFrame); 127 | 128 | ctx.clearRect(0, 0, options.cW, options.cH); 129 | 130 | //高度改变动画参数 131 | var tmp = 1; 132 | if (options.nowRange <= options.baseY) { 133 | options.nowRange += tmp; 134 | } 135 | 136 | if (options.nowRange > options.baseY) { 137 | options.nowRange -= tmp; 138 | } 139 | makeLiquaid( 140 | ctx, 141 | options.oneOffsetX, 142 | options.oneWaveWidth, 143 | options.oneWaveHeight, 144 | options.oneColor 145 | ); 146 | makeLiquaid( 147 | ctx, 148 | options.twoOffsetX, 149 | options.twoWaveWidth, 150 | options.twoWaveHeight, 151 | options.twoColor 152 | ); 153 | 154 | options.oneOffsetX += options.speed; 155 | options.twoOffsetX += options.speed; 156 | })(); 157 | }; 158 | init(); 159 | }; 160 | 161 | export default WaterPolo; 162 | -------------------------------------------------------------------------------- /src/lib/waterwaves.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /static/soogif.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acdseen/waterWaves/7ac69406343b2e6de0a0c5001ee4ddc61b6c9216/static/soogif.gif -------------------------------------------------------------------------------- /vue.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | publicPath: "./", 3 | configureWebpack: { 4 | output: { 5 | libraryExport: "default" 6 | }, 7 | } 8 | }; 9 | --------------------------------------------------------------------------------