lhl 1 год назад
Сommit
8061470e17
100 измененных файлов с 9668 добавлено и 0 удалено
  1. BIN
      .DS_Store
  2. 16 0
      .hbuilderx/launch.json
  3. 362 0
      App.vue
  4. 145 0
      api/ask.js
  5. 37 0
      api/wx.js
  6. BIN
      components/.DS_Store
  7. 83 0
      main.js
  8. 108 0
      manifest.json
  9. 4 0
      node_modules/@amap/amap-jsapi-loader/.vscode/settings.json
  10. 111 0
      node_modules/@amap/amap-jsapi-loader/README.md
  11. 11 0
      node_modules/@amap/amap-jsapi-loader/dist/index.js
  12. 69 0
      node_modules/@amap/amap-jsapi-loader/example/AMapUI.html
  13. 76 0
      node_modules/@amap/amap-jsapi-loader/example/Loca.html
  14. 94 0
      node_modules/@amap/amap-jsapi-loader/example/Multi.html
  15. 36 0
      node_modules/@amap/amap-jsapi-loader/example/example-es6.html
  16. 46 0
      node_modules/@amap/amap-jsapi-loader/example/example.html
  17. 0 0
      node_modules/@amap/amap-jsapi-loader/example/libs/chai.min.js
  18. 0 0
      node_modules/@amap/amap-jsapi-loader/example/libs/mocha.min.css
  19. 0 0
      node_modules/@amap/amap-jsapi-loader/example/libs/mocha.min.js
  20. 287 0
      node_modules/@amap/amap-jsapi-loader/example/test.html
  21. 15 0
      node_modules/@amap/amap-jsapi-loader/index.d.ts
  22. 66 0
      node_modules/@amap/amap-jsapi-loader/package.json
  23. 25 0
      node_modules/@amap/amap-jsapi-loader/rollup.config.js
  24. 5 0
      node_modules/@amap/amap-jsapi-loader/src/global.d.ts
  25. 363 0
      node_modules/@amap/amap-jsapi-loader/src/index.ts
  26. 17 0
      node_modules/@amap/amap-jsapi-loader/test/demo.ts
  27. 7 0
      node_modules/@amap/amap-jsapi-loader/test/test.ts
  28. 14 0
      node_modules/ansi-regex/index.js
  29. 9 0
      node_modules/ansi-regex/license
  30. 85 0
      node_modules/ansi-regex/package.json
  31. 87 0
      node_modules/ansi-regex/readme.md
  32. 165 0
      node_modules/ansi-styles/index.js
  33. 9 0
      node_modules/ansi-styles/license
  34. 88 0
      node_modules/ansi-styles/package.json
  35. 147 0
      node_modules/ansi-styles/readme.md
  36. 21 0
      node_modules/base64-js/LICENSE
  37. 32 0
      node_modules/base64-js/README.md
  38. 0 0
      node_modules/base64-js/base64js.min.js
  39. 152 0
      node_modules/base64-js/index.js
  40. 60 0
      node_modules/base64-js/package.json
  41. 17 0
      node_modules/buffer-alloc-unsafe/index.js
  42. 57 0
      node_modules/buffer-alloc-unsafe/package.json
  43. 46 0
      node_modules/buffer-alloc-unsafe/readme.md
  44. 32 0
      node_modules/buffer-alloc/index.js
  45. 59 0
      node_modules/buffer-alloc/package.json
  46. 43 0
      node_modules/buffer-alloc/readme.md
  47. 113 0
      node_modules/buffer-fill/index.js
  48. 49 0
      node_modules/buffer-fill/package.json
  49. 54 0
      node_modules/buffer-fill/readme.md
  50. 21 0
      node_modules/buffer-from/LICENSE
  51. 69 0
      node_modules/buffer-from/index.js
  52. 52 0
      node_modules/buffer-from/package.json
  53. 69 0
      node_modules/buffer-from/readme.md
  54. 62 0
      node_modules/buffer/AUTHORS.md
  55. 21 0
      node_modules/buffer/LICENSE
  56. 416 0
      node_modules/buffer/README.md
  57. 186 0
      node_modules/buffer/index.d.ts
  58. 1794 0
      node_modules/buffer/index.js
  59. 113 0
      node_modules/buffer/package.json
  60. 63 0
      node_modules/camelcase/index.d.ts
  61. 76 0
      node_modules/camelcase/index.js
  62. 9 0
      node_modules/camelcase/license
  63. 75 0
      node_modules/camelcase/package.json
  64. 99 0
      node_modules/camelcase/readme.md
  65. 13 0
      node_modules/clipboard/.babelrc
  66. 22 0
      node_modules/clipboard/.editorconfig
  67. 15 0
      node_modules/clipboard/.github/issue_template.md
  68. 21 0
      node_modules/clipboard/.github/stale.yml
  69. 4 0
      node_modules/clipboard/.travis.yml
  70. 21 0
      node_modules/clipboard/LICENSE
  71. 22 0
      node_modules/clipboard/bower.json
  72. 25 0
      node_modules/clipboard/composer.json
  73. 28 0
      node_modules/clipboard/contributing.md
  74. 31 0
      node_modules/clipboard/demo/constructor-node.html
  75. 31 0
      node_modules/clipboard/demo/constructor-nodelist.html
  76. 30 0
      node_modules/clipboard/demo/constructor-selector.html
  77. 33 0
      node_modules/clipboard/demo/function-target.html
  78. 32 0
      node_modules/clipboard/demo/function-text.html
  79. 29 0
      node_modules/clipboard/demo/target-div.html
  80. 29 0
      node_modules/clipboard/demo/target-input.html
  81. 29 0
      node_modules/clipboard/demo/target-textarea.html
  82. 973 0
      node_modules/clipboard/dist/clipboard.js
  83. 6 0
      node_modules/clipboard/dist/clipboard.min.js
  84. 30 0
      node_modules/clipboard/karma.conf.js
  85. 12 0
      node_modules/clipboard/package.js
  86. 76 0
      node_modules/clipboard/package.json
  87. 189 0
      node_modules/clipboard/readme.md
  88. 204 0
      node_modules/clipboard/src/clipboard-action.js
  89. 135 0
      node_modules/clipboard/src/clipboard.js
  90. 243 0
      node_modules/clipboard/test/clipboard-action.js
  91. 132 0
      node_modules/clipboard/test/clipboard.js
  92. 46 0
      node_modules/clipboard/webpack.config.js
  93. 65 0
      node_modules/cliui/CHANGELOG.md
  94. 14 0
      node_modules/cliui/LICENSE.txt
  95. 115 0
      node_modules/cliui/README.md
  96. 324 0
      node_modules/cliui/index.js
  97. 99 0
      node_modules/cliui/package.json
  98. 54 0
      node_modules/color-convert/CHANGELOG.md
  99. 21 0
      node_modules/color-convert/LICENSE
  100. 68 0
      node_modules/color-convert/README.md

+ 16 - 0
.hbuilderx/launch.json

@@ -0,0 +1,16 @@
+{ // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
+  // launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数
+    "version": "0.0",
+    "configurations": [{
+     	"default" : 
+     	{
+     		"launchtype" : "local"
+     	},
+     	"h5" : 
+     	{
+     		"launchtype" : "local"
+     	},
+     	"type" : "uniCloud"
+     }
+    ]
+}

+ 362 - 0
App.vue

@@ -0,0 +1,362 @@
+<script>
+	/**
+	 * vuex管理登陆状态,具体可以参考官方登陆模板示例
+	 */
+	import {
+		mapMutations
+	} from 'vuex';
+	// #ifdef H5
+	import {
+		weixindata,
+		weixinlocation
+	} from './utils/wxAuthorized';
+	// #endif
+	export default {
+		data() {
+			return {
+				/* 保存微信信息 */
+				appData: {},
+				weixinObj: '' //保存微信对象
+			};
+		},
+		methods: {
+			...mapMutations('user', ['setUserInfo', 'login', 'hasLogin']),
+		},
+		onLaunch: function(urlObj) {
+			let obj = this;
+			// 加载缓存中的用户信息
+			let userInfo = uni.getStorageSync('userInfo') || '';
+			console.log(userInfo, 'bba');
+			// 判断是否拥有用户信息
+			if (userInfo.uid) {
+				//更新登陆状态
+				uni.getStorage({
+					key: 'userInfo',
+					success: res => {
+						obj.setUserInfo(res.data);
+						obj.login(res.data);
+					}
+				});
+			}
+			// #ifdef H5
+			//判断是否已经缓存浏览器
+			let bool = uni.getStorageSync('weichatBrowser') || '';
+			if (bool === '') {
+				//判断是否为微信浏览
+				bool = navigator.userAgent.toLowerCase().match(/MicroMessenger/i) == 'micromessenger';
+				// 保存当前是否为微信内核浏览器
+				uni.setStorageSync('weichatBrowser', bool);
+			}
+			if (bool) {
+				// 加载微信信息
+				weixindata();
+			}
+			// #endif
+
+		},
+		onShow: function() {
+			// 加载拦截
+			// console.log('App Show');
+			// console.log(this.$u.config.v);
+		},
+		onHide: function() {
+			// console.log('App Hide');
+		}
+	};
+</script>
+
+<style lang="scss">
+	@import "uview-ui/index.scss";
+
+	view,
+	scroll-view,
+	swiper,
+	swiper-item,
+	cover-view,
+	cover-image,
+	icon,
+	text,
+	rich-text,
+	progress,
+	button,
+	checkbox,
+	form,
+	input,
+	label,
+	radio,
+	slider,
+	switch,
+	textarea,
+	navigator,
+	audio,
+	camera,
+	image,
+	video {
+		box-sizing: border-box;
+	}
+
+	/* flex布局-整体居中 */
+	.flex-center {
+		display: flex;
+		align-items: center;
+		justify-content: center;
+	}
+
+	/* flex布局-上下居中 */
+	.flex-upDown-center {
+		display: flex;
+		align-items: center;
+	}
+
+	//单行排列,居中
+	.flex_direction {
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+	}
+
+	//单行字体省略
+	.word1_ellipsis {
+		text-overflow: ellipsis; //显示 ...
+		overflow: hidden; //隐藏文字
+		white-space: nowrap; //不换行
+	}
+
+	//多行字体省略
+	.word2_ellipsis {
+		overflow: hidden;
+		text-overflow: ellipsis;
+		display: -webkit-box;
+		-webkit-line-clamp: 2; //在第几行显示...
+		-webkit-box-orient: vertical;
+
+	}
+
+	//右外边距
+	.m-r25 {
+		margin-right: 25rpx;
+	}
+
+	.m-r15 {
+		margin-right: 15rpx;
+	}
+
+	.flex1 {
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+	}
+
+	.flex-start {
+		display: flex;
+		align-items: center;
+		justify-content: flex-start;
+	}
+
+	.flex {
+		display: flex;
+	}
+
+	.position-relative {
+		position: relative;
+	}
+
+	/* 骨架屏替代方案 */
+	.Skeleton {
+		background: #f3f3f3;
+		padding: 20rpx 0;
+		border-radius: 8rpx;
+	}
+
+	/* 图片载入替代方案 */
+	.image-wrapper {
+		font-size: 0;
+		background: #f3f3f3;
+		border-radius: 4px;
+
+		image {
+			width: 100%;
+			height: 100%;
+			transition: 0.6s;
+			opacity: 0;
+
+			&.loaded {
+				opacity: 1;
+			}
+		}
+	}
+
+	// 设置富文本中图片最大宽度
+	uni-rich-text img {
+		max-width: 100% !important;
+	}
+
+	/*边框*/
+	.b-b:after,
+	.b-t:after {
+		position: absolute;
+		z-index: 3;
+		left: 0;
+		right: 0;
+		height: 0;
+		content: '';
+		transform: scaleY(0.5);
+		border-bottom: 1px solid $border-color-base;
+	}
+
+	.b-b:after {
+		bottom: 0;
+	}
+
+	.b-t:after {
+		top: 0;
+	}
+
+	/* button样式改写 */
+	uni-button,
+	button {
+		height: 80rpx;
+		line-height: 80rpx;
+		font-size: $font-lg + 2rpx;
+		font-weight: normal;
+
+		&.no-border:before,
+		&.no-border:after {
+			border: 0;
+		}
+	}
+
+	uni-button[type='default'],
+	button[type='default'] {
+		color: $font-color-dark;
+	}
+
+	/* input 样式 */
+	.input-placeholder {
+		color: #999999;
+	}
+
+	.placeholder {
+		color: #999999;
+	}
+
+	// 边距样式
+	@for $i from 1 to 4 {
+		.margin-l-#{$i * 10} {
+			margin-left: $i * 10rpx !important;
+		}
+
+		.margin-r-#{$i * 10} {
+			margin-right: $i * 10rpx !important;
+		}
+
+		.margin-t-#{$i * 10} {
+			margin-top: $i * 10rpx !important;
+		}
+
+		.margin-b-#{$i * 10} {
+			margin-bottom: $i * 10rpx !important;
+		}
+
+		.margin-#{$i * 10} {
+			margin: $i * 10rpx !important;
+		}
+
+		.margin-v-#{$i * 10} {
+			margin-top: $i * 10rpx !important;
+			margin-bottom: $i * 10rpx !important;
+		}
+
+		.margin-c-#{$i * 10} {
+			margin-left: $i * 10rpx !important;
+			margin-right: $i * 10rpx !important;
+		}
+
+		.padding-l-#{$i * 10} {
+			padding-left: $i * 10rpx !important;
+		}
+
+		.padding-r-#{$i * 10} {
+			padding-right: $i * 10rpx !important;
+		}
+
+		.padding-t-#{$i * 10} {
+			padding-top: $i * 10rpx !important;
+		}
+
+		.padding-b-#{$i * 10} {
+			padding-bottom: $i * 10rpx !important;
+		}
+
+		.padding-#{$i * 10} {
+			padding: $i * 10rpx !important;
+		}
+
+		.padding-v-#{$i * 10} {
+			padding-top: $i * 10rpx !important;
+			padding-bottom: $i * 10rpx !important;
+		}
+
+		.padding-c-#{$i * 10} {
+			padding-left: $i * 10rpx !important;
+			padding-right: $i * 10rpx !important;
+		}
+	}
+
+	// 字体大小
+	.font-size-sm {
+		font-size: $font-sm;
+	}
+
+	.font-size-base {
+		font-size: $font-base;
+	}
+
+	.font-size-lg {
+		font-size: $font-lg;
+	}
+
+	// 字体颜色
+	.font-color-yellow {
+		color: $color-yellow;
+	}
+
+	.font-color-gray {
+		color: $color-gray;
+	}
+
+	.font-color-red {
+		color: $color-red;
+	}
+
+	// 边框颜色
+	.border-color-yellow {
+		border: 1rpx solid $color-yellow;
+	}
+
+	// 修改默认背景颜色
+	uni-page-wrapper {
+		background-color: $page-color-base;
+	}
+
+	page {
+		background-color: $page-color-base;
+		// 设置默认字体
+		font-family: PingFang SC, STHeitiSC-Light, Helvetica-Light, arial, sans-serif, Droid Sans Fallback;
+	}
+
+	.clamp {
+		overflow: hidden;
+		text-overflow: ellipsis;
+		white-space: nowrap;
+		display: block;
+	}
+
+	.clamp2 {
+		overflow: hidden;
+		text-overflow: ellipsis;
+		display: -webkit-box;
+		-webkit-box-orient: vertical;
+		-webkit-line-clamp: 2;
+	}
+</style>

+ 145 - 0
api/ask.js

@@ -0,0 +1,145 @@
+import request from '@/utils/request'
+import { upFilse } from '@/utils/request';
+
+//上传救护者信息
+export function addrescuer(data){
+	return request({
+		url:'/api/add_rescuer',
+		method:'post',
+		data
+	})
+}
+
+//上传图片
+export function upload(data){
+	return upFilse({
+		url:'/api/common/upload',
+		method:'post',
+		data
+	})
+}
+//发表文章
+export function articlesave(data) {
+	return request({
+		url: '/api/circle/articlesave',
+		method: 'post',
+		data
+	});
+}
+
+//我发表的文章
+export function myarticle(data) {
+	return request({
+		url: '/api/circle/myarticle',
+		method: 'post',
+		data
+	});
+}
+
+//发表评论
+export function replyask(data) {
+	return request({
+		url: '/api/add_a',
+		method: 'post',
+		data
+	});
+}
+
+//问答详情
+export function replylist(data) {
+	return request({
+		url: '/api/q_list',
+		method: 'get',
+		data
+	});
+}
+
+//评论列表
+export function myreplylist(data) {
+	return request({
+		url: '/api/a_list',
+		method: 'get',
+		data
+	});
+}
+
+//机构搜索
+export function mechanism(data) {
+	return request({
+		url: '/api/mechanism',
+		method: 'get',
+		data
+	});
+}
+
+// 捐款意向 chosintention
+export function chosintention(data) {
+	return request({
+		url: '/api/intention',
+		method: 'get',
+		data
+	});
+}
+
+// 爱心捐赠 joinDona 提交
+export function joinDona(data) {
+	return request({
+		url: '/api/intention',
+		method: 'get',
+		data
+	});
+}
+
+// 捐赠列表  getDonaList
+export function getDonaList(data) {
+	return request({
+		url: '/api/bulletin',
+		method: 'get',
+		data
+	});
+}
+
+// 我的捐赠 MyDonaList
+export function MyDonaList(data) {
+	return request({
+		url: '/api/my_donate',
+		method: 'get',
+		data
+	});
+}
+
+// 获得证书 getCertificate
+export function getCertificate(data) {
+	return request({
+		url: '/api/detail_training',
+		method: 'get',
+		data
+	});
+}
+
+// 获取code  api/register/verify
+export function verify(data) {
+	return request({
+		url: '/api/register/verify',
+		method: 'post',
+		data
+	});
+}
+
+// 报名孕妇求助
+export function sub_list(data) {
+	return request({
+		url: '/api/index/addData',
+		method: 'post',
+		data
+	});
+}
+
+// 查询进度
+export function search(data) {
+	return request({
+		url: '/api/check',
+		method: 'post',
+		data
+	});
+}

+ 37 - 0
api/wx.js

@@ -0,0 +1,37 @@
+import request from '@/utils/request'
+// #ifdef H5
+// 微信分享信息
+export function share(data) {
+	return request({
+		url: '/api/share',
+		method: 'get',
+		data
+	});
+}
+//微信配置
+export function wechatConfig(data) {
+	return request({
+		url: '/api/wechat/config',
+		method: 'get',
+		data
+	});
+}
+// 微信code地址
+export function wechatAuth(data) {
+	return request({
+		url: '/api/wechat/auth',
+		method: 'get',
+		data
+	});
+}
+// #endif
+// #ifdef MP-WEIXIN
+// 微信code地址
+export function wechatMpAuth(data) {
+	return request({
+		url: '/api/wechat/mp_auth',
+		method: 'post',
+		data
+	});
+}
+// #endif

BIN
components/.DS_Store


+ 83 - 0
main.js

@@ -0,0 +1,83 @@
+import Vue from 'vue'
+import store from './store'
+import App from './App'
+Vue.prototype.$store = store
+// import VueClipboard from 'vue-clipboard2'
+
+// Vue.use(VueClipboard);
+/**
+ *  所有测试用数据均存放于根目录json.js
+ *  
+ *  css部分使用了App.vue下的全局样式和iconfont图标,有需要图标库的可以留言。
+ *  示例使用了uni.scss下的变量, 除变量外已尽量移除特有语法,可直接替换为其他预处理器使用
+ */
+const msg = (title, duration=1500, mask=false, icon='none')=>{
+	//统一提示方便全局修改
+	if(Boolean(title) === false){
+		return;
+	}
+	uni.showToast({
+		title,
+		duration,
+		mask,
+		icon
+	});
+}
+
+const prePage = ()=>{
+	// 获取当前页面
+	let pages = getCurrentPages();
+	let prePage = pages[pages.length - 2];
+	// #ifdef H5
+	return prePage;
+	// #endif
+	return prePage.$vm;
+}
+
+var music = null;
+music = uni.createInnerAudioContext(); //创建播放器对象
+music.autoplay = false;
+music.loop = true;
+music.src= "./static/audio/xx.mp3"; //选择播放的音频
+
+Vue.prototype.ScanAudio = function(e){
+	let player = e;
+		if (player == true ) {
+			music.play(); //执行播放
+			console.log('执行播放1', player)
+		} else {
+			music.pause(); //暂停播放
+			console.log('暂停播放')
+		}
+}
+var musict = null
+musict = uni.createInnerAudioContext();
+musict.autoplay = false;
+musict.loop = true;
+musict.src= "./static/audio/bg-music.mp3"; //选择播放的音频
+function playMusic(e){
+	let player = e;
+		if (player == true ) {
+			musict.play(); //执行播放
+			console.log('执行播放1', player)
+		} else {
+			musict.pause(); //暂停播放
+			console.log('暂停播放')
+		}
+}
+musict.onPlay(() => {
+  console.log('开始播放');
+  store.state.isPlay = true
+});
+
+Vue.config.productionTip = false
+Vue.prototype.$fire = new Vue();
+Vue.prototype.$store = store;
+Vue.prototype.$api = {msg, prePage,playMusic};
+
+App.mpType = 'app'
+
+const app = new Vue({
+    ...App
+})
+app.$mount()

+ 108 - 0
manifest.json

@@ -0,0 +1,108 @@
+{
+    "name" : "温岭市产前诊断报销申请表",
+    "appid" : "__UNI__BB379D0",
+    "description" : "",
+    "versionName" : "1.0.0",
+    "versionCode" : "100",
+    "transformPx" : false,
+    /* 5+App特有相关 */
+    "app-plus" : {
+        "usingComponents" : true,
+        "nvueCompiler" : "uni-app",
+        "compilerVersion" : 3,
+        "splashscreen" : {
+            "alwaysShowBeforeRender" : true,
+            "waiting" : true,
+            "autoclose" : true,
+            "delay" : 0
+        },
+        /* 模块配置 */
+        "modules" : {},
+        /* 应用发布信息 */
+        "distribute" : {
+            /* android打包配置 */
+            "android" : {
+                "permissions" : [
+                    "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
+                    "<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>",
+                    "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
+                    "<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
+                    "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
+                    "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
+                    "<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>",
+                    "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.CAMERA\"/>",
+                    "<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
+                    "<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
+                    "<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
+                    "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
+                    "<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
+                    "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
+                    "<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
+                    "<uses-feature android:name=\"android.hardware.camera\"/>",
+                    "<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
+                    "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
+                ]
+            },
+            /* ios打包配置 */
+            "ios" : {},
+            /* SDK配置 */
+            "sdkConfigs" : {
+                "maps" : {}
+            }
+        }
+    },
+    /* 快应用特有相关 */
+    "quickapp" : {},
+    /* 小程序特有相关 */
+    "mp-weixin" : {
+        "appid" : "",
+        "setting" : {
+            "urlCheck" : false
+        },
+        "usingComponents" : true,
+        "permission" : {}
+    },
+    "mp-alipay" : {
+        "usingComponents" : true
+    },
+    "mp-baidu" : {
+        "usingComponents" : true
+    },
+    "mp-toutiao" : {
+        "usingComponents" : true
+    },
+    "uniStatistics" : {
+        "enable" : false
+    },
+    "h5" : {
+        "title" : "温岭市产前诊断报销申请表",
+        "domain" : "wl.igxys.com",
+        "router" : {
+            "mode" : "hash",
+            "base" : "/index/"
+        },
+        "devServer" : {
+            "proxy" : {
+                "/api" : {
+                    "target" : "http://wljk.igxys.com", //请求的目标域名
+                    "changeOrigin" : true,
+                    // "secure": false,
+                    "pathRewrite" : {}
+                }
+            }
+        },
+        // "^/api" : ""
+        "template" : "",
+        "sdkConfigs" : {
+            "maps" : {
+                "qqmap" : {
+                    "key" : "VYZBZ-P2TRG-RMIQ3-ITAIN-2DKBK-CKFQQ"
+                }
+            }
+        }
+    }
+}

+ 4 - 0
node_modules/@amap/amap-jsapi-loader/.vscode/settings.json

@@ -0,0 +1,4 @@
+{
+  "editor.tabSize": 4,
+  "prettier.tabWidth": 4
+}

+ 111 - 0
node_modules/@amap/amap-jsapi-loader/README.md

@@ -0,0 +1,111 @@
+# amap-jsapi-loader
+amap-jsapi-loader 是高德开放平台官网提供的地图 JSAPI 的加载器,可帮助开发者快速定位、有效避免加载引用地图 JSAPI 各种错误用法。
+
+
+该加载器具有以下特性:
+* 支持以 普通JS 和 npm包 两种方式使用;
+* 有效避免错误异步加载导致的 JSAPI 资源加载不完整问题;
+* 对于加载混用多个版本 JSAPI 的错误用法给予报错处理;
+* 对于不合法加载引用 JSAPI 给予报错处理;
+* 支持指定 JSAPI 版本;
+* 支持插件加载;
+* 允许多次执行加载操作,网络资源不会重复请求,便于大型工程模块管理;
+
+
+# USAGE
+
+## AMapLoader.load方法参数说明
+```js
+AMapLoader.load({
+    "key": "",              // 申请好的Web端开发者Key,首次调用 load 时必填
+    "version": "2.0",   // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15
+    "plugins": []           // 需要使用的的插件列表,如比例尺'AMap.Scale'等
+    "AMapUI": {             // 是否加载 AMapUI,缺省不加载
+        "version": '1.1',   // AMapUI 缺省 1.1
+        "plugins":[],       // 需要加载的 AMapUI ui插件
+    },
+    "Loca":{                // 是否加载 Loca, 缺省不加载
+        "version": '1.3.2'  // Loca 版本,缺省 1.3.2
+    },
+}).then(()=>{
+    window.AMap.xx;
+    window.AMapUI.xx;
+    window.Loca.xx
+});
+
+```
+
+## AMapUI
+
+AMapUI 用法和官网有一点点区别。通过 AMapUI.xx 来获取组件
+```js
+AMapLoader.load({
+    key: '',//首次load必填
+    version: '2.0',
+    AMapUI: {
+        version: '1.1',
+        plugins: ['overlay/SimpleMarker'],
+    }
+}).then((AMap) => {
+    map = new AMap.Map('container');
+
+    // !!! 通过 AMap.SimpleMarker 获取组件
+    new AMapUI.SimpleMarker({
+        //前景文字
+        iconLabel: 'A',
+        //图标主题
+        iconTheme: 'default',
+        //背景图标样式
+        iconStyle: 'red',
+        map: map,
+        position: map.getCenter()
+    });
+}).catch((e) => {
+    console.error(e);
+});
+```
+
+
+# 使用
+#### 以普通 JS 方式使用 Loader
+尚未发布在线Loader,可将 dist/index.js 复制到项目下
+```
+<script src="../dist/index.js"></script>
+<script>
+    AMapLoader.load({
+        key:'',//首次load必填
+        version:'2.0',
+        plugins:['AMap.Scale']
+    }).then((AMap)=>{
+        map = new AMap.Map('container');
+        map.addControl(new AMap.Scale())
+    }).catch((e)=>{
+        console.error(e);
+    });   
+</script>
+```
+#### 以 NPM 包方式使用 Loader
+安装
+```
+tnpm i @alife/amap-jsapi-loader --save-dev
+```
+使用
+```
+import AMapLoader from '@alife/amap-jsapi-loader';
+
+AMapLoader.load().then((AMap)=>{
+    map = new AMap.Map('container');
+}).catch(e=>{
+    console.log(e);
+})
+
+```
+
+# 相关链接:
+地&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;图 JSAPI:  &nbsp;&nbsp;[示例中心](https://lbs.amap.com/demo-center/js-api)&nbsp;&nbsp;&nbsp;&nbsp;[教程](https://lbs.amap.com/api/javascript-api/summary)&nbsp;&nbsp;&nbsp;&nbsp;[参考手册](https://lbs.amap.com/api/javascript-api/reference/map)
+
+
+
+数据可视化 JSAPI:  &nbsp;&nbsp;[示例中心](https://lbs.amap.com/demo-center/loca-api)&nbsp;&nbsp;&nbsp;&nbsp;[教程](https://lbs.amap.com/api/loca-api/prod_intro)&nbsp;&nbsp;&nbsp;&nbsp;[参考手册](https://lbs.amap.com/api/loca-api/guide/baselayer)
+
+

+ 11 - 0
node_modules/@amap/amap-jsapi-loader/dist/index.js

@@ -0,0 +1,11 @@
+'use strict';(function(m,p){"object"===typeof exports&&"undefined"!==typeof module?module.exports=p():"function"===typeof define&&define.amd?define(p):(m=m||self,m.AMapLoader=p())})(this,function(){function m(a){var b=[];a.AMapUI&&b.push(p(a.AMapUI));a.Loca&&b.push(r(a.Loca));return Promise.all(b)}function p(a){return new Promise(function(h,c){var e=[];if(a.plugins)for(var f=0;f<a.plugins.length;f+=1)-1==d.AMapUI.plugins.indexOf(a.plugins[f])&&e.push(a.plugins[f]);if(g.AMapUI===b.failed)c("\u524d\u6b21\u8bf7\u6c42 AMapUI \u5931\u8d25");
+else if(g.AMapUI===b.notload){g.AMapUI=b.loading;d.AMapUI.version=a.version||d.AMapUI.version;f=d.AMapUI.version;var l=document.body||document.head,k=document.createElement("script");k.type="text/javascript";k.src="https://webapi.amap.com/ui/"+f+"/main.js";k.onerror=function(a){g.AMapUI=b.failed;c("\u8bf7\u6c42 AMapUI \u5931\u8d25")};k.onload=function(){g.AMapUI=b.loaded;if(e.length)window.AMapUI.loadUI(e,function(){for(var a=0,b=e.length;a<b;a++){var c=e[a].split("/").slice(-1)[0];window.AMapUI[c]=
+arguments[a]}for(h();n.AMapUI.length;)n.AMapUI.splice(0,1)[0]()});else for(h();n.AMapUI.length;)n.AMapUI.splice(0,1)[0]()};l.appendChild(k)}else g.AMapUI===b.loaded?a.version&&a.version!==d.AMapUI.version?c("\u4e0d\u5141\u8bb8\u591a\u4e2a\u7248\u672c AMapUI \u6df7\u7528"):e.length?window.AMapUI.loadUI(e,function(){for(var a=0,b=e.length;a<b;a++){var c=e[a].split("/").slice(-1)[0];window.AMapUI[c]=arguments[a]}h()}):h():a.version&&a.version!==d.AMapUI.version?c("\u4e0d\u5141\u8bb8\u591a\u4e2a\u7248\u672c AMapUI \u6df7\u7528"):
+n.AMapUI.push(function(a){a?c(a):e.length?window.AMapUI.loadUI(e,function(){for(var a=0,b=e.length;a<b;a++){var c=e[a].split("/").slice(-1)[0];window.AMapUI[c]=arguments[a]}h()}):h()})})}function r(a){return new Promise(function(h,c){if(d.AMap.version.startsWith("2.0"))c("Loca \u6682\u4e0d\u9002\u914d JSAPI 2.0,\u8bf7\u4f7f\u7528 1.4.15");else if(g.Loca===b.failed)c("\u524d\u6b21\u8bf7\u6c42 Loca \u5931\u8d25");else if(g.Loca===b.notload){g.Loca=b.loading;d.Loca.version=a.version||d.Loca.version;
+var e=d.Loca.version,f=d.key,l=document.body||document.head,k=document.createElement("script");k.type="text/javascript";k.src="https://webapi.amap.com/loca?v="+e+"&key="+f;k.onerror=function(a){g.Loca=b.failed;c("\u8bf7\u6c42 AMapUI \u5931\u8d25")};k.onload=function(){g.Loca=b.loaded;for(h();n.Loca.length;)n.Loca.splice(0,1)[0]()};l.appendChild(k)}else g.Loca===b.loaded?a.version&&a.version!==d.Loca.version?c("\u4e0d\u5141\u8bb8\u591a\u4e2a\u7248\u672c Loca \u6df7\u7528"):h():a.version&&a.version!==
+d.Loca.version?c("\u4e0d\u5141\u8bb8\u591a\u4e2a\u7248\u672c Loca \u6df7\u7528"):n.Loca.push(function(a){a?c(a):c()})})}if(!window)throw Error("AMap JSAPI can only be used in Browser.");var b;(function(a){a.notload="notload";a.loading="loading";a.loaded="loaded";a.failed="failed"})(b||(b={}));var d={key:"",AMap:{version:"1.4.15",plugins:[]},AMapUI:{version:"1.1",plugins:[]},Loca:{version:"1.3.2"}},g={AMap:b.notload,AMapUI:b.notload,Loca:b.notload},n={AMap:[],AMapUI:[],Loca:[]},q=[],t=function(a){"function"==
+typeof a&&(g.AMap===b.loaded?a(window.AMap):q.push(a))};return{load:function(a){return new Promise(function(h,c){if(g.AMap==b.failed)c("");else if(g.AMap==b.notload){var e=a.key,f=a.version,l=a.plugins;e?(window.AMap&&"lbs.amap.com"!==location.host&&c("\u7981\u6b62\u591a\u79cdAPI\u52a0\u8f7d\u65b9\u5f0f\u6df7\u7528"),d.key=e,d.AMap.version=f||d.AMap.version,d.AMap.plugins=l||d.AMap.plugins,g.AMap=b.loading,f=document.body||document.head,window.___onAPILoaded=function(d){delete window.___onAPILoaded;
+if(d)g.AMap=b.failed,c(d);else for(g.AMap=b.loaded,m(a).then(function(){h(window.AMap)})["catch"](c);q.length;)q.splice(0,1)[0]()},l=document.createElement("script"),l.type="text/javascript",l.src="https://webapi.amap.com/maps?callback=___onAPILoaded&v="+d.AMap.version+"&key="+e+"&plugin="+d.AMap.plugins.join(","),l.onerror=function(a){g.AMap=b.failed;c(a)},f.appendChild(l)):c("\u8bf7\u586b\u5199key")}else if(g.AMap==b.loaded)if(a.key&&a.key!==d.key)c("\u591a\u4e2a\u4e0d\u4e00\u81f4\u7684 key");else if(a.version&&
+a.version!==d.AMap.version)c("\u4e0d\u5141\u8bb8\u591a\u4e2a\u7248\u672c JSAPI \u6df7\u7528");else{e=[];if(a.plugins)for(f=0;f<a.plugins.length;f+=1)-1==d.AMap.plugins.indexOf(a.plugins[f])&&e.push(a.plugins[f]);if(e.length)window.AMap.plugin(e,function(){m(a).then(function(){h(window.AMap)})["catch"](c)});else m(a).then(function(){h(window.AMap)})["catch"](c)}else if(a.key&&a.key!==d.key)c("\u591a\u4e2a\u4e0d\u4e00\u81f4\u7684 key");else if(a.version&&a.version!==d.AMap.version)c("\u4e0d\u5141\u8bb8\u591a\u4e2a\u7248\u672c JSAPI \u6df7\u7528");
+else{var k=[];if(a.plugins)for(f=0;f<a.plugins.length;f+=1)-1==d.AMap.plugins.indexOf(a.plugins[f])&&k.push(a.plugins[f]);t(function(){if(k.length)window.AMap.plugin(k,function(){m(a).then(function(){h(window.AMap)})["catch"](c)});else m(a).then(function(){h(window.AMap)})["catch"](c)})}})},reset:function(){delete window.AMap;delete window.AMapUI;delete window.Loca;d={key:"",AMap:{version:"1.4.15",plugins:[]},AMapUI:{version:"1.1",plugins:[]},Loca:{version:"1.3.2"}};g={AMap:b.notload,AMapUI:b.notload,
+Loca:b.notload};n={AMap:[],AMapUI:[],Loca:[]}}}})

+ 69 - 0
node_modules/@amap/amap-jsapi-loader/example/AMapUI.html

@@ -0,0 +1,69 @@
+<!doctype html>
+<html lang="en">
+
+<head>
+    <meta charset="utf-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
+    <title>JSAPI Loader</title>
+    <style>
+        html,
+        body,
+        #container {
+            height: 100%;
+            width: 100%;
+            margin: 0;
+        }
+    </style>
+</head>
+
+<body>
+    <div id="container" tabindex="0"></div>
+
+    <script src="../dist/index.js"></script>
+    <script>
+        AMapLoader.load({
+            key: '',//首次load必填
+            version: '2.0Beta',
+            plugins: ['AMap.Scale'],
+            AMapUI: {
+                plugins: ['overlay/SimpleMarker'],
+            }
+        }).then((AMap) => {
+            map = new AMap.Map('container');
+            map.addControl(new AMap.Scale());
+            new AMapUI.SimpleMarker({
+
+                //前景文字
+                iconLabel: 'A',
+
+                //图标主题
+                iconTheme: 'default',
+
+                //背景图标样式
+                iconStyle: 'red',
+
+                //...其他Marker选项...,不包括content
+                map: map,
+                position: map.getCenter()
+            });
+        }).catch((e) => {
+            console.error(e);
+        });
+        setTimeout(function () {
+            AMapLoader.load({
+                plugins: ['AMap.MapType']
+            }).then((AMap) => {
+                map.addControl(new AMap.MapType())
+            }).catch((e) => {
+                console.error(e);
+            });
+        }, 5000);
+
+    </script>
+
+
+    </script>
+</body>
+
+</html>

+ 76 - 0
node_modules/@amap/amap-jsapi-loader/example/Loca.html

@@ -0,0 +1,76 @@
+<!doctype html>
+<html lang="en">
+
+<head>
+    <meta charset="utf-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
+    <title>JSAPI Loader</title>
+    <style>
+        html,
+        body,
+        #container {
+            height: 100%;
+            width: 100%;
+            margin: 0;
+        }
+    </style>
+</head>
+
+<body>
+    <div id="container" tabindex="0"></div>
+    <script src="https://a.amap.com/Loca/static/mock/districts.js"></script>
+    <script src="../dist/index.js"></script>
+    <script>
+        AMapLoader.load({
+            key: '',//首次load必填
+            version: '1.4.15',
+            Loca: {
+                version: '1.3.2'
+            }
+        }).then((AMap) => {
+            var map = new AMap.Map('container', {
+                zoom: 4,
+                center: [107.4976, 32.1697],
+                features: ['bg', 'road'],
+                // Loca 自 1.2.0 起 viewMode 模式默认为 3D,如需 2D 模式,请显示配置。
+                // viewMode: '3D'
+            });
+
+            var layer = new Loca.PointLayer({
+                map: map
+            });
+
+            layer.setData(districts, {
+                // 指定经纬度所在字段
+                lnglat: 'center'
+            });
+
+            layer.setOptions({
+                style: {
+                    // 圆形半径,单位像素
+                    radius: 5,
+                    // 填充颜色
+                    color: '#07E8E4',
+                    // 描边颜色
+                    borderColor: '#5DFBF9',
+                    // 描边宽度,单位像素
+                    borderWidth: 1,
+                    // 透明度 [0-1]
+                    opacity: 0.9,
+                }
+            });
+
+            layer.render();
+
+        }).catch((e) => {
+            console.error(e);
+        });
+
+    </script>
+
+
+    </script>
+</body>
+
+</html>

+ 94 - 0
node_modules/@amap/amap-jsapi-loader/example/Multi.html

@@ -0,0 +1,94 @@
+<!doctype html>
+<html lang="en">
+
+<head>
+    <meta charset="utf-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
+    <title>JSAPI Loader</title>
+    <style>
+        html,
+        body,
+        #container {
+            height: 100%;
+            width: 100%;
+            margin: 0;
+        }
+    </style>
+</head>
+
+<body>
+    <div id="container" tabindex="0"></div>
+    <script src="https://a.amap.com/Loca/static/mock/districts.js"></script>
+    <script src="../dist/index.js"></script>
+    <script>
+        AMapLoader.load({
+            key: '',//首次load必填
+            version: '1.4.15',
+            AMapUI: {
+                plugins: ['overlay/SimpleMarker'],
+            },
+            Loca: {
+                version: '1.3.2'
+            }
+        }).then((AMap) => {
+            var map = new AMap.Map('container', {
+                zoom: 4,
+                center: [107.4976, 32.1697],
+                features: ['bg', 'road'],
+                // Loca 自 1.2.0 起 viewMode 模式默认为 3D,如需 2D 模式,请显示配置。
+                // viewMode: '3D'
+            });
+
+            new AMapUI.SimpleMarker({
+
+                //前景文字
+                iconLabel: 'A',
+
+                //图标主题
+                iconTheme: 'default',
+
+                //背景图标样式
+                iconStyle: 'red',
+
+                //...其他Marker选项...,不包括content
+                map: map,
+                position: map.getCenter()
+            });
+            var layer = new Loca.PointLayer({
+                map: map
+            });
+
+            layer.setData(districts, {
+                // 指定经纬度所在字段
+                lnglat: 'center'
+            });
+
+            layer.setOptions({
+                style: {
+                    // 圆形半径,单位像素
+                    radius: 5,
+                    // 填充颜色
+                    color: '#07E8E4',
+                    // 描边颜色
+                    borderColor: '#5DFBF9',
+                    // 描边宽度,单位像素
+                    borderWidth: 1,
+                    // 透明度 [0-1]
+                    opacity: 0.9,
+                }
+            });
+
+            layer.render();
+
+        }).catch((e) => {
+            console.error(e);
+        });
+
+    </script>
+
+
+    </script>
+</body>
+
+</html>

+ 36 - 0
node_modules/@amap/amap-jsapi-loader/example/example-es6.html

@@ -0,0 +1,36 @@
+<!doctype html>
+<html lang="en">
+<head>
+    <meta charset="utf-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
+    <title>JSAPI Loader - ES6</title>
+    <style>
+        html, body, #container {
+            height: 100%;
+            width: 100%;
+            margin: 0;
+        }
+    </style>
+</head>
+<body>
+<div id="container" tabindex="0"></div>
+<script type="module">
+    import AMapLoader from '../src/index.js';
+    AMapLoader.load({
+        key:'',//必填
+        version:'2.0',
+        plugins:['AMap.Scale']
+    }).then((AMap)=>{
+        debugger
+        var map = new AMap.Map('container');
+        map.addControl(new AMap.Scale())
+    }).catch((e)=>{
+        console.error(e);
+    });
+</script>
+
+
+</script>
+</body>
+</html>

+ 46 - 0
node_modules/@amap/amap-jsapi-loader/example/example.html

@@ -0,0 +1,46 @@
+<!doctype html>
+<html lang="en">
+<head>
+    <meta charset="utf-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
+    <title>AMap JSAPI Loader</title>
+    <style>
+        html, body, #container {
+            height: 100%;
+            width: 100%;
+            margin: 0;
+        }
+    </style>
+</head>
+<body>
+<div id="container" tabindex="0"></div>
+
+<script src="https://webapi.amap.com/loader.js"></script>
+<script>
+    AMapLoader.load({ //首次调用 load
+        key:'你申请的高德开放平台 Web 端 key',//首次load key为必填
+        version:'2.0',
+        plugins:['AMap.Scale','AMap.ToolBar']
+    }).then((AMap)=>{
+        map = new AMap.Map('container');
+        map.addControl(new AMap.Scale())
+        map.addControl(new AMap.ToolBar())
+        map.add(new AMap.Marker({
+            position:map.getCenter()
+        }));
+    }).catch((e)=>{
+        console.error(e);
+    });
+   
+    AMapLoader.load({ //可多次调用load
+        plugins:['AMap.MapType']
+    }).then((AMap)=>{
+        map.addControl(new AMap.MapType())
+    }).catch((e)=>{
+        console.error(e);
+    });
+   
+</script>
+</body>
+</html>

Разница между файлами не показана из-за своего большого размера
+ 0 - 0
node_modules/@amap/amap-jsapi-loader/example/libs/chai.min.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
node_modules/@amap/amap-jsapi-loader/example/libs/mocha.min.css


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
node_modules/@amap/amap-jsapi-loader/example/libs/mocha.min.js


+ 287 - 0
node_modules/@amap/amap-jsapi-loader/example/test.html

@@ -0,0 +1,287 @@
+<!doctype html>
+<html lang="en">
+
+<head>
+    <meta charset="utf-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
+    <title>JSAPI Loader</title>
+    <style>
+        html,
+        body,
+        #container {
+            height: 100%;
+            width: 100%;
+            margin: 0;
+        }
+    </style>
+</head>
+
+<body>
+    <div id="mocha"></div>
+
+    <link rel="stylesheet" href="./libs/mocha.min.css" />
+    <script src="./libs/chai.min.js"></script>
+    <script src="./libs/mocha.min.js"></script>
+
+    <script>
+        mocha.setup('bdd');
+        mocha.traceIgnores = ['mocha.min.js', 'chai.min.js'];
+        expect = chai.expect;
+    </script>
+    <div id="container" tabindex="0"></div>
+
+    <script src="../dist/index.js"></script>
+    <script>
+        // 请把 key 写在这里
+        const JSAPIKey = '';
+        const chai = window.chai;
+        const mocha = window.mocha;
+        mocha.setup({
+            timeout: '5000',
+            ui: 'bdd',
+        });
+        const expect = chai.expect;
+        describe('JSAPI', () => {
+            beforeEach(function () {
+                AMapLoader.reset()
+            });
+
+            it('Simple', (done) => {
+                AMapLoader.load({
+                    key: JSAPIKey,//首次load必填
+                    version: '2.0',
+                    plugins: ['AMap.Scale'],
+                    AMapUI: {
+                        plugins: ['overlay/SimpleMarker']
+                    }
+                }).then(() => {
+                    expect(Boolean(window.AMap)).eq(true)
+                    expect(Boolean(window.AMapUI)).eq(true)
+                    expect(Boolean(window.AMapUI.SimpleMarker)).eq(true)
+                    expect(Boolean(window.Loca)).eq(false)
+                    done();
+                });
+
+            });
+            it('Request with AMapUI Loca', (done) => {
+                AMapLoader.load({
+                    key: JSAPIKey,//首次load必填
+                    version: '1.4.15',
+                    plugins: ['AMap.Scale'],
+                    AMapUI: {
+                        plugins: ['overlay/SimpleMarker']
+                    },
+                    Loca: {
+                        version: '1.3.2'
+                    }
+                }).then(() => {
+                    expect(Boolean(window.AMap)).eq(true)
+                    expect(Boolean(window.AMapUI)).eq(true)
+                    expect(Boolean(window.AMapUI.SimpleMarker)).eq(true)
+
+                    expect(Boolean(window.Loca)).eq(true)
+                    done();
+                });
+
+            });
+            it('fail with multi version', (done) => {
+                AMapLoader.load({
+                    key: JSAPIKey,//首次load必填
+                    version: '2.0',
+                }).then(() => {
+                    done()
+                });
+                AMapLoader.load({
+                    key: JSAPIKey,//首次load必填
+                    version: '1.4.15',
+                }).then(() => {
+                    done(Error('should not here'))
+                })
+                    .catch(err => {
+                        try {
+                            expect(err).eq('不允许多个版本 JSAPI 混用')
+
+                        } catch (error) {
+                            done(error)
+                        }
+                    })
+
+            });
+            it('fail with multi key', (done) => {
+                AMapLoader.load({
+                    key: JSAPIKey,//首次load必填
+                    version: '2.0',
+                }).then(() => {
+                    done()
+                });
+                AMapLoader.load({
+                    key: 'asdfas',//首次load必填
+                }).then(() => {
+                    done(Error('should not here'))
+                })
+                    .catch(err => {
+                        try {
+                            expect(err).eq('多个不一致的 key')
+
+                        } catch (error) {
+                            done(error)
+                        }
+                    })
+
+            });
+        })
+
+
+        describe('AMapUI', () => {
+            beforeEach(function () {
+                AMapLoader.reset()
+            });
+
+            it('version', (done) => {
+                AMapLoader.load({
+                    key: JSAPIKey,//首次load必填
+                    version: '1.4.15',
+                    AMapUI: {
+                        version: '1.1',
+                        plugins: ['misc/PathSimplifier']
+                    }
+                }).then(() => {
+                    expect(Boolean(window.AMap)).eq(true)
+                    expect(Boolean(window.AMapUI)).eq(true)
+                    expect(Boolean(window.AMapUI.PathSimplifier)).eq(true)
+                    expect(Boolean(window.AMapUI.version.startsWith('1.1'))).eq(true)
+                    done();
+                }).catch(done);
+            });
+
+            it('async', (done) => {
+                console.log(window.AMap);
+                AMapLoader.load({
+                    key: JSAPIKey,//首次load必填
+                    version: '1.4.15',
+                    AMapUI: {
+                        version: '1.0',
+                        plugins: ['overlay/SimpleMarker']
+                    }
+                }).then(() => {
+                    AMapLoader.load({
+                        AMapUI: {
+                            plugins: ['overlay/SimpleInfoWindow']
+                        }
+                    }).then(() => {
+                        expect(Boolean(window.AMap)).eq(true)
+                        expect(Boolean(window.AMapUI.version.startsWith('1.0'))).eq(true)
+                        expect(Boolean(window.AMapUI.SimpleMarker)).eq(true)
+                        expect(Boolean(window.AMapUI.SimpleInfoWindow)).eq(true)
+                        done()
+                    });
+                }).catch(done);
+            })
+        });
+
+        describe('Loca', () => {
+            beforeEach(function () {
+                AMapLoader.reset()
+            });
+
+            it('version', (done) => {
+                AMapLoader.load({
+                    key: JSAPIKey,//首次load必填
+                    version: '1.4.15',
+                    Loca: {
+                        version: '1.3.1'
+                    }
+                }).then(() => {
+                    expect(Boolean(window.AMap)).eq(true)
+                    expect(Boolean(window.Loca)).eq(true)
+                    expect(window.Loca.version).eq('1.3.1')
+                    done()
+                }).catch(done);
+            });
+            it('fail with jsapi2.0', (done) => {
+                AMapLoader.load({
+                    key: JSAPIKey,//首次load必填
+                    version: '2.0',
+                    Loca: {
+                        version: '1.3.1'
+                    }
+                }).then(() => {
+                    done(Error('should not here'))
+                }).catch(err => {
+                    try {
+                        expect(err).eq("Loca 暂不适配 JSAPI 2.0,请使用 1.4.15")
+                        done()
+                    } catch (error) {
+                        done(error)
+                    }
+                });
+            });
+
+
+            it('async', (done) => {
+                AMapLoader.load({
+                    key: JSAPIKey,//首次load必填
+                    version: '1.4.15',
+                    Loca: {
+                        version: '1.2.1'
+                    }
+                }).then(() => {
+                    expect(Boolean(window.AMap)).eq(true)
+                    expect(Boolean(window.Loca)).eq(true)
+                    expect(window.Loca.version).eq('1.2.1')
+                    AMapLoader.load({
+                        Loca: {
+                            version: '1.2.1'
+                        }
+                    }).then(() => {
+                        expect(Boolean(window.AMap)).eq(true)
+                        expect(Boolean(window.Loca)).eq(true)
+                        expect(window.Loca.version).eq('1.2.1')
+                        done()
+                    }).catch(done);
+
+                });
+            })
+        });
+
+
+        describe('Advance', () => {
+            beforeEach(function () {
+                AMapLoader.reset()
+            });
+            it('Multi', (done) => {
+                AMapLoader.load({ key: JSAPIKey, version: '1.4.15' }).then(() => {
+                    expect(Boolean(window.AMap)).eq(true);
+                    expect(window.AMap.v).eq('1.4.15');
+
+                    expect(Boolean(window.AMapUI)).eq(false);
+                    expect(Boolean(window.Loca)).eq(false);
+                    AMapLoader.load({ AMapUI: {} }).then(() => {
+                        expect(Boolean(window.AMap)).eq(true);
+                        expect(window.AMap.v).eq('1.4.15');
+
+                        expect(Boolean(window.AMapUI)).eq(true);
+                        expect(window.AMapUI.version.startsWith('1.1')).eq(true);
+                        expect(Boolean(window.Loca)).eq(false);
+                        AMapLoader.load({ Loca: {} }).then(() => {
+                            expect(Boolean(window.AMap)).eq(true);
+                            expect(window.AMap.v).eq('1.4.15');
+                            expect(Boolean(window.AMapUI)).eq(true);
+                            expect(window.AMapUI.version.startsWith('1.1')).eq(true);
+                            expect(Boolean(window.Loca)).eq(true);
+                            expect(window.Loca.version).eq('1.3.2');
+                            done()
+                        })
+                    })
+                }).catch(done)
+            })
+        })
+        mocha.run()
+    </script>
+
+
+    </script>
+</body>
+
+</html>

+ 15 - 0
node_modules/@amap/amap-jsapi-loader/index.d.ts

@@ -0,0 +1,15 @@
+declare var load: (options: {
+    key: string; // 申请好的Web端开发者Key,首次调用 load 时必填
+    version: string; // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15
+    plugins?: string[]; //插件列表
+    // 是否加载 AMapUI,缺省不加载
+    AMapUI?: {
+        version?: string; // AMapUI 缺省 1.1
+        plugins?: string[]; // 需要加载的 AMapUI ui插件
+    };
+    // 是否加载 Loca, 缺省不加载
+    Loca?: {
+        version?: string; // Loca 版本,缺省 1.3.2
+    };
+}) => Promise<any>;
+export { load };

+ 66 - 0
node_modules/@amap/amap-jsapi-loader/package.json

@@ -0,0 +1,66 @@
+{
+  "_from": "@amap/amap-jsapi-loader",
+  "_id": "@amap/amap-jsapi-loader@0.0.7",
+  "_inBundle": false,
+  "_integrity": "sha512-DNqyIo9AfN0ic2I+9F6qiGFOmoeLVhcqUU2MT4/t3vTAiZhnlMWqr6kXXwh7IjXhD1Na7XaK8/IL2b7Ml+g4tw==",
+  "_location": "/@amap/amap-jsapi-loader",
+  "_phantomChildren": {},
+  "_requested": {
+    "type": "tag",
+    "registry": true,
+    "raw": "@amap/amap-jsapi-loader",
+    "name": "@amap/amap-jsapi-loader",
+    "escapedName": "@amap%2famap-jsapi-loader",
+    "scope": "@amap",
+    "rawSpec": "",
+    "saveSpec": null,
+    "fetchSpec": "latest"
+  },
+  "_requiredBy": [
+    "#USER",
+    "/"
+  ],
+  "_resolved": "https://registry.npmjs.org/@amap/amap-jsapi-loader/-/amap-jsapi-loader-0.0.7.tgz",
+  "_shasum": "76b5cbcc22f6844003474e37eed1dcd879cb117c",
+  "_spec": "@amap/amap-jsapi-loader",
+  "_where": "/Users/handali/Documents/liuniu/jxred",
+  "author": {
+    "name": "mengmeng.du@alibaba-inc.com"
+  },
+  "bundleDependencies": false,
+  "deprecated": false,
+  "description": "高德官网提供的地图JSAPI加载器,可以避免多种异步加载API的错误用法",
+  "devDependencies": {
+    "@ampproject/rollup-plugin-closure-compiler": "^0.23.0",
+    "@babel/core": "^7.8.7",
+    "@babel/preset-env": "^7.8.7",
+    "rollup": "^1.32.0",
+    "rollup-plugin-babel": "^4.3.3",
+    "rollup-plugin-server": "^0.7.0",
+    "rollup-plugin-typescript2": "^0.27.1",
+    "typescript": "^3.9.7"
+  },
+  "directories": {
+    "test": "test"
+  },
+  "keywords": [
+    "amap",
+    "jsapi",
+    "sdk",
+    "loader",
+    "地图",
+    "高德"
+  ],
+  "license": "MIT",
+  "main": "dist/index.js",
+  "name": "@amap/amap-jsapi-loader",
+  "repository": {
+    "type": "git",
+    "url": "git@gitlab.alibaba-inc.com:amap-web/amap-jsapi-loader.git"
+  },
+  "scripts": {
+    "build": "rollup -c rollup.config.js"
+  },
+  "types": "index.d.ts",
+  "version": "0.0.7"
+}

+ 25 - 0
node_modules/@amap/amap-jsapi-loader/rollup.config.js

@@ -0,0 +1,25 @@
+import server from "rollup-plugin-server";
+import babel from "rollup-plugin-babel";
+import compiler from "@ampproject/rollup-plugin-closure-compiler";
+import rollupTypescript from 'rollup-plugin-typescript2';
+
+export default {
+    input: "src/index.ts",
+    output: {
+        file: "dist/index.js",
+        format: "umd",
+        name: "AMapLoader",
+    },
+    plugins: [
+        rollupTypescript(),
+        babel({
+            presets: [["@babel/env", { targets: { ie: 9 } }]],
+        }),
+        compiler(),
+        server({
+            contentBase: "./",
+            host: "127.0.0.1",
+            port: 3601,
+        }),
+    ],
+};

+ 5 - 0
node_modules/@amap/amap-jsapi-loader/src/global.d.ts

@@ -0,0 +1,5 @@
+declare var AMap: any;
+declare var AMapUI: any;
+declare var Loca: any;
+
+declare var ___onAPILoaded: any;

+ 363 - 0
node_modules/@amap/amap-jsapi-loader/src/index.ts

@@ -0,0 +1,363 @@
+if (!window) {
+    throw Error("AMap JSAPI can only be used in Browser.");
+}
+enum LoadStatus {
+    notload = "notload",
+    loading = "loading",
+    loaded = "loaded",
+    failed = "failed",
+}
+let config = {
+    key: "",
+    AMap: {
+        version: "1.4.15",
+        plugins: [],
+    },
+    AMapUI: {
+        version: "1.1",
+        plugins: [],
+    },
+    Loca: {
+        version: "1.3.2",
+    },
+};
+
+let Status = {
+    AMap: LoadStatus.notload,
+    AMapUI: LoadStatus.notload,
+    Loca: LoadStatus.notload,
+};
+let Callback = {
+    AMap: [],
+    AMapUI: [],
+    Loca: [],
+};
+
+let onloadCBKs = [];
+const onload = function (callback) {
+    if (typeof callback == "function") {
+        if (Status.AMap === LoadStatus.loaded) {
+            callback(window.AMap);
+            return;
+        }
+        onloadCBKs.push(callback);
+    }
+};
+
+interface LoadOption {
+    key: string;
+    version?: string;
+    plugins?: string[];
+    AMapUI?: {
+        version?: string;
+        plugins?: string[];
+    };
+    Loca?: {
+        version?: string;
+    };
+}
+function appendOther(option: LoadOption): Promise<any> {
+    let pros: Promise<void>[] = [];
+    if (option.AMapUI) {
+        pros.push(loadAMapUI(option.AMapUI));
+    }
+    if (option.Loca) {
+        pros.push(loadLoca(option.Loca));
+    }
+    return Promise.all(pros);
+}
+function loadAMapUI(params: { version?: string; plugins?: string[] }): Promise<void> {
+    return new Promise((res, rej) => {
+        const newPlugins: string[] = [];
+        if (params.plugins) {
+            for (var i = 0; i < params.plugins.length; i += 1) {
+                if (config.AMapUI.plugins.indexOf(params.plugins[i]) == -1) {
+                    newPlugins.push(params.plugins[i]);
+                }
+            }
+        }
+        if (Status.AMapUI === LoadStatus.failed) {
+            rej("前次请求 AMapUI 失败");
+        } else if (Status.AMapUI === LoadStatus.notload) {
+            Status.AMapUI = LoadStatus.loading;
+            config.AMapUI.version = params.version || config.AMapUI.version;
+            const version = config.AMapUI.version;
+            const parentNode = document.body || document.head;
+            const script = document.createElement("script");
+            script.type = "text/javascript";
+            script.src = `https://webapi.amap.com/ui/${version}/main.js`;
+
+            script.onerror = (e) => {
+                Status.AMapUI = LoadStatus.failed;
+                rej("请求 AMapUI 失败");
+            };
+            script.onload = () => {
+                Status.AMapUI = LoadStatus.loaded;
+                if (newPlugins.length) {
+                    window.AMapUI.loadUI(newPlugins, function () {
+                        for (let i = 0, len = newPlugins.length; i < len; i++) {
+                            const path = newPlugins[i];
+                            const name = path.split("/").slice(-1)[0];
+                            window.AMapUI[name] = arguments[i];
+                        }
+                        res();
+                        while (Callback.AMapUI.length) {
+                            Callback.AMapUI.splice(0, 1)[0]();
+                        }
+                    });
+                } else {
+                    res();
+                    while (Callback.AMapUI.length) {
+                        Callback.AMapUI.splice(0, 1)[0]();
+                    }
+                }
+            };
+            parentNode.appendChild(script);
+        } else if (Status.AMapUI === LoadStatus.loaded) {
+            if (params.version && params.version !== config.AMapUI.version) {
+                rej("不允许多个版本 AMapUI 混用");
+            } else {
+                if (newPlugins.length) {
+                    window.AMapUI.loadUI(newPlugins, function () {
+                        for (let i = 0, len = newPlugins.length; i < len; i++) {
+                            const path = newPlugins[i];
+                            const name = path.split("/").slice(-1)[0];
+                            window.AMapUI[name] = arguments[i];
+                        }
+                        res();
+                    });
+                } else {
+                    res();
+                }
+            }
+        } else {
+            if (params.version && params.version !== config.AMapUI.version) {
+                rej("不允许多个版本 AMapUI 混用");
+            } else {
+                Callback.AMapUI.push((err) => {
+                    if (err) {
+                        rej(err);
+                    } else {
+                        if (newPlugins.length) {
+                            window.AMapUI.loadUI(newPlugins, function () {
+                                for (let i = 0, len = newPlugins.length; i < len; i++) {
+                                    const path = newPlugins[i];
+                                    const name = path.split("/").slice(-1)[0];
+                                    window.AMapUI[name] = arguments[i];
+                                }
+                                res();
+                            });
+                        } else {
+                            res();
+                        }
+                    }
+                });
+            }
+        }
+    });
+}
+
+function loadLoca(params: { version?: string }): Promise<void> {
+    return new Promise((res, rej) => {
+        if (config.AMap.version.startsWith("2.0")) {
+            rej("Loca 暂不适配 JSAPI 2.0,请使用 1.4.15");
+        } else if (Status.Loca === LoadStatus.failed) {
+            rej("前次请求 Loca 失败");
+        } else if (Status.Loca === LoadStatus.notload) {
+            Status.Loca = LoadStatus.loading;
+            config.Loca.version = params.version || config.Loca.version;
+            const version = config.Loca.version;
+            const key = config.key;
+            const parentNode = document.body || document.head;
+            const script = document.createElement("script");
+            script.type = "text/javascript";
+            script.src = `https://webapi.amap.com/loca?v=${version}&key=${key}`;
+
+            script.onerror = (e) => {
+                Status.Loca = LoadStatus.failed;
+                rej("请求 AMapUI 失败");
+            };
+            script.onload = () => {
+                Status.Loca = LoadStatus.loaded;
+                res();
+                while (Callback.Loca.length) {
+                    Callback.Loca.splice(0, 1)[0]();
+                }
+            };
+            parentNode.appendChild(script);
+        } else if (Status.Loca === LoadStatus.loaded) {
+            if (params.version && params.version !== config.Loca.version) {
+                rej("不允许多个版本 Loca 混用");
+            } else {
+                res();
+            }
+        } else {
+            if (params.version && params.version !== config.Loca.version) {
+                rej("不允许多个版本 Loca 混用");
+            } else {
+                Callback.Loca.push((err) => {
+                    if (err) {
+                        rej(err);
+                    } else {
+                        rej();
+                    }
+                });
+            }
+        }
+    });
+}
+
+const load = function (options: LoadOption) {
+    return new Promise((resolve, reject) => {
+        if (Status.AMap == LoadStatus.failed) {
+            reject("");
+        } else if (Status.AMap == LoadStatus.notload) {
+            //初次加载
+            let { key, version, plugins } = options;
+            if (!key) {
+                reject("请填写key");
+                return;
+            }
+            if (window.AMap && location.host !== "lbs.amap.com") {
+                reject("禁止多种API加载方式混用");
+            }
+            config.key = key;
+            config.AMap.version = version || config.AMap.version;
+            config.AMap.plugins = plugins || config.AMap.plugins;
+            Status.AMap = LoadStatus.loading;
+
+            const parentNode = document.body || document.head;
+
+            window.___onAPILoaded = function (err) {
+                delete window.___onAPILoaded;
+                if (err) {
+                    Status.AMap = LoadStatus.failed;
+                    reject(err);
+                } else {
+                    Status.AMap = LoadStatus.loaded;
+                    appendOther(options)
+                        .then(() => {
+                            resolve(window.AMap);
+                        })
+                        .catch(reject);
+                    while (onloadCBKs.length) {
+                        onloadCBKs.splice(0, 1)[0]();
+                    }
+                }
+            };
+            const script = document.createElement("script");
+            script.type = "text/javascript";
+
+            script.src =
+                "https://webapi.amap.com/maps?callback=___onAPILoaded&v=" +
+                config.AMap.version +
+                "&key=" +
+                key +
+                "&plugin=" +
+                config.AMap.plugins.join(",");
+            script.onerror = (e) => {
+                Status.AMap = LoadStatus.failed;
+                reject(e);
+            };
+            parentNode.appendChild(script);
+        } else if (Status.AMap == LoadStatus.loaded) {
+            //deal multi load
+            if (options.key && options.key !== config.key) {
+                reject("多个不一致的 key");
+                return;
+            }
+            if (options.version && options.version !== config.AMap.version) {
+                reject("不允许多个版本 JSAPI 混用");
+                return;
+            }
+            const newPlugins = [];
+            if (options.plugins) {
+                for (var i = 0; i < options.plugins.length; i += 1) {
+                    if (config.AMap.plugins.indexOf(options.plugins[i]) == -1) {
+                        newPlugins.push(options.plugins[i]);
+                    }
+                }
+            }
+            if (newPlugins.length) {
+                window.AMap.plugin(newPlugins, () => {
+                    appendOther(options)
+                        .then(() => {
+                            resolve(window.AMap);
+                        })
+                        .catch(reject);
+                });
+            } else {
+                appendOther(options)
+                    .then(() => {
+                        resolve(window.AMap);
+                    })
+                    .catch(reject);
+            }
+        } else {
+            // loading
+            if (options.key && options.key !== config.key) {
+                reject("多个不一致的 key");
+                return;
+            }
+            if (options.version && options.version !== config.AMap.version) {
+                reject("不允许多个版本 JSAPI 混用");
+                return;
+            }
+            const newPlugins = [];
+            if (options.plugins) {
+                for (var i = 0; i < options.plugins.length; i += 1) {
+                    if (config.AMap.plugins.indexOf(options.plugins[i]) == -1) {
+                        newPlugins.push(options.plugins[i]);
+                    }
+                }
+            }
+            onload(() => {
+                if (newPlugins.length) {
+                    window.AMap.plugin(newPlugins, () => {
+                        appendOther(options)
+                            .then(() => {
+                                resolve(window.AMap);
+                            })
+                            .catch(reject);
+                    });
+                } else {
+                    appendOther(options)
+                        .then(() => {
+                            resolve(window.AMap);
+                        })
+                        .catch(reject);
+                }
+            });
+        }
+    });
+};
+function reset() {
+    delete window.AMap;
+    delete window.AMapUI;
+    delete window.Loca;
+    config = {
+        key: "",
+        AMap: {
+            version: "1.4.15",
+            plugins: [],
+        },
+        AMapUI: {
+            version: "1.1",
+            plugins: [],
+        },
+        Loca: {
+            version: "1.3.2",
+        },
+    };
+    Status = {
+        AMap: LoadStatus.notload,
+        AMapUI: LoadStatus.notload,
+        Loca: LoadStatus.notload,
+    };
+    Callback = {
+        AMap: [],
+        AMapUI: [],
+        Loca: [],
+    };
+}
+export default { load, reset };

+ 17 - 0
node_modules/@amap/amap-jsapi-loader/test/demo.ts

@@ -0,0 +1,17 @@
+import AMapLoader from "../";
+// import {  } from "@ali/test-amap-jsapi";
+
+AMapLoader.load({
+  key: "test",
+  version: "2.0"
+}).then(() => {
+  new AMap.Circle({})
+  const map = new AMap.Map("div");
+  map.on("complete", () => {
+    const circle = new AMap.Circle({
+      center: [135, 45],
+      radius: 40
+    });
+    map.add(circle);
+  });
+});

+ 7 - 0
node_modules/@amap/amap-jsapi-loader/test/test.ts

@@ -0,0 +1,7 @@
+import AMapLoader from "../";
+import "@amap/amap-jsapi-loader";
+
+AMapLoader.load({
+  key: "test",
+  version: "2.0"
+}).then(() => {});

+ 14 - 0
node_modules/ansi-regex/index.js

@@ -0,0 +1,14 @@
+'use strict';
+
+module.exports = options => {
+	options = Object.assign({
+		onlyFirst: false
+	}, options);
+
+	const pattern = [
+		'[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)',
+		'(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))'
+	].join('|');
+
+	return new RegExp(pattern, options.onlyFirst ? undefined : 'g');
+};

+ 9 - 0
node_modules/ansi-regex/license

@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ 85 - 0
node_modules/ansi-regex/package.json

@@ -0,0 +1,85 @@
+{
+  "_from": "ansi-regex@^4.1.0",
+  "_id": "ansi-regex@4.1.0",
+  "_inBundle": false,
+  "_integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==",
+  "_location": "/ansi-regex",
+  "_phantomChildren": {},
+  "_requested": {
+    "type": "range",
+    "registry": true,
+    "raw": "ansi-regex@^4.1.0",
+    "name": "ansi-regex",
+    "escapedName": "ansi-regex",
+    "rawSpec": "^4.1.0",
+    "saveSpec": null,
+    "fetchSpec": "^4.1.0"
+  },
+  "_requiredBy": [
+    "/strip-ansi"
+  ],
+  "_resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
+  "_shasum": "8b9f8f08cf1acb843756a839ca8c7e3168c51997",
+  "_spec": "ansi-regex@^4.1.0",
+  "_where": "E:\\顾家\\gujia\\node_modules\\strip-ansi",
+  "author": {
+    "name": "Sindre Sorhus",
+    "email": "sindresorhus@gmail.com",
+    "url": "sindresorhus.com"
+  },
+  "bugs": {
+    "url": "https://github.com/chalk/ansi-regex/issues"
+  },
+  "bundleDependencies": false,
+  "deprecated": false,
+  "description": "Regular expression for matching ANSI escape codes",
+  "devDependencies": {
+    "ava": "^0.25.0",
+    "xo": "^0.23.0"
+  },
+  "engines": {
+    "node": ">=6"
+  },
+  "files": [
+    "index.js"
+  ],
+  "homepage": "https://github.com/chalk/ansi-regex#readme",
+  "keywords": [
+    "ansi",
+    "styles",
+    "color",
+    "colour",
+    "colors",
+    "terminal",
+    "console",
+    "cli",
+    "string",
+    "tty",
+    "escape",
+    "formatting",
+    "rgb",
+    "256",
+    "shell",
+    "xterm",
+    "command-line",
+    "text",
+    "regex",
+    "regexp",
+    "re",
+    "match",
+    "test",
+    "find",
+    "pattern"
+  ],
+  "license": "MIT",
+  "name": "ansi-regex",
+  "repository": {
+    "type": "git",
+    "url": "git+https://github.com/chalk/ansi-regex.git"
+  },
+  "scripts": {
+    "test": "xo && ava",
+    "view-supported": "node fixtures/view-codes.js"
+  },
+  "version": "4.1.0"
+}

+ 87 - 0
node_modules/ansi-regex/readme.md

@@ -0,0 +1,87 @@
+# ansi-regex [![Build Status](https://travis-ci.org/chalk/ansi-regex.svg?branch=master)](https://travis-ci.org/chalk/ansi-regex)
+
+> Regular expression for matching [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code)
+
+---
+
+<div align="center">
+	<b>
+		<a href="https://tidelift.com/subscription/pkg/npm-ansi-regex?utm_source=npm-ansi-regex&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
+	</b>
+	<br>
+	<sub>
+		Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
+	</sub>
+</div>
+
+---
+
+
+## Install
+
+```
+$ npm install ansi-regex
+```
+
+
+## Usage
+
+```js
+const ansiRegex = require('ansi-regex');
+
+ansiRegex().test('\u001B[4mcake\u001B[0m');
+//=> true
+
+ansiRegex().test('cake');
+//=> false
+
+'\u001B[4mcake\u001B[0m'.match(ansiRegex());
+//=> ['\u001B[4m', '\u001B[0m']
+
+'\u001B[4mcake\u001B[0m'.match(ansiRegex({onlyFirst: true}));
+//=> ['\u001B[4m']
+
+'\u001B]8;;https://github.com\u0007click\u001B]8;;\u0007'.match(ansiRegex());
+//=> ['\u001B]8;;https://github.com\u0007', '\u001B]8;;\u0007']
+```
+
+
+## API
+
+### ansiRegex([options])
+
+Returns a regex for matching ANSI escape codes.
+
+#### options
+
+##### onlyFirst
+
+Type: `boolean`<br>
+Default: `false` *(Matches any ANSI escape codes in a string)*
+
+Match only the first ANSI escape.
+
+
+## FAQ
+
+### Why do you test for codes not in the ECMA 48 standard?
+
+Some of the codes we run as a test are codes that we acquired finding various lists of non-standard or manufacturer specific codes. We test for both standard and non-standard codes, as most of them follow the same or similar format and can be safely matched in strings without the risk of removing actual string content. There are a few non-standard control codes that do not follow the traditional format (i.e. they end in numbers) thus forcing us to exclude them from the test because we cannot reliably match them.
+
+On the historical side, those ECMA standards were established in the early 90's whereas the VT100, for example, was designed in the mid/late 70's. At that point in time, control codes were still pretty ungoverned and engineers used them for a multitude of things, namely to activate hardware ports that may have been proprietary. Somewhere else you see a similar 'anarchy' of codes is in the x86 architecture for processors; there are a ton of "interrupts" that can mean different things on certain brands of processors, most of which have been phased out.
+
+
+## Security
+
+To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure.
+
+
+## Maintainers
+
+- [Sindre Sorhus](https://github.com/sindresorhus)
+- [Josh Junon](https://github.com/qix-)
+
+
+## License
+
+MIT

+ 165 - 0
node_modules/ansi-styles/index.js

@@ -0,0 +1,165 @@
+'use strict';
+const colorConvert = require('color-convert');
+
+const wrapAnsi16 = (fn, offset) => function () {
+	const code = fn.apply(colorConvert, arguments);
+	return `\u001B[${code + offset}m`;
+};
+
+const wrapAnsi256 = (fn, offset) => function () {
+	const code = fn.apply(colorConvert, arguments);
+	return `\u001B[${38 + offset};5;${code}m`;
+};
+
+const wrapAnsi16m = (fn, offset) => function () {
+	const rgb = fn.apply(colorConvert, arguments);
+	return `\u001B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`;
+};
+
+function assembleStyles() {
+	const codes = new Map();
+	const styles = {
+		modifier: {
+			reset: [0, 0],
+			// 21 isn't widely supported and 22 does the same thing
+			bold: [1, 22],
+			dim: [2, 22],
+			italic: [3, 23],
+			underline: [4, 24],
+			inverse: [7, 27],
+			hidden: [8, 28],
+			strikethrough: [9, 29]
+		},
+		color: {
+			black: [30, 39],
+			red: [31, 39],
+			green: [32, 39],
+			yellow: [33, 39],
+			blue: [34, 39],
+			magenta: [35, 39],
+			cyan: [36, 39],
+			white: [37, 39],
+			gray: [90, 39],
+
+			// Bright color
+			redBright: [91, 39],
+			greenBright: [92, 39],
+			yellowBright: [93, 39],
+			blueBright: [94, 39],
+			magentaBright: [95, 39],
+			cyanBright: [96, 39],
+			whiteBright: [97, 39]
+		},
+		bgColor: {
+			bgBlack: [40, 49],
+			bgRed: [41, 49],
+			bgGreen: [42, 49],
+			bgYellow: [43, 49],
+			bgBlue: [44, 49],
+			bgMagenta: [45, 49],
+			bgCyan: [46, 49],
+			bgWhite: [47, 49],
+
+			// Bright color
+			bgBlackBright: [100, 49],
+			bgRedBright: [101, 49],
+			bgGreenBright: [102, 49],
+			bgYellowBright: [103, 49],
+			bgBlueBright: [104, 49],
+			bgMagentaBright: [105, 49],
+			bgCyanBright: [106, 49],
+			bgWhiteBright: [107, 49]
+		}
+	};
+
+	// Fix humans
+	styles.color.grey = styles.color.gray;
+
+	for (const groupName of Object.keys(styles)) {
+		const group = styles[groupName];
+
+		for (const styleName of Object.keys(group)) {
+			const style = group[styleName];
+
+			styles[styleName] = {
+				open: `\u001B[${style[0]}m`,
+				close: `\u001B[${style[1]}m`
+			};
+
+			group[styleName] = styles[styleName];
+
+			codes.set(style[0], style[1]);
+		}
+
+		Object.defineProperty(styles, groupName, {
+			value: group,
+			enumerable: false
+		});
+
+		Object.defineProperty(styles, 'codes', {
+			value: codes,
+			enumerable: false
+		});
+	}
+
+	const ansi2ansi = n => n;
+	const rgb2rgb = (r, g, b) => [r, g, b];
+
+	styles.color.close = '\u001B[39m';
+	styles.bgColor.close = '\u001B[49m';
+
+	styles.color.ansi = {
+		ansi: wrapAnsi16(ansi2ansi, 0)
+	};
+	styles.color.ansi256 = {
+		ansi256: wrapAnsi256(ansi2ansi, 0)
+	};
+	styles.color.ansi16m = {
+		rgb: wrapAnsi16m(rgb2rgb, 0)
+	};
+
+	styles.bgColor.ansi = {
+		ansi: wrapAnsi16(ansi2ansi, 10)
+	};
+	styles.bgColor.ansi256 = {
+		ansi256: wrapAnsi256(ansi2ansi, 10)
+	};
+	styles.bgColor.ansi16m = {
+		rgb: wrapAnsi16m(rgb2rgb, 10)
+	};
+
+	for (let key of Object.keys(colorConvert)) {
+		if (typeof colorConvert[key] !== 'object') {
+			continue;
+		}
+
+		const suite = colorConvert[key];
+
+		if (key === 'ansi16') {
+			key = 'ansi';
+		}
+
+		if ('ansi16' in suite) {
+			styles.color.ansi[key] = wrapAnsi16(suite.ansi16, 0);
+			styles.bgColor.ansi[key] = wrapAnsi16(suite.ansi16, 10);
+		}
+
+		if ('ansi256' in suite) {
+			styles.color.ansi256[key] = wrapAnsi256(suite.ansi256, 0);
+			styles.bgColor.ansi256[key] = wrapAnsi256(suite.ansi256, 10);
+		}
+
+		if ('rgb' in suite) {
+			styles.color.ansi16m[key] = wrapAnsi16m(suite.rgb, 0);
+			styles.bgColor.ansi16m[key] = wrapAnsi16m(suite.rgb, 10);
+		}
+	}
+
+	return styles;
+}
+
+// Make the export immutable
+Object.defineProperty(module, 'exports', {
+	enumerable: true,
+	get: assembleStyles
+});

+ 9 - 0
node_modules/ansi-styles/license

@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ 88 - 0
node_modules/ansi-styles/package.json

@@ -0,0 +1,88 @@
+{
+  "_from": "ansi-styles@^3.2.0",
+  "_id": "ansi-styles@3.2.1",
+  "_inBundle": false,
+  "_integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
+  "_location": "/ansi-styles",
+  "_phantomChildren": {},
+  "_requested": {
+    "type": "range",
+    "registry": true,
+    "raw": "ansi-styles@^3.2.0",
+    "name": "ansi-styles",
+    "escapedName": "ansi-styles",
+    "rawSpec": "^3.2.0",
+    "saveSpec": null,
+    "fetchSpec": "^3.2.0"
+  },
+  "_requiredBy": [
+    "/wrap-ansi"
+  ],
+  "_resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
+  "_shasum": "41fbb20243e50b12be0f04b8dedbf07520ce841d",
+  "_spec": "ansi-styles@^3.2.0",
+  "_where": "E:\\顾家\\gujia\\node_modules\\wrap-ansi",
+  "author": {
+    "name": "Sindre Sorhus",
+    "email": "sindresorhus@gmail.com",
+    "url": "sindresorhus.com"
+  },
+  "ava": {
+    "require": "babel-polyfill"
+  },
+  "bugs": {
+    "url": "https://github.com/chalk/ansi-styles/issues"
+  },
+  "bundleDependencies": false,
+  "dependencies": {
+    "color-convert": "^1.9.0"
+  },
+  "deprecated": false,
+  "description": "ANSI escape codes for styling strings in the terminal",
+  "devDependencies": {
+    "ava": "*",
+    "babel-polyfill": "^6.23.0",
+    "svg-term-cli": "^2.1.1",
+    "xo": "*"
+  },
+  "engines": {
+    "node": ">=4"
+  },
+  "files": [
+    "index.js"
+  ],
+  "homepage": "https://github.com/chalk/ansi-styles#readme",
+  "keywords": [
+    "ansi",
+    "styles",
+    "color",
+    "colour",
+    "colors",
+    "terminal",
+    "console",
+    "cli",
+    "string",
+    "tty",
+    "escape",
+    "formatting",
+    "rgb",
+    "256",
+    "shell",
+    "xterm",
+    "log",
+    "logging",
+    "command-line",
+    "text"
+  ],
+  "license": "MIT",
+  "name": "ansi-styles",
+  "repository": {
+    "type": "git",
+    "url": "git+https://github.com/chalk/ansi-styles.git"
+  },
+  "scripts": {
+    "screenshot": "svg-term --command='node screenshot' --out=screenshot.svg --padding=3 --width=55 --height=3 --at=1000 --no-cursor",
+    "test": "xo && ava"
+  },
+  "version": "3.2.1"
+}

+ 147 - 0
node_modules/ansi-styles/readme.md

@@ -0,0 +1,147 @@
+# ansi-styles [![Build Status](https://travis-ci.org/chalk/ansi-styles.svg?branch=master)](https://travis-ci.org/chalk/ansi-styles)
+
+> [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) for styling strings in the terminal
+
+You probably want the higher-level [chalk](https://github.com/chalk/chalk) module for styling your strings.
+
+<img src="https://cdn.rawgit.com/chalk/ansi-styles/8261697c95bf34b6c7767e2cbe9941a851d59385/screenshot.svg" width="900">
+
+
+## Install
+
+```
+$ npm install ansi-styles
+```
+
+
+## Usage
+
+```js
+const style = require('ansi-styles');
+
+console.log(`${style.green.open}Hello world!${style.green.close}`);
+
+
+// Color conversion between 16/256/truecolor
+// NOTE: If conversion goes to 16 colors or 256 colors, the original color
+//       may be degraded to fit that color palette. This means terminals
+//       that do not support 16 million colors will best-match the
+//       original color.
+console.log(style.bgColor.ansi.hsl(120, 80, 72) + 'Hello world!' + style.bgColor.close);
+console.log(style.color.ansi256.rgb(199, 20, 250) + 'Hello world!' + style.color.close);
+console.log(style.color.ansi16m.hex('#ABCDEF') + 'Hello world!' + style.color.close);
+```
+
+## API
+
+Each style has an `open` and `close` property.
+
+
+## Styles
+
+### Modifiers
+
+- `reset`
+- `bold`
+- `dim`
+- `italic` *(Not widely supported)*
+- `underline`
+- `inverse`
+- `hidden`
+- `strikethrough` *(Not widely supported)*
+
+### Colors
+
+- `black`
+- `red`
+- `green`
+- `yellow`
+- `blue`
+- `magenta`
+- `cyan`
+- `white`
+- `gray` ("bright black")
+- `redBright`
+- `greenBright`
+- `yellowBright`
+- `blueBright`
+- `magentaBright`
+- `cyanBright`
+- `whiteBright`
+
+### Background colors
+
+- `bgBlack`
+- `bgRed`
+- `bgGreen`
+- `bgYellow`
+- `bgBlue`
+- `bgMagenta`
+- `bgCyan`
+- `bgWhite`
+- `bgBlackBright`
+- `bgRedBright`
+- `bgGreenBright`
+- `bgYellowBright`
+- `bgBlueBright`
+- `bgMagentaBright`
+- `bgCyanBright`
+- `bgWhiteBright`
+
+
+## Advanced usage
+
+By default, you get a map of styles, but the styles are also available as groups. They are non-enumerable so they don't show up unless you access them explicitly. This makes it easier to expose only a subset in a higher-level module.
+
+- `style.modifier`
+- `style.color`
+- `style.bgColor`
+
+###### Example
+
+```js
+console.log(style.color.green.open);
+```
+
+Raw escape codes (i.e. without the CSI escape prefix `\u001B[` and render mode postfix `m`) are available under `style.codes`, which returns a `Map` with the open codes as keys and close codes as values.
+
+###### Example
+
+```js
+console.log(style.codes.get(36));
+//=> 39
+```
+
+
+## [256 / 16 million (TrueColor) support](https://gist.github.com/XVilka/8346728)
+
+`ansi-styles` uses the [`color-convert`](https://github.com/Qix-/color-convert) package to allow for converting between various colors and ANSI escapes, with support for 256 and 16 million colors.
+
+To use these, call the associated conversion function with the intended output, for example:
+
+```js
+style.color.ansi.rgb(100, 200, 15); // RGB to 16 color ansi foreground code
+style.bgColor.ansi.rgb(100, 200, 15); // RGB to 16 color ansi background code
+
+style.color.ansi256.hsl(120, 100, 60); // HSL to 256 color ansi foreground code
+style.bgColor.ansi256.hsl(120, 100, 60); // HSL to 256 color ansi foreground code
+
+style.color.ansi16m.hex('#C0FFEE'); // Hex (RGB) to 16 million color foreground code
+style.bgColor.ansi16m.hex('#C0FFEE'); // Hex (RGB) to 16 million color background code
+```
+
+
+## Related
+
+- [ansi-escapes](https://github.com/sindresorhus/ansi-escapes) - ANSI escape codes for manipulating the terminal
+
+
+## Maintainers
+
+- [Sindre Sorhus](https://github.com/sindresorhus)
+- [Josh Junon](https://github.com/qix-)
+
+
+## License
+
+MIT

+ 21 - 0
node_modules/base64-js/LICENSE

@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2014 Jameson Little
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.

+ 32 - 0
node_modules/base64-js/README.md

@@ -0,0 +1,32 @@
+base64-js
+=========
+
+`base64-js` does basic base64 encoding/decoding in pure JS.
+
+[![build status](https://secure.travis-ci.org/beatgammit/base64-js.png)](http://travis-ci.org/beatgammit/base64-js)
+
+Many browsers already have base64 encoding/decoding functionality, but it is for text data, not all-purpose binary data.
+
+Sometimes encoding/decoding binary data in the browser is useful, and that is what this module does.
+
+## install
+
+With [npm](https://npmjs.org) do:
+
+`npm install base64-js` and `var base64js = require('base64-js')`
+
+For use in web browsers do:
+
+`<script src="base64js.min.js"></script>`
+
+## methods
+
+`base64js` has three exposed functions, `byteLength`, `toByteArray` and `fromByteArray`, which both take a single argument.
+
+* `byteLength` - Takes a base64 string and returns length of byte array
+* `toByteArray` - Takes a base64 string and returns a byte array
+* `fromByteArray` - Takes a byte array and returns a base64 string
+
+## license
+
+MIT

Разница между файлами не показана из-за своего большого размера
+ 0 - 0
node_modules/base64-js/base64js.min.js


+ 152 - 0
node_modules/base64-js/index.js

@@ -0,0 +1,152 @@
+'use strict'
+
+exports.byteLength = byteLength
+exports.toByteArray = toByteArray
+exports.fromByteArray = fromByteArray
+
+var lookup = []
+var revLookup = []
+var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array
+
+var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
+for (var i = 0, len = code.length; i < len; ++i) {
+  lookup[i] = code[i]
+  revLookup[code.charCodeAt(i)] = i
+}
+
+// Support decoding URL-safe base64 strings, as Node.js does.
+// See: https://en.wikipedia.org/wiki/Base64#URL_applications
+revLookup['-'.charCodeAt(0)] = 62
+revLookup['_'.charCodeAt(0)] = 63
+
+function getLens (b64) {
+  var len = b64.length
+
+  if (len % 4 > 0) {
+    throw new Error('Invalid string. Length must be a multiple of 4')
+  }
+
+  // Trim off extra bytes after placeholder bytes are found
+  // See: https://github.com/beatgammit/base64-js/issues/42
+  var validLen = b64.indexOf('=')
+  if (validLen === -1) validLen = len
+
+  var placeHoldersLen = validLen === len
+    ? 0
+    : 4 - (validLen % 4)
+
+  return [validLen, placeHoldersLen]
+}
+
+// base64 is 4/3 + up to two characters of the original data
+function byteLength (b64) {
+  var lens = getLens(b64)
+  var validLen = lens[0]
+  var placeHoldersLen = lens[1]
+  return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen
+}
+
+function _byteLength (b64, validLen, placeHoldersLen) {
+  return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen
+}
+
+function toByteArray (b64) {
+  var tmp
+  var lens = getLens(b64)
+  var validLen = lens[0]
+  var placeHoldersLen = lens[1]
+
+  var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))
+
+  var curByte = 0
+
+  // if there are placeholders, only get up to the last complete 4 chars
+  var len = placeHoldersLen > 0
+    ? validLen - 4
+    : validLen
+
+  var i
+  for (i = 0; i < len; i += 4) {
+    tmp =
+      (revLookup[b64.charCodeAt(i)] << 18) |
+      (revLookup[b64.charCodeAt(i + 1)] << 12) |
+      (revLookup[b64.charCodeAt(i + 2)] << 6) |
+      revLookup[b64.charCodeAt(i + 3)]
+    arr[curByte++] = (tmp >> 16) & 0xFF
+    arr[curByte++] = (tmp >> 8) & 0xFF
+    arr[curByte++] = tmp & 0xFF
+  }
+
+  if (placeHoldersLen === 2) {
+    tmp =
+      (revLookup[b64.charCodeAt(i)] << 2) |
+      (revLookup[b64.charCodeAt(i + 1)] >> 4)
+    arr[curByte++] = tmp & 0xFF
+  }
+
+  if (placeHoldersLen === 1) {
+    tmp =
+      (revLookup[b64.charCodeAt(i)] << 10) |
+      (revLookup[b64.charCodeAt(i + 1)] << 4) |
+      (revLookup[b64.charCodeAt(i + 2)] >> 2)
+    arr[curByte++] = (tmp >> 8) & 0xFF
+    arr[curByte++] = tmp & 0xFF
+  }
+
+  return arr
+}
+
+function tripletToBase64 (num) {
+  return lookup[num >> 18 & 0x3F] +
+    lookup[num >> 12 & 0x3F] +
+    lookup[num >> 6 & 0x3F] +
+    lookup[num & 0x3F]
+}
+
+function encodeChunk (uint8, start, end) {
+  var tmp
+  var output = []
+  for (var i = start; i < end; i += 3) {
+    tmp =
+      ((uint8[i] << 16) & 0xFF0000) +
+      ((uint8[i + 1] << 8) & 0xFF00) +
+      (uint8[i + 2] & 0xFF)
+    output.push(tripletToBase64(tmp))
+  }
+  return output.join('')
+}
+
+function fromByteArray (uint8) {
+  var tmp
+  var len = uint8.length
+  var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes
+  var parts = []
+  var maxChunkLength = 16383 // must be multiple of 3
+
+  // go through the array every three bytes, we'll deal with trailing stuff later
+  for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {
+    parts.push(encodeChunk(
+      uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)
+    ))
+  }
+
+  // pad the end with zeros, but make sure to not forget the extra bytes
+  if (extraBytes === 1) {
+    tmp = uint8[len - 1]
+    parts.push(
+      lookup[tmp >> 2] +
+      lookup[(tmp << 4) & 0x3F] +
+      '=='
+    )
+  } else if (extraBytes === 2) {
+    tmp = (uint8[len - 2] << 8) + uint8[len - 1]
+    parts.push(
+      lookup[tmp >> 10] +
+      lookup[(tmp >> 4) & 0x3F] +
+      lookup[(tmp << 2) & 0x3F] +
+      '='
+    )
+  }
+
+  return parts.join('')
+}

+ 60 - 0
node_modules/base64-js/package.json

@@ -0,0 +1,60 @@
+{
+  "_from": "base64-js@^1.0.2",
+  "_id": "base64-js@1.3.1",
+  "_inBundle": false,
+  "_integrity": "sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g==",
+  "_location": "/base64-js",
+  "_phantomChildren": {},
+  "_requested": {
+    "type": "range",
+    "registry": true,
+    "raw": "base64-js@^1.0.2",
+    "name": "base64-js",
+    "escapedName": "base64-js",
+    "rawSpec": "^1.0.2",
+    "saveSpec": null,
+    "fetchSpec": "^1.0.2"
+  },
+  "_requiredBy": [
+    "/buffer"
+  ],
+  "_resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz",
+  "_shasum": "58ece8cb75dd07e71ed08c736abc5fac4dbf8df1",
+  "_spec": "base64-js@^1.0.2",
+  "_where": "E:\\顾家\\gujia\\node_modules\\buffer",
+  "author": {
+    "name": "T. Jameson Little",
+    "email": "t.jameson.little@gmail.com"
+  },
+  "bugs": {
+    "url": "https://github.com/beatgammit/base64-js/issues"
+  },
+  "bundleDependencies": false,
+  "deprecated": false,
+  "description": "Base64 encoding/decoding in pure JS",
+  "devDependencies": {
+    "benchmark": "^2.1.4",
+    "browserify": "^16.3.0",
+    "standard": "*",
+    "tape": "4.x",
+    "uglify-js": "^3.6.0"
+  },
+  "homepage": "https://github.com/beatgammit/base64-js",
+  "keywords": [
+    "base64"
+  ],
+  "license": "MIT",
+  "main": "index.js",
+  "name": "base64-js",
+  "repository": {
+    "type": "git",
+    "url": "git://github.com/beatgammit/base64-js.git"
+  },
+  "scripts": {
+    "build": "browserify -s base64js -r ./ | uglifyjs -m > base64js.min.js",
+    "lint": "standard",
+    "test": "npm run lint && npm run unit",
+    "unit": "tape test/*.js"
+  },
+  "version": "1.3.1"
+}

+ 17 - 0
node_modules/buffer-alloc-unsafe/index.js

@@ -0,0 +1,17 @@
+function allocUnsafe (size) {
+  if (typeof size !== 'number') {
+    throw new TypeError('"size" argument must be a number')
+  }
+
+  if (size < 0) {
+    throw new RangeError('"size" argument must not be negative')
+  }
+
+  if (Buffer.allocUnsafe) {
+    return Buffer.allocUnsafe(size)
+  } else {
+    return new Buffer(size)
+  }
+}
+
+module.exports = allocUnsafe

+ 57 - 0
node_modules/buffer-alloc-unsafe/package.json

@@ -0,0 +1,57 @@
+{
+  "_from": "buffer-alloc-unsafe@^1.1.0",
+  "_id": "buffer-alloc-unsafe@1.1.0",
+  "_inBundle": false,
+  "_integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==",
+  "_location": "/buffer-alloc-unsafe",
+  "_phantomChildren": {},
+  "_requested": {
+    "type": "range",
+    "registry": true,
+    "raw": "buffer-alloc-unsafe@^1.1.0",
+    "name": "buffer-alloc-unsafe",
+    "escapedName": "buffer-alloc-unsafe",
+    "rawSpec": "^1.1.0",
+    "saveSpec": null,
+    "fetchSpec": "^1.1.0"
+  },
+  "_requiredBy": [
+    "/buffer-alloc"
+  ],
+  "_resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz",
+  "_shasum": "bd7dc26ae2972d0eda253be061dba992349c19f0",
+  "_spec": "buffer-alloc-unsafe@^1.1.0",
+  "_where": "E:\\顾家\\gujia\\node_modules\\buffer-alloc",
+  "bugs": {
+    "url": "https://github.com/LinusU/buffer-alloc-unsafe/issues"
+  },
+  "bundleDependencies": false,
+  "deprecated": false,
+  "description": "A [ponyfill](https://ponyfill.com) for `Buffer.allocUnsafe`.",
+  "devDependencies": {
+    "standard": "^7.1.2"
+  },
+  "files": [
+    "index.js"
+  ],
+  "homepage": "https://github.com/LinusU/buffer-alloc-unsafe#readme",
+  "keywords": [
+    "allocUnsafe",
+    "allocate",
+    "buffer allocUnsafe",
+    "buffer unsafe allocate",
+    "buffer",
+    "ponyfill",
+    "unsafe allocate"
+  ],
+  "license": "MIT",
+  "name": "buffer-alloc-unsafe",
+  "repository": {
+    "type": "git",
+    "url": "git+https://github.com/LinusU/buffer-alloc-unsafe.git"
+  },
+  "scripts": {
+    "test": "standard && node test"
+  },
+  "version": "1.1.0"
+}

+ 46 - 0
node_modules/buffer-alloc-unsafe/readme.md

@@ -0,0 +1,46 @@
+# Buffer Alloc Unsafe
+
+A [ponyfill](https://ponyfill.com) for `Buffer.allocUnsafe`.
+
+Works as Node.js: `v7.0.0` <br>
+Works on Node.js: `v0.10.0`
+
+## Installation
+
+```sh
+npm install --save buffer-alloc-unsafe
+```
+
+## Usage
+
+```js
+const allocUnsafe = require('buffer-alloc-unsafe')
+
+console.log(allocUnsafe(10))
+//=> <Buffer 78 0c 80 03 01 00 00 00 05 00>
+
+console.log(allocUnsafe(10))
+//=> <Buffer 58 ed bf 5f ff 7f 00 00 01 00>
+
+console.log(allocUnsafe(10))
+//=> <Buffer 50 0c 80 03 01 00 00 00 0a 00>
+
+allocUnsafe(-10)
+//=> RangeError: "size" argument must not be negative
+```
+
+## API
+
+### allocUnsafe(size)
+
+- `size` &lt;Integer&gt; The desired length of the new `Buffer`
+
+Allocates a new *non-zero-filled* `Buffer` of `size` bytes. The `size` must be
+less than or equal to the value of `buffer.kMaxLength` and greater than or equal
+to zero. Otherwise, a `RangeError` is thrown.
+
+## See also
+
+- [buffer-alloc](https://github.com/LinusU/buffer-alloc) A ponyfill for `Buffer.alloc`
+- [buffer-fill](https://github.com/LinusU/buffer-fill) A ponyfill for `Buffer.fill`
+- [buffer-from](https://github.com/LinusU/buffer-from) A ponyfill for `Buffer.from`

+ 32 - 0
node_modules/buffer-alloc/index.js

@@ -0,0 +1,32 @@
+var bufferFill = require('buffer-fill')
+var allocUnsafe = require('buffer-alloc-unsafe')
+
+module.exports = function alloc (size, fill, encoding) {
+  if (typeof size !== 'number') {
+    throw new TypeError('"size" argument must be a number')
+  }
+
+  if (size < 0) {
+    throw new RangeError('"size" argument must not be negative')
+  }
+
+  if (Buffer.alloc) {
+    return Buffer.alloc(size, fill, encoding)
+  }
+
+  var buffer = allocUnsafe(size)
+
+  if (size === 0) {
+    return buffer
+  }
+
+  if (fill === undefined) {
+    return bufferFill(buffer, 0)
+  }
+
+  if (typeof encoding !== 'string') {
+    encoding = undefined
+  }
+
+  return bufferFill(buffer, fill, encoding)
+}

+ 59 - 0
node_modules/buffer-alloc/package.json

@@ -0,0 +1,59 @@
+{
+  "_from": "buffer-alloc@^1.2.0",
+  "_id": "buffer-alloc@1.2.0",
+  "_inBundle": false,
+  "_integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==",
+  "_location": "/buffer-alloc",
+  "_phantomChildren": {},
+  "_requested": {
+    "type": "range",
+    "registry": true,
+    "raw": "buffer-alloc@^1.2.0",
+    "name": "buffer-alloc",
+    "escapedName": "buffer-alloc",
+    "rawSpec": "^1.2.0",
+    "saveSpec": null,
+    "fetchSpec": "^1.2.0"
+  },
+  "_requiredBy": [
+    "/qrcode"
+  ],
+  "_resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz",
+  "_shasum": "890dd90d923a873e08e10e5fd51a57e5b7cce0ec",
+  "_spec": "buffer-alloc@^1.2.0",
+  "_where": "E:\\顾家\\gujia\\node_modules\\qrcode",
+  "bugs": {
+    "url": "https://github.com/LinusU/buffer-alloc/issues"
+  },
+  "bundleDependencies": false,
+  "dependencies": {
+    "buffer-alloc-unsafe": "^1.1.0",
+    "buffer-fill": "^1.0.0"
+  },
+  "deprecated": false,
+  "description": "A [ponyfill](https://ponyfill.com) for `Buffer.alloc`.",
+  "devDependencies": {
+    "standard": "^7.1.2"
+  },
+  "files": [
+    "index.js"
+  ],
+  "homepage": "https://github.com/LinusU/buffer-alloc#readme",
+  "keywords": [
+    "alloc",
+    "allocate",
+    "buffer alloc",
+    "buffer allocate",
+    "buffer"
+  ],
+  "license": "MIT",
+  "name": "buffer-alloc",
+  "repository": {
+    "type": "git",
+    "url": "git+https://github.com/LinusU/buffer-alloc.git"
+  },
+  "scripts": {
+    "test": "standard && node test"
+  },
+  "version": "1.2.0"
+}

+ 43 - 0
node_modules/buffer-alloc/readme.md

@@ -0,0 +1,43 @@
+# Buffer Alloc
+
+A [ponyfill](https://ponyfill.com) for `Buffer.alloc`.
+
+Works as Node.js: `v7.0.0` <br>
+Works on Node.js: `v0.10.0`
+
+## Installation
+
+```sh
+npm install --save buffer-alloc
+```
+
+## Usage
+
+```js
+const alloc = require('buffer-alloc')
+
+console.log(alloc(4))
+//=> <Buffer 00 00 00 00>
+
+console.log(alloc(6, 0x41))
+//=> <Buffer 41 41 41 41 41 41>
+
+console.log(alloc(10, 'linus', 'utf8'))
+//=> <Buffer 6c 69 6e 75 73 6c 69 6e 75 73>
+```
+
+## API
+
+### alloc(size[, fill[, encoding]])
+
+- `size` &lt;Integer&gt; The desired length of the new `Buffer`
+- `fill` &lt;String&gt; | &lt;Buffer&gt; | &lt;Integer&gt; A value to pre-fill the new `Buffer` with. **Default:** `0`
+- `encoding` &lt;String&gt; If `fill` is a string, this is its encoding. **Default:** `'utf8'`
+
+Allocates a new `Buffer` of `size` bytes. If `fill` is `undefined`, the `Buffer` will be zero-filled.
+
+## See also
+
+- [buffer-alloc-unsafe](https://github.com/LinusU/buffer-alloc-unsafe) A ponyfill for `Buffer.allocUnsafe`
+- [buffer-fill](https://github.com/LinusU/buffer-fill) A ponyfill for `Buffer.fill`
+- [buffer-from](https://github.com/LinusU/buffer-from) A ponyfill for `Buffer.from`

+ 113 - 0
node_modules/buffer-fill/index.js

@@ -0,0 +1,113 @@
+/* Node.js 6.4.0 and up has full support */
+var hasFullSupport = (function () {
+  try {
+    if (!Buffer.isEncoding('latin1')) {
+      return false
+    }
+
+    var buf = Buffer.alloc ? Buffer.alloc(4) : new Buffer(4)
+
+    buf.fill('ab', 'ucs2')
+
+    return (buf.toString('hex') === '61006200')
+  } catch (_) {
+    return false
+  }
+}())
+
+function isSingleByte (val) {
+  return (val.length === 1 && val.charCodeAt(0) < 256)
+}
+
+function fillWithNumber (buffer, val, start, end) {
+  if (start < 0 || end > buffer.length) {
+    throw new RangeError('Out of range index')
+  }
+
+  start = start >>> 0
+  end = end === undefined ? buffer.length : end >>> 0
+
+  if (end > start) {
+    buffer.fill(val, start, end)
+  }
+
+  return buffer
+}
+
+function fillWithBuffer (buffer, val, start, end) {
+  if (start < 0 || end > buffer.length) {
+    throw new RangeError('Out of range index')
+  }
+
+  if (end <= start) {
+    return buffer
+  }
+
+  start = start >>> 0
+  end = end === undefined ? buffer.length : end >>> 0
+
+  var pos = start
+  var len = val.length
+  while (pos <= (end - len)) {
+    val.copy(buffer, pos)
+    pos += len
+  }
+
+  if (pos !== end) {
+    val.copy(buffer, pos, 0, end - pos)
+  }
+
+  return buffer
+}
+
+function fill (buffer, val, start, end, encoding) {
+  if (hasFullSupport) {
+    return buffer.fill(val, start, end, encoding)
+  }
+
+  if (typeof val === 'number') {
+    return fillWithNumber(buffer, val, start, end)
+  }
+
+  if (typeof val === 'string') {
+    if (typeof start === 'string') {
+      encoding = start
+      start = 0
+      end = buffer.length
+    } else if (typeof end === 'string') {
+      encoding = end
+      end = buffer.length
+    }
+
+    if (encoding !== undefined && typeof encoding !== 'string') {
+      throw new TypeError('encoding must be a string')
+    }
+
+    if (encoding === 'latin1') {
+      encoding = 'binary'
+    }
+
+    if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {
+      throw new TypeError('Unknown encoding: ' + encoding)
+    }
+
+    if (val === '') {
+      return fillWithNumber(buffer, 0, start, end)
+    }
+
+    if (isSingleByte(val)) {
+      return fillWithNumber(buffer, val.charCodeAt(0), start, end)
+    }
+
+    val = new Buffer(val, encoding)
+  }
+
+  if (Buffer.isBuffer(val)) {
+    return fillWithBuffer(buffer, val, start, end)
+  }
+
+  // Other values (e.g. undefined, boolean, object) results in zero-fill
+  return fillWithNumber(buffer, 0, start, end)
+}
+
+module.exports = fill

+ 49 - 0
node_modules/buffer-fill/package.json

@@ -0,0 +1,49 @@
+{
+  "_from": "buffer-fill@^1.0.0",
+  "_id": "buffer-fill@1.0.0",
+  "_inBundle": false,
+  "_integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw=",
+  "_location": "/buffer-fill",
+  "_phantomChildren": {},
+  "_requested": {
+    "type": "range",
+    "registry": true,
+    "raw": "buffer-fill@^1.0.0",
+    "name": "buffer-fill",
+    "escapedName": "buffer-fill",
+    "rawSpec": "^1.0.0",
+    "saveSpec": null,
+    "fetchSpec": "^1.0.0"
+  },
+  "_requiredBy": [
+    "/buffer-alloc"
+  ],
+  "_resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz",
+  "_shasum": "f8f78b76789888ef39f205cd637f68e702122b2c",
+  "_spec": "buffer-fill@^1.0.0",
+  "_where": "E:\\顾家\\gujia\\node_modules\\buffer-alloc",
+  "bugs": {
+    "url": "https://github.com/LinusU/buffer-fill/issues"
+  },
+  "bundleDependencies": false,
+  "deprecated": false,
+  "description": "A [ponyfill](https://ponyfill.com) for `Buffer.fill`.",
+  "devDependencies": {
+    "buffer-alloc-unsafe": "^1.1.0",
+    "standard": "^7.1.2"
+  },
+  "files": [
+    "index.js"
+  ],
+  "homepage": "https://github.com/LinusU/buffer-fill#readme",
+  "license": "MIT",
+  "name": "buffer-fill",
+  "repository": {
+    "type": "git",
+    "url": "git+https://github.com/LinusU/buffer-fill.git"
+  },
+  "scripts": {
+    "test": "standard && node test"
+  },
+  "version": "1.0.0"
+}

+ 54 - 0
node_modules/buffer-fill/readme.md

@@ -0,0 +1,54 @@
+# Buffer Fill
+
+A [ponyfill](https://ponyfill.com) for `Buffer.fill`.
+
+Works as Node.js: `v6.4.0` <br>
+Works on Node.js: `v0.10.0`
+
+## Installation
+
+```sh
+npm install --save buffer-fill
+```
+
+## Usage
+
+```js
+const fill = require('buffer-fill')
+const buf = Buffer.allocUnsafe(5)
+
+console.log(buf.fill(8))
+//=> <Buffer 08 08 08 08 08>
+
+console.log(buf.fill(9, 2, 4))
+//=> <Buffer 08 08 09 09 08>
+
+console.log(buf.fill('linus', 'latin1'))
+//=> <Buffer 6c 69 6e 75 73>
+
+console.log(buf.fill('\u0222'))
+//=> <Buffer c8 a2 c8 a2 c8>
+```
+
+## API
+
+### fill(buf, value[, offset[, end]][, encoding])
+
+- `value` &lt;String&gt; | &lt;Buffer&gt; | &lt;Integer&gt; The value to fill `buf` with
+- `offset` &lt;Integer&gt; Where to start filling `buf`. **Default:** `0`
+- `end` &lt;Integer&gt; Where to stop filling `buf` (not inclusive). **Default:** `buf.length`
+- `encoding` &lt;String&gt; If `value` is a string, this is its encoding. **Default:** `'utf8'`
+- Return: &lt;Buffer&gt; A reference to `buf`
+
+Fills `buf` with the specified `value`. If the `offset` and `end` are not given,
+the entire `buf` will be filled. This is meant to be a small simplification to
+allow the creation and filling of a `Buffer` to be done on a single line.
+
+If the final write of a `fill()` operation falls on a multi-byte character, then
+only the first bytes of that character that fit into `buf` are written.
+
+## See also
+
+- [buffer-alloc-unsafe](https://github.com/LinusU/buffer-alloc-unsafe) A ponyfill for `Buffer.allocUnsafe`
+- [buffer-alloc](https://github.com/LinusU/buffer-alloc) A ponyfill for `Buffer.alloc`
+- [buffer-from](https://github.com/LinusU/buffer-from) A ponyfill for `Buffer.from`

+ 21 - 0
node_modules/buffer-from/LICENSE

@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2016, 2018 Linus Unnebäck
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.

+ 69 - 0
node_modules/buffer-from/index.js

@@ -0,0 +1,69 @@
+var toString = Object.prototype.toString
+
+var isModern = (
+  typeof Buffer.alloc === 'function' &&
+  typeof Buffer.allocUnsafe === 'function' &&
+  typeof Buffer.from === 'function'
+)
+
+function isArrayBuffer (input) {
+  return toString.call(input).slice(8, -1) === 'ArrayBuffer'
+}
+
+function fromArrayBuffer (obj, byteOffset, length) {
+  byteOffset >>>= 0
+
+  var maxLength = obj.byteLength - byteOffset
+
+  if (maxLength < 0) {
+    throw new RangeError("'offset' is out of bounds")
+  }
+
+  if (length === undefined) {
+    length = maxLength
+  } else {
+    length >>>= 0
+
+    if (length > maxLength) {
+      throw new RangeError("'length' is out of bounds")
+    }
+  }
+
+  return isModern
+    ? Buffer.from(obj.slice(byteOffset, byteOffset + length))
+    : new Buffer(new Uint8Array(obj.slice(byteOffset, byteOffset + length)))
+}
+
+function fromString (string, encoding) {
+  if (typeof encoding !== 'string' || encoding === '') {
+    encoding = 'utf8'
+  }
+
+  if (!Buffer.isEncoding(encoding)) {
+    throw new TypeError('"encoding" must be a valid string encoding')
+  }
+
+  return isModern
+    ? Buffer.from(string, encoding)
+    : new Buffer(string, encoding)
+}
+
+function bufferFrom (value, encodingOrOffset, length) {
+  if (typeof value === 'number') {
+    throw new TypeError('"value" argument must not be a number')
+  }
+
+  if (isArrayBuffer(value)) {
+    return fromArrayBuffer(value, encodingOrOffset, length)
+  }
+
+  if (typeof value === 'string') {
+    return fromString(value, encodingOrOffset)
+  }
+
+  return isModern
+    ? Buffer.from(value)
+    : new Buffer(value)
+}
+
+module.exports = bufferFrom

+ 52 - 0
node_modules/buffer-from/package.json

@@ -0,0 +1,52 @@
+{
+  "_from": "buffer-from@^1.1.1",
+  "_id": "buffer-from@1.1.1",
+  "_inBundle": false,
+  "_integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==",
+  "_location": "/buffer-from",
+  "_phantomChildren": {},
+  "_requested": {
+    "type": "range",
+    "registry": true,
+    "raw": "buffer-from@^1.1.1",
+    "name": "buffer-from",
+    "escapedName": "buffer-from",
+    "rawSpec": "^1.1.1",
+    "saveSpec": null,
+    "fetchSpec": "^1.1.1"
+  },
+  "_requiredBy": [
+    "/qrcode"
+  ],
+  "_resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz",
+  "_shasum": "32713bc028f75c02fdb710d7c7bcec1f2c6070ef",
+  "_spec": "buffer-from@^1.1.1",
+  "_where": "E:\\顾家\\gujia\\node_modules\\qrcode",
+  "bugs": {
+    "url": "https://github.com/LinusU/buffer-from/issues"
+  },
+  "bundleDependencies": false,
+  "deprecated": false,
+  "description": "A [ponyfill](https://ponyfill.com) for `Buffer.from`, uses native implementation if available.",
+  "devDependencies": {
+    "standard": "^7.1.2"
+  },
+  "files": [
+    "index.js"
+  ],
+  "homepage": "https://github.com/LinusU/buffer-from#readme",
+  "keywords": [
+    "buffer",
+    "buffer from"
+  ],
+  "license": "MIT",
+  "name": "buffer-from",
+  "repository": {
+    "type": "git",
+    "url": "git+https://github.com/LinusU/buffer-from.git"
+  },
+  "scripts": {
+    "test": "standard && node test"
+  },
+  "version": "1.1.1"
+}

+ 69 - 0
node_modules/buffer-from/readme.md

@@ -0,0 +1,69 @@
+# Buffer From
+
+A [ponyfill](https://ponyfill.com) for `Buffer.from`, uses native implementation if available.
+
+## Installation
+
+```sh
+npm install --save buffer-from
+```
+
+## Usage
+
+```js
+const bufferFrom = require('buffer-from')
+
+console.log(bufferFrom([1, 2, 3, 4]))
+//=> <Buffer 01 02 03 04>
+
+const arr = new Uint8Array([1, 2, 3, 4])
+console.log(bufferFrom(arr.buffer, 1, 2))
+//=> <Buffer 02 03>
+
+console.log(bufferFrom('test', 'utf8'))
+//=> <Buffer 74 65 73 74>
+
+const buf = bufferFrom('test')
+console.log(bufferFrom(buf))
+//=> <Buffer 74 65 73 74>
+```
+
+## API
+
+### bufferFrom(array)
+
+- `array` &lt;Array&gt;
+
+Allocates a new `Buffer` using an `array` of octets.
+
+### bufferFrom(arrayBuffer[, byteOffset[, length]])
+
+- `arrayBuffer` &lt;ArrayBuffer&gt; The `.buffer` property of a TypedArray or ArrayBuffer
+- `byteOffset` &lt;Integer&gt; Where to start copying from `arrayBuffer`. **Default:** `0`
+- `length` &lt;Integer&gt; How many bytes to copy from `arrayBuffer`. **Default:** `arrayBuffer.length - byteOffset`
+
+When passed a reference to the `.buffer` property of a TypedArray instance, the
+newly created `Buffer` will share the same allocated memory as the TypedArray.
+
+The optional `byteOffset` and `length` arguments specify a memory range within
+the `arrayBuffer` that will be shared by the `Buffer`.
+
+### bufferFrom(buffer)
+
+- `buffer` &lt;Buffer&gt; An existing `Buffer` to copy data from
+
+Copies the passed `buffer` data onto a new `Buffer` instance.
+
+### bufferFrom(string[, encoding])
+
+- `string` &lt;String&gt; A string to encode.
+- `encoding` &lt;String&gt; The encoding of `string`. **Default:** `'utf8'`
+
+Creates a new `Buffer` containing the given JavaScript string `string`. If
+provided, the `encoding` parameter identifies the character encoding of
+`string`.
+
+## See also
+
+- [buffer-alloc](https://github.com/LinusU/buffer-alloc) A ponyfill for `Buffer.alloc`
+- [buffer-alloc-unsafe](https://github.com/LinusU/buffer-alloc-unsafe) A ponyfill for `Buffer.allocUnsafe`

+ 62 - 0
node_modules/buffer/AUTHORS.md

@@ -0,0 +1,62 @@
+# Authors
+
+#### Ordered by first contribution.
+
+- Romain Beauxis (toots@rastageeks.org)
+- Tobias Koppers (tobias.koppers@googlemail.com)
+- Janus (ysangkok@gmail.com)
+- Rainer Dreyer (rdrey1@gmail.com)
+- Tõnis Tiigi (tonistiigi@gmail.com)
+- James Halliday (mail@substack.net)
+- Michael Williamson (mike@zwobble.org)
+- elliottcable (github@elliottcable.name)
+- rafael (rvalle@livelens.net)
+- Andrew Kelley (superjoe30@gmail.com)
+- Andreas Madsen (amwebdk@gmail.com)
+- Mike Brevoort (mike.brevoort@pearson.com)
+- Brian White (mscdex@mscdex.net)
+- Feross Aboukhadijeh (feross@feross.org)
+- Ruben Verborgh (ruben@verborgh.org)
+- eliang (eliang.cs@gmail.com)
+- Jesse Tane (jesse.tane@gmail.com)
+- Alfonso Boza (alfonso@cloud.com)
+- Mathias Buus (mathiasbuus@gmail.com)
+- Devon Govett (devongovett@gmail.com)
+- Daniel Cousens (github@dcousens.com)
+- Joseph Dykstra (josephdykstra@gmail.com)
+- Parsha Pourkhomami (parshap+git@gmail.com)
+- Damjan Košir (damjan.kosir@gmail.com)
+- daverayment (dave.rayment@gmail.com)
+- kawanet (u-suke@kawa.net)
+- Linus Unnebäck (linus@folkdatorn.se)
+- Nolan Lawson (nolan.lawson@gmail.com)
+- Calvin Metcalf (calvin.metcalf@gmail.com)
+- Koki Takahashi (hakatasiloving@gmail.com)
+- Guy Bedford (guybedford@gmail.com)
+- Jan Schär (jscissr@gmail.com)
+- RaulTsc (tomescu.raul@gmail.com)
+- Matthieu Monsch (monsch@alum.mit.edu)
+- Dan Ehrenberg (littledan@chromium.org)
+- Kirill Fomichev (fanatid@ya.ru)
+- Yusuke Kawasaki (u-suke@kawa.net)
+- DC (dcposch@dcpos.ch)
+- John-David Dalton (john.david.dalton@gmail.com)
+- adventure-yunfei (adventure030@gmail.com)
+- Emil Bay (github@tixz.dk)
+- Sam Sudar (sudar.sam@gmail.com)
+- Volker Mische (volker.mische@gmail.com)
+- David Walton (support@geekstocks.com)
+- Сковорода Никита Андреевич (chalkerx@gmail.com)
+- greenkeeper[bot] (greenkeeper[bot]@users.noreply.github.com)
+- ukstv (sergey.ukustov@machinomy.com)
+- Renée Kooi (renee@kooi.me)
+- ranbochen (ranbochen@qq.com)
+- Vladimir Borovik (bobahbdb@gmail.com)
+- greenkeeper[bot] (23040076+greenkeeper[bot]@users.noreply.github.com)
+- kumavis (aaron@kumavis.me)
+- Sergey Ukustov (sergey.ukustov@machinomy.com)
+- Fei Liu (liu.feiwood@gmail.com)
+- Blaine Bublitz (blaine.bublitz@gmail.com)
+- Niklas Mischkulnig (mischnic@users.noreply.github.com)
+
+#### Generated by bin/update-authors.sh.

+ 21 - 0
node_modules/buffer/LICENSE

@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Feross Aboukhadijeh, and other contributors.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.

+ 416 - 0
node_modules/buffer/README.md

@@ -0,0 +1,416 @@
+# buffer [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url]
+
+[travis-image]: https://img.shields.io/travis/feross/buffer/master.svg
+[travis-url]: https://travis-ci.org/feross/buffer
+[npm-image]: https://img.shields.io/npm/v/buffer.svg
+[npm-url]: https://npmjs.org/package/buffer
+[downloads-image]: https://img.shields.io/npm/dm/buffer.svg
+[downloads-url]: https://npmjs.org/package/buffer
+[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg
+[standard-url]: https://standardjs.com
+
+#### The buffer module from [node.js](https://nodejs.org/), for the browser.
+
+[![saucelabs][saucelabs-image]][saucelabs-url]
+
+[saucelabs-image]: https://saucelabs.com/browser-matrix/buffer.svg
+[saucelabs-url]: https://saucelabs.com/u/buffer
+
+With [browserify](http://browserify.org), simply `require('buffer')` or use the `Buffer` global and you will get this module.
+
+The goal is to provide an API that is 100% identical to
+[node's Buffer API](https://nodejs.org/api/buffer.html). Read the
+[official docs](https://nodejs.org/api/buffer.html) for the full list of properties,
+instance methods, and class methods that are supported.
+
+## features
+
+- Manipulate binary data like a boss, in all browsers!
+- Super fast. Backed by Typed Arrays (`Uint8Array`/`ArrayBuffer`, not `Object`)
+- Extremely small bundle size (**6.75KB minified + gzipped**, 51.9KB with comments)
+- Excellent browser support (Chrome, Firefox, Edge, Safari 9+, IE 11, iOS 9+, Android, etc.)
+- Preserves Node API exactly, with one minor difference (see below)
+- Square-bracket `buf[4]` notation works!
+- Does not modify any browser prototypes or put anything on `window`
+- Comprehensive test suite (including all buffer tests from node.js core)
+
+## `buffer` for enterprise
+
+Available as part of the Tidelift Subscription.
+
+The maintainers of `buffer` and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-buffer?utm_source=npm-buffer&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)
+
+## install
+
+To use this module directly (without browserify), install it:
+
+```bash
+npm install buffer
+```
+
+This module was previously called **native-buffer-browserify**, but please use **buffer**
+from now on.
+
+If you do not use a bundler, you can use the [standalone script](https://bundle.run/buffer).
+
+## usage
+
+The module's API is identical to node's `Buffer` API. Read the
+[official docs](https://nodejs.org/api/buffer.html) for the full list of properties,
+instance methods, and class methods that are supported.
+
+As mentioned above, `require('buffer')` or use the `Buffer` global with
+[browserify](http://browserify.org) and this module will automatically be included
+in your bundle. Almost any npm module will work in the browser, even if it assumes that
+the node `Buffer` API will be available.
+
+To depend on this module explicitly (without browserify), require it like this:
+
+```js
+var Buffer = require('buffer/').Buffer  // note: the trailing slash is important!
+```
+
+To require this module explicitly, use `require('buffer/')` which tells the node.js module
+lookup algorithm (also used by browserify) to use the **npm module** named `buffer`
+instead of the **node.js core** module named `buffer`!
+
+
+## how does it work?
+
+The Buffer constructor returns instances of `Uint8Array` that have their prototype
+changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of `Uint8Array`,
+so the returned instances will have all the node `Buffer` methods and the
+`Uint8Array` methods. Square bracket notation works as expected -- it returns a
+single octet.
+
+The `Uint8Array` prototype remains unmodified.
+
+
+## tracking the latest node api
+
+This module tracks the Buffer API in the latest (unstable) version of node.js. The Buffer
+API is considered **stable** in the
+[node stability index](https://nodejs.org/docs/latest/api/documentation.html#documentation_stability_index),
+so it is unlikely that there will ever be breaking changes.
+Nonetheless, when/if the Buffer API changes in node, this module's API will change
+accordingly.
+
+## related packages
+
+- [`buffer-reverse`](https://www.npmjs.com/package/buffer-reverse) - Reverse a buffer
+- [`buffer-xor`](https://www.npmjs.com/package/buffer-xor) - Bitwise xor a buffer
+- [`is-buffer`](https://www.npmjs.com/package/is-buffer) - Determine if an object is a Buffer without including the whole `Buffer` package
+
+## conversion packages
+
+### convert typed array to buffer
+
+Use [`typedarray-to-buffer`](https://www.npmjs.com/package/typedarray-to-buffer) to convert any kind of typed array to a `Buffer`. Does not perform a copy, so it's super fast.
+
+### convert buffer to typed array
+
+`Buffer` is a subclass of `Uint8Array` (which is a typed array). So there is no need to explicitly convert to typed array. Just use the buffer as a `Uint8Array`.
+
+### convert blob to buffer
+
+Use [`blob-to-buffer`](https://www.npmjs.com/package/blob-to-buffer) to convert a `Blob` to a `Buffer`.
+
+### convert buffer to blob
+
+To convert a `Buffer` to a `Blob`, use the `Blob` constructor:
+
+```js
+var blob = new Blob([ buffer ])
+```
+
+Optionally, specify a mimetype:
+
+```js
+var blob = new Blob([ buffer ], { type: 'text/html' })
+```
+
+### convert arraybuffer to buffer
+
+To convert an `ArrayBuffer` to a `Buffer`, use the `Buffer.from` function. Does not perform a copy, so it's super fast.
+
+```js
+var buffer = Buffer.from(arrayBuffer)
+```
+
+### convert buffer to arraybuffer
+
+To convert a `Buffer` to an `ArrayBuffer`, use the `.buffer` property (which is present on all `Uint8Array` objects):
+
+```js
+var arrayBuffer = buffer.buffer.slice(
+  buffer.byteOffset, buffer.byteOffset + buffer.byteLength
+)
+```
+
+Alternatively, use the [`to-arraybuffer`](https://www.npmjs.com/package/to-arraybuffer) module.
+
+## performance
+
+See perf tests in `/perf`.
+
+`BrowserBuffer` is the browser `buffer` module (this repo). `Uint8Array` is included as a
+sanity check (since `BrowserBuffer` uses `Uint8Array` under the hood, `Uint8Array` will
+always be at least a bit faster). Finally, `NodeBuffer` is the node.js buffer module,
+which is included to compare against.
+
+NOTE: Performance has improved since these benchmarks were taken. PR welcome to update the README.
+
+### Chrome 38
+
+| Method | Operations | Accuracy | Sampled | Fastest |
+|:-------|:-----------|:---------|:--------|:-------:|
+| BrowserBuffer#bracket-notation | 11,457,464 ops/sec | ±0.86% | 66 | ✓ |
+| Uint8Array#bracket-notation | 10,824,332 ops/sec | ±0.74% | 65 | |
+| | | | |
+| BrowserBuffer#concat | 450,532 ops/sec | ±0.76% | 68 | |
+| Uint8Array#concat | 1,368,911 ops/sec | ±1.50% | 62 | ✓ |
+| | | | |
+| BrowserBuffer#copy(16000) | 903,001 ops/sec | ±0.96% | 67 | |
+| Uint8Array#copy(16000) | 1,422,441 ops/sec | ±1.04% | 66 | ✓ |
+| | | | |
+| BrowserBuffer#copy(16) | 11,431,358 ops/sec | ±0.46% | 69 | |
+| Uint8Array#copy(16) | 13,944,163 ops/sec | ±1.12% | 68 | ✓ |
+| | | | |
+| BrowserBuffer#new(16000) | 106,329 ops/sec | ±6.70% | 44 | |
+| Uint8Array#new(16000) | 131,001 ops/sec | ±2.85% | 31 | ✓ |
+| | | | |
+| BrowserBuffer#new(16) | 1,554,491 ops/sec | ±1.60% | 65 | |
+| Uint8Array#new(16) | 6,623,930 ops/sec | ±1.66% | 65 | ✓ |
+| | | | |
+| BrowserBuffer#readDoubleBE | 112,830 ops/sec | ±0.51% | 69 | ✓ |
+| DataView#getFloat64 | 93,500 ops/sec | ±0.57% | 68 | |
+| | | | |
+| BrowserBuffer#readFloatBE | 146,678 ops/sec | ±0.95% | 68 | ✓ |
+| DataView#getFloat32 | 99,311 ops/sec | ±0.41% | 67 | |
+| | | | |
+| BrowserBuffer#readUInt32LE | 843,214 ops/sec | ±0.70% | 69 | ✓ |
+| DataView#getUint32 | 103,024 ops/sec | ±0.64% | 67 | |
+| | | | |
+| BrowserBuffer#slice | 1,013,941 ops/sec | ±0.75% | 67 | |
+| Uint8Array#subarray | 1,903,928 ops/sec | ±0.53% | 67 | ✓ |
+| | | | |
+| BrowserBuffer#writeFloatBE | 61,387 ops/sec | ±0.90% | 67 | |
+| DataView#setFloat32 | 141,249 ops/sec | ±0.40% | 66 | ✓ |
+
+
+### Firefox 33
+
+| Method | Operations | Accuracy | Sampled | Fastest |
+|:-------|:-----------|:---------|:--------|:-------:|
+| BrowserBuffer#bracket-notation | 20,800,421 ops/sec | ±1.84% | 60 | |
+| Uint8Array#bracket-notation | 20,826,235 ops/sec | ±2.02% | 61 | ✓ |
+| | | | |
+| BrowserBuffer#concat | 153,076 ops/sec | ±2.32% | 61 | |
+| Uint8Array#concat | 1,255,674 ops/sec | ±8.65% | 52 | ✓ |
+| | | | |
+| BrowserBuffer#copy(16000) | 1,105,312 ops/sec | ±1.16% | 63 | |
+| Uint8Array#copy(16000) | 1,615,911 ops/sec | ±0.55% | 66 | ✓ |
+| | | | |
+| BrowserBuffer#copy(16) | 16,357,599 ops/sec | ±0.73% | 68 | |
+| Uint8Array#copy(16) | 31,436,281 ops/sec | ±1.05% | 68 | ✓ |
+| | | | |
+| BrowserBuffer#new(16000) | 52,995 ops/sec | ±6.01% | 35 | |
+| Uint8Array#new(16000) | 87,686 ops/sec | ±5.68% | 45 | ✓ |
+| | | | |
+| BrowserBuffer#new(16) | 252,031 ops/sec | ±1.61% | 66 | |
+| Uint8Array#new(16) | 8,477,026 ops/sec | ±0.49% | 68 | ✓ |
+| | | | |
+| BrowserBuffer#readDoubleBE | 99,871 ops/sec | ±0.41% | 69 | |
+| DataView#getFloat64 | 285,663 ops/sec | ±0.70% | 68 | ✓ |
+| | | | |
+| BrowserBuffer#readFloatBE | 115,540 ops/sec | ±0.42% | 69 | |
+| DataView#getFloat32 | 288,722 ops/sec | ±0.82% | 68 | ✓ |
+| | | | |
+| BrowserBuffer#readUInt32LE | 633,926 ops/sec | ±1.08% | 67 | ✓ |
+| DataView#getUint32 | 294,808 ops/sec | ±0.79% | 64 | |
+| | | | |
+| BrowserBuffer#slice | 349,425 ops/sec | ±0.46% | 69 | |
+| Uint8Array#subarray | 5,965,819 ops/sec | ±0.60% | 65 | ✓ |
+| | | | |
+| BrowserBuffer#writeFloatBE | 59,980 ops/sec | ±0.41% | 67 | |
+| DataView#setFloat32 | 317,634 ops/sec | ±0.63% | 68 | ✓ |
+
+### Safari 8
+
+| Method | Operations | Accuracy | Sampled | Fastest |
+|:-------|:-----------|:---------|:--------|:-------:|
+| BrowserBuffer#bracket-notation | 10,279,729 ops/sec | ±2.25% | 56 | ✓ |
+| Uint8Array#bracket-notation | 10,030,767 ops/sec | ±2.23% | 59 | |
+| | | | |
+| BrowserBuffer#concat | 144,138 ops/sec | ±1.38% | 65 | |
+| Uint8Array#concat | 4,950,764 ops/sec | ±1.70% | 63 | ✓ |
+| | | | |
+| BrowserBuffer#copy(16000) | 1,058,548 ops/sec | ±1.51% | 64 | |
+| Uint8Array#copy(16000) | 1,409,666 ops/sec | ±1.17% | 65 | ✓ |
+| | | | |
+| BrowserBuffer#copy(16) | 6,282,529 ops/sec | ±1.88% | 58 | |
+| Uint8Array#copy(16) | 11,907,128 ops/sec | ±2.87% | 58 | ✓ |
+| | | | |
+| BrowserBuffer#new(16000) | 101,663 ops/sec | ±3.89% | 57 | |
+| Uint8Array#new(16000) | 22,050,818 ops/sec | ±6.51% | 46 | ✓ |
+| | | | |
+| BrowserBuffer#new(16) | 176,072 ops/sec | ±2.13% | 64 | |
+| Uint8Array#new(16) | 24,385,731 ops/sec | ±5.01% | 51 | ✓ |
+| | | | |
+| BrowserBuffer#readDoubleBE | 41,341 ops/sec | ±1.06% | 67 | |
+| DataView#getFloat64 | 322,280 ops/sec | ±0.84% | 68 | ✓ |
+| | | | |
+| BrowserBuffer#readFloatBE | 46,141 ops/sec | ±1.06% | 65 | |
+| DataView#getFloat32 | 337,025 ops/sec | ±0.43% | 69 | ✓ |
+| | | | |
+| BrowserBuffer#readUInt32LE | 151,551 ops/sec | ±1.02% | 66 | |
+| DataView#getUint32 | 308,278 ops/sec | ±0.94% | 67 | ✓ |
+| | | | |
+| BrowserBuffer#slice | 197,365 ops/sec | ±0.95% | 66 | |
+| Uint8Array#subarray | 9,558,024 ops/sec | ±3.08% | 58 | ✓ |
+| | | | |
+| BrowserBuffer#writeFloatBE | 17,518 ops/sec | ±1.03% | 63 | |
+| DataView#setFloat32 | 319,751 ops/sec | ±0.48% | 68 | ✓ |
+
+
+### Node 0.11.14
+
+| Method | Operations | Accuracy | Sampled | Fastest |
+|:-------|:-----------|:---------|:--------|:-------:|
+| BrowserBuffer#bracket-notation | 10,489,828 ops/sec | ±3.25% | 90 | |
+| Uint8Array#bracket-notation | 10,534,884 ops/sec | ±0.81% | 92 | ✓ |
+| NodeBuffer#bracket-notation | 10,389,910 ops/sec | ±0.97% | 87 | |
+| | | | |
+| BrowserBuffer#concat | 487,830 ops/sec | ±2.58% | 88 | |
+| Uint8Array#concat | 1,814,327 ops/sec | ±1.28% | 88 | ✓ |
+| NodeBuffer#concat | 1,636,523 ops/sec | ±1.88% | 73 | |
+| | | | |
+| BrowserBuffer#copy(16000) | 1,073,665 ops/sec | ±0.77% | 90 | |
+| Uint8Array#copy(16000) | 1,348,517 ops/sec | ±0.84% | 89 | ✓ |
+| NodeBuffer#copy(16000) | 1,289,533 ops/sec | ±0.82% | 93 | |
+| | | | |
+| BrowserBuffer#copy(16) | 12,782,706 ops/sec | ±0.74% | 85 | |
+| Uint8Array#copy(16) | 14,180,427 ops/sec | ±0.93% | 92 | ✓ |
+| NodeBuffer#copy(16) | 11,083,134 ops/sec | ±1.06% | 89 | |
+| | | | |
+| BrowserBuffer#new(16000) | 141,678 ops/sec | ±3.30% | 67 | |
+| Uint8Array#new(16000) | 161,491 ops/sec | ±2.96% | 60 | |
+| NodeBuffer#new(16000) | 292,699 ops/sec | ±3.20% | 55 | ✓ |
+| | | | |
+| BrowserBuffer#new(16) | 1,655,466 ops/sec | ±2.41% | 82 | |
+| Uint8Array#new(16) | 14,399,926 ops/sec | ±0.91% | 94 | ✓ |
+| NodeBuffer#new(16) | 3,894,696 ops/sec | ±0.88% | 92 | |
+| | | | |
+| BrowserBuffer#readDoubleBE | 109,582 ops/sec | ±0.75% | 93 | ✓ |
+| DataView#getFloat64 | 91,235 ops/sec | ±0.81% | 90 | |
+| NodeBuffer#readDoubleBE | 88,593 ops/sec | ±0.96% | 81 | |
+| | | | |
+| BrowserBuffer#readFloatBE | 139,854 ops/sec | ±1.03% | 85 | ✓ |
+| DataView#getFloat32 | 98,744 ops/sec | ±0.80% | 89 | |
+| NodeBuffer#readFloatBE | 92,769 ops/sec | ±0.94% | 93 | |
+| | | | |
+| BrowserBuffer#readUInt32LE | 710,861 ops/sec | ±0.82% | 92 | |
+| DataView#getUint32 | 117,893 ops/sec | ±0.84% | 91 | |
+| NodeBuffer#readUInt32LE | 851,412 ops/sec | ±0.72% | 93 | ✓ |
+| | | | |
+| BrowserBuffer#slice | 1,673,877 ops/sec | ±0.73% | 94 | |
+| Uint8Array#subarray | 6,919,243 ops/sec | ±0.67% | 90 | ✓ |
+| NodeBuffer#slice | 4,617,604 ops/sec | ±0.79% | 93 | |
+| | | | |
+| BrowserBuffer#writeFloatBE | 66,011 ops/sec | ±0.75% | 93 | |
+| DataView#setFloat32 | 127,760 ops/sec | ±0.72% | 93 | ✓ |
+| NodeBuffer#writeFloatBE | 103,352 ops/sec | ±0.83% | 93 | |
+
+### iojs 1.8.1
+
+| Method | Operations | Accuracy | Sampled | Fastest |
+|:-------|:-----------|:---------|:--------|:-------:|
+| BrowserBuffer#bracket-notation | 10,990,488 ops/sec | ±1.11% | 91 | |
+| Uint8Array#bracket-notation | 11,268,757 ops/sec | ±0.65% | 97 | |
+| NodeBuffer#bracket-notation | 11,353,260 ops/sec | ±0.83% | 94 | ✓ |
+| | | | |
+| BrowserBuffer#concat | 378,954 ops/sec | ±0.74% | 94 | |
+| Uint8Array#concat | 1,358,288 ops/sec | ±0.97% | 87 | |
+| NodeBuffer#concat | 1,934,050 ops/sec | ±1.11% | 78 | ✓ |
+| | | | |
+| BrowserBuffer#copy(16000) | 894,538 ops/sec | ±0.56% | 84 | |
+| Uint8Array#copy(16000) | 1,442,656 ops/sec | ±0.71% | 96 | |
+| NodeBuffer#copy(16000) | 1,457,898 ops/sec | ±0.53% | 92 | ✓ |
+| | | | |
+| BrowserBuffer#copy(16) | 12,870,457 ops/sec | ±0.67% | 95 | |
+| Uint8Array#copy(16) | 16,643,989 ops/sec | ±0.61% | 93 | ✓ |
+| NodeBuffer#copy(16) | 14,885,848 ops/sec | ±0.74% | 94 | |
+| | | | |
+| BrowserBuffer#new(16000) | 109,264 ops/sec | ±4.21% | 63 | |
+| Uint8Array#new(16000) | 138,916 ops/sec | ±1.87% | 61 | |
+| NodeBuffer#new(16000) | 281,449 ops/sec | ±3.58% | 51 | ✓ |
+| | | | |
+| BrowserBuffer#new(16) | 1,362,935 ops/sec | ±0.56% | 99 | |
+| Uint8Array#new(16) | 6,193,090 ops/sec | ±0.64% | 95 | ✓ |
+| NodeBuffer#new(16) | 4,745,425 ops/sec | ±1.56% | 90 | |
+| | | | |
+| BrowserBuffer#readDoubleBE | 118,127 ops/sec | ±0.59% | 93 | ✓ |
+| DataView#getFloat64 | 107,332 ops/sec | ±0.65% | 91 | |
+| NodeBuffer#readDoubleBE | 116,274 ops/sec | ±0.94% | 95 | |
+| | | | |
+| BrowserBuffer#readFloatBE | 150,326 ops/sec | ±0.58% | 95 | ✓ |
+| DataView#getFloat32 | 110,541 ops/sec | ±0.57% | 98 | |
+| NodeBuffer#readFloatBE | 121,599 ops/sec | ±0.60% | 87 | |
+| | | | |
+| BrowserBuffer#readUInt32LE | 814,147 ops/sec | ±0.62% | 93 | |
+| DataView#getUint32 | 137,592 ops/sec | ±0.64% | 90 | |
+| NodeBuffer#readUInt32LE | 931,650 ops/sec | ±0.71% | 96 | ✓ |
+| | | | |
+| BrowserBuffer#slice | 878,590 ops/sec | ±0.68% | 93 | |
+| Uint8Array#subarray | 2,843,308 ops/sec | ±1.02% | 90 | |
+| NodeBuffer#slice | 4,998,316 ops/sec | ±0.68% | 90 | ✓ |
+| | | | |
+| BrowserBuffer#writeFloatBE | 65,927 ops/sec | ±0.74% | 93 | |
+| DataView#setFloat32 | 139,823 ops/sec | ±0.97% | 89 | ✓ |
+| NodeBuffer#writeFloatBE | 135,763 ops/sec | ±0.65% | 96 | |
+| | | | |
+
+## Testing the project
+
+First, install the project:
+
+    npm install
+
+Then, to run tests in Node.js, run:
+
+    npm run test-node
+
+To test locally in a browser, you can run:
+
+    npm run test-browser-es5-local # For ES5 browsers that don't support ES6
+    npm run test-browser-es6-local # For ES6 compliant browsers
+
+This will print out a URL that you can then open in a browser to run the tests, using [airtap](https://www.npmjs.com/package/airtap).
+
+To run automated browser tests using Saucelabs, ensure that your `SAUCE_USERNAME` and `SAUCE_ACCESS_KEY` environment variables are set, then run:
+
+    npm test
+
+This is what's run in Travis, to check against various browsers. The list of browsers is kept in the `bin/airtap-es5.yml` and `bin/airtap-es6.yml` files.
+
+## JavaScript Standard Style
+
+This module uses [JavaScript Standard Style](https://github.com/feross/standard).
+
+[![JavaScript Style Guide](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard)
+
+To test that the code conforms to the style, `npm install` and run:
+
+    ./node_modules/.bin/standard
+
+## credit
+
+This was originally forked from [buffer-browserify](https://github.com/toots/buffer-browserify).
+
+## Security Policies and Procedures
+
+The `buffer` team and community take all security bugs in `buffer` seriously. Please see our [security policies and procedures](https://github.com/feross/security) document to learn how to report issues.
+
+## license
+
+MIT. Copyright (C) [Feross Aboukhadijeh](http://feross.org), and other contributors. Originally forked from an MIT-licensed module by Romain Beauxis.

+ 186 - 0
node_modules/buffer/index.d.ts

@@ -0,0 +1,186 @@
+export class Buffer extends Uint8Array {
+    length: number
+    write(string: string, offset?: number, length?: number, encoding?: string): number;
+    toString(encoding?: string, start?: number, end?: number): string;
+    toJSON(): { type: 'Buffer', data: any[] };
+    equals(otherBuffer: Buffer): boolean;
+    compare(otherBuffer: Buffer, targetStart?: number, targetEnd?: number, sourceStart?: number, sourceEnd?: number): number;
+    copy(targetBuffer: Buffer, targetStart?: number, sourceStart?: number, sourceEnd?: number): number;
+    slice(start?: number, end?: number): Buffer;
+    writeUIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number;
+    writeUIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number;
+    writeIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number;
+    writeIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number;
+    readUIntLE(offset: number, byteLength: number, noAssert?: boolean): number;
+    readUIntBE(offset: number, byteLength: number, noAssert?: boolean): number;
+    readIntLE(offset: number, byteLength: number, noAssert?: boolean): number;
+    readIntBE(offset: number, byteLength: number, noAssert?: boolean): number;
+    readUInt8(offset: number, noAssert?: boolean): number;
+    readUInt16LE(offset: number, noAssert?: boolean): number;
+    readUInt16BE(offset: number, noAssert?: boolean): number;
+    readUInt32LE(offset: number, noAssert?: boolean): number;
+    readUInt32BE(offset: number, noAssert?: boolean): number;
+    readInt8(offset: number, noAssert?: boolean): number;
+    readInt16LE(offset: number, noAssert?: boolean): number;
+    readInt16BE(offset: number, noAssert?: boolean): number;
+    readInt32LE(offset: number, noAssert?: boolean): number;
+    readInt32BE(offset: number, noAssert?: boolean): number;
+    readFloatLE(offset: number, noAssert?: boolean): number;
+    readFloatBE(offset: number, noAssert?: boolean): number;
+    readDoubleLE(offset: number, noAssert?: boolean): number;
+    readDoubleBE(offset: number, noAssert?: boolean): number;
+    reverse(): this;
+    swap16(): Buffer;
+    swap32(): Buffer;
+    swap64(): Buffer;
+    writeUInt8(value: number, offset: number, noAssert?: boolean): number;
+    writeUInt16LE(value: number, offset: number, noAssert?: boolean): number;
+    writeUInt16BE(value: number, offset: number, noAssert?: boolean): number;
+    writeUInt32LE(value: number, offset: number, noAssert?: boolean): number;
+    writeUInt32BE(value: number, offset: number, noAssert?: boolean): number;
+    writeInt8(value: number, offset: number, noAssert?: boolean): number;
+    writeInt16LE(value: number, offset: number, noAssert?: boolean): number;
+    writeInt16BE(value: number, offset: number, noAssert?: boolean): number;
+    writeInt32LE(value: number, offset: number, noAssert?: boolean): number;
+    writeInt32BE(value: number, offset: number, noAssert?: boolean): number;
+    writeFloatLE(value: number, offset: number, noAssert?: boolean): number;
+    writeFloatBE(value: number, offset: number, noAssert?: boolean): number;
+    writeDoubleLE(value: number, offset: number, noAssert?: boolean): number;
+    writeDoubleBE(value: number, offset: number, noAssert?: boolean): number;
+    fill(value: any, offset?: number, end?: number): this;
+    indexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number;
+    lastIndexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number;
+    includes(value: string | number | Buffer, byteOffset?: number, encoding?: string): boolean;
+
+    /**
+     * Allocates a new buffer containing the given {str}.
+     *
+     * @param str String to store in buffer.
+     * @param encoding encoding to use, optional.  Default is 'utf8'
+     */
+    constructor (str: string, encoding?: string);
+    /**
+     * Allocates a new buffer of {size} octets.
+     *
+     * @param size count of octets to allocate.
+     */
+    constructor (size: number);
+    /**
+     * Allocates a new buffer containing the given {array} of octets.
+     *
+     * @param array The octets to store.
+     */
+    constructor (array: Uint8Array);
+    /**
+     * Produces a Buffer backed by the same allocated memory as
+     * the given {ArrayBuffer}.
+     *
+     *
+     * @param arrayBuffer The ArrayBuffer with which to share memory.
+     */
+    constructor (arrayBuffer: ArrayBuffer);
+    /**
+     * Allocates a new buffer containing the given {array} of octets.
+     *
+     * @param array The octets to store.
+     */
+    constructor (array: any[]);
+    /**
+     * Copies the passed {buffer} data onto a new {Buffer} instance.
+     *
+     * @param buffer The buffer to copy.
+     */
+    constructor (buffer: Buffer);
+    prototype: Buffer;
+    /**
+     * Allocates a new Buffer using an {array} of octets.
+     *
+     * @param array
+     */
+    static from(array: any[]): Buffer;
+    /**
+     * When passed a reference to the .buffer property of a TypedArray instance,
+     * the newly created Buffer will share the same allocated memory as the TypedArray.
+     * The optional {byteOffset} and {length} arguments specify a memory range
+     * within the {arrayBuffer} that will be shared by the Buffer.
+     *
+     * @param arrayBuffer The .buffer property of a TypedArray or a new ArrayBuffer()
+     * @param byteOffset
+     * @param length
+     */
+    static from(arrayBuffer: ArrayBuffer, byteOffset?: number, length?: number): Buffer;
+    /**
+     * Copies the passed {buffer} data onto a new Buffer instance.
+     *
+     * @param buffer
+     */
+    static from(buffer: Buffer | Uint8Array): Buffer;
+    /**
+     * Creates a new Buffer containing the given JavaScript string {str}.
+     * If provided, the {encoding} parameter identifies the character encoding.
+     * If not provided, {encoding} defaults to 'utf8'.
+     *
+     * @param str
+     */
+    static from(str: string, encoding?: string): Buffer;
+    /**
+     * Returns true if {obj} is a Buffer
+     *
+     * @param obj object to test.
+     */
+    static isBuffer(obj: any): obj is Buffer;
+    /**
+     * Returns true if {encoding} is a valid encoding argument.
+     * Valid string encodings in Node 0.12: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex'
+     *
+     * @param encoding string to test.
+     */
+    static isEncoding(encoding: string): boolean;
+    /**
+     * Gives the actual byte length of a string. encoding defaults to 'utf8'.
+     * This is not the same as String.prototype.length since that returns the number of characters in a string.
+     *
+     * @param string string to test.
+     * @param encoding encoding used to evaluate (defaults to 'utf8')
+     */
+    static byteLength(string: string, encoding?: string): number;
+    /**
+     * Returns a buffer which is the result of concatenating all the buffers in the list together.
+     *
+     * If the list has no items, or if the totalLength is 0, then it returns a zero-length buffer.
+     * If the list has exactly one item, then the first item of the list is returned.
+     * If the list has more than one item, then a new Buffer is created.
+     *
+     * @param list An array of Buffer objects to concatenate
+     * @param totalLength Total length of the buffers when concatenated.
+     *   If totalLength is not provided, it is read from the buffers in the list. However, this adds an additional loop to the function, so it is faster to provide the length explicitly.
+     */
+    static concat(list: Buffer[], totalLength?: number): Buffer;
+    /**
+     * The same as buf1.compare(buf2).
+     */
+    static compare(buf1: Buffer, buf2: Buffer): number;
+    /**
+     * Allocates a new buffer of {size} octets.
+     *
+     * @param size count of octets to allocate.
+     * @param fill if specified, buffer will be initialized by calling buf.fill(fill).
+     *    If parameter is omitted, buffer will be filled with zeros.
+     * @param encoding encoding used for call to buf.fill while initalizing
+     */
+    static alloc(size: number, fill?: string | Buffer | number, encoding?: string): Buffer;
+    /**
+     * Allocates a new buffer of {size} octets, leaving memory not initialized, so the contents
+     * of the newly created Buffer are unknown and may contain sensitive data.
+     *
+     * @param size count of octets to allocate
+     */
+    static allocUnsafe(size: number): Buffer;
+    /**
+     * Allocates a new non-pooled buffer of {size} octets, leaving memory not initialized, so the contents
+     * of the newly created Buffer are unknown and may contain sensitive data.
+     *
+     * @param size count of octets to allocate
+     */
+    static allocUnsafeSlow(size: number): Buffer;
+}

+ 1794 - 0
node_modules/buffer/index.js

@@ -0,0 +1,1794 @@
+/*!
+ * The buffer module from node.js, for the browser.
+ *
+ * @author   Feross Aboukhadijeh <https://feross.org>
+ * @license  MIT
+ */
+/* eslint-disable no-proto */
+
+'use strict'
+
+var base64 = require('base64-js')
+var ieee754 = require('ieee754')
+var customInspectSymbol =
+  (typeof Symbol === 'function' && typeof Symbol.for === 'function')
+    ? Symbol.for('nodejs.util.inspect.custom')
+    : null
+
+exports.Buffer = Buffer
+exports.SlowBuffer = SlowBuffer
+exports.INSPECT_MAX_BYTES = 50
+
+var K_MAX_LENGTH = 0x7fffffff
+exports.kMaxLength = K_MAX_LENGTH
+
+/**
+ * If `Buffer.TYPED_ARRAY_SUPPORT`:
+ *   === true    Use Uint8Array implementation (fastest)
+ *   === false   Print warning and recommend using `buffer` v4.x which has an Object
+ *               implementation (most compatible, even IE6)
+ *
+ * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,
+ * Opera 11.6+, iOS 4.2+.
+ *
+ * We report that the browser does not support typed arrays if the are not subclassable
+ * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`
+ * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support
+ * for __proto__ and has a buggy typed array implementation.
+ */
+Buffer.TYPED_ARRAY_SUPPORT = typedArraySupport()
+
+if (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&
+    typeof console.error === 'function') {
+  console.error(
+    'This browser lacks typed array (Uint8Array) support which is required by ' +
+    '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'
+  )
+}
+
+function typedArraySupport () {
+  // Can typed array instances can be augmented?
+  try {
+    var arr = new Uint8Array(1)
+    var proto = { foo: function () { return 42 } }
+    Object.setPrototypeOf(proto, Uint8Array.prototype)
+    Object.setPrototypeOf(arr, proto)
+    return arr.foo() === 42
+  } catch (e) {
+    return false
+  }
+}
+
+Object.defineProperty(Buffer.prototype, 'parent', {
+  enumerable: true,
+  get: function () {
+    if (!Buffer.isBuffer(this)) return undefined
+    return this.buffer
+  }
+})
+
+Object.defineProperty(Buffer.prototype, 'offset', {
+  enumerable: true,
+  get: function () {
+    if (!Buffer.isBuffer(this)) return undefined
+    return this.byteOffset
+  }
+})
+
+function createBuffer (length) {
+  if (length > K_MAX_LENGTH) {
+    throw new RangeError('The value "' + length + '" is invalid for option "size"')
+  }
+  // Return an augmented `Uint8Array` instance
+  var buf = new Uint8Array(length)
+  Object.setPrototypeOf(buf, Buffer.prototype)
+  return buf
+}
+
+/**
+ * The Buffer constructor returns instances of `Uint8Array` that have their
+ * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of
+ * `Uint8Array`, so the returned instances will have all the node `Buffer` methods
+ * and the `Uint8Array` methods. Square bracket notation works as expected -- it
+ * returns a single octet.
+ *
+ * The `Uint8Array` prototype remains unmodified.
+ */
+
+function Buffer (arg, encodingOrOffset, length) {
+  // Common case.
+  if (typeof arg === 'number') {
+    if (typeof encodingOrOffset === 'string') {
+      throw new TypeError(
+        'The "string" argument must be of type string. Received type number'
+      )
+    }
+    return allocUnsafe(arg)
+  }
+  return from(arg, encodingOrOffset, length)
+}
+
+Buffer.poolSize = 8192 // not used by this implementation
+
+function from (value, encodingOrOffset, length) {
+  if (typeof value === 'string') {
+    return fromString(value, encodingOrOffset)
+  }
+
+  if (ArrayBuffer.isView(value)) {
+    return fromArrayLike(value)
+  }
+
+  if (value == null) {
+    throw new TypeError(
+      'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +
+      'or Array-like Object. Received type ' + (typeof value)
+    )
+  }
+
+  if (isInstance(value, ArrayBuffer) ||
+      (value && isInstance(value.buffer, ArrayBuffer))) {
+    return fromArrayBuffer(value, encodingOrOffset, length)
+  }
+
+  if (typeof SharedArrayBuffer !== 'undefined' &&
+      (isInstance(value, SharedArrayBuffer) ||
+      (value && isInstance(value.buffer, SharedArrayBuffer)))) {
+    return fromArrayBuffer(value, encodingOrOffset, length)
+  }
+
+  if (typeof value === 'number') {
+    throw new TypeError(
+      'The "value" argument must not be of type number. Received type number'
+    )
+  }
+
+  var valueOf = value.valueOf && value.valueOf()
+  if (valueOf != null && valueOf !== value) {
+    return Buffer.from(valueOf, encodingOrOffset, length)
+  }
+
+  var b = fromObject(value)
+  if (b) return b
+
+  if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&
+      typeof value[Symbol.toPrimitive] === 'function') {
+    return Buffer.from(
+      value[Symbol.toPrimitive]('string'), encodingOrOffset, length
+    )
+  }
+
+  throw new TypeError(
+    'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +
+    'or Array-like Object. Received type ' + (typeof value)
+  )
+}
+
+/**
+ * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError
+ * if value is a number.
+ * Buffer.from(str[, encoding])
+ * Buffer.from(array)
+ * Buffer.from(buffer)
+ * Buffer.from(arrayBuffer[, byteOffset[, length]])
+ **/
+Buffer.from = function (value, encodingOrOffset, length) {
+  return from(value, encodingOrOffset, length)
+}
+
+// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:
+// https://github.com/feross/buffer/pull/148
+Object.setPrototypeOf(Buffer.prototype, Uint8Array.prototype)
+Object.setPrototypeOf(Buffer, Uint8Array)
+
+function assertSize (size) {
+  if (typeof size !== 'number') {
+    throw new TypeError('"size" argument must be of type number')
+  } else if (size < 0) {
+    throw new RangeError('The value "' + size + '" is invalid for option "size"')
+  }
+}
+
+function alloc (size, fill, encoding) {
+  assertSize(size)
+  if (size <= 0) {
+    return createBuffer(size)
+  }
+  if (fill !== undefined) {
+    // Only pay attention to encoding if it's a string. This
+    // prevents accidentally sending in a number that would
+    // be interpretted as a start offset.
+    return typeof encoding === 'string'
+      ? createBuffer(size).fill(fill, encoding)
+      : createBuffer(size).fill(fill)
+  }
+  return createBuffer(size)
+}
+
+/**
+ * Creates a new filled Buffer instance.
+ * alloc(size[, fill[, encoding]])
+ **/
+Buffer.alloc = function (size, fill, encoding) {
+  return alloc(size, fill, encoding)
+}
+
+function allocUnsafe (size) {
+  assertSize(size)
+  return createBuffer(size < 0 ? 0 : checked(size) | 0)
+}
+
+/**
+ * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.
+ * */
+Buffer.allocUnsafe = function (size) {
+  return allocUnsafe(size)
+}
+/**
+ * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
+ */
+Buffer.allocUnsafeSlow = function (size) {
+  return allocUnsafe(size)
+}
+
+function fromString (string, encoding) {
+  if (typeof encoding !== 'string' || encoding === '') {
+    encoding = 'utf8'
+  }
+
+  if (!Buffer.isEncoding(encoding)) {
+    throw new TypeError('Unknown encoding: ' + encoding)
+  }
+
+  var length = byteLength(string, encoding) | 0
+  var buf = createBuffer(length)
+
+  var actual = buf.write(string, encoding)
+
+  if (actual !== length) {
+    // Writing a hex string, for example, that contains invalid characters will
+    // cause everything after the first invalid character to be ignored. (e.g.
+    // 'abxxcd' will be treated as 'ab')
+    buf = buf.slice(0, actual)
+  }
+
+  return buf
+}
+
+function fromArrayLike (array) {
+  var length = array.length < 0 ? 0 : checked(array.length) | 0
+  var buf = createBuffer(length)
+  for (var i = 0; i < length; i += 1) {
+    buf[i] = array[i] & 255
+  }
+  return buf
+}
+
+function fromArrayBuffer (array, byteOffset, length) {
+  if (byteOffset < 0 || array.byteLength < byteOffset) {
+    throw new RangeError('"offset" is outside of buffer bounds')
+  }
+
+  if (array.byteLength < byteOffset + (length || 0)) {
+    throw new RangeError('"length" is outside of buffer bounds')
+  }
+
+  var buf
+  if (byteOffset === undefined && length === undefined) {
+    buf = new Uint8Array(array)
+  } else if (length === undefined) {
+    buf = new Uint8Array(array, byteOffset)
+  } else {
+    buf = new Uint8Array(array, byteOffset, length)
+  }
+
+  // Return an augmented `Uint8Array` instance
+  Object.setPrototypeOf(buf, Buffer.prototype)
+
+  return buf
+}
+
+function fromObject (obj) {
+  if (Buffer.isBuffer(obj)) {
+    var len = checked(obj.length) | 0
+    var buf = createBuffer(len)
+
+    if (buf.length === 0) {
+      return buf
+    }
+
+    obj.copy(buf, 0, 0, len)
+    return buf
+  }
+
+  if (obj.length !== undefined) {
+    if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {
+      return createBuffer(0)
+    }
+    return fromArrayLike(obj)
+  }
+
+  if (obj.type === 'Buffer' && Array.isArray(obj.data)) {
+    return fromArrayLike(obj.data)
+  }
+}
+
+function checked (length) {
+  // Note: cannot use `length < K_MAX_LENGTH` here because that fails when
+  // length is NaN (which is otherwise coerced to zero.)
+  if (length >= K_MAX_LENGTH) {
+    throw new RangeError('Attempt to allocate Buffer larger than maximum ' +
+                         'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')
+  }
+  return length | 0
+}
+
+function SlowBuffer (length) {
+  if (+length != length) { // eslint-disable-line eqeqeq
+    length = 0
+  }
+  return Buffer.alloc(+length)
+}
+
+Buffer.isBuffer = function isBuffer (b) {
+  return b != null && b._isBuffer === true &&
+    b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false
+}
+
+Buffer.compare = function compare (a, b) {
+  if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength)
+  if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength)
+  if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {
+    throw new TypeError(
+      'The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array'
+    )
+  }
+
+  if (a === b) return 0
+
+  var x = a.length
+  var y = b.length
+
+  for (var i = 0, len = Math.min(x, y); i < len; ++i) {
+    if (a[i] !== b[i]) {
+      x = a[i]
+      y = b[i]
+      break
+    }
+  }
+
+  if (x < y) return -1
+  if (y < x) return 1
+  return 0
+}
+
+Buffer.isEncoding = function isEncoding (encoding) {
+  switch (String(encoding).toLowerCase()) {
+    case 'hex':
+    case 'utf8':
+    case 'utf-8':
+    case 'ascii':
+    case 'latin1':
+    case 'binary':
+    case 'base64':
+    case 'ucs2':
+    case 'ucs-2':
+    case 'utf16le':
+    case 'utf-16le':
+      return true
+    default:
+      return false
+  }
+}
+
+Buffer.concat = function concat (list, length) {
+  if (!Array.isArray(list)) {
+    throw new TypeError('"list" argument must be an Array of Buffers')
+  }
+
+  if (list.length === 0) {
+    return Buffer.alloc(0)
+  }
+
+  var i
+  if (length === undefined) {
+    length = 0
+    for (i = 0; i < list.length; ++i) {
+      length += list[i].length
+    }
+  }
+
+  var buffer = Buffer.allocUnsafe(length)
+  var pos = 0
+  for (i = 0; i < list.length; ++i) {
+    var buf = list[i]
+    if (isInstance(buf, Uint8Array)) {
+      buf = Buffer.from(buf)
+    }
+    if (!Buffer.isBuffer(buf)) {
+      throw new TypeError('"list" argument must be an Array of Buffers')
+    }
+    buf.copy(buffer, pos)
+    pos += buf.length
+  }
+  return buffer
+}
+
+function byteLength (string, encoding) {
+  if (Buffer.isBuffer(string)) {
+    return string.length
+  }
+  if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {
+    return string.byteLength
+  }
+  if (typeof string !== 'string') {
+    throw new TypeError(
+      'The "string" argument must be one of type string, Buffer, or ArrayBuffer. ' +
+      'Received type ' + typeof string
+    )
+  }
+
+  var len = string.length
+  var mustMatch = (arguments.length > 2 && arguments[2] === true)
+  if (!mustMatch && len === 0) return 0
+
+  // Use a for loop to avoid recursion
+  var loweredCase = false
+  for (;;) {
+    switch (encoding) {
+      case 'ascii':
+      case 'latin1':
+      case 'binary':
+        return len
+      case 'utf8':
+      case 'utf-8':
+        return utf8ToBytes(string).length
+      case 'ucs2':
+      case 'ucs-2':
+      case 'utf16le':
+      case 'utf-16le':
+        return len * 2
+      case 'hex':
+        return len >>> 1
+      case 'base64':
+        return base64ToBytes(string).length
+      default:
+        if (loweredCase) {
+          return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8
+        }
+        encoding = ('' + encoding).toLowerCase()
+        loweredCase = true
+    }
+  }
+}
+Buffer.byteLength = byteLength
+
+function slowToString (encoding, start, end) {
+  var loweredCase = false
+
+  // No need to verify that "this.length <= MAX_UINT32" since it's a read-only
+  // property of a typed array.
+
+  // This behaves neither like String nor Uint8Array in that we set start/end
+  // to their upper/lower bounds if the value passed is out of range.
+  // undefined is handled specially as per ECMA-262 6th Edition,
+  // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.
+  if (start === undefined || start < 0) {
+    start = 0
+  }
+  // Return early if start > this.length. Done here to prevent potential uint32
+  // coercion fail below.
+  if (start > this.length) {
+    return ''
+  }
+
+  if (end === undefined || end > this.length) {
+    end = this.length
+  }
+
+  if (end <= 0) {
+    return ''
+  }
+
+  // Force coersion to uint32. This will also coerce falsey/NaN values to 0.
+  end >>>= 0
+  start >>>= 0
+
+  if (end <= start) {
+    return ''
+  }
+
+  if (!encoding) encoding = 'utf8'
+
+  while (true) {
+    switch (encoding) {
+      case 'hex':
+        return hexSlice(this, start, end)
+
+      case 'utf8':
+      case 'utf-8':
+        return utf8Slice(this, start, end)
+
+      case 'ascii':
+        return asciiSlice(this, start, end)
+
+      case 'latin1':
+      case 'binary':
+        return latin1Slice(this, start, end)
+
+      case 'base64':
+        return base64Slice(this, start, end)
+
+      case 'ucs2':
+      case 'ucs-2':
+      case 'utf16le':
+      case 'utf-16le':
+        return utf16leSlice(this, start, end)
+
+      default:
+        if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
+        encoding = (encoding + '').toLowerCase()
+        loweredCase = true
+    }
+  }
+}
+
+// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)
+// to detect a Buffer instance. It's not possible to use `instanceof Buffer`
+// reliably in a browserify context because there could be multiple different
+// copies of the 'buffer' package in use. This method works even for Buffer
+// instances that were created from another copy of the `buffer` package.
+// See: https://github.com/feross/buffer/issues/154
+Buffer.prototype._isBuffer = true
+
+function swap (b, n, m) {
+  var i = b[n]
+  b[n] = b[m]
+  b[m] = i
+}
+
+Buffer.prototype.swap16 = function swap16 () {
+  var len = this.length
+  if (len % 2 !== 0) {
+    throw new RangeError('Buffer size must be a multiple of 16-bits')
+  }
+  for (var i = 0; i < len; i += 2) {
+    swap(this, i, i + 1)
+  }
+  return this
+}
+
+Buffer.prototype.swap32 = function swap32 () {
+  var len = this.length
+  if (len % 4 !== 0) {
+    throw new RangeError('Buffer size must be a multiple of 32-bits')
+  }
+  for (var i = 0; i < len; i += 4) {
+    swap(this, i, i + 3)
+    swap(this, i + 1, i + 2)
+  }
+  return this
+}
+
+Buffer.prototype.swap64 = function swap64 () {
+  var len = this.length
+  if (len % 8 !== 0) {
+    throw new RangeError('Buffer size must be a multiple of 64-bits')
+  }
+  for (var i = 0; i < len; i += 8) {
+    swap(this, i, i + 7)
+    swap(this, i + 1, i + 6)
+    swap(this, i + 2, i + 5)
+    swap(this, i + 3, i + 4)
+  }
+  return this
+}
+
+Buffer.prototype.toString = function toString () {
+  var length = this.length
+  if (length === 0) return ''
+  if (arguments.length === 0) return utf8Slice(this, 0, length)
+  return slowToString.apply(this, arguments)
+}
+
+Buffer.prototype.toLocaleString = Buffer.prototype.toString
+
+Buffer.prototype.equals = function equals (b) {
+  if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')
+  if (this === b) return true
+  return Buffer.compare(this, b) === 0
+}
+
+Buffer.prototype.inspect = function inspect () {
+  var str = ''
+  var max = exports.INSPECT_MAX_BYTES
+  str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim()
+  if (this.length > max) str += ' ... '
+  return '<Buffer ' + str + '>'
+}
+if (customInspectSymbol) {
+  Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect
+}
+
+Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {
+  if (isInstance(target, Uint8Array)) {
+    target = Buffer.from(target, target.offset, target.byteLength)
+  }
+  if (!Buffer.isBuffer(target)) {
+    throw new TypeError(
+      'The "target" argument must be one of type Buffer or Uint8Array. ' +
+      'Received type ' + (typeof target)
+    )
+  }
+
+  if (start === undefined) {
+    start = 0
+  }
+  if (end === undefined) {
+    end = target ? target.length : 0
+  }
+  if (thisStart === undefined) {
+    thisStart = 0
+  }
+  if (thisEnd === undefined) {
+    thisEnd = this.length
+  }
+
+  if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {
+    throw new RangeError('out of range index')
+  }
+
+  if (thisStart >= thisEnd && start >= end) {
+    return 0
+  }
+  if (thisStart >= thisEnd) {
+    return -1
+  }
+  if (start >= end) {
+    return 1
+  }
+
+  start >>>= 0
+  end >>>= 0
+  thisStart >>>= 0
+  thisEnd >>>= 0
+
+  if (this === target) return 0
+
+  var x = thisEnd - thisStart
+  var y = end - start
+  var len = Math.min(x, y)
+
+  var thisCopy = this.slice(thisStart, thisEnd)
+  var targetCopy = target.slice(start, end)
+
+  for (var i = 0; i < len; ++i) {
+    if (thisCopy[i] !== targetCopy[i]) {
+      x = thisCopy[i]
+      y = targetCopy[i]
+      break
+    }
+  }
+
+  if (x < y) return -1
+  if (y < x) return 1
+  return 0
+}
+
+// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,
+// OR the last index of `val` in `buffer` at offset <= `byteOffset`.
+//
+// Arguments:
+// - buffer - a Buffer to search
+// - val - a string, Buffer, or number
+// - byteOffset - an index into `buffer`; will be clamped to an int32
+// - encoding - an optional encoding, relevant is val is a string
+// - dir - true for indexOf, false for lastIndexOf
+function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {
+  // Empty buffer means no match
+  if (buffer.length === 0) return -1
+
+  // Normalize byteOffset
+  if (typeof byteOffset === 'string') {
+    encoding = byteOffset
+    byteOffset = 0
+  } else if (byteOffset > 0x7fffffff) {
+    byteOffset = 0x7fffffff
+  } else if (byteOffset < -0x80000000) {
+    byteOffset = -0x80000000
+  }
+  byteOffset = +byteOffset // Coerce to Number.
+  if (numberIsNaN(byteOffset)) {
+    // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer
+    byteOffset = dir ? 0 : (buffer.length - 1)
+  }
+
+  // Normalize byteOffset: negative offsets start from the end of the buffer
+  if (byteOffset < 0) byteOffset = buffer.length + byteOffset
+  if (byteOffset >= buffer.length) {
+    if (dir) return -1
+    else byteOffset = buffer.length - 1
+  } else if (byteOffset < 0) {
+    if (dir) byteOffset = 0
+    else return -1
+  }
+
+  // Normalize val
+  if (typeof val === 'string') {
+    val = Buffer.from(val, encoding)
+  }
+
+  // Finally, search either indexOf (if dir is true) or lastIndexOf
+  if (Buffer.isBuffer(val)) {
+    // Special case: looking for empty string/buffer always fails
+    if (val.length === 0) {
+      return -1
+    }
+    return arrayIndexOf(buffer, val, byteOffset, encoding, dir)
+  } else if (typeof val === 'number') {
+    val = val & 0xFF // Search for a byte value [0-255]
+    if (typeof Uint8Array.prototype.indexOf === 'function') {
+      if (dir) {
+        return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)
+      } else {
+        return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)
+      }
+    }
+    return arrayIndexOf(buffer, [val], byteOffset, encoding, dir)
+  }
+
+  throw new TypeError('val must be string, number or Buffer')
+}
+
+function arrayIndexOf (arr, val, byteOffset, encoding, dir) {
+  var indexSize = 1
+  var arrLength = arr.length
+  var valLength = val.length
+
+  if (encoding !== undefined) {
+    encoding = String(encoding).toLowerCase()
+    if (encoding === 'ucs2' || encoding === 'ucs-2' ||
+        encoding === 'utf16le' || encoding === 'utf-16le') {
+      if (arr.length < 2 || val.length < 2) {
+        return -1
+      }
+      indexSize = 2
+      arrLength /= 2
+      valLength /= 2
+      byteOffset /= 2
+    }
+  }
+
+  function read (buf, i) {
+    if (indexSize === 1) {
+      return buf[i]
+    } else {
+      return buf.readUInt16BE(i * indexSize)
+    }
+  }
+
+  var i
+  if (dir) {
+    var foundIndex = -1
+    for (i = byteOffset; i < arrLength; i++) {
+      if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {
+        if (foundIndex === -1) foundIndex = i
+        if (i - foundIndex + 1 === valLength) return foundIndex * indexSize
+      } else {
+        if (foundIndex !== -1) i -= i - foundIndex
+        foundIndex = -1
+      }
+    }
+  } else {
+    if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength
+    for (i = byteOffset; i >= 0; i--) {
+      var found = true
+      for (var j = 0; j < valLength; j++) {
+        if (read(arr, i + j) !== read(val, j)) {
+          found = false
+          break
+        }
+      }
+      if (found) return i
+    }
+  }
+
+  return -1
+}
+
+Buffer.prototype.includes = function includes (val, byteOffset, encoding) {
+  return this.indexOf(val, byteOffset, encoding) !== -1
+}
+
+Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {
+  return bidirectionalIndexOf(this, val, byteOffset, encoding, true)
+}
+
+Buffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {
+  return bidirectionalIndexOf(this, val, byteOffset, encoding, false)
+}
+
+function hexWrite (buf, string, offset, length) {
+  offset = Number(offset) || 0
+  var remaining = buf.length - offset
+  if (!length) {
+    length = remaining
+  } else {
+    length = Number(length)
+    if (length > remaining) {
+      length = remaining
+    }
+  }
+
+  var strLen = string.length
+
+  if (length > strLen / 2) {
+    length = strLen / 2
+  }
+  for (var i = 0; i < length; ++i) {
+    var parsed = parseInt(string.substr(i * 2, 2), 16)
+    if (numberIsNaN(parsed)) return i
+    buf[offset + i] = parsed
+  }
+  return i
+}
+
+function utf8Write (buf, string, offset, length) {
+  return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)
+}
+
+function asciiWrite (buf, string, offset, length) {
+  return blitBuffer(asciiToBytes(string), buf, offset, length)
+}
+
+function latin1Write (buf, string, offset, length) {
+  return asciiWrite(buf, string, offset, length)
+}
+
+function base64Write (buf, string, offset, length) {
+  return blitBuffer(base64ToBytes(string), buf, offset, length)
+}
+
+function ucs2Write (buf, string, offset, length) {
+  return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)
+}
+
+Buffer.prototype.write = function write (string, offset, length, encoding) {
+  // Buffer#write(string)
+  if (offset === undefined) {
+    encoding = 'utf8'
+    length = this.length
+    offset = 0
+  // Buffer#write(string, encoding)
+  } else if (length === undefined && typeof offset === 'string') {
+    encoding = offset
+    length = this.length
+    offset = 0
+  // Buffer#write(string, offset[, length][, encoding])
+  } else if (isFinite(offset)) {
+    offset = offset >>> 0
+    if (isFinite(length)) {
+      length = length >>> 0
+      if (encoding === undefined) encoding = 'utf8'
+    } else {
+      encoding = length
+      length = undefined
+    }
+  } else {
+    throw new Error(
+      'Buffer.write(string, encoding, offset[, length]) is no longer supported'
+    )
+  }
+
+  var remaining = this.length - offset
+  if (length === undefined || length > remaining) length = remaining
+
+  if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {
+    throw new RangeError('Attempt to write outside buffer bounds')
+  }
+
+  if (!encoding) encoding = 'utf8'
+
+  var loweredCase = false
+  for (;;) {
+    switch (encoding) {
+      case 'hex':
+        return hexWrite(this, string, offset, length)
+
+      case 'utf8':
+      case 'utf-8':
+        return utf8Write(this, string, offset, length)
+
+      case 'ascii':
+        return asciiWrite(this, string, offset, length)
+
+      case 'latin1':
+      case 'binary':
+        return latin1Write(this, string, offset, length)
+
+      case 'base64':
+        // Warning: maxLength not taken into account in base64Write
+        return base64Write(this, string, offset, length)
+
+      case 'ucs2':
+      case 'ucs-2':
+      case 'utf16le':
+      case 'utf-16le':
+        return ucs2Write(this, string, offset, length)
+
+      default:
+        if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
+        encoding = ('' + encoding).toLowerCase()
+        loweredCase = true
+    }
+  }
+}
+
+Buffer.prototype.toJSON = function toJSON () {
+  return {
+    type: 'Buffer',
+    data: Array.prototype.slice.call(this._arr || this, 0)
+  }
+}
+
+function base64Slice (buf, start, end) {
+  if (start === 0 && end === buf.length) {
+    return base64.fromByteArray(buf)
+  } else {
+    return base64.fromByteArray(buf.slice(start, end))
+  }
+}
+
+function utf8Slice (buf, start, end) {
+  end = Math.min(buf.length, end)
+  var res = []
+
+  var i = start
+  while (i < end) {
+    var firstByte = buf[i]
+    var codePoint = null
+    var bytesPerSequence = (firstByte > 0xEF) ? 4
+      : (firstByte > 0xDF) ? 3
+        : (firstByte > 0xBF) ? 2
+          : 1
+
+    if (i + bytesPerSequence <= end) {
+      var secondByte, thirdByte, fourthByte, tempCodePoint
+
+      switch (bytesPerSequence) {
+        case 1:
+          if (firstByte < 0x80) {
+            codePoint = firstByte
+          }
+          break
+        case 2:
+          secondByte = buf[i + 1]
+          if ((secondByte & 0xC0) === 0x80) {
+            tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)
+            if (tempCodePoint > 0x7F) {
+              codePoint = tempCodePoint
+            }
+          }
+          break
+        case 3:
+          secondByte = buf[i + 1]
+          thirdByte = buf[i + 2]
+          if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {
+            tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)
+            if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {
+              codePoint = tempCodePoint
+            }
+          }
+          break
+        case 4:
+          secondByte = buf[i + 1]
+          thirdByte = buf[i + 2]
+          fourthByte = buf[i + 3]
+          if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {
+            tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)
+            if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {
+              codePoint = tempCodePoint
+            }
+          }
+      }
+    }
+
+    if (codePoint === null) {
+      // we did not generate a valid codePoint so insert a
+      // replacement char (U+FFFD) and advance only 1 byte
+      codePoint = 0xFFFD
+      bytesPerSequence = 1
+    } else if (codePoint > 0xFFFF) {
+      // encode to utf16 (surrogate pair dance)
+      codePoint -= 0x10000
+      res.push(codePoint >>> 10 & 0x3FF | 0xD800)
+      codePoint = 0xDC00 | codePoint & 0x3FF
+    }
+
+    res.push(codePoint)
+    i += bytesPerSequence
+  }
+
+  return decodeCodePointsArray(res)
+}
+
+// Based on http://stackoverflow.com/a/22747272/680742, the browser with
+// the lowest limit is Chrome, with 0x10000 args.
+// We go 1 magnitude less, for safety
+var MAX_ARGUMENTS_LENGTH = 0x1000
+
+function decodeCodePointsArray (codePoints) {
+  var len = codePoints.length
+  if (len <= MAX_ARGUMENTS_LENGTH) {
+    return String.fromCharCode.apply(String, codePoints) // avoid extra slice()
+  }
+
+  // Decode in chunks to avoid "call stack size exceeded".
+  var res = ''
+  var i = 0
+  while (i < len) {
+    res += String.fromCharCode.apply(
+      String,
+      codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)
+    )
+  }
+  return res
+}
+
+function asciiSlice (buf, start, end) {
+  var ret = ''
+  end = Math.min(buf.length, end)
+
+  for (var i = start; i < end; ++i) {
+    ret += String.fromCharCode(buf[i] & 0x7F)
+  }
+  return ret
+}
+
+function latin1Slice (buf, start, end) {
+  var ret = ''
+  end = Math.min(buf.length, end)
+
+  for (var i = start; i < end; ++i) {
+    ret += String.fromCharCode(buf[i])
+  }
+  return ret
+}
+
+function hexSlice (buf, start, end) {
+  var len = buf.length
+
+  if (!start || start < 0) start = 0
+  if (!end || end < 0 || end > len) end = len
+
+  var out = ''
+  for (var i = start; i < end; ++i) {
+    out += hexSliceLookupTable[buf[i]]
+  }
+  return out
+}
+
+function utf16leSlice (buf, start, end) {
+  var bytes = buf.slice(start, end)
+  var res = ''
+  for (var i = 0; i < bytes.length; i += 2) {
+    res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256))
+  }
+  return res
+}
+
+Buffer.prototype.slice = function slice (start, end) {
+  var len = this.length
+  start = ~~start
+  end = end === undefined ? len : ~~end
+
+  if (start < 0) {
+    start += len
+    if (start < 0) start = 0
+  } else if (start > len) {
+    start = len
+  }
+
+  if (end < 0) {
+    end += len
+    if (end < 0) end = 0
+  } else if (end > len) {
+    end = len
+  }
+
+  if (end < start) end = start
+
+  var newBuf = this.subarray(start, end)
+  // Return an augmented `Uint8Array` instance
+  Object.setPrototypeOf(newBuf, Buffer.prototype)
+
+  return newBuf
+}
+
+/*
+ * Need to make sure that buffer isn't trying to write out of bounds.
+ */
+function checkOffset (offset, ext, length) {
+  if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')
+  if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')
+}
+
+Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {
+  offset = offset >>> 0
+  byteLength = byteLength >>> 0
+  if (!noAssert) checkOffset(offset, byteLength, this.length)
+
+  var val = this[offset]
+  var mul = 1
+  var i = 0
+  while (++i < byteLength && (mul *= 0x100)) {
+    val += this[offset + i] * mul
+  }
+
+  return val
+}
+
+Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {
+  offset = offset >>> 0
+  byteLength = byteLength >>> 0
+  if (!noAssert) {
+    checkOffset(offset, byteLength, this.length)
+  }
+
+  var val = this[offset + --byteLength]
+  var mul = 1
+  while (byteLength > 0 && (mul *= 0x100)) {
+    val += this[offset + --byteLength] * mul
+  }
+
+  return val
+}
+
+Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {
+  offset = offset >>> 0
+  if (!noAssert) checkOffset(offset, 1, this.length)
+  return this[offset]
+}
+
+Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {
+  offset = offset >>> 0
+  if (!noAssert) checkOffset(offset, 2, this.length)
+  return this[offset] | (this[offset + 1] << 8)
+}
+
+Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {
+  offset = offset >>> 0
+  if (!noAssert) checkOffset(offset, 2, this.length)
+  return (this[offset] << 8) | this[offset + 1]
+}
+
+Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {
+  offset = offset >>> 0
+  if (!noAssert) checkOffset(offset, 4, this.length)
+
+  return ((this[offset]) |
+      (this[offset + 1] << 8) |
+      (this[offset + 2] << 16)) +
+      (this[offset + 3] * 0x1000000)
+}
+
+Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {
+  offset = offset >>> 0
+  if (!noAssert) checkOffset(offset, 4, this.length)
+
+  return (this[offset] * 0x1000000) +
+    ((this[offset + 1] << 16) |
+    (this[offset + 2] << 8) |
+    this[offset + 3])
+}
+
+Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {
+  offset = offset >>> 0
+  byteLength = byteLength >>> 0
+  if (!noAssert) checkOffset(offset, byteLength, this.length)
+
+  var val = this[offset]
+  var mul = 1
+  var i = 0
+  while (++i < byteLength && (mul *= 0x100)) {
+    val += this[offset + i] * mul
+  }
+  mul *= 0x80
+
+  if (val >= mul) val -= Math.pow(2, 8 * byteLength)
+
+  return val
+}
+
+Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {
+  offset = offset >>> 0
+  byteLength = byteLength >>> 0
+  if (!noAssert) checkOffset(offset, byteLength, this.length)
+
+  var i = byteLength
+  var mul = 1
+  var val = this[offset + --i]
+  while (i > 0 && (mul *= 0x100)) {
+    val += this[offset + --i] * mul
+  }
+  mul *= 0x80
+
+  if (val >= mul) val -= Math.pow(2, 8 * byteLength)
+
+  return val
+}
+
+Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) {
+  offset = offset >>> 0
+  if (!noAssert) checkOffset(offset, 1, this.length)
+  if (!(this[offset] & 0x80)) return (this[offset])
+  return ((0xff - this[offset] + 1) * -1)
+}
+
+Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {
+  offset = offset >>> 0
+  if (!noAssert) checkOffset(offset, 2, this.length)
+  var val = this[offset] | (this[offset + 1] << 8)
+  return (val & 0x8000) ? val | 0xFFFF0000 : val
+}
+
+Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {
+  offset = offset >>> 0
+  if (!noAssert) checkOffset(offset, 2, this.length)
+  var val = this[offset + 1] | (this[offset] << 8)
+  return (val & 0x8000) ? val | 0xFFFF0000 : val
+}
+
+Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {
+  offset = offset >>> 0
+  if (!noAssert) checkOffset(offset, 4, this.length)
+
+  return (this[offset]) |
+    (this[offset + 1] << 8) |
+    (this[offset + 2] << 16) |
+    (this[offset + 3] << 24)
+}
+
+Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {
+  offset = offset >>> 0
+  if (!noAssert) checkOffset(offset, 4, this.length)
+
+  return (this[offset] << 24) |
+    (this[offset + 1] << 16) |
+    (this[offset + 2] << 8) |
+    (this[offset + 3])
+}
+
+Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {
+  offset = offset >>> 0
+  if (!noAssert) checkOffset(offset, 4, this.length)
+  return ieee754.read(this, offset, true, 23, 4)
+}
+
+Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {
+  offset = offset >>> 0
+  if (!noAssert) checkOffset(offset, 4, this.length)
+  return ieee754.read(this, offset, false, 23, 4)
+}
+
+Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {
+  offset = offset >>> 0
+  if (!noAssert) checkOffset(offset, 8, this.length)
+  return ieee754.read(this, offset, true, 52, 8)
+}
+
+Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {
+  offset = offset >>> 0
+  if (!noAssert) checkOffset(offset, 8, this.length)
+  return ieee754.read(this, offset, false, 52, 8)
+}
+
+function checkInt (buf, value, offset, ext, max, min) {
+  if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance')
+  if (value > max || value < min) throw new RangeError('"value" argument is out of bounds')
+  if (offset + ext > buf.length) throw new RangeError('Index out of range')
+}
+
+Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {
+  value = +value
+  offset = offset >>> 0
+  byteLength = byteLength >>> 0
+  if (!noAssert) {
+    var maxBytes = Math.pow(2, 8 * byteLength) - 1
+    checkInt(this, value, offset, byteLength, maxBytes, 0)
+  }
+
+  var mul = 1
+  var i = 0
+  this[offset] = value & 0xFF
+  while (++i < byteLength && (mul *= 0x100)) {
+    this[offset + i] = (value / mul) & 0xFF
+  }
+
+  return offset + byteLength
+}
+
+Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {
+  value = +value
+  offset = offset >>> 0
+  byteLength = byteLength >>> 0
+  if (!noAssert) {
+    var maxBytes = Math.pow(2, 8 * byteLength) - 1
+    checkInt(this, value, offset, byteLength, maxBytes, 0)
+  }
+
+  var i = byteLength - 1
+  var mul = 1
+  this[offset + i] = value & 0xFF
+  while (--i >= 0 && (mul *= 0x100)) {
+    this[offset + i] = (value / mul) & 0xFF
+  }
+
+  return offset + byteLength
+}
+
+Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {
+  value = +value
+  offset = offset >>> 0
+  if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)
+  this[offset] = (value & 0xff)
+  return offset + 1
+}
+
+Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {
+  value = +value
+  offset = offset >>> 0
+  if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)
+  this[offset] = (value & 0xff)
+  this[offset + 1] = (value >>> 8)
+  return offset + 2
+}
+
+Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {
+  value = +value
+  offset = offset >>> 0
+  if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)
+  this[offset] = (value >>> 8)
+  this[offset + 1] = (value & 0xff)
+  return offset + 2
+}
+
+Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {
+  value = +value
+  offset = offset >>> 0
+  if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)
+  this[offset + 3] = (value >>> 24)
+  this[offset + 2] = (value >>> 16)
+  this[offset + 1] = (value >>> 8)
+  this[offset] = (value & 0xff)
+  return offset + 4
+}
+
+Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {
+  value = +value
+  offset = offset >>> 0
+  if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)
+  this[offset] = (value >>> 24)
+  this[offset + 1] = (value >>> 16)
+  this[offset + 2] = (value >>> 8)
+  this[offset + 3] = (value & 0xff)
+  return offset + 4
+}
+
+Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {
+  value = +value
+  offset = offset >>> 0
+  if (!noAssert) {
+    var limit = Math.pow(2, (8 * byteLength) - 1)
+
+    checkInt(this, value, offset, byteLength, limit - 1, -limit)
+  }
+
+  var i = 0
+  var mul = 1
+  var sub = 0
+  this[offset] = value & 0xFF
+  while (++i < byteLength && (mul *= 0x100)) {
+    if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {
+      sub = 1
+    }
+    this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
+  }
+
+  return offset + byteLength
+}
+
+Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {
+  value = +value
+  offset = offset >>> 0
+  if (!noAssert) {
+    var limit = Math.pow(2, (8 * byteLength) - 1)
+
+    checkInt(this, value, offset, byteLength, limit - 1, -limit)
+  }
+
+  var i = byteLength - 1
+  var mul = 1
+  var sub = 0
+  this[offset + i] = value & 0xFF
+  while (--i >= 0 && (mul *= 0x100)) {
+    if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {
+      sub = 1
+    }
+    this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
+  }
+
+  return offset + byteLength
+}
+
+Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {
+  value = +value
+  offset = offset >>> 0
+  if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)
+  if (value < 0) value = 0xff + value + 1
+  this[offset] = (value & 0xff)
+  return offset + 1
+}
+
+Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {
+  value = +value
+  offset = offset >>> 0
+  if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)
+  this[offset] = (value & 0xff)
+  this[offset + 1] = (value >>> 8)
+  return offset + 2
+}
+
+Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {
+  value = +value
+  offset = offset >>> 0
+  if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)
+  this[offset] = (value >>> 8)
+  this[offset + 1] = (value & 0xff)
+  return offset + 2
+}
+
+Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {
+  value = +value
+  offset = offset >>> 0
+  if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
+  this[offset] = (value & 0xff)
+  this[offset + 1] = (value >>> 8)
+  this[offset + 2] = (value >>> 16)
+  this[offset + 3] = (value >>> 24)
+  return offset + 4
+}
+
+Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {
+  value = +value
+  offset = offset >>> 0
+  if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
+  if (value < 0) value = 0xffffffff + value + 1
+  this[offset] = (value >>> 24)
+  this[offset + 1] = (value >>> 16)
+  this[offset + 2] = (value >>> 8)
+  this[offset + 3] = (value & 0xff)
+  return offset + 4
+}
+
+function checkIEEE754 (buf, value, offset, ext, max, min) {
+  if (offset + ext > buf.length) throw new RangeError('Index out of range')
+  if (offset < 0) throw new RangeError('Index out of range')
+}
+
+function writeFloat (buf, value, offset, littleEndian, noAssert) {
+  value = +value
+  offset = offset >>> 0
+  if (!noAssert) {
+    checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)
+  }
+  ieee754.write(buf, value, offset, littleEndian, 23, 4)
+  return offset + 4
+}
+
+Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {
+  return writeFloat(this, value, offset, true, noAssert)
+}
+
+Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {
+  return writeFloat(this, value, offset, false, noAssert)
+}
+
+function writeDouble (buf, value, offset, littleEndian, noAssert) {
+  value = +value
+  offset = offset >>> 0
+  if (!noAssert) {
+    checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)
+  }
+  ieee754.write(buf, value, offset, littleEndian, 52, 8)
+  return offset + 8
+}
+
+Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {
+  return writeDouble(this, value, offset, true, noAssert)
+}
+
+Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {
+  return writeDouble(this, value, offset, false, noAssert)
+}
+
+// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)
+Buffer.prototype.copy = function copy (target, targetStart, start, end) {
+  if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')
+  if (!start) start = 0
+  if (!end && end !== 0) end = this.length
+  if (targetStart >= target.length) targetStart = target.length
+  if (!targetStart) targetStart = 0
+  if (end > 0 && end < start) end = start
+
+  // Copy 0 bytes; we're done
+  if (end === start) return 0
+  if (target.length === 0 || this.length === 0) return 0
+
+  // Fatal error conditions
+  if (targetStart < 0) {
+    throw new RangeError('targetStart out of bounds')
+  }
+  if (start < 0 || start >= this.length) throw new RangeError('Index out of range')
+  if (end < 0) throw new RangeError('sourceEnd out of bounds')
+
+  // Are we oob?
+  if (end > this.length) end = this.length
+  if (target.length - targetStart < end - start) {
+    end = target.length - targetStart + start
+  }
+
+  var len = end - start
+
+  if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {
+    // Use built-in when available, missing from IE11
+    this.copyWithin(targetStart, start, end)
+  } else if (this === target && start < targetStart && targetStart < end) {
+    // descending copy from end
+    for (var i = len - 1; i >= 0; --i) {
+      target[i + targetStart] = this[i + start]
+    }
+  } else {
+    Uint8Array.prototype.set.call(
+      target,
+      this.subarray(start, end),
+      targetStart
+    )
+  }
+
+  return len
+}
+
+// Usage:
+//    buffer.fill(number[, offset[, end]])
+//    buffer.fill(buffer[, offset[, end]])
+//    buffer.fill(string[, offset[, end]][, encoding])
+Buffer.prototype.fill = function fill (val, start, end, encoding) {
+  // Handle string cases:
+  if (typeof val === 'string') {
+    if (typeof start === 'string') {
+      encoding = start
+      start = 0
+      end = this.length
+    } else if (typeof end === 'string') {
+      encoding = end
+      end = this.length
+    }
+    if (encoding !== undefined && typeof encoding !== 'string') {
+      throw new TypeError('encoding must be a string')
+    }
+    if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {
+      throw new TypeError('Unknown encoding: ' + encoding)
+    }
+    if (val.length === 1) {
+      var code = val.charCodeAt(0)
+      if ((encoding === 'utf8' && code < 128) ||
+          encoding === 'latin1') {
+        // Fast path: If `val` fits into a single byte, use that numeric value.
+        val = code
+      }
+    }
+  } else if (typeof val === 'number') {
+    val = val & 255
+  } else if (typeof val === 'boolean') {
+    val = Number(val)
+  }
+
+  // Invalid ranges are not set to a default, so can range check early.
+  if (start < 0 || this.length < start || this.length < end) {
+    throw new RangeError('Out of range index')
+  }
+
+  if (end <= start) {
+    return this
+  }
+
+  start = start >>> 0
+  end = end === undefined ? this.length : end >>> 0
+
+  if (!val) val = 0
+
+  var i
+  if (typeof val === 'number') {
+    for (i = start; i < end; ++i) {
+      this[i] = val
+    }
+  } else {
+    var bytes = Buffer.isBuffer(val)
+      ? val
+      : Buffer.from(val, encoding)
+    var len = bytes.length
+    if (len === 0) {
+      throw new TypeError('The value "' + val +
+        '" is invalid for argument "value"')
+    }
+    for (i = 0; i < end - start; ++i) {
+      this[i + start] = bytes[i % len]
+    }
+  }
+
+  return this
+}
+
+// HELPER FUNCTIONS
+// ================
+
+var INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g
+
+function base64clean (str) {
+  // Node takes equal signs as end of the Base64 encoding
+  str = str.split('=')[0]
+  // Node strips out invalid characters like \n and \t from the string, base64-js does not
+  str = str.trim().replace(INVALID_BASE64_RE, '')
+  // Node converts strings with length < 2 to ''
+  if (str.length < 2) return ''
+  // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not
+  while (str.length % 4 !== 0) {
+    str = str + '='
+  }
+  return str
+}
+
+function utf8ToBytes (string, units) {
+  units = units || Infinity
+  var codePoint
+  var length = string.length
+  var leadSurrogate = null
+  var bytes = []
+
+  for (var i = 0; i < length; ++i) {
+    codePoint = string.charCodeAt(i)
+
+    // is surrogate component
+    if (codePoint > 0xD7FF && codePoint < 0xE000) {
+      // last char was a lead
+      if (!leadSurrogate) {
+        // no lead yet
+        if (codePoint > 0xDBFF) {
+          // unexpected trail
+          if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
+          continue
+        } else if (i + 1 === length) {
+          // unpaired lead
+          if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
+          continue
+        }
+
+        // valid lead
+        leadSurrogate = codePoint
+
+        continue
+      }
+
+      // 2 leads in a row
+      if (codePoint < 0xDC00) {
+        if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
+        leadSurrogate = codePoint
+        continue
+      }
+
+      // valid surrogate pair
+      codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000
+    } else if (leadSurrogate) {
+      // valid bmp char, but last char was a lead
+      if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
+    }
+
+    leadSurrogate = null
+
+    // encode utf8
+    if (codePoint < 0x80) {
+      if ((units -= 1) < 0) break
+      bytes.push(codePoint)
+    } else if (codePoint < 0x800) {
+      if ((units -= 2) < 0) break
+      bytes.push(
+        codePoint >> 0x6 | 0xC0,
+        codePoint & 0x3F | 0x80
+      )
+    } else if (codePoint < 0x10000) {
+      if ((units -= 3) < 0) break
+      bytes.push(
+        codePoint >> 0xC | 0xE0,
+        codePoint >> 0x6 & 0x3F | 0x80,
+        codePoint & 0x3F | 0x80
+      )
+    } else if (codePoint < 0x110000) {
+      if ((units -= 4) < 0) break
+      bytes.push(
+        codePoint >> 0x12 | 0xF0,
+        codePoint >> 0xC & 0x3F | 0x80,
+        codePoint >> 0x6 & 0x3F | 0x80,
+        codePoint & 0x3F | 0x80
+      )
+    } else {
+      throw new Error('Invalid code point')
+    }
+  }
+
+  return bytes
+}
+
+function asciiToBytes (str) {
+  var byteArray = []
+  for (var i = 0; i < str.length; ++i) {
+    // Node's code seems to be doing this and not & 0x7F..
+    byteArray.push(str.charCodeAt(i) & 0xFF)
+  }
+  return byteArray
+}
+
+function utf16leToBytes (str, units) {
+  var c, hi, lo
+  var byteArray = []
+  for (var i = 0; i < str.length; ++i) {
+    if ((units -= 2) < 0) break
+
+    c = str.charCodeAt(i)
+    hi = c >> 8
+    lo = c % 256
+    byteArray.push(lo)
+    byteArray.push(hi)
+  }
+
+  return byteArray
+}
+
+function base64ToBytes (str) {
+  return base64.toByteArray(base64clean(str))
+}
+
+function blitBuffer (src, dst, offset, length) {
+  for (var i = 0; i < length; ++i) {
+    if ((i + offset >= dst.length) || (i >= src.length)) break
+    dst[i + offset] = src[i]
+  }
+  return i
+}
+
+// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass
+// the `instanceof` check but they should be treated as of that type.
+// See: https://github.com/feross/buffer/issues/166
+function isInstance (obj, type) {
+  return obj instanceof type ||
+    (obj != null && obj.constructor != null && obj.constructor.name != null &&
+      obj.constructor.name === type.name)
+}
+function numberIsNaN (obj) {
+  // For IE11 support
+  return obj !== obj // eslint-disable-line no-self-compare
+}
+
+// Create lookup table for `toString('hex')`
+// See: https://github.com/feross/buffer/issues/219
+var hexSliceLookupTable = (function () {
+  var alphabet = '0123456789abcdef'
+  var table = new Array(256)
+  for (var i = 0; i < 16; ++i) {
+    var i16 = i * 16
+    for (var j = 0; j < 16; ++j) {
+      table[i16 + j] = alphabet[i] + alphabet[j]
+    }
+  }
+  return table
+})()

+ 113 - 0
node_modules/buffer/package.json

@@ -0,0 +1,113 @@
+{
+  "_from": "buffer@^5.4.3",
+  "_id": "buffer@5.6.0",
+  "_inBundle": false,
+  "_integrity": "sha512-/gDYp/UtU0eA1ys8bOs9J6a+E/KWIY+DZ+Q2WESNUA0jFRsJOc0SNUO6xJ5SGA1xueg3NL65W6s+NY5l9cunuw==",
+  "_location": "/buffer",
+  "_phantomChildren": {},
+  "_requested": {
+    "type": "range",
+    "registry": true,
+    "raw": "buffer@^5.4.3",
+    "name": "buffer",
+    "escapedName": "buffer",
+    "rawSpec": "^5.4.3",
+    "saveSpec": null,
+    "fetchSpec": "^5.4.3"
+  },
+  "_requiredBy": [
+    "/qrcode"
+  ],
+  "_resolved": "https://registry.npmjs.org/buffer/-/buffer-5.6.0.tgz",
+  "_shasum": "a31749dc7d81d84db08abf937b6b8c4033f62786",
+  "_spec": "buffer@^5.4.3",
+  "_where": "E:\\顾家\\gujia\\node_modules\\qrcode",
+  "author": {
+    "name": "Feross Aboukhadijeh",
+    "email": "feross@feross.org",
+    "url": "http://feross.org"
+  },
+  "bugs": {
+    "url": "https://github.com/feross/buffer/issues"
+  },
+  "bundleDependencies": false,
+  "contributors": [
+    {
+      "name": "Romain Beauxis",
+      "email": "toots@rastageeks.org"
+    },
+    {
+      "name": "James Halliday",
+      "email": "mail@substack.net"
+    }
+  ],
+  "dependencies": {
+    "base64-js": "^1.0.2",
+    "ieee754": "^1.1.4"
+  },
+  "deprecated": false,
+  "description": "Node.js Buffer API, for the browser",
+  "devDependencies": {
+    "airtap": "^3.0.0",
+    "benchmark": "^2.0.0",
+    "browserify": "^16.1.0",
+    "concat-stream": "^2.0.0",
+    "hyperquest": "^2.0.0",
+    "is-buffer": "^2.0.0",
+    "is-nan": "^1.0.1",
+    "split": "^1.0.0",
+    "standard": "*",
+    "tape": "^4.0.0",
+    "through2": "^3.0.1",
+    "uglify-js": "^3.4.5"
+  },
+  "homepage": "https://github.com/feross/buffer",
+  "jspm": {
+    "map": {
+      "./index.js": {
+        "node": "@node/buffer"
+      }
+    }
+  },
+  "keywords": [
+    "arraybuffer",
+    "browser",
+    "browserify",
+    "buffer",
+    "compatible",
+    "dataview",
+    "uint8array"
+  ],
+  "license": "MIT",
+  "main": "index.js",
+  "name": "buffer",
+  "repository": {
+    "type": "git",
+    "url": "git://github.com/feross/buffer.git"
+  },
+  "scripts": {
+    "perf": "browserify --debug perf/bracket-notation.js > perf/bundle.js && open perf/index.html",
+    "perf-node": "node perf/bracket-notation.js && node perf/concat.js && node perf/copy-big.js && node perf/copy.js && node perf/new-big.js && node perf/new.js && node perf/readDoubleBE.js && node perf/readFloatBE.js && node perf/readUInt32LE.js && node perf/slice.js && node perf/writeFloatBE.js",
+    "size": "browserify -r ./ | uglifyjs -c -m | gzip | wc -c",
+    "test": "standard && node ./bin/test.js",
+    "test-browser-es5": "airtap -- test/*.js",
+    "test-browser-es5-local": "airtap --local -- test/*.js",
+    "test-browser-es6": "airtap -- test/*.js test/node/*.js",
+    "test-browser-es6-local": "airtap --local -- test/*.js test/node/*.js",
+    "test-node": "tape test/*.js test/node/*.js",
+    "update-authors": "./bin/update-authors.sh"
+  },
+  "standard": {
+    "ignore": [
+      "test/node/**/*.js",
+      "test/common.js",
+      "test/_polyfill.js",
+      "perf/**/*.js"
+    ],
+    "globals": [
+      "SharedArrayBuffer"
+    ]
+  },
+  "types": "index.d.ts",
+  "version": "5.6.0"
+}

+ 63 - 0
node_modules/camelcase/index.d.ts

@@ -0,0 +1,63 @@
+declare namespace camelcase {
+	interface Options {
+		/**
+		Uppercase the first character: `foo-bar` → `FooBar`.
+
+		@default false
+		*/
+		readonly pascalCase?: boolean;
+	}
+}
+
+declare const camelcase: {
+	/**
+	Convert a dash/dot/underscore/space separated string to camelCase or PascalCase: `foo-bar` → `fooBar`.
+
+	@param input - String to convert to camel case.
+
+	@example
+	```
+	import camelCase = require('camelcase');
+
+	camelCase('foo-bar');
+	//=> 'fooBar'
+
+	camelCase('foo_bar');
+	//=> 'fooBar'
+
+	camelCase('Foo-Bar');
+	//=> 'fooBar'
+
+	camelCase('Foo-Bar', {pascalCase: true});
+	//=> 'FooBar'
+
+	camelCase('--foo.bar', {pascalCase: false});
+	//=> 'fooBar'
+
+	camelCase('foo bar');
+	//=> 'fooBar'
+
+	console.log(process.argv[3]);
+	//=> '--foo-bar'
+	camelCase(process.argv[3]);
+	//=> 'fooBar'
+
+	camelCase(['foo', 'bar']);
+	//=> 'fooBar'
+
+	camelCase(['__foo__', '--bar'], {pascalCase: true});
+	//=> 'FooBar'
+	```
+	*/
+	(input: string | ReadonlyArray<string>, options?: camelcase.Options): string;
+
+	// TODO: Remove this for the next major release, refactor the whole definition to:
+	// declare function camelcase(
+	// 	input: string | ReadonlyArray<string>,
+	// 	options?: camelcase.Options
+	// ): string;
+	// export = camelcase;
+	default: typeof camelcase;
+};
+
+export = camelcase;

+ 76 - 0
node_modules/camelcase/index.js

@@ -0,0 +1,76 @@
+'use strict';
+
+const preserveCamelCase = string => {
+	let isLastCharLower = false;
+	let isLastCharUpper = false;
+	let isLastLastCharUpper = false;
+
+	for (let i = 0; i < string.length; i++) {
+		const character = string[i];
+
+		if (isLastCharLower && /[a-zA-Z]/.test(character) && character.toUpperCase() === character) {
+			string = string.slice(0, i) + '-' + string.slice(i);
+			isLastCharLower = false;
+			isLastLastCharUpper = isLastCharUpper;
+			isLastCharUpper = true;
+			i++;
+		} else if (isLastCharUpper && isLastLastCharUpper && /[a-zA-Z]/.test(character) && character.toLowerCase() === character) {
+			string = string.slice(0, i - 1) + '-' + string.slice(i - 1);
+			isLastLastCharUpper = isLastCharUpper;
+			isLastCharUpper = false;
+			isLastCharLower = true;
+		} else {
+			isLastCharLower = character.toLowerCase() === character && character.toUpperCase() !== character;
+			isLastLastCharUpper = isLastCharUpper;
+			isLastCharUpper = character.toUpperCase() === character && character.toLowerCase() !== character;
+		}
+	}
+
+	return string;
+};
+
+const camelCase = (input, options) => {
+	if (!(typeof input === 'string' || Array.isArray(input))) {
+		throw new TypeError('Expected the input to be `string | string[]`');
+	}
+
+	options = Object.assign({
+		pascalCase: false
+	}, options);
+
+	const postProcess = x => options.pascalCase ? x.charAt(0).toUpperCase() + x.slice(1) : x;
+
+	if (Array.isArray(input)) {
+		input = input.map(x => x.trim())
+			.filter(x => x.length)
+			.join('-');
+	} else {
+		input = input.trim();
+	}
+
+	if (input.length === 0) {
+		return '';
+	}
+
+	if (input.length === 1) {
+		return options.pascalCase ? input.toUpperCase() : input.toLowerCase();
+	}
+
+	const hasUpperCase = input !== input.toLowerCase();
+
+	if (hasUpperCase) {
+		input = preserveCamelCase(input);
+	}
+
+	input = input
+		.replace(/^[_.\- ]+/, '')
+		.toLowerCase()
+		.replace(/[_.\- ]+(\w|$)/g, (_, p1) => p1.toUpperCase())
+		.replace(/\d+(\w|$)/g, m => m.toUpperCase());
+
+	return postProcess(input);
+};
+
+module.exports = camelCase;
+// TODO: Remove this for the next major release
+module.exports.default = camelCase;

+ 9 - 0
node_modules/camelcase/license

@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ 75 - 0
node_modules/camelcase/package.json

@@ -0,0 +1,75 @@
+{
+  "_from": "camelcase@^5.0.0",
+  "_id": "camelcase@5.3.1",
+  "_inBundle": false,
+  "_integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==",
+  "_location": "/camelcase",
+  "_phantomChildren": {},
+  "_requested": {
+    "type": "range",
+    "registry": true,
+    "raw": "camelcase@^5.0.0",
+    "name": "camelcase",
+    "escapedName": "camelcase",
+    "rawSpec": "^5.0.0",
+    "saveSpec": null,
+    "fetchSpec": "^5.0.0"
+  },
+  "_requiredBy": [
+    "/yargs-parser"
+  ],
+  "_resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz",
+  "_shasum": "e3c9b31569e106811df242f715725a1f4c494320",
+  "_spec": "camelcase@^5.0.0",
+  "_where": "E:\\顾家\\gujia\\node_modules\\yargs-parser",
+  "author": {
+    "name": "Sindre Sorhus",
+    "email": "sindresorhus@gmail.com",
+    "url": "sindresorhus.com"
+  },
+  "bugs": {
+    "url": "https://github.com/sindresorhus/camelcase/issues"
+  },
+  "bundleDependencies": false,
+  "deprecated": false,
+  "description": "Convert a dash/dot/underscore/space separated string to camelCase or PascalCase: `foo-bar` → `fooBar`",
+  "devDependencies": {
+    "ava": "^1.4.1",
+    "tsd": "^0.7.1",
+    "xo": "^0.24.0"
+  },
+  "engines": {
+    "node": ">=6"
+  },
+  "files": [
+    "index.js",
+    "index.d.ts"
+  ],
+  "homepage": "https://github.com/sindresorhus/camelcase#readme",
+  "keywords": [
+    "camelcase",
+    "camel-case",
+    "camel",
+    "case",
+    "dash",
+    "hyphen",
+    "dot",
+    "underscore",
+    "separator",
+    "string",
+    "text",
+    "convert",
+    "pascalcase",
+    "pascal-case"
+  ],
+  "license": "MIT",
+  "name": "camelcase",
+  "repository": {
+    "type": "git",
+    "url": "git+https://github.com/sindresorhus/camelcase.git"
+  },
+  "scripts": {
+    "test": "xo && ava && tsd"
+  },
+  "version": "5.3.1"
+}

+ 99 - 0
node_modules/camelcase/readme.md

@@ -0,0 +1,99 @@
+# camelcase [![Build Status](https://travis-ci.org/sindresorhus/camelcase.svg?branch=master)](https://travis-ci.org/sindresorhus/camelcase)
+
+> Convert a dash/dot/underscore/space separated string to camelCase or PascalCase: `foo-bar` → `fooBar`
+
+---
+
+<div align="center">
+	<b>
+		<a href="https://tidelift.com/subscription/pkg/npm-camelcase?utm_source=npm-camelcase&utm_medium=referral&utm_campaign=readme">Get professional support for 'camelcase' with a Tidelift subscription</a>
+	</b>
+	<br>
+	<sub>
+		Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
+	</sub>
+</div>
+
+---
+
+## Install
+
+```
+$ npm install camelcase
+```
+
+
+## Usage
+
+```js
+const camelCase = require('camelcase');
+
+camelCase('foo-bar');
+//=> 'fooBar'
+
+camelCase('foo_bar');
+//=> 'fooBar'
+
+camelCase('Foo-Bar');
+//=> 'fooBar'
+
+camelCase('Foo-Bar', {pascalCase: true});
+//=> 'FooBar'
+
+camelCase('--foo.bar', {pascalCase: false});
+//=> 'fooBar'
+
+camelCase('foo bar');
+//=> 'fooBar'
+
+console.log(process.argv[3]);
+//=> '--foo-bar'
+camelCase(process.argv[3]);
+//=> 'fooBar'
+
+camelCase(['foo', 'bar']);
+//=> 'fooBar'
+
+camelCase(['__foo__', '--bar'], {pascalCase: true});
+//=> 'FooBar'
+```
+
+
+## API
+
+### camelCase(input, [options])
+
+#### input
+
+Type: `string` `string[]`
+
+String to convert to camel case.
+
+#### options
+
+Type: `Object`
+
+##### pascalCase
+
+Type: `boolean`<br>
+Default: `false`
+
+Uppercase the first character: `foo-bar` → `FooBar`
+
+
+## Security
+
+To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure.
+
+
+## Related
+
+- [decamelize](https://github.com/sindresorhus/decamelize) - The inverse of this module
+- [uppercamelcase](https://github.com/SamVerschueren/uppercamelcase) - Like this module, but to PascalCase instead of camelCase
+- [titleize](https://github.com/sindresorhus/titleize) - Capitalize every word in string
+- [humanize-string](https://github.com/sindresorhus/humanize-string) - Convert a camelized/dasherized/underscored string into a humanized one
+
+
+## License
+
+MIT © [Sindre Sorhus](https://sindresorhus.com)

+ 13 - 0
node_modules/clipboard/.babelrc

@@ -0,0 +1,13 @@
+{
+  "presets": [
+    [
+      "env",
+      {
+        "targets": {
+          "uglify": true
+        },
+        "modules": false
+      }
+    ]
+  ]
+}

+ 22 - 0
node_modules/clipboard/.editorconfig

@@ -0,0 +1,22 @@
+# EditorConfig helps developers define and maintain consistent
+# coding styles between different editors and IDEs
+# http://editorconfig.org
+
+root = true
+
+[*]
+# Change these settings to your own preference
+indent_style = space
+indent_size = 4
+
+# We recommend you to keep these unchanged
+end_of_line = lf
+charset = utf-8
+trim_trailing_whitespace = true
+insert_final_newline = true
+
+[*.md]
+trim_trailing_whitespace = false
+
+[{package.json,bower.json}]
+indent_size = 2

+ 15 - 0
node_modules/clipboard/.github/issue_template.md

@@ -0,0 +1,15 @@
+### Minimal example
+
+> Fork this [JSFiddle](https://jsfiddle.net/zenorocha/5kk0eysw/) and reproduce your issue.
+
+### Expected behaviour
+
+I thought that by going to the page '...' and pressing the button '...' then '...' would happen.
+
+### Actual behaviour
+
+Instead of '...', what I saw was that '...' happened instead.
+
+### Browsers affected
+
+I tested on all major browsers and only IE 11 does not work.

+ 21 - 0
node_modules/clipboard/.github/stale.yml

@@ -0,0 +1,21 @@
+# Number of days of inactivity before an issue becomes stale
+daysUntilStale: 60
+
+# Number of days of inactivity before a stale issue is closed
+daysUntilClose: 7
+
+# Issues with these labels will never be considered stale
+exemptLabels:
+  - pinned
+
+# Label to use when marking an issue as stale
+staleLabel: stale
+
+# Comment to post when marking an issue as stale. Set to `false` to disable
+markComment: >
+  This issue has been automatically marked as stale because it has not had
+  recent activity. It will be closed if no further activity occurs. Thank you
+  for your contributions.
+
+# Comment to post when closing a stale issue. Set to `false` to disable
+closeComment: false

+ 4 - 0
node_modules/clipboard/.travis.yml

@@ -0,0 +1,4 @@
+sudo: false
+language: node_js
+node_js:
+  - stable

+ 21 - 0
node_modules/clipboard/LICENSE

@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) Zeno Rocha
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.

+ 22 - 0
node_modules/clipboard/bower.json

@@ -0,0 +1,22 @@
+{
+  "name": "clipboard",
+  "version": "2.0.6",
+  "description": "Modern copy to clipboard. No Flash. Just 3kb",
+  "license": "MIT",
+  "main": "dist/clipboard.js",
+  "ignore": [
+    "/.*/",
+    "/demo/",
+    "/test/",
+    "/.*",
+    "/bower.json",
+    "/karma.conf.js",
+    "/src",
+    "/lib"
+  ],
+  "keywords": [
+    "clipboard",
+    "copy",
+    "cut"
+  ]
+}

+ 25 - 0
node_modules/clipboard/composer.json

@@ -0,0 +1,25 @@
+{
+  "name": "zenorocha/clipboardjs",
+  "description": "Modern copy to clipboard. No Flash. Just 3kb gzipped https://clipboardjs.com",
+  "type": "component",
+  "homepage": "https://clipboardjs.com/",
+  "authors": [
+    {
+      "name": "Zeno Rocha",
+      "homepage": "http://zenorocha.com/"
+    }
+  ],
+  "require": {
+    "oomphinc/composer-installers-extender": "*"
+  },
+  "extra": {
+    "component": {
+      "scripts": [
+        "dist/clipboard.js"
+      ],
+      "files": [
+        "dist/clipboard.min.js"
+      ]
+    }
+  }
+}

+ 28 - 0
node_modules/clipboard/contributing.md

@@ -0,0 +1,28 @@
+# Contributing guide
+
+Want to contribute to Clipboard.js? Awesome!
+There are many ways you can contribute, see below.
+
+## Opening issues
+
+Open an issue to report bugs or to propose new features.
+
+- Reporting bugs: describe the bug as clearly as you can, including steps to reproduce, what happened and what you were expecting to happen. Also include browser version, OS and other related software's (npm, Node.js, etc) versions when applicable.
+
+- Proposing features: explain the proposed feature, what it should do, why it is useful, how users should use it. Give us as much info as possible so it will be easier to discuss, access and implement the proposed feature. When you're unsure about a certain aspect of the feature, feel free to leave it open for others to discuss and find an appropriate solution.
+
+## Proposing pull requests
+
+Pull requests are very welcome. Note that if you are going to propose drastic changes, be sure to open an issue for discussion first, to make sure that your PR will be accepted before you spend effort coding it.
+
+Fork the Clipboard.js repository, clone it locally and create a branch for your proposed bug fix or new feature. Avoid working directly on the master branch.
+
+Implement your bug fix or feature, write tests to cover it and make sure all tests are passing (run a final `npm test` to make sure everything is correct). Then commit your changes, push your bug fix/feature branch to the origin (your forked repo) and open a pull request to the upstream (the repository you originally forked)'s master branch.
+
+## Documentation
+
+Documentation is extremely important and takes a fair deal of time and effort to write and keep updated. Please submit any and all improvements you can make to the repository's docs.
+
+## Known issues
+If you're using npm@3 you'll probably face some issues related to peerDependencies.
+https://github.com/npm/npm/issues/9204

+ 31 - 0
node_modules/clipboard/demo/constructor-node.html

@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <title>constructor-node</title>
+    <meta name="viewport" content="width=device-width, initial-scale=1">
+</head>
+<body>
+    <!-- 1. Define some markup -->
+    <div id="btn" data-clipboard-text="1">
+        <span>Copy</span>
+    </div>
+
+    <!-- 2. Include library -->
+    <script src="../dist/clipboard.min.js"></script>
+
+    <!-- 3. Instantiate clipboard by passing a HTML element -->
+    <script>
+    var btn = document.getElementById('btn');
+    var clipboard = new ClipboardJS(btn);
+
+    clipboard.on('success', function(e) {
+        console.log(e);
+    });
+
+    clipboard.on('error', function(e) {
+        console.log(e);
+    });
+    </script>
+</body>
+</html>

+ 31 - 0
node_modules/clipboard/demo/constructor-nodelist.html

@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <title>constructor-nodelist</title>
+    <meta name="viewport" content="width=device-width, initial-scale=1">
+</head>
+<body>
+    <!-- 1. Define some markup -->
+    <button data-clipboard-text="1">Copy</button>
+    <button data-clipboard-text="2">Copy</button>
+    <button data-clipboard-text="3">Copy</button>
+
+    <!-- 2. Include library -->
+    <script src="../dist/clipboard.min.js"></script>
+
+    <!-- 3. Instantiate clipboard by passing a list of HTML elements -->
+    <script>
+    var btns = document.querySelectorAll('button');
+    var clipboard = new ClipboardJS(btns);
+
+    clipboard.on('success', function(e) {
+        console.log(e);
+    });
+
+    clipboard.on('error', function(e) {
+        console.log(e);
+    });
+    </script>
+</body>
+</html>

+ 30 - 0
node_modules/clipboard/demo/constructor-selector.html

@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <title>constructor-selector</title>
+    <meta name="viewport" content="width=device-width, initial-scale=1">
+</head>
+<body>
+    <!-- 1. Define some markup -->
+    <button class="btn" data-clipboard-text="1">Copy</button>
+    <button class="btn" data-clipboard-text="2">Copy</button>
+    <button class="btn" data-clipboard-text="3">Copy</button>
+
+    <!-- 2. Include library -->
+    <script src="../dist/clipboard.min.js"></script>
+
+    <!-- 3. Instantiate clipboard by passing a string selector -->
+    <script>
+    var clipboard = new ClipboardJS('.btn');
+
+    clipboard.on('success', function(e) {
+        console.log(e);
+    });
+
+    clipboard.on('error', function(e) {
+        console.log(e);
+    });
+    </script>
+</body>
+</html>

+ 33 - 0
node_modules/clipboard/demo/function-target.html

@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <title>function-target</title>
+    <meta name="viewport" content="width=device-width, initial-scale=1">
+</head>
+<body>
+    <!-- 1. Define some markup -->
+    <button class="btn">Copy</button>
+    <div>hello</div>
+
+    <!-- 2. Include library -->
+    <script src="../dist/clipboard.min.js"></script>
+
+    <!-- 3. Instantiate clipboard -->
+    <script>
+    var clipboard = new ClipboardJS('.btn', {
+        target: function() {
+            return document.querySelector('div');
+        }
+    });
+
+    clipboard.on('success', function(e) {
+        console.log(e);
+    });
+
+    clipboard.on('error', function(e) {
+        console.log(e);
+    });
+    </script>
+</body>
+</html>

+ 32 - 0
node_modules/clipboard/demo/function-text.html

@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <title>function-text</title>
+    <meta name="viewport" content="width=device-width, initial-scale=1">
+</head>
+<body>
+    <!-- 1. Define some markup -->
+    <button class="btn">Copy</button>
+
+    <!-- 2. Include library -->
+    <script src="../dist/clipboard.min.js"></script>
+
+    <!-- 3. Instantiate clipboard -->
+    <script>
+    var clipboard = new ClipboardJS('.btn', {
+        text: function() {
+            return 'to be or not to be';
+        }
+    });
+
+    clipboard.on('success', function(e) {
+        console.log(e);
+    });
+
+    clipboard.on('error', function(e) {
+        console.log(e);
+    });
+    </script>
+</body>
+</html>

+ 29 - 0
node_modules/clipboard/demo/target-div.html

@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <title>target-div</title>
+    <meta name="viewport" content="width=device-width, initial-scale=1">
+</head>
+<body>
+    <!-- 1. Define some markup -->
+    <div>hello</div>
+    <button class="btn" data-clipboard-action="copy" data-clipboard-target="div">Copy</button>
+
+    <!-- 2. Include library -->
+    <script src="../dist/clipboard.min.js"></script>
+
+    <!-- 3. Instantiate clipboard -->
+    <script>
+    var clipboard = new ClipboardJS('.btn');
+
+    clipboard.on('success', function(e) {
+        console.log(e);
+    });
+
+    clipboard.on('error', function(e) {
+        console.log(e);
+    });
+    </script>
+</body>
+</html>

+ 29 - 0
node_modules/clipboard/demo/target-input.html

@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <title>target-input</title>
+    <meta name="viewport" content="width=device-width, initial-scale=1">
+</head>
+<body>
+    <!-- 1. Define some markup -->
+    <input id="foo" type="text" value="hello">
+    <button class="btn" data-clipboard-action="copy" data-clipboard-target="#foo">Copy</button>
+
+    <!-- 2. Include library -->
+    <script src="../dist/clipboard.min.js"></script>
+
+    <!-- 3. Instantiate clipboard -->
+    <script>
+    var clipboard = new ClipboardJS('.btn');
+
+    clipboard.on('success', function(e) {
+        console.log(e);
+    });
+
+    clipboard.on('error', function(e) {
+        console.log(e);
+    });
+    </script>
+</body>
+</html>

+ 29 - 0
node_modules/clipboard/demo/target-textarea.html

@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <title>target-textarea</title>
+    <meta name="viewport" content="width=device-width, initial-scale=1">
+</head>
+<body>
+    <!-- 1. Define some markup -->
+    <textarea id="bar">hello</textarea>
+    <button class="btn" data-clipboard-action="cut" data-clipboard-target="#bar">Cut</button>
+
+    <!-- 2. Include library -->
+    <script src="../dist/clipboard.min.js"></script>
+
+    <!-- 3. Instantiate clipboard -->
+    <script>
+    var clipboard = new ClipboardJS('.btn');
+
+    clipboard.on('success', function(e) {
+        console.log(e);
+    });
+
+    clipboard.on('error', function(e) {
+        console.log(e);
+    });
+    </script>
+</body>
+</html>

+ 973 - 0
node_modules/clipboard/dist/clipboard.js

@@ -0,0 +1,973 @@
+/*!
+ * clipboard.js v2.0.6
+ * https://clipboardjs.com/
+ * 
+ * Licensed MIT © Zeno Rocha
+ */
+(function webpackUniversalModuleDefinition(root, factory) {
+	if(typeof exports === 'object' && typeof module === 'object')
+		module.exports = factory();
+	else if(typeof define === 'function' && define.amd)
+		define([], factory);
+	else if(typeof exports === 'object')
+		exports["ClipboardJS"] = factory();
+	else
+		root["ClipboardJS"] = factory();
+})(this, function() {
+return /******/ (function(modules) { // webpackBootstrap
+/******/ 	// The module cache
+/******/ 	var installedModules = {};
+/******/
+/******/ 	// The require function
+/******/ 	function __webpack_require__(moduleId) {
+/******/
+/******/ 		// Check if module is in cache
+/******/ 		if(installedModules[moduleId]) {
+/******/ 			return installedModules[moduleId].exports;
+/******/ 		}
+/******/ 		// Create a new module (and put it into the cache)
+/******/ 		var module = installedModules[moduleId] = {
+/******/ 			i: moduleId,
+/******/ 			l: false,
+/******/ 			exports: {}
+/******/ 		};
+/******/
+/******/ 		// Execute the module function
+/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
+/******/
+/******/ 		// Flag the module as loaded
+/******/ 		module.l = true;
+/******/
+/******/ 		// Return the exports of the module
+/******/ 		return module.exports;
+/******/ 	}
+/******/
+/******/
+/******/ 	// expose the modules object (__webpack_modules__)
+/******/ 	__webpack_require__.m = modules;
+/******/
+/******/ 	// expose the module cache
+/******/ 	__webpack_require__.c = installedModules;
+/******/
+/******/ 	// define getter function for harmony exports
+/******/ 	__webpack_require__.d = function(exports, name, getter) {
+/******/ 		if(!__webpack_require__.o(exports, name)) {
+/******/ 			Object.defineProperty(exports, name, { enumerable: true, get: getter });
+/******/ 		}
+/******/ 	};
+/******/
+/******/ 	// define __esModule on exports
+/******/ 	__webpack_require__.r = function(exports) {
+/******/ 		if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
+/******/ 			Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
+/******/ 		}
+/******/ 		Object.defineProperty(exports, '__esModule', { value: true });
+/******/ 	};
+/******/
+/******/ 	// create a fake namespace object
+/******/ 	// mode & 1: value is a module id, require it
+/******/ 	// mode & 2: merge all properties of value into the ns
+/******/ 	// mode & 4: return value when already ns object
+/******/ 	// mode & 8|1: behave like require
+/******/ 	__webpack_require__.t = function(value, mode) {
+/******/ 		if(mode & 1) value = __webpack_require__(value);
+/******/ 		if(mode & 8) return value;
+/******/ 		if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
+/******/ 		var ns = Object.create(null);
+/******/ 		__webpack_require__.r(ns);
+/******/ 		Object.defineProperty(ns, 'default', { enumerable: true, value: value });
+/******/ 		if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
+/******/ 		return ns;
+/******/ 	};
+/******/
+/******/ 	// getDefaultExport function for compatibility with non-harmony modules
+/******/ 	__webpack_require__.n = function(module) {
+/******/ 		var getter = module && module.__esModule ?
+/******/ 			function getDefault() { return module['default']; } :
+/******/ 			function getModuleExports() { return module; };
+/******/ 		__webpack_require__.d(getter, 'a', getter);
+/******/ 		return getter;
+/******/ 	};
+/******/
+/******/ 	// Object.prototype.hasOwnProperty.call
+/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
+/******/
+/******/ 	// __webpack_public_path__
+/******/ 	__webpack_require__.p = "";
+/******/
+/******/
+/******/ 	// Load entry module and return exports
+/******/ 	return __webpack_require__(__webpack_require__.s = 6);
+/******/ })
+/************************************************************************/
+/******/ ([
+/* 0 */
+/***/ (function(module, exports) {
+
+function select(element) {
+    var selectedText;
+
+    if (element.nodeName === 'SELECT') {
+        element.focus();
+
+        selectedText = element.value;
+    }
+    else if (element.nodeName === 'INPUT' || element.nodeName === 'TEXTAREA') {
+        var isReadOnly = element.hasAttribute('readonly');
+
+        if (!isReadOnly) {
+            element.setAttribute('readonly', '');
+        }
+
+        element.select();
+        element.setSelectionRange(0, element.value.length);
+
+        if (!isReadOnly) {
+            element.removeAttribute('readonly');
+        }
+
+        selectedText = element.value;
+    }
+    else {
+        if (element.hasAttribute('contenteditable')) {
+            element.focus();
+        }
+
+        var selection = window.getSelection();
+        var range = document.createRange();
+
+        range.selectNodeContents(element);
+        selection.removeAllRanges();
+        selection.addRange(range);
+
+        selectedText = selection.toString();
+    }
+
+    return selectedText;
+}
+
+module.exports = select;
+
+
+/***/ }),
+/* 1 */
+/***/ (function(module, exports) {
+
+function E () {
+  // Keep this empty so it's easier to inherit from
+  // (via https://github.com/lipsmack from https://github.com/scottcorgan/tiny-emitter/issues/3)
+}
+
+E.prototype = {
+  on: function (name, callback, ctx) {
+    var e = this.e || (this.e = {});
+
+    (e[name] || (e[name] = [])).push({
+      fn: callback,
+      ctx: ctx
+    });
+
+    return this;
+  },
+
+  once: function (name, callback, ctx) {
+    var self = this;
+    function listener () {
+      self.off(name, listener);
+      callback.apply(ctx, arguments);
+    };
+
+    listener._ = callback
+    return this.on(name, listener, ctx);
+  },
+
+  emit: function (name) {
+    var data = [].slice.call(arguments, 1);
+    var evtArr = ((this.e || (this.e = {}))[name] || []).slice();
+    var i = 0;
+    var len = evtArr.length;
+
+    for (i; i < len; i++) {
+      evtArr[i].fn.apply(evtArr[i].ctx, data);
+    }
+
+    return this;
+  },
+
+  off: function (name, callback) {
+    var e = this.e || (this.e = {});
+    var evts = e[name];
+    var liveEvents = [];
+
+    if (evts && callback) {
+      for (var i = 0, len = evts.length; i < len; i++) {
+        if (evts[i].fn !== callback && evts[i].fn._ !== callback)
+          liveEvents.push(evts[i]);
+      }
+    }
+
+    // Remove event from queue to prevent memory leak
+    // Suggested by https://github.com/lazd
+    // Ref: https://github.com/scottcorgan/tiny-emitter/commit/c6ebfaa9bc973b33d110a84a307742b7cf94c953#commitcomment-5024910
+
+    (liveEvents.length)
+      ? e[name] = liveEvents
+      : delete e[name];
+
+    return this;
+  }
+};
+
+module.exports = E;
+module.exports.TinyEmitter = E;
+
+
+/***/ }),
+/* 2 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var is = __webpack_require__(3);
+var delegate = __webpack_require__(4);
+
+/**
+ * Validates all params and calls the right
+ * listener function based on its target type.
+ *
+ * @param {String|HTMLElement|HTMLCollection|NodeList} target
+ * @param {String} type
+ * @param {Function} callback
+ * @return {Object}
+ */
+function listen(target, type, callback) {
+    if (!target && !type && !callback) {
+        throw new Error('Missing required arguments');
+    }
+
+    if (!is.string(type)) {
+        throw new TypeError('Second argument must be a String');
+    }
+
+    if (!is.fn(callback)) {
+        throw new TypeError('Third argument must be a Function');
+    }
+
+    if (is.node(target)) {
+        return listenNode(target, type, callback);
+    }
+    else if (is.nodeList(target)) {
+        return listenNodeList(target, type, callback);
+    }
+    else if (is.string(target)) {
+        return listenSelector(target, type, callback);
+    }
+    else {
+        throw new TypeError('First argument must be a String, HTMLElement, HTMLCollection, or NodeList');
+    }
+}
+
+/**
+ * Adds an event listener to a HTML element
+ * and returns a remove listener function.
+ *
+ * @param {HTMLElement} node
+ * @param {String} type
+ * @param {Function} callback
+ * @return {Object}
+ */
+function listenNode(node, type, callback) {
+    node.addEventListener(type, callback);
+
+    return {
+        destroy: function() {
+            node.removeEventListener(type, callback);
+        }
+    }
+}
+
+/**
+ * Add an event listener to a list of HTML elements
+ * and returns a remove listener function.
+ *
+ * @param {NodeList|HTMLCollection} nodeList
+ * @param {String} type
+ * @param {Function} callback
+ * @return {Object}
+ */
+function listenNodeList(nodeList, type, callback) {
+    Array.prototype.forEach.call(nodeList, function(node) {
+        node.addEventListener(type, callback);
+    });
+
+    return {
+        destroy: function() {
+            Array.prototype.forEach.call(nodeList, function(node) {
+                node.removeEventListener(type, callback);
+            });
+        }
+    }
+}
+
+/**
+ * Add an event listener to a selector
+ * and returns a remove listener function.
+ *
+ * @param {String} selector
+ * @param {String} type
+ * @param {Function} callback
+ * @return {Object}
+ */
+function listenSelector(selector, type, callback) {
+    return delegate(document.body, selector, type, callback);
+}
+
+module.exports = listen;
+
+
+/***/ }),
+/* 3 */
+/***/ (function(module, exports) {
+
+/**
+ * Check if argument is a HTML element.
+ *
+ * @param {Object} value
+ * @return {Boolean}
+ */
+exports.node = function(value) {
+    return value !== undefined
+        && value instanceof HTMLElement
+        && value.nodeType === 1;
+};
+
+/**
+ * Check if argument is a list of HTML elements.
+ *
+ * @param {Object} value
+ * @return {Boolean}
+ */
+exports.nodeList = function(value) {
+    var type = Object.prototype.toString.call(value);
+
+    return value !== undefined
+        && (type === '[object NodeList]' || type === '[object HTMLCollection]')
+        && ('length' in value)
+        && (value.length === 0 || exports.node(value[0]));
+};
+
+/**
+ * Check if argument is a string.
+ *
+ * @param {Object} value
+ * @return {Boolean}
+ */
+exports.string = function(value) {
+    return typeof value === 'string'
+        || value instanceof String;
+};
+
+/**
+ * Check if argument is a function.
+ *
+ * @param {Object} value
+ * @return {Boolean}
+ */
+exports.fn = function(value) {
+    var type = Object.prototype.toString.call(value);
+
+    return type === '[object Function]';
+};
+
+
+/***/ }),
+/* 4 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var closest = __webpack_require__(5);
+
+/**
+ * Delegates event to a selector.
+ *
+ * @param {Element} element
+ * @param {String} selector
+ * @param {String} type
+ * @param {Function} callback
+ * @param {Boolean} useCapture
+ * @return {Object}
+ */
+function _delegate(element, selector, type, callback, useCapture) {
+    var listenerFn = listener.apply(this, arguments);
+
+    element.addEventListener(type, listenerFn, useCapture);
+
+    return {
+        destroy: function() {
+            element.removeEventListener(type, listenerFn, useCapture);
+        }
+    }
+}
+
+/**
+ * Delegates event to a selector.
+ *
+ * @param {Element|String|Array} [elements]
+ * @param {String} selector
+ * @param {String} type
+ * @param {Function} callback
+ * @param {Boolean} useCapture
+ * @return {Object}
+ */
+function delegate(elements, selector, type, callback, useCapture) {
+    // Handle the regular Element usage
+    if (typeof elements.addEventListener === 'function') {
+        return _delegate.apply(null, arguments);
+    }
+
+    // Handle Element-less usage, it defaults to global delegation
+    if (typeof type === 'function') {
+        // Use `document` as the first parameter, then apply arguments
+        // This is a short way to .unshift `arguments` without running into deoptimizations
+        return _delegate.bind(null, document).apply(null, arguments);
+    }
+
+    // Handle Selector-based usage
+    if (typeof elements === 'string') {
+        elements = document.querySelectorAll(elements);
+    }
+
+    // Handle Array-like based usage
+    return Array.prototype.map.call(elements, function (element) {
+        return _delegate(element, selector, type, callback, useCapture);
+    });
+}
+
+/**
+ * Finds closest match and invokes callback.
+ *
+ * @param {Element} element
+ * @param {String} selector
+ * @param {String} type
+ * @param {Function} callback
+ * @return {Function}
+ */
+function listener(element, selector, type, callback) {
+    return function(e) {
+        e.delegateTarget = closest(e.target, selector);
+
+        if (e.delegateTarget) {
+            callback.call(element, e);
+        }
+    }
+}
+
+module.exports = delegate;
+
+
+/***/ }),
+/* 5 */
+/***/ (function(module, exports) {
+
+var DOCUMENT_NODE_TYPE = 9;
+
+/**
+ * A polyfill for Element.matches()
+ */
+if (typeof Element !== 'undefined' && !Element.prototype.matches) {
+    var proto = Element.prototype;
+
+    proto.matches = proto.matchesSelector ||
+                    proto.mozMatchesSelector ||
+                    proto.msMatchesSelector ||
+                    proto.oMatchesSelector ||
+                    proto.webkitMatchesSelector;
+}
+
+/**
+ * Finds the closest parent that matches a selector.
+ *
+ * @param {Element} element
+ * @param {String} selector
+ * @return {Function}
+ */
+function closest (element, selector) {
+    while (element && element.nodeType !== DOCUMENT_NODE_TYPE) {
+        if (typeof element.matches === 'function' &&
+            element.matches(selector)) {
+          return element;
+        }
+        element = element.parentNode;
+    }
+}
+
+module.exports = closest;
+
+
+/***/ }),
+/* 6 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+
+// EXTERNAL MODULE: ./node_modules/select/src/select.js
+var src_select = __webpack_require__(0);
+var select_default = /*#__PURE__*/__webpack_require__.n(src_select);
+
+// CONCATENATED MODULE: ./src/clipboard-action.js
+var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+
+
+/**
+ * Inner class which performs selection from either `text` or `target`
+ * properties and then executes copy or cut operations.
+ */
+
+var clipboard_action_ClipboardAction = function () {
+    /**
+     * @param {Object} options
+     */
+    function ClipboardAction(options) {
+        _classCallCheck(this, ClipboardAction);
+
+        this.resolveOptions(options);
+        this.initSelection();
+    }
+
+    /**
+     * Defines base properties passed from constructor.
+     * @param {Object} options
+     */
+
+
+    _createClass(ClipboardAction, [{
+        key: 'resolveOptions',
+        value: function resolveOptions() {
+            var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
+
+            this.action = options.action;
+            this.container = options.container;
+            this.emitter = options.emitter;
+            this.target = options.target;
+            this.text = options.text;
+            this.trigger = options.trigger;
+
+            this.selectedText = '';
+        }
+
+        /**
+         * Decides which selection strategy is going to be applied based
+         * on the existence of `text` and `target` properties.
+         */
+
+    }, {
+        key: 'initSelection',
+        value: function initSelection() {
+            if (this.text) {
+                this.selectFake();
+            } else if (this.target) {
+                this.selectTarget();
+            }
+        }
+
+        /**
+         * Creates a fake textarea element, sets its value from `text` property,
+         * and makes a selection on it.
+         */
+
+    }, {
+        key: 'selectFake',
+        value: function selectFake() {
+            var _this = this;
+
+            var isRTL = document.documentElement.getAttribute('dir') == 'rtl';
+
+            this.removeFake();
+
+            this.fakeHandlerCallback = function () {
+                return _this.removeFake();
+            };
+            this.fakeHandler = this.container.addEventListener('click', this.fakeHandlerCallback) || true;
+
+            this.fakeElem = document.createElement('textarea');
+            // Prevent zooming on iOS
+            this.fakeElem.style.fontSize = '12pt';
+            // Reset box model
+            this.fakeElem.style.border = '0';
+            this.fakeElem.style.padding = '0';
+            this.fakeElem.style.margin = '0';
+            // Move element out of screen horizontally
+            this.fakeElem.style.position = 'absolute';
+            this.fakeElem.style[isRTL ? 'right' : 'left'] = '-9999px';
+            // Move element to the same position vertically
+            var yPosition = window.pageYOffset || document.documentElement.scrollTop;
+            this.fakeElem.style.top = yPosition + 'px';
+
+            this.fakeElem.setAttribute('readonly', '');
+            this.fakeElem.value = this.text;
+
+            this.container.appendChild(this.fakeElem);
+
+            this.selectedText = select_default()(this.fakeElem);
+            this.copyText();
+        }
+
+        /**
+         * Only removes the fake element after another click event, that way
+         * a user can hit `Ctrl+C` to copy because selection still exists.
+         */
+
+    }, {
+        key: 'removeFake',
+        value: function removeFake() {
+            if (this.fakeHandler) {
+                this.container.removeEventListener('click', this.fakeHandlerCallback);
+                this.fakeHandler = null;
+                this.fakeHandlerCallback = null;
+            }
+
+            if (this.fakeElem) {
+                this.container.removeChild(this.fakeElem);
+                this.fakeElem = null;
+            }
+        }
+
+        /**
+         * Selects the content from element passed on `target` property.
+         */
+
+    }, {
+        key: 'selectTarget',
+        value: function selectTarget() {
+            this.selectedText = select_default()(this.target);
+            this.copyText();
+        }
+
+        /**
+         * Executes the copy operation based on the current selection.
+         */
+
+    }, {
+        key: 'copyText',
+        value: function copyText() {
+            var succeeded = void 0;
+
+            try {
+                succeeded = document.execCommand(this.action);
+            } catch (err) {
+                succeeded = false;
+            }
+
+            this.handleResult(succeeded);
+        }
+
+        /**
+         * Fires an event based on the copy operation result.
+         * @param {Boolean} succeeded
+         */
+
+    }, {
+        key: 'handleResult',
+        value: function handleResult(succeeded) {
+            this.emitter.emit(succeeded ? 'success' : 'error', {
+                action: this.action,
+                text: this.selectedText,
+                trigger: this.trigger,
+                clearSelection: this.clearSelection.bind(this)
+            });
+        }
+
+        /**
+         * Moves focus away from `target` and back to the trigger, removes current selection.
+         */
+
+    }, {
+        key: 'clearSelection',
+        value: function clearSelection() {
+            if (this.trigger) {
+                this.trigger.focus();
+            }
+            document.activeElement.blur();
+            window.getSelection().removeAllRanges();
+        }
+
+        /**
+         * Sets the `action` to be performed which can be either 'copy' or 'cut'.
+         * @param {String} action
+         */
+
+    }, {
+        key: 'destroy',
+
+
+        /**
+         * Destroy lifecycle.
+         */
+        value: function destroy() {
+            this.removeFake();
+        }
+    }, {
+        key: 'action',
+        set: function set() {
+            var action = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'copy';
+
+            this._action = action;
+
+            if (this._action !== 'copy' && this._action !== 'cut') {
+                throw new Error('Invalid "action" value, use either "copy" or "cut"');
+            }
+        }
+
+        /**
+         * Gets the `action` property.
+         * @return {String}
+         */
+        ,
+        get: function get() {
+            return this._action;
+        }
+
+        /**
+         * Sets the `target` property using an element
+         * that will be have its content copied.
+         * @param {Element} target
+         */
+
+    }, {
+        key: 'target',
+        set: function set(target) {
+            if (target !== undefined) {
+                if (target && (typeof target === 'undefined' ? 'undefined' : _typeof(target)) === 'object' && target.nodeType === 1) {
+                    if (this.action === 'copy' && target.hasAttribute('disabled')) {
+                        throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');
+                    }
+
+                    if (this.action === 'cut' && (target.hasAttribute('readonly') || target.hasAttribute('disabled'))) {
+                        throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');
+                    }
+
+                    this._target = target;
+                } else {
+                    throw new Error('Invalid "target" value, use a valid Element');
+                }
+            }
+        }
+
+        /**
+         * Gets the `target` property.
+         * @return {String|HTMLElement}
+         */
+        ,
+        get: function get() {
+            return this._target;
+        }
+    }]);
+
+    return ClipboardAction;
+}();
+
+/* harmony default export */ var clipboard_action = (clipboard_action_ClipboardAction);
+// EXTERNAL MODULE: ./node_modules/tiny-emitter/index.js
+var tiny_emitter = __webpack_require__(1);
+var tiny_emitter_default = /*#__PURE__*/__webpack_require__.n(tiny_emitter);
+
+// EXTERNAL MODULE: ./node_modules/good-listener/src/listen.js
+var listen = __webpack_require__(2);
+var listen_default = /*#__PURE__*/__webpack_require__.n(listen);
+
+// CONCATENATED MODULE: ./src/clipboard.js
+var clipboard_typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
+
+var clipboard_createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+function clipboard_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+
+
+
+
+/**
+ * Base class which takes one or more elements, adds event listeners to them,
+ * and instantiates a new `ClipboardAction` on each click.
+ */
+
+var clipboard_Clipboard = function (_Emitter) {
+    _inherits(Clipboard, _Emitter);
+
+    /**
+     * @param {String|HTMLElement|HTMLCollection|NodeList} trigger
+     * @param {Object} options
+     */
+    function Clipboard(trigger, options) {
+        clipboard_classCallCheck(this, Clipboard);
+
+        var _this = _possibleConstructorReturn(this, (Clipboard.__proto__ || Object.getPrototypeOf(Clipboard)).call(this));
+
+        _this.resolveOptions(options);
+        _this.listenClick(trigger);
+        return _this;
+    }
+
+    /**
+     * Defines if attributes would be resolved using internal setter functions
+     * or custom functions that were passed in the constructor.
+     * @param {Object} options
+     */
+
+
+    clipboard_createClass(Clipboard, [{
+        key: 'resolveOptions',
+        value: function resolveOptions() {
+            var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
+
+            this.action = typeof options.action === 'function' ? options.action : this.defaultAction;
+            this.target = typeof options.target === 'function' ? options.target : this.defaultTarget;
+            this.text = typeof options.text === 'function' ? options.text : this.defaultText;
+            this.container = clipboard_typeof(options.container) === 'object' ? options.container : document.body;
+        }
+
+        /**
+         * Adds a click event listener to the passed trigger.
+         * @param {String|HTMLElement|HTMLCollection|NodeList} trigger
+         */
+
+    }, {
+        key: 'listenClick',
+        value: function listenClick(trigger) {
+            var _this2 = this;
+
+            this.listener = listen_default()(trigger, 'click', function (e) {
+                return _this2.onClick(e);
+            });
+        }
+
+        /**
+         * Defines a new `ClipboardAction` on each click event.
+         * @param {Event} e
+         */
+
+    }, {
+        key: 'onClick',
+        value: function onClick(e) {
+            var trigger = e.delegateTarget || e.currentTarget;
+
+            if (this.clipboardAction) {
+                this.clipboardAction = null;
+            }
+
+            this.clipboardAction = new clipboard_action({
+                action: this.action(trigger),
+                target: this.target(trigger),
+                text: this.text(trigger),
+                container: this.container,
+                trigger: trigger,
+                emitter: this
+            });
+        }
+
+        /**
+         * Default `action` lookup function.
+         * @param {Element} trigger
+         */
+
+    }, {
+        key: 'defaultAction',
+        value: function defaultAction(trigger) {
+            return getAttributeValue('action', trigger);
+        }
+
+        /**
+         * Default `target` lookup function.
+         * @param {Element} trigger
+         */
+
+    }, {
+        key: 'defaultTarget',
+        value: function defaultTarget(trigger) {
+            var selector = getAttributeValue('target', trigger);
+
+            if (selector) {
+                return document.querySelector(selector);
+            }
+        }
+
+        /**
+         * Returns the support of the given action, or all actions if no action is
+         * given.
+         * @param {String} [action]
+         */
+
+    }, {
+        key: 'defaultText',
+
+
+        /**
+         * Default `text` lookup function.
+         * @param {Element} trigger
+         */
+        value: function defaultText(trigger) {
+            return getAttributeValue('text', trigger);
+        }
+
+        /**
+         * Destroy lifecycle.
+         */
+
+    }, {
+        key: 'destroy',
+        value: function destroy() {
+            this.listener.destroy();
+
+            if (this.clipboardAction) {
+                this.clipboardAction.destroy();
+                this.clipboardAction = null;
+            }
+        }
+    }], [{
+        key: 'isSupported',
+        value: function isSupported() {
+            var action = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ['copy', 'cut'];
+
+            var actions = typeof action === 'string' ? [action] : action;
+            var support = !!document.queryCommandSupported;
+
+            actions.forEach(function (action) {
+                support = support && !!document.queryCommandSupported(action);
+            });
+
+            return support;
+        }
+    }]);
+
+    return Clipboard;
+}(tiny_emitter_default.a);
+
+/**
+ * Helper function to retrieve attribute value.
+ * @param {String} suffix
+ * @param {Element} element
+ */
+
+
+function getAttributeValue(suffix, element) {
+    var attribute = 'data-clipboard-' + suffix;
+
+    if (!element.hasAttribute(attribute)) {
+        return;
+    }
+
+    return element.getAttribute(attribute);
+}
+
+/* harmony default export */ var clipboard = __webpack_exports__["default"] = (clipboard_Clipboard);
+
+/***/ })
+/******/ ])["default"];
+});

Разница между файлами не показана из-за своего большого размера
+ 6 - 0
node_modules/clipboard/dist/clipboard.min.js


+ 30 - 0
node_modules/clipboard/karma.conf.js

@@ -0,0 +1,30 @@
+var webpackConfig = require('./webpack.config.js');
+
+module.exports = function (karma) {
+    karma.set({
+        plugins: ['karma-webpack', 'karma-chai', 'karma-sinon', 'karma-mocha', 'karma-chrome-launcher'],
+
+        frameworks: ['chai', 'sinon', 'mocha'],
+
+        files: [
+            'src/**/*.js',
+            'test/**/*.js',
+        ],
+
+        preprocessors: {
+            'src/**/*.js': ['webpack'],
+            'test/**/*.js': ['webpack']
+        },
+
+        webpack: {
+            module: webpackConfig.module,
+            plugins: webpackConfig.plugins
+        },
+
+        webpackMiddleware: {
+            stats: 'errors-only'
+        },
+
+        browsers: ['ChromeHeadless']
+    });
+};

+ 12 - 0
node_modules/clipboard/package.js

@@ -0,0 +1,12 @@
+// Package metadata for Meteor.js.
+
+Package.describe({
+  name: "zenorocha:clipboard",
+  summary: "Modern copy to clipboard. No Flash. Just 3kb.",
+  version: "2.0.6",
+  git: "https://github.com/zenorocha/clipboard.js"
+});
+
+Package.onUse(function(api) {
+  api.addFiles("dist/clipboard.js", "client");
+});

+ 76 - 0
node_modules/clipboard/package.json

@@ -0,0 +1,76 @@
+{
+  "_from": "clipboard@^2.0.0",
+  "_id": "clipboard@2.0.6",
+  "_inBundle": false,
+  "_integrity": "sha512-g5zbiixBRk/wyKakSwCKd7vQXDjFnAMGHoEyBogG/bw9kTD9GvdAvaoRR1ALcEzt3pVKxZR0pViekPMIS0QyGg==",
+  "_location": "/clipboard",
+  "_phantomChildren": {},
+  "_requested": {
+    "type": "range",
+    "registry": true,
+    "raw": "clipboard@^2.0.0",
+    "name": "clipboard",
+    "escapedName": "clipboard",
+    "rawSpec": "^2.0.0",
+    "saveSpec": null,
+    "fetchSpec": "^2.0.0"
+  },
+  "_requiredBy": [
+    "/vue-clipboard2"
+  ],
+  "_resolved": "https://registry.npmjs.org/clipboard/-/clipboard-2.0.6.tgz",
+  "_shasum": "52921296eec0fdf77ead1749421b21c968647376",
+  "_spec": "clipboard@^2.0.0",
+  "_where": "/Users/wanglili/Documents/work/GitHub/yuyao/node_modules/vue-clipboard2",
+  "bugs": {
+    "url": "https://github.com/zenorocha/clipboard.js/issues"
+  },
+  "bundleDependencies": false,
+  "dependencies": {
+    "good-listener": "^1.2.2",
+    "select": "^1.1.2",
+    "tiny-emitter": "^2.0.0"
+  },
+  "deprecated": false,
+  "description": "Modern copy to clipboard. No Flash. Just 2kb",
+  "devDependencies": {
+    "babel-core": "^6.26.0",
+    "babel-loader": "^7.1.4",
+    "babel-preset-env": "^1.7.0",
+    "chai": "^4.2.0",
+    "cross-env": "^5.2.0",
+    "karma": "^3.1.1",
+    "karma-chai": "^0.1.0",
+    "karma-chrome-launcher": "^2.2.0",
+    "karma-mocha": "^1.2.0",
+    "karma-sinon": "^1.0.4",
+    "karma-webpack": "^3.0.5",
+    "mocha": "^5.2.0",
+    "sinon": "^7.1.1",
+    "uglifyjs-webpack-plugin": "^2.0.1",
+    "webpack": "^4.5.0",
+    "webpack-cli": "^3.1.2"
+  },
+  "homepage": "https://github.com/zenorocha/clipboard.js#readme",
+  "keywords": [
+    "clipboard",
+    "copy",
+    "cut"
+  ],
+  "license": "MIT",
+  "main": "dist/clipboard.js",
+  "name": "clipboard",
+  "repository": {
+    "type": "git",
+    "url": "git+https://github.com/zenorocha/clipboard.js.git"
+  },
+  "scripts": {
+    "build": "npm run build-debug && npm run build-min",
+    "build-debug": "webpack",
+    "build-min": "cross-env NODE_ENV=production webpack",
+    "build-watch": "webpack --watch",
+    "prepublish": "npm run build",
+    "test": "karma start --single-run"
+  },
+  "version": "2.0.6"
+}

+ 189 - 0
node_modules/clipboard/readme.md

@@ -0,0 +1,189 @@
+# clipboard.js
+
+[![Build Status](http://img.shields.io/travis/zenorocha/clipboard.js/master.svg?style=flat)](https://travis-ci.org/zenorocha/clipboard.js)
+![Killing Flash](https://img.shields.io/badge/killing-flash-brightgreen.svg?style=flat)
+
+> Modern copy to clipboard. No Flash. Just 3kb gzipped.
+
+<a href="https://clipboardjs.com/"><img width="728" src="https://cloud.githubusercontent.com/assets/398893/16165747/a0f6fc46-349a-11e6-8c9b-c5fd58d9099c.png" alt="Demo"></a>
+
+## Why
+
+Copying text to the clipboard shouldn't be hard. It shouldn't require dozens of steps to configure or hundreds of KBs to load. But most of all, it shouldn't depend on Flash or any bloated framework.
+
+That's why clipboard.js exists.
+
+## Install
+
+You can get it on npm.
+
+```
+npm install clipboard --save
+```
+
+Or if you're not into package management, just [download a ZIP](https://github.com/zenorocha/clipboard.js/archive/master.zip) file.
+
+## Setup
+
+First, include the script located on the `dist` folder or load it from [a third-party CDN provider](https://github.com/zenorocha/clipboard.js/wiki/CDN-Providers).
+
+```html
+<script src="dist/clipboard.min.js"></script>
+```
+
+Now, you need to instantiate it by [passing a DOM selector](https://github.com/zenorocha/clipboard.js/blob/master/demo/constructor-selector.html#L18), [HTML element](https://github.com/zenorocha/clipboard.js/blob/master/demo/constructor-node.html#L16-L17), or [list of HTML elements](https://github.com/zenorocha/clipboard.js/blob/master/demo/constructor-nodelist.html#L18-L19).
+
+```js
+new ClipboardJS('.btn');
+```
+
+Internally, we need to fetch all elements that matches with your selector and attach event listeners for each one. But guess what? If you have hundreds of matches, this operation can consume a lot of memory.
+
+For this reason we use [event delegation](https://stackoverflow.com/questions/1687296/what-is-dom-event-delegation) which replaces multiple event listeners with just a single listener. After all, [#perfmatters](https://twitter.com/hashtag/perfmatters).
+
+# Usage
+
+We're living a _declarative renaissance_, that's why we decided to take advantage of [HTML5 data attributes](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Using_data_attributes) for better usability.
+
+### Copy text from another element
+
+A pretty common use case is to copy content from another element. You can do that by adding a `data-clipboard-target` attribute in your trigger element.
+
+The value you include on this attribute needs to match another's element selector.
+
+<a href="https://clipboardjs.com/#example-target"><img width="473" alt="example-2" src="https://cloud.githubusercontent.com/assets/398893/9983467/a4946aaa-5fb1-11e5-9780-f09fcd7ca6c8.png"></a>
+
+```html
+<!-- Target -->
+<input id="foo" value="https://github.com/zenorocha/clipboard.js.git">
+
+<!-- Trigger -->
+<button class="btn" data-clipboard-target="#foo">
+    <img src="assets/clippy.svg" alt="Copy to clipboard">
+</button>
+```
+
+### Cut text from another element
+
+Additionally, you can define a `data-clipboard-action` attribute to specify if you want to either `copy` or `cut` content.
+
+If you omit this attribute, `copy` will be used by default.
+
+<a href="https://clipboardjs.com/#example-action"><img width="473" alt="example-3" src="https://cloud.githubusercontent.com/assets/398893/10000358/7df57b9c-6050-11e5-9cd1-fbc51d2fd0a7.png"></a>
+
+```html
+<!-- Target -->
+<textarea id="bar">Mussum ipsum cacilds...</textarea>
+
+<!-- Trigger -->
+<button class="btn" data-clipboard-action="cut" data-clipboard-target="#bar">
+    Cut to clipboard
+</button>
+```
+
+As you may expect, the `cut` action only works on `<input>` or `<textarea>` elements.
+
+### Copy text from attribute
+
+Truth is, you don't even need another element to copy its content from. You can just include a `data-clipboard-text` attribute in your trigger element.
+
+<a href="https://clipboardjs.com/#example-text"><img width="147" alt="example-1" src="https://cloud.githubusercontent.com/assets/398893/10000347/6e16cf8c-6050-11e5-9883-1c5681f9ec45.png"></a>
+
+```html
+<!-- Trigger -->
+<button class="btn" data-clipboard-text="Just because you can doesn't mean you should — clipboard.js">
+    Copy to clipboard
+</button>
+```
+
+## Events
+
+There are cases where you'd like to show some user feedback or capture what has been selected after a copy/cut operation.
+
+That's why we fire custom events such as `success` and `error` for you to listen and implement your custom logic.
+
+```js
+var clipboard = new ClipboardJS('.btn');
+
+clipboard.on('success', function(e) {
+    console.info('Action:', e.action);
+    console.info('Text:', e.text);
+    console.info('Trigger:', e.trigger);
+
+    e.clearSelection();
+});
+
+clipboard.on('error', function(e) {
+    console.error('Action:', e.action);
+    console.error('Trigger:', e.trigger);
+});
+```
+
+For a live demonstration, go to this [site](https://clipboardjs.com/) and open your console.
+
+## Tooltips
+
+Each application has different design needs, that's why clipboard.js does not include any CSS or built-in tooltip solution.
+
+The tooltips you see on the [demo site](https://clipboardjs.com/) were built using [GitHub's Primer](https://primer.style/css/components/tooltips). You may want to check that out if you're looking for a similar look and feel.
+
+## Advanced Options
+
+If you don't want to modify your HTML, there's a pretty handy imperative API for you to use. All you need to do is declare a function, do your thing, and return a value.
+
+For instance, if you want to dynamically set a `target`, you'll need to return a Node.
+
+```js
+new ClipboardJS('.btn', {
+    target: function(trigger) {
+        return trigger.nextElementSibling;
+    }
+});
+```
+
+If you want to dynamically set a `text`, you'll return a String.
+
+```js
+new ClipboardJS('.btn', {
+    text: function(trigger) {
+        return trigger.getAttribute('aria-label');
+    }
+});
+```
+
+For use in Bootstrap Modals or with any other library that changes the focus you'll want to set the focused element as the `container` value.
+
+```js
+new ClipboardJS('.btn', {
+    container: document.getElementById('modal')
+});
+```
+
+Also, if you are working with single page apps, you may want to manage the lifecycle of the DOM more precisely. Here's how you clean up the events and objects that we create.
+
+```js
+var clipboard = new ClipboardJS('.btn');
+clipboard.destroy();
+```
+
+## Browser Support
+
+This library relies on both [Selection](https://developer.mozilla.org/en-US/docs/Web/API/Selection) and [execCommand](https://developer.mozilla.org/en-US/docs/Web/API/Document/execCommand) APIs. The first one is [supported by all browsers](https://caniuse.com/#search=selection) while the second one is supported in the following browsers.
+
+| <img src="https://clipboardjs.com/assets/images/chrome.png" width="48px" height="48px" alt="Chrome logo"> | <img src="https://clipboardjs.com/assets/images/edge.png" width="48px" height="48px" alt="Edge logo"> | <img src="https://clipboardjs.com/assets/images/firefox.png" width="48px" height="48px" alt="Firefox logo"> | <img src="https://clipboardjs.com/assets/images/ie.png" width="48px" height="48px" alt="Internet Explorer logo"> | <img src="https://clipboardjs.com/assets/images/opera.png" width="48px" height="48px" alt="Opera logo"> | <img src="https://clipboardjs.com/assets/images/safari.png" width="48px" height="48px" alt="Safari logo"> |
+|:---:|:---:|:---:|:---:|:---:|:---:|
+| 42+ ✔ | 12+ ✔ | 41+ ✔ | 9+ ✔ | 29+ ✔ | 10+ ✔ |
+
+The good news is that clipboard.js gracefully degrades if you need to support older browsers. All you have to do is show a tooltip saying `Copied!` when `success` event is called and `Press Ctrl+C to copy` when `error` event is called because the text is already selected.
+
+You can also check if clipboard.js is supported or not by running `ClipboardJS.isSupported()`, that way you can hide copy/cut buttons from the UI.
+
+## Bonus
+
+A browser extension that adds a "copy to clipboard" button to every code block on *GitHub, MDN, Gist, StackOverflow, StackExchange, npm, and even Medium.*
+
+Install for [Chrome](https://chrome.google.com/webstore/detail/codecopy/fkbfebkcoelajmhanocgppanfoojcdmg) and [Firefox](https://addons.mozilla.org/en-US/firefox/addon/codecopy/).
+
+## License
+
+[MIT License](https://zenorocha.mit-license.org/) © Zeno Rocha

+ 204 - 0
node_modules/clipboard/src/clipboard-action.js

@@ -0,0 +1,204 @@
+import select from 'select';
+
+/**
+ * Inner class which performs selection from either `text` or `target`
+ * properties and then executes copy or cut operations.
+ */
+class ClipboardAction {
+    /**
+     * @param {Object} options
+     */
+    constructor(options) {
+        this.resolveOptions(options);
+        this.initSelection();
+    }
+
+    /**
+     * Defines base properties passed from constructor.
+     * @param {Object} options
+     */
+    resolveOptions(options = {}) {
+        this.action    = options.action;
+        this.container = options.container;
+        this.emitter   = options.emitter;
+        this.target    = options.target;
+        this.text      = options.text;
+        this.trigger   = options.trigger;
+
+        this.selectedText = '';
+    }
+
+    /**
+     * Decides which selection strategy is going to be applied based
+     * on the existence of `text` and `target` properties.
+     */
+    initSelection() {
+        if (this.text) {
+            this.selectFake();
+        }
+        else if (this.target) {
+            this.selectTarget();
+        }
+    }
+
+    /**
+     * Creates a fake textarea element, sets its value from `text` property,
+     * and makes a selection on it.
+     */
+    selectFake() {
+        const isRTL = document.documentElement.getAttribute('dir') == 'rtl';
+
+        this.removeFake();
+
+        this.fakeHandlerCallback = () => this.removeFake();
+        this.fakeHandler = this.container.addEventListener('click', this.fakeHandlerCallback) || true;
+
+        this.fakeElem = document.createElement('textarea');
+        // Prevent zooming on iOS
+        this.fakeElem.style.fontSize = '12pt';
+        // Reset box model
+        this.fakeElem.style.border = '0';
+        this.fakeElem.style.padding = '0';
+        this.fakeElem.style.margin = '0';
+        // Move element out of screen horizontally
+        this.fakeElem.style.position = 'absolute';
+        this.fakeElem.style[ isRTL ? 'right' : 'left' ] = '-9999px';
+        // Move element to the same position vertically
+        let yPosition = window.pageYOffset || document.documentElement.scrollTop;
+        this.fakeElem.style.top = `${yPosition}px`;
+
+        this.fakeElem.setAttribute('readonly', '');
+        this.fakeElem.value = this.text;
+
+        this.container.appendChild(this.fakeElem);
+
+        this.selectedText = select(this.fakeElem);
+        this.copyText();
+    }
+
+    /**
+     * Only removes the fake element after another click event, that way
+     * a user can hit `Ctrl+C` to copy because selection still exists.
+     */
+    removeFake() {
+        if (this.fakeHandler) {
+            this.container.removeEventListener('click', this.fakeHandlerCallback);
+            this.fakeHandler = null;
+            this.fakeHandlerCallback = null;
+        }
+
+        if (this.fakeElem) {
+            this.container.removeChild(this.fakeElem);
+            this.fakeElem = null;
+        }
+    }
+
+    /**
+     * Selects the content from element passed on `target` property.
+     */
+    selectTarget() {
+        this.selectedText = select(this.target);
+        this.copyText();
+    }
+
+    /**
+     * Executes the copy operation based on the current selection.
+     */
+    copyText() {
+        let succeeded;
+
+        try {
+            succeeded = document.execCommand(this.action);
+        }
+        catch (err) {
+            succeeded = false;
+        }
+
+        this.handleResult(succeeded);
+    }
+
+    /**
+     * Fires an event based on the copy operation result.
+     * @param {Boolean} succeeded
+     */
+    handleResult(succeeded) {
+        this.emitter.emit(succeeded ? 'success' : 'error', {
+            action: this.action,
+            text: this.selectedText,
+            trigger: this.trigger,
+            clearSelection: this.clearSelection.bind(this)
+        });
+    }
+
+    /**
+     * Moves focus away from `target` and back to the trigger, removes current selection.
+     */
+    clearSelection() {
+        if (this.trigger) {
+            this.trigger.focus();
+        }
+        document.activeElement.blur();
+        window.getSelection().removeAllRanges();
+    }
+
+    /**
+     * Sets the `action` to be performed which can be either 'copy' or 'cut'.
+     * @param {String} action
+     */
+    set action(action = 'copy') {
+        this._action = action;
+
+        if (this._action !== 'copy' && this._action !== 'cut') {
+            throw new Error('Invalid "action" value, use either "copy" or "cut"');
+        }
+    }
+
+    /**
+     * Gets the `action` property.
+     * @return {String}
+     */
+    get action() {
+        return this._action;
+    }
+
+    /**
+     * Sets the `target` property using an element
+     * that will be have its content copied.
+     * @param {Element} target
+     */
+    set target(target) {
+        if (target !== undefined) {
+            if (target && typeof target === 'object' && target.nodeType === 1) {
+                if (this.action === 'copy' && target.hasAttribute('disabled')) {
+                    throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');
+                }
+
+                if (this.action === 'cut' && (target.hasAttribute('readonly') || target.hasAttribute('disabled'))) {
+                    throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');
+                }
+
+                this._target = target;
+            }
+            else {
+                throw new Error('Invalid "target" value, use a valid Element');
+            }
+        }
+    }
+
+    /**
+     * Gets the `target` property.
+     * @return {String|HTMLElement}
+     */
+    get target() {
+        return this._target;
+    }
+
+    /**
+     * Destroy lifecycle.
+     */
+    destroy() {
+        this.removeFake();
+    }
+}
+
+export default ClipboardAction;

+ 135 - 0
node_modules/clipboard/src/clipboard.js

@@ -0,0 +1,135 @@
+import ClipboardAction from './clipboard-action';
+import Emitter from 'tiny-emitter';
+import listen from 'good-listener';
+
+/**
+ * Base class which takes one or more elements, adds event listeners to them,
+ * and instantiates a new `ClipboardAction` on each click.
+ */
+class Clipboard extends Emitter {
+    /**
+     * @param {String|HTMLElement|HTMLCollection|NodeList} trigger
+     * @param {Object} options
+     */
+    constructor(trigger, options) {
+        super();
+
+        this.resolveOptions(options);
+        this.listenClick(trigger);
+    }
+
+    /**
+     * Defines if attributes would be resolved using internal setter functions
+     * or custom functions that were passed in the constructor.
+     * @param {Object} options
+     */
+    resolveOptions(options = {}) {
+        this.action    = (typeof options.action    === 'function') ? options.action    : this.defaultAction;
+        this.target    = (typeof options.target    === 'function') ? options.target    : this.defaultTarget;
+        this.text      = (typeof options.text      === 'function') ? options.text      : this.defaultText;
+        this.container = (typeof options.container === 'object')   ? options.container : document.body;
+    }
+
+    /**
+     * Adds a click event listener to the passed trigger.
+     * @param {String|HTMLElement|HTMLCollection|NodeList} trigger
+     */
+    listenClick(trigger) {
+        this.listener = listen(trigger, 'click', (e) => this.onClick(e));
+    }
+
+    /**
+     * Defines a new `ClipboardAction` on each click event.
+     * @param {Event} e
+     */
+    onClick(e) {
+        const trigger = e.delegateTarget || e.currentTarget;
+
+        if (this.clipboardAction) {
+            this.clipboardAction = null;
+        }
+
+        this.clipboardAction = new ClipboardAction({
+            action    : this.action(trigger),
+            target    : this.target(trigger),
+            text      : this.text(trigger),
+            container : this.container,
+            trigger   : trigger,
+            emitter   : this
+        });
+    }
+
+    /**
+     * Default `action` lookup function.
+     * @param {Element} trigger
+     */
+    defaultAction(trigger) {
+        return getAttributeValue('action', trigger);
+    }
+
+    /**
+     * Default `target` lookup function.
+     * @param {Element} trigger
+     */
+    defaultTarget(trigger) {
+        const selector = getAttributeValue('target', trigger);
+
+        if (selector) {
+            return document.querySelector(selector);
+        }
+    }
+
+    /**
+     * Returns the support of the given action, or all actions if no action is
+     * given.
+     * @param {String} [action]
+     */
+    static isSupported(action = ['copy', 'cut']) {
+        const actions = (typeof action === 'string') ? [action] : action;
+        let support = !!document.queryCommandSupported;
+
+        actions.forEach((action) => {
+            support = support && !!document.queryCommandSupported(action);
+        });
+
+        return support;
+    }
+
+    /**
+     * Default `text` lookup function.
+     * @param {Element} trigger
+     */
+    defaultText(trigger) {
+        return getAttributeValue('text', trigger);
+    }
+
+    /**
+     * Destroy lifecycle.
+     */
+    destroy() {
+        this.listener.destroy();
+
+        if (this.clipboardAction) {
+            this.clipboardAction.destroy();
+            this.clipboardAction = null;
+        }
+    }
+}
+
+
+/**
+ * Helper function to retrieve attribute value.
+ * @param {String} suffix
+ * @param {Element} element
+ */
+function getAttributeValue(suffix, element) {
+    const attribute = `data-clipboard-${suffix}`;
+
+    if (!element.hasAttribute(attribute)) {
+        return;
+    }
+
+    return element.getAttribute(attribute);
+}
+
+export default Clipboard;

+ 243 - 0
node_modules/clipboard/test/clipboard-action.js

@@ -0,0 +1,243 @@
+import ClipboardAction from '../src/clipboard-action';
+import Emitter from 'tiny-emitter';
+
+describe('ClipboardAction', () => {
+    before(() => {
+        global.input = document.createElement('input');
+        global.input.setAttribute('id', 'input');
+        global.input.setAttribute('value', 'abc');
+        document.body.appendChild(global.input);
+
+        global.paragraph = document.createElement('p');
+        global.paragraph.setAttribute('id', 'paragraph');
+        global.paragraph.textContent = 'abc';
+        document.body.appendChild(global.paragraph);
+    });
+
+    after(() => {
+        document.body.innerHTML = '';
+    });
+
+    describe('#resolveOptions', () => {
+        it('should set base properties', () => {
+            let clip = new ClipboardAction({
+                emitter: new Emitter(),
+                container: document.body,
+                text: 'foo'
+            });
+
+            assert.property(clip, 'action');
+            assert.property(clip, 'container');
+            assert.property(clip, 'emitter');
+            assert.property(clip, 'target');
+            assert.property(clip, 'text');
+            assert.property(clip, 'trigger');
+            assert.property(clip, 'selectedText');
+        });
+    });
+
+    describe('#initSelection', () => {
+        it('should set the position right style property', done => {
+            // Set document direction
+            document.documentElement.setAttribute('dir', 'rtl');
+
+            let clip = new ClipboardAction({
+                    emitter: new Emitter(),
+                    container: document.body,
+                    text: 'foo'
+                });
+
+            assert.equal(clip.fakeElem.style.right, '-9999px');
+            done();
+        });
+    });
+
+    describe('#set action', () => {
+        it('should throw an error since "action" is invalid', done => {
+            try {
+                new ClipboardAction({
+                    text: 'foo',
+                    action: 'paste'
+                });
+            }
+            catch(e) {
+                assert.equal(e.message, 'Invalid "action" value, use either "copy" or "cut"');
+                done();
+            }
+        });
+    });
+
+    describe('#set target', () => {
+        it('should throw an error since "target" do not match any element', done => {
+            try {
+                new ClipboardAction({
+                    target: document.querySelector('#foo')
+                });
+            }
+            catch(e) {
+                assert.equal(e.message, 'Invalid "target" value, use a valid Element');
+                done();
+            }
+        });
+    });
+
+    describe('#selectText', () => {
+        it('should create a fake element and select its value', () => {
+            let clip = new ClipboardAction({
+                emitter: new Emitter(),
+                container: document.body,
+                text: 'blah'
+            });
+
+            assert.equal(clip.selectedText, clip.fakeElem.value);
+        });
+    });
+
+    describe('#removeFake', () => {
+        it('should remove a temporary fake element', () => {
+            let clip = new ClipboardAction({
+                emitter: new Emitter(),
+                container: document.body,
+                text: 'blah'
+            });
+
+            clip.removeFake();
+
+            assert.equal(clip.fakeElem, null);
+        });
+    });
+
+    describe('#selectTarget', () => {
+        it('should select text from editable element', () => {
+            let clip = new ClipboardAction({
+                emitter: new Emitter(),
+                container: document.body,
+                target: document.querySelector('#input')
+            });
+
+            assert.equal(clip.selectedText, clip.target.value);
+        });
+
+        it('should select text from non-editable element', () => {
+            let clip = new ClipboardAction({
+                emitter: new Emitter(),
+                container: document.body,
+                target: document.querySelector('#paragraph')
+            });
+
+            assert.equal(clip.selectedText, clip.target.textContent);
+        });
+    });
+
+    describe('#copyText', () => {
+        before(() => {
+            global.stub = sinon.stub(document, 'execCommand');
+        });
+
+        after(() => {
+            global.stub.restore();
+        });
+
+        it('should fire a success event on browsers that support copy command', done => {
+            global.stub.returns(true);
+
+            let emitter = new Emitter();
+
+            emitter.on('success', () => {
+                done();
+            });
+
+            let clip = new ClipboardAction({
+                emitter,
+                target: document.querySelector('#input')
+            });
+        });
+
+        it('should fire an error event on browsers that support copy command', done => {
+            global.stub.returns(false);
+
+            let emitter = new Emitter();
+
+            emitter.on('error', () => {
+                done();
+            });
+
+            let clip = new ClipboardAction({
+                emitter,
+                target: document.querySelector('#input')
+            });
+        });
+    });
+
+    describe('#handleResult', () => {
+        it('should fire a success event with certain properties', done => {
+            let clip = new ClipboardAction({
+                emitter: new Emitter(),
+                container: document.body,
+                target: document.querySelector('#input')
+            });
+
+            clip.emitter.on('success', (e) => {
+                assert.property(e, 'action');
+                assert.property(e, 'text');
+                assert.property(e, 'trigger');
+                assert.property(e, 'clearSelection');
+
+                done();
+            });
+
+            clip.handleResult(true);
+        });
+
+        it('should fire a error event with certain properties', done => {
+            let clip = new ClipboardAction({
+                emitter: new Emitter(),
+                container: document.body,
+                target: document.querySelector('#input')
+            });
+
+            clip.emitter.on('error', (e) => {
+                assert.property(e, 'action');
+                assert.property(e, 'trigger');
+                assert.property(e, 'clearSelection');
+
+                done();
+            });
+
+            clip.handleResult(false);
+        });
+    });
+
+    describe('#clearSelection', () => {
+        it('should remove focus from target and text selection', () => {
+            let clip = new ClipboardAction({
+                emitter: new Emitter(),
+                container: document.body,
+                target: document.querySelector('#input')
+            });
+
+            clip.clearSelection();
+
+            let selectedElem = document.activeElement;
+            let selectedText = window.getSelection().toString();
+
+            assert.equal(selectedElem, document.body);
+            assert.equal(selectedText, '');
+        });
+    });
+
+    describe('#destroy', () => {
+        it('should destroy an existing fake element', () => {
+            let clip = new ClipboardAction({
+                emitter: new Emitter(),
+                container: document.body,
+                text: 'blah'
+            });
+
+            clip.selectFake();
+            clip.destroy();
+
+            assert.equal(clip.fakeElem, null);
+        });
+    });
+});

+ 132 - 0
node_modules/clipboard/test/clipboard.js

@@ -0,0 +1,132 @@
+import Clipboard from '../src/clipboard';
+import ClipboardAction from '../src/clipboard-action';
+import listen from 'good-listener';
+
+describe('Clipboard', () => {
+    before(() => {
+        global.button = document.createElement('button');
+        global.button.setAttribute('class', 'btn');
+        global.button.setAttribute('data-clipboard-text', 'foo');
+        document.body.appendChild(global.button);
+
+        global.span = document.createElement('span');
+        global.span.innerHTML = 'bar';
+
+        global.button.appendChild(span);
+
+        global.event = {
+            target: global.button,
+            currentTarget: global.button
+        };
+    });
+
+    after(() => {
+        document.body.innerHTML = '';
+    });
+
+    describe('#resolveOptions', () => {
+        before(() => {
+            global.fn = () => {};
+        });
+
+        it('should set action as a function', () => {
+            let clipboard = new Clipboard('.btn', {
+                action: global.fn
+            });
+
+            assert.equal(global.fn, clipboard.action);
+        });
+
+        it('should set target as a function', () => {
+            let clipboard = new Clipboard('.btn', {
+                target: global.fn
+            });
+
+            assert.equal(global.fn, clipboard.target);
+        });
+
+        it('should set text as a function', () => {
+            let clipboard = new Clipboard('.btn', {
+                text: global.fn
+            });
+
+            assert.equal(global.fn, clipboard.text);
+        });
+
+        it('should set container as an object', () => {
+            let clipboard = new Clipboard('.btn', {
+                container: document.body
+            });
+
+            assert.equal(document.body, clipboard.container);
+        });
+
+        it('should set container as body by default', () => {
+            let clipboard = new Clipboard('.btn');
+
+            assert.equal(document.body, clipboard.container);
+        });
+    });
+
+    describe('#listenClick', () => {
+        it('should add a click event listener to the passed selector', () => {
+            let clipboard = new Clipboard('.btn');
+            assert.isObject(clipboard.listener);
+        });
+    });
+
+    describe('#onClick', () => {
+        it('should create a new instance of ClipboardAction', () => {
+            let clipboard = new Clipboard('.btn');
+
+            clipboard.onClick(global.event);
+            assert.instanceOf(clipboard.clipboardAction, ClipboardAction);
+        });
+
+        it('should use an event\'s currentTarget when not equal to target', () => {
+            let clipboard = new Clipboard('.btn');
+            let bubbledEvent = { target: global.span, currentTarget: global.button };
+
+            clipboard.onClick(bubbledEvent);
+            assert.instanceOf(clipboard.clipboardAction, ClipboardAction);
+        });
+
+        it('should throw an exception when target is invalid', done => {
+            try {
+                const clipboard = new Clipboard('.btn', {
+                    target() {
+                        return null;
+                    }
+                });
+
+                clipboard.onClick(global.event);
+            }
+            catch(e) {
+                assert.equal(e.message, 'Invalid "target" value, use a valid Element');
+                done();
+            }
+        });
+    });
+
+    describe('#static isSupported', () => {
+        it('should return the support of the given action', () => {
+            assert.equal(Clipboard.isSupported('copy'), true);
+            assert.equal(Clipboard.isSupported('cut'), true);
+        });
+
+        it('should return the support of the cut and copy actions', () => {
+            assert.equal(Clipboard.isSupported(), true);
+        });
+    });
+
+    describe('#destroy', () => {
+        it('should destroy an existing instance of ClipboardAction', () => {
+            let clipboard = new Clipboard('.btn');
+
+            clipboard.onClick(global.event);
+            clipboard.destroy();
+
+            assert.equal(clipboard.clipboardAction, null);
+        });
+    });
+});

+ 46 - 0
node_modules/clipboard/webpack.config.js

@@ -0,0 +1,46 @@
+const pkg = require('./package.json');
+const path = require('path');
+const webpack = require('webpack');
+const UglifyJSPlugin = require('uglifyjs-webpack-plugin');
+
+const production = process.env.NODE_ENV === 'production' || false;
+
+const banner = `clipboard.js v${pkg.version}
+https://clipboardjs.com/
+
+Licensed MIT © Zeno Rocha`;
+
+module.exports = {
+    entry: './src/clipboard.js',
+    mode: 'production',
+    output: {
+        filename: production ? 'clipboard.min.js' : 'clipboard.js',
+        path: path.resolve(__dirname, 'dist'),
+        library: 'ClipboardJS',
+        globalObject: 'this',
+        libraryExport: 'default',
+        libraryTarget: 'umd'
+    },
+    module: {
+        rules: [
+            {test: /\.js$/, exclude: /node_modules/, loader: 'babel-loader'}
+        ]
+    },
+    optimization: {
+        minimize: production,
+        minimizer: [
+            new UglifyJSPlugin({
+                parallel: require('os').cpus().length,
+                uglifyOptions: {
+                    ie8: false,
+                    keep_fnames: false,
+                    output: {
+                        beautify: false,
+                        comments: (node, {value, type}) => type == 'comment2' && value.startsWith('!')
+                    }
+                }
+            })
+        ]
+    },
+    plugins: [new webpack.BannerPlugin({ banner })]
+};

+ 65 - 0
node_modules/cliui/CHANGELOG.md

@@ -0,0 +1,65 @@
+# Change Log
+
+All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
+
+# [5.0.0](https://github.com/yargs/cliui/compare/v4.1.0...v5.0.0) (2019-04-10)
+
+
+### Bug Fixes
+
+* Update wrap-ansi to fix compatibility with latest versions of chalk. ([#60](https://github.com/yargs/cliui/issues/60)) ([7bf79ae](https://github.com/yargs/cliui/commit/7bf79ae))
+
+
+### BREAKING CHANGES
+
+* Drop support for node < 6.
+
+
+
+<a name="4.1.0"></a>
+# [4.1.0](https://github.com/yargs/cliui/compare/v4.0.0...v4.1.0) (2018-04-23)
+
+
+### Features
+
+* add resetOutput method ([#57](https://github.com/yargs/cliui/issues/57)) ([7246902](https://github.com/yargs/cliui/commit/7246902))
+
+
+
+<a name="4.0.0"></a>
+# [4.0.0](https://github.com/yargs/cliui/compare/v3.2.0...v4.0.0) (2017-12-18)
+
+
+### Bug Fixes
+
+* downgrades strip-ansi to version 3.0.1 ([#54](https://github.com/yargs/cliui/issues/54)) ([5764c46](https://github.com/yargs/cliui/commit/5764c46))
+* set env variable FORCE_COLOR. ([#56](https://github.com/yargs/cliui/issues/56)) ([7350e36](https://github.com/yargs/cliui/commit/7350e36))
+
+
+### Chores
+
+* drop support for node < 4 ([#53](https://github.com/yargs/cliui/issues/53)) ([b105376](https://github.com/yargs/cliui/commit/b105376))
+
+
+### Features
+
+* add fallback for window width ([#45](https://github.com/yargs/cliui/issues/45)) ([d064922](https://github.com/yargs/cliui/commit/d064922))
+
+
+### BREAKING CHANGES
+
+* officially drop support for Node < 4
+
+
+
+<a name="3.2.0"></a>
+# [3.2.0](https://github.com/yargs/cliui/compare/v3.1.2...v3.2.0) (2016-04-11)
+
+
+### Bug Fixes
+
+* reduces tarball size ([acc6c33](https://github.com/yargs/cliui/commit/acc6c33))
+
+### Features
+
+* adds standard-version for release management ([ff84e32](https://github.com/yargs/cliui/commit/ff84e32))

+ 14 - 0
node_modules/cliui/LICENSE.txt

@@ -0,0 +1,14 @@
+Copyright (c) 2015, Contributors
+
+Permission to use, copy, modify, and/or distribute this software
+for any purpose with or without fee is hereby granted, provided
+that the above copyright notice and this permission notice
+appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE
+LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

+ 115 - 0
node_modules/cliui/README.md

@@ -0,0 +1,115 @@
+# cliui
+
+[![Build Status](https://travis-ci.org/yargs/cliui.svg)](https://travis-ci.org/yargs/cliui)
+[![Coverage Status](https://coveralls.io/repos/yargs/cliui/badge.svg?branch=)](https://coveralls.io/r/yargs/cliui?branch=)
+[![NPM version](https://img.shields.io/npm/v/cliui.svg)](https://www.npmjs.com/package/cliui)
+[![Standard Version](https://img.shields.io/badge/release-standard%20version-brightgreen.svg)](https://github.com/conventional-changelog/standard-version)
+
+easily create complex multi-column command-line-interfaces.
+
+## Example
+
+```js
+var ui = require('cliui')()
+
+ui.div('Usage: $0 [command] [options]')
+
+ui.div({
+  text: 'Options:',
+  padding: [2, 0, 2, 0]
+})
+
+ui.div(
+  {
+    text: "-f, --file",
+    width: 20,
+    padding: [0, 4, 0, 4]
+  },
+  {
+    text: "the file to load." +
+      chalk.green("(if this description is long it wraps).")
+    ,
+    width: 20
+  },
+  {
+    text: chalk.red("[required]"),
+    align: 'right'
+  }
+)
+
+console.log(ui.toString())
+```
+
+<img width="500" src="screenshot.png">
+
+## Layout DSL
+
+cliui exposes a simple layout DSL:
+
+If you create a single `ui.div`, passing a string rather than an
+object:
+
+* `\n`: characters will be interpreted as new rows.
+* `\t`: characters will be interpreted as new columns.
+* `\s`: characters will be interpreted as padding.
+
+**as an example...**
+
+```js
+var ui = require('./')({
+  width: 60
+})
+
+ui.div(
+  'Usage: node ./bin/foo.js\n' +
+  '  <regex>\t  provide a regex\n' +
+  '  <glob>\t  provide a glob\t [required]'
+)
+
+console.log(ui.toString())
+```
+
+**will output:**
+
+```shell
+Usage: node ./bin/foo.js
+  <regex>  provide a regex
+  <glob>   provide a glob          [required]
+```
+
+## Methods
+
+```js
+cliui = require('cliui')
+```
+
+### cliui({width: integer})
+
+Specify the maximum width of the UI being generated.
+If no width is provided, cliui will try to get the current window's width and use it, and if that doesn't work, width will be set to `80`.
+
+### cliui({wrap: boolean})
+
+Enable or disable the wrapping of text in a column.
+
+### cliui.div(column, column, column)
+
+Create a row with any number of columns, a column
+can either be a string, or an object with the following
+options:
+
+* **text:** some text to place in the column.
+* **width:** the width of a column.
+* **align:** alignment, `right` or `center`.
+* **padding:** `[top, right, bottom, left]`.
+* **border:** should a border be placed around the div?
+
+### cliui.span(column, column, column)
+
+Similar to `div`, except the next row will be appended without
+a new line being created.
+
+### cliui.resetOutput()
+
+Resets the UI elements of the current cliui instance, maintaining the values
+set for `width` and `wrap`.

+ 324 - 0
node_modules/cliui/index.js

@@ -0,0 +1,324 @@
+var stringWidth = require('string-width')
+var stripAnsi = require('strip-ansi')
+var wrap = require('wrap-ansi')
+var align = {
+  right: alignRight,
+  center: alignCenter
+}
+var top = 0
+var right = 1
+var bottom = 2
+var left = 3
+
+function UI (opts) {
+  this.width = opts.width
+  this.wrap = opts.wrap
+  this.rows = []
+}
+
+UI.prototype.span = function () {
+  var cols = this.div.apply(this, arguments)
+  cols.span = true
+}
+
+UI.prototype.resetOutput = function () {
+  this.rows = []
+}
+
+UI.prototype.div = function () {
+  if (arguments.length === 0) this.div('')
+  if (this.wrap && this._shouldApplyLayoutDSL.apply(this, arguments)) {
+    return this._applyLayoutDSL(arguments[0])
+  }
+
+  var cols = []
+
+  for (var i = 0, arg; (arg = arguments[i]) !== undefined; i++) {
+    if (typeof arg === 'string') cols.push(this._colFromString(arg))
+    else cols.push(arg)
+  }
+
+  this.rows.push(cols)
+  return cols
+}
+
+UI.prototype._shouldApplyLayoutDSL = function () {
+  return arguments.length === 1 && typeof arguments[0] === 'string' &&
+    /[\t\n]/.test(arguments[0])
+}
+
+UI.prototype._applyLayoutDSL = function (str) {
+  var _this = this
+  var rows = str.split('\n')
+  var leftColumnWidth = 0
+
+  // simple heuristic for layout, make sure the
+  // second column lines up along the left-hand.
+  // don't allow the first column to take up more
+  // than 50% of the screen.
+  rows.forEach(function (row) {
+    var columns = row.split('\t')
+    if (columns.length > 1 && stringWidth(columns[0]) > leftColumnWidth) {
+      leftColumnWidth = Math.min(
+        Math.floor(_this.width * 0.5),
+        stringWidth(columns[0])
+      )
+    }
+  })
+
+  // generate a table:
+  //  replacing ' ' with padding calculations.
+  //  using the algorithmically generated width.
+  rows.forEach(function (row) {
+    var columns = row.split('\t')
+    _this.div.apply(_this, columns.map(function (r, i) {
+      return {
+        text: r.trim(),
+        padding: _this._measurePadding(r),
+        width: (i === 0 && columns.length > 1) ? leftColumnWidth : undefined
+      }
+    }))
+  })
+
+  return this.rows[this.rows.length - 1]
+}
+
+UI.prototype._colFromString = function (str) {
+  return {
+    text: str,
+    padding: this._measurePadding(str)
+  }
+}
+
+UI.prototype._measurePadding = function (str) {
+  // measure padding without ansi escape codes
+  var noAnsi = stripAnsi(str)
+  return [0, noAnsi.match(/\s*$/)[0].length, 0, noAnsi.match(/^\s*/)[0].length]
+}
+
+UI.prototype.toString = function () {
+  var _this = this
+  var lines = []
+
+  _this.rows.forEach(function (row, i) {
+    _this.rowToString(row, lines)
+  })
+
+  // don't display any lines with the
+  // hidden flag set.
+  lines = lines.filter(function (line) {
+    return !line.hidden
+  })
+
+  return lines.map(function (line) {
+    return line.text
+  }).join('\n')
+}
+
+UI.prototype.rowToString = function (row, lines) {
+  var _this = this
+  var padding
+  var rrows = this._rasterize(row)
+  var str = ''
+  var ts
+  var width
+  var wrapWidth
+
+  rrows.forEach(function (rrow, r) {
+    str = ''
+    rrow.forEach(function (col, c) {
+      ts = '' // temporary string used during alignment/padding.
+      width = row[c].width // the width with padding.
+      wrapWidth = _this._negatePadding(row[c]) // the width without padding.
+
+      ts += col
+
+      for (var i = 0; i < wrapWidth - stringWidth(col); i++) {
+        ts += ' '
+      }
+
+      // align the string within its column.
+      if (row[c].align && row[c].align !== 'left' && _this.wrap) {
+        ts = align[row[c].align](ts, wrapWidth)
+        if (stringWidth(ts) < wrapWidth) ts += new Array(width - stringWidth(ts)).join(' ')
+      }
+
+      // apply border and padding to string.
+      padding = row[c].padding || [0, 0, 0, 0]
+      if (padding[left]) str += new Array(padding[left] + 1).join(' ')
+      str += addBorder(row[c], ts, '| ')
+      str += ts
+      str += addBorder(row[c], ts, ' |')
+      if (padding[right]) str += new Array(padding[right] + 1).join(' ')
+
+      // if prior row is span, try to render the
+      // current row on the prior line.
+      if (r === 0 && lines.length > 0) {
+        str = _this._renderInline(str, lines[lines.length - 1])
+      }
+    })
+
+    // remove trailing whitespace.
+    lines.push({
+      text: str.replace(/ +$/, ''),
+      span: row.span
+    })
+  })
+
+  return lines
+}
+
+function addBorder (col, ts, style) {
+  if (col.border) {
+    if (/[.']-+[.']/.test(ts)) return ''
+    else if (ts.trim().length) return style
+    else return '  '
+  }
+  return ''
+}
+
+// if the full 'source' can render in
+// the target line, do so.
+UI.prototype._renderInline = function (source, previousLine) {
+  var leadingWhitespace = source.match(/^ */)[0].length
+  var target = previousLine.text
+  var targetTextWidth = stringWidth(target.trimRight())
+
+  if (!previousLine.span) return source
+
+  // if we're not applying wrapping logic,
+  // just always append to the span.
+  if (!this.wrap) {
+    previousLine.hidden = true
+    return target + source
+  }
+
+  if (leadingWhitespace < targetTextWidth) return source
+
+  previousLine.hidden = true
+
+  return target.trimRight() + new Array(leadingWhitespace - targetTextWidth + 1).join(' ') + source.trimLeft()
+}
+
+UI.prototype._rasterize = function (row) {
+  var _this = this
+  var i
+  var rrow
+  var rrows = []
+  var widths = this._columnWidths(row)
+  var wrapped
+
+  // word wrap all columns, and create
+  // a data-structure that is easy to rasterize.
+  row.forEach(function (col, c) {
+    // leave room for left and right padding.
+    col.width = widths[c]
+    if (_this.wrap) wrapped = wrap(col.text, _this._negatePadding(col), { hard: true }).split('\n')
+    else wrapped = col.text.split('\n')
+
+    if (col.border) {
+      wrapped.unshift('.' + new Array(_this._negatePadding(col) + 3).join('-') + '.')
+      wrapped.push("'" + new Array(_this._negatePadding(col) + 3).join('-') + "'")
+    }
+
+    // add top and bottom padding.
+    if (col.padding) {
+      for (i = 0; i < (col.padding[top] || 0); i++) wrapped.unshift('')
+      for (i = 0; i < (col.padding[bottom] || 0); i++) wrapped.push('')
+    }
+
+    wrapped.forEach(function (str, r) {
+      if (!rrows[r]) rrows.push([])
+
+      rrow = rrows[r]
+
+      for (var i = 0; i < c; i++) {
+        if (rrow[i] === undefined) rrow.push('')
+      }
+      rrow.push(str)
+    })
+  })
+
+  return rrows
+}
+
+UI.prototype._negatePadding = function (col) {
+  var wrapWidth = col.width
+  if (col.padding) wrapWidth -= (col.padding[left] || 0) + (col.padding[right] || 0)
+  if (col.border) wrapWidth -= 4
+  return wrapWidth
+}
+
+UI.prototype._columnWidths = function (row) {
+  var _this = this
+  var widths = []
+  var unset = row.length
+  var unsetWidth
+  var remainingWidth = this.width
+
+  // column widths can be set in config.
+  row.forEach(function (col, i) {
+    if (col.width) {
+      unset--
+      widths[i] = col.width
+      remainingWidth -= col.width
+    } else {
+      widths[i] = undefined
+    }
+  })
+
+  // any unset widths should be calculated.
+  if (unset) unsetWidth = Math.floor(remainingWidth / unset)
+  widths.forEach(function (w, i) {
+    if (!_this.wrap) widths[i] = row[i].width || stringWidth(row[i].text)
+    else if (w === undefined) widths[i] = Math.max(unsetWidth, _minWidth(row[i]))
+  })
+
+  return widths
+}
+
+// calculates the minimum width of
+// a column, based on padding preferences.
+function _minWidth (col) {
+  var padding = col.padding || []
+  var minWidth = 1 + (padding[left] || 0) + (padding[right] || 0)
+  if (col.border) minWidth += 4
+  return minWidth
+}
+
+function getWindowWidth () {
+  if (typeof process === 'object' && process.stdout && process.stdout.columns) return process.stdout.columns
+}
+
+function alignRight (str, width) {
+  str = str.trim()
+  var padding = ''
+  var strWidth = stringWidth(str)
+
+  if (strWidth < width) {
+    padding = new Array(width - strWidth + 1).join(' ')
+  }
+
+  return padding + str
+}
+
+function alignCenter (str, width) {
+  str = str.trim()
+  var padding = ''
+  var strWidth = stringWidth(str.trim())
+
+  if (strWidth < width) {
+    padding = new Array(parseInt((width - strWidth) / 2, 10) + 1).join(' ')
+  }
+
+  return padding + str
+}
+
+module.exports = function (opts) {
+  opts = opts || {}
+
+  return new UI({
+    width: (opts || {}).width || getWindowWidth() || 80,
+    wrap: typeof opts.wrap === 'boolean' ? opts.wrap : true
+  })
+}

+ 99 - 0
node_modules/cliui/package.json

@@ -0,0 +1,99 @@
+{
+  "_from": "cliui@^5.0.0",
+  "_id": "cliui@5.0.0",
+  "_inBundle": false,
+  "_integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==",
+  "_location": "/cliui",
+  "_phantomChildren": {},
+  "_requested": {
+    "type": "range",
+    "registry": true,
+    "raw": "cliui@^5.0.0",
+    "name": "cliui",
+    "escapedName": "cliui",
+    "rawSpec": "^5.0.0",
+    "saveSpec": null,
+    "fetchSpec": "^5.0.0"
+  },
+  "_requiredBy": [
+    "/yargs"
+  ],
+  "_resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz",
+  "_shasum": "deefcfdb2e800784aa34f46fa08e06851c7bbbc5",
+  "_spec": "cliui@^5.0.0",
+  "_where": "E:\\顾家\\gujia\\node_modules\\yargs",
+  "author": {
+    "name": "Ben Coe",
+    "email": "ben@npmjs.com"
+  },
+  "bugs": {
+    "url": "https://github.com/yargs/cliui/issues"
+  },
+  "bundleDependencies": false,
+  "config": {
+    "blanket": {
+      "pattern": [
+        "index.js"
+      ],
+      "data-cover-never": [
+        "node_modules",
+        "test"
+      ],
+      "output-reporter": "spec"
+    }
+  },
+  "dependencies": {
+    "string-width": "^3.1.0",
+    "strip-ansi": "^5.2.0",
+    "wrap-ansi": "^5.1.0"
+  },
+  "deprecated": false,
+  "description": "easily create complex multi-column command-line-interfaces",
+  "devDependencies": {
+    "chai": "^4.2.0",
+    "chalk": "^2.4.2",
+    "coveralls": "^3.0.3",
+    "mocha": "^6.0.2",
+    "nyc": "^13.3.0",
+    "standard": "^12.0.1",
+    "standard-version": "^5.0.2"
+  },
+  "engine": {
+    "node": ">=6"
+  },
+  "files": [
+    "index.js"
+  ],
+  "homepage": "https://github.com/yargs/cliui#readme",
+  "keywords": [
+    "cli",
+    "command-line",
+    "layout",
+    "design",
+    "console",
+    "wrap",
+    "table"
+  ],
+  "license": "ISC",
+  "main": "index.js",
+  "name": "cliui",
+  "repository": {
+    "type": "git",
+    "url": "git+ssh://git@github.com/yargs/cliui.git"
+  },
+  "scripts": {
+    "coverage": "nyc --reporter=text-lcov mocha | coveralls",
+    "pretest": "standard",
+    "release": "standard-version",
+    "test": "nyc mocha"
+  },
+  "standard": {
+    "ignore": [
+      "**/example/**"
+    ],
+    "globals": [
+      "it"
+    ]
+  },
+  "version": "5.0.0"
+}

+ 54 - 0
node_modules/color-convert/CHANGELOG.md

@@ -0,0 +1,54 @@
+# 1.0.0 - 2016-01-07
+
+- Removed: unused speed test
+- Added: Automatic routing between previously unsupported conversions
+([#27](https://github.com/Qix-/color-convert/pull/27))
+- Removed: `xxx2xxx()` and `xxx2xxxRaw()` functions
+([#27](https://github.com/Qix-/color-convert/pull/27))
+- Removed: `convert()` class
+([#27](https://github.com/Qix-/color-convert/pull/27))
+- Changed: all functions to lookup dictionary
+([#27](https://github.com/Qix-/color-convert/pull/27))
+- Changed: `ansi` to `ansi256`
+([#27](https://github.com/Qix-/color-convert/pull/27))
+- Fixed: argument grouping for functions requiring only one argument
+([#27](https://github.com/Qix-/color-convert/pull/27))
+
+# 0.6.0 - 2015-07-23
+
+- Added: methods to handle
+[ANSI](https://en.wikipedia.org/wiki/ANSI_escape_code#Colors) 16/256 colors:
+  - rgb2ansi16
+  - rgb2ansi
+  - hsl2ansi16
+  - hsl2ansi
+  - hsv2ansi16
+  - hsv2ansi
+  - hwb2ansi16
+  - hwb2ansi
+  - cmyk2ansi16
+  - cmyk2ansi
+  - keyword2ansi16
+  - keyword2ansi
+  - ansi162rgb
+  - ansi162hsl
+  - ansi162hsv
+  - ansi162hwb
+  - ansi162cmyk
+  - ansi162keyword
+  - ansi2rgb
+  - ansi2hsl
+  - ansi2hsv
+  - ansi2hwb
+  - ansi2cmyk
+  - ansi2keyword
+([#18](https://github.com/harthur/color-convert/pull/18))
+
+# 0.5.3 - 2015-06-02
+
+- Fixed: hsl2hsv does not return `NaN` anymore when using `[0,0,0]`
+([#15](https://github.com/harthur/color-convert/issues/15))
+
+---
+
+Check out commit logs for older releases

+ 21 - 0
node_modules/color-convert/LICENSE

@@ -0,0 +1,21 @@
+Copyright (c) 2011-2016 Heather Arthur <fayearthur@gmail.com>
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+

+ 68 - 0
node_modules/color-convert/README.md

@@ -0,0 +1,68 @@
+# color-convert
+
+[![Build Status](https://travis-ci.org/Qix-/color-convert.svg?branch=master)](https://travis-ci.org/Qix-/color-convert)
+
+Color-convert is a color conversion library for JavaScript and node.
+It converts all ways between `rgb`, `hsl`, `hsv`, `hwb`, `cmyk`, `ansi`, `ansi16`, `hex` strings, and CSS `keyword`s (will round to closest):
+
+```js
+var convert = require('color-convert');
+
+convert.rgb.hsl(140, 200, 100);             // [96, 48, 59]
+convert.keyword.rgb('blue');                // [0, 0, 255]
+
+var rgbChannels = convert.rgb.channels;     // 3
+var cmykChannels = convert.cmyk.channels;   // 4
+var ansiChannels = convert.ansi16.channels; // 1
+```
+
+# Install
+
+```console
+$ npm install color-convert
+```
+
+# API
+
+Simply get the property of the _from_ and _to_ conversion that you're looking for.
+
+All functions have a rounded and unrounded variant. By default, return values are rounded. To get the unrounded (raw) results, simply tack on `.raw` to the function.
+
+All 'from' functions have a hidden property called `.channels` that indicates the number of channels the function expects (not including alpha).
+
+```js
+var convert = require('color-convert');
+
+// Hex to LAB
+convert.hex.lab('DEADBF');         // [ 76, 21, -2 ]
+convert.hex.lab.raw('DEADBF');     // [ 75.56213190997677, 20.653827952644754, -2.290532499330533 ]
+
+// RGB to CMYK
+convert.rgb.cmyk(167, 255, 4);     // [ 35, 0, 98, 0 ]
+convert.rgb.cmyk.raw(167, 255, 4); // [ 34.509803921568626, 0, 98.43137254901961, 0 ]
+```
+
+### Arrays
+All functions that accept multiple arguments also support passing an array.
+
+Note that this does **not** apply to functions that convert from a color that only requires one value (e.g. `keyword`, `ansi256`, `hex`, etc.)
+
+```js
+var convert = require('color-convert');
+
+convert.rgb.hex(123, 45, 67);      // '7B2D43'
+convert.rgb.hex([123, 45, 67]);    // '7B2D43'
+```
+
+## Routing
+
+Conversions that don't have an _explicitly_ defined conversion (in [conversions.js](conversions.js)), but can be converted by means of sub-conversions (e.g. XYZ -> **RGB** -> CMYK), are automatically routed together. This allows just about any color model supported by `color-convert` to be converted to any other model, so long as a sub-conversion path exists. This is also true for conversions requiring more than one step in between (e.g. LCH -> **LAB** -> **XYZ** -> **RGB** -> Hex).
+
+Keep in mind that extensive conversions _may_ result in a loss of precision, and exist only to be complete. For a list of "direct" (single-step) conversions, see [conversions.js](conversions.js).
+
+# Contribute
+
+If there is a new model you would like to support, or want to add a direct conversion between two existing models, please send us a pull request.
+
+# License
+Copyright &copy; 2011-2016, Heather Arthur and Josh Junon. Licensed under the [MIT License](LICENSE).

Некоторые файлы не были показаны из-за большого количества измененных файлов